Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/main/java/fr/cnes/sonar/plugin/ws/ReportWs.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ private void reportAction(final WebService.NewController controller){
WebService.NewParam languageParam = report.createParam(PluginStringManager.getProperty("api.report.args.language"));
languageParam.setDescription(PluginStringManager.getProperty("api.report.args.description.language"));
languageParam.setRequired(false);
languageParam.setPossibleValues(PluginStringManager.getProperty("api.report.args.defaultValue.language"),
PluginStringManager.getProperty("api.report.args.possibleValue.language"));
String defaultLang = PluginStringManager.getProperty("api.report.args.defaultValue.language");
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"));
Comment on lines +92 to 97

// Adding enableDocx argument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class CommandLineManager {
{"p", "project", Boolean.TRUE.toString(), "SonarQube key of the targeted project."},
{"b", "branch", Boolean.TRUE.toString(), "Branch of the targeted project. Requires Developer Edition or sonarqube-community-branch-plugin. Default: usage of main branch."},
{"o", "output", Boolean.TRUE.toString(), "Output path for exported resources."},
{"l", "language", Boolean.TRUE.toString(), "Language of the report. Values: en_US, fr_FR. Default: en_US."},
{"l", "language", Boolean.TRUE.toString(), "Language of the report. Values: en_US, fr_FR, zh_CN. Default: en_US."},
{"a", "author", Boolean.TRUE.toString(), "Name of the report writer."},
{"d", "date", Boolean.TRUE.toString(), "Date for the report. Format: " + StringManager.DATE_PATTERN + ". Default: current date."},
{"c", "disable-conf", Boolean.FALSE.toString(), "Disable export of quality configuration used during analysis."},
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/global_page/components/CnesReportApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class CnesReportApp extends React.PureComponent {
token: "",
author: "",
branches: [],
languages: [{id: 'en_US', name: 'English'}, {id: 'fr_FR', name: 'French'}],
languages: [{id: 'en_US', name: 'English'}, {id: 'fr_FR', name: 'French'}, {id: 'zh_CN', name: 'Chinese'}],
enableDocx: true,
enableMd: true,
enableXlsx: true,
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/project_page/view/CnesReportProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class CnesReportProject extends React.PureComponent {
loading: true,
token: "",
author: "",
languages: [{id: 'en_US', name: 'English'}, {id: 'fr_FR', name: 'French'}],
languages: [{id: 'en_US', name: 'English'}, {id: 'fr_FR', name: 'French'}, {id: 'zh_CN', name: 'Chinese'}],
enableDocx: true,
enableMd: true,
enableXlsx: true,
Expand Down
40 changes: 40 additions & 0 deletions src/main/resources/messages_zh_CN.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# This file is part of cnesreport.
#
# cnesreport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cnesreport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cnesreport. If not, see <http://www.gnu.org/licenses/>.
#

header.name=\u540d\u79f0
header.description=\u63cf\u8ff0
header.language=\u8bed\u8a00
header.type=\u7c7b\u578b
header.severity=\u4e25\u91cd\u7a0b\u5ea6
header.number=\u6570\u91cf
header.category=\u7c7b\u522b
header.priority=\u4f18\u5148\u7ea7
header.count=\u603b\u8ba1
header.typeSlashSeverity=\u7c7b\u578b / \u4e25\u91cd\u7a0b\u5ea6
header.categorySlashPriority=\u7c7b\u522b / \u4f18\u5148\u7ea7
header.metric=\u6307\u6807
header.value=\u503c
header.reliability=\u53ef\u9760\u6027
header.security=\u5b89\u5168\u6027
header.maintainability=\u53ef\u7ef4\u62a4\u6027
header.total=\u603b\u8ba1
chart.type.title=\u6309\u7c7b\u578b\u7edf\u8ba1\u7684\u95ee\u9898\u6570\u91cf
chart.severity.title=\u6309\u4e25\u91cd\u7a0b\u5ea6\u7edf\u8ba1\u7684\u95ee\u9898\u6570\u91cf
chart.violations.title=\u95ee\u9898\u6570\u91cf\u8d8b\u52bf
chart.technicalDebtRatio.title=\u6280\u672f\u503a\u52a1\u6bd4\u4f8b\u8d8b\u52bf\uff08%\uff09

log.overflow.msg=\u5f85\u5bfc\u51fa\u7684\u95ee\u9898\u8d85\u8fc7 10000 \u4e2a\uff0c\u4f46 SonarQube \u65e0\u6cd5\u63d0\u4f9b\u6240\u6709\u95ee\u9898\u3002\u4ec5\u5c55\u793a\u524d 10000 \u4e2a\u95ee\u9898\u3002\u8bf7\u51cf\u5c11\u95ee\u9898\u6570\u91cf\u540e\u91cd\u8bd5\u5bfc\u51fa\u3002
2 changes: 1 addition & 1 deletion src/main/resources/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ api.report.args.description.token=Authentication token (for protected project)
api.report.args.exampleValue.token=e4aa1351d0a3936e55d23e340402f48f7dced48b
api.report.args.language=language
api.report.args.description.language=Language of the report
api.report.args.possibleValue.language=fr_FR
api.report.args.possibleValue.language=fr_FR,zh_CN
api.report.args.defaultValue.language=en_US
api.report.args.enableDocx=enableDocx
api.report.args.description.enableDocx=Enable report generation
Expand Down
Loading