Commit a54c5d1d authored by  JosephK's avatar JosephK

Fix #12

parent f7f9054d
......@@ -17,12 +17,8 @@ function hook_recovery_render_tools($data)
{
$html = file_get_contents(PluginManager::$PLUGINS_PATH .'/recovery/tools.html');
// TODO: use preg_replace() instead
$html = str_replace("{'Change email'|t}", t('Change email'), $html);
$html = str_replace("{'Change your recovery email'|t}", t('Change your recovery email'), $html);
$html = str_replace("{'Close'|t}", t('Close'), $html);
$html = str_replace("{'Email'|t}", t('Courriel'), $html);
$html = str_replace("{'Save config'|t}", t('Save config'), $html);
function translate($matches) { return t($matches[1]); }
$html = preg_replace_callback('/\{\'(.+)\'\|t\}/i', translate, $html );
if (isset ($GLOBALS['config']['email'])) {
$html = str_replace('value=""', 'value="' . htmlentities($GLOBALS['config']['email']) . '"', $html);
......
......@@ -10,17 +10,8 @@ function tags_advanced_config($taData)
$html = file_get_contents(PluginManager::$PLUGINS_PATH .'/tags_advanced/tools.html');
$html = str_replace('{$token}', getToken() , $html);
// TODO: use preg_replace() instead
$html = str_replace("{'Tags advanced'|t}", t('Tags advanced'), $html);
$html = str_replace("{'Close'|t}", t('Close'), $html);
$html = str_replace("{'Order'|t}", t('Order'), $html);
$html = str_replace("{'Name'|t}", t('Name'), $html);
$html = str_replace("{'Icon'|t}", t('Icon'), $html);
$html = str_replace("{'Filter'|t}", t('Filter'), $html);
$html = str_replace("{'Pined?'|t}", t('Pined?'), $html);
$html = str_replace("{'Private?'|t}", t('Private?'), $html);
$html = str_replace("{'Add tag'|t}", t('Add tag'), $html);
$html = str_replace("{'Save'|t}", t('Save'), $html);
function translate($matches) { return t($matches[1]); }
$html = preg_replace_callback('/\{\'(.+)\'\|t\}/i', translate, $html );
if(!isset($taData) || empty($taData)) {
$taData = array(
......
......@@ -15,7 +15,7 @@
<tr>
<th scope="col"><span class="sr-only">{'Order'|t}</span></th>
<th scope="col">{'Name'|t}</th>
<th scope="col" class="text-center hidden">{''|t}Icon</th><!-- Class FontAwesome + color frama.css -->
<th scope="col" class="text-center hidden">{'Icon'|t}</th><!-- Class FontAwesome + color frama.css -->
<th scope="col"><i class="fa fa-fw fa-lg fa-filter"></i>{'Filter'|t}</th>
<th scope="col" class="text-center"><i class="fa fa-fw fa-lg fa-map-pin"></i><span class="sr-only">{'Pined?'|t}</span></th>
<th scope="col" class="text-center"><i class="fa fa-fw fa-lg fa-key text-warning"></i><span class="sr-only">{'Private?'|t}</span></th>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment