Topic: Empty strings
stonerl Topic Opener |
Posted at: 2019-05-17, 14:41
How do we handle empty strings?
e.g. here it would set unnamed to an empty string if the translation was "". That is the case for all en_US.po strings because they do not contain any translations. Should I check servename ui again and do:
Edit: The string is only empty in debug but not release. How come? Edited: 2019-05-17, 14:50
Top Quote |
GunChleoc |
Posted at: 2019-05-18, 18:11
If the translation was "", Widelands would crash, because the placeholder is not present. The only way that happens is if a translator decided to translate with an empty string, which is completely wrong in this case. This will get picked up eventually when I run my translation validation script and I would fix it on Transifex and pull the translations again.
Since when? I guess I don't understand what you mean here. In any case, if something has not been translated, Gettext will simply show the original string. tl;dr show me to the commit and give me steps to reproduce and I will have a look. Also if you are working on something, do not touch the po files. That's all generated by script. Busy indexing nil values Top Quote |
stonerl Topic Opener |
Posted at: 2019-05-23, 12:59
I'm talking about the changes I made in this already merged branch: https://code.launchpad.net/~widelands-dev/widelands/bug-1825932-open-games-clean-start Here I take the translated string and add a number in case a hostaname with the same name exists. This does work with release but not with debug. Since all strings in en_US.po are empty, in debug it takes an empty string, in release it takes the original string "unnamed".
en_US.po is empty. No string is translated. Every time I switch to "try system language" (en_US in my case) I get a message in the settings that tells my that 100% of the translations are missing. That is because en_US.po does not contain any translated strings. Top Quote |
GunChleoc |
Posted at: 2019-05-25, 19:47
So what? If The message in the options is just there to manage user expectation, because we have some translations with low coverage. I tried to do some testing with the locale and got
So something's fishy in any case. Edited: 2019-05-25, 19:48
Busy indexing nil values Top Quote |