Skip to content

Add support for Chinese language in reports and update language options - #464

Open
tscuite wants to merge 1 commit into
cnescatlab:devfrom
tscuite:dev
Open

Add support for Chinese language in reports and update language options#464
tscuite wants to merge 1 commit into
cnescatlab:devfrom
tscuite:dev

Conversation

@tscuite

@tscuite tscuite commented Mar 17, 2026

Copy link
Copy Markdown

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to this software?

Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Issues closed by changes

List here all issues closed by your changes. Use a list of items like - [x] Close #0

  • Close #0

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I agree with the CODE OF CONDUCT
  • Lint and unit tests pass locally with my changes
  • SonarCloud and Travis CI tests pass with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Copilot AI review requested due to automatic review settings March 17, 2026 07:23
@tscuite

tscuite commented Mar 17, 2026

Copy link
Copy Markdown
Author

version: v26.1.0.118079
image

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.properties with Chinese translations for report headers/log message.
  • Extend UI language dropdowns to include zh_CN.
  • Update web service/CLI language options to include zh_CN and 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"));
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.

2 participants