mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
system: move development languages to development flag instead
This avoids carrying a diff between master and respective stable.
This commit is contained in:
parent
cf4f47d91f
commit
ea92afafc5
@ -59,6 +59,10 @@ final class product
|
||||
} else {
|
||||
self::$data['product_booting'] = false;
|
||||
}
|
||||
|
||||
/* development flag */
|
||||
$develflag = '/var/run/development';
|
||||
self::$data['product_development'] = file_exists($develflag);
|
||||
}
|
||||
|
||||
private function __clone()
|
||||
|
||||
@ -242,7 +242,7 @@ function system_resolvconf_generate($verbose = false)
|
||||
|
||||
function get_locale_list()
|
||||
{
|
||||
$locales = array();
|
||||
$locales = [];
|
||||
|
||||
/* first one is the default */
|
||||
$locales['en_US'] = gettext('English');
|
||||
@ -254,13 +254,18 @@ function get_locale_list()
|
||||
$locales['ja_JP'] = gettext('Japanese');
|
||||
$locales['ko_KR'] = gettext('Korean');
|
||||
$locales['no_NO'] = gettext('Norwegian');
|
||||
$locales['pl_PL'] = gettext('Polish'); /* development only */
|
||||
$locales['pl_PL'] = gettext('Polish');
|
||||
$locales['pt_BR'] = gettext('Portuguese (Brazil)');
|
||||
$locales['pt_PT'] = gettext('Portuguese (Portugal)');
|
||||
$locales['ru_RU'] = gettext('Russian');
|
||||
$locales['es_ES'] = gettext('Spanish');
|
||||
$locales['tr_TR'] = gettext('Turkish');
|
||||
$locales['vi_VN'] = gettext('Vietnamese'); /* development only */
|
||||
$locales['vi_VN'] = gettext('Vietnamese');
|
||||
|
||||
if (!product::getInstance()->development()) {
|
||||
unset($locales['pl_PL']);
|
||||
unset($locales['vi_VN']);
|
||||
}
|
||||
|
||||
return $locales;
|
||||
}
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* check before 'product' class is known to catch all errors */
|
||||
if (file_exists('/var/run/development')) {
|
||||
ini_set('display_errors', 0);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user