fixed translation for permission names
This commit is contained in:
parent
c9705aa99c
commit
bfb655fe54
|
@ -88,6 +88,26 @@
|
|||
return $ucRes->get('clusters');
|
||||
}));
|
||||
|
||||
$twig->addFilter(new \Twig_Filter('translate', function($word, $lang){
|
||||
$word = strtolower($word);
|
||||
|
||||
|
||||
if( $lang === 'fr' ){
|
||||
|
||||
switch($word){
|
||||
case 'start': return 'démarrer'; break;
|
||||
case 'stop': return 'arrêter'; break;
|
||||
case 'signal': return 'signaler'; break;
|
||||
case 'lock': return 'bloquer'; break;
|
||||
case 'unlock': return 'débloquer'; break;
|
||||
|
||||
default: return 'inconnu'; break;
|
||||
}
|
||||
}else
|
||||
return 'inconnu';
|
||||
|
||||
}));
|
||||
|
||||
|
||||
/* [4] Build the whole stuff
|
||||
=========================================================*/
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<span class='groups'>
|
||||
<span style='border-color: #ddd; background-color: #eee;'>
|
||||
{{ permission.name }}
|
||||
{{ permission.name | translate('fr') }}
|
||||
<span class='icon-permission'></span>
|
||||
</span>
|
||||
|
||||
|
|
Loading…
Reference in New Issue