mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Use new conglomerated translation files.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
2194da8c9d
commit
2ee3276348
12 changed files with 10 additions and 18 deletions
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
include_lang('acctfuncs_po.inc');
|
||||
|
||||
# Display the standard Account form, pass in default values if any
|
||||
#
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
include_lang('pkgfuncs_po.inc');
|
||||
include_once("config.inc");
|
||||
|
||||
# define variables used during pkgsearch
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue