Skip to content

Commit 04737de

Browse files
Add update-translations script for sim
1 parent 2fee6c1 commit 04737de

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

simx/bin/update-translations.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Partial automation of updating sim and extension translations.
4+
#
5+
# Updates sim and extension translations.
6+
#
7+
# New languages require code change in below and in simx/src/messages/TranslationProvider.tsx.
8+
#
9+
10+
set -euxo pipefail
11+
12+
if [ $# -eq 0 ]; then
13+
echo Missing argument to extracted Crowdin ZIP >&1
14+
exit 1
15+
fi
16+
17+
languages="es-ES ja ko nl pl pt-BR zh-TW"
18+
19+
mkdir -p crowdin/translated
20+
for language in $languages; do
21+
lower="${language,,}"
22+
prefix="${1}/${language}"
23+
cp "${prefix}/ui.en.json" "lang/ui.${lower}.json"
24+
done
25+
26+
npm run i18n:compile

0 commit comments

Comments
 (0)