-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added Simplified Chinese translation #590
Conversation
24c09ab
to
5011256
Compare
Lots of fpushs, sorry… |
@@ -10,6 +10,7 @@ | |||
|
|||
// localization | |||
import lang 'imports/lang/en.nss' | |||
import lang 'imports/lang/zh.nss' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a single localization file should be imported. In case of multiple ones, the one appearing later (zh in this case) is imported. This is not the desired behavior. The choice should be left up to the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, I thought it depends on the system language... Shouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no translation instructions yet. So I can't say for sure how is it going to be implemented. Maybe through setup? or maybe user will have to manually change it through shell.nss
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait for our boss's answer then❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one file must be imported
Use these functions to find the language name or identifier.
sys.lang.id // 1033
sys.lang.name // en
sys.lang.country // US
sys.lang // en-US
Example of loading the language file according to the system language.
If the file does not exist, the default language file in English will be loaded.
$loc_path='imports\lang\'
import lang if(path.exists(loc_path + sys.lang + ".nss"),
loc_path + sys.lang + ".nss",
loc_path + "\\en.nss")
item(title=loc.system image=inherit cmd='ms-settings:') | ||
item(title=loc.about image=inherit cmd='ms-settings:about') | ||
item(title=loc.your_info image=inherit cmd='ms-settings:yourinfo') | ||
item(title=loc.system_info image=inherit cmd-line='/K systeminfo') | ||
item(title=loc.search cmd='search-ms:' image=inherit) | ||
item(title=loc.usb image=inherit cmd='ms-settings:usb') | ||
item(title=loc.windows_update image=inherit cmd='ms-settings:windowsupdate') | ||
item(title=loc.windows_defender image=inherit cmd='ms-settings:windowsdefender') | ||
menu(title=loc.apps image=inherit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about localizing these titles just yet (and other similar ones you added). Because Arabic and Korean files don't have these defined and there is no default value for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought when these titles don't exist, will fall back to English.....
No description provided.