Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-11-14 04:21:27 +0400
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-11-14 04:22:04 +0400
commitc2dbf80d0fe0e83b303ee3bbdd93b7b324281d7d (patch)
tree2b950a9e0997d972d8d20df50d4dc52e31fb0d86 /src
parent365b0e6357ece101b5e46d8a3bc9366d855205e2 (diff)
Adding simple locale parser and parsing result. Ref #14
Diffstat (limited to 'src')
-rwxr-xr-xsrc/locale.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/locale.sh b/src/locale.sh
new file mode 100755
index 00000000..3e984017
--- /dev/null
+++ b/src/locale.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+#extracts strings for translation
+JS_PATH=../js/
+WEBODF_PATH=../js/3rdparty/webodf/
+
+grep -ohEr "tr\([\"|'][^\"|']*[\"|']\)" ${WEBODF_PATH} | sed -e "s/^tr(/t('documents',\ /" -e "s/\$/;/" > ${JS_PATH}locale.js
+
+grep -ohEr "text-i18n=[\"|'][^\"|']*[\"|']" ${WEBODF_PATH} | sed -e "s/^text-i18n=/t('documents',\ /" -e "s/\$/);/" >> ${JS_PATH}locale.js
+