diff --git a/js/locale.js b/js/locale.js new file mode 100644 index 00000000..92b61170 --- /dev/null +++ b/js/locale.js @@ -0,0 +1,57 @@ +t('documents', "Loading"); +t('documents', "Unknown Author"); +t('documents', "Loading"); +t('documents', "Unknown Author"); +t('documents', "Members"); +t('documents', "Invite Members"); +t('documents', 'Open'); +t('documents', 'Save'); +t('documents', "Paragraph..."); +t('documents', 'Format'); +t('documents', 'Close'); +t('documents', "Insert Image"); +t('documents', "Default Style"); +t('documents', 'Undo'); +t('documents', 'Redo'); +t('documents', "Paragraph Styles"); +t('documents', "Clone this Style"); +t('documents', "New Name:"); +t('documents', "Create"); +t('documents', "Clone"); +t('documents', "Delete"); +t('documents', "OK"); +t('documents', "Cancel"); +t('documents', 'Annotate'); +t('documents', "Font Effects"); +t('documents', "Alignment"); +t('documents', 'Bold'); +t('documents', 'Italic'); +t('documents', 'Underline'); +t('documents', 'Strikethrough'); +t('documents', 'Size'); +t('documents', 'Align Left'); +t('documents', 'Center'); +t('documents', 'Align Right'); +t('documents', 'Justify'); +t('documents', 'Decrease Indent'); +t('documents', 'Increase Indent'); +t('documents', "Style"); +t('documents', "Bold"); +t('documents', "Italic"); +t('documents', "Underline"); +t('documents', "Font"); +t('documents', "Family"); +t('documents', "Size"); +t('documents', "Color"); +t('documents', "Text"); +t('documents', "Background"); +t('documents', "Options"); +t('documents', "Left"); +t('documents', "Center"); +t('documents', "Right"); +t('documents', "Justified"); +t('documents', "Spacing"); +t('documents', "Top"); +t('documents', "Left"); +t('documents', "Right"); +t('documents', "Bottom"); 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 +