mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
inc: move back a file to avoid spurious firmware update errors
The GUI upgrade still has serious problems coping with the fact that it is being updated. In the latest upgrade the move of set_language() causes an error so we just avoid it and do the work again when we can.
This commit is contained in:
parent
d9a0054b7c
commit
a7dce2b49e
@ -180,6 +180,18 @@ function setup_polling() {
|
||||
set_single_sysctl("kern.polling.user_frac", $config['system']['polling_user_frac']);
|
||||
}
|
||||
|
||||
function set_language($lang)
|
||||
{
|
||||
$lang_encoding = $lang . '.UTF-8';
|
||||
$textdomain = 'OPNsense';
|
||||
|
||||
putenv('LANG=' . $lang_encoding);
|
||||
setlocale(LC_ALL, $lang_encoding);
|
||||
textdomain($textdomain);
|
||||
bindtextdomain($textdomain, '/usr/local/share/locale');
|
||||
bind_textdomain_codeset($textdomain, $lang_encoding);
|
||||
}
|
||||
|
||||
/****f* legacy/setup_microcode
|
||||
* NAME
|
||||
* enumerates all interfaces and calls enable_hardware_offloading which
|
||||
|
||||
@ -66,14 +66,6 @@ if($config['system']['language'] <> "") {
|
||||
$g['language'] = 'en_US';
|
||||
}
|
||||
|
||||
function set_language($lang = 'en_US', $encoding = "UTF-8") {
|
||||
putenv("LANG={$lang}.{$encoding}");
|
||||
setlocale(LC_ALL, "{$lang}.{$encoding}");
|
||||
textdomain("pfSense");
|
||||
bindtextdomain("pfSense","/usr/local/share/locale");
|
||||
bind_textdomain_codeset("pfSense","{$lang}.{$encoding}");
|
||||
}
|
||||
|
||||
set_language($g['language']);
|
||||
|
||||
/* used by progress bar */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user