Skip to content

Instantly share code, notes, and snippets.

@hakanai
Created July 14, 2010 23:05
Show Gist options
  • Select an option

  • Save hakanai/476228 to your computer and use it in GitHub Desktop.

Select an option

Save hakanai/476228 to your computer and use it in GitHub Desktop.
Original version
-----------------------------------------------------------------------------------
$ echo "test.text=Test" > Bundle.properties
Sending out for translation
-----------------------------------------------------------------------------------
$ prop2po Bundle.properties Bundle.po
$ cat Bundle.po
#. extracted from Bundle.properties
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-15 09:02+1100\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"
"X-Generator: Translate Toolkit 1.7.0\n"
#: test.text
msgid "Test"
msgstr ""
Translation comes back
-----------------------------------------------------------------------------------
$ cat Bundle.po
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-15 09:02+1100\n"
"PO-Revision-Date: 2010-07-15 09:05+1000\n"
"Last-Translator: Daniel Noll <daniel@nuix.com>\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"
"X-Generator: Translate Toolkit 1.7.0\n"
#: test.text
msgid "Test"
msgstr "テスト"
Generating the translated properties
-----------------------------------------------------------------------------------
$ po2prop -t Bundle.properties Bundle.po Bundle_ja.properties
$ cat Bundle_ja.properties
test.text=\u30C6\u30B9\u30C8
Someone updates the original
-----------------------------------------------------------------------------------
$ echo "test.text=Testing" > Bundle.properties
Sending the updated version out for translation
-----------------------------------------------------------------------------------
$ prop2po --duplicates=msgctxt -t Bundle.properties Bundle_ja.properties Bundle2.po
$ cat Bundle2.po
#. extracted from Bundle.properties, Bundle_ja.properties
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-15 09:11+1100\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"
"X-Generator: Translate Toolkit 1.7.0\n"
#: test.text
msgid "Testing"
msgstr "テスト"
==========================================================================
The problem - the English string here updated but there is *no indication*
that this occurred for the translator.
By the way, if I do this:
$ pomerge -t Bundle2.po Bundle.po Bundle3.po
*Now* Bundle3.po contains what I expected Bundle2.po to contain the first time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment