Re: Plural forms in translations
Carlos Perelló Marín wrote: > El vie, 07-03-2008 a las 18:38 +0530, Runa Bhattacharjee escribió: > >> Hello, >> >> > > [...] > > Are the msgstr[1] strings required to be manually removed or the msgstr[0] content copied in for them? >>> Yeah, please, remove msgstr[1] if your language doesn't have plural >>> forms at all, you don't need it at all. >>> >>> Cheers. >>> >>> >>> >>> >> What about strings with variables (to indicate the plural number) >> exclusively in the plural version of the string? Deleting these strings >> would do away with messages that might be required in certain circumstances. >> >> e.g >> >> msgid "One file has been modified" >> msgid_plural "%d files have been modified" >> >> The earlier example from the file-roller package is of similar nature. >> > > Well, given that the language doesn't have plural form, msgstr[0] would > have msgstr[0] "something in your language %d" with the variable in its > correct place in the sentence, but I hope you understand it. Not having > plural forms just means that is the same for 0, 1, 2, 3, 4, 5, etc.. > items. > > >> Retaining, these strings with the "Plural-Forms: nplurals=1; >> plural=0;\n" in the header causes msgfmt errors too. >> > > You only need to leave msgid, msgid_plural and msgstr[0], msgstr[0] can > use the format string even if msgid doesn't use it. > > > Thanks Carlos. An irc conversation with Claude helped sort it out as well. regards Runa -- blog: http://runab.livejournal.com irc: mishti or runa_b on Freenode ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
El vie, 07-03-2008 a las 18:38 +0530, Runa Bhattacharjee escribió: > Hello, > [...] > >> Are the msgstr[1] strings required to be manually removed or the > >> msgstr[0] content copied in for them? > >> > > > > > > Yeah, please, remove msgstr[1] if your language doesn't have plural > > forms at all, you don't need it at all. > > > > Cheers. > > > > > > > What about strings with variables (to indicate the plural number) > exclusively in the plural version of the string? Deleting these strings > would do away with messages that might be required in certain circumstances. > > e.g > > msgid "One file has been modified" > msgid_plural "%d files have been modified" > > The earlier example from the file-roller package is of similar nature. Well, given that the language doesn't have plural form, msgstr[0] would have msgstr[0] "something in your language %d" with the variable in its correct place in the sentence, but I hope you understand it. Not having plural forms just means that is the same for 0, 1, 2, 3, 4, 5, etc.. items. > > Retaining, these strings with the "Plural-Forms: nplurals=1; > plural=0;\n" in the header causes msgfmt errors too. You only need to leave msgid, msgid_plural and msgstr[0], msgstr[0] can use the format string even if msgid doesn't use it. Cheers. > > Thanks > > regards > Runa > ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
On Fri, Mar 07, 2008 at 12:00:51PM +0100, Olav Vitters wrote: > On Fri, Mar 07, 2008 at 04:14:27PM +0530, Runa Bhattacharjee wrote: > > > $ msgfmt --version > > > msgfmt (GNU gettext-tools) 0.16.1 > > Yup, got it now. The msgfmt version I was using is this: > > $ msgfmt --version > > msgfmt (GNU gettext-tools) 0.14.6 > > The SVN server has 0.14.5. The commit would've been rejected with a > newer version. An upgrade of the server is planned for around late > April/May. However, I'll see if I can upgrade it. done (0.16.1) -- Regards, Olav ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: msgfmt commit hook (was Re: Plural forms in translations)
Am Freitag, den 07.03.2008, 13:18 + schrieb Thomas Thurman: > On Fri, Mar 07, 2008 at 09:22:14AM +0100, Claude Paroz wrote: > > Please, do not commit translations into GNOME SVN without checking first > > that they pass 'msgfmt' check command: > > We could perhaps have a commit hook which disallows .po files which > don't pass msgfmt. What do people think? as olav already wrote in this thread: "The SVN server has 0.14.5. The commit would've been rejected with a newer version. An upgrade of the server is planned for around late April/May. However, I'll see if I can upgrade it." andre :) -- mailto:[EMAIL PROTECTED] | failed http://www.iomc.de/ | http://blogs.gnome.org/aklapper signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
msgfmt commit hook (was Re: Plural forms in translations)
On Fri, Mar 07, 2008 at 09:22:14AM +0100, Claude Paroz wrote: > Please, do not commit translations into GNOME SVN without checking first > that they pass 'msgfmt' check command: We could perhaps have a commit hook which disallows .po files which don't pass msgfmt. What do people think? T -- Thomas Thurman, tthurman at gnome, http://blogs.gnome.org/tthurman The bear is confused; he only wants to be your friend. ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
Hello, Carlos Perelló Marín wrote: > Hi, > > El vie, 07-03-2008 a las 17:42 +0530, Runa Bhattacharjee escribió: > >> Claude Paroz wrote: >> >>> Le vendredi 07 mars 2008 à 16:14 +0530, Runa Bhattacharjee a écrit : >>> >>> Claude Paroz wrote: > Le vendredi 07 mars 2008 à 15:15 +0530, Runa Bhattacharjee a écrit : > > > >> [snip] >> In any case, for languages which do not have a plural form, the problem might still persist in case the editor settings are set to "not require the plural forms". I get the following screen with only one placeholder for the msgstr string. [1] >>> Language with no plural form should use the string "Plural-Forms: >>> nplurals=1; plural=0;" (1) and not tweak the po editor. >>> Is it the case with your language? >>> >>> >> Yes. But using the "nplurals=1; plural=0;" string still gives the >> following error >> >> $ msgfmt -vc -o /dev/null file-roller.HEAD.bn_IN.po >> bn_IN.po:11: nplurals = 1... >> bn_IN.po:124: ...but some messages have 2 plural forms >> msgfmt: found 1 fatal error >> 259 translated messages. >> >> >> String in question reads as follows: >> >> #. secondary text >> #: ../data/glade/update.glade.h:2 ../src/dlg-update.c:181 >> #, c-format >> msgid "" >> "The file has been modified with an external application. If you don't >> update " >> "the version in the archive, all of your changes will be lost." >> msgid_plural "" >> "There are %d files that have been modified with an external >> application. If " >> "you don't update the files in the archive, all of your changes will be >> lost." >> msgstr[0] "" >> "ফাইলটি কোনো পৃথক অ্যাপ্লিকেশন সহযোগে পরিবর্তন করা হয়েছে। বর্তমান আর্কাইভের >> মধ্যে " >> "উপস্থিত ফাইলের সংস্করণ আপডেট না করা হলে, আপনার করা সব পরিবর্তন বর্জন করা >> হবে।" >> msgstr[1] "" >> >> >> Are the msgstr[1] strings required to be manually removed or the >> msgstr[0] content copied in for them? >> > > > Yeah, please, remove msgstr[1] if your language doesn't have plural > forms at all, you don't need it at all. > > Cheers. > > > What about strings with variables (to indicate the plural number) exclusively in the plural version of the string? Deleting these strings would do away with messages that might be required in certain circumstances. e.g msgid "One file has been modified" msgid_plural "%d files have been modified" The earlier example from the file-roller package is of similar nature. Retaining, these strings with the "Plural-Forms: nplurals=1; plural=0;\n" in the header causes msgfmt errors too. Thanks regards Runa -- blog: http://runab.livejournal.com irc: mishti or runa_b on Freenode ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
Hi, El vie, 07-03-2008 a las 17:42 +0530, Runa Bhattacharjee escribió: > Claude Paroz wrote: > > Le vendredi 07 mars 2008 à 16:14 +0530, Runa Bhattacharjee a écrit : > > > >> Claude Paroz wrote: > >> > >>> Le vendredi 07 mars 2008 à 15:15 +0530, Runa Bhattacharjee a écrit : > >>> > >>> > [snip] > >> > >> In any case, for languages which do not have a plural form, the problem > >> might still persist in case the editor settings are set to "not require > >> the plural forms". I get the following screen with only one placeholder > >> for the msgstr string. [1] > >> > > > > Language with no plural form should use the string "Plural-Forms: > > nplurals=1; plural=0;" (1) and not tweak the po editor. > > Is it the case with your language? > > > > Yes. But using the "nplurals=1; plural=0;" string still gives the > following error > > $ msgfmt -vc -o /dev/null file-roller.HEAD.bn_IN.po > bn_IN.po:11: nplurals = 1... > bn_IN.po:124: ...but some messages have 2 plural forms > msgfmt: found 1 fatal error > 259 translated messages. > > > String in question reads as follows: > > #. secondary text > #: ../data/glade/update.glade.h:2 ../src/dlg-update.c:181 > #, c-format > msgid "" > "The file has been modified with an external application. If you don't > update " > "the version in the archive, all of your changes will be lost." > msgid_plural "" > "There are %d files that have been modified with an external > application. If " > "you don't update the files in the archive, all of your changes will be > lost." > msgstr[0] "" > "ফাইলটি কোনো পৃথক অ্যাপ্লিকেশন সহযোগে পরিবর্তন করা হয়েছে। বর্তমান আর্কাইভের > মধ্যে " > "উপস্থিত ফাইলের সংস্করণ আপডেট না করা হলে, আপনার করা সব পরিবর্তন বর্জন করা > হবে।" > msgstr[1] "" > > > Are the msgstr[1] strings required to be manually removed or the > msgstr[0] content copied in for them? Yeah, please, remove msgstr[1] if your language doesn't have plural forms at all, you don't need it at all. Cheers. > > Thanks > > regards > Runa ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
Claude Paroz wrote: > Le vendredi 07 mars 2008 à 16:14 +0530, Runa Bhattacharjee a écrit : > >> Claude Paroz wrote: >> >>> Le vendredi 07 mars 2008 à 15:15 +0530, Runa Bhattacharjee a écrit : >>> >>> [snip] >> >> In any case, for languages which do not have a plural form, the problem >> might still persist in case the editor settings are set to "not require >> the plural forms". I get the following screen with only one placeholder >> for the msgstr string. [1] >> > > Language with no plural form should use the string "Plural-Forms: > nplurals=1; plural=0;" (1) and not tweak the po editor. > Is it the case with your language? > Yes. But using the "nplurals=1; plural=0;" string still gives the following error $ msgfmt -vc -o /dev/null file-roller.HEAD.bn_IN.po bn_IN.po:11: nplurals = 1... bn_IN.po:124: ...but some messages have 2 plural forms msgfmt: found 1 fatal error 259 translated messages. String in question reads as follows: #. secondary text #: ../data/glade/update.glade.h:2 ../src/dlg-update.c:181 #, c-format msgid "" "The file has been modified with an external application. If you don't update " "the version in the archive, all of your changes will be lost." msgid_plural "" "There are %d files that have been modified with an external application. If " "you don't update the files in the archive, all of your changes will be lost." msgstr[0] "" "ফাইলটি কোনো পৃথক অ্যাপ্লিকেশন সহযোগে পরিবর্তন করা হয়েছে। বর্তমান আর্কাইভের মধ্যে " "উপস্থিত ফাইলের সংস্করণ আপডেট না করা হলে, আপনার করা সব পরিবর্তন বর্জন করা হবে।" msgstr[1] "" Are the msgstr[1] strings required to be manually removed or the msgstr[0] content copied in for them? Thanks regards Runa -- blog: http://runab.livejournal.com irc: mishti or runa_b on Freenode ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
Le vendredi 07 mars 2008 à 16:14 +0530, Runa Bhattacharjee a écrit : > Claude Paroz wrote: > > Le vendredi 07 mars 2008 à 15:15 +0530, Runa Bhattacharjee a écrit : > > > >> Hi Claude, > >> > >> Claude Paroz wrote: > >> > >>> Hi all, > >>> > >>> I noticed today that several translations (especially Marathi, Bengali, > >>> Hindi, Indonesian and others) have problems because of the plural form. > >>> See e.g. http://l10n.gnome.org/languages/mr/gnome-2-22 > >>> > >>> Please, do not commit translations into GNOME SVN without checking first > >>> that they pass 'msgfmt' check command: > >>> > >>> msgfmt -vvc -o /dev/null mr.po > >>> > >>> When there is a plural string, like this: > >>> > >>> msgid "There is a tab with errors" > >>> msgid_plural "There are %d tabs with errors" > >>> > >>> You have to add the %d format string in your translation (if it is > >>> present in the original string). At runtime, %d will be replaced by a > >>> real number. > >>> > >>> Please, correct the files as soon as possible. > >>> > >>> > >>> > >>> > >> Thanks for bringing this up. I have been updating the bn_IN.po files the > >> past week after passing it with msgfmt, but none of the files show an > >> errors: > >> > >> [EMAIL PROTECTED] file-roller]$ msgfmt -cv -o /dev/null bn_IN.po > >> 259 translated messages. > >> > > > > Weird. > > $ msgfmt -vvc -o /dev/null bn_IN.po > > bn_IN.po:124: number of format specifications in 'msgid' and 'msgstr[1]' > > does not match > > msgfmt: found 1 fatal error > > 259 translated messages. > > > > $ msgfmt --version > > msgfmt (GNU gettext-tools) 0.16.1 > > > > In the particular case of file-roller bn_IN.po, the problem is that > > msgstr[1] (translated plural form) is empty at line 125. > > > > > > > Yup, got it now. The msgfmt version I was using is this: > $ msgfmt --version > msgfmt (GNU gettext-tools) 0.14.6 > > The above error is thrown on my local file with the 0.16.1 version. > > In any case, for languages which do not have a plural form, the problem > might still persist in case the editor settings are set to "not require > the plural forms". I get the following screen with only one placeholder > for the msgstr string. [1] Language with no plural form should use the string "Plural-Forms: nplurals=1; plural=0;" (1) and not tweak the po editor. Is it the case with your language? (1) http://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html Claude ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
On Fri, Mar 07, 2008 at 04:14:27PM +0530, Runa Bhattacharjee wrote: > > $ msgfmt --version > > msgfmt (GNU gettext-tools) 0.16.1 > Yup, got it now. The msgfmt version I was using is this: > $ msgfmt --version > msgfmt (GNU gettext-tools) 0.14.6 The SVN server has 0.14.5. The commit would've been rejected with a newer version. An upgrade of the server is planned for around late April/May. However, I'll see if I can upgrade it. -- Regards, Olav ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
Claude Paroz wrote: > Le vendredi 07 mars 2008 à 15:15 +0530, Runa Bhattacharjee a écrit : > >> Hi Claude, >> >> Claude Paroz wrote: >> >>> Hi all, >>> >>> I noticed today that several translations (especially Marathi, Bengali, >>> Hindi, Indonesian and others) have problems because of the plural form. >>> See e.g. http://l10n.gnome.org/languages/mr/gnome-2-22 >>> >>> Please, do not commit translations into GNOME SVN without checking first >>> that they pass 'msgfmt' check command: >>> >>> msgfmt -vvc -o /dev/null mr.po >>> >>> When there is a plural string, like this: >>> >>> msgid "There is a tab with errors" >>> msgid_plural "There are %d tabs with errors" >>> >>> You have to add the %d format string in your translation (if it is >>> present in the original string). At runtime, %d will be replaced by a >>> real number. >>> >>> Please, correct the files as soon as possible. >>> >>> >>> >>> >> Thanks for bringing this up. I have been updating the bn_IN.po files the >> past week after passing it with msgfmt, but none of the files show an >> errors: >> >> [EMAIL PROTECTED] file-roller]$ msgfmt -cv -o /dev/null bn_IN.po >> 259 translated messages. >> > > Weird. > $ msgfmt -vvc -o /dev/null bn_IN.po > bn_IN.po:124: number of format specifications in 'msgid' and 'msgstr[1]' > does not match > msgfmt: found 1 fatal error > 259 translated messages. > > $ msgfmt --version > msgfmt (GNU gettext-tools) 0.16.1 > > In the particular case of file-roller bn_IN.po, the problem is that > msgstr[1] (translated plural form) is empty at line 125. > > > Yup, got it now. The msgfmt version I was using is this: $ msgfmt --version msgfmt (GNU gettext-tools) 0.14.6 The above error is thrown on my local file with the 0.16.1 version. In any case, for languages which do not have a plural form, the problem might still persist in case the editor settings are set to "not require the plural forms". I get the following screen with only one placeholder for the msgstr string. [1] regards Runa [1] http://runa.randomink.org/misc/file-roller-bn_IN%20-%20KBabel.png -- blog: http://runab.livejournal.com irc: mishti or runa_b on Freenode ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
Le vendredi 07 mars 2008 à 15:15 +0530, Runa Bhattacharjee a écrit : > Hi Claude, > > Claude Paroz wrote: > > Hi all, > > > > I noticed today that several translations (especially Marathi, Bengali, > > Hindi, Indonesian and others) have problems because of the plural form. > > See e.g. http://l10n.gnome.org/languages/mr/gnome-2-22 > > > > Please, do not commit translations into GNOME SVN without checking first > > that they pass 'msgfmt' check command: > > > > msgfmt -vvc -o /dev/null mr.po > > > > When there is a plural string, like this: > > > > msgid "There is a tab with errors" > > msgid_plural "There are %d tabs with errors" > > > > You have to add the %d format string in your translation (if it is > > present in the original string). At runtime, %d will be replaced by a > > real number. > > > > Please, correct the files as soon as possible. > > > > > > > Thanks for bringing this up. I have been updating the bn_IN.po files the > past week after passing it with msgfmt, but none of the files show an > errors: > > [EMAIL PROTECTED] file-roller]$ msgfmt -cv -o /dev/null bn_IN.po > 259 translated messages. Weird. $ msgfmt -vvc -o /dev/null bn_IN.po bn_IN.po:124: number of format specifications in 'msgid' and 'msgstr[1]' does not match msgfmt: found 1 fatal error 259 translated messages. $ msgfmt --version msgfmt (GNU gettext-tools) 0.16.1 In the particular case of file-roller bn_IN.po, the problem is that msgstr[1] (translated plural form) is empty at line 125. Claude ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Re: Plural forms in translations
Hi Claude, Claude Paroz wrote: > Hi all, > > I noticed today that several translations (especially Marathi, Bengali, > Hindi, Indonesian and others) have problems because of the plural form. > See e.g. http://l10n.gnome.org/languages/mr/gnome-2-22 > > Please, do not commit translations into GNOME SVN without checking first > that they pass 'msgfmt' check command: > > msgfmt -vvc -o /dev/null mr.po > > When there is a plural string, like this: > > msgid "There is a tab with errors" > msgid_plural "There are %d tabs with errors" > > You have to add the %d format string in your translation (if it is > present in the original string). At runtime, %d will be replaced by a > real number. > > Please, correct the files as soon as possible. > > > Thanks for bringing this up. I have been updating the bn_IN.po files the past week after passing it with msgfmt, but none of the files show an errors: [EMAIL PROTECTED] file-roller]$ msgfmt -cv -o /dev/null bn_IN.po 259 translated messages. However, could this error be due to conflict in the Translator Editor settings (being set to Non-requirement of the plural form) and the header section of these files still containing the plural form equation (from an earlier time when people where still learning about po-file headers)? Meanwhile, I am redoing the plural form messages. Won't make much difference though, but as long as it makes the red circles go away. Thanks regards Runa -- blog: http://runab.livejournal.com irc: mishti or runa_b on Freenode ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n
Plural forms in translations
Hi all, I noticed today that several translations (especially Marathi, Bengali, Hindi, Indonesian and others) have problems because of the plural form. See e.g. http://l10n.gnome.org/languages/mr/gnome-2-22 Please, do not commit translations into GNOME SVN without checking first that they pass 'msgfmt' check command: msgfmt -vvc -o /dev/null mr.po When there is a plural string, like this: msgid "There is a tab with errors" msgid_plural "There are %d tabs with errors" You have to add the %d format string in your translation (if it is present in the original string). At runtime, %d will be replaced by a real number. Please, correct the files as soon as possible. Claude ___ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n