From 10bccf7d57ddd885507b1a8d4ee29b0076c14724 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 20 Feb 2009 12:57:02 +0300 Subject: automatically extract i18n data from .js files --- utils/update-js-translations.sh | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 utils/update-js-translations.sh (limited to 'utils/update-js-translations.sh') diff --git a/utils/update-js-translations.sh b/utils/update-js-translations.sh new file mode 100755 index 000000000..432cf7ece --- /dev/null +++ b/utils/update-js-translations.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +if [ ! -f localized_js.php ]; then + echo "please run this script from tt-rss directory" + exit 1 +fi + +cat >localized_js.php <
+ +var T_messages = new Object(); + +function __(msg) { + if (T_messages[msg]) { + return T_messages[msg]; + } else { + debug('[gettext] not found: ' + msg); + return msg; + } +} + +> localized_js.php + +cat >>localized_js.php <