From 888db089c515270fd5cd9a9bedd217110f43bc4c Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 29 May 2011 14:33:37 -0700 Subject: rename *.inc files to *.inc.php and adjust imports and references Lukas: Add note to "UPGRADING". Signed-off-by: Lukas Fleischer --- web/lib/translator.inc | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 web/lib/translator.inc (limited to 'web/lib/translator.inc') diff --git a/web/lib/translator.inc b/web/lib/translator.inc deleted file mode 100644 index 903b061e..00000000 --- a/web/lib/translator.inc +++ /dev/null @@ -1,50 +0,0 @@ -", ""); - -include_once('config.inc'); -include_once('gettext.php'); -include_once('streams.php'); - -global $streamer, $l10n; - -function __() { - global $LANG; - global $l10n; - - # Create the translation. - $args = func_get_args(); - - # First argument is always string to be translated - $tag = $args[0]; - - # Translate using gettext_reader initialized before. - $translated = $l10n->translate($tag); - $translated = htmlspecialchars($translated, ENT_QUOTES); - - $num_args = sizeof($args); - - # Subsequent arguments are strings to be formatted - # - # TODO: make this more robust. - # '%%' should translate to a literal '%' - - if ( $num_args > 1 ) { - for ($i = 1; $i < $num_args; $i++) { - $translated = preg_replace("/\%[sh]/", $args[$i], $translated, 1); - } - } - - return $translated; -} - -- cgit v1.2.3-24-g4f1b