LP#1922975: install python3 dependencies, rather than python2 Also specifies python3 in the shebang lines of python scripts, and improves the documentation for translators about installing these dependencies. Signed-off-by: Jane Sandberg <sandbergja@gmail.com> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP#1922975: update i18n scripts for Python 3 Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jane Sandberg <sandbergja@gmail.com> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP#1709932: recognize more strings from oils_i18n_gettext() This patch makes db-seed-i18n.py more flexible about where commas between strings in invocations of oils_i18n_gettext() can appear, reduces the chances that strings fail to be grabbed for translation. It also improves the error message shown when parsing errors occur. To test ------- [1] Apply patch and run cd build/i18n && make sql2pot [2] Verify that no error messages are produced during this step. [3] Inspect the changes to po/db.seed/db.seed.pot and verify that additional strings are added, including "Item Print Label Font Family". [4] (optional) Deliberately remove a comma from an oils_i18n_gettext invocation in 950.data.seed-values.sql and run make sql2pot again. The error message shoudl now include the failing chunk of text. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Improve the db-seed-i18n.py -script to actually grab all strings. Previously the script could only handle oils_i18n_gettext -markers if the marker and it's parameters were all on one line. Now it also correctly parses the postgres E'' escaped strings, and removes sql string concatenations. Also adds test cases. Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi> Signed-off-by: Dan Scott <dscott@laurentian.ca>
i18n: Robustify db-seed-i18n.py parsing Faced with the perplexing use of a space before a comma in oils_i18n_gettext() keys, db-seed-i18n.py's regex failed. The solution for a sloppy regex? More powerful regex! Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Once again into the breach git-svn-id: svn://svn.open-ils.org/ILS/trunk@15062 dcc99617-32d9-48b4-a31d-7c20da2025e4
Make i18n scripts stricter about UTF-8 input/output handling. Also, be strict about the JSON format of strings in Dojo resource bundles. git-svn-id: svn://svn.open-ils.org/ILS/trunk@13751 dcc99617-32d9-48b4-a31d-7c20da2025e4
More codecs conversion for i18n scripts git-svn-id: svn://svn.open-ils.org/ILS/trunk@13550 dcc99617-32d9-48b4-a31d-7c20da2025e4
Reproduced miker's problem building i18n on a clean Debian Lenny system. codecs, to the rescue! git-svn-id: svn://svn.open-ils.org/ILS/trunk@13541 dcc99617-32d9-48b4-a31d-7c20da2025e4
Unbelievably, not all systems have Python 2.6 yet! Use the exception handling method supported by previous Python versions git-svn-id: svn://svn.open-ils.org/ILS/trunk@13503 dcc99617-32d9-48b4-a31d-7c20da2025e4
Fix SQL translation script and associated unit tests It looks like polib became stricter about forcing the line number portion of filename:line occurrences in the PO to actually be an integer, with the result of simply concatenating the text "line numbers" that we had been using to store ID values to the table names. Now we're using specially formatted translator comments to hold the ID values, and using the filename:line occurence entries to actually hold the source filename and line number for occurrences. Fancy that! git-svn-id: svn://svn.open-ils.org/ILS/trunk@13500 dcc99617-32d9-48b4-a31d-7c20da2025e4
Hack to work around occurrence IDs containing colons (which confuse upstream polib) git-svn-id: svn://svn.open-ils.org/ILS/trunk@11404 dcc99617-32d9-48b4-a31d-7c20da2025e4
Fix a bug that enabled duplicate PO entries in database seed values git-svn-id: svn://svn.open-ils.org/ILS/trunk@11104 dcc99617-32d9-48b4-a31d-7c20da2025e4
Enable translated database strings the right way: * Use the primary key of the given table, in combination with class hint and property, to identify the translated string * Stuff the primary key into the PO comment field so we can round-trip it * Adjust the oils_i18n_gettext() function to accept the additional parameters, including both INT and TEXT primary keys * Adjust the database seed values to use explicit primary keys throughout, and adjust the use of oils_i18n_gettext() to pass the additiona parameters git-svn-id: svn://svn.open-ils.org/ILS/trunk@10385 dcc99617-32d9-48b4-a31d-7c20da2025e4
Update to correspond with polib 0.30.1: * occurences->occurrences * different handling of header newline characters Remove some inherited methods that add no new behaviour. git-svn-id: svn://svn.open-ils.org/ILS/trunk@8219 dcc99617-32d9-48b4-a31d-7c20da2025e4
Implement SQL localization tests. Refactor some test helper functions into a common module. Clean up db-seed-i18n.py SQL output. git-svn-id: svn://svn.open-ils.org/ILS/trunk@8194 dcc99617-32d9-48b4-a31d-7c20da2025e4
Split out localization base class into basel10n.py Add a class to support localization of fm_IDL.xml Generate a POT file for the fieldmapper IDL Clean up db-seed-i18n.py (thanks to pylint the pedantic) git-svn-id: svn://svn.open-ils.org/ILS/trunk@8168 dcc99617-32d9-48b4-a31d-7c20da2025e4
Prevent msgstr without msgid from being generated in POT. git-svn-id: svn://svn.open-ils.org/ILS/trunk@8137 dcc99617-32d9-48b4-a31d-7c20da2025e4
Avoid mouse-grabbing weirdness by calling script with python explicitly. Correct escaped quotes in POT msgids. git-svn-id: svn://svn.open-ils.org/ILS/trunk@8135 dcc99617-32d9-48b4-a31d-7c20da2025e4
Enable translation of seed values stored in database. Moves all DML from schema files into a single file. db-seed-i18n.py will generate POT files and SQL for new localizations. Commit a new POT file for the database seed values. git-svn-id: svn://svn.open-ils.org/ILS/trunk@8134 dcc99617-32d9-48b4-a31d-7c20da2025e4