Actually, finally, properly put new languages in the LINGUAS file

This commit is contained in:
heliguy
2025-02-26 02:12:16 -05:00
parent 522429d505
commit c6bb4a6125
5 changed files with 47 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
project('warehouse', project('warehouse',
version: '2.0.2', version: '2.0.2',
meson_version: '>= 0.62.0', meson_version: '>= 0.64.0',
default_options: [ 'warning_level=2', 'werror=false', ], default_options: [ 'warning_level=2', 'werror=false', ],
) )

View File

@@ -1,14 +1,21 @@
bg
cs cs
de de
el
es es
fi
fr fr
he
hi
hu hu
id
it it
nb_NO nb_NO
nl nl
oc oc
pl pl
pt_BR pt_BR
pt
ru ru
sk sk
sv sv

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: io.github.flattool.heliguy.Warehouse\n" "Project-Id-Version: io.github.flattool.heliguy.Warehouse\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-06 14:44-0500\n" "POT-Creation-Date: 2025-02-26 02:09-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -106,29 +106,29 @@ msgstr ""
msgid "Install Page in Narrow Window" msgid "Install Page in Narrow Window"
msgstr "" msgstr ""
#: src/main.py:96 src/main.py:102 src/install_page/select_page.py:66 #: src/main.py:93 src/main.py:99 src/install_page/select_page.py:66
#: src/install_page/select_page.py:73 #: src/install_page/select_page.py:73
msgid "Could not add files" msgid "Could not add files"
msgstr "" msgstr ""
#: src/main.py:96 #: src/main.py:93
msgid "No files were found" msgid "No files were found"
msgstr "" msgstr ""
#: src/main.py:104 #: src/main.py:101
msgid "Flatpaks & Remotes" msgid "Flatpaks & Remotes"
msgstr "" msgstr ""
#. Translators: do one of the following, one per line: Your Name, Your Name <email@email.org>, Your Name https://your.website #. Translators: do one of the following, one per line: Your Name, Your Name <email@email.org>, Your Name https://your.website
#: src/main.py:212 #: src/main.py:209
msgid "translator-credits" msgid "translator-credits"
msgstr "" msgstr ""
#: src/main.py:218 #: src/main.py:215
msgid "Donate" msgid "Donate"
msgstr "" msgstr ""
#: src/main.py:220 #: src/main.py:217
msgid "Contributors" msgid "Contributors"
msgstr "" msgstr ""

View File

@@ -35,9 +35,7 @@ _ = gettext.gettext
class WarehouseApplication(Adw.Application): class WarehouseApplication(Adw.Application):
"""The main application singleton class.""" """The main application singleton class."""
troubleshooting = ( troubleshooting = "OS: {os}\nWarehouse version: {wv}\nGTK: {gtk}\nlibadwaita: {adw}\nApp ID: {app_id}\nProfile: {profile}\nLanguage: {lang}"
"OS: {os}\nWarehouse version: {wv}\nGTK: {gtk}\nlibadwaita: {adw}\nApp ID: {app_id}\nProfile: {profile}\nLanguage: {lang}"
)
version = Config.VERSION version = Config.VERSION
def __init__(self): def __init__(self):

31
update_translation.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Credit: https://gitlab.gnome.org/World/Upscaler/-/blob/main/update_translation.sh?ref_type=heads
PROJECT_NAME="warehouse"
BUILD_DIR="translation-build/"
PO_DIR="po/"
LINGUAS_FILE="${PO_DIR}LINGUAS"
# Update the LINGUAS file
rm "${LINGUAS_FILE}"
for po_file in "${PO_DIR}"*.po; do
lang=$(basename "${po_file}" .po)
echo "${lang}" >> "${LINGUAS_FILE}"
echo "Wrote ${lang} to ${LINGUAS_FILE}"
done
echo -e "Updated ${LINGUAS_FILE}\n"
# Update the translation template
if [ -d "${BUILD_DIR}" ]; then
rm -r "${BUILD_DIR}"
fi
meson "${BUILD_DIR}"
meson compile -C "${BUILD_DIR}" "${PROJECT_NAME}-pot"
rm -r "${BUILD_DIR}"
unset PROJECT_NAME
unset BUILD_DIR
unset PO_DIR
unset LINGUAS_FILE