X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=update_po_template;fp=update_po_template;h=38aa12c427b73a696a1b321b4765d7831d619f79;hp=0000000000000000000000000000000000000000;hb=ad39882c17bfd7d96cbcfd3873d4dd332722e84f;hpb=3ff4e08896c8cb0821d7bead07732e2064af844c diff --git a/update_po_template b/update_po_template new file mode 100755 index 0000000..38aa12c --- /dev/null +++ b/update_po_template @@ -0,0 +1,32 @@ +#! /usr/bin/env bash + +# Copyright © 2022 Soren Stoutner . +# +# This file is part of Privacy Browser PC . +# +# Privacy Browser PC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Privacy Browser PC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Privacy Browser PC. If not, see . + + +# Extract the strings from the UI and RC files and add them to a temporary .app file. +extractrc `find -name \*.ui -o -name \*.rc -o -name \*.kcfg` >> rc.cpp + +# Add the names of the translators. +echo 'i18nc("NAME OF TRANSLATORS", "Your names");' >> rc.cpp +echo 'i18nc("EMAIL OF TRANSLATORS", "Your emails");' >> rc.cpp + +# Extract all the string to a PO template file. +xgettext --c++ --kde --from-code=UTF-8 -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 -kkli18n:1 -kkli18nc:1c,2 -kkli18np:1,2 -kkli18ncp:1c,2,3 -kI18N_NOOP:1 -kI18NC_NOOP:1c,2 `find . -name \*.cpp` -o po/privacybrowser.pot + +# Remove the temporary .app file. +rm -f rc.cpp