diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-11-14 04:21:27 +0400 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-11-14 04:22:04 +0400 |
commit | c2dbf80d0fe0e83b303ee3bbdd93b7b324281d7d (patch) | |
tree | 2b950a9e0997d972d8d20df50d4dc52e31fb0d86 /src | |
parent | 365b0e6357ece101b5e46d8a3bc9366d855205e2 (diff) |
Adding simple locale parser and parsing result. Ref #14
Diffstat (limited to 'src')
-rwxr-xr-x | src/locale.sh | 9 |
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 + |