diff --git a/onebuttoninstaller/ext/onebuttoninstaller-config.php b/onebuttoninstaller/ext/onebuttoninstaller-config.php index 345037f..6e1c505 100644 --- a/onebuttoninstaller/ext/onebuttoninstaller-config.php +++ b/onebuttoninstaller/ext/onebuttoninstaller-config.php @@ -37,6 +37,7 @@ $dummy = gettext("The changes have been applied successfully."); $dummy = gettext("The configuration has been changed.
You must apply the changes in order for them to take effect."); $dummy = gettext("The following input errors were detected"); +bindtextdomain("nas4free", "/usr/local/share/locale-obi"); $pgtitle = array(gettext("Extensions"), gettext("OneButtonInstaller")." ".$config['onebuttoninstaller']['version'], gettext("Configuration")); if (!isset($config['onebuttoninstaller']) || !is_array($config['onebuttoninstaller'])) $config['onebuttoninstaller'] = array(); @@ -92,7 +93,9 @@ $pconfig['enable'] = isset($config['onebuttoninstaller']['enable']) ? true : fal $pconfig['storage_path'] = !empty($config['onebuttoninstaller']['storage_path']) ? $config['onebuttoninstaller']['storage_path'] : $g['media_path']; $pconfig['auto_update'] = isset($config['onebuttoninstaller']['auto_update']) ? true : false; -include("fbegin.inc");?> +bindtextdomain("nas4free", "/usr/local/share/locale"); // to get the right main menu language +include("fbegin.inc"); +bindtextdomain("nas4free", "/usr/local/share/locale-obi"); ?> diff --git a/onebuttoninstaller/ext/onebuttoninstaller.php b/onebuttoninstaller/ext/onebuttoninstaller.php index ed0bfff..4c690de 100644 --- a/onebuttoninstaller/ext/onebuttoninstaller.php +++ b/onebuttoninstaller/ext/onebuttoninstaller.php @@ -33,6 +33,7 @@ require("auth.inc"); require("guiconfig.inc"); if (!isset($config['onebuttoninstaller']['enable'])) header("Location:onebuttoninstaller-config.php"); +bindtextdomain("nas4free", "/usr/local/share/locale-obi"); $pgtitle = array(gettext("Extensions"), gettext("OneButtonInstaller")." ".$config['onebuttoninstaller']['version']); $log = 0; @@ -167,7 +168,9 @@ if (isset($_POST['update']) || (isset($config['onebuttoninstaller']['auto_update if (!is_file("{$config['onebuttoninstaller']['rootfolder']}extensions.txt")) $errormsg .= sprintf(gettext("File %s not found!"), "{$config['onebuttoninstaller']['rootfolder']}extensions.txt")."
"; -include("fbegin.inc");?> +bindtextdomain("nas4free", "/usr/local/share/locale"); // to get the right main menu language +include("fbegin.inc"); +bindtextdomain("nas4free", "/usr/local/share/locale-obi"); ?> diff --git a/onebuttoninstaller/locale-obi/de/LC_MESSAGES/nas4free.mo b/onebuttoninstaller/locale-obi/de/LC_MESSAGES/nas4free.mo new file mode 100644 index 0000000..24f6562 Binary files /dev/null and b/onebuttoninstaller/locale-obi/de/LC_MESSAGES/nas4free.mo differ diff --git a/onebuttoninstaller/locale-obi/el/LC_MESSAGES/nas4free.mo b/onebuttoninstaller/locale-obi/el/LC_MESSAGES/nas4free.mo new file mode 100644 index 0000000..717fb16 Binary files /dev/null and b/onebuttoninstaller/locale-obi/el/LC_MESSAGES/nas4free.mo differ diff --git a/onebuttoninstaller/locale-obi/es/LC_MESSAGES/nas4free.mo b/onebuttoninstaller/locale-obi/es/LC_MESSAGES/nas4free.mo new file mode 100644 index 0000000..20f1367 Binary files /dev/null and b/onebuttoninstaller/locale-obi/es/LC_MESSAGES/nas4free.mo differ diff --git a/onebuttoninstaller/locale-obi/fr/LC_MESSAGES/nas4free.mo b/onebuttoninstaller/locale-obi/fr/LC_MESSAGES/nas4free.mo new file mode 100644 index 0000000..3e8500a Binary files /dev/null and b/onebuttoninstaller/locale-obi/fr/LC_MESSAGES/nas4free.mo differ diff --git a/onebuttoninstaller/locale-obi/it/LC_MESSAGES/nas4free.mo b/onebuttoninstaller/locale-obi/it/LC_MESSAGES/nas4free.mo new file mode 100644 index 0000000..923684a Binary files /dev/null and b/onebuttoninstaller/locale-obi/it/LC_MESSAGES/nas4free.mo differ diff --git a/onebuttoninstaller/locale-obi/ru/LC_MESSAGES/nas4free.mo b/onebuttoninstaller/locale-obi/ru/LC_MESSAGES/nas4free.mo new file mode 100644 index 0000000..709552a Binary files /dev/null and b/onebuttoninstaller/locale-obi/ru/LC_MESSAGES/nas4free.mo differ diff --git a/onebuttoninstaller/onebuttoninstaller-install.php b/onebuttoninstaller/onebuttoninstaller-install.php index 1fc032a..c7938fb 100644 --- a/onebuttoninstaller/onebuttoninstaller-install.php +++ b/onebuttoninstaller/onebuttoninstaller-install.php @@ -31,6 +31,7 @@ */ /* Version Date Description +0.1-b3 2016.02.06 N: add language support 0.1-b2 2016.02.02 N: check for supported architecture, plattform N: auto update of extensions list 0.1-b1 2016.01.28 real install/update from GitHub @@ -40,7 +41,7 @@ Version Date Description 0.1-a1 2016.01.16 initial release */ -$v = "v0.1-b2"; // extension version +$v = "v0.1-b3"; // extension version $appname = "OneButtonInstaller"; require_once("config.inc"); diff --git a/onebuttoninstaller/onebuttoninstaller-start.php b/onebuttoninstaller/onebuttoninstaller-start.php index 7c62121..2ae4270 100644 --- a/onebuttoninstaller/onebuttoninstaller-start.php +++ b/onebuttoninstaller/onebuttoninstaller-start.php @@ -30,6 +30,8 @@ either expressed or implied, of the FreeBSD Project. */ $extension_dir = "/usr/local/www"; + +if ( !is_link ( "/usr/local/share/locale-obi")) { mwexec("ln -s {$config['onebuttoninstaller']['rootfolder']}locale-obi /usr/local/share/", true); } // create link to languages $return_val = mwexec("cp -R {$config['onebuttoninstaller']['rootfolder']}ext/* {$extension_dir}/", true); if ($return_val == 0) exec("logger onebuttoninstaller: started"); else exec("logger onebuttoninstaller: error during startup, not started"); diff --git a/onebuttoninstaller/release_notes.txt b/onebuttoninstaller/release_notes.txt index 24e787c..df5bf49 100644 --- a/onebuttoninstaller/release_notes.txt +++ b/onebuttoninstaller/release_notes.txt @@ -1,4 +1,5 @@ Version Date Description +0.1-b3 2016.02.06 N: add language support 0.1-b2 2016.02.01 N: check for supported architecture, plattform N: auto update of extensions list 0.1-b1 2016.01.29 beta release diff --git a/onebuttoninstaller/version.txt b/onebuttoninstaller/version.txt index 98f9ee3..743861d 100644 --- a/onebuttoninstaller/version.txt +++ b/onebuttoninstaller/version.txt @@ -1 +1 @@ -0.1-b2 +0.1-b3 diff --git a/onebuttoninstaller_install.php b/onebuttoninstaller_install.php index 9117070..af7ba25 100644 --- a/onebuttoninstaller_install.php +++ b/onebuttoninstaller_install.php @@ -7,8 +7,6 @@ $release = explode("-", exec("uname -r")); if ($release[0] >= 9.3) $verify_hostname = "--no-verify-hostname"; else $verify_hostname = ""; -$install_dir = dirname(__FILE__)."/"; // get directory where the installer script resides -if (!is_dir("{$install_dir}onebuttoninstaller/log")) { mkdir("{$install_dir}onebuttoninstaller/log", 0775, true); } $return_val = mwexec("fetch {$verify_hostname} -vo onebuttoninstaller/onebuttoninstaller-install.php 'https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/onebuttoninstaller-install.php'", true); if ($return_val == 0) { chmod("onebuttoninstaller/onebuttoninstaller-install.php", 0775);