3 # Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
5 # This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
7 # Privacy Browser PC is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # Privacy Browser PC is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>.
21 # Extract the strings from the UI and RC files and add them to a temporary .app file.
22 extractrc `find -name \*.ui -o -name \*.rc -o -name \*.kcfg` >> rc.cpp
24 # Add the names of the translators.
25 echo 'i18nc("NAME OF TRANSLATORS", "Your names");' >> rc.cpp
26 echo 'i18nc("EMAIL OF TRANSLATORS", "Your emails");' >> rc.cpp
28 # Extract all the string to a PO template file.
29 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
31 # Remove the temporary .app file.