common (RST) translation
Hi team, I'm translating User Guides (RST) recently. I found a below problem. Any thought? Problem: Each message catalog "pot" file contains all strings of the RST document, including "common" files (glossary and so on). In particular, "user-guide" and "user-guide-admin" resource at Transifex have same strings in "common" files respectively. This causes unintended inconsistency of translation. In fact, Japanese "user-guide" and "user-guide-admin" have different translated strings, which need to sync manually. Solution (just my idea): As is: 1. Sphinx(?) generates the "pot" file. 2. translate at Transifex. 3. Sphinx(?) merge the translated strings. To be: 1. Sphinx(?) generates the "pot" file. 2. A new script split message stringss for "common". (maybe, based on "msgcat") So, generate 2 resources (main document resource and "common" resource). 3. translate at Transifex. 4. merge the 2 resources for Sphinx(?). 5. Sphinx(?) merge the translated strings. Regards, KATO Tomoyuki
KATO Tomoyuki <tomo@dream.daynight.jp> wrote on 2015/06/04 19:41:53:
From: KATO Tomoyuki <tomo@dream.daynight.jp> To: openstack-i18n@lists.openstack.org Date: 2015/06/04 19:42 Subject: [Openstack-i18n] common (RST) translation
Hi team,
I'm translating User Guides (RST) recently. I found a below problem. Any thought?
Problem: Each message catalog "pot" file contains all strings of the RST document, including "common" files (glossary and so on). In particular, "user-guide" and "user-guide-admin" resource at Transifex have same strings in "common" files respectively. This causes unintended inconsistency of translation. In fact, Japanese "user-guide" and "user-guide-admin" have different translated strings, which need to sync manually.
I don't understand your problem clearly. Previously when using DocBook, there is a "common" containing the common part of documents. The old "user-guide" and "user-guide-admin" have dependencies to "common". Now it changed to RST format. The common contents are not in a separate "common" folder, but in the document folder itself. What's the problem do you meet with? I think "common" is going to be deprecated in the future. Am I right?
Solution (just my idea): As is: 1. Sphinx(?) generates the "pot" file. 2. translate at Transifex. 3. Sphinx(?) merge the translated strings.
To be: 1. Sphinx(?) generates the "pot" file. 2. A new script split message stringss for "common". (maybe, based on "msgcat") So, generate 2 resources (main document resource and "common" resource). 3. translate at Transifex. 4. merge the 2 resources for Sphinx(?). 5. Sphinx(?) merge the translated strings.
Regards, KATO Tomoyuki
_______________________________________________ Openstack-i18n mailing list Openstack-i18n@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
Hi team,
I'm translating User Guides (RST) recently. I found a below problem. Any thought?
Problem: Each message catalog "pot" file contains all strings of the RST document, including "common" files (glossary and so on). In particular, "user-guide" and "user-guide-admin" resource at Transifex have same strings in "common" files respectively. This causes unintended inconsistency of translation. In fact, Japanese "user-guide" and "user-guide-admin" have different translated strings, which need to sync manually.
I don't understand your problem clearly.
Previously when using DocBook, there is a "common" containing the common part of documents. The old "user-guide" and "user-guide-admin" have dependencies to "common". Now it changed to RST format. The common contents are not in a separate "common" folder, but in the document folder itself. What's the problem do you meet with?
I think "common" is going to be deprecated in the future. Am I right?
Hi Daisy, "common(DocBook)" itself is going to be deprecated. However, we have two types of common(RST) resources. The one is common-rst directory for common contents among user-guide and user-guide-admin. Another is glossary that is automatically generated from common/glossary(DocBook). These two types of common(RST) resources exist in each resouces in Transifex. Please look at Transifex resources. Below are common resources, filename-filtered. 1. https://www.transifex.com/projects/p/openstack-manuals-i18n/viewstrings/#zh_... 2. https://www.transifex.com/projects/p/openstack-manuals-i18n/viewstrings/#zh_... Thanks, KATO Tomoyuki
On 06/04/2015 01:41 PM, KATO Tomoyuki wrote:
Hi team,
I'm translating User Guides (RST) recently. I found a below problem. Any thought?
Problem: Each message catalog "pot" file contains all strings of the RST document, including "common" files (glossary and so on). In particular, "user-guide" and "user-guide-admin" resource at Transifex have same strings in "common" files respectively. This causes unintended inconsistency of translation. In fact, Japanese "user-guide" and "user-guide-admin" have different translated strings, which need to sync manually.
Indeed this is not optimal yet.
Solution (just my idea): As is: 1. Sphinx(?) generates the "pot" file. 2. translate at Transifex. 3. Sphinx(?) merge the translated strings.
To be: 1. Sphinx(?) generates the "pot" file. 2. A new script split message stringss for "common". (maybe, based on "msgcat") So, generate 2 resources (main document resource and "common" resource). 3. translate at Transifex. 4. merge the 2 resources for Sphinx(?). 5. Sphinx(?) merge the translated strings.
Yes, translating the "common-rst" separate from user-guide and user-guide-admin (and other future RST guides) would be the better way forward but needs some scripting. You need to enhance in openstack-doc-tools the file bin/doc-tools-check-languages and in openstack-manuals the file tools/generatepot-rst.sh. If you like to tackle this, it would be appreciated and I'll give any help - just don't have time right now to work on this myself, Feel free to ask any questions, 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, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
On 06/04/2015 01:41 PM, KATO Tomoyuki wrote:
Hi team,
I'm translating User Guides (RST) recently. I found a below problem. Any thought?
Problem: Each message catalog "pot" file contains all strings of the RST document, including "common" files (glossary and so on). In particular, "user-guide" and "user-guide-admin" resource at Transifex have same strings in "common" files respectively. This causes unintended inconsistency of translation. In fact, Japanese "user-guide" and "user-guide-admin" have different translated strings, which need to sync manually.
Indeed this is not optimal yet.
Solution (just my idea): As is: 1. Sphinx(?) generates the "pot" file. 2. translate at Transifex. 3. Sphinx(?) merge the translated strings.
To be: 1. Sphinx(?) generates the "pot" file. 2. A new script split message stringss for "common". (maybe, based on "msgcat") So, generate 2 resources (main document resource and "common" resource). 3. translate at Transifex. 4. merge the 2 resources for Sphinx(?). 5. Sphinx(?) merge the translated strings.
Yes, translating the "common-rst" separate from user-guide and user-guide-admin (and other future RST guides) would be the better way forward but needs some scripting.
You need to enhance in openstack-doc-tools the file bin/doc-tools-check-languages and in openstack-manuals the file tools/generatepot-rst.sh.
If you like to tackle this, it would be appreciated and I'll give any help - just don't have time right now to work on this myself,
Feel free to ask any questions,
Hi Andreas, Thanks for response, and sorry for nonparticipation of me in RST migration test of i18n tools. I will try this tool enhancement. I will send it when it is complete. Regards, KATO Tomoyuki
On 06/04/2015 01:41 PM, KATO Tomoyuki wrote:
Hi team,
I'm translating User Guides (RST) recently. I found a below problem. Any thought?
Problem: Each message catalog "pot" file contains all strings of the RST document, including "common" files (glossary and so on). In particular, "user-guide" and "user-guide-admin" resource at Transifex have same strings in "common" files respectively. This causes unintended inconsistency of translation. In fact, Japanese "user-guide" and "user-guide-admin" have different translated strings, which need to sync manually.
Indeed this is not optimal yet.
Solution (just my idea): As is: 1. Sphinx(?) generates the "pot" file. 2. translate at Transifex. 3. Sphinx(?) merge the translated strings.
To be: 1. Sphinx(?) generates the "pot" file. 2. A new script split message stringss for "common". (maybe, based on "msgcat") So, generate 2 resources (main document resource and "common" resource). 3. translate at Transifex. 4. merge the 2 resources for Sphinx(?). 5. Sphinx(?) merge the translated strings.
Yes, translating the "common-rst" separate from user-guide and user-guide-admin (and other future RST guides) would be the better way forward but needs some scripting.
You need to enhance in openstack-doc-tools the file bin/doc-tools-check-languages and in openstack-manuals the file tools/generatepot-rst.sh.
If you like to tackle this, it would be appreciated and I'll give any help - just don't have time right now to work on this myself,
Feel free to ask any questions,
Hi Andreas, team, Here is a mockup about my idea. Make sense? ==== tools/generatepot-rst.sh in openstack-manuals ==== 33,62d32 < # Build common < # Delete Project-Id-Version to simplify output < sed -i -E 's/^"Project-Id-Version: [a-zA-Z0-9\. ]+\\n"$/"Project-Id-Version: \\n"/' \ < doc/$DOCNAME/source/locale/common.pot < # Create the common pot file < msgcat --sort-output doc/common-rst/locale/common.pot \ < doc/$DOCNAME/source/locale/common.pot | \ < sed -E 's/^"Project-Id-Version: [a-zA-Z0-9\. ]+\\n"$/"Project-Id-Version: \\n"/' | \ < awk '$0 !~ /^\# [a-z0-9]+$/' | awk '$0 !~ /^\# \#-\#-\#-\#-\# /' > doc/$DOCNAME/source/common.pot < mv -f doc/$DOCNAME/source/common.pot doc/common-rst/locale/common.pot < # Simplify metadata < rm -f doc/common-rst/locale/dummy.po < cat << EOF > doc/common-rst/locale/dummy.po < msgid "" < msgstr "" < "Project-Id-Version: \n" < "Report-Msgid-Bugs-To: \n" < "POT-Creation-Date: 2015-01-01 01:01+0900\n" < "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" < "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" < "Language-Team: LANGUAGE <LL@li.org>\n" < "MIME-Version: 1.0\n" < "Content-Type: text/plain; charset=UTF-8\n" < "Content-Transfer-Encoding: 8bit\n" < EOF < msgmerge -N doc/common-rst/locale/dummy.po \ < doc/common-rst/locale/common.pot > doc/common-rst/locale/tmp.pot < mv -f doc/common-rst/locale/tmp.pot doc/common-rst/locale/common.pot < rm -f doc/common-rst/locale/dummy.po ==== bin/doc-tools-check-languages in openstack-doc-tools ==== 52,57d51 < # merge the common po file < msgcat -o ${DOC_DIR}${book}/source/locale/${language}/${book}.po \ < ${DOC_DIR}common-rst/locale/${language}/LC_MESSAGES/common.po \ < ${DOC_DIR}${book}/source/locale/${language}/LC_MESSAGES/${book}.po < mv -f ${DOC_DIR}${book}/source/locale/${language}/${book}.po \ < ${DOC_DIR}${book}/source/locale/${language}/LC_MESSAGES/${book}.po ==== (other things) ==== push to and pull from Transifex: common-rst/locale/common.pot and each language po files Thanks, KATO Tomoyuki
Thanks, quite a few great ideas to make this nice... Do you want to send a full patch or shall I integrate it (giving you credits for sure!), 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, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
On 06/17/2015 10:14 AM, Andreas Jaeger wrote:
Thanks, quite a few great ideas to make this nice...
Do you want to send a full patch or shall I integrate it (giving you credits for sure!),
I pushed now a first version for review, will use the same topic for all, see: https://review.openstack.org/#/q/status:open+branch:master+topic:common-rst-... thanks, 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, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
On 06/17/2015 10:14 AM, Andreas Jaeger wrote:
Thanks, quite a few great ideas to make this nice...
Do you want to send a full patch or shall I integrate it (giving you credits for sure!),
I pushed now a first version for review, will use the same topic for all, see:
https://review.openstack.org/#/q/status:open+branch:master+topic:common-rst-...
Hi Andreas, Thanks! Sorry for late response. I want to leave it up to you. Cloud you help me? KATO Tomoyuki
On 06/17/2015 04:44 PM, KATO Tomoyuki wrote:
On 06/17/2015 10:14 AM, Andreas Jaeger wrote:
Thanks, quite a few great ideas to make this nice...
Do you want to send a full patch or shall I integrate it (giving you credits for sure!),
I pushed now a first version for review, will use the same topic for all, see:
https://review.openstack.org/#/q/status:open+branch:master+topic:common-rst-...
Hi Andreas,
Thanks! Sorry for late response.
Sorry for me jumping the ship without waiting.
I want to leave it up to you.
But I'm glad about this since I started.
Cloud you help me?
Yes, see https://review.openstack.org/#/q/status:open+branch:master+topic:common-rst-... I had to make some minor changes but kept the general workflow. I also created the resource in transifex and copied translations from user-guide over, common-rst is 100 % translated for Japanese, 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, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
https://review.openstack.org/#/q/status:open+branch:master+topic:common-rst-...
Hi Andreas,
Thanks! Sorry for late response.
Sorry for me jumping the ship without waiting.
No problem! Keep going forward :) Thanks, KATO Tomoyuki
participants (3)
-
Andreas Jaeger
-
KATO Tomoyuki
-
Ying Chun Guo