mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 22:45:57 +00:00
add gettext to js, bump translations
This commit is contained in:
26
localized_js.php
Normal file
26
localized_js.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
require "functions.php";
|
||||
header("Content-Type: text/plain; charset=UTF-8");
|
||||
|
||||
function js_decl($s1, $s2) {
|
||||
return "T_messages[\"$s1\"] = \"$s2\";\n";
|
||||
}
|
||||
?>
|
||||
|
||||
var T_messages = new Object();
|
||||
|
||||
function __(msg) {
|
||||
if (T_messages[msg]) {
|
||||
return T_messages[msg];
|
||||
} else {
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
print js_decl("display feeds", __("display feeds"));
|
||||
print js_decl("display tags", __("display tags"));
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user