Add support for Chinese language in reports and update language options - #464
Open
tscuite wants to merge 1 commit into
Open
Add support for Chinese language in reports and update language options#464tscuite wants to merge 1 commit into
tscuite wants to merge 1 commit into
Conversation
Author
There was a problem hiding this comment.
Pull request overview
Adds Simplified Chinese (zh_CN) as a supported report language across the plugin (web service parameter, UI dropdowns, and report i18n bundle).
Changes:
- Add
messages_zh_CN.propertieswith Chinese translations for report headers/log message. - Extend UI language dropdowns to include
zh_CN. - Update web service/CLI language options to include
zh_CNand adjust WS possible-values handling.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/resources/plugin.properties |
Adds zh_CN to the configured language option list for the WS parameter. |
src/main/resources/messages_zh_CN.properties |
Introduces Simplified Chinese resource bundle for report strings. |
src/main/js/project_page/view/CnesReportProject.js |
Adds Chinese to the project page language selection list. |
src/main/js/global_page/components/CnesReportApp.js |
Adds Chinese to the global page language selection list. |
src/main/java/fr/cnes/sonar/report/utils/CommandLineManager.java |
Updates CLI help text to document zh_CN support. |
src/main/java/fr/cnes/sonar/plugin/ws/ReportWs.java |
Updates WS language param possible-values construction to support multiple non-default languages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| String[] allLangs = new String[1 + otherLangs.length]; | ||
| allLangs[0] = defaultLang; | ||
| System.arraycopy(otherLangs, 0, allLangs, 1, otherLangs.length); | ||
| languageParam.setPossibleValues((Object[]) allLangs); |
Comment on lines
+92
to
97
| String[] otherLangs = PluginStringManager.getProperty("api.report.args.possibleValue.language").split(","); | ||
| String[] allLangs = new String[1 + otherLangs.length]; | ||
| allLangs[0] = defaultLang; | ||
| System.arraycopy(otherLangs, 0, allLangs, 1, otherLangs.length); | ||
| languageParam.setPossibleValues((Object[]) allLangs); | ||
| languageParam.setDefaultValue(PluginStringManager.getProperty("api.report.args.defaultValue.language")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Proposed changes
Types of changes
What types of changes does your code introduce to this software?
Issues closed by changes
Checklist