From 79c7a20dadca0dae5c76d16b1307e18605d7566a Mon Sep 17 00:00:00 2001 From: XY0797 <98995022+XY0797@users.noreply.github.com> Date: Mon, 27 Jan 2025 14:46:55 +0800 Subject: [PATCH] Update the language loading logic in shell.ns When there is a missing translation item, it will no longer be displayed as blank, but as English --- src/bin/shell.nss | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bin/shell.nss b/src/bin/shell.nss index 961c68e..8ddaaca 100644 --- a/src/bin/shell.nss +++ b/src/bin/shell.nss @@ -10,9 +10,10 @@ // localization $loc_path='imports\lang\' -import lang if(path.exists(loc_path + sys.lang + ".nss"), - loc_path + sys.lang + ".nss", - loc_path + "\\en.nss") +import lang loc_path + "en.nss" +import lang if(path.exists(loc_path + sys.lang + ".nss"), + loc_path + sys.lang + ".nss", + loc_path + "en.nss") // or import lang 'imports/lang/en.nss'