|
@@ -340,7 +340,9 @@ class FormatHelper extends TextHelper {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * Quick way of printing default icons
|
|
|
|
|
|
|
+ * Quick way of printing default icons.
|
|
|
|
|
+ *
|
|
|
|
|
+ * I18n will be done using default domain.
|
|
|
*
|
|
*
|
|
|
* @todo refactor to $type, $options, $attributes
|
|
* @todo refactor to $type, $options, $attributes
|
|
|
*
|
|
*
|
|
@@ -370,8 +372,8 @@ class FormatHelper extends TextHelper {
|
|
|
$title = (isset($title) ? $title : $this->icons[$type]['title']);
|
|
$title = (isset($title) ? $title : $this->icons[$type]['title']);
|
|
|
$alt = (isset($alt) ? $alt : preg_replace('/[^a-zA-Z0-9]/', '', $this->icons[$type]['title']));
|
|
$alt = (isset($alt) ? $alt : preg_replace('/[^a-zA-Z0-9]/', '', $this->icons[$type]['title']));
|
|
|
if ($translate !== false) {
|
|
if ($translate !== false) {
|
|
|
- $title = __d('tools', $title);
|
|
|
|
|
- $alt = __d('tools', $alt);
|
|
|
|
|
|
|
+ $title = __($title);
|
|
|
|
|
+ $alt = __($alt);
|
|
|
}
|
|
}
|
|
|
$alt = '[' . $alt . ']';
|
|
$alt = '[' . $alt . ']';
|
|
|
} else {
|
|
} else {
|
|
@@ -391,6 +393,8 @@ class FormatHelper extends TextHelper {
|
|
|
/**
|
|
/**
|
|
|
* Custom Icons
|
|
* Custom Icons
|
|
|
*
|
|
*
|
|
|
|
|
+ * I18n will be done using default domain.
|
|
|
|
|
+ *
|
|
|
* @param string $icon (constant or filename)
|
|
* @param string $icon (constant or filename)
|
|
|
* @param array $options:
|
|
* @param array $options:
|
|
|
* - translate, ...
|
|
* - translate, ...
|
|
@@ -413,8 +417,8 @@ class FormatHelper extends TextHelper {
|
|
|
$title = isset($t) ? $t : ucfirst($type);
|
|
$title = isset($t) ? $t : ucfirst($type);
|
|
|
$alt = (isset($a) ? $a : Inflector::slug($title, '-'));
|
|
$alt = (isset($a) ? $a : Inflector::slug($title, '-'));
|
|
|
if ($translate !== false) {
|
|
if ($translate !== false) {
|
|
|
- $title = __d('tools', $title);
|
|
|
|
|
- $alt = __d('tools', $alt);
|
|
|
|
|
|
|
+ $title = __($title);
|
|
|
|
|
+ $alt = __($alt);
|
|
|
}
|
|
}
|
|
|
$alt = '[' . $alt . ']';
|
|
$alt = '[' . $alt . ']';
|
|
|
|
|
|
|
@@ -434,6 +438,8 @@ class FormatHelper extends TextHelper {
|
|
|
/**
|
|
/**
|
|
|
* FormatHelper::_fontIcon()
|
|
* FormatHelper::_fontIcon()
|
|
|
*
|
|
*
|
|
|
|
|
+ * I18n will be done using default domain.
|
|
|
|
|
+ *
|
|
|
* @param string $type
|
|
* @param string $type
|
|
|
* @param array $options
|
|
* @param array $options
|
|
|
* @return string
|
|
* @return string
|
|
@@ -449,7 +455,7 @@ class FormatHelper extends TextHelper {
|
|
|
if (!isset($options['title'])) {
|
|
if (!isset($options['title'])) {
|
|
|
$options['title'] = ucfirst($type);
|
|
$options['title'] = ucfirst($type);
|
|
|
if ($options['translate'] !== false) {
|
|
if ($options['translate'] !== false) {
|
|
|
- $options['title'] = __d('tools', $options['title']);
|
|
|
|
|
|
|
+ $options['title'] = __($options['title']);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|