From 74594e516d699a3a95a4e8112c914b9225853de7 Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 18 Jun 2004 22:42:07 +0000 Subject: renamed _() function to __() to avoid gettext conflict --- web/lib/aur.inc | 62 +++++++++++++++++++++++++++++++++++++++++++++++--- web/lib/translator.inc | 9 ++++---- 2 files changed, 64 insertions(+), 7 deletions(-) (limited to 'web/lib') diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 7b7602e..8a4756e 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -1,4 +1,32 @@ \n"; print " \n"; - print " AUR: An "; - print "ArchLinux project\n"; + print " "; + print __("%s: An ArchLinux project", array("AUR")); + print "\n"; print " \n"; print " \n"; print " \n"; @@ -28,16 +57,43 @@ function html_header() { print " \n"; print " \n"; print " \n"; - print "\n"; + + # Menu items + # + print " \n"; + print " "; + print " .:"; + print " ".__("Home")." "; + print " - "; + print " ".__("Accounts")." "; + print " - "; + print " ".__("Packages")." "; + print " - "; + print " ".__("Vote")." "; + print " - "; + print " ".__("Manage")." "; + print " - "; + print " ".__("Submit")." "; + print " - "; + print " ".__("Logout")." "; + print " :."; + print " "; + print " "; + print " \n"; + print " \n"; print "\n\n"; return; } + # common footer # function html_footer($ver="") { print "\n\n"; + print " \n"; + print " \n"; + print "\n"; print "

\n"; if ($ver) { print "\n"; diff --git a/web/lib/translator.inc b/web/lib/translator.inc index 79eb39c..87fe781 100644 --- a/web/lib/translator.inc +++ b/web/lib/translator.inc @@ -3,7 +3,7 @@ # # usage: -# use the _() function for returning translated strings of +# use the __() function for returning translated strings of # text. The string can contain escape codes %h for HTML # and %s for regular text. # @@ -17,12 +17,13 @@ # $_t["es"]["My cat is large."] = "Mi gato esta grande."; # # examples: -# print _("%s has %s apples.", array("Bill", "5")); -# print _("This is a %h%s%h problem!", array("","major","")); +# print __("%s has %s apples.", array("Bill", "5")); +# print __("This is a %h%s%h problem!", array("","major","")); include_once("common_po.inc"); -function _($tag, $args=array()) { + +function __($tag, $args=array()) { global $_t; global $_REQUEST; global $LANG; -- cgit v1.2.3-70-g09d2