]>
git.wh0rd.org - tt-rss.git/blob - localized_js.php
2 set_include_path(get_include_path() . PATH_SEPARATOR
.
3 dirname(__FILE__
) . "/include");
5 define('DISABLE_SESSIONS', true);
7 require "functions.php";
8 header("Content-Type: text/plain; charset=UTF-8");
10 function T_js_decl($s1, $s2) {
12 $s1 = preg_replace("/\n/", "", $s1);
13 $s2 = preg_replace("/\n/", "", $s2);
15 $s1 = preg_replace("/\"/", "\\\"", $s1);
16 $s2 = preg_replace("/\"/", "\\\"", $s2);
18 return "T_messages[\"$s1\"] = \"$s2\";\n";
23 var T_messages
= new Object();
26 if (T_messages
[msg
]) {
27 return T_messages
[msg
];
34 $l10n = _get_reader();
36 for ($i = 0; $i < $l10n->total
; $i++
) {
37 $orig = $l10n->get_original_string($i);
38 $translation = __($orig);
40 print T_js_decl($orig, $translation);