CC-1960: Internationalize Airtime / Support translations

-added gettext wrapper function to all strings in layout, and common
This commit is contained in:
denise 2012-11-15 13:49:44 -05:00
parent 8338152876
commit 9958d8da9f
2 changed files with 6 additions and 5 deletions

View File

@ -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]);
}
}
}

View File

@ -13,8 +13,9 @@
<?php echo $this->layout()->content ?>
</div>
<div class="footer">
Airtime&nbsp;Copyright &copy; Sourcefabric o.p.s. All rights reserved.<br/>
Maintained and distributed under GNU GPL v.3 by <a href="http://www.sourcefabric.org"> Sourcefabric o.p.s </a>
<?php echo sprintf(_("Airtime Copyright &copy;Sourcefabric o.p.s. All rights reserved.%s"
."Maintained and distributed under GNU GPL v.3 by %sSourcefabric o.p.s%s"),
"<br>", "<a href='http://www.sourcefabric.org'>" ,"</a>");?>
</div>
</body>