Multi-language support

This commit is contained in:
bergware
2020-04-02 08:44:52 +02:00
parent 29327b00f4
commit 646c635813
3 changed files with 4 additions and 4 deletions
@@ -38,7 +38,7 @@ function make_link($method, $arg, $extra='') {
$cmd = "/plugins/dynamix.plugin.manager/scripts/plugin&arg1=$method&arg2=$arg".($extra?"&arg3=$extra":"");
$exec = "loadlist";
}
return "$check<input type='button' id='$id' value='".ucfirst(_($method))."' onclick='openBox(\"$cmd\",\"".ucwords(_($method))." Plugin\",600,900,true,\"$exec\",\"$plg\");'$disabled>";
return "$check<input type='button' id='$id' value='".ucfirst($method)."' onclick='openBox(\"$cmd\",\"".ucwords($method)." Plugin\",600,900,true,\"$exec\",\"$plg\");'$disabled>";
}
// trying our best to find an icon
@@ -35,6 +35,6 @@ $tmp = $_GET['tmp'] ? '/var/tmp' : '/tmp/plugins/';
if (file_exists($file) && strpos(realpath($file),$tmp)===0 && substr($file,-4)=='.txt') echo Markdown(file_get_contents($file)); else echo Markdown("*"._('No release notes available')."!*");
?>
<br><div style="text-align:center"><input type="button" value="_(Done)_" onclick="top.Shadowbox.close()"></div>
<br><div style="text-align:center"><input type="button" value="<?=_('Done')?>" onclick="top.Shadowbox.close()"></div>
</body>
</html>
@@ -138,7 +138,7 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
if ($changes !== false) {
$txtfile = "/tmp/plugins/".basename($plugin_file,'.plg').".txt";
file_put_contents($txtfile,$changes);
$version .= "&nbsp;<a href='#' title='View Release Notes' onclick=\"openBox('/plugins/dynamix.plugin.manager/include/ShowChanges.php?file=".urlencode($txtfile)."','Release Notes',600,900); return false\"><span class='fa fa-info-circle fa-fw big blue-text'></span></a>";
$version .= "&nbsp;<a href='#' title='"._('View Release Notes')."' onclick=\"openBox('/plugins/dynamix.plugin.manager/include/ShowChanges.php?file=".urlencode($txtfile)."','"._('Release Notes')."',600,900); return false\"><span class='fa fa-info-circle fa-fw big blue-text'></span></a>";
}
//write plugin information
$empty = false;
@@ -164,6 +164,6 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
//remove temporary symlink
@unlink("/var/log/plugins/$tmp_plg");
}
if ($empty) echo "<tr><td colspan='6' style='text-align:center;padding-top:12px'><i class='fa fa-check-square-o icon'></i> No plugins installed</td><tr>";
if ($empty) echo "<tr><td colspan='6' style='text-align:center;padding-top:12px'><i class='fa fa-check-square-o icon'></i> "._('No plugins installed')."</td><tr>";
echo "\0".$updates;
?>