cleanup previous

master
Andrew Dolgov 4 years ago
parent 56b10fea18
commit 7815a881e8

@ -20,15 +20,11 @@ class RPC extends Handler_Protected {
if (isset($l10n->table_originals[$i * 2 + 2]) && $orig = $l10n->get_original_string($i)) { if (isset($l10n->table_originals[$i * 2 + 2]) && $orig = $l10n->get_original_string($i)) {
if(strpos($orig, "\000") !== false) { // Plural forms if(strpos($orig, "\000") !== false) { // Plural forms
$key = explode(chr(0), $orig); $key = explode(chr(0), $orig);
//print T_js_decl($key[0], _ngettext($key[0], $key[1], 1)); // Singular
//print T_js_decl($key[1], _ngettext($key[0], $key[1], 2)); // Plural
$rv[$key[0]] = _ngettext($key[0], $key[1], 1); // Singular $rv[$key[0]] = _ngettext($key[0], $key[1], 1); // Singular
$rv[$key[1]] = _ngettext($key[0], $key[1], 2); // Plural $rv[$key[1]] = _ngettext($key[0], $key[1], 2); // Plural
} else { } else {
$translation = _dgettext($domain,$orig); $translation = _dgettext($domain,$orig);
//print T_js_decl($orig, $translation);
$rv[$orig] = $translation; $rv[$orig] = $translation;
} }
} }

@ -443,18 +443,6 @@
return in_array($interface, class_implements($class)); return in_array($interface, class_implements($class));
} }
function T_js_decl($s1, $s2) {
if ($s1 && $s2) {
$s1 = preg_replace("/\n/", "", $s1);
$s2 = preg_replace("/\n/", "", $s2);
$s1 = preg_replace("/\"/", "\\\"", $s1);
$s2 = preg_replace("/\"/", "\\\"", $s2);
return "T_messages[\"$s1\"] = \"$s2\";\n";
}
}
function get_theme_path($theme) { function get_theme_path($theme) {
$check = "themes/$theme"; $check = "themes/$theme";
if (file_exists($check)) return $check; if (file_exists($check)) return $check;

Loading…
Cancel
Save