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.
| [nameof(SettingsTitle)] = "设置", | ||
| [nameof(ThemeLabel)] = "主题", | ||
| [nameof(ThemeTooltip)] = "首选的用户界面主题", | ||
| [nameof(LanguageLabel)] = "语言Language", |
There was a problem hiding this comment.
because i don't want any body change to wrong language than don't know how to change back
| jobs: | ||
| format: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install .NET | ||
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | ||
|
|
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install .NET | ||
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | ||
|
|
|
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.
|
|
||
| 或者,你也可以下载集成了 FFmpeg 的 {0} 版本。请寻找未标记为 *.Bare 的发布资源。 | ||
|
|
||
| 点击“下载”跳转到 FFmpeg 下载页面。 |
| [nameof(CloseButton)] = "关闭", | ||
| [nameof(DownloadButton)] = "下载", | ||
| [nameof(CancelButton)] = "取消", | ||
| [nameof(SettingsButton)] = "设置", |
| [nameof(FFmpegPathMissingMessage)] = """ | ||
| 此应用需要 FFmpeg 才能运行,但配置的路径不存在: | ||
| {0} | ||
|
|
||
| 请在设置中更新 FFmpeg 路径,或将其清空以使用自动检测。 | ||
| """, | ||
| [nameof(FFmpegMissingSearchedLabel)] = "在以下目录中搜索了 '{0}':", |
| German, | ||
| French, | ||
| Spanish, | ||
| ChineseSimplified, |
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.
add chinese