From c6346bef5fe29c88223b32a0bd4e576712a9f53a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 15 Oct 2013 11:19:59 -0700 Subject: [PATCH] Translation system: fixes and updates Add script (compare_pot) for comparing templates module comments, and sending reminder emails if they differ. Add script (buid_pos) for generating all templates and comparing them with current versions. --- build_pos | 30 ++++++++++++++++++++++++++++++ clientgui/build_po | 5 +++-- html/ops/build_po_boinc.php | 4 +--- tools/compare_pot | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 5 deletions(-) create mode 100755 build_pos create mode 100755 tools/compare_pot diff --git a/build_pos b/build_pos new file mode 100755 index 0000000000..c54221f23e --- /dev/null +++ b/build_pos @@ -0,0 +1,30 @@ +#! /usr/bin/env php + diff --git a/clientgui/build_po b/clientgui/build_po index a7d213b79c..47362864aa 100755 --- a/clientgui/build_po +++ b/clientgui/build_po @@ -1,4 +1,5 @@ #! /bin/sh -xgettext --keyword=_ -C -o ../locale/templates/BOINC-Manager.pot *.cpp msw/*.cpp mac/*.cpp gtk/*.cpp - \ No newline at end of file +xgettext --from-code=UTF-8 --keyword=_ -C -o BOINC-Manager.pot *.cpp msw/*.cpp mac/*.cpp gtk/*.cpp + +../tools/compare_pot BOINC-Manager.pot ../locale/templates/BOINC-Manager.pot davea@ssl.berkeley.edu diff --git a/html/ops/build_po_boinc.php b/html/ops/build_po_boinc.php index e9ad2c870f..25da5b5604 100755 --- a/html/ops/build_po_boinc.php +++ b/html/ops/build_po_boinc.php @@ -38,7 +38,7 @@ msgstr "" HDR; -$out = fopen("en.po", "w"); +$out = fopen("BOINC-Project-Generic.pot", "w"); fwrite($out, $header); @@ -51,8 +51,6 @@ stream_copy_to_stream($pipe, $out); fclose($pipe); fclose($out); -system("mv en.po ../../locale/templates/BOINC-Project-Generic.pot\n"); - echo "Done\n"; ?> diff --git a/tools/compare_pot b/tools/compare_pot new file mode 100755 index 0000000000..2bd1c7006f --- /dev/null +++ b/tools/compare_pot @@ -0,0 +1,36 @@ +#! /usr/bin/env php +