Le mercredi 05 octobre 2011 à 03:00 -0400, Jasper St. Pierre a écrit : > On Wed, Oct 5, 2011 at 2:58 AM, Claude Paroz <cla...@2xlibre.net> wrote: > > Le mercredi 05 octobre 2011 à 02:52 -0400, Jasper St. Pierre a écrit : > >> > >> This is the commit that "added the string". It's been there before, I > >> just added the _(). From what I've been told, xgettext will extract > >> the string without it (which is why we use '' for untranslated > >> strings). I could be wrong, though. > >> > >> http://git.gnome.org/browse/gnome-shell/commit/?id=4e114107ed3ddf71c784cb63ca592ee88911d2a4 > >> > > > > Oh sorry, I misunderstood Piotr message. Of course, this is in the > > category "String previously not marked for translation", so it is valid. > > > > But I'm not sure I understand what you said: "xgettext will extract the > > string without it". That should be "xgettext will *not* extract the > > string without it", shouldn't it? > > > > Claude > > I have been told that a string like "FooBar" will be extracted, but a > string like 'FooBar' won't, due to how xgettext and JS work.
Without any gettext marker, be it "FooBar" or 'FooBar', no string will be extracted. Now about _("FooBar") vs _('FooBar'), this might depend on the xgettext extracting method. As there are unfortunately no JS-specific parser in gettext, generally the default C parser is used, meaning that _('FooBar') is not considered a real string, hence not extracted. Some people prefer using the Perl parser (xgettext -L Perl...) which would extract such a string. So I'd say that the fact _('FooBar') is not extracted in current GNOME js files is a bug, that might (hopefully) be fixed with a future gettext version. > From the > bug as well: > > "This doesn't add a string but mark an existing string as > translatable, this is not subject to string freeze." > > https://bugzilla.gnome.org/show_bug.cgi?id=660600 Yes, this is correct. Claude -- www.2xlibre.net _______________________________________________ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n