summaryrefslogtreecommitdiffhomepage
path: root/gui/scripts
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2019-03-18 14:06:33 +0100
committerAndrej Mihajlov <and@mullvad.net>2019-03-18 15:32:46 +0100
commitd754367f2e46dd808bf16db0067955a4330a9d21 (patch)
tree2d4cbc402cbf6d316896d301033f91306c07179d /gui/scripts
parente0cfd8e74ad9b5f54dcc389ae9d9e3d21f529f27 (diff)
downloadmullvadvpn-d754367f2e46dd808bf16db0067955a4330a9d21.tar.xz
mullvadvpn-d754367f2e46dd808bf16db0067955a4330a9d21.zip
Manually map es-ES -> es and sv-SE -> sv to match with the locale returned by Electron
Diffstat (limited to 'gui/scripts')
-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
}