-
Notifications
You must be signed in to change notification settings - Fork 30
Localize UI strings to zh-CN #27
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
base: main
Are you sure you want to change the base?
Conversation
Updated build process to use specific project files and improved artifact packaging.
|
Thanks, but of course I can't merge it as is. I'll consider merging a PR which adds proper localization support. |
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.
Pull request overview
This PR aims to localize the UWPSpy application to Simplified Chinese (zh-CN), translating UI strings throughout the application including dialog boxes, menus, error messages, and tooltips. The changes also convert resource files to UTF-8 encoding to support Chinese characters.
Changes:
- Translated all user-facing strings from English to Simplified Chinese across launcher and main application
- Updated resource files (.rc, .rc2) with UTF-8 code page pragma to support Chinese characters
- Added a GitHub Actions workflow file (unrelated to localization)
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| UWPSpyLauncher/process_spy.cpp | Localized error messages and warning prompts for architecture compatibility, file operations, and process inspection |
| UWPSpyLauncher/UWPSpyLauncher.rc2 | Added version resource with UTF-8 encoding for Chinese text support |
| UWPSpyLauncher/UWPSpyLauncher.rc | Changed code page to UTF-8 and translated dialog controls, buttons, and menu strings |
| UWPSpyLauncher/MainDlg.cpp | Translated dialog messages for process selection, about box, and error handling |
| UWPSpy/UWPSpy.rc2 | Added version resource with UTF-8 encoding and Chinese component description |
| UWPSpy/UWPSpy.rc | New file with UTF-8 encoding containing fully localized dialog resources and string tables |
| UWPSpy/MainDlg.cpp | Translated window title, tab labels, column headers, error messages, and context menu items |
| UWPSpy/AboutDlg.cpp | Localized error message for link opening failure |
| .github/workflows/build.yml | Added CI/CD workflow (unrelated to localization scope) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // English (United States) resources | ||
|
|
||
| #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | ||
| LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US |
Copilot
AI
Jan 17, 2026
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.
The LANGUAGE directive specifies LANG_ENGLISH, SUBLANG_ENGLISH_US but the resource strings are in Simplified Chinese. This should be changed to LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED (0x0804) for proper localization. The language identifier affects how the operating system selects resources at runtime.
| button.SetWindowText(L"全部折叠"); | ||
| } | ||
|
|
||
|
|
Copilot
AI
Jan 17, 2026
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.
This blank line appears to be unintentionally added and doesn't serve a purpose. Consider removing it to maintain consistent code formatting.
|
|
||
|
|
Copilot
AI
Jan 17, 2026
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.
This blank line appears to be unintentionally added and doesn't serve a purpose. Consider removing it to maintain consistent code formatting.
| name += L"(当前)"; | ||
| } | ||
|
|
||
|
|
Copilot
AI
Jan 17, 2026
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.
This blank line appears to be unintentionally added and doesn't serve a purpose. Consider removing it to maintain consistent code formatting.
| auto parent = wux::Media::VisualTreeHelper::GetParent(element) | ||
| .try_as<wux::FrameworkElement>(); | ||
| if (parent && winrt::get_class_name(parent) == | ||
| if (parent && winrt::get_class_name(parent) == |
Copilot
AI
Jan 17, 2026
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.
The indentation appears to have been changed from the standard alignment (16 spaces) to 17 spaces. This inconsistency should be corrected to maintain proper code formatting.
| auto parent = wux::Media::VisualTreeHelper::GetParent(element) | ||
| .try_as<wux::FrameworkElement>(); | ||
| if (parent && winrt::get_class_name(parent) == | ||
| if (parent && winrt::get_class_name(parent) == |
Copilot
AI
Jan 17, 2026
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.
The indentation appears to have been changed from the standard alignment (16 spaces) to 17 spaces. This inconsistency should be corrected to maintain proper code formatting.
| attributesList.InsertColumn(c++, L"值", LVCFMT_LEFT, width / 2); | ||
| } | ||
|
|
||
|
|
Copilot
AI
Jan 17, 2026
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.
This blank line appears to be unintentionally added and doesn't serve a purpose. Consider removing it to maintain consistent code formatting.
| return; | ||
| } | ||
|
|
||
|
|
Copilot
AI
Jan 17, 2026
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.
This blank line appears to be unintentionally added and doesn't serve a purpose. Consider removing it to maintain consistent code formatting.
| groupName = L"(未命名)"; | ||
| } | ||
|
|
||
|
|
Copilot
AI
Jan 17, 2026
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.
This blank line appears to be unintentionally added and doesn't serve a purpose. Consider removing it to maintain consistent code formatting.
| name: build | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: windows-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup NuGet | ||
| uses: nuget/setup-nuget@v2 | ||
|
|
||
| - name: Setup MSBuild | ||
| uses: microsoft/setup-msbuild@v2 | ||
|
|
||
| - name: Restore NuGet packages | ||
| run: nuget restore UWPSpy.sln | ||
|
|
||
| - name: Build Release x64 | ||
| shell: pwsh | ||
| run: | | ||
| $outDir = Join-Path $env:GITHUB_WORKSPACE "build\\" | ||
| New-Item -ItemType Directory -Force -Path $outDir | Out-Null | ||
| msbuild UWPSpyLauncher\\UWPSpyLauncher.vcxproj /m /p:Configuration=Release /p:Platform=x64 /p:OutDir="$outDir" | ||
| msbuild UWPSpy\\UWPSpy.vcxproj /m /p:Configuration=Release /p:Platform=x64 /p:OutDir="$outDir" | ||
| Write-Host "Build output:" | ||
| Get-ChildItem -Path $outDir -Filter *.exe | ||
| Get-ChildItem -Path $outDir -Filter *.dll | ||
| - name: Package artifacts | ||
| shell: pwsh | ||
| run: | | ||
| $outDir = "artifacts" | ||
| New-Item -ItemType Directory -Force -Path $outDir | Out-Null | ||
| Copy-Item "$env:GITHUB_WORKSPACE\\build\\UWPSpyLauncher.exe" -Destination $outDir | ||
| Copy-Item "$env:GITHUB_WORKSPACE\\build\\UWPSpy.dll" -Destination $outDir | ||
| Compress-Archive -Path "$outDir\\*" -DestinationPath "UWPSpy-Release-x64.zip" -Force | ||
| - name: Upload build artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: UWPSpy-Release-x64 | ||
| path: UWPSpy-Release-x64.zip | ||
|
|
||
| - name: Create GitHub Release | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: UWPSpy-Release-x64.zip |
Copilot
AI
Jan 17, 2026
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.
This GitHub Actions workflow file appears to be unrelated to the zh-CN localization work described in the PR. This should be submitted as a separate pull request to keep changes focused on their stated purpose.
Summary
Testing