[Openstack-i18n] Decreasing size of PO files

Ying Chun Guo guoyingc at cn.ibm.com
Thu Apr 23 08:16:43 UTC 2015


Thank you for the information, Andreas.
I'm glad to see that you keep the original pot files untouched.
The location information in the pot are quite useful for our translators.
The location information could be regarded as "context" while translators
translate.
Some language teams even allocate their tasks by files.
They will search in the whole translation resources by "file name".
Keeping location information in pot is quite necessary.

As to po files, I guess, the location information is helpful when
generating the translated documents.
Have you ever tested building translated documents without locations ?

I think, the goal of reducing the size of PO files is to decrease the size
of the whole manuals project, isn't it ?
Do you know how much percentage is the po files in the whole manuals
project now ? Is it a big number ?

Best regards
Ying Chun Guo (Daisy)


Andreas Jaeger <aj at suse.com> wrote on 2015/04/22 21:54:55:

> From: Andreas Jaeger <aj at suse.com>
> To: "openstack-i18n at lists.openstack.org" <openstack-
> i18n at lists.openstack.org>, dolph.mathews at gmail.com
> Date: 2015/04/22 21:55
> Subject: [Openstack-i18n] Decreasing size of PO files
>
> 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
>
>
> _______________________________________________
> Openstack-i18n mailing list
> Openstack-i18n at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-i18n/attachments/20150423/5bd91811/attachment-0001.html>


More information about the Openstack-i18n mailing list