Skip to content
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

Merged
merged 2 commits into from
Jan 4, 2025
Merged

Conversation

JohnsonRan
Copy link
Contributor

No description provided.

@JohnsonRan JohnsonRan force-pushed the zh-CN branch 11 times, most recently from 24c09ab to 5011256 Compare December 30, 2024 04:59
@JohnsonRan
Copy link
Contributor Author

Lots of fpushs, sorry…

@@ -10,6 +10,7 @@

// localization
import lang 'imports/lang/en.nss'
import lang 'imports/lang/zh.nss'
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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❤️

Copy link
Owner

@moudey moudey Jan 4, 2025

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")

Comment on lines +29 to +37
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)
Copy link
Contributor

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.

Copy link
Contributor Author

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.....

@moudey moudey merged commit 40873a6 into moudey:main Jan 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants