From bc796d9dde2d2f0393668b63c24c6fcd5e5d2140 Mon Sep 17 00:00:00 2001 From: RossZhu <77894102+54dbd@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:32:30 -0700 Subject: [PATCH 1/2] Complete Simplified Chinese localization and localize remaining hardcoded strings - modify.nss: the Pin/Unpin, file manage and Terminal groups were matched by hardcoded English names, so with a non-English language the items no longer landed in the (localized) menus. Reference the localized titles instead. - taskbar.nss, goto.nss, file-manage.nss, terminal.nss, develop.nss: replace hardcoded English titles and prompts with loc.* keys (taskbar manager menu, user folders, "Type extension" prompt, run-as-administrator tip, dotnet menu). - en.nss: add the new keys as the fallback values; other languages keep falling back to English for keys they do not define yet. - zh-CN.nss: translate the new keys, use the Windows term for "take ownership" and stop translating "About" as "System info". - Fix the "publish sinale file" typo. --- src/bin/imports/develop.nss | 30 ++++++++++----------- src/bin/imports/file-manage.nss | 2 +- src/bin/imports/goto.nss | 18 ++++++------- src/bin/imports/lang/en.nss | 44 ++++++++++++++++++++++++++++++ src/bin/imports/lang/zh-CN.nss | 48 +++++++++++++++++++++++++++++++-- src/bin/imports/modify.nss | 10 +++---- src/bin/imports/taskbar.nss | 12 ++++----- src/bin/imports/terminal.nss | 2 +- 8 files changed, 127 insertions(+), 39 deletions(-) diff --git a/src/bin/imports/develop.nss b/src/bin/imports/develop.nss index bc63402d..9c103e27 100644 --- a/src/bin/imports/develop.nss +++ b/src/bin/imports/develop.nss @@ -1,4 +1,4 @@ -menu(mode="multiple" title=loc.develop sep=sep.bottom image=\uE26E) +menu(mode="multiple" title=loc.develop sep=sep.bottom image=\uE26E) { menu(mode="single" title=loc.editors image=\uE17A) { @@ -9,29 +9,29 @@ menu(mode="multiple" title='dotnet' image=\uE143) { - item(title='run' cmd-line='/K dotnet run' image=\uE149) - item(title='watch' cmd-line='/K dotnet watch') - item(title='clean' image=\uE0CE cmd-line='/K dotnet clean') + item(title=loc.dotnet_run cmd-line='/K dotnet run' image=\uE149) + item(title=loc.dotnet_watch cmd-line='/K dotnet watch') + item(title=loc.dotnet_clean image=\uE0CE cmd-line='/K dotnet clean') separator - item(title='build debug' cmd-line='/K dotnet build') - item(title='build release' cmd-line='/K dotnet build -c release /p:DebugType=None') + item(title=loc.dotnet_build_debug cmd-line='/K dotnet build') + item(title=loc.dotnet_build_release cmd-line='/K dotnet build -c release /p:DebugType=None') - menu(mode="multiple" sep="both" title='publish' image=\ue11f) + menu(mode="multiple" sep="both" title=loc.dotnet_publish image=\ue11f) { $publish='dotnet publish -r win-x64 -c release --output publish /*/p:CopyOutputSymbolsToPublishDirectory=false*/' - item(title='publish sinale file' sep="after" cmd-line='/K @publish --no-self-contained /p:PublishSingleFile=true') - item(title='framework-dependent deployment' cmd-line='/K @publish') - item(title='framework-dependent executable' cmd-line='/K @publish --self-contained false') - item(title='self-contained deployment' cmd-line='/K @publish --self-contained true') - item(title='single-file' cmd-line='/K @publish /p:PublishSingleFile=true /p:PublishTrimmed=false') - item(title='single-file-trimmed' cmd-line='/K @publish /p:PublishSingleFile=true /p:PublishTrimmed=true') + item(title=loc.dotnet_publish_single_file sep="after" cmd-line='/K @publish --no-self-contained /p:PublishSingleFile=true') + item(title=loc.dotnet_framework_dependent_deployment cmd-line='/K @publish') + item(title=loc.dotnet_framework_dependent_executable cmd-line='/K @publish --self-contained false') + item(title=loc.dotnet_self_contained_deployment cmd-line='/K @publish --self-contained true') + item(title=loc.dotnet_single_file cmd-line='/K @publish /p:PublishSingleFile=true /p:PublishTrimmed=false') + item(title=loc.dotnet_single_file_trimmed cmd-line='/K @publish /p:PublishSingleFile=true /p:PublishTrimmed=true') } item(title='ef migrations add InitialCreate' cmd-line='/K dotnet ef migrations add InitialCreate') item(title='ef database update' cmd-line='/K dotnet ef database update') separator - item(title='help' image=\uE136 cmd-line='/k dotnet -h') - item(title='version' cmd-line='/k dotnet --info') + item(title=loc.dotnet_help image=\uE136 cmd-line='/k dotnet -h') + item(title=loc.dotnet_info cmd-line='/k dotnet --info') } item(type="file" title="reshack" sep="top" image cmd='D:\config\Programs\dev\petools\resource\reshack\reshack.exe' args=sel(1)) diff --git a/src/bin/imports/file-manage.nss b/src/bin/imports/file-manage.nss index cc3a6547..38d6df9a 100644 --- a/src/bin/imports/file-manage.nss +++ b/src/bin/imports/file-manage.nss @@ -13,7 +13,7 @@ item(mode="single" type='file' where=sel.file.ext.len>0 title=sel.file.ext cmd=command.copy(sel.file.ext)) } - item(mode="single" type="file" title=loc.change_extension image=\uE0B5 cmd=if(input(loc.change_extension, "Type extension"), + item(mode="single" type="file" title=loc.change_extension image=\uE0B5 cmd=if(input(loc.change_extension, loc.type_extension), io.rename(sel.path, path.join(sel.dir, sel.file.title + "." + input.result)))) menu(separator="after" image=\uE290 title=title.select) diff --git a/src/bin/imports/goto.nss b/src/bin/imports/goto.nss index 41ab526a..364e2361 100644 --- a/src/bin/imports/goto.nss +++ b/src/bin/imports/goto.nss @@ -3,20 +3,20 @@ menu(type='*' where=window.is_taskbar||sel.count mode=mode.multiple title=title. menu(title=loc.folder image=\uE1F4) { item(title='Windows' image=inherit cmd=sys.dir) - item(title='System' image=inherit cmd=sys.bin) + item(title=loc.dir_system image=inherit cmd=sys.bin) item(title='Program Files' image=inherit cmd=sys.prog) item(title='Program Files x86' image=inherit cmd=sys.prog32) item(title='ProgramData' image=inherit cmd=sys.programdata) - item(title='Applications' image=inherit cmd='shell:appsfolder') - item(title='Users' image=inherit cmd=sys.users) + item(title=loc.dir_applications image=inherit cmd='shell:appsfolder') + item(title=loc.dir_users image=inherit cmd=sys.users) separator //item(title='@user.name@@@sys.name' vis=label) - item(title='Desktop' image=inherit cmd=user.desktop) - item(title='Downloads' image=inherit cmd=user.downloads) - item(title='Pictures' image=inherit cmd=user.pictures) - item(title='Documents' image=inherit cmd=user.documents) - item(title='Startmenu' image=inherit cmd=user.startmenu) - item(title='Profile' image=inherit cmd=user.dir) + item(title=loc.dir_desktop image=inherit cmd=user.desktop) + item(title=loc.dir_downloads image=inherit cmd=user.downloads) + item(title=loc.dir_pictures image=inherit cmd=user.pictures) + item(title=loc.dir_documents image=inherit cmd=user.documents) + item(title=loc.dir_startmenu image=inherit cmd=user.startmenu) + item(title=loc.dir_profile image=inherit cmd=user.dir) item(title='AppData' image=inherit cmd=user.appdata) item(title='Temp' image=inherit cmd=user.temp) } diff --git a/src/bin/imports/lang/en.nss b/src/bin/imports/lang/en.nss index e584947d..be209c46 100644 --- a/src/bin/imports/lang/en.nss +++ b/src/bin/imports/lang/en.nss @@ -82,3 +82,47 @@ minimize_all_windows="Minimize all windows" restore_all_windows="Restore all windows" task_manager="Task Manager" taskbar_Settings="Taskbar Settings" + + +// file-manage.nss +type_extension="Type extension" + +// goto.nss +dir_system="System" +dir_applications="Applications" +dir_users="Users" +dir_desktop="Desktop" +dir_downloads="Downloads" +dir_pictures="Pictures" +dir_documents="Documents" +dir_startmenu="Startmenu" +dir_profile="Profile" + +// taskbar.nss +config="config" +manager="manager" +directory="directory" +version="version" +docs="docs" +donate="donate" + +// terminal.nss +tip_run_admin_before="Press [SHIFT key] or [RIGHT-CLICK] to run " +tip_run_admin_after=" as administrator" + + +// develop.nss (dotnet) +dotnet_run="run" +dotnet_watch="watch" +dotnet_clean="clean" +dotnet_build_debug="build debug" +dotnet_build_release="build release" +dotnet_publish="publish" +dotnet_publish_single_file="publish single file" +dotnet_framework_dependent_deployment="framework-dependent deployment" +dotnet_framework_dependent_executable="framework-dependent executable" +dotnet_self_contained_deployment="self-contained deployment" +dotnet_single_file="single-file" +dotnet_single_file_trimmed="single-file-trimmed" +dotnet_help="help" +dotnet_info="version" diff --git a/src/bin/imports/lang/zh-CN.nss b/src/bin/imports/lang/zh-CN.nss index 8a59c39e..c3f743b3 100644 --- a/src/bin/imports/lang/zh-CN.nss +++ b/src/bin/imports/lang/zh-CN.nss @@ -20,7 +20,7 @@ all="全选" invert="反选" none="全不选" change_extension="更改扩展名" -take_ownership="更改所有权" +take_ownership="取得所有权" show_hide="显示/隐藏" system_files="系统文件" file_name_extensions="文件扩展名" @@ -44,7 +44,7 @@ guid="Guid" folder="文件夹" all_control_panel_items="所有控制面板项" system="系统" -about="系统信息" +about="关于" your_info="账户信息" system_info="系统信息(CMD)" search="搜索" @@ -83,3 +83,47 @@ minimize_all_windows="最小化所有窗口" restore_all_windows="还原所有窗口" task_manager="任务管理器" taskbar_Settings="任务栏设置" + + +// file-manage.nss +type_extension="输入扩展名" + +// goto.nss +dir_system="System32" +dir_applications="应用" +dir_users="用户" +dir_desktop="桌面" +dir_downloads="下载" +dir_pictures="图片" +dir_documents="文档" +dir_startmenu="开始菜单" +dir_profile="用户文件夹" + +// taskbar.nss +config="配置" +manager="管理器" +directory="目录" +version="版本" +docs="文档" +donate="捐赠" + +// terminal.nss +tip_run_admin_before="按 [SHIFT 键] 或 [鼠标右键] 以管理员身份运行 " +tip_run_admin_after="" + + +// develop.nss (dotnet) +dotnet_run="运行" +dotnet_watch="监视运行" +dotnet_clean="清理" +dotnet_build_debug="生成 Debug" +dotnet_build_release="生成 Release" +dotnet_publish="发布" +dotnet_publish_single_file="发布单文件" +dotnet_framework_dependent_deployment="依赖框架的部署" +dotnet_framework_dependent_executable="依赖框架的可执行文件" +dotnet_self_contained_deployment="独立部署" +dotnet_single_file="单文件" +dotnet_single_file_trimmed="单文件(裁剪)" +dotnet_help="帮助" +dotnet_info="环境信息" diff --git a/src/bin/imports/modify.nss b/src/bin/imports/modify.nss index a8976b5e..5e2ec478 100644 --- a/src/bin/imports/modify.nss +++ b/src/bin/imports/modify.nss @@ -6,14 +6,14 @@ modify(mode=mode.multiple modify(type="recyclebin" where=window.is_desktop and this.id==id.empty_recycle_bin pos=1 sep) -modify(find="unpin*" pos="bottom" menu="Pin/Unpin") -modify(find="pin*" pos="top" menu="Pin/Unpin") +modify(find="unpin*" pos="bottom" menu=loc.pin_unpin) +modify(find="pin*" pos="top" menu=loc.pin_unpin) -modify(where=this.id==id.copy_as_path menu="file manage") -modify(type="dir.back|drive.back" where=this.id==id.customize_this_folder pos=1 sep="top" menu="file manage") +modify(where=this.id==id.copy_as_path menu=loc.file_manage) +modify(type="dir.back|drive.back" where=this.id==id.customize_this_folder pos=1 sep="top" menu=loc.file_manage) modify(where=str.equals(this.name, ["open in terminal", "open linux shell here"]) || this.id==id.open_powershell_window_here - pos="bottom" menu="Terminal") + pos="bottom" menu=title.terminal) modify(mode=mode.multiple where=this.id( diff --git a/src/bin/imports/taskbar.nss b/src/bin/imports/taskbar.nss index a08bacc7..3d336839 100644 --- a/src/bin/imports/taskbar.nss +++ b/src/bin/imports/taskbar.nss @@ -1,11 +1,11 @@ menu(type="taskbar" vis=key.shift() or key.lbutton() pos=0 title=app.name image=\uE249) { - item(title="config" image=\uE10A cmd='"@app.cfg"') - item(title="manager" image=\uE0F3 admin cmd='"@app.exe"') - item(title="directory" image=\uE0E8 cmd='"@app.dir"') - item(title="version\t"+@app.ver vis=label col=1) - item(title="docs" image=\uE1C4 cmd='https://nilesoft.org/docs') - item(title="donate" image=\uE1A7 cmd='https://nilesoft.org/donate') + item(title=loc.config image=\uE10A cmd='"@app.cfg"') + item(title=loc.manager image=\uE0F3 admin cmd='"@app.exe"') + item(title=loc.directory image=\uE0E8 cmd='"@app.dir"') + item(title=loc.version+"\t"+@app.ver vis=label col=1) + item(title=loc.docs image=\uE1C4 cmd='https://nilesoft.org/docs') + item(title=loc.donate image=\uE1A7 cmd='https://nilesoft.org/donate') } menu(where=@(this.count == 0) type="taskbar" image=icon.settings expanded=true) { diff --git a/src/bin/imports/terminal.nss b/src/bin/imports/terminal.nss index c3c199b1..b99fb250 100644 --- a/src/bin/imports/terminal.nss +++ b/src/bin/imports/terminal.nss @@ -1,6 +1,6 @@ menu(type='*' where=(sel.count or wnd.is_taskbar or wnd.is_edit) title=title.terminal sep=sep.top image=icon.run_with_powershell) { - $tip_run_admin=["\xE1A7 Press [SHIFT key] or [RIGHT-CLICK] to run " + this.title + " as administrator", tip.warning, 1.0] + $tip_run_admin=["\xE1A7 " + loc.tip_run_admin_before + this.title + loc.tip_run_admin_after, tip.warning, 1.0] $has_admin=key.shift() or key.rbutton() item(title=title.command_prompt tip=tip_run_admin admin=has_admin image cmd-prompt=`/K TITLE Command Prompt &ver& PUSHD "@sel.dir"`) From 45019f2f5627cbcb6307ddd5dfcb6c035250545b Mon Sep 17 00:00:00 2001 From: RossZhu <77894102+54dbd@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:40:28 -0700 Subject: [PATCH 2/2] Keep the UTF-8 BOM in develop.nss --- src/bin/imports/develop.nss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/imports/develop.nss b/src/bin/imports/develop.nss index 9c103e27..711041b2 100644 --- a/src/bin/imports/develop.nss +++ b/src/bin/imports/develop.nss @@ -1,4 +1,4 @@ -menu(mode="multiple" title=loc.develop sep=sep.bottom image=\uE26E) +menu(mode="multiple" title=loc.develop sep=sep.bottom image=\uE26E) { menu(mode="single" title=loc.editors image=\uE17A) {