[OpenStack-I18n] Translation script challenges
Akihiro Motoki
amotoki at gmail.com
Sun Apr 10 16:46:12 UTC 2016
Thanks for raising this.
Although I don't have enough time to dig into problems as I said
before in the list,
I would like to comment some.
For zanata.xml srcdir, I believe it was a mistake to use <modulename>/locale
instead of a top directory of each repository.
My vote is to change "srcdir" to ".". It allows us to handle POT file
in any place.
Hopefully Zanata allows us to rename the path of resources
so that we don't lose our history when renaming resources.
Akihiro
2016-04-10 3:38 GMT+09:00 Andreas Jaeger <aj at suse.com>:
> I think this is mainly of interest to KATO-san, Akihiro-san, Alex, and
> infra folks but wanted to send it here to have it recorded. This is
> about the scripting we use in project-config to push content to zanata.
>
> I just did two changes to fix problems I noticed with release notes
> translation and with python projects that use more than one module
> (keystone):
>
> https://review.openstack.org/303727
> https://review.openstack.org/303722
>
>
> But now I see have another problem:
>
> Since keystone went from one to two modules, the srcdir setting changed
> and thus it's not anymore keystone but keystone/locale/keystone as
> resource name.
>
> Compare:
> https://translate.openstack.org/iteration/view/keystone/master/documents
> https://translate.openstack.org/iteration/view/keystone/stable-mitaka/documents
>
> The rename deleted the old content and created new files ;(
> We can fix this with downloading the translation of mitaka files and
> pushing them to master. But this will hit us every time a project moves
> from one to multiple modules.
>
> Now, checking releasenotes push for python projects: It still does not
> work due to the ../.. zanata-cli does not see files outside of the srcdir.
>
> For reference: We need to push
> nova/locale/nova.pot and releasenotes/locale/releasenotes.pot
>
> zanata.xml contains:
> <rules>
> <rule
> pattern="**/*.pot">{locale_with_underscore}/LC_MESSAGES/{filename}.po</rule>
> <rule
> pattern="../../releasenotes/source/locale/releasenotes.pot">../../releasenotes/source/locale/{locale_with_underscore}/LC_MESSAGES/releasenotes.po</rule>
> </rules>
>
> So, I'm proposing to set sourcedir and transdir *everywhere* to "."
> instead of "$module/locale" - like done for multiple modules:
>
> <rules>
> <rule
> pattern="**/*.pot">{path}/{locale_with_underscore}/LC_MESSAGES/{filename}.po</rule>
> <rule
> pattern="releasenotes/source/locale/releasenotes.pot">releasenotes/source/locale/{locale_with_underscore}/LC_MESSAGES/releasenotes.po</rule>
> </rules>
>
> Does anybody have a better idea on how to fix these two problems? Or a
> better way to write the rules above for this?
>
> Alex, is there a way to not lose the content when this change is done
> since it will rename the translation files?
>
> 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, 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
More information about the OpenStack-I18n
mailing list