summaryrefslogtreecommitdiffhomepage
path: root/gui/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'gui/scripts')
-rwxr-xr-xgui/scripts/crowdin.sh12
-rwxr-xr-xgui/scripts/update-translations.sh20
2 files changed, 12 insertions, 20 deletions
diff --git a/gui/scripts/crowdin.sh b/gui/scripts/crowdin.sh
index 914007ac87..ce1bb75a42 100755
--- a/gui/scripts/crowdin.sh
+++ b/gui/scripts/crowdin.sh
@@ -34,6 +34,18 @@ function download_translations {
unzip -o all.zip -d $LOCALE_DIR
find $LOCALE_DIR -type d -exec chmod 755 {} \;
find $LOCALE_DIR -type f -exec chmod 644 {} \;
+
+ # Rename some of the locales to align with the locale codes expected by Electron
+ # [1] https://electronjs.org/docs/api/locales
+ # [2] https://support.crowdin.com/api/language-codes/
+ rm -rf "$LOCALE_DIR/es"
+ mv "$LOCALE_DIR/es-ES" "$LOCALE_DIR/es"
+ mv "$LOCALE_DIR/es/messages-es-ES.po" "$LOCALE_DIR/es/messages-es.po"
+
+ rm -rf "$LOCALE_DIR/sv"
+ mv "$LOCALE_DIR/sv-SE" "$LOCALE_DIR/sv"
+ mv "$LOCALE_DIR/sv/messages-sv-SE.po" "$LOCALE_DIR/sv/messages-sv.po"
+
rm all.zip
}
diff --git a/gui/scripts/update-translations.sh b/gui/scripts/update-translations.sh
deleted file mode 100755
index db9d5e7b74..0000000000
--- a/gui/scripts/update-translations.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-
-# This script creates or updates the existing gettext catalogues using the POT template located
-# under locales/messages.pot
-
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-ROOT_DIR=$( dirname $SCRIPT_DIR )
-POT_FILE="$ROOT_DIR/locales/messages.pot"
-
-for PO_FILE_DIR in $ROOT_DIR/locales/* ; do
- if [ -d $PO_FILE_DIR ] ; then
- LOCALE=$( basename $PO_FILE_DIR )
- PO_FILE="$PO_FILE_DIR/messages-$LOCALE.po"
-
- if [ -f $PO_FILE ] ; then
- echo "Update $PO_FILE"
- msgmerge --no-fuzzy-matching --update $PO_FILE $POT_FILE
- fi
- fi
-done