mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
fix redundant error logs: can not get any translations
This commit is contained in:
@@ -607,10 +607,9 @@ function nexus_trans($key, $replace = [], $locale = null)
|
||||
$getKey = $locale . "." . $key;
|
||||
$result = arr_get($translations, $getKey);
|
||||
if (empty($result) && $locale != 'en') {
|
||||
do_log("original getKey: $getKey can not get any translations", 'error');
|
||||
$getKey = "en." . $key;
|
||||
$result = arr_get($translations, $getKey);
|
||||
} else {
|
||||
do_log("original getKey: $getKey can not get any translations", 'error');
|
||||
}
|
||||
if (!empty($replace)) {
|
||||
$search = array_map(function ($value) {return ":$value";}, array_keys($replace));
|
||||
|
||||
Reference in New Issue
Block a user