leper Posted January 24, 2014 Report Share Posted January 24, 2014 This is more of a problem for languages like mine that have more than one form, but a pattern different from English. Eventually, this string should be fetched with ngettext. I don't remember if our i18n system can do that already.It does. (The function is called translatePlural(singular, plural, count) in the E.ngine)That string is part of the attack rate display code which isn't the nicest thing to translate properly."%(arrowcount)s arrow / second""%(arrowcount)s arrows / second""%(arrowcount)s arrows / %(time) seconds""%(arrowcount)s arrow / %(time) seconds"are the 4 different variations in English, some other languages may have more. If someone can think of a nicer way to translate this, I'm all ears.I'll also upload some newer strings to transifex, since I changed that code since the last update. Quote Link to comment Share on other sites More sharing options...
llen_llen Posted January 26, 2014 Report Share Posted January 26, 2014 (edited) Thank you, GunChleoc and leper."%(arrowcount)s arrow / second""%(arrowcount)s arrows / second""%(arrowcount)s arrows / %(time) seconds""%(arrowcount)s arrow / %(time) seconds"That helped me a lot to understand what's going on. I would prefer to group them into with- and without-variable forms.(singular) : (plural)#1: "%(arrowcount)s arrow / second", "%(arrowcount)s arrows / second"#2: "%(arrowcount)s arrow / %(time) seconds", "%(arrowcount)s arrows / %(time) seconds"And in my opinion, the slash and "second(s)" are better not to be separated, as well as prepositions and following nouns. Edited January 26, 2014 by llen_llen Quote Link to comment Share on other sites More sharing options...
leper Posted January 26, 2014 Report Share Posted January 26, 2014 If that works for GunChleoc (you have more than one plural form, right?), I could use that. Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted January 27, 2014 Report Share Posted January 27, 2014 The difficult for the ngettext system here is that you have 2 plurals in one string, so you will need to fetch them separately, e.g. something like this (in mock-up code):// get plural form for arrowsstring arrows = translatePlural("%d arrow", "%d arrows", arrow_count)// get plural form for secondsstring seconds = translatePlural("%d second", "%d seconds", time_seconds)// stick them togetherstring arrows_seconds = sprintf("%(arrowcount)s / %(time)", arrows, seconds)If some languages need the "/ %(time)" in one string, that would also be fine by me. I jut have trouble coming up with the mock-up code for that right now. Quote Link to comment Share on other sites More sharing options...
Spahbod Posted January 27, 2014 Report Share Posted January 27, 2014 A problem I found using the system is when I want to translate something like this: "25% faster"It thinks that the "% f" is actually a placeholder for some variable, so it doesn't let me to translate it without using the "f" character after the "%". Quote Link to comment Share on other sites More sharing options...
fcxSanya Posted January 27, 2014 Report Share Posted January 27, 2014 A problem I found using the system is when I want to translate something like this: "25% faster"Did you try this before or after this announcement: https://www.transifex.com/projects/p/0ad/announcement/40742/ ? Quote Link to comment Share on other sites More sharing options...
leper Posted January 27, 2014 Report Share Posted January 27, 2014 The difficult for the ngettext system here is that you have 2 plurals in one string, so you will need to fetch them separately, e.g. something like this (in mock-up code):// get plural form for arrowsstring arrows = translatePlural("%d arrow", "%d arrows", arrow_count)// get plural form for secondsstring seconds = translatePlural("%d second", "%d seconds", time_seconds)// stick them togetherstring arrows_seconds = sprintf("%(arrowcount)s / %(time)", arrows, seconds)If some languages need the "/ %(time)" in one string, that would also be fine by me. I jut have trouble coming up with the mock-up code for that right now.That is what is currently used (in a slightly modified form, omitting the %(time)s for "second").Spahbod: That should be fixed (see fcxSanya's reply). Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted February 13, 2014 Report Share Posted February 13, 2014 I don't know if the code structure easily allows this, but how about splitting the translation into multiple text domains? The main file is huge.For example, we could have separate .po files for general GUI stuff (menus etc.), one for the quotes in the loading screen, and one for each civ. And of course one for each campaign, once they get implemented.The files could then be ordered in Transifex so as to have the most important ones first, and it would also make the localization of mods easier. It would also make it easier for the bigger teams to split and coordinate the work. 1 Quote Link to comment Share on other sites More sharing options...
Gallaecio Posted February 14, 2014 Report Share Posted February 14, 2014 It would be possible, yes. But it is not a priority right now. Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted February 14, 2014 Report Share Posted February 14, 2014 I know getting everything to run properly is more important!Once that is achieved, this is a feature I' really like to see though Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted February 23, 2014 Report Share Posted February 23, 2014 (edited) I have another feature request for this - for sometime in the future when/if you find the time, of course.It would be great to have support for unicode entities, so I can use stuff like protected hyphens. My language has prefixes like t-, n- and h- that must not be split from the following word. Also, it would be really great if we could get the character U+204A in (⁊) in, but I guess that is primarily a font issue. Edited February 23, 2014 by GunChleoc Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted February 24, 2014 Report Share Posted February 24, 2014 It would be great to have support for unicode entities, so I can use stuff like protected hyphens. My language has prefixes like t-, n- and h- that must not be split from the following word.Why not use a non-breaking hyphen (U+2011)? It's supported by our fonts and won't break the word. 1 Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted February 24, 2014 Report Share Posted February 24, 2014 Yep, that's the one I meant. If I can just input it as a character, great Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted May 2, 2014 Report Share Posted May 2, 2014 I found 2 string inconsistencies:simulation/ai/tutorial-ai/economic_walkthrough.js:148Research the stone mining technology from the storehouse."stone mining" does not exist in Transifex.simulation/ai/tutorial-ai/economic_walkthrough.js:193Start researching Phase 2.Which phase is that? village/town/city Quote Link to comment Share on other sites More sharing options...
niektb Posted May 2, 2014 Report Share Posted May 2, 2014 Phase 2 should be the Town Phase. Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted May 3, 2014 Report Share Posted May 3, 2014 Just to make sure: "Infantry Spearmen +1 Pierce Armor Levels." means that Infantry Spearmen get +1 protection against piercing weapons (it could also mean that Infantry Spearmen pierce the armor of others with +1)? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted May 3, 2014 Report Share Posted May 3, 2014 (All those caps really look strange) But anyway, you're right, pierce armour is the armour against pierce weapons. Piercing the armour of others would be denoted with pierce attack. Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted May 3, 2014 Report Share Posted May 3, 2014 Thanks!I found a typo:civs/brit.jsonHistoryThe Britons were the Celtic tribes of the British Isles. Using chariots, longswordsmen and powerful melee soldiers, they staged fearesome revolts against Rome to protect their customs and interests. Also, they built thousands of unique structures such as hill forts, crannogs and brochs. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted May 3, 2014 Report Share Posted May 3, 2014 We can't edit that now as we're in string freeze, and editing the English text would cause all other languages (who probably don't have such a mistake) to be invalidated. Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted May 3, 2014 Report Share Posted May 3, 2014 With GIT, we can get around that. Branching in SVN is too much effort. Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted May 4, 2014 Report Share Posted May 4, 2014 (edited) Yes, string freeze is blocking any changed for the moment; we should still keep track of these somehow though.I have another one:civs/hele.jsonTeamBonuses[0].DescriptionAll units and allied units have increased LOS. ~ 10%LOS is not defined anywhere. I have no idea what it means and neither will the player. There is another LOS in the options (gui/options/options.js:21 "Smooth LOS"), but that will be something technical.ETA: I have had a look at the German translation, it seems to be "vision range" Edited May 4, 2014 by GunChleoc Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted May 4, 2014 Report Share Posted May 4, 2014 LOS = line of sightVision range might indeed be more clear here. Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted May 4, 2014 Report Share Posted May 4, 2014 Vision range is what is used everywhere else. We should stick with that for consistency. Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted May 5, 2014 Report Share Posted May 5, 2014 I just managed to hit the 90% mark and I hope I'm still in time for getting into the SVN? 1 Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted May 5, 2014 Report Share Posted May 5, 2014 I just managed to hit the 90% mark and I hope I'm still in time for getting into the SVN? We didn't make the final pull yet. So I think you're in time. But we just noticed that ICU (https://en.wikipedia.org/wiki/International_Components_for_Unicode) doesn't know Gaelic (marking your file as invalid). Guess we'll have to find something for that (ICU also doesn't recognise Latin, but that issue was not urgent we thought). 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.