From ba68c71ebb923c07471ffccf408773f9636bdbe3 Mon Sep 17 00:00:00 2001 From: seek3r Date: Thu, 7 Sep 2000 20:49:55 +0000 Subject: [PATCH] moving to new translation system --- addressbook/add.php | 2 +- addressbook/delete.php | 6 +-- addressbook/edit.php | 6 +-- addressbook/index.php | 24 ++++----- admin/accesslog.php | 16 +++--- admin/accounts.php | 22 ++++---- admin/applications.php | 18 +++---- admin/currentusers.php | 14 ++--- admin/deleteaccount.php | 8 +-- admin/deleteapplication.php | 6 +-- admin/deletegroup.php | 12 ++--- admin/deleteheadline.php | 8 +-- admin/editaccount.php | 34 ++++++------- admin/editapplication.php | 12 ++--- admin/editgroup.php | 10 ++-- admin/editheadline.php | 14 ++--- admin/groups.php | 14 ++--- admin/headlines.php | 16 +++--- admin/index.php | 14 ++--- admin/killsession.php | 6 +-- admin/newaccount.php | 36 ++++++------- admin/newapplication.php | 12 ++--- admin/newgroup.php | 12 ++--- admin/newheadline.php | 28 +++++----- admin/nntp.php | 2 +- admin/viewaccount.php | 16 +++--- admin/viewheadline.php | 14 ++--- calendar/day.php | 2 +- calendar/edit_entry.php | 90 ++++++++++++++++----------------- calendar/edit_entry_handler.php | 4 +- calendar/inc/footer.inc.php | 18 +++---- calendar/inc/functions.inc.php | 84 +++++++++++++++--------------- calendar/inc/header.inc.php | 8 +-- calendar/index.php | 20 ++++---- calendar/search.php | 10 ++-- calendar/view.php | 52 +++++++++---------- calendar/week.php | 16 +++--- calendar/year.php | 4 +- doc/RELEASE-NOTES | 2 + doc/create_tables.mysql | 7 +++ doc/create_tables.pgsql | 8 +++ index.php | 10 ++-- login.php | 16 +++--- logout.php | 2 +- 44 files changed, 376 insertions(+), 359 deletions(-) diff --git a/addressbook/add.php b/addressbook/add.php index ab74d806c8..0f3a17d0ac 100755 --- a/addressbook/add.php +++ b/addressbook/add.php @@ -73,7 +73,7 @@ - " . lang_common("Cancel"); ?> + " . lang("Cancel"); ?> diff --git a/addressbook/delete.php b/addressbook/delete.php index b9089fbb10..a16511ea87 100755 --- a/addressbook/delete.php +++ b/addressbook/delete.php @@ -32,12 +32,12 @@ ?> -
+

">         + ?>">         ">
+ ?>">
- "> + "> - " . lang_common("Cancel"); ?> + " . lang("Cancel"); ?> - " . lang_common("Delete"); ?> + " . lang("Delete"); ?> diff --git a/addressbook/index.php b/addressbook/index.php index c61e4b43ff..14477ed371 100755 --- a/addressbook/index.php +++ b/addressbook/index.php @@ -16,7 +16,7 @@ include("../header.inc.php"); - echo "
" . lang_addressbook("Address book"); + echo "
" . lang("Address book"); if (! $start) $start = 0; @@ -53,9 +53,9 @@ $phpgw->db->next_record(); if ($phpgw->db->f(0) == 1) - echo "
" . lang_common("your search returned 1 match"); + echo "
" . lang("your search returned 1 match"); else - echo "
" . lang_common("your search returned x matchs",$phpgw->db->f(0)); + echo "
" . lang("your search returned x matchs",$phpgw->db->f(0)); } else { $phpgw->db->query("select count(*) from addressbook where $filtermethod"); } @@ -63,10 +63,10 @@ $phpgw->db->next_record(); if ($phpgw->db->f(0) > $phpgw_info["user"]["preferences"]["maxmatchs"]) - echo "
" . lang_common("showing x - x of x",($start + 1), + echo "
" . lang("showing x - x of x",($start + 1), ($start + $phpgw_info["user"]["preferences"]["maxmatchs"]),$phpgw->db->f(0)); else - echo "
" . lang_common("showing x",$phpgw->db->f(0)); + echo "
" . lang("showing x",$phpgw->db->f(0)); ?> nextmatchs->show_sort_order($sort,"lastname",$order,"index.php", - lang_common("Last Name")); + lang("Last Name")); ?> "> nextmatchs->show_sort_order($sort,"firstname",$order,"index.php", - lang_common("First Name")); + lang("First Name")); ?> - + - + @@ -151,12 +151,12 @@ "> + ?>"> - common->check_owner($phpgw->db->f("owner"),"edit.php",lang_common("edit"),"con=" . $phpgw->db->f("con")); ?> + common->check_owner($phpgw->db->f("owner"),"edit.php",lang("edit"),"con=" . $phpgw->db->f("con")); ?> @@ -176,7 +176,7 @@
- "> + ">
  diff --git a/admin/accesslog.php b/admin/accesslog.php index 635fd607d7..30ef1ae7cf 100755 --- a/admin/accesslog.php +++ b/admin/accesslog.php @@ -24,13 +24,13 @@ $show_maxlog = 30; $t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]); - $t->set_var("lang_last_x_logins",lang_admin("Last x logins",$show_maxlog)); + $t->set_var("lang_last_x_logins",lang("Last x logins",$show_maxlog)); - $t->set_var("lang_loginid",lang_admin("LoginID")); - $t->set_var("lang_ip",lang_admin("IP")); - $t->set_var("lang_login",lang_common("Login")); - $t->set_var("lang_logout",lang_common("Logout")); - $t->set_var("lang_total",lang_common("Total")); + $t->set_var("lang_loginid",lang("LoginID")); + $t->set_var("lang_ip",lang("IP")); + $t->set_var("lang_login",lang("Login")); + $t->set_var("lang_logout",lang("Logout")); + $t->set_var("lang_total",lang("Total")); $t->parse("out","header"); @@ -90,8 +90,8 @@ $percent = round((10000 * ($loggedout / $total)) / 100); $t->set_var("bg_color",$phpgw_info["themes"]["bg_color"]); - $t->set_var("footer_total",lang_admin("Total records") . ": $total"); - $t->set_var("lang_percent",lang_admin("Percent of users that logged out") . ": $percent%"); + $t->set_var("footer_total",lang("Total records") . ": $total"); + $t->set_var("lang_percent",lang("Percent of users that logged out") . ": $percent%"); $t->pparse("out","footer"); diff --git a/admin/accounts.php b/admin/accounts.php index aa8d83fa29..e897f2afc6 100755 --- a/admin/accounts.php +++ b/admin/accounts.php @@ -47,15 +47,15 @@ $t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]); $t->set_var("left_next_matchs",$phpgw->nextmatchs->left("accounts.php",$start,$total)); - $t->set_var("lang_user_accounts",lang_admin("user accounts")); + $t->set_var("lang_user_accounts",lang("user accounts")); $t->set_var("right_next_matchs",$phpgw->nextmatchs->right("accounts.php",$start,$total)); - $t->set_var("lang_lastname",$phpgw->nextmatchs->show_sort_order($sort,"lastname",$order,"accounts.php",lang_common("last name"))); - $t->set_var("lang_firstname",$phpgw->nextmatchs->show_sort_order($sort,"firstname",$order,"accounts.php",lang_common("first name"))); + $t->set_var("lang_lastname",$phpgw->nextmatchs->show_sort_order($sort,"lastname",$order,"accounts.php",lang("last name"))); + $t->set_var("lang_firstname",$phpgw->nextmatchs->show_sort_order($sort,"firstname",$order,"accounts.php",lang("first name"))); - $t->set_var("lang_edit",lang_common("Edit")); - $t->set_var("lang_delete",lang_common("Delete")); - $t->set_var("lang_view",lang_common("View")); + $t->set_var("lang_edit",lang("Edit")); + $t->set_var("lang_delete",lang("Delete")); + $t->set_var("lang_view",lang("View")); $t->parse("out","header"); @@ -75,17 +75,17 @@ $t->set_var("row_firstname",$firstname); $t->set_var("row_lastname",$lastname); $t->set_var("row_edit",' ' . lang_common("Edit") . ' '); + . $phpgw->db->f("con")) . '"> ' . lang("Edit") . ' '); if ($phpgw_info["user"]["userid"] != $phpgw->db->f("loginid")) { $t->set_var("row_delete",' '.lang_common("Delete").' '); + . $phpgw->db->f("con")) . '"> '.lang("Delete").' '); } else { $t->set_var("row_delete"," "); } $t->set_var("row_view",' ' . lang_common("View") . ' '); + . $phpgw->db->f("con")) . '"> ' . lang("View") . ' '); if ($phpgw->db->num_rows() == 1) { $t->set_var("output",""); @@ -97,8 +97,8 @@ } $t->set_var("actionurl",$phpgw->link("newaccount.php")); - $t->set_var("lang_add",lang_common("add")); - $t->set_var("lang_search",lang_common("search")); + $t->set_var("lang_add",lang("add")); + $t->set_var("lang_search",lang("search")); $t->pparse("out","footer"); diff --git a/admin/applications.php b/admin/applications.php index a6f5c51b76..209e7423b2 100644 --- a/admin/applications.php +++ b/admin/applications.php @@ -24,13 +24,13 @@ echo '

' - . '' + . '' . ''; echo ""; + . $phpgw->nextmatchs->show_sort_order($sort,"app_title",$order,"applications.php",lang("title")) . ""; $phpgw->db->query("select * from applications $ordermethod"); @@ -43,23 +43,23 @@ echo ""; + . "\"> " . lang("Edit") . " "; echo ""; echo "\n"; } echo "
' . lang_admin("Installed applications") . '
' . lang("Installed applications") . '
 
" - . $phpgw->nextmatchs->show_sort_order($sort,"app_title",$order,"applications.php",lang_admin("title")) . "" - . lang_common("Edit") . " " . lang_common("Delete") . " " - . lang_admin("Enabled") . "
" + . lang("Edit") . " " . lang("Delete") . " " + . lang("Enabled") . "
$namelink("editapplication.php","app_name=" . urlencode($phpgw->db->f("app_name"))) - . "\"> " . lang_common("Edit") . " link("deleteapplication.php", - "app_name=" . urlencode($phpgw->db->f("app_name"))) . "\"> " . lang_common("Delete") + "app_name=" . urlencode($phpgw->db->f("app_name"))) . "\"> " . lang("Delete") . " "; if ($phpgw->db->f("app_enabled") == 1) { - echo lang_common("Yes"); + echo lang("Yes"); } else { - echo "" . lang_common("No") . ""; + echo "" . lang("No") . ""; } echo "

link("newapplication.php")."\">" . "
"; + . "value=\"" . lang("Add") . "\">"; include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); diff --git a/admin/currentusers.php b/admin/currentusers.php index 9f4d40159c..c41be513a2 100755 --- a/admin/currentusers.php +++ b/admin/currentusers.php @@ -31,21 +31,21 @@ $total = $phpgw->db->f(0); $limit = $phpgw->nextmatchs->sql_limit($start); - $t->set_var("lang_current_users",lang_admin("List of current users")); + $t->set_var("lang_current_users",lang("List of current users")); $t->set_var("bg_color",$phpgw_info["theme"][bg_color]); $t->set_var("left_next_matchs",$phpgw->nextmatchs->left("currentusers.php",$start,$total)); $t->set_var("right_next_matchs",$phpgw->nextmatchs->right("currentusers.php",$start,$total)); $t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]); $t->set_var("sort_loginid",$phpgw->nextmatchs->show_sort_order($sort,"loginid",$order, - "currentusers.php",lang_admin("LoginID"))); + "currentusers.php",lang("LoginID"))); $t->set_var("sort_ip",$phpgw->nextmatchs->show_sort_order($sort,"ip",$order, - "currentusers.php",lang_admin("IP"))); + "currentusers.php",lang("IP"))); $t->set_var("sort_login_time",$phpgw->nextmatchs->show_sort_order($sort,"logintime",$order, - "currentusers.php",lang_admin("Login Time"))); + "currentusers.php",lang("Login Time"))); $t->set_var("sort_idle",$phpgw->nextmatchs->show_sort_order($sort,"dla",$order, - "currentusers.php",lang_admin("idle"))); - $t->set_var("lang_kill",lang_admin("Kill")); + "currentusers.php",lang("idle"))); + $t->set_var("lang_kill",lang("Kill")); $t->parse("out","header"); @@ -69,7 +69,7 @@ if ($phpgw->db->f("sessionid") != $phpgw_info["user"]["sessionid"]) { $t->set_var("row_kill",'" . lang_admin("Kill")).''); + . $phpgw->db->f("sessionid") . "&kill=true\">" . lang("Kill")).''); } else { $t->set_var("row_kill"," "); } diff --git a/admin/deleteaccount.php b/admin/deleteaccount.php index 20779e2607..0760813006 100755 --- a/admin/deleteaccount.php +++ b/admin/deleteaccount.php @@ -30,20 +30,20 @@
- +
- +
- " . lang_common("No"); ?> + " . lang("No"); ?> - " . lang_common("Yes"); ?> + " . lang("Yes"); ?>
diff --git a/admin/deleteapplication.php b/admin/deleteapplication.php index bc3630678d..1566801f45 100644 --- a/admin/deleteapplication.php +++ b/admin/deleteapplication.php @@ -33,15 +33,15 @@
- +
- " . lang_common("No") . ""; ?> + " . lang("No") . ""; ?> - " . lang_common("Yes") . ""; ?> + " . lang("Yes") . ""; ?>
diff --git a/admin/deletegroup.php b/admin/deletegroup.php index 9f461e51b2..f84a21082c 100755 --- a/admin/deletegroup.php +++ b/admin/deletegroup.php @@ -47,8 +47,8 @@ $phpgw->common->navbar(); echo '

'; - echo lang_admin("Sorry, the follow users are still a member of the group x",$group_name) - . '
' . lang_admin("They must be removed before you can continue") + echo lang("Sorry, the follow users are still a member of the group x",$group_name) + . '
' . lang("They must be removed before you can continue") . ''; echo '
'; @@ -58,7 +58,7 @@ } echo "
"; echo "link("deletegroup.php","group_id=" . $group_id . "&removeusers=True") - . "\">" . lang_admin("Remove all users from this group") . ""; + . "\">" . lang("Remove all users from this group") . ""; exit; } @@ -90,15 +90,15 @@
- +
- " . lang_common("No") . ""; ?> + " . lang("No") . ""; ?> - " . lang_common("Yes") . ""; ?> + " . lang("Yes") . ""; ?>
diff --git a/admin/deleteheadline.php b/admin/deleteheadline.php index c5ef431ad4..41cc6ac3c2 100755 --- a/admin/deleteheadline.php +++ b/admin/deleteheadline.php @@ -30,20 +30,20 @@
- +
- +
- " . lang_common("No"); ?> + " . lang("No"); ?> - " . lang_common("Yes"); ?> + " . lang("Yes"); ?>
diff --git a/admin/editaccount.php b/admin/editaccount.php index b58c968221..150beafbfc 100755 --- a/admin/editaccount.php +++ b/admin/editaccount.php @@ -34,22 +34,22 @@ if ($n_passwd || $n_passwd_2) { if ($n_passwd != $n_passwd_2){ - $error .= lang_admin("The two passwords are not the same"); + $error .= lang("The two passwords are not the same"); } if (! $n_passwd){ - $error .= lang_admin("You must enter a password"); + $error .= lang("You must enter a password"); } } if ($lid != $n_loginid) { $phpgw->db->query("select loginid from accounts where loginid='$n_loginid'"); if ($phpgw->db->num_rows() != 0) { - $error .= "
" . lang_admin("That loginid has already been taken"); + $error .= "
" . lang("That loginid has already been taken"); } } if (count($new_permissions) == 0){ - $error .= "
" . lang_admin("You must add at least 1 permission to this account"); + $error .= "
" . lang("You must add at least 1 permission to this account"); } if (! $error) { $phpgw->db->lock(array('accounts','preferences','sessions')); @@ -125,25 +125,25 @@ " . lang_common("Error") . ":$error
"; + echo "
" . lang("Error") . ":$error
"; } ?>
- + - + - + - + ' + echo '' . '"; $i++; if (! $perm_display[$i][1]) break; - echo '' + echo '' . '"; - echo " - + - + - + - +
">
">
">
' . lang_common($perm_display[$i][1]) . '
' . lang($perm_display[$i][1]) . '' . lang_common($perm_display[$i][1]) . '' . lang($perm_display[$i][1]) . '" . lang_admin("Anonymous user") . "" . lang("Anonymous user") . "" . lang_admin("Manager") . "" . lang("Manager") . "
>
">">
diff --git a/admin/editapplication.php b/admin/editapplication.php index 39f0b4a76a..b2b1df4345 100644 --- a/admin/editapplication.php +++ b/admin/editapplication.php @@ -23,7 +23,7 @@ if ($submit) { if (! $n_app_name || ! $n_app_title) { - $error = lang_admin("You must enter an application name and title."); + $error = lang("You must enter an application name and title."); } else { $phpgw->db->query("update applications set app_name='" . addslashes($n_app_name) . "'," . "app_title='" . addslashes($n_app_title) . "', app_enabled='" @@ -41,7 +41,7 @@ $phpgw->common->navbar(); } - $t->set_var("lang_header",lang_admin("Add new application")); + $t->set_var("lang_header",lang("Add new application")); if ($error) { $t->set_var("error","

$error

"); @@ -51,10 +51,10 @@ $t->set_var("hidden_vars",''); $t->set_var("form_action",$phpgw->link("editapplication.php")); - $t->set_var("lang_app_name",lang_admin("application name")); - $t->set_var("lang_app_title",lang_admin("application title")); - $t->set_var("lang_enabled",lang_admin("enabled")); - $t->set_var("lang_submit_button",lang_common("edit")); + $t->set_var("lang_app_name",lang("application name")); + $t->set_var("lang_app_title",lang("application title")); + $t->set_var("lang_enabled",lang("enabled")); + $t->set_var("lang_submit_button",lang("edit")); $t->set_var("app_name_value",$phpgw->db->f("app_name")); $t->set_var("app_title_value",$phpgw->db->f("app_title")); diff --git a/admin/editgroup.php b/admin/editgroup.php index b9c38bd823..3f15721cc2 100755 --- a/admin/editgroup.php +++ b/admin/editgroup.php @@ -36,7 +36,7 @@ $phpgw->db->next_record(); if ($phpgw->db->f(0) != 0 && $n_group != $old_group_name) { - $error = lang_admin("Sorry, that group name has already been taking."); + $error = lang("Sorry, that group name has already been taking."); } if (! $error) { @@ -124,7 +124,7 @@ $t->set_var("form_action",$phpgw->link("editgroup.php")); $t->set_var("hidden_vars",""); - $t->set_var("lang_group_name",lang_admin("group name")); + $t->set_var("lang_group_name",lang("group name")); $t->set_var("group_name_value",$phpgw->db->f("group_name")); $phpgw->db->query("select count(*) from accounts where status !='L'"); @@ -136,7 +136,7 @@ $t->set_var("select_size","5"); } - $t->set_var("lang_include_user",lang_admin("Select users for inclusion")); + $t->set_var("lang_include_user",lang("Select users for inclusion")); $phpgw->db->query("SELECT con,firstname,lastname, loginid FROM accounts where " . "status != 'L' ORDER BY lastname,firstname,loginid asc"); while ($phpgw->db->next_record()) { @@ -148,7 +148,7 @@ } $t->set_var("user_list",$user_list); - $t->set_var("lang_permissions",lang_admin("Permissions this group has")); + $t->set_var("lang_permissions",lang("Permissions this group has")); while ($permission = each($phpgw_info["apps"])) { if ($permission[1]["enabled"]) { $permissions_list .= "
" . "" - . "" + . "
link("groups.php")."\">
" . lang_common("search") . " " + . "value=\"" . lang("Add") . "\">
link("groups.php")."\">
" . lang("search") . " " . "
"; include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); diff --git a/admin/headlines.php b/admin/headlines.php index 19dd67f1c4..9091421c68 100755 --- a/admin/headlines.php +++ b/admin/headlines.php @@ -14,10 +14,10 @@ $phpgw_info["flags"]["currentapp"] = "admin"; include("../header.inc.php"); - echo "

" . lang_admin("Headline Sites") . "
" - . "" - . ""; + echo "

" . lang("Headline Sites") . "
" . lang_admin("Site") . " " . lang_common("Edit") . " " . lang_common("Delete") . " " - . lang_common("View") . "
" + . "" + . ""; $phpgw->db->query("select con,display from news_site order by " . "display"); @@ -31,15 +31,15 @@ echo "" . ""; + "con=".$phpgw->db->f("con"))."\"> ".lang("Edit")." "; echo ""; + "con=".$phpgw->db->f("con"))."\"> ".lang("Delete")." "; echo "\n"; + "con=".$phpgw->db->f("con"))."\"> ".lang("View")." \n"; } echo "link("newheadline.php")."\">" - . "
" . lang("Site") . " " . lang("Edit") . " " . lang("Delete") . " " + . lang("View") . "
$displaylink("editheadline.php", - "con=".$phpgw->db->f("con"))."\"> ".lang_common("Edit")." link("deleteheadline.php", - "con=".$phpgw->db->f("con"))."\"> ".lang_common("Delete")." link("viewheadline.php", - "con=".$phpgw->db->f("con"))."\"> ".lang_common("View")."
"; include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); diff --git a/admin/index.php b/admin/index.php index 0654e1fee0..af854a3a35 100755 --- a/admin/index.php +++ b/admin/index.php @@ -19,13 +19,13 @@ ?>

-
" . lang_admin("User accounts"); ?> -
" . lang_admin("User groups"); ?> -
" . lang_admin("Applications"); ?> -

" . lang_admin("View sessions"); ?> -
" . lang_admin("View Access Log"); ?> -

" . lang_admin("Headline Sites"); ?> -

" . lang_admin("Network News"); ?> +
" . lang("User accounts"); ?> +
" . lang("User groups"); ?> +
" . lang("Applications"); ?> +

" . lang("View sessions"); ?> +
" . lang("View Access Log"); ?> +

" . lang("Headline Sites"); ?> +

" . lang("Network News"); ?> 0 ) { echo "

link($PHP_SELF, "SHOW_INFO=0")."\">Hide PHP Information"; diff --git a/admin/killsession.php b/admin/killsession.php index ef52841c2d..fce1877655 100755 --- a/admin/killsession.php +++ b/admin/killsession.php @@ -32,16 +32,16 @@
- +
- " . lang_common("No"); ?> + " . lang("No"); ?> " . lang_common("Yes"); ?> + . "\">" . lang("Yes"); ?>
diff --git a/admin/newaccount.php b/admin/newaccount.php index 8cbf9915c5..7845d03449 100755 --- a/admin/newaccount.php +++ b/admin/newaccount.php @@ -17,24 +17,24 @@ include("../header.inc.php"); if ($submit) { if (! $n_loginid) - $error = "
" . lang_admin("You must enter a loginid"); + $error = "
" . lang("You must enter a loginid"); if (! $n_passwd) - $error .= "
" . lang_admin("You must enter a password"); + $error .= "
" . lang("You must enter a password"); if ($n_passwd == $n_loginid) - $error = "
" . lang_admin("The login and password can not be the same"); + $error = "
" . lang("The login and password can not be the same"); if ($n_passwd != $n_passwd_2) - $error .= "
" . lang_admin("The two passwords are not the same"); + $error .= "
" . lang("The two passwords are not the same"); if (count($new_permissions) == 0) - $error .= "
" . lang_admin("You must add at least 1 permission to this account"); + $error .= "
" . lang("You must add at least 1 permission to this account"); $phpgw->db->query("select loginid from accounts where loginid='$n_loginid'"); $phpgw->db->next_record(); if ($phpgw->db->f("loginid")) - $error .= "
" . lang_admin("That loginid has already been taken"); + $error .= "
" . lang("That loginid has already been taken"); if (! $error) { $phpgw->db->lock(array("accounts","preferences")); @@ -93,33 +93,33 @@

"> " . lang_common("Error") . ":$error
"; + echo "
" . lang("Error") . ":$error
"; } ?>
- + - + - + - + - + - + ' + echo '' . '' + echo '' . '"; - echo ""; */ ?>
' . lang_common($perm_display[$i][1]) . '
' . lang($perm_display[$i][1]) . '' . lang_common($perm_display[$i][1]) . '' . lang($perm_display[$i][1]) . '" . lang_admin("Anonymous user") . " " . lang("Anonymous user") . " " . lang_admin("Manager") . " " . lang("Manager") . "
- "> + ">
diff --git a/admin/newapplication.php b/admin/newapplication.php index 61bf501a46..6bc92c7eb8 100644 --- a/admin/newapplication.php +++ b/admin/newapplication.php @@ -24,7 +24,7 @@ if ($submit) { if (! $n_app_name || ! $n_app_title) { - $error = lang_admin("You must enter an application name and title."); + $error = lang("You must enter an application name and title."); } else { $phpgw->db->query("insert into applications (app_name,app_title,app_enabled) values('" . addslashes($n_app_name) . "','" . addslashes($n_app_title) . "','" @@ -39,7 +39,7 @@ $phpgw->common->navbar(); } - $t->set_var("lang_header",lang_admin("Add new application")); + $t->set_var("lang_header",lang("Add new application")); if ($error) { $t->set_var("error","

$error

"); @@ -49,10 +49,10 @@ $t->set_var("session_hidden_var",""); $t->set_var("form_action",$phpgw->link("newapplication.php")); - $t->set_var("lang_app_name",lang_admin("application name")); - $t->set_var("lang_app_title",lang_admin("application title")); - $t->set_var("lang_enabled",lang_admin("enabled")); - $t->set_var("lang_submit_button",lang_common("add")); + $t->set_var("lang_app_name",lang("application name")); + $t->set_var("lang_app_title",lang("application title")); + $t->set_var("lang_enabled",lang("enabled")); + $t->set_var("lang_submit_button",lang("add")); $t->set_var("app_name_value",""); $t->set_var("app_title_value",""); diff --git a/admin/newgroup.php b/admin/newgroup.php index 7b5c002a55..12b158b5ef 100755 --- a/admin/newgroup.php +++ b/admin/newgroup.php @@ -26,10 +26,10 @@ $phpgw->db->next_record(); if ($phpgw->db->f(0) != 0) { - $error = "
" . lang_admin("Sorry, that group name has already been taking."); + $error = "
" . lang("Sorry, that group name has already been taking."); } if (! $n_group) { - $error = "
" . lang_admin("You must enter a group name."); + $error = "
" . lang("You must enter a group name."); } if (! $error) { @@ -75,7 +75,7 @@ } $t->set_var("form_action",$phpgw->link("newgroup.php")); - $t->set_var("lang_group_name",lang_admin("New group name")); + $t->set_var("lang_group_name",lang("New group name")); $t->set_var("group_name_value",""); $phpgw->db->query("select count(*) from accounts where status !='L'"); @@ -87,7 +87,7 @@ $t->set_var("select_size","5"); } - $t->set_var("lang_include_user",lang_admin("Select users for inclusion")); + $t->set_var("lang_include_user",lang("Select users for inclusion")); for ($i=0; $iset_var("user_list",$user_list); - $t->set_var("lang_permissions",lang_admin("Select permissions this group will have")); + $t->set_var("lang_permissions",lang("Select permissions this group will have")); for ($i=0; $iset_var("permissions_list",$permissions_list); - $t->set_var("lang_submit_button",lang_admin("Create Group")); + $t->set_var("lang_submit_button",lang("Create Group")); $t->pparse("out","form"); diff --git a/admin/newheadline.php b/admin/newheadline.php index 153556e48c..9c644382d7 100755 --- a/admin/newheadline.php +++ b/admin/newheadline.php @@ -22,27 +22,27 @@
- + - + - + - + - + - +
- "> + ">
@@ -66,22 +66,22 @@ } else { if (! $n_display) - $error = "
" . lang_admin("You must enter a display"); + $error = "
" . lang("You must enter a display"); if (! $n_base_url) - $error = "
" . lang_admin("You must enter a base url"); + $error = "
" . lang("You must enter a base url"); if (! $n_newsfile) - $error = "
" . lang_admin("You must enter a news url"); + $error = "
" . lang("You must enter a news url"); if (! $n_cachetime) - $error = "
" . lang_admin("You must enter the number of minutes between reload"); + $error = "
" . lang("You must enter the number of minutes between reload"); if (! $n_listings) - $error = "
" . lang_admin("You must enter the number of listings display"); + $error = "
" . lang("You must enter the number of listings display"); if (! $n_newstype) - $error = "
" . lang_admin("You must select a file type"); + $error = "
" . lang("You must select a file type"); if ($error) exit; @@ -92,7 +92,7 @@ $phpgw->db->next_record(); if ($phpgw->db->f("display")) { navigation_bar(); - echo "
" . lang_admin("That site has already been entered") . "
"; + echo "
" . lang("That site has already been entered") . "
"; exit; } diff --git a/admin/nntp.php b/admin/nntp.php index c9cdd13068..563b540e9a 100755 --- a/admin/nntp.php +++ b/admin/nntp.php @@ -101,7 +101,7 @@ . "\n"; $t->set_var("search_value",$query); - $t->set_var("search",lang_common("search")); + $t->set_var("search",lang("search")); $t->set_var("next",lang_nntp("next")); $t->set_var("nml",$phpgw->nextmatchs->left($urlname,$start,$tg, diff --git a/admin/viewaccount.php b/admin/viewaccount.php index 6964862186..6f63aa1106 100755 --- a/admin/viewaccount.php +++ b/admin/viewaccount.php @@ -34,28 +34,28 @@ "> - + db->f("loginid"); ?> "> - + db->f("firstname"); ?> "> - + db->f("lastname"); ?> "> - + " . implode(", ", $perm_display) . ""; echo "" - . lang_admin("account active") . " "; + . lang("account active") . " "; if ($phpgw->db->f("status") == "A") - echo lang_common("yes"); + echo lang("yes"); else - echo "" . lang_common("no") . ""; + echo "" . lang("no") . ""; ?> "> diff --git a/admin/viewheadline.php b/admin/viewheadline.php index cbca0d90d2..eed040fb1c 100755 --- a/admin/viewheadline.php +++ b/admin/viewheadline.php @@ -24,13 +24,13 @@ ?>
- - - - - - - + + + + + + + db->query("select title,link from news_headlines where site=$con"); diff --git a/calendar/day.php b/calendar/day.php index fe59a2ee27..aee4838bb6 100644 --- a/calendar/day.php +++ b/calendar/day.php @@ -174,7 +174,7 @@ for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += (24 * 3600 if ($thisyear) echo "&year=$thisyear&month=$thismonth&day=$thisday"; - ?>&friendly=1" TARGET="cal_printer_friendly" onMouseOver="window.status = '[" . lang_calendar("Printer Friendly"); ?>] + ?>&friendly=1" TARGET="cal_printer_friendly" onMouseOver="window.status = '[" . lang("Printer Friendly"); ?>] 0) { // do a little form verifying function validate_and_submit() { if (document.addform.name.value == "") { - alert("."); + alert("."); return false; } h = parseInt(document.addform.hour.value); m = parseInt(document.addform.minute.value); if (h > 23 || m > 59) { - alert (""); + alert (""); return false; } // would be nice to also check date to not allow Feb 31, etc... @@ -112,9 +112,9 @@ function validate_and_submit() {

@@ -127,14 +127,14 @@ function validate_and_submit() {
db->f("display"); ?>
db->f("base_url"); ?>
db->f("newsfile"); ?>
common->show_date($phpgw->db->f("lastread")); ?>
db->f("cachetime"); ?>
db->f("listings"); ?>
db->f("newstype"); ?>
db->f("display"); ?>
db->f("base_url"); ?>
db->f("newsfile"); ?>
common->show_date($phpgw->db->f("lastread")); ?>
db->f("cachetime"); ?>
db->f("listings"); ?>
db->f("newstype"); ?>
- + - + - + - + - + + echo $duration;?>"> - + - + - + " + echo "" . " - + - + - + - +
::
:: @@ -142,7 +142,7 @@ function validate_and_submit() {
:: "; @@ -159,7 +159,7 @@ function validate_and_submit() { if ($year == 0) $year = date("Y"); for ($i = 1; $i <= 12; $i++) { - $m = lang_common(date("F", mktime(0,0,0,$i,1,$year))); + $m = lang(date("F", mktime(0,0,0,$i,1,$year))); $month_html .= "\n"; } @@ -180,7 +180,7 @@ function validate_and_submit() {
::
::
::
::
::
" . lang_calendar("Participants") . ":
" . lang("Participants") . ":\n
::
:: > + echo ($rpt_end?"checked":""); ?>> "; for ($i = 1; $i <= 12; $i++) { - $m = lang_common(date("F", mktime(0,0,0,$i,1,$rpt_year))); + $m = lang(date("F", mktime(0,0,0,$i,1,$rpt_year))); $month_html .= "\n"; } @@ -366,27 +366,27 @@ function validate_and_submit() {
: : " . lang_common("Sunday"); + . ($rpt_sun?"checked":"") . "> " . lang("Sunday"); echo " " . lang_common("Monday"); + . ($rpt_mon?"checked":"") . "> " . lang("Monday"); echo " " . lang_common("Tuesday"); + . ($rpt_tue?"checked":"") . "> " . lang("Tuesday"); echo " " . lang_common("Wednesday"); + . ($rpt_wed?"checked":"") . "> " . lang("Wednesday"); echo " " . lang_common("Thursday"); + . ($rpt_thu?"checked":"") . "> " . lang("Thursday"); echo " " . lang_common("Friday"); + . ($rpt_fri?"checked":"") . "> " . lang("Friday"); echo " " . lang_common("Saturday"); + . ($rpt_sat?"checked":"") . "> " . lang("Saturday"); ?>
: : @@ -395,11 +395,11 @@ function validate_and_submit() {
@@ -409,8 +409,8 @@ function validate_and_submit() { 0) { echo "link("delete.php","id=$id") . "\" onClick=\"return confirm('" - . lang_calendar("Are you sure\\nyou want to\\ndelete this entry ?") . "');\">" - . lang_common("Delete") . "
"; + . lang("Are you sure\\nyou want to\\ndelete this entry ?") . "');\">" + . lang("Delete") . "
"; } } // ***** This might be out of place. I was getting tons of parse errors // from if ($can_edit) { This needs to be rewritten, because if you do diff --git a/calendar/edit_entry_handler.php b/calendar/edit_entry_handler.php index 4d2515ff6b..eb868a8081 100755 --- a/calendar/edit_entry_handler.php +++ b/calendar/edit_entry_handler.php @@ -110,7 +110,7 @@ } if ($overlap) - $error = lang_calendar("The following conflicts with the suggested time:
    x
", + $error = lang("The following conflicts with the suggested time:
    x
", $overlap); if (! $error) { @@ -221,7 +221,7 @@ $phpgw->common->header();

Scheduling Conflict

x - x conflicts with the following existing calendar entries:", display_time($time),display_time(add_duration($time,$duration))); ?> + echo lang("Your suggested time of x - x conflicts with the following existing calendar entries:", display_time($time),display_time(add_duration($time,$duration))); ?> ?> diff --git a/calendar/inc/footer.inc.php b/calendar/inc/footer.inc.php index 2ce34fa587..a1127bcfb8 100644 --- a/calendar/inc/footer.inc.php +++ b/calendar/inc/footer.inc.php @@ -25,7 +25,7 @@ " method="post" name="SelectMonth"> -: +: - +
" method="post" name="SelectWeek"> -: +: - +
@@ -104,7 +104,7 @@
" method="post" name="SelectYear"> -: +: - +
diff --git a/calendar/inc/functions.inc.php b/calendar/inc/functions.inc.php index ee9f6e0aeb..d5e859e374 100755 --- a/calendar/inc/functions.inc.php +++ b/calendar/inc/functions.inc.php @@ -25,18 +25,18 @@ $TODAYCELLBG = "#E0E0E0";// color of table cells of current day in month view - $month_names = array("01" => lang_common("January"), "07" => lang_common("July"), - "02" => lang_common("February"),"08" => lang_common("August"), - "03" => lang_common("March"), "09" => lang_common("September"), - "04" => lang_common("April"), "10" => lang_common("October"), - "05" => lang_common("May"), "11" => lang_common("November"), - "06" => lang_common("June"), "12" => lang_common("December") + $month_names = array("01" => lang("January"), "07" => lang("July"), + "02" => lang("February"),"08" => lang("August"), + "03" => lang("March"), "09" => lang("September"), + "04" => lang("April"), "10" => lang("October"), + "05" => lang("May"), "11" => lang("November"), + "06" => lang("June"), "12" => lang("December") ); - $weekday_names = array( "0" => lang_common("Sunday"), "1" => lang_common("Monday"), - "2" => lang_common("Tuesday"), "3" => lang_common("Wednesday"), - "4" => lang_common("Thursday"),"5" => lang_common("Friday"), - "6" => lang_common("Saturday") + $weekday_names = array( "0" => lang("Sunday"), "1" => lang("Monday"), + "2" => lang("Tuesday"), "3" => lang("Wednesday"), + "4" => lang("Thursday"),"5" => lang("Friday"), + "6" => lang("Saturday") ); @@ -60,19 +60,19 @@ } if ($showyear) { - echo lang_common(date("F",$monthstart)) . " $thisyear" . ""; + echo lang(date("F",$monthstart)) . " $thisyear" . ""; } else { - echo lang_common(date("F",$monthstart)) . ""; + echo lang(date("F",$monthstart)) . ""; } echo "" - . "" . lang_calendar("Su") . "" - . "" . lang_calendar("Mo") . "" - . "" . lang_calendar("Tu") . "" - . "" . lang_calendar("We") . "" - . "" . lang_calendar("Th") . "" - . "" . lang_calendar("Fr") . "" - . "" . lang_calendar("Sa") . "" + . "" . lang("Su") . "" + . "" . lang("Mo") . "" + . "" . lang("Tu") . "" + . "" . lang("We") . "" + . "" . lang("Th") . "" + . "" . lang("Fr") . "" + . "" . lang("Sa") . "" . ""; for ($i = $sun; date("Ymd",$i) <= date ("Ymd",$monthend); @@ -101,32 +101,32 @@ function weekday_short_name($w) { switch($w) { - case 0: return lang_calendar("Sun"); - case 1: return lang_calendar("Mon"); - case 2: return lang_calendar("Tue"); - case 3: return lang_calendar("Wed"); - case 4: return lang_calendar("Thu"); - case 5: return lang_calendar("Fri"); - case 6: return lang_calendar("Sat"); - case 7: return lang_calendar("Jul"); + case 0: return lang("Sun"); + case 1: return lang("Mon"); + case 2: return lang("Tue"); + case 3: return lang("Wed"); + case 4: return lang("Thu"); + case 5: return lang("Fri"); + case 6: return lang("Sat"); + case 7: return lang("Jul"); } return "unknown-weekday($w)"; } function month_name ( $m ) { switch ( $m ) { - case 0: return lang_calendar("January"); - case 1: return lang_calendar("February"); - case 2: return lang_calendar("March"); - case 3: return lang_calendar("April"); - case 4: return lang_calendar("May"); - case 5: return lang_calendar("June"); - case 6: return lang_calendar("July"); - case 7: return lang_calendar("August"); - case 8: return lang_calendar("September"); - case 9: return lang_calendar("October"); - case 10: return lang_calendar("November"); - case 11: return lang_calendar("December"); + case 0: return lang("January"); + case 1: return lang("February"); + case 2: return lang("March"); + case 3: return lang("April"); + case 4: return lang("May"); + case 5: return lang("June"); + case 6: return lang("July"); + case 7: return lang("August"); + case 8: return lang("September"); + case 9: return lang("October"); + case 10: return lang("November"); + case 11: return lang("December"); } return "unknown-month($m)"; } @@ -439,7 +439,7 @@ function month_name ( $m ) { ."&day=".date("d",$date)) . "\">" . "\"""; + . lang("New Entry") . "\" BORDER=0 ALIGN=right>"; echo "[ " . "link("day.php","month=".date("m",$date) ."&day=".date("d",$date)."&year=".date("Y",$date)) . "\">" . date("d", $date) . " ]
\n"; @@ -487,7 +487,7 @@ function month_name ( $m ) { if (! $hide_icons) { echo "link("view.php","id=".$phpgw->db->f(0)) . "\" onMouseOver=\"window.status='" - . lang_calendar("View this entry") . "'; return true;\">\""db->f("cal_description") . "\" BORDER=0>"; } @@ -575,7 +575,7 @@ function month_name ( $m ) { $class = "entry"; if (! $hide_icons) { $hour_arr[$ind] .= "link("view.php","id=$id"); - $hour_arr[$ind] .= "\" onMouseOver=\"window.status='" . lang_calendar("View this entry") + $hour_arr[$ind] .= "\" onMouseOver=\"window.status='" . lang("View this entry") . "'; return true;\">"; } diff --git a/calendar/inc/header.inc.php b/calendar/inc/header.inc.php index d14db092c5..623683c665 100644 --- a/calendar/inc/header.inc.php +++ b/calendar/inc/header.inc.php @@ -5,17 +5,17 @@ "> - /today.gif" alt="" border="0"> + /today.gif" alt="" border="0"> "> - /week.gif" alt="" border="0"> + /week.gif" alt="" border="0"> "> - /month.gif" alt="" border="0"> + /month.gif" alt="" border="0"> @@ -26,7 +26,7 @@ - "> + "> diff --git a/calendar/index.php b/calendar/index.php index 1479fe52bb..c694ccb31a 100755 --- a/calendar/index.php +++ b/calendar/index.php @@ -78,7 +78,7 @@ @@ -99,13 +99,13 @@ - - - - - - - + + + + + + +link($PHP_SELF,$param)."\">"; - echo "[". lang_calendar("Printer Friendly") . "]"; + echo "[". lang("Printer Friendly") . "]"; include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); } diff --git a/calendar/search.php b/calendar/search.php index 1c2a82803e..822f875a39 100755 --- a/calendar/search.php +++ b/calendar/search.php @@ -27,20 +27,20 @@ $error = ""; if (strlen($keywords) == 0) - $error = lang_calendar("You must enter one or more search keywords."); + $error = lang("You must enter one or more search keywords."); $matches = 0; ?> -

" . lang_calendar("Search Results"); ?>

+

" . lang("Search Results"); ?>

" . lang_common("Error") . ": $error"; + echo "" . lang("Error") . ": $error"; } else { $ids = array(); $words = split(" ", $keywords); @@ -70,9 +70,9 @@ if ($matches == 1) echo "1 match found.

"; else if ($matches > 0) - echo "" . lang_calendar("x matches found",$matches) . ".

"; + echo "" . lang("x matches found",$matches) . ".

"; else - $error = lang_calendar("no matches found."); + $error = lang("no matches found."); // now sort by number of hits if (! strlen($error)) { diff --git a/calendar/view.php b/calendar/view.php index b1b7e6626c..307f57af53 100755 --- a/calendar/view.php +++ b/calendar/view.php @@ -28,14 +28,14 @@ if ($year) $thisyear = $year; if ($month) $thismonth = $month; - $pri[1] = lang_common("Low"); - $pri[2] = lang_common("Medium"); - $pri[3] = lang_common("High"); + $pri[1] = lang("Low"); + $pri[2] = lang("Medium"); + $pri[3] = lang("High"); $unapproved = FALSE; if ($id < 1) { - echo lang_calendar("Invalid entry id."); + echo lang("Invalid entry id."); exit; } @@ -76,14 +76,14 @@ // Some browser add a \n when its entered in the database. Not a big deal // this will be printed even though its not needed. if ($description) { - echo "

"; } ?> - + @@ -97,30 +97,30 @@ if ($phpgw->db->f(2) > 0) { ?> - + db->f(5) > 0) { - echo ""; + echo ""; } ?> - + \n"; + echo "\n"; echo "\n"; ?> - + @@ -131,11 +131,11 @@ $cal_groups .= $cal_groups_temp[$i][1] . "
\n"; } if ($cal_groups) - echo ""; + echo ""; ?> - + - +
">">">">">">">">">">">">">">">">">">">">">">">">">">">">
" . lang_calendar("Description") . ":" + echo "
" . lang("Description") . ":" . "$description
:: db->f(1)); ?>
:: db->f(2)); ?>
" . lang_calendar("Duration") . ":" - . $phpgw->db->f(5) . " " . lang_calendar("minutes") . "
" . lang("Duration") . ":" + . $phpgw->db->f(5) . " " . lang("minutes") . "
:: db->f(6)]; ?>
" . lang_common("Created by") . ":
" . lang("Created by") . ":" . $phpgw_info["user"]["fullname"] . "
:: db->f(3)) . " " . display_time($phpgw->db->f(4)); ?>
" . lang_common("Groups") . ":".$cal_groups."
" . lang("Groups") . ":".$cal_groups."
:: db->query("SELECT webcal_entry_user.cal_login, accounts.lastname, " @@ -159,33 +159,33 @@
:: db->query("SELECT * from webcal_entry_repeats WHERE cal_id=$id"); $phpgw->db->next_record(); if (substr($phpgw->db->f(5),0,1) == 'y') - $t_repeat_days = lang_common("Sunday "); + $t_repeat_days = lang("Sunday "); if (substr($phpgw->db->f(5),1,1) == 'y') - $t_repeat_days .= lang_common("Monday "); + $t_repeat_days .= lang("Monday "); if (substr($phpgw->db->f(5),2,1) == 'y') - $t_repeat_days .= lang_common("Tuesday "); + $t_repeat_days .= lang("Tuesday "); if (substr($phpgw->db->f(5),3,1) == 'y') - $t_repeat_days .= lang_common("Wednesday "); + $t_repeat_days .= lang("Wednesday "); if (substr($phpgw->db->f(5),4,1) == 'y') - $t_repeat_days .= lang_common("Thursday "); + $t_repeat_days .= lang("Thursday "); if (substr($phpgw->db->f(5),5,1) == 'y') - $t_repeat_days .= lang_common("Friday "); + $t_repeat_days .= lang("Friday "); if (substr($phpgw->db->f(5),6,1) == 'y') - $t_repeat_days .= lang_common("Saturday "); + $t_repeat_days .= lang("Saturday "); echo $phpgw->db->f(2) . " ("; if ($phpgw->db->f(3)) echo "ends: " . $phpgw->db->f(3) . ", "; if ($phpgw->db->f(2) == 'weekly') - echo lang_calendar("days repeated") . ": " . $t_repeat_days . ", "; + echo lang("days repeated") . ": " . $t_repeat_days . ", "; - echo lang_calendar("frequency") . ": " . $phpgw->db->f(4) . ")"; + echo lang("frequency") . ": " . $phpgw->db->f(4) . ")"; ?> @@ -196,8 +196,8 @@ link("edit_entry.php","id=$id") . "\">" - . lang_common("Edit") . "
\nlink("delete.php","id=$id") . "\" onClick=\"return confirm('" - . lang_calendar("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.") . "');\">" . lang_common("Delete") . "
\n"; + . lang("Edit") . "
\nlink("delete.php","id=$id") . "\" onClick=\"return confirm('" + . lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.") . "');\">" . lang("Delete") . "
\n"; } ?> diff --git a/calendar/week.php b/calendar/week.php index 8eed2b73ac..840dacfde6 100755 --- a/calendar/week.php +++ b/calendar/week.php @@ -123,13 +123,13 @@ - - - - - - - + + + + + + + @@ -167,7 +167,7 @@ echo "

 link("week.php","$yeartext&friendly=1"); } ?>" TARGET="cal_printer_friendly" -onMouseOver="window.status = ''">[] +onMouseOver="window.status = ''">[] link("year.php","friendly=1&" . "&year=$year") . "\"TARGET=\"cal_printer_friendly\" onMouseOver=\"window." - . "status = '" . lang_calendar("Generate printer-friendly version") . "'\">[" - . lang_calendar("Printer Friendly") . "]"; + . "status = '" . lang("Generate printer-friendly version") . "'\">[" + . lang("Printer Friendly") . "]"; } include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); diff --git a/doc/RELEASE-NOTES b/doc/RELEASE-NOTES index 02351749d5..af86e6da9b 100755 --- a/doc/RELEASE-NOTES +++ b/doc/RELEASE-NOTES @@ -2,3 +2,5 @@ This release requires you to resubmit all of your user accounts. The format of has changed. The inventory program has a new field called mstock. + +There is a new translation support system, you need to add the lang table, which can be found at the end of the create_table script diff --git a/doc/create_tables.mysql b/doc/create_tables.mysql index 42dcb8979c..177464f754 100755 --- a/doc/create_tables.mysql +++ b/doc/create_tables.mysql @@ -184,3 +184,10 @@ CREATE TABLE users_newsgroups ( newsgroup int(11) NOT NULL ); +CREATE TABLE lang ( + message_id varchar(150) DEFAULT '' NOT NULL, + app_name varchar(100) DEFAULT 'common' NOT NULL, + lang varchar(5) DEFAULT '' NOT NULL, + content text NOT NULL, + PRIMARY KEY (message_id,app_name,lang) +); diff --git a/doc/create_tables.pgsql b/doc/create_tables.pgsql index d193c2fa23..f8ddfd98f2 100755 --- a/doc/create_tables.pgsql +++ b/doc/create_tables.pgsql @@ -175,4 +175,12 @@ CREATE TABLE users_newsgroups ( newsgroup int NOT NULL ); +CREATE TABLE lang ( + message_id varchar(150) DEFAULT '' NOT NULL, + app_name varchar(100) DEFAULT 'common' NOT NULL, + lang varchar(5) DEFAULT '' NOT NULL, + content text NOT NULL, + unique(message_id,app_name,lang) +); + COMMIT; diff --git a/index.php b/index.php index 1840ec2e38..bed3020bd7 100755 --- a/index.php +++ b/index.php @@ -82,11 +82,11 @@ $mailbox_status = $phpgw->msg->status($mbox,"{" . $phpgw_info["server"]["mail_server"] . ":" . $phpgw_info["server"]["mail_port"] . "}INBOX",SA_UNSEEN); if ($mailbox_status->unseen == 1) { echo "

\n"; + . lang("You have 1 new message!") . "\n"; } if ($mailbox_status->unseen > 1) { echo ""; + . lang("You have x new messages!",$mailbox_status->unseen) . ""; } echo "\n"; } @@ -99,7 +99,7 @@ . "/%' and (owner='" . $phpgw_info["user"]["userid"] . "' or access='" . "public')"); while ($phpgw->db->next_record()) { - echo "\n"; } $tommorow = $phpgw->common->show_date(mktime(0,0,0, @@ -110,7 +110,7 @@ . "bday like '$tommorow/%' and (owner='" . $phpgw_info["user"]["userid"] . "' or access='public')"); while ($phpgw->db->next_record()) { - echo "\n"; } echo "\n"; @@ -139,7 +139,7 @@ if ($check > 1) { $key = "You have x high priority events on your calendar today."; } - if ($check > 0) echo ""; + if ($check > 0) echo ""; echo "\n"; } diff --git a/login.php b/login.php index b7db5aea71..4bd577484f 100755 --- a/login.php +++ b/login.php @@ -19,7 +19,7 @@ ); include("header.inc.php"); - include($phpgw_info["server"]["include_root"] . "/lang/" . "en" . "_login.inc.php"); +// include($phpgw_info["server"]["include_root"] . "/lang/" . "en" . "_login.inc.php"); include($phpgw_info["server"]["api_dir"] . "/phpgw_template.inc.php"); /* @@ -64,16 +64,16 @@ global $phpgw_info; switch($code){ case "1": - return lang_login("You have been successfully logged out"); + return lang("You have been successfully logged out"); break; case "2": - return lang_login("Sorry, your login has expired"); + return lang("Sorry, your login has expired"); break; case "5": - return "" . lang_login("Bad login or password") . ""; + return "" . lang("Bad login or password") . ""; break; case "10": - return "" . lang_login("Your session could not be verified.") . ""; + return "" . lang("Your session could not be verified.") . ""; break; default: return " "; @@ -116,9 +116,9 @@ $tmpl->set_var("website_title", $phpgw_info["server"]["site_title"]); $tmpl->set_var("cd",check_logoutcode($cd)); $tmpl->set_var("cookie",show_cookie()); - $tmpl->set_var("lang_username",lang_login("username")); - $tmpl->set_var("lang_password",lang_login("password")); - $tmpl->set_var("lang_login",lang_login("login")); + $tmpl->set_var("lang_username",lang("username")); + $tmpl->set_var("lang_password",lang("password")); + $tmpl->set_var("lang_login",lang("login")); $tmpl->parse("login2out","login2"); $tmpl->parse("loginout", "login"); diff --git a/logout.php b/logout.php index 5c4aa6699d..938aa2533b 100755 --- a/logout.php +++ b/logout.php @@ -57,4 +57,4 @@ } Header("Location: " . $phpgw_info["server"]["webserver_url"] . "/login.php?cd=1"); -?> +?> \ No newline at end of file
">">">">">">">">">">">">">">
link("email/") . "\"> " - . lang_common("You have 1 new message!") . "
link("email/") . "\"> " - . lang_common("You have x new messages!",$mailbox_status->unseen) . "
" . lang_common("Today is x's birthday!", $phpgw->db->f("firstname") . " " + echo "
" . lang("Today is x's birthday!", $phpgw->db->f("firstname") . " " . $phpgw->db->f("lastname")) . "
" . lang_common("Tommorow is x's birthday.", $phpgw->db->f("firstname") . " " + echo "
" . lang("Tommorow is x's birthday.", $phpgw->db->f("firstname") . " " . $phpgw->db->f("lastname")) . "
" . lang_common($key,$check) . "
" . lang($key,$check) . "