intrigeri:
> Hi,
>
> i18nspector is not happy:
>
> E: perl-brace-format-string-missing-argument msgid 1y: count not in msgstr[0] while in msgid_plural
> E: perl-brace-format-string-missing-argument msgid 1d: count not in msgstr[0] while in msgid_plural
> E: perl-brace-format-string-missing-argument msgid 1h: count not in msgstr[0] while in msgid_plural
> E: perl-brace-format-string-missing-argument msgid 1m: count not in msgstr[0] while in msgid_plural
> E: perl-brace-format-string-missing-argument msgid 1s: count not in msgstr[0] while in msgid_plural
>
> I believe that's because Macedonian has different plural forms than
> e.g. Spanish:
>
> "Plural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n"
> … which the translations I pulled from Transifex don't take into account.
This kind of freaky things are the ones that I like about i18n. I went on a knowledge gathering mission and I found that:
Transifex takes it into account, but the problem is that we are not adding {count} on the first msgid.
It seems Macedonian uses a form for numbers that **end** in 1: 1, 21, 31, 41, 1001, etc.
They don't divide numbers in singular vs. plural as we do.
So we need the {count} variable on the string for the numbers that end in 1, and another for numbers that don't. (ikr!)
I found a list of gettext expressions at
https://php-gettext.github.io/Languages/ and there it says that:
Macedonian: n % 10 != 1 || n % 100 == 11
Spanish: n != 1
The header of the .po files is right and gives the right headers.
The translation GUI in transifex has a special thingy to translate this, and it takes it into account
(ref:
https://www.transifex.com/otf/torproject/translate/#mk/tails-misc/319419042?q=text%3A1y )
If you look into the tail repo's ./mk.po file, the two options are there:
#. Translators: Don't translate {count}, it's a place holder and
#. will be replaced.
#. y is the short form for years.
#: config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/DownloadProgress.pm:78
#, perl-brace-format
msgid "1y"
msgid_plural "{count}y"
msgstr[0] "1г"
msgstr[1] "{count}г"
It seems that the problem is that msgid "1y" should be msgid "{count}y", because it will be used for 1, 21, 31, etc.
Does this make sense?
I started making a merge request, but I need help with the calculation of numbers on
config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/DownloadProgress.pm because I don't know how to make it
different for Macedonian, so I leave it to you....