From f56fa1fc50484d99906a0a22e2931f9c1fe708b6 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 24 Nov 2011 16:54:42 +0000 Subject: improved i18n --- h-source/Application/Include/languages.php | 17 +++++++++++++++++ h-source/Application/Include/myFunctions.php | 25 ++++++++++++++++++------- h-source/Application/Views/Wiki/differences.php | 4 ++-- h-source/Application/Views/Wiki/form.php | 4 ++-- h-source/Application/Views/Wiki/history.php | 4 ++-- h-source/Application/Views/Wiki/page.php | 6 +++--- h-source/Application/Views/Wiki/talk.php | 10 +++++----- h-source/Application/Views/talk.php | 10 +++++----- 8 files changed, 54 insertions(+), 26 deletions(-) diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 8429aa0..cbaf6bb 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -317,6 +317,23 @@ class Lang /*0269*/"Download the xml file of all the modems in the database" => "Scarica il file xml di tutti i modem presenti nel database", /*0270*/"Modems and ADSL cards" => "Modem e schede ADSL", /*0271*/"Table of contents" => "Indice dei contenuti", + /*0272*/"by" => "da", + /*0273*/"Add a message" => "Aggiungi un messaggio", + /*0274*/"Save" => "Salva", + /*0275*/"Revision of the wiki page" => "Revisione della pagina della wiki", + /*0276*/"Preview" => "Anteprima", + /*0277*/"January" => "gennaio", + /*0278*/"February" => "febbraio", + /*0279*/"March" => "marzo", + /*0280*/"April" => "aprile", + /*0281*/"May" => "maggio", + /*0282*/"June" => "giugno", + /*0283*/"July" => "luglio", + /*0284*/"August" => "agosto", + /*0285*/"September" => "settembre", + /*0286*/"October" => "ottobre", + /*0287*/"November" => "novembre", + /*0288*/"December" => "dicembre", ), 'es' => array ( diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index 8c757e7..bb7aa5f 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -73,15 +73,26 @@ function titleForRedirect($title) function smartDate($uglyDate = null, $lang = 'en') { - switch ($lang) + if (strcmp($lang,'en')) { - case 'en': - $smDate = date('H:i, d F Y',strtotime($uglyDate)); - break; - default: - $smDate = date('H:i, d F Y',strtotime($uglyDate)); + return date('H:i, j F Y',strtotime($uglyDate)); } - return $smDate; + else + { + return date('H:i, j ',strtotime($uglyDate)).gtext(date('F',strtotime($uglyDate))).date(' Y',strtotime($uglyDate)); + } +// switch ($lang) +// { +// case 'en': +// $smDate = date('H:i, d F Y',strtotime($uglyDate)); +// break; +// case 'it': +// $smDate = date('H:i, d F Y',strtotime($uglyDate)); +// break; +// default: +// $smDate = date('H:i, d F Y',strtotime($uglyDate)).date(' F ',strtotime($uglyDate)).date('Y',strtotime($uglyDate)); +// } +// return $smDate; } function pubDateFormat($uglyDate = null) diff --git a/h-source/Application/Views/Wiki/differences.php b/h-source/Application/Views/Wiki/differences.php index ee7a795..9c06714 100644 --- a/h-source/Application/Views/Wiki/differences.php +++ b/h-source/Application/Views/Wiki/differences.php @@ -30,7 +30,7 @@
- Differences between the revision of , created by getUser($created_by));?>, and the revision of + , getUser($created_by));?>,
@@ -41,7 +41,7 @@
- Notice: the text in red has been deleted from the previous revision, the text in green has been added in this revision and the text in gray has not been changed. + Notice: the text in red has been deleted from the previous revision, the text in green has been added in this revision and the text in gray has not been changed.");?>
$text) { ?> diff --git a/h-source/Application/Views/Wiki/form.php b/h-source/Application/Views/Wiki/form.php index 12d84d1..38a88c4 100644 --- a/h-source/Application/Views/Wiki/form.php +++ b/h-source/Application/Views/Wiki/form.php @@ -95,8 +95,8 @@ - - + "> + ">
diff --git a/h-source/Application/Views/Wiki/history.php b/h-source/Application/Views/Wiki/history.php index b2e2ab5..e8180f5 100644 --- a/h-source/Application/Views/Wiki/history.php +++ b/h-source/Application/Views/Wiki/history.php @@ -42,14 +42,14 @@ viewArgs['page'] === 1) { ?> -
  • : by getLinkToUserFromId($rev['wiki']['created_by']);?> (controller."/differences/$lang/$id/0".$this->viewStatus;?>">diff)
  • +
  • : getLinkToUserFromId($rev['wiki']['created_by']);?> (controller."/differences/$lang/$id/0".$this->viewStatus;?>">diff)
  • - controller."/revision/$lang/".$rev['wiki_revisions']['id_rev'].$this->viewStatus;?>"> by getLinkToUserFromId($rev['wiki_revisions']['created_by']);?> + controller."/revision/$lang/".$rev['wiki_revisions']['id_rev'].$this->viewStatus;?>"> getLinkToUserFromId($rev['wiki_revisions']['created_by']);?> (controller."/differences/$lang/$id/".$rev['wiki_revisions']['id_rev'].$this->viewStatus;?>">diff) diff --git a/h-source/Application/Views/Wiki/page.php b/h-source/Application/Views/Wiki/page.php index afff4bd..1716edc 100644 --- a/h-source/Application/Views/Wiki/page.php +++ b/h-source/Application/Views/Wiki/page.php @@ -98,7 +98,7 @@ @@ -109,7 +109,7 @@
    - Revision of the wiki page +
    - by getUser($message['wiki_talk']['created_by']));?>, + getUser($message['wiki_talk']['created_by']));?>,
    @@ -126,7 +126,7 @@
    @@ -137,16 +137,16 @@
    - +
    - +
    - + ">
    diff --git a/h-source/Application/Views/talk.php b/h-source/Application/Views/talk.php index 6197e24..4f1e1b2 100644 --- a/h-source/Application/Views/talk.php +++ b/h-source/Application/Views/talk.php @@ -51,7 +51,7 @@
    - by getUser($message['talk']['created_by']));?>, + getUser($message['talk']['created_by']));?>,
    @@ -111,7 +111,7 @@
    @@ -122,16 +122,16 @@
    - +
    - +
    - + ">
    -- cgit v1.2.3