Add Chinese (Simplified) localization - #810
Conversation
Updated the GitHub Actions workflow to improve structure and added KOOK notification.
|
To be precise, it is Simplified Chinese, intended for use in mainland China. |
|
maybe you can delete my workflows. because i change subscribe to my kook channel |
There was a problem hiding this comment.
Pull request overview
Adds Simplified Chinese localization support to YoutubeDownloader, and also updates the GitHub Actions workflow used to build, package, release, and send release notifications.
Changes:
- Added a Simplified Chinese localization dictionary and language option.
- Updated system-language detection to map a Chinese culture to the new localization.
- Refactored
.github/workflows/main.yml(action versions, version parsing, deploy packaging, and notification target).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| YoutubeDownloader/Localization/LocalizationManager.cs | Adds System-language mapping and explicit selection for Simplified Chinese. |
| YoutubeDownloader/Localization/LocalizationManager.ChineseSimplified.cs | Introduces Simplified Chinese UI strings. |
| YoutubeDownloader/Localization/Language.cs | Adds a new language enum value and display metadata. |
| .github/workflows/main.yml | Updates CI/CD pipeline steps, versions, and replaces release notification integration. |
Comments suppressed due to low confidence (3)
YoutubeDownloader/Localization/LocalizationManager.cs:56
CultureInfo.CurrentUICulture.ThreeLetterISOLanguageNamefor Chinese cultures is typically"zho"(ISO 639-2), not"chs"(which matchesThreeLetterWindowsLanguageName). As written,Language.Systemwill likely never auto-select Chinese and will fall back to English. Consider switching this logic to useTwoLetterISOLanguageName/Nameforzh-*, or change the compared value to"zho"(or useThreeLetterWindowsLanguageNameconsistently).
"spa" => SpanishLocalization,
_ => EnglishLocalization,
},
Language.ChineseSimplified => ChineseSimplifiedLocalization,
Language.Ukrainian => UkrainianLocalization,
Language.German => GermanLocalization,
Language.French => FrenchLocalization,
Language.Spanish => SpanishLocalization,
_ => EnglishLocalization,
.github/workflows/main.yml:179
- A bot authorization token is committed directly in the workflow (
Authorization: Bot ...). This is a secret and should not be stored in the repo; it can be harvested from git history and used to send messages as the bot. Move the token (and likelytarget_id) into GitHub Secrets and reference it via${{ secrets.* }}; rotate/revoke the leaked token immediately.
.github/workflows/main.yml:149 deployusesactions/download-artifact, which requiresactions: readpermission for the GITHUB_TOKEN. The job permissions were reduced to onlycontents: write, so artifact download may fail with insufficient permissions. Addactions: readtodeployjob permissions (and consider least-privilege for other jobs as well).
- name: Create package
working-directory: YoutubeDownloader/
run: zip -r ../YoutubeDownloader.${{ matrix.rid }}.zip .
- name: Upload release asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
because i don't want anybody change to wrong language than don't know how to change back. then keep english at language buttom |
|
and all change of workflows can delete |
|
@xmmtx thank you. I've made some corrections to fit the established conventions. However, your translations are relying on a slightly outdated string set (see build errors). Please take a look at the base strings (English) on the latest |
There was a problem hiding this comment.
Pull request overview
Adds a new Chinese (Simplified) localization option and wires it into the localization selection logic so the UI can be displayed in Simplified Chinese.
Changes:
- Added
ChineseSimplifiedto theLanguageenum. - Added a new Simplified Chinese localization dictionary (
LocalizationManager.ChineseSimplified.cs). - Updated
LocalizationManagerlanguage selection to route to the new localization.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| YoutubeDownloader/Localization/LocalizationManager.cs | Routes System/explicit language selection to the new Simplified Chinese localization. |
| YoutubeDownloader/Localization/LocalizationManager.ChineseSimplified.cs | Adds Simplified Chinese strings for UI labels/tooltips/dialog messages. |
| YoutubeDownloader/Localization/Language.cs | Introduces the ChineseSimplified language option for settings selection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Updated localization strings for Chinese Simplified, including changes to FFmpeg messages.
There was a problem hiding this comment.
Pull request overview
Adds a Simplified Chinese localization option to the app’s localization system, including System-language auto-detection updates so Chinese users can see translated UI strings.
Changes:
- Added
ChineseSimplifiedto theLanguageenum. - Introduced a new
ChineseSimplifiedLocalizationstring dictionary. - Updated
LocalizationManagerto select Simplified Chinese for certainCultureInfo.CurrentUICulturevalues (and allow explicit selection viaLanguage.ChineseSimplified).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
YoutubeDownloader/Localization/LocalizationManager.cs |
Adds Simplified Chinese selection logic for System language and explicit Language.ChineseSimplified mapping. |
YoutubeDownloader/Localization/LocalizationManager.ChineseSimplified.cs |
Adds Simplified Chinese translation strings for existing UI keys. |
YoutubeDownloader/Localization/Language.cs |
Adds a new enum value to expose Simplified Chinese in settings/UI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
简体中文翻译一般都是 |
That's for sorting purposes. I might add a separate display name later. |
本来想写的就是 |
现在是直接读代码里面的名字的,所以直接显示 |
已提交新PR:#819 |
add chinese