Multi-langugae support

This commit is contained in:
bergware
2020-05-21 14:04:47 +02:00
parent 6adca24e99
commit 102e56969f
3 changed files with 7 additions and 7 deletions

View File

@@ -14,13 +14,11 @@ Tag="user"
* all copies or substantial portions of the Software.
*/
?>
<?
$void = "<img src=\"/webGui/images/user.png\" width=\"48\" height=\"48\" onclick=\"$(&apos;#drop&apos;).click()\" style=\"cursor:pointer\" title=\"_(Click to select PNG file)_\">";
$icon = "<i class=\"fa fa-trash top\" title=\"_(Restore default image)_\" onclick=\"restore()\"></i>";
$void = "<img src='/webGui/images/user.png' width='48' height='48' onclick='$(\"#\").click()' style='cursor:pointer' title='".my_lang('Click to select PNG file',4)."'>";
$icon = "<i class='fa fa-trash top' title='".my_lang('Restore default image',4)."' onclick='restore()'></i>";
$zxcvbn = file_exists('/boot/config/plugins/dynamix/zxcvbn.js');
?>
<style>
<?if ($display['theme']=='gray'):?>
span#dropbox{border:1px solid #606E7F;border-radius:5px;background:#121510;padding:28px 12px;line-height:72px;margin-right:16px}

View File

@@ -21,12 +21,11 @@ Tag="user"
<?endif;?>
<?
$user = "/boot/config/plugins/dynamix/users/$name.png";
$void = "<img src=\"/webGui/images/user.png\" width=\"48\" height=\"48\" id=\"image\" onclick=\"$(&apos;#drop&apos;).click()\" style=\"cursor:pointer\" title=\"_(Click to select PNG file)_\">";
$icon = "<i class=\"fa fa-trash top\" title=\"_(Restore default image)_\" onclick=\"restore()\"></i>";
$void = "<img src='/webGui/images/user.png' width='48' height='48' id='image' onclick='$(\"#\").click()' style='cursor:pointer' title='".my_lang('Click to select PNG file',4)."'>";
$icon = "<i class='fa fa-trash top' title='".my_lang('Restore default image',4)."' onclick='restore()'></i>";
$zxcvbn = file_exists('/boot/config/plugins/dynamix/zxcvbn.js');
?>
<style>
<?if ($display['theme']=='gray'):?>
span#dropbox{border:1px solid #606E7F;border-radius:5px;background:#121510;padding:28px 12px;line-height:72px;margin-right:16px}

View File

@@ -60,6 +60,9 @@ function my_lang($text,$do=0) {
[$p1,$p2] = preg_split('/(?<=[a-z])(?= ?[0-9]+)/i',$text);
$text = _($p1).$p2;
break;
case 4: // replace apostrophes
$text = str_replace("'", '&apos;', _($text));
break;
}
return $text;
}