Tx accepts only "Plural-Forms: nplurals=1; plural=0;\n" on ja_JP but it's cause of fatal issue of po fiiles #253
Comments
|
Hi @ponsfoot, Transifex tries to keep the languages settings/definitions accordingly to Unicode[1] It's known the Japanese language doesn't have plurals, so you probably should be fine using it like it is. It shouldn't cause any problems. There is no way you can customize the plural equations at the moment, but you really shouldn't. :) [1] http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html |
|
Hi diegobz, Did you see the example which I reported?:
That is, 'msgid_plural' includes %u specifier and it's not in 'msgid'. There is a workaround, however, should Tx restrict the original source's style? |
|
@ponsfoot Since Japanese only have one plural form -- and this is what the plural equation says -- you will have to specify only one translation for pluralized msgids, too. This is how gettext works. |
|
OK, I understand that you have no mind to correct this issue.
gettext works properly if this po file is pushed without Tx. |
|
@ponsfoot Yeah, I understood what you mean in the first place and I did notice the pluralized source string. The thing is that if you add an equation that allows plural rules in Japanese, you will enforce to get always a plural translation, for any pluralized string you have across the whole fine. For instance, for strings like: You would require the translator to add 2 identical translations for it. This is not the way to translate stuff to Japanese. I'm just pointing out that the solution you found, although it works for you, in general it's problematic. ;) Now, If you really want to support the %u placeholder even for Japanese, I would suggest you to probably turn that pluralized string into 2 separated normal strings and hold the logic of each one to display in your own code. |
|
@mpessas I know (also you may already know) this is a rare case. So, that's all in the past now for me. Thanks |
|
@diegobz |
|
@ponsfoot Indeed, because it tends to do not support specific problematic solutions. |
Please allow to specify plurals definition as follows on ja_JP:
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
Currently, Tx accepts only "Plural-Forms: nplurals=1; plural=0;\n" on ja_JP but it can be cause of fatal error of po files.
If source strings are defined like follows:
msgid ""
"Are you sure that you want to permanently\n"
"delete the selected file?"
msgid_plural ""
"Are you sure that you want to permanently\n"
"delete the %u selected files?"
source: Thunar→xfce-4-10
it requires "Plural-Forms: nplurals=2; plural=(n != 1);\n".
Otherwise, Tx drops existing strings as for plural strings.
It's a cause of fatal error of po files.
Locale:" ja_JP
Resource: Thunar→xfce-4-10
https://www.transifex.com/projects/p/xfce/language/ja/?project=43369
BTW, Does Tx have to specify plural definitions explicitly?
The text was updated successfully, but these errors were encountered: