From 9958d8da9f9ae40cd197c5aae80a4464eab36d52 Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 15 Nov 2012 13:49:44 -0500 Subject: [PATCH] CC-1960: Internationalize Airtime / Support translations -added gettext wrapper function to all strings in layout, and common --- airtime_mvc/application/common/DateHelper.php | 6 +++--- airtime_mvc/application/layouts/scripts/login.phtml | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/common/DateHelper.php b/airtime_mvc/application/common/DateHelper.php index c13543d8e..123189231 100644 --- a/airtime_mvc/application/common/DateHelper.php +++ b/airtime_mvc/application/common/DateHelper.php @@ -332,10 +332,10 @@ class Application_Common_DateHelper // if year is < 1753 or > 9999 it's out of range if ($year < 1753) { $retVal['success'] = false; - $retVal['errMsg'] = "The year '$year' must be within the range of 1753 - 9999"; + $retVal['errMsg'] = sprintf(_("The year %s must be within the range of 1753 - 9999"), $year); } else if (!checkdate($month, $day, $year)) { $retVal['success'] = false; - $retVal['errMsg'] = "'$year-$month-$day' is not a valid date"; + $retVal['errMsg'] = sprintf(_("%s-%s-%s is not a valid date"), $year, $month, $day); } else { // check time if (isset($timeInfo)) { @@ -359,7 +359,7 @@ class Application_Common_DateHelper if ( ($hour < 0 || $hour > 23) || ($min < 0 || $min > 59) || ($sec < 0 || $sec > 59) ) { $retVal['success'] = false; - $retVal['errMsg'] = "'$timeInfo[0]:$timeInfo[1]:$timeInfo[2]' is not a valid time"; + $retVal['errMsg'] = sprintf(_("%s:%s:%s is not a valid time"), $timeInfo[0], $timeInfo[1] ,$timeInfo[2]); } } } diff --git a/airtime_mvc/application/layouts/scripts/login.phtml b/airtime_mvc/application/layouts/scripts/login.phtml index 42389f11a..966226700 100644 --- a/airtime_mvc/application/layouts/scripts/login.phtml +++ b/airtime_mvc/application/layouts/scripts/login.phtml @@ -13,8 +13,9 @@ layout()->content ?>