Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing the rest of the 'cake' domain.

These string should all be part of the app POT files.
Fixes #2103
  • Loading branch information...
commit 7c70b371bf5e1c67099cbbc00fdec3ae60cebcb2 1 parent edfb088
@markstory markstory authored
View
2  lib/Cake/View/Helper/NumberHelper.php
@@ -84,7 +84,7 @@ public function precision($number, $precision = 3) {
public function toReadableSize($size) {
switch (true) {
case $size < 1024:
- return __dn('cake', '%d Byte', '%d Bytes', $size, $size);
+ return __dn('%d Byte', '%d Bytes', $size, $size);
case round($size / 1024) < 1024:
return __('%d KB', $this->precision($size / 1024, 0));
case round($size / 1024 / 1024, 2) < 1024:
View
48 lib/Cake/View/Helper/TimeHelper.php
@@ -80,19 +80,19 @@ public function convertSpecifiers($format, $time = null) {
protected function _translateSpecifier($specifier) {
switch ($specifier[1]) {
case 'a':
- $abday = __dc('cake', 'abday', 5);
+ $abday = __dc('abday', 5);
if (is_array($abday)) {
return $abday[date('w', $this->__time)];
}
break;
case 'A':
- $day = __dc('cake', 'day', 5);
+ $day = __dc('day', 5);
if (is_array($day)) {
return $day[date('w', $this->__time)];
}
break;
case 'c':
- $format = __dc('cake', 'd_t_fmt', 5);
+ $format = __dc('d_t_fmt', 5);
if ($format != 'd_t_fmt') {
return $this->convertSpecifiers($format, $this->__time);
}
@@ -114,13 +114,13 @@ protected function _translateSpecifier($specifier) {
return date('jS', $this->__time);
case 'b':
case 'h':
- $months = __dc('cake', 'abmon', 5);
+ $months = __dc('abmon', 5);
if (is_array($months)) {
return $months[date('n', $this->__time) -1];
}
return '%b';
case 'B':
- $months = __dc('cake', 'mon', 5);
+ $months = __dc('mon', 5);
if (is_array($months)) {
return $months[date('n', $this->__time) -1];
}
@@ -131,14 +131,14 @@ protected function _translateSpecifier($specifier) {
case 'P':
$default = array('am' => 0, 'pm' => 1);
$meridiem = $default[date('a',$this->__time)];
- $format = __dc('cake', 'am_pm', 5);
+ $format = __dc('am_pm', 5);
if (is_array($format)) {
$meridiem = $format[$meridiem];
return ($specifier[1] == 'P') ? strtolower($meridiem) : strtoupper($meridiem);
}
break;
case 'r':
- $complete = __dc('cake', 't_fmt_ampm', 5);
+ $complete = __dc('t_fmt_ampm', 5);
if ($complete != 't_fmt_ampm') {
return str_replace('%p',$this->_translateSpecifier(array('%p', 'p')),$complete);
}
@@ -152,13 +152,13 @@ protected function _translateSpecifier($specifier) {
case 'u':
return ($weekDay = date('w', $this->__time)) ? $weekDay : 7;
case 'x':
- $format = __dc('cake', 'd_fmt', 5);
+ $format = __dc('d_fmt', 5);
if ($format != 'd_fmt') {
return $this->convertSpecifiers($format, $this->__time);
}
break;
case 'X':
- $format = __dc('cake', 't_fmt', 5);
+ $format = __dc('t_fmt', 5);
if ($format != 't_fmt') {
return $this->convertSpecifiers($format, $this->__time);
}
@@ -613,33 +613,33 @@ public function timeAgoInWords($dateTime, $options = array()) {
} else {
if ($years > 0) {
// years and months and days
- $relativeDate .= ($relativeDate ? ', ' : '') . __dn('cake', '%d year', '%d years', $years, $years);
- $relativeDate .= $months > 0 ? ($relativeDate ? ', ' : '') . __dn('cake', '%d month', '%d months', $months, $months) : '';
- $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . __dn('cake', '%d week', '%d weeks', $weeks, $weeks) : '';
- $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . __dn('cake', '%d day', '%d days', $days, $days) : '';
+ $relativeDate .= ($relativeDate ? ', ' : '') . __dn('%d year', '%d years', $years, $years);
+ $relativeDate .= $months > 0 ? ($relativeDate ? ', ' : '') . __dn('%d month', '%d months', $months, $months) : '';
+ $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . __dn('%d week', '%d weeks', $weeks, $weeks) : '';
+ $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . __dn('%d day', '%d days', $days, $days) : '';
} elseif (abs($months) > 0) {
// months, weeks and days
- $relativeDate .= ($relativeDate ? ', ' : '') . __dn('cake', '%d month', '%d months', $months, $months);
- $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . __dn('cake', '%d week', '%d weeks', $weeks, $weeks) : '';
- $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . __dn('cake', '%d day', '%d days', $days, $days) : '';
+ $relativeDate .= ($relativeDate ? ', ' : '') . __dn('%d month', '%d months', $months, $months);
+ $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . __dn('%d week', '%d weeks', $weeks, $weeks) : '';
+ $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . __dn('%d day', '%d days', $days, $days) : '';
} elseif (abs($weeks) > 0) {
// weeks and days
- $relativeDate .= ($relativeDate ? ', ' : '') . __dn('cake', '%d week', '%d weeks', $weeks, $weeks);
- $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . __dn('cake', '%d day', '%d days', $days, $days) : '';
+ $relativeDate .= ($relativeDate ? ', ' : '') . __dn('%d week', '%d weeks', $weeks, $weeks);
+ $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . __dn('%d day', '%d days', $days, $days) : '';
} elseif (abs($days) > 0) {
// days and hours
- $relativeDate .= ($relativeDate ? ', ' : '') . __dn('cake', '%d day', '%d days', $days, $days);
- $relativeDate .= $hours > 0 ? ($relativeDate ? ', ' : '') . __dn('cake', '%d hour', '%d hours', $hours, $hours) : '';
+ $relativeDate .= ($relativeDate ? ', ' : '') . __dn('%d day', '%d days', $days, $days);
+ $relativeDate .= $hours > 0 ? ($relativeDate ? ', ' : '') . __dn('%d hour', '%d hours', $hours, $hours) : '';
} elseif (abs($hours) > 0) {
// hours and minutes
- $relativeDate .= ($relativeDate ? ', ' : '') . __dn('cake', '%d hour', '%d hours', $hours, $hours);
- $relativeDate .= $minutes > 0 ? ($relativeDate ? ', ' : '') . __dn('cake', '%d minute', '%d minutes', $minutes, $minutes) : '';
+ $relativeDate .= ($relativeDate ? ', ' : '') . __dn('%d hour', '%d hours', $hours, $hours);
+ $relativeDate .= $minutes > 0 ? ($relativeDate ? ', ' : '') . __dn('%d minute', '%d minutes', $minutes, $minutes) : '';
} elseif (abs($minutes) > 0) {
// minutes only
- $relativeDate .= ($relativeDate ? ', ' : '') . __dn('cake', '%d minute', '%d minutes', $minutes, $minutes);
+ $relativeDate .= ($relativeDate ? ', ' : '') . __dn('%d minute', '%d minutes', $minutes, $minutes);
} else {
// seconds only
- $relativeDate .= ($relativeDate ? ', ' : '') . __dn('cake', '%d second', '%d seconds', $seconds, $seconds);
+ $relativeDate .= ($relativeDate ? ', ' : '') . __dn('%d second', '%d seconds', $seconds, $seconds);
}
if (!$backwards) {

1 comment on commit 7c70b37

@markstory
Owner

Yeah I'm an idiot. It broke a pile of tests, and I forgot a pile of view files too :(

Please sign in to comment.
Something went wrong with that request. Please try again.