[Openstack-i18n] Decreasing size of PO files

Andreas Jaeger aj at suse.com
Wed Apr 22 13:54:55 UTC 2015


Our PO files contain information about location (filename and line 
numbers) as well as untranslated strings. Dolph suggested to me recently 
to import into projects only the *translated* strings and I did some 
investigation and implementation.  I don't expect this to have any 
negative impact but wanted to inform you and ask for feedback.

We will continue to push the full location information to transifex and 
leave it in the POT files that are stored in each repository. Thus if 
you download a file from transifex, you have all location information.

During the import from transifex into the OpenStack git repositories, 
our scripts remove the location information as well as any untranslated 
strings thus reducing the files to import significantly. This also 
reduces the change of an import significantly since a line number change 
will not cause many location information to be updated.

The gettext tools we use can cope fine with this smaller PO file since 
it contains everything that is needed - just nothing more ;)

Also, it's easy to rebuild the full PO file from the date in the 
repository using the msgmerge command:

    msgmerge POT-FILE PO-FILE -o FULL-PO-FILE

As a first step, I have made this change for documentation projects like 
openstack-manuals only:

https://review.openstack.org/176313

If this works as expected, I plan to do it for other projects as well.

Please review and tell me if you have any further ideas or if I 
overlooked something,

Andreas
-- 
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
        Graham Norton, HRB 21284 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126




More information about the Openstack-i18n mailing list