Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upWhitespaces in strings considered harmful #4653
Comments
i2amroy
added
the
Translation
label
Mar 11, 2014
This comment has been minimized.
This comment has been minimized.
|
@VlasovVitaly @Night-Pryanik is this still an issue? |
This comment has been minimized.
This comment has been minimized.
|
@illi-kun Most speed modifiers such like |
This comment has been minimized.
This comment has been minimized.
|
I mean, is that an issue for translators? |
This comment has been minimized.
This comment has been minimized.
|
Not for Chinese at least as translated strings are always shorter. I can filled the string to same length anyway. Cant say about other languages. |
This comment has been minimized.
This comment has been minimized.
|
It's not really an “issue” anymore since we finally don't use that crappy Launchpad anymore. Now it's mostly like an annoyance. |
This comment has been minimized.
This comment has been minimized.
|
@Wuzzy2 If I understand it correctly, you meant something like " |
This comment has been minimized.
This comment has been minimized.
|
Not only this, but in general whitespace should be avoided. Regarding your example: Strings like “Speed: ” are really bad, not because of the whitespace but because it is an indication that string concatenation is used. |
This comment has been minimized.
This comment has been minimized.
|
To clarify, what we would like to do instead of aligning with whitespace
manually is to use methods that accept a (translated) string and a field
width, and output a padded string that will fit in the provided space (note
this might truncate instead of padding).
|
This comment has been minimized.
This comment has been minimized.
|
We already have all methods for Unicode strings. But ofc they not cover all code. This issue should be closed. And similar issues must be opened for all particular string(s). Agree with Wuzzy2/// String concatenation is the mortal sin of internationalization! |
This comment has been minimized.
This comment has been minimized.
|
I agree with @VlasovVitaly, this issue contains general complains but doesn't point out the exact "bad" strings (except 'map' menu but it's mentioned just as an example), it's simply not possible to "fix" this issue because "bad" strings aren't listed. |
This comment has been minimized.
This comment has been minimized.
|
@illi-kun This should be closed? |
Wuzzy2 commentedNov 24, 2013
There are some strings which have lots of traling or leading whitespace. This doesn’t seem right to me. I think any leading or trailing spaces should usually be eliminated in the original strings. There may be some exceptions.
An example for this are the strings you see at the right part of the map. It seems those strings must have a constant length with the rest filled with spaces. Well, this sucks. What sucks even more is that launchpad.net automatically adds the same amount of white space as in the original string. It is not possible to disable this behaviour. I asked them. They told me that this whitespace stuff is a bad idea and I should go complain to you instead. :D To see the result of this, try CDDA 0.9 with the German translation (download it from Launchpad).
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.