ruby-gettext / gettext

Gettext gem is a pure Ruby Localization(L10n) library and tool which is modeled after the GNU gettext package.
https://ruby-gettext.github.io/
69 stars 28 forks source link

rxgettext - added --gnu-compatibility option #18

Closed lslezak closed 11 years ago

lslezak commented 11 years ago

to produce a GNU gettext compatible PO file (no double escaped new line charaters, removed Plural-Forms header tag)

Small implementation change: subclass RubyPOEntry from POEntry to reuse the format_message method and to avoid aliasing initialization method.

lslezak commented 11 years ago

BTW there is a small overlap with #16.

lslezak commented 11 years ago

The reason for this change is that our translators already use GNU tools and we need to produce backward compatible POT files after switching to Ruby. I added a new command line option so it does not break the current behavior for rxgettext and rmsgfmt tools.

375gnu commented 11 years ago

lslezak, is this a good idea to remove Plural-Forms? I think today 99% of po files are made using gnu gettext and they all have Plural-Forms.

lslezak commented 11 years ago

I have added it back, we merge POT files created by both rxgettext and GNU gettext and during merge msgcat complained about invalid nplurals value.

I have fixed our merging script and reverted the removal.

kou commented 11 years ago

Thanks! I've fixed it in master.

Sorry for my late fix...