]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1709932: recognize more strings from oils_i18n_gettext() user/gmcharlt/lp1709932_improve_db_seed_i18n
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 10 Aug 2017 16:45:58 +0000 (12:45 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 10 Aug 2017 16:49:45 +0000 (12:49 -0400)
commit164fef76cf763420b3f998bf4c485df13be0bd05
tree779a8c0ef173ad340d9b8965579b1eff33aa24d5
parentb051ae99087ebcc4adac220c91f7981c5e1280ae
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>
build/i18n/scripts/db-seed-i18n.py