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',
version: '2.0.2',
meson_version: '>= 0.62.0',
meson_version: '>= 0.64.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)

View File

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

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: io.github.flattool.heliguy.Warehouse\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -106,29 +106,29 @@ msgstr ""
msgid "Install Page in Narrow Window"
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
msgid "Could not add files"
msgstr ""
#: src/main.py:96
#: src/main.py:93
msgid "No files were found"
msgstr ""
#: src/main.py:104
#: src/main.py:101
msgid "Flatpaks & Remotes"
msgstr ""
#. 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"
msgstr ""
#: src/main.py:218
#: src/main.py:215
msgid "Donate"
msgstr ""
#: src/main.py:220
#: src/main.py:217
msgid "Contributors"
msgstr ""

View File

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