First releases of Scrabble3D have had rather simple localizations by 'identifier=translation'. Usually, the localization is done with po-files [1] that hold not only identifier and translation but origin, comments and other stuff as well. Scrabble3D will support this format starting with v28c. Some special notes:
* Linebreaks can be added per \n (instead of \\n in ini-format) * Header should consists of at least "Project-Id-Version" (used as internal release information), Last-Translator and PO-Revision-Date (shown in the configuration dialog), Language (Posix locale [2], e.g. en_GB; used to select right plural formula), and the not standardized entry BiDiMode to setup RightToLeft mode.
* Origin of a text can be found in msgctxt (shown prominently in poedit) * msgid contains the original value, msgstr the translation (if no translation is specified the original value will be used) * Entries that are added to an existing file are commented with # New Item
Zitat von New item# New Item #: ulanguage.rtest msgctxt "ulanguage.rtest" msgid "Test" msgstr ""
* Entries that are not used anymore are removed completely from the file. After loading a file it is rewritten automatically. * Changed entries are commented with the current term (the old one can be found in msgid)
Zitat von Changed item# Changed to Test1 #: ulanguage.rtest msgctxt "ulanguage.rtest" msgid "Test" msgstr ""
* Comments can be removed safely with poedit * Scrabble3D creates a new default.lang on start with all strings in po format, of course without translation. This file will be overwritten on the next start. * Plurals are added either by poedit (or any other po editor), after pluralforms have been assigned correctly to the header. Or you can use a text editor.
Zitat von Plural forms#: ulanguage.rmain_lettersexchanged msgctxt "ulanguage.rmain_lettersexchanged" msgid "%d letter has been exchanged" msgid_plural "%d letters have been exchanged" msgstr[0] "Ein Buchstabe wurde ausgetauscht" msgstr[1] "Es wurden %d Buchstaben ausgetauscht"
* Plural forms can be added to ini format as well. Use a pipe token as separator.
Zitat von Plural forms with ini stylermain_lettersexchanged=Ein Buchstabe wurde ausgetauscht|Es wurden %d Buchstaben ausgetauscht.
* Plurals can only be assigned to those items that have a msgid_plural info (po) or a pipe token (ini) respectively * Items in Ini files are not removed, and not marked as new or changed
Sounds reasonable to me, I'll try and steal some time this week to try the latest test version (I assume there is one); it's just that this MS project for Office 15 is in the last push before Xmas and things are a leeeeetle insane here.
******************************* Do, or do not. There is no try.
As a goody you can use numerals in pluralforms. To do so just replace %d (or %s) by a %w and translate rNumeralZero..rNumeralTwelve. All numbers between 0 and 12 will be replaced by the corresponding numeral.
Example:
1 2
rmain_lettersexchanged=Ein Buchstabe wurde ausgetauscht|Es wurden %w Buchstaben ausgetauscht. rnumeraltwo=zwei
respectively
1 2 3 4 5 6 7 8 9 10 11
#: ulanguage.rmain_lettersexchanged msgctxt "rmain_lettersexchanged" msgid "%d letter has been exchanged" msgid_plural "%d letters have been exchanged" msgstr[0] "Ein Buchstabe wurde ausgetauscht." msgstr[1] "Es wurden %w Buchstaben ausgetauscht."
If the system is the same as in Russian, in Slovak even numbers like 22, 23, 24 or 32, 33, 34 and so on would need nominative plural, and numbers like 15, 25, 36, 48, 59 and so on would need genitive plural. Maybe numbers like 11, 21, 31, 41 and so on would need nominative singular.
A "complicated" system like this, is it possible in translations of Scrabble3D now?
Zitat von Scotty im Beitrag #3As a goody you can use numerals in pluralforms. To do so just replace %d (or %s) by a %w and translate rNumeralZero..rNumeralTwelve. All numbers between 0 and 12 will be replaced by the corresponding numeral.
The plural form is chosen from the number depending on locale (and if translation is available). The use of numerals is independent from this function.
Zitat von Scotty im Beitrag #9The plural form is chosen from the number depending on locale (and if translation is available). The use of numerals is independent from this function.
Zitat The use of numerals is independent from this function.
I think I should explain this using German:
"numeral" here means "Zahlwort". Scotty means: Each number from 0 to 12 will be replaced by the corresponding Zahlwort, so e.g. "5" will be replaced by "five" if you use English, and by "fünf" if you use German, etc.
Zitat But how can correct Russian plurals (i.e. genitive singular and genitive plural) be associated to the right numerals? I don't understand how it works.
I don't either.
I just wanted to clarify possible misunderstandings.