Topic: Untranslatable strings
GunChleoc![]() Topic Opener |
Posted at: 2013-10-08, 13:55
There's a bunch of strings that are untranslatable, because word order cannot be changed. An example is
Which produces messages like "Out of stone" in the game. What I would need here instead is so I can translate it as How do you want me to report such strings? I also hit quite a number of truncated strings, because there isn't room enough for them in the GUI. Where and how do you want me to report those? Busy indexing nil values ![]() ![]() |
fk![]() |
Posted at: 2013-10-08, 15:30
"Out of %s" That makes sense. Unfortunately, when a sentence in the source is changed, its translations in all languages disappear automatically from Launchpad. That makes it hard to update such small changes, much will be lost and never updated anymore and translators might become discouraged. I can only hope that there is a way to fix that. Btw. ware names are not translated. I think that it is due to the fact that they are not objects in the game. You will get something like: "Chan eil enots air fhàgail dhomh" "I also hit quite a number of truncated strings, because there isn't room enough for them in the GUI. Where and how do you want me to report those? " The translations and message boxes need a small overhaul. It would in my opinion be great if that could become an issue for build19 and I am prepared to spend much time on it. It would in that light also be helpful to return to the smaller font. ![]() ![]() |
GunChleoc![]() Topic Opener |
Posted at: 2013-10-09, 09:01
The way to fix that is for translators to download the files from Launchpad before the change and load them into Virtaal. When they then grab the changed version, Virtaal's translation memory will pull strings that have small changes out of the translation memory and mark the changes, so retranslating goes really fast. Launchpad only offers 100% matches, so using Virtaal is the way to go in these cases. Maybe the way to go would be to make a complete list, then announce it to give translators some time to grab the old version, and then change them all at once?
I actually think that the current font is small enough. Especially the text font - when playing the tutorial campaign, I didn't read the flavour messages at all, because it was too hard on my eyes. One of the truncation problems occurs in the headers for the game lobby, where the font is tiny already. I can't even get "Sgioba" for "Team" in, which is only 1 extra letter. Another prominent example is the OK-button, which is "Ceart ma-thà" in Gaelic. Abbreviations (which English speakers are really fond of) are always a challenge for me, because Gaelic doesn't do them. The best way of course would be dynamic button/column width and the messageboxes adapting accordingly, but I do know that this would take some programming. BTW: here's a document with general guidelines on what you can expect regarding text size: http://www.w3.org/International/articles/article-text-size And please do let me know if I you need any further testing data or screenshots. Busy indexing nil values ![]() ![]() |
GunChleoc![]() Topic Opener |
Posted at: 2013-10-10, 14:31
Time to start with the list.... I will add a post whenever I've finished a file that contains problematic strings. Apart from missing placeholders that force translators to jump through hoops trying to make their language looke like English, plural handling is another big problem. I have found some strings that use File: win_conditions.poStrings that need ngettext
Strings that need placeholders
Suggested string: BTW where does the last string come up? I have trouble understanding what it means. Edited: 2013-10-10, 14:31
Busy indexing nil values ![]() ![]() |
SirVer |
Posted at: 2013-10-11, 06:17
This is a great contribution, but it would be even better if you just did the fixes in a branch that we can eventually merge? If you post them here, someone else has to look over them, understand them again (like you already did) and implement your suggestions. You already have all the knowledge to fix the strings directly at their source (feel free to ask here of course if something is unclear). You could also directly fix the plural issues then. Are you interested on working on this? One more thing, for the placeholders we should use boosts format string format [1]:
This allows reordering of the inserted values for translators which is sometimes needed. [1] http://www.boost.org/doc/libs/1_54_0/libs/format/ ![]() ![]() |
GunChleoc![]() Topic Opener |
Posted at: 2013-10-11, 08:06
Sounds good. I'll have to see about compiling the code, to make sure I won't break anything. Wish me luck! And thanks for the syntax Edited: 2013-10-11, 10:21
Busy indexing nil values ![]() ![]() |
GunChleoc![]() Topic Opener |
Posted at: 2013-10-11, 11:49
Well, after managing to compile, I tried changing the Lua script. However, we don't have So, I tried my hand at a .cc file, since I've done this stuff in C before, and the languages have similar syntax (I've never written a line of C++ in my life). I picked Boost:
Result:
Raw C++ syntax:
Result:
Printf: printf(_("Do you really want to delete %s?"), fname), Result:
Sprintf:
Result:
I also tried fiddling with the placeholder, Edited: 2013-10-11, 11:50
Busy indexing nil values ![]() ![]() |
Tino |
Posted at: 2013-10-11, 12:31
Hi, you'll have to include boost::format:
and then
The string has to be put in _() to get it translated, and because boost::format does not return a std::string we have to do one cast with .str() Does this help? Edited: 2013-10-11, 12:35
![]() ![]() |
GunChleoc![]() Topic Opener |
Posted at: 2013-10-11, 15:56
I've done the include and added this:
And the code compiled, but when testing, it didn't like the format:
It would help if the error message told me what it didn't like about it Busy indexing nil values ![]() ![]() |
Tino |
Posted at: 2013-10-11, 18:05
Edited: 2013-10-11, 18:16
![]() ![]() |