summaryrefslogtreecommitdiffhomepage
path: root/gui/scripts/crowdin.sh
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2019-03-18 15:33:05 +0100
committerAndrej Mihajlov <and@mullvad.net>2019-03-18 15:33:05 +0100
commite2e46db34d2bd5262e30baadec3f984dfc2183ec (patch)
tree2d4cbc402cbf6d316896d301033f91306c07179d /gui/scripts/crowdin.sh
parentbc929c4d078526f0782f2fdf3b653afae0d56f45 (diff)
parentd754367f2e46dd808bf16db0067955a4330a9d21 (diff)
downloadmullvadvpn-e2e46db34d2bd5262e30baadec3f984dfc2183ec.tar.xz
mullvadvpn-e2e46db34d2bd5262e30baadec3f984dfc2183ec.zip
Merge branch 'add-translations'
Diffstat (limited to 'gui/scripts/crowdin.sh')
-rwxr-xr-xgui/scripts/crowdin.sh12
1 files changed, 12 insertions, 0 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
}