Changeset View
Standalone View
binaries/data/mods/public/gui/common/l10n.js
- This file was added.
function durationToString(time) | |||||
{ | |||||
return Engine.FormatMillisecondsIntoDateStringGMT(time, time < 1000 * 60 * 60 ? | |||||
// Translation: Format of the time elapsed or remaining, for game durations, ceasefire and wonder-victory countdowns, etc. | |||||
// For a list of symbols that you can use, see: | |||||
// https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table | |||||
translateWithContext("duration less than one hour", "m:ss") : | |||||
// Translation: Format of the time elapsed or remaining, for game durations, ceasefire and wonder-victory countdowns, etc. | |||||
// For a list of symbols that you can use, see: | |||||
// https://sites.google.com/site/icuprojectuserguide/formatparse/datetime?pli=1#TOC-Date-Field-Symbol-Table | |||||
translateWithContext("duration greater than one hour", "H:mm:ss")); | |||||
elexis: Since we already have a multi line translation comment in lobby.js we at least woudn't be the… | |||||
elexisUnsubmitted Not Done Inline Actionsnope, rP14954 elexis: nope, rP14954 | |||||
templeAuthorUnsubmitted Not Done Inline ActionsI'm not following. If you're talking about the translate("HH:mm") a couple lines before this in lobby.js, it's ignored because there's another translate("HH:mm") line earlier in the file. temple: I'm not following.
If you're talking about the translate("HH:mm") a couple lines before this… | |||||
elexisUnsubmitted Not Done Inline ActionsI'm talking about the translation comments starting at // Translation: and ending at the URL. The mentioned extractor python tool is supposed to do that job, but // failts the pattern for a "multiline" comment. You can see that its already broken in svn and the current "*pot" file shows it too. The pattern /\*.*?\*/(?us) looks a bit obfuscated to me, perhaps they mean /** Translation: foo on the first line, * no the second, just like JSdoc? elexis: I'm talking about the translation comments starting at `// Translation:` and ending at the URL. | |||||
} |
Since we already have a multi line translation comment in lobby.js we at least woudn't be the first one to add an incomplete one, yay. To be sure one could look in extractors.py or look into the wiki pages (Internationalization_and_Localization and iirc more).
From a quick look messages.json register the Translation keyword under commentTags and that is parsed by extractJavascriptFromFile in extractors.py. We see multilinecomment there. The only other reference to that keyword is in jslexer.py:
So perhaps it is wrong in lobby.js after all.
Experimental evidence comes in from the *po files that this script produces (and that are getting uploaded to transifex automatically).
-> it's broken
seems to be the case since rP14098