bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

.:: Question about msgcat ::.


From: Patrick Frenette
Subject: .:: Question about msgcat ::.
Date: Wed, 19 Oct 2022 15:24:01 +0000

Hi,

Not sure if it’s the good place too ask but I have the exact same issues as this:

https://github.com/php-gettext/Gettext/issues/48#issuecomment-70634972


I did the same test with these two files:

singular.po:

msgid "child"

msgstr ""

plural.po:

msgid "child"

msgid_plural "children"

msgstr[0] ""

msgstr[1] ""

#1 Running msgcat singular.po plural.po we have:

#, fuzzy

msgid "child"

msgstr ""

"#-#-#-#-#  singular.po  #-#-#-#-#\n"

"#-#-#-#-#  plural.po  #-#-#-#-#\n"

#2 Running msgcat plural.po singular.po we have:

#, fuzzy

msgid "child"

msgid_plural "children"

msgstr[0] ""

"#-#-#-#-#  plural.po  #-#-#-#-#\n"

"#-#-#-#-#  singular.po  #-#-#-#-#\n"

msgstr[1] "#-#-#-#-#  plural.po  #-#-#-#-#\n"


I use _javascript_ project that return a .json for the translation. Because of this beavior when I use in a template vuejs   
{{ $ngettext(‘child’,’ children’, 4) }} it’s always child showing up because when a merge all my files with msgcat, it always take the first msgid.

How to use msgcat to always take priority of plural vs singular.

Thanks in advance.

 

____


Patrick Frenette

Programmer | Programmeur


reply via email to

[Prev in Thread] Current Thread [Next in Thread]