diff --git a/meson.build b/meson.build index 463941f..6f563b5 100644 --- a/meson.build +++ b/meson.build @@ -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', ], ) diff --git a/po/LINGUAS b/po/LINGUAS index 1e9efd2..4d8974a 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -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 diff --git a/po/warehouse.pot b/po/warehouse.pot index d3e2684..f032e30 100644 --- a/po/warehouse.pot +++ b/po/warehouse.pot @@ -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 \n" "Language-Team: LANGUAGE \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 , 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 "" diff --git a/src/main.py b/src/main.py index fbccdb9..506dd77 100644 --- a/src/main.py +++ b/src/main.py @@ -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): diff --git a/update_translation.sh b/update_translation.sh new file mode 100755 index 0000000..dd6d66a --- /dev/null +++ b/update_translation.sh @@ -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