Introduce function include_lang for translations.

This includes only the requested language for each page and
makes top level language include files obsolete.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
Loui Chang 2008-12-21 02:23:43 -05:00 committed by Callan Barrett
parent cfeb080dcd
commit 78c2b5c67f
24 changed files with 51 additions and 363 deletions

View file

@ -1,15 +1,16 @@
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("aur.inc"); # access AUR common functions
include_once("acctfuncs.inc"); # access Account specific functions
include("pkgfuncs_po.inc"); # Add to handle the i18n of My Packages
include("account_po.inc"); # use some form of this for i18n support
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
html_header(__("Accounts")); # print out the HTML header
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
#

View file

@ -1,9 +1,9 @@
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("tu_po.inc");
include("aur.inc");
include_lang('tu_po.inc');
set_lang();
check_sid();
html_header();

View file

@ -1,15 +1,15 @@
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include('index_po.inc');
include("pkgfuncs_po.inc");
include("aur.inc");
include('stats.inc');
set_lang();
check_sid();
include('stats.inc');
include_lang('index_po.inc');
include_lang('pkgfuncs_po.inc');
html_header( __("Home") );
$dbh = db_connect();

View file

@ -1,11 +1,10 @@
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("aur.inc"); # access AUR common functions
include_once("acctfuncs.inc"); # access AUR common functions
include("logout_po.inc"); # use some form of this for i18n support
set_lang(); # this sets up the visitor's language
# if they've got a cookie, log them out - need to do this before
# sending any HTML output.

View file

@ -1,11 +1,11 @@
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("aur.inc"); # access AUR common functions
include("pkgfuncs.inc"); # package specific functions
include("search_po.inc"); # use some form of this for i18n support
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

View file

@ -1,10 +1,10 @@
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
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("pkgedit_po.inc"); # i18n translations for this script
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

View file

@ -1,15 +1,15 @@
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("config.inc");
require('Archive/Tar.php');
require('Find.php');
include("aur.inc"); # access AUR common functions
include("submit_po.inc"); # use some form of this for i18n support
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

View file

@ -1,9 +1,9 @@
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include("tu_po.inc");
include("aur.inc");
include_lang('tu_po.inc');
set_lang();
check_sid();
html_header();