[Openstack-i18n] Horizon translations - and update of strings

Andreas Jaeger aj at suse.com
Mon Mar 24 07:00:18 UTC 2014

On 03/24/2014 12:53 AM, Akihiro Motoki wrote:
> On Mon, Mar 24, 2014 at 5:46 AM, Łukasz Jernaś <deejay1 at srem.org> wrote:
>> 23 mar 2014 21:25 "Andreas Jaeger" <aj at suse.com> napisał(a):
>>> On 03/23/2014 09:20 PM, Andreas Jaeger wrote:
>>>> Looking at my patch to import back the Horizon translations
>>>> (https://review.openstack.org/#/c/82176) and the comments by Akihiro
>>>> Motoki, I notice that horizon has no command to update the message
>>>> catalogs.
>>>> For all other projects, we basically do the following as part of the
>>>> propose job:
>>>> * Download all translation PO files from transifex
>>>> * Update POT file
>>>> * Update PO files based on pot file ("python setup.py update_catalogs")
>>>> * Upload POT and PO files to transifex
>>>> Horizon does not implement update_catalogs at all. Is this step really
>>>> needed or is something that transifex does for us and thus we could
>>>> remove the step?
> Yes.
> As long as there is no update in POT file, there is no need to update PO files
> based on PO file. When PO file is uploaded to Transifex, Transifex merges
> translation data with upload PO file.
> In my understanding, new POT files are uploaded by upstream_translation post job
> and they are kept up-to-date, so there is no need to update PO files in
> propose_translation job.
> Precisely speaking, ./run_tests.sh --makemessages for specific language
> does the same job for update_catalogs for other projects.
> Horizon uses Django framework and does not use babel to manage PO/POT files.
> This is the reason Horizon's POT files don't have .pot suffix.
> I think update_catalogs in other projects propose_translation job tries to
> keep POT and PO consistent, but it brings no additional values because
> if there is new strings in POT there is no translation for new strings even if
> update_catalog is done and gettext mechanism works well even if there
> is a inconsistent points between PO and POT.

I have one use case here: Some translators - like you and Sascha - do
the translations without using the transifex web client locally.

Now, you cannot use the local Japanese or German file since it contains
outdated strings, you need to run msgmerge locally to update the file.
Once the translator updates the file, msgmerge is called on the server
and the next download will get a new version with the updated strings.

Right now a "tx pull -a" will not download merged language pot files -
see for example https://review.openstack.org/#/c/82434/ where
doc/install-guide/locale/install-guide.pot is updated but not any of the
po files.

1) Is the above correct?
2) Is that a use case we care about? Akihiro, Sascha, how is your
workflow? Could you document it in the wiki, I don't see that covered...

>>> Also, do we really need to push the POT file to transifex? It should be
>>> done as part of the uptream_translation post job, isn't it?
>> Yes, the POT file should only be updated/uploaded in the post gate if it
>> changes.
> Yes, as Lukasz commented.

I don't know why Clark did the upload when writing the initial script.
Clark, do you remember?

But we need to *update* it locally so that it can get committed to git
(the update script does not handle updating of git) - just the upload
looks unnecessary.

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

More information about the Openstack-i18n mailing list