summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2009-01-19 16:29:45 -0500
committerLoui Chang <louipc.ist@gmail.com>2009-01-19 16:29:45 -0500
commit2ee327634831ec36df5fd74ccc35dfcedfdbe07b (patch)
treef6783fb393a8becdbbc04f380863269097ebe4d3 /web
parent2194da8c9db7d2424b8992eedc6c98657a705e0f (diff)
downloadaurweb-2ee327634831ec36df5fd74ccc35dfcedfdbe07b.tar.xz
Use new conglomerated translation files.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web')
-rw-r--r--web/html/account.php4
-rw-r--r--web/html/addvote.php1
-rw-r--r--web/html/index.php2
-rw-r--r--web/html/packages.php1
-rw-r--r--web/html/pkgedit.php1
-rw-r--r--web/html/pkgsubmit.php1
-rw-r--r--web/html/tu.php1
-rw-r--r--web/lib/acctfuncs.inc1
-rw-r--r--web/lib/aur.inc10
-rw-r--r--web/lib/pkgfuncs.inc1
-rw-r--r--web/lib/translator.inc4
-rw-r--r--web/template/template.phps1
12 files changed, 10 insertions, 18 deletions
diff --git a/web/html/account.php b/web/html/account.php
index d0273dd..c07d2f9 100644
--- a/web/html/account.php
+++ b/web/html/account.php
@@ -4,12 +4,10 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include('aur.inc'); # access AUR common functions
include_once('acctfuncs.inc'); # access Account specific functions
+
set_lang(); # this sets up the visitor's language
check_sid(); # see if they're still logged in
-include_lang('pkgfuncs_po.inc'); # Add to handle the i18n of My Packages
-include_lang('account_po.inc'); # use some form of this for i18n support
-
html_header(__('Accounts'));
# Main page processing here
diff --git a/web/html/addvote.php b/web/html/addvote.php
index 5c1ff33..1f41c92 100644
--- a/web/html/addvote.php
+++ b/web/html/addvote.php
@@ -3,7 +3,6 @@
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("aur.inc");
-include_lang('tu_po.inc');
set_lang();
check_sid();
html_header();
diff --git a/web/html/index.php b/web/html/index.php
index 5511d7e..87158b9 100644
--- a/web/html/index.php
+++ b/web/html/index.php
@@ -7,8 +7,6 @@ set_lang();
check_sid();
include('stats.inc');
-include_lang('index_po.inc');
-include_lang('pkgfuncs_po.inc');
html_header( __("Home") );
diff --git a/web/html/packages.php b/web/html/packages.php
index 9805ee2..4e52fa0 100644
--- a/web/html/packages.php
+++ b/web/html/packages.php
@@ -5,7 +5,6 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("aur.inc"); # access AUR common functions
set_lang(); # this sets up the visitor's language
include('pkgfuncs.inc'); # package specific functions
-include_lang('search_po.inc'); # use some form of this for i18n support
check_sid(); # see if they're still logged in
# Set the title to the current query if required
diff --git a/web/html/pkgedit.php b/web/html/pkgedit.php
index 1b490c5..e73899a 100644
--- a/web/html/pkgedit.php
+++ b/web/html/pkgedit.php
@@ -4,7 +4,6 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("aur.inc"); # access AUR common functions
include("pkgfuncs.inc"); # use some form of this for i18n support
-include_lang("pkgedit_po.inc"); # i18n translations for this script
set_lang(); # this sets up the visitor's language
check_sid(); # see if they're still logged in
html_header(); # print out the HTML header
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 9151253..9e74f5f 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -9,7 +9,6 @@ require('Find.php');
include("aur.inc"); # access AUR common functions
include("pkgfuncs.inc"); # package functions
-include_lang('submit_po.inc'); # use some form of this for i18n support
set_lang(); # this sets up the visitor's language
check_sid(); # see if they're still logged in
diff --git a/web/html/tu.php b/web/html/tu.php
index 2d1eaf3..67addfb 100644
--- a/web/html/tu.php
+++ b/web/html/tu.php
@@ -3,7 +3,6 @@
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("aur.inc");
-include_lang('tu_po.inc');
set_lang();
check_sid();
html_header();
diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc
index e8e03cd..1c15af0 100644
--- a/web/lib/acctfuncs.inc
+++ b/web/lib/acctfuncs.inc
@@ -1,5 +1,4 @@
<?php
-include_lang('acctfuncs_po.inc');
# Display the standard Account form, pass in default values if any
#
diff --git a/web/lib/aur.inc b/web/lib/aur.inc
index ab52636..d8402fd 100644
--- a/web/lib/aur.inc
+++ b/web/lib/aur.inc
@@ -7,8 +7,6 @@ header('Pragma: no-cache');
include_once('translator.inc');
set_lang();
-include_lang('aur_po.inc');
-include_lang('common_po.inc');
include_once("config.inc");
include_once("version.inc");
@@ -254,8 +252,7 @@ function db_query($query="", $db_handle="") {
# set up the visitor's language
#
function set_lang() {
- global $_REQUEST;
- global $_COOKIE;
+ global $_t;
global $LANG;
global $SUPPORTED_LANGS;
@@ -295,6 +292,11 @@ function set_lang() {
if ($update_cookie) {
setcookie("AURLANG", $LANG, 0, "/");
}
+
+ if ($LANG != DEFAULT_LANG ) {
+ include_once("$LANG.po");
+ }
+
return;
}
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index b6e93c5..3257c77 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -1,5 +1,4 @@
<?php
-include_lang('pkgfuncs_po.inc');
include_once("config.inc");
# define variables used during pkgsearch
diff --git a/web/lib/translator.inc b/web/lib/translator.inc
index 25f2524..24ede1a 100644
--- a/web/lib/translator.inc
+++ b/web/lib/translator.inc
@@ -27,6 +27,8 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR
include_once('config.inc');
+global $_t;
+
function include_lang($trans) {
global $LANG;
@@ -51,7 +53,7 @@ function __() {
if (empty($LANG) || $LANG == DEFAULT_LANG)
$translated = $tag;
else
- $translated = $_t[$LANG][$tag];
+ $translated = $_t[$tag];
# If there is no translation, just print the given string.
if (empty($translated)) {
diff --git a/web/template/template.phps b/web/template/template.phps
index 358bf52..591a03c 100644
--- a/web/template/template.phps
+++ b/web/template/template.phps
@@ -5,7 +5,6 @@
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("aur.inc"); # access AUR common functions
-include_lang('template_po.inc'); # use some form of this for i18n support
set_lang(); # this sets up the visitor's language
check_sid(); # see if they're still logged in
html_header(); # print out the HTML header