mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-10 20:56:39 +00:00
Add script for updating language plugins from translators edition
This commit is contained in:
parent
6265be01cd
commit
7e1f5b8471
25
bin/update-translation-from-html-file.sh
Executable file
25
bin/update-translation-from-html-file.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Process translation updates made via the translators edition
|
||||
|
||||
# ./bin/update-translation-from-html-file.sh <language-code> <path-to-html-file>
|
||||
|
||||
# Assign and check parameters
|
||||
|
||||
LANGUAGE_CODE=$1
|
||||
HTML_FILE_PATH=$2
|
||||
|
||||
if [ -z "$LANGUAGE_CODE" ]; then
|
||||
echo "Missing parameter: language code"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$HTML_FILE_PATH" ]; then
|
||||
echo "Missing parameter: path to HTML file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./tiddlywiki.js editions/translators/ --verbose --unpackplugin $:/languages/$LANGUAGE_CODE --load $HTML_FILE_PATH --build output-files || exit 1
|
||||
|
||||
cp -R ./editions/translators/output/language/. ./languages/$LANGUAGE_CODE/ || exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user