question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trailing whitespace in i18n messages (+extra)

See original GitHub issue

Summary:

Translatewiki.net does not support trailing whitespace in messages (it gets stripped). Here is a list of such messages:

Wikimedia:Commons-android-strings-bullet/en
'•  '                                | '•'                                 

Wikimedia:Commons-android-strings-about license/en
'The Wikimedia Commons app is an       | 'The Wikimedia Commons app is an      
open-source app created and maintained | open-source app created and maintained
by grantees and volunteers of the      | by grantees and volunteers of the     
Wikimedia community. The Wikimedia     | Wikimedia community. The Wikimedia    
Foundation is not involved in the      | Foundation is not involved in the     
creation, development, or maintenance  | creation, development, or maintenance 
of the app. '                          | of the app.'                          

Wikimedia:Commons-android-strings-question/en
'Question '                            | 'Question'                            

Wikimedia:Commons-android-strings-achievements revert limit message/en
'minimum required: '                   | 'minimum required:'                   

Wikimedia:Commons-android-strings-bad token error proposed solution/en
'Upload failed due to issues with edit | 'Upload failed due to issues with edit
token. Please try logging out and in   | token. Please try logging out and in  
again. '                               | again.'                               

Wikimedia:Commons-android-strings-review c violation report question/en
'It is copyright violation because it  | 'It is copyright violation because it 
is '                                   | is'                                   

Insignificant trailing whitespace should be removed. Significant trailing whitespace should be avoided by using variables.

The script also found this difference:

Wikimedia:Commons-android-strings-upload image duplicate/en
'This file already destroyed on        | 'This file already exists on Commons. 
Commons. Are you sure you want to      | Are you sure you want to proceed?'    
proceed?'                              |                                       

The change from “exists” to “destroyed” looks like a mistake. Can you verify?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
misaochancommented, Jan 21, 2021

@maxbetton Go for it. 😃

1reaction
maxbettoncommented, Jan 21, 2021

Hello, this could be a good first contribution for me. May I take it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

i18n ignore leading and trailing spaces · Issue #13114 - GitHub
There are two possible pitfalls here: ... If you strip the leading and trailing whitespace off only the i18n message (but not the...
Read more >
T272562 Many i18n strings in Phabricator i18n contain trailing ...
Many i18n strings in Phabricator i18n contain trailing whitespace. Open, LowestPublic. Actions.
Read more >
Whitespaces are Evil..How Angular translates your string ...
This post contains a set of statements on how to tag particular element with i18n and cases developer needs to consider while coding....
Read more >
How can I stop a label from automatically trimming white ...
So far I've tried placing a space after the i18n key itself to no avail. ... the label from automatically removing the trailing...
Read more >
trimws: Remove Leading/Trailing Whitespace - Rdrr.io
For portability, the default 'whitespace' is the character class [ \t\r\n] (space, horizontal tab, carriage return, newline). Alternatively, [\h\v] is a good ( ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found