Skip to content

The Unified and Autonomous Development Platform

wip: i18n support

Robin Shen2e72148db219
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/Import.java b/server-core/src/main/java/io/onedev/server/buildspec/Import.java
index a9e08532b9..dd3763790f 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/Import.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/Import.java
@@ -157,9 +157,10 @@ public class Import implements Serializable, Validatable {
try {
subject = JobAuthorizationContext.get().getSubject(getAccessTokenSecret());
} catch (ExplicitException e) {
- throw new ExplicitException(String.format(
- "Unable to import build spec (import project: %s, import revision: %s): %s",
- projectPath, revision, e.getMessage()));
+ var errorMessage = MessageFormat.format(
+ _T("Unable to import build spec (import project: {0}, import revision: {1}): {2}"),
+ projectPath, revision, e.getMessage());
+ throw new ExplicitException(errorMessage);
}
if (!subject.isPermitted(new ProjectPermission(project, new ReadCode()))
&& !project.isPermittedByLoginUser(new ReadCode())) {
@@ -173,12 +174,14 @@ public class Import implements Serializable, Validatable {
try {
buildSpec = project.getBuildSpec(commit);
} catch (BuildSpecParseException e) {
- String errorMessage = String.format("Malformed build spec (import project: %s, import revision: %s)",
+ String errorMessage = MessageFormat.format(
+ _T("Malformed build spec (import project: {0}, import revision: {1})"),
projectPath, revision);
throw new ExplicitException(errorMessage);
}
if (buildSpec == null) {
- String errorMessage = String.format("Build spec not defined (import project: %s, import revision: %s)",
+ String errorMessage = MessageFormat.format(
+ _T("Build spec not defined (import project: {0}, import revision: {1})"),
projectPath, revision);
throw new ExplicitException(errorMessage);
}
@@ -194,7 +197,8 @@ public class Import implements Serializable, Validatable {
if (importChain.get().contains(commit.name())) {
List<String> circular = new ArrayList<>(importChain.get());
circular.add(commit.name());
- String errorMessage = "Circular build spec imports (" + circular + ")";
+ String errorMessage = MessageFormat.format(
+ _T("Circular build spec imports ({0})"), circular);
context.disableDefaultConstraintViolation();
context.buildConstraintViolationWithTemplate(errorMessage).addConstraintViolation();
return false;
@@ -230,7 +234,7 @@ public class Import implements Serializable, Validatable {
String message = e.getMessage();
if (message == null) {
logger.error("Error validating build spec import", e);
- message = "Failed to validate build spec import. Check server log for details";
+ message = _T("Failed to validate build spec import. Check server log for details");
}
context.buildConstraintViolationWithTemplate(message).addConstraintViolation();
return false;
@@ -241,7 +245,7 @@ public class Import implements Serializable, Validatable {
if (project == null) {
project = OneDev.getInstance(ProjectManager.class).findByPath(projectPath);
if (project == null)
- throw new ExplicitException("Unable to find project to import build spec: " + projectPath);
+ throw new ExplicitException(MessageFormat.format( _T("Unable to find project to import build spec: {0}"), projectPath));
}
return project;
}
@@ -250,7 +254,8 @@ public class Import implements Serializable, Validatable {
if (commit == null) {
commit = getProject().getRevCommit(revision, false);
if (commit == null) {
- String errorMessage = String.format("Unable to find commit to import build spec (import project: %s, import revision: %s)",
+ String errorMessage = MessageFormat.format(
+ _T("Unable to find commit to import build spec (import project: {0}, import revision: {1})"),
projectPath, revision);
throw new ExplicitException(errorMessage);
}
diff --git a/server-core/src/main/java/io/onedev/server/job/JobAuthorizationContext.java b/server-core/src/main/java/io/onedev/server/job/JobAuthorizationContext.java
index 0b65ef164b..56a1929b35 100644
--- a/server-core/src/main/java/io/onedev/server/job/JobAuthorizationContext.java
+++ b/server-core/src/main/java/io/onedev/server/job/JobAuthorizationContext.java
@@ -1,5 +1,8 @@
package io.onedev.server.job;
+import static io.onedev.server.web.translation.Translation._T;
+
+import java.text.MessageFormat;
import java.util.Stack;
import org.apache.shiro.subject.Subject;
@@ -68,7 +71,7 @@ public class JobAuthorizationContext {
String secretValue = getSecretValue(accessTokenSecret);
var accessToken = OneDev.getInstance(AccessTokenManager.class).findByValue(secretValue);
if (accessToken == null)
- throw new ExplicitException("Invalid access token");
+ throw new ExplicitException(MessageFormat.format(_T("Invalid access token: {0}"), secretValue));
return accessToken.asSubject();
} else {
return SecurityUtils.asAnonymous();
@@ -105,8 +108,8 @@ public class JobAuthorizationContext {
}
}
}
- throw new ExplicitException(String.format(
- "No authorized job secret found (project: %s, job secret: %s)",
+ throw new ExplicitException(MessageFormat.format(
+ _T("No authorized job secret found (project: {0}, job secret: {1})"),
project.getPath(), secretName));
}
}
diff --git a/server-core/src/main/java/io/onedev/server/util/DateUtils.java b/server-core/src/main/java/io/onedev/server/util/DateUtils.java
index 04c6d3cb15..5f412d0967 100644
--- a/server-core/src/main/java/io/onedev/server/util/DateUtils.java
+++ b/server-core/src/main/java/io/onedev/server/util/DateUtils.java
@@ -10,7 +10,7 @@ import java.util.TimeZone;
import javax.annotation.Nullable;
-import org.apache.wicket.request.cycle.RequestCycle;
+import org.apache.wicket.Application;
import org.joda.time.format.ISODateTimeFormat;
import org.ocpsoft.prettytime.PrettyTime;
@@ -41,11 +41,14 @@ public class DateUtils {
"4 weeks ago", "last month", "1 month 2 days ago", "last year", "1 year ago");
public static String formatAge(Date date) {
- return new PrettyTime(WebSession.get().getLocale()).format(date);
+ if (Application.exists())
+ return new PrettyTime(WebSession.get().getLocale()).format(date);
+ else
+ return new PrettyTime().format(date);
}
public static ZoneId getZoneId() {
- if (RequestCycle.get() != null) {
+ if (Application.exists()) {
ZoneId zoneId = WebSession.get().getZoneId();
if (zoneId == null)
zoneId = ZoneId.systemDefault();
diff --git a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildFilterPanel.html b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildFilterPanel.html
index 16f0583571..f0179e57c4 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildFilterPanel.html
+++ b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildFilterPanel.html
@@ -1,34 +1,34 @@
<wicket:extend>
<div class="form-group">
- <label class="control-label">Status</label>
+ <label class="control-label"><wicket:t>Status</wicket:t></label>
<input wicket:id="status" type="hidden" class="form-control">
</div>
<wicket:enclosure>
<div class="form-group">
- <label class="control-label">Job</label>
+ <label class="control-label"><wicket:t>Job</wicket:t></label>
<input wicket:id="job" type="hidden" class="form-control">
</div>
</wicket:enclosure>
<div class="form-group">
- <label class="control-label">Submitted By</label>
+ <label class="control-label"><wicket:t>Submitted By</wicket:t></label>
<input wicket:id="submittedBy" type="hidden" class="form-control">
</div>
<div class="form-group">
- <label class="control-label">Label</label>
+ <label class="control-label"><wicket:t>Label</wicket:t></label>
<input wicket:id="label" type="hidden" class="form-control">
</div>
<div class="form-group">
- <label class="control-label">Ran On Agent</label>
+ <label class="control-label"><wicket:t>Ran On Agent</wicket:t></label>
<input wicket:id="ranAgent" type="hidden" class="form-control">
</div>
<div class="form-group">
- <label class="control-label">Submitted After</label>
+ <label class="control-label"><wicket:t>Submitted After</wicket:t></label>
<div class="clearable-wrapper">
<input wicket:id="submittedAfter" type="text" class="form-control">
</div>
</div>
<div class="form-group">
- <label class="control-label">Submitted Before</label>
+ <label class="control-label"><wicket:t>Submitted Before</wicket:t></label>
<div class="clearable-wrapper">
<input wicket:id="submittedBefore" type="text" class="form-control">
</div>
diff --git a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.html b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.html
index 6d301d5558..77f43d92cf 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.html
+++ b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.html
@@ -14,22 +14,22 @@
</div>
<div class="mb-4">
<a wicket:id="showSavedQueries" class="show-saved-queries text-gray d-inline-block mb-2 mr-4 text-nowrap">
- <wicket:svg href="eye" class="icon"></wicket:svg> Show Saved Queries
+ <wicket:svg href="eye" class="icon"></wicket:svg> <wicket:t>Show Saved Queries</wicket:t>
</a>
<a wicket:id="saveQuery" class="save-query text-gray d-inline-block mb-2 mr-4 text-nowrap">
- <wicket:svg href="save" class="icon"></wicket:svg> Save Query
+ <wicket:svg href="save" class="icon"></wicket:svg> <wicket:t>Save Query</wicket:t>
</a>
<a wicket:id="filter" class="filter text-gray mr-4 mb-2 d-inline-block text-nowrap">
- <wicket:svg href="filter" class="icon"></wicket:svg> Filter
+ <wicket:svg href="filter" class="icon"></wicket:svg> <wicket:t>Filter</wicket:t>
</a>
<a wicket:id="orderBy" class="order-by text-gray mr-4 mb-2 d-inline-block text-nowrap">
- <wicket:svg href="sort" class="icon"></wicket:svg> Order By
+ <wicket:svg href="sort" class="icon"></wicket:svg> <wicket:t>Order By</wicket:t>
</a>
<a wicket:id="operations" class="operations text-gray mr-4 mb-2 d-inline-block text-nowrap">
- <wicket:svg href="ellipsis-circle" class="icon"></wicket:svg> Operations
+ <wicket:svg href="ellipsis-circle" class="icon"></wicket:svg> <wicket:t>Operations</wicket:t>
</a>
<a wicket:id="listParams" class="list-params text-gray d-inline-block mr-4 mb-2 d-none d-xl-inline text-nowrap">
- <wicket:svg href="select" class="icon"></wicket:svg> Display Params
+ <wicket:svg href="select" class="icon"></wicket:svg> <wicket:t>Display Params</wicket:t>
</a>
<span wicket:id="extraActions"></span>
<span wicket:id="count" class="float-right text-gray"></span>
@@ -62,7 +62,7 @@
<div class="build-list-params">
<form wicket:id="form">
<div class="modal-header">
- <h5 id="modal-title" class="modal-title">Params to Display</h5>
+ <h5 id="modal-title" class="modal-title"><wicket:t>Params to Display</wicket:t></h5>
<button wicket:id="close" type="button" class="close"><wicket:svg href="times" class="icon"/></button>
</div>
<div class="modal-body">
@@ -70,8 +70,8 @@
</div>
<div class="modal-footer">
<input wicket:id="save" type="submit" class="dirty-aware btn btn-primary" t:value="Save">
- <button wicket:id="useDefault" class="btn btn-primary">Use Default</button>
- <a wicket:id="cancel" class="btn btn-secondary">Cancel</a>
+ <button wicket:id="useDefault" class="btn btn-primary"><wicket:t>Use Default</wicket:t></button>
+ <a wicket:id="cancel" class="btn btn-secondary"><wicket:t>Cancel</wicket:t></a>
</div>
</form>
</div>
diff --git a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.java b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.java
index 85bf71876d..fed40bc211 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.java
@@ -3,6 +3,7 @@ package io.onedev.server.web.component.build.list;
import static io.onedev.server.model.Build.SORT_FIELDS;
import static io.onedev.server.web.translation.Translation._T;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -261,9 +262,9 @@ public abstract class BuildListPanel extends Panel {
if (!isEnabled())
tag.append("class", "disabled", " ");
if (!querySubmitted)
- tag.put("title", "Query not submitted");
+ tag.put("data-tippy-content", _T("Query not submitted"));
else if (queryModel.getObject() == null)
- tag.put("title", "Can not save malformed query");
+ tag.put("data-tippy-content", _T("Can not save malformed query"));
}
@Override
@@ -283,7 +284,7 @@ public abstract class BuildListPanel extends Panel {
@Override
public String getLabel() {
- return "Cancel Selected Builds";
+ return _T("Cancel Selected Builds");
}
@Override
@@ -298,7 +299,7 @@ public abstract class BuildListPanel extends Panel {
for (IModel<Build> each: selectionColumn.getSelections()) {
Build build = each.getObject();
if (build.isFinished()) {
- errorMessage = "Build #" + build.getNumber() + " already finished";
+ errorMessage = MessageFormat.format(_T("Build #{0} already finished"), build.getNumber());
break;
}
}
@@ -312,12 +313,12 @@ public abstract class BuildListPanel extends Panel {
protected void onConfirm(AjaxRequestTarget target) {
for (IModel<Build> each: selectionColumn.getSelections())
OneDev.getInstance(JobManager.class).cancel(each.getObject());
- Session.get().success("Cancel request submitted");
+ Session.get().success(_T("Cancel request submitted"));
}
@Override
protected String getConfirmMessage() {
- return "Type <code>yes</code> below to cancel selected builds";
+ return _T("Type <code>yes</code> below to cancel selected builds");
}
@Override
@@ -342,7 +343,7 @@ public abstract class BuildListPanel extends Panel {
configure();
if (!isEnabled()) {
tag.put("disabled", "disabled");
- tag.put("title", "Please select builds to cancel");
+ tag.put("data-tippy-content", _T("Please select builds to cancel"));
}
}
@@ -355,7 +356,7 @@ public abstract class BuildListPanel extends Panel {
@Override
public String getLabel() {
- return "Re-run Selected Builds";
+ return _T("Re-run Selected Builds");
}
@Override
@@ -370,7 +371,7 @@ public abstract class BuildListPanel extends Panel {
for (IModel<Build> each: selectionColumn.getSelections()) {
Build build = each.getObject();
if (!build.isFinished()) {
- errorMessage = "Build #" + build.getNumber() + " not finished yet";
+ errorMessage = MessageFormat.format(_T("Build #{0} not finished yet"), build.getNumber());
break;
}
}
@@ -386,12 +387,12 @@ public abstract class BuildListPanel extends Panel {
Build build = each.getObject();
OneDev.getInstance(JobManager.class).resubmit(build, "Resubmitted manually");
}
- Session.get().success("Re-run request submitted");
+ Session.get().success(_T("Re-run request submitted"));
}
@Override
protected String getConfirmMessage() {
- return "Type <code>yes</code> below to re-run selected builds";
+ return _T("Type <code>yes</code> below to re-run selected builds");
}
@Override
@@ -416,7 +417,7 @@ public abstract class BuildListPanel extends Panel {
configure();
if (!isEnabled()) {
tag.put("disabled", "disabled");
- tag.put("title", "Please select builds to re-run");
+ tag.put("data-tippy-content", _T("Please select builds to re-run"));
}
}
@@ -429,7 +430,7 @@ public abstract class BuildListPanel extends Panel {
@Override
public String getLabel() {
- return "Delete Selected Builds";
+ return _T("Delete Selected Builds");
}
@Override
@@ -455,7 +456,7 @@ public abstract class BuildListPanel extends Panel {
@Override
protected String getConfirmMessage() {
- return "Type <code>yes</code> below to delete selected builds";
+ return _T("Type <code>yes</code> below to delete selected builds");
}
@Override
@@ -479,7 +480,7 @@ public abstract class BuildListPanel extends Panel {
configure();
if (!isEnabled()) {
tag.put("disabled", "disabled");
- tag.put("title", "Please select builds to delete");
+ tag.put("data-tippy-content", _T("Please select builds to delete"));
}
}
@@ -492,7 +493,7 @@ public abstract class BuildListPanel extends Panel {
@Override
public String getLabel() {
- return "Cancel All Queried Builds";
+ return _T("Cancel All Queried Builds");
}
@Override
@@ -508,7 +509,7 @@ public abstract class BuildListPanel extends Panel {
for (Iterator<Build> it = (Iterator<Build>) dataProvider.iterator(0, buildsTable.getItemCount()); it.hasNext();) {
Build build = it.next();
if (build.isFinished()) {
- errorMessage = "Build #" + build.getNumber() + " already finished";
+ errorMessage = MessageFormat.format(_T("Build #{0} already finished"), build.getNumber());
break;
}
}
@@ -522,12 +523,12 @@ public abstract class BuildListPanel extends Panel {
protected void onConfirm(AjaxRequestTarget target) {
for (Iterator<Build> it = (Iterator<Build>) dataProvider.iterator(0, buildsTable.getItemCount()); it.hasNext();)
OneDev.getInstance(JobManager.class).cancel(it.next());
- Session.get().success("Cancel request submitted");
+ Session.get().success(_T("Cancel request submitted"));
}
@Override
protected String getConfirmMessage() {
- return "Type <code>yes</code> below to cancel all queried builds";
+ return _T("Type <code>yes</code> below to cancel all queried builds");
}
@Override
@@ -565,7 +566,7 @@ public abstract class BuildListPanel extends Panel {
@Override
public String getLabel() {
- return "Re-run All Queried Builds";
+ return _T("Re-run All Queried Builds");
}
@Override
@@ -581,7 +582,7 @@ public abstract class BuildListPanel extends Panel {
for (Iterator<Build> it = (Iterator<Build>) dataProvider.iterator(0, buildsTable.getItemCount()); it.hasNext();) {
Build build = it.next();
if (!build.isFinished()) {
- errorMessage = "Build #" + build.getNumber() + " not finished yet";
+ errorMessage = MessageFormat.format(_T("Build #{0} not finished yet"), build.getNumber());
break;
}
}
@@ -595,12 +596,12 @@ public abstract class BuildListPanel extends Panel {
protected void onConfirm(AjaxRequestTarget target) {
for (Iterator<Build> it = (Iterator<Build>) dataProvider.iterator(0, buildsTable.getItemCount()); it.hasNext();)
OneDev.getInstance(JobManager.class).resubmit(it.next(), "Resubmitted manually");
- Session.get().success("Re-run request submitted");
+ Session.get().success(_T("Re-run request submitted"));
}
@Override
protected String getConfirmMessage() {
- return "Type <code>yes</code> below to re-run all queried builds";
+ return _T("Type <code>yes</code> below to re-run all queried builds");
}
@Override
@@ -667,7 +668,7 @@ public abstract class BuildListPanel extends Panel {
@Override
protected String getConfirmMessage() {
- return "Type <code>yes</code> below to delete all queried builds";
+ return _T("Type <code>yes</code> below to delete all queried builds");
}
@Override
@@ -985,9 +986,9 @@ public abstract class BuildListPanel extends Panel {
@Override
public String getObject() {
if (dataProvider.size() > 1)
- return "found " + dataProvider.size() + " builds";
+ return MessageFormat.format(_T("found {0} builds"), dataProvider.size());
else
- return "found 1 build";
+ return _T("found 1 build");
}
}) {
@Override
@@ -1048,7 +1049,7 @@ public abstract class BuildListPanel extends Panel {
if (getProject() != null && SecurityUtils.canManageBuilds(getProject()))
columns.add(selectionColumn = new SelectionColumn<Build, Void>());
- columns.add(new AbstractColumn<>(Model.of("Build")) {
+ columns.add(new AbstractColumn<>(Model.of(_T("Build"))) {
@Override
public String getCssClass() {
@@ -1104,7 +1105,7 @@ public abstract class BuildListPanel extends Panel {
});
if (showRef) {
- columns.add(new AbstractColumn<>(Model.of("On Behalf Of")) {
+ columns.add(new AbstractColumn<>(Model.of(_T("On Behalf Of"))) {
@Override
public String getCssClass() {
@@ -1121,7 +1122,7 @@ public abstract class BuildListPanel extends Panel {
Fragment fragment = new Fragment(componentId, "linkFrag", BuildListPanel.this);
PageParameters params = PullRequestActivitiesPage.paramsOf(build.getRequest());
Link<Void> link = new BookmarkablePageLink<Void>("link", PullRequestActivitiesPage.class, params);
- link.add(new Label("label", "pull request #" + build.getRequest().getNumber()));
+ link.add(new Label("label", MessageFormat.format(_T("pull request #{0}"), build.getRequest().getNumber())));
fragment.add(link);
cellItem.add(fragment);
} else if (build.getBranch() != null) {
@@ -1132,7 +1133,7 @@ public abstract class BuildListPanel extends Panel {
PageParameters params = ProjectBlobPage.paramsOf(build.getProject(),
new BlobIdent(revision, null, FileMode.TREE.getBits()));
Link<Void> link = new BookmarkablePageLink<Void>("link", ProjectBlobPage.class, params);
- link.add(new Label("label", "branch " + build.getBranch()));
+ link.add(new Label("label", MessageFormat.format(_T("branch {0}"), build.getBranch())));
fragment.add(link);
cellItem.add(fragment);
} else if (build.getTag() != null) {
@@ -1143,7 +1144,7 @@ public abstract class BuildListPanel extends Panel {
PageParameters params = ProjectBlobPage.paramsOf(build.getProject(),
new BlobIdent(revision, null, FileMode.TREE.getBits()));
Link<Void> link = new BookmarkablePageLink<Void>("link", ProjectBlobPage.class, params);
- link.add(new Label("label", "tag " + build.getTag()));
+ link.add(new Label("label", MessageFormat.format(_T("tag {0}"), build.getTag())));
fragment.add(link);
cellItem.add(fragment);
} else if (build.getRefName().equals(REF_TOD)) {
@@ -1153,15 +1154,15 @@ public abstract class BuildListPanel extends Panel {
}
} else {
if (build.getRequest() != null)
- cellItem.add(new Label(componentId, "pull request #" + build.getRequest().getNumber()));
+ cellItem.add(new Label(componentId, MessageFormat.format(_T("pull request #{0}"), build.getRequest().getNumber())));
else if (build.getBranch() != null)
- cellItem.add(new Label(componentId, "branch " + build.getBranch()));
+ cellItem.add(new Label(componentId, MessageFormat.format(_T("branch {0}"), build.getBranch())));
else if (build.getTag() != null)
- cellItem.add(new Label(componentId, "tag " + build.getTag()));
+ cellItem.add(new Label(componentId, MessageFormat.format(_T("tag {0}"), build.getTag())));
else if (build.getRefName().equals(REF_TOD))
cellItem.add(new Label(componentId, "tod"));
else
- cellItem.add(new Label(componentId, "<i>n/a</i>").setEscapeModelStrings(false));
+ cellItem.add(new Label(componentId, "<i>" + _T("n/a") + "</i>").setEscapeModelStrings(false));
}
}
});
@@ -1182,14 +1183,14 @@ public abstract class BuildListPanel extends Panel {
if (param != null && build.isParamVisible(paramName))
cellItem.add(new ParamValuesLabel(componentId, param));
else
- cellItem.add(new Label(componentId, "<i>Unspecified</i>").setEscapeModelStrings(false));
+ cellItem.add(new Label(componentId, "<i>" + _T("Unspecified") + "</i>").setEscapeModelStrings(false));
}
});
}
if (showDuration) {
- columns.add(new AbstractColumn<>(Model.of("Duration")) {
+ columns.add(new AbstractColumn<>(Model.of(_T("Duration"))) {
@Override
public String getCssClass() {
@@ -1215,7 +1216,7 @@ public abstract class BuildListPanel extends Panel {
});
}
- columns.add(new AbstractColumn<>(Model.of("Last Update")) {
+ columns.add(new AbstractColumn<>(Model.of(_T("Last Update"))) {
@Override
public String getCssClass() {
@@ -1232,7 +1233,7 @@ public abstract class BuildListPanel extends Panel {
@Override
public String getObject() {
- return rowModel.getObject().getStatus().toString();
+ return _T(rowModel.getObject().getStatus().toString());
}
}) {
@@ -1287,7 +1288,7 @@ public abstract class BuildListPanel extends Panel {
@Override
protected String getTitle() {
- return "Select Branch/Tag";
+ return _T("Select Branch/Tag");
}
@Override
diff --git a/server-core/src/main/java/io/onedev/server/web/component/build/side/BuildSidePanel.html b/server-core/src/main/java/io/onedev/server/web/component/build/side/BuildSidePanel.html
index 009b422f85..af6ca03df5 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/build/side/BuildSidePanel.html
+++ b/server-core/src/main/java/io/onedev/server/web/component/build/side/BuildSidePanel.html
@@ -2,14 +2,14 @@
<div class="build-side">
<div wicket:id="general" class="general properties">
<div>
- <div class="name">Commit</div>
+ <div class="name"><wicket:t>Commit</wicket:t></div>
<div class="value">
<a wicket:id="commit"><span wicket:id="label"></span></a>
</div>
</div>
<wicket:enclosure child="branch">
<div>
- <div class="name">Branch</div>
+ <div class="name"><wicket:t>Branch</wicket:t></div>
<div class="value">
<a wicket:id="branch"><span wicket:id="label"></span></a>
</div>
@@ -17,14 +17,14 @@
</wicket:enclosure>
<wicket:enclosure child="tag">
<div>
- <div class="name">Tag</div>
+ <div class="name"><wicket:t>Tag</wicket:t></div>
<div class="value">
<a wicket:id="tag"><span wicket:id="label"></span></a>
</div>
</div>
</wicket:enclosure>
<div>
- <div class="name">Job</div>
+ <div class="name"><wicket:t>Job</wicket:t></div>
<div class="value">
<a wicket:id="job"><span wicket:id="label"></span></a>
<a wicket:id="editJob" class="ml-2 btn btn-icon btn-xs btn-light btn-hover-primary" t:data-tippy-content="Edit job"><wicket:svg href="edit" class="icon icon-sm"/></a>
@@ -32,49 +32,49 @@
</div>
<wicket:enclosure child="agent">
<div>
- <div class="name">Agent</div>
+ <div class="name"><wicket:t>Agent</wicket:t></div>
<div class="value">
<a wicket:id="agent"></a>
</div>
</div>
</wicket:enclosure>
<div>
- <div class="name">Submitted By</div>
+ <div class="name"><wicket:t>Submitted By</wicket:t></div>
<div class="value">
<a wicket:id="submitter"></a>
</div>
</div>
<div>
- <div class="name">Submitted At</div>
+ <div class="name"><wicket:t>Submitted At</wicket:t></div>
<div class="value"><span wicket:id="submitDate"></span></div>
</div>
<wicket:enclosure child="submitReason">
<div>
- <div class="name">Submit Reason</div>
+ <div class="name"><wicket:t>Submit Reason</wicket:t></div>
<div class="value"><span wicket:id="submitReason"></span></div>
</div>
</wicket:enclosure>
<wicket:enclosure child="retryDate">
<div>
- <div class="name">Retried At</div>
+ <div class="name"><wicket:t>Retried At</wicket:t></div>
<div class="value"><span wicket:id="retryDate"></span></div>
</div>
</wicket:enclosure>
<wicket:enclosure child="queueingTakes">
<div>
- <div class="name">Queueing Takes</div>
+ <div class="name"><wicket:t>Queueing Takes</wicket:t></div>
<div class="value"><span wicket:id="queueingTakes"></span></div>
</div>
</wicket:enclosure>
<wicket:enclosure child="runningTakes">
<div>
- <div class="name">Running Takes</div>
+ <div class="name"><wicket:t>Running Takes</wicket:t></div>
<div class="value"><span wicket:id="runningTakes"></span></div>
</div>
</wicket:enclosure>
<wicket:enclosure child="canceller">
<div>
- <div class="name">Cancelled By</div>
+ <div class="name"><wicket:t>Cancelled By</wicket:t></div>
<div class="value">
<a wicket:id="canceller"></a>
</div>
@@ -83,14 +83,14 @@
</div>
<div wicket:id="labels" class="labels">
<div wicket:id="head" class="d-flex align-items-center justify-content-between mb-3">
- <span class="font-weight-bolder">Labels</span>
+ <span class="font-weight-bolder"><wicket:t>Labels</wicket:t></span>
<wicket:svg href="gear" class="icon icon-sm"></wicket:svg>
</div>
<div wicket:id="body" class="body d-flex align-items-center"></div>
- <span wicket:id="labelsHelp" class="form-text font-size-sm text-muted"><wicket:svg href="bulb" class="icon icon-sm"/> Labels can be defined in Administration / Label Management</span>
+ <span wicket:id="labelsHelp" class="form-text font-size-sm text-muted"><wicket:svg href="bulb" class="icon icon-sm"/> <wicket:t>Labels can be defined in Administration / Label Management</wicket:t></span>
</div>
<div wicket:id="pullRequest" class="pull-request">
- <div class="font-weight-bolder mb-3">Pull Request</div>
+ <div class="font-weight-bolder mb-3"><wicket:t>Pull Request</wicket:t></div>
<div class="body d-flex align-items-center">
<a wicket:id="title" class="title mr-4"><span wicket:id="label"></span></a>
<div wicket:id="status" class="ml-auto status"></div>
@@ -106,17 +106,17 @@
</wicket:enclosure>
<div wicket:id="dependences" class="dependences">
<wicket:enclosure child="dependencies">
- Depends on <a wicket:id="dependencies"><span wicket:id="label"></span></a>
+ <wicket:t>Depends on <a wicket:id="dependencies"><span wicket:id="label"></span></a></wicket:t>
</wicket:enclosure>
<span wicket:id="comma">, </span>
<wicket:enclosure child="dependents">
- <a wicket:id="dependents"><span wicket:id="label"></span></a> depends on me
+ <wicket:t><a wicket:id="dependents"><span wicket:id="label"></span></a> depends on me</wicket:t>
</wicket:enclosure>
</div>
<div wicket:id="reference"></div>
<wicket:enclosure child="delete">
<div class="actions">
- <a wicket:id="delete" class="delete btn btn-light-danger">Delete</a>
+ <a wicket:id="delete" class="delete btn btn-light-danger"><wicket:t>Delete</wicket:t></a>
</div>
</wicket:enclosure>
</div>
diff --git a/server-core/src/main/java/io/onedev/server/web/component/build/side/BuildSidePanel.java b/server-core/src/main/java/io/onedev/server/web/component/build/side/BuildSidePanel.java
index dff21d89ac..74460d7db1 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/build/side/BuildSidePanel.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/build/side/BuildSidePanel.java
@@ -1,6 +1,35 @@
package io.onedev.server.web.component.build.side;
+import static io.onedev.server.web.translation.Translation._T;
+
+import java.io.Serializable;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.head.CssHeaderItem;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.eclipse.jgit.lib.FileMode;
+
import com.google.common.collect.Sets;
+
import io.onedev.server.OneDev;
import io.onedev.server.buildspec.BuildSpec;
import io.onedev.server.buildspec.job.Job;
@@ -35,30 +64,6 @@ import io.onedev.server.web.page.project.blob.render.renderers.buildspec.BuildSp
import io.onedev.server.web.page.project.commits.CommitDetailPage;
import io.onedev.server.web.page.project.pullrequests.detail.activities.PullRequestActivitiesPage;
import io.onedev.server.web.util.editbean.LabelsBean;
-import org.apache.wicket.Component;
-import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.head.CssHeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
-import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.AbstractReadOnlyModel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.LoadableDetachableModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.eclipse.jgit.lib.FileMode;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
public abstract class BuildSidePanel extends Panel {
@@ -423,7 +428,7 @@ public abstract class BuildSidePanel extends Panel {
Link<Void> dependentsLink = new BookmarkablePageLink<Void>("dependents", BuildListPage.class,
BuildListPage.paramsOf(query, 0));
dependentsLink.setVisible(!getBuild().getDependents().isEmpty());
- dependentsLink.add(new Label("label", getBuild().getDependents().size() + " build(s)"));
+ dependentsLink.add(new Label("label", MessageFormat.format(_T("{0} build(s)"), getBuild().getDependents().size())));
dependencesContainer.add(dependentsLink);
@@ -431,7 +436,7 @@ public abstract class BuildSidePanel extends Panel {
Link<Void> dependenciesLink = new BookmarkablePageLink<Void>("dependencies", BuildListPage.class,
BuildListPage.paramsOf(query, 0));
dependenciesLink.setVisible(!getBuild().getDependencies().isEmpty());
- dependenciesLink.add(new Label("label", getBuild().getDependencies().size() + " build(s)"));
+ dependenciesLink.add(new Label("label", MessageFormat.format(_T("{0} build(s)"), getBuild().getDependencies().size())));
dependencesContainer.add(dependenciesLink);
WebMarkupContainer comma = new WebMarkupContainer("comma");
diff --git a/server-core/src/main/java/io/onedev/server/web/component/job/BuildOptionContentPanel.html b/server-core/src/main/java/io/onedev/server/web/component/job/BuildOptionContentPanel.html
index d130980295..9064f84d10 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/job/BuildOptionContentPanel.html
+++ b/server-core/src/main/java/io/onedev/server/web/component/job/BuildOptionContentPanel.html
@@ -1,28 +1,28 @@
<wicket:panel>
<form wicket:id="form" class="job-option-edit">
<div class="modal-header">
- <h5 class="modal-title">Specify Build Options</h5>
+ <h5 class="modal-title"><wicket:t>Specify Build Options</wicket:t></h5>
<button wicket:id="close" type="button" class="close"><wicket:svg href="times" class="icon"/></button>
</div>
<div class="modal-body">
<wicket:enclosure child="refNames">
<div class="form-group">
- <label class="control-label">Build On Behalf Of</label>
+ <label class="control-label"><wicket:t>Build On Behalf Of</wicket:t></label>
<div class="d-flex flex-wrap">
<label wicket:id="refNames" class="checkbox flex-shrink-0 mr-3 mb-2">
<input wicket:id="check" type="checkbox"> <wicket:container wicket:id="label"></wicket:container>
</label>
</div>
<div wicket:id="refNamesError"></div>
- <div class="form-text text-muted">For each selected branch/tag, a separate build will be
- generated with branch/tag set to corresponding value</div>
+ <div class="form-text text-muted"><wicket:t>For each selected branch/tag, a separate build will be
+ generated with branch/tag set to corresponding value</wicket:t></div>
</div>
</wicket:enclosure>
<div wicket:id="paramEditor"></div>
</div>
<div class="modal-footer">
- <button wicket:id="ok" class="btn btn-primary">Ok</button>
- <button wicket:id="cancel" class="btn btn-secondary">Cancel</button>
+ <button wicket:id="ok" class="btn btn-primary"><wicket:t>Ok</wicket:t></button>
+ <button wicket:id="cancel" class="btn btn-secondary"><wicket:t>Cancel</wicket:t></button>
</div>
</form>
</wicket:panel>
\ No newline at end of file
diff --git a/server-core/src/main/java/io/onedev/server/web/component/job/BuildOptionContentPanel.java b/server-core/src/main/java/io/onedev/server/web/component/job/BuildOptionContentPanel.java
index 3a3e1b9286..68b07688fd 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/job/BuildOptionContentPanel.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/job/BuildOptionContentPanel.java
@@ -1,5 +1,7 @@
package io.onedev.server.web.component.job;
+import static io.onedev.server.web.translation.Translation._T;
+
import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;
@@ -118,7 +120,7 @@ abstract class BuildOptionContentPanel extends Panel {
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
super.onSubmit(target, form);
if (selectedRefNames.isEmpty()) {
- refNamesView.error("At least one branch or tag should be selected");
+ refNamesView.error(_T("At least one branch or tag should be selected"));
target.add(form);
} else {
onSave(target, selectedRefNames, paramBean);
diff --git a/server-core/src/main/java/io/onedev/server/web/component/job/JobMultiChoice.java b/server-core/src/main/java/io/onedev/server/web/component/job/JobMultiChoice.java
index 132c407660..2873b02516 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/job/JobMultiChoice.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/job/JobMultiChoice.java
@@ -1,5 +1,7 @@
package io.onedev.server.web.component.job;
+import static io.onedev.server.web.translation.Translation._T;
+
import java.util.Collection;
import java.util.List;
@@ -20,9 +22,9 @@ public class JobMultiChoice extends Select2MultiChoice<String> {
protected void onInitialize() {
super.onInitialize();
if (isRequired())
- getSettings().setPlaceholder("Choose jobs...");
+ getSettings().setPlaceholder(_T("Choose jobs..."));
else
- getSettings().setPlaceholder("Not specified");
+ getSettings().setPlaceholder(_T("Not specified"));
getSettings().setFormatResult("onedev.server.choiceFormatter.formatResult");
getSettings().setFormatSelection("onedev.server.choiceFormatter.formatSelection");
getSettings().setEscapeMarkup("onedev.server.choiceFormatter.escapeMarkup");
diff --git a/server-core/src/main/java/io/onedev/server/web/component/job/JobSingleChoice.java b/server-core/src/main/java/io/onedev/server/web/component/job/JobSingleChoice.java
index 54e13c9ba6..a8f2062aae 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/job/JobSingleChoice.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/job/JobSingleChoice.java
@@ -1,5 +1,7 @@
package io.onedev.server.web.component.job;
+import static io.onedev.server.web.translation.Translation._T;
+
import java.util.List;
import org.apache.wicket.model.IModel;
@@ -21,9 +23,9 @@ public class JobSingleChoice extends Select2Choice<String> {
getSettings().setAllowClear(!isRequired());
if (isRequired())
- getSettings().setPlaceholder("Choose job...");
+ getSettings().setPlaceholder(_T("Choose job..."));
else
- getSettings().setPlaceholder("Not specified");
+ getSettings().setPlaceholder(_T("Not specified"));
getSettings().setFormatResult("onedev.server.choiceFormatter.formatResult");
getSettings().setFormatSelection("onedev.server.choiceFormatter.formatSelection");
getSettings().setEscapeMarkup("onedev.server.choiceFormatter.escapeMarkup");
diff --git a/server-core/src/main/java/io/onedev/server/web/component/job/RunJobLink.java b/server-core/src/main/java/io/onedev/server/web/component/job/RunJobLink.java
index 1b8551956f..ea0d44847b 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/job/RunJobLink.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/job/RunJobLink.java
@@ -27,6 +27,9 @@ import org.apache.wicket.markup.html.basic.Label;
import org.eclipse.jgit.lib.ObjectId;
import javax.annotation.Nullable;
+
+import static io.onedev.server.web.translation.Translation._T;
+
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
@@ -105,7 +108,7 @@ public abstract class RunJobLink extends AjaxLink<Void> implements JobAuthorizat
for (String refName : selectedRefNames) {
builds.add(getJobManager().submit(getProject(), commitId, job.getName(),
paramMap, refName, SecurityUtils.getAuthUser(),
- getPullRequest(), null, "Submitted manually"));
+ getPullRequest(), null, _T("Submitted manually")));
}
if (builds.size() == 1)
setResponsePage(BuildDashboardPage.class, BuildDashboardPage.paramsOf(builds.iterator().next()));
@@ -113,7 +116,7 @@ public abstract class RunJobLink extends AjaxLink<Void> implements JobAuthorizat
close();
for (var build: builds) {
if (build.isFinished())
- getJobManager().resubmit(build, "Rebuild manually");
+ getJobManager().resubmit(build, _T("Rebuild manually"));
}
}
@@ -136,17 +139,17 @@ public abstract class RunJobLink extends AjaxLink<Void> implements JobAuthorizat
} else {
Build build = getJobManager().submit(getProject(), commitId, job.getName(),
new HashMap<>(), refNames.iterator().next(),
- SecurityUtils.getAuthUser(), getPullRequest(), null, "Submitted manually");
+ SecurityUtils.getAuthUser(), getPullRequest(), null, _T("Submitted manually"));
setResponsePage(BuildDashboardPage.class, BuildDashboardPage.paramsOf(build));
if (build.isFinished())
- getJobManager().resubmit(build, "Rebuild manually");
+ getJobManager().resubmit(build, _T("Rebuild manually"));
}
} else {
new MessageModal(target) {
@Override
protected Component newMessageContent(String componentId) {
- return new Label(componentId, "No refs to build on behalf of");
+ return new Label(componentId, _T("No refs to build on behalf of"));
}
};
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/blob/render/renderers/buildspec/BuildSpecBlobViewPanel.java b/server-core/src/main/java/io/onedev/server/web/page/project/blob/render/renderers/buildspec/BuildSpecBlobViewPanel.java
index 6e1c19f264..20316ca55c 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/blob/render/renderers/buildspec/BuildSpecBlobViewPanel.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/blob/render/renderers/buildspec/BuildSpecBlobViewPanel.java
@@ -437,10 +437,10 @@ public class BuildSpecBlobViewPanel extends BlobViewPanel {
Validator validator = OneDev.getInstance(Validator.class);
for (ConstraintViolation<BuildSpec> violation: validator.validate(buildSpec)) {
if (StringUtils.isNotBlank(violation.getPropertyPath().toString())) {
- error(String.format("Error validating build spec (location: %s, error message: %s)",
- violation.getPropertyPath(), violation.getMessage()));
+ error(String.format(MessageFormat.format(_T("Error validating build spec (location: {0}, error message: {1})"),
+ violation.getPropertyPath(), violation.getMessage())));
} else {
- error(String.format("Error validating build spec: %s", violation.getMessage()));
+ error(String.format(MessageFormat.format(_T("Error validating build spec: {0}"), violation.getMessage())));
}
}
@@ -527,7 +527,7 @@ public class BuildSpecBlobViewPanel extends BlobViewPanel {
}
} else {
String cssClasses = "not-defined m-4 alert alert-notice alert-light-warning";
- add(new Label("content", "Build spec not defined").add(AttributeAppender.append("class", cssClasses)));
+ add(new Label("content", _T("Build spec not defined")).add(AttributeAppender.append("class", cssClasses)));
}
}
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/ProjectBuildsPage.java b/server-core/src/main/java/io/onedev/server/web/page/project/builds/ProjectBuildsPage.java
index eff15306dd..e61b9d2597 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/ProjectBuildsPage.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/ProjectBuildsPage.java
@@ -34,6 +34,9 @@ import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import javax.annotation.Nullable;
+
+import static io.onedev.server.web.translation.Translation._T;
+
import java.io.Serializable;
import java.util.ArrayList;
@@ -257,12 +260,12 @@ public class ProjectBuildsPage extends ProjectPage {
@Override
protected Component newProjectTitle(String componentId) {
- return new Label(componentId, "Builds");
+ return new Label(componentId, _T("Builds"));
}
@Override
protected String getPageTitle() {
- return "Builds - " + getProject().getPath();
+ return _T("Builds") + " - " + getProject().getPath();
}
}
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/BuildDetailPage.html b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/BuildDetailPage.html
index 139454af56..f30108accd 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/BuildDetailPage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/BuildDetailPage.html
@@ -20,9 +20,11 @@
</div>
<div class="card-body d-flex flex-grow-1 position-relative">
<div class="main flex-grow-1 d-flex flex-column">
- <div wicket:id="buildSpecNotFound" class="alert alert-notice alert-light-warning">Build spec not found in commit of this build</div>
- <div wicket:id="jobNotFound" class="alert alert-notice alert-light-warning">Job '<span wicket:id="jobName"></span>' associated with the build not found.
- Most probably there are import errors in the <a wicket:id="buildSpec">build spec</a></div>
+ <div wicket:id="buildSpecNotFound" class="alert alert-notice alert-light-warning"><wicket:t>Build spec not found in commit of this build</wicket:t></div>
+ <div wicket:id="jobNotFound" class="alert alert-notice alert-light-warning">
+ <span wicket:id="message"></span>
+ <wicket:t>Most probably there are import errors in the <a wicket:id="buildSpec">build spec</a></wicket:t>
+ </div>
<div wicket:id="description" class="border border-dashed border-primary rounded p-3 mb-3"></div>
<ul wicket:id="buildTabs" class="tabs nav nav-tabs nav-tabs-line nav-bold mb-5 flex-shrink-0"></ul>
<wicket:child></wicket:child>
@@ -32,7 +34,7 @@
</div>
<wicket:fragment wicket:id="projectTitleFrag">
<span class="d-flex align-items-center">
- <a wicket:id="builds" class="text-nowrap">Builds</a>
+ <a wicket:id="builds" class="text-nowrap"><wicket:t>Builds</wicket:t></a>
<span class="dot"></span>
<span wicket:id="buildNumber"></span>
</span>
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/BuildDetailPage.java b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/BuildDetailPage.java
index b43f1faaf0..0204ed3cbe 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/BuildDetailPage.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/BuildDetailPage.java
@@ -3,6 +3,7 @@ package io.onedev.server.web.page.project.builds.detail;
import static io.onedev.server.web.translation.Translation._T;
import java.io.Serializable;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
@@ -137,7 +138,7 @@ public abstract class BuildDetailPage extends ProjectPage
Long buildNumber = params.get(PARAM_BUILD).toLong();
Build build = OneDev.getInstance(BuildManager.class).find(getProject(), buildNumber);
if (build == null)
- throw new EntityNotFoundException("Unable to find build #" + buildNumber + " in project " + getProject());
+ throw new EntityNotFoundException(MessageFormat.format(_T("Unable to find build #{0} in project {1}"), buildNumber, getProject()));
else if (!build.getProject().equals(getProject()))
throw new RestartResponseException(getPageClass(), paramsOf(build));
else
@@ -244,11 +245,11 @@ public abstract class BuildDetailPage extends ProjectPage
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
- attributes.getAjaxCallListeners().add(new ConfirmClickListener("Do you really want to rebuild?"));
+ attributes.getAjaxCallListeners().add(new ConfirmClickListener(_T("Do you really want to rebuild?")));
}
private void resubmit(Serializable paramBean) {
- OneDev.getInstance(JobManager.class).resubmit(getBuild(), "Resubmitted manually");
+ OneDev.getInstance(JobManager.class).resubmit(getBuild(), _T("Resubmitted manually"));
setResponsePage(BuildDashboardPage.class, BuildDashboardPage.paramsOf(getBuild()));
}
@@ -272,13 +273,13 @@ public abstract class BuildDetailPage extends ProjectPage
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
- attributes.getAjaxCallListeners().add(new ConfirmClickListener("Do you really want to cancel this build?"));
+ attributes.getAjaxCallListeners().add(new ConfirmClickListener(_T("Do you really want to cancel this build?")));
}
@Override
public void onClick(AjaxRequestTarget target) {
OneDev.getInstance(JobManager.class).cancel(getBuild());
- getSession().success("Cancel request submitted");
+ getSession().success(_T("Cancel request submitted"));
}
@Override
@@ -305,8 +306,7 @@ public abstract class BuildDetailPage extends ProjectPage
@Override
protected Component newMessageContent(String componentId) {
- return new Label(componentId, "Interactive web shell access to running jobs " +
- "is an enterprise feature. <a href='https://onedev.io/pricing' target='_blank'>Try free</a> for 30 days").setEscapeModelStrings(false);
+ return new Label(componentId, _T("Interactive web shell access to running jobs is an enterprise feature. <a href='https://onedev.io/pricing' target='_blank'>Try free</a> for 30 days")).setEscapeModelStrings(false);
}
};
}
@@ -381,7 +381,13 @@ public abstract class BuildDetailPage extends ProjectPage
};
- jobNotFoundContainer.add(new Label("jobName", getBuild().getJobName()));
+ jobNotFoundContainer.add(new Label("message", new AbstractReadOnlyModel<String>() {
+
+ @Override
+ public String getObject() {
+ return MessageFormat.format(_T("Job \"{0}\" associated with the build not found."), getBuild().getJobName());
+ }
+ }));
jobNotFoundContainer.add(new BuildSpecLink("buildSpec", getBuild().getCommitId()) {
@Override
@@ -475,7 +481,7 @@ public abstract class BuildDetailPage extends ProjectPage
List<Tab> tabs = new ArrayList<>();
if (SecurityUtils.canAccessLog(getBuild())) {
- tabs.add(new BuildTab(Model.of("Log"), BuildLogPage.class, BuildLogPage.paramsOf(getBuild())) {
+ tabs.add(new BuildTab(Model.of(_T("Log")), BuildLogPage.class, BuildLogPage.paramsOf(getBuild())) {
@Override
protected Component renderOptions(String componentId) {
@@ -487,10 +493,10 @@ public abstract class BuildDetailPage extends ProjectPage
}
if (SecurityUtils.canAccessPipeline(getBuild()))
- tabs.add(new BuildTab(Model.of("Pipeline"), BuildPipelinePage.class, BuildPipelinePage.paramsOf(getBuild())));
+ tabs.add(new BuildTab(Model.of(_T("Pipeline")), BuildPipelinePage.class, BuildPipelinePage.paramsOf(getBuild())));
if (SecurityUtils.canManageBuild(getBuild()) || getBuild().getRootArtifacts().size() != 0) {
- tabs.add(new BuildTab(Model.of("Artifacts"), BuildArtifactsPage.class, BuildArtifactsPage.paramsOf(getBuild())));
+ tabs.add(new BuildTab(Model.of(_T("Artifacts")), BuildArtifactsPage.class, BuildArtifactsPage.paramsOf(getBuild())));
}
var packSupports = new ArrayList<>(OneDev.getExtensions(PackSupport.class));
@@ -517,10 +523,10 @@ public abstract class BuildDetailPage extends ProjectPage
}
var params = FixedIssuesPage.paramsOf(getBuild(), getProject().getHierarchyDefaultFixedIssueQuery(getBuild().getJobName()));
- tabs.add(new BuildTab(Model.of("Fixed Issues"), FixedIssuesPage.class, params));
+ tabs.add(new BuildTab(Model.of(_T("Fixed Issues")), FixedIssuesPage.class, params));
if (SecurityUtils.canReadCode(getProject()))
- tabs.add(new BuildTab(Model.of("Changes"), BuildChangesPage.class, BuildChangesPage.paramsOf(getBuild())));
+ tabs.add(new BuildTab(Model.of(_T("Changes")), BuildChangesPage.class, BuildChangesPage.paramsOf(getBuild())));
List<BuildTabContribution> contributions = new ArrayList<>(OneDev.getExtensions(BuildTabContribution.class));
contributions.sort(Comparator.comparing(BuildTabContribution::getOrder));
@@ -561,7 +567,7 @@ public abstract class BuildDetailPage extends ProjectPage
public void onClick() {
OneDev.getInstance(BuildManager.class).delete(getBuild());
- Session.get().success("Build #" + getBuild().getNumber() + " deleted");
+ Session.get().success(MessageFormat.format(_T("Build #{0} deleted"), getBuild().getNumber()));
String redirectUrlAfterDelete = WebSession.get().getRedirectUrlAfterDelete(Build.class);
if (redirectUrlAfterDelete != null)
@@ -570,7 +576,7 @@ public abstract class BuildDetailPage extends ProjectPage
setResponsePage(ProjectBuildsPage.class, ProjectBuildsPage.paramsOf(getProject()));
}
- }.add(new ConfirmClickModifier("Do you really want to delete this build?"));
+ }.add(new ConfirmClickModifier(_T("Do you really want to delete this build?")));
}
};
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/InvalidBuildPage.html b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/InvalidBuildPage.html
index a6cee89e13..ed396440fc 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/InvalidBuildPage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/InvalidBuildPage.html
@@ -2,23 +2,23 @@
<div class="card m-2 m-sm-5">
<div class="card-body">
<h2 class="text-danger">
- Commit of the build is missing
+ <wicket:t>Commit of the build is missing</wicket:t>
</h2>
<p>
- This might happen when project points to a wrong git repository, or the commit is garbage collected.
+ <wicket:t>This might happen when project points to a wrong git repository, or the commit is garbage collected.</wicket:t>
</p>
<div class="bg-light rounded p-4 mb-5">
- <div class="h6 mb-2">Missing Commit</div>
+ <div class="h6 mb-2"><wicket:t>Missing Commit</wicket:t></div>
<div wicket:id="missingCommit" class="text-monospace font-size-sm mb-4"></div>
- <div class="h6 mb-2">Job Name</div>
+ <div class="h6 mb-2"><wicket:t>Job Name</wicket:t></div>
<div wicket:id="jobName"></div>
</div>
- <a wicket:id="delete" class="btn btn-danger">Delete Build</a>
+ <a wicket:id="delete" class="btn btn-danger"><wicket:t>Delete Build</wicket:t></a>
</div>
</div>
<wicket:fragment wicket:id="projectTitleFrag">
<span class="d-flex align-items-center">
- <a wicket:id="builds" class="text-nowrap">Builds</a>
+ <a wicket:id="builds" class="text-nowrap"><wicket:t>Builds</wicket:t></a>
<span class="dot"></span>
<span wicket:id="buildNumber"></span>
</span>
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/InvalidBuildPage.java b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/InvalidBuildPage.java
index af4178c829..84f6033aa9 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/InvalidBuildPage.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/InvalidBuildPage.java
@@ -1,8 +1,11 @@
package io.onedev.server.web.page.project.builds.detail;
+import static io.onedev.server.web.translation.Translation._T;
+
+import java.text.MessageFormat;
+
import javax.persistence.EntityNotFoundException;
-import io.onedev.server.web.component.link.ViewStateAwarePageLink;
import org.apache.wicket.Component;
import org.apache.wicket.Session;
import org.apache.wicket.markup.html.basic.Label;
@@ -22,6 +25,7 @@ import io.onedev.server.model.Build;
import io.onedev.server.model.Project;
import io.onedev.server.security.SecurityUtils;
import io.onedev.server.web.WebSession;
+import io.onedev.server.web.component.link.ViewStateAwarePageLink;
import io.onedev.server.web.page.project.ProjectPage;
import io.onedev.server.web.page.project.builds.ProjectBuildsPage;
import io.onedev.server.web.page.project.dashboard.ProjectDashboardPage;
@@ -43,7 +47,7 @@ public class InvalidBuildPage extends ProjectPage {
Long buildNumber = params.get(PARAM_BUILD).toLong();
Build build = OneDev.getInstance(BuildManager.class).find(getProject(), buildNumber);
if (build == null)
- throw new EntityNotFoundException("Unable to find build #" + buildNumber + " in project " + getProject());
+ throw new EntityNotFoundException(MessageFormat.format(_T("Unable to find build #{0} in project {1}"), buildNumber, getProject()));
Preconditions.checkState(!build.isValid());
return build;
}
@@ -65,7 +69,7 @@ public class InvalidBuildPage extends ProjectPage {
public void onClick() {
OneDev.getInstance(BuildManager.class).delete(getBuild());
- Session.get().success("Build #" + getBuild().getNumber() + " deleted");
+ Session.get().success(MessageFormat.format(_T("Build #{0} deleted"), getBuild().getNumber()));
String redirectUrlAfterDelete = WebSession.get().getRedirectUrlAfterDelete(Build.class);
if (redirectUrlAfterDelete != null)
@@ -80,7 +84,7 @@ public class InvalidBuildPage extends ProjectPage {
setVisible(SecurityUtils.canManageBuild(getBuild()));
}
- }.add(new ConfirmClickModifier("Do you really want to delete build #" + getBuild().getNumber() + "?")));
+ }.add(new ConfirmClickModifier(MessageFormat.format(_T("Do you really want to delete build #{0}?"), getBuild().getNumber()))));
}
public static PageParameters paramsOf(Build build) {
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/BuildArtifactsPage.html b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/BuildArtifactsPage.html
index 5756cb518d..88d4685913 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/BuildArtifactsPage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/BuildArtifactsPage.html
@@ -1,7 +1,7 @@
<wicket:extend>
- <a wicket:id="upload" class="btn btn-light btn-hover-primary btn-block mb-4"><wicket:svg href="upload" class="icon mr-2"></wicket:svg> Upload</a>
+ <a wicket:id="upload" class="btn btn-light btn-hover-primary btn-block mb-4"><wicket:svg href="upload" class="icon mr-2"></wicket:svg> <wicket:t>Upload</wicket:t></a>
<div wicket:id="artifacts" class="build-artifacts"></div>
- <div wicket:id="noArtifacts" class="alert alert-light-warning alert-notice">No artifacts published</div>
+ <div wicket:id="noArtifacts" class="alert alert-light-warning alert-notice"><wicket:t>No artifacts published</wicket:t></div>
<wicket:fragment wicket:id="artifactFrag">
<a wicket:id="link">
<svg wicket:id="icon" class="icon"/>
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/BuildArtifactsPage.java b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/BuildArtifactsPage.java
index 429f60ac23..b4f2b39a74 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/BuildArtifactsPage.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/BuildArtifactsPage.java
@@ -45,6 +45,8 @@ import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.request.mapper.parameter.PageParameters;
+import static io.onedev.server.web.translation.Translation._T;
+
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
@@ -95,8 +97,8 @@ public class BuildArtifactsPage extends BuildDetailPage {
List<IColumn<Pair<String, ArtifactInfo>, Void>> columns = new ArrayList<>();
- columns.add(new TreeColumn<>(Model.of("Name")));
- columns.add(new AbstractColumn<>(Model.of("Size")) {
+ columns.add(new TreeColumn<>(Model.of(_T("Name"))));
+ columns.add(new AbstractColumn<>(Model.of(_T("Size"))) {
@Override
public void populateItem(Item<ICellPopulator<Pair<String, ArtifactInfo>>> cellItem, String componentId, IModel<Pair<String, ArtifactInfo>> rowModel) {
@@ -111,7 +113,7 @@ public class BuildArtifactsPage extends BuildDetailPage {
}
});
- columns.add(new AbstractColumn<>(Model.of("Last Modified")) {
+ columns.add(new AbstractColumn<>(Model.of(_T("Last Modified"))) {
@Override
public void populateItem(Item<ICellPopulator<Pair<String, ArtifactInfo>>> cellItem, String componentId, IModel<Pair<String, ArtifactInfo>> rowModel) {
@@ -132,9 +134,9 @@ public class BuildArtifactsPage extends BuildDetailPage {
super.updateAjaxAttributes(attributes);
String confirmMessage;
if (rowModel.getObject().getRight() instanceof DirectoryInfo)
- confirmMessage = "Do you really want to delete this directory?";
+ confirmMessage = _T("Do you really want to delete this directory?");
else
- confirmMessage = "Do you really want to delete this file?";
+ confirmMessage = _T("Do you really want to delete this file?");
attributes.getAjaxCallListeners().add(new ConfirmClickListener(confirmMessage));
}
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.html b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.html
index 42006e82b5..68748d4270 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.html
@@ -1,6 +1,6 @@
<wicket:extend>
<div class="changes">
<div wicket:id="commits"></div>
- <div class="font-size-sm text-muted mt-4"><wicket:svg href="bulb" class="icon mr-1 mt-n1"/> This page lists changes since previous build on <a href="https://docs.onedev.io/concepts#build-stream" class="link-primary" target="_blank">same stream</a></div>
+ <div class="font-size-sm text-muted mt-4"><wicket:svg href="bulb" class="icon mr-1 mt-n1"/> <wicket:t>This page lists changes since previous build on <a href="https://docs.onedev.io/concepts#build-stream" class="link-primary" target="_blank">same stream</a></wicket:t></div>
</div>
</wicket:extend>
\ No newline at end of file
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/pipeline/BuildPipelinePage.html b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/pipeline/BuildPipelinePage.html
index 4df96c11e8..2162f491e4 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/pipeline/BuildPipelinePage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/pipeline/BuildPipelinePage.html
@@ -2,7 +2,7 @@
<div wicket:id="pipeline" class="build-pipeline overflow-auto autofit"></div>
<div class="font-size-sm text-muted mt-3">
<wicket:svg href="bulb" class="icon"/>
- This tab shows the pipeline containing current build.
- Check <a href="https://robinshen.medium.com/understanding-onedev-pipeline-db0bb0e54aa7" target="_blank">this article</a> to understand how build pipeline works
+ <wicket:t>This tab shows the pipeline containing current build.
+ Check <a href="https://robinshen.medium.com/understanding-onedev-pipeline-db0bb0e54aa7" target="_blank">this article</a> to understand how build pipeline works</wicket:t>
</div>
</wicket:extend>
\ No newline at end of file
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/codecomments/InvalidCodeCommentPage.html b/server-core/src/main/java/io/onedev/server/web/page/project/codecomments/InvalidCodeCommentPage.html
index 6661a611c2..6ba4345c7c 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/codecomments/InvalidCodeCommentPage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/codecomments/InvalidCodeCommentPage.html
@@ -2,25 +2,25 @@
<div class="card m-2 m-sm-5">
<div class="card-body">
<h2 class="text-danger">
- Some related commits of the code comment is missing
+ <wicket:t>Some related commits of the code comment is missing</wicket:t>
</h2>
<p>
- This might happen when project points to a wrong git repository, or the commit is garbage collected.
+ <wicket:t>This might happen when project points to a wrong git repository, or the commit is garbage collected.</wicket:t>
</p>
<div class="bg-light rounded p-4 mb-5">
- <div class="h6 mb-2">Missing Commits</div>
+ <div class="h6 mb-2"><wicket:t>Missing Commits</wicket:t></div>
<div wicket:id="missingCommits" class="text-monospace font-size-sm mb-4"></div>
- <div class="h6 mb-2">Comment on File</div>
+ <div class="h6 mb-2"><wicket:t>Comment on File</wicket:t></div>
<div wicket:id="commentFile" class="mb-4"></div>
- <div class="h6 mb-2">Comment Content</div>
+ <div class="h6 mb-2"><wicket:t>Comment Content</wicket:t></div>
<div wicket:id="commentContent"></div>
</div>
- <a wicket:id="delete" class="btn btn-danger">Delete Comment</a>
+ <a wicket:id="delete" class="btn btn-danger"><wicket:t>Delete Comment</wicket:t></a>
</div>
</div>
<wicket:fragment wicket:id="projectTitleFrag">
<span class="d-flex align-items-center">
- <a wicket:id="codeComments" class="text-nowrap">Code Comments</a>
+ <a wicket:id="codeComments" class="text-nowrap"><wicket:t>Code Comments</wicket:t></a>
<span class="dot"></span>
<span wicket:id="codeCommentNumber"></span>
</span>
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/codecomments/InvalidCodeCommentPage.java b/server-core/src/main/java/io/onedev/server/web/page/project/codecomments/InvalidCodeCommentPage.java
index b6a6f36d9b..8a9654699f 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/codecomments/InvalidCodeCommentPage.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/codecomments/InvalidCodeCommentPage.java
@@ -1,7 +1,10 @@
package io.onedev.server.web.page.project.codecomments;
+import static io.onedev.server.web.translation.Translation._T;
import static java.util.stream.Collectors.toList;
+import java.text.MessageFormat;
+
import org.apache.wicket.Component;
import org.apache.wicket.Session;
import org.apache.wicket.markup.head.CssHeaderItem;
@@ -73,7 +76,7 @@ public class InvalidCodeCommentPage extends ProjectPage {
public void onClick() {
OneDev.getInstance(CodeCommentManager.class).delete(getCodeComment());
- Session.get().success("Code comment #" + getCodeComment().getId() + " deleted");
+ Session.get().success(MessageFormat.format(_T("Code comment #{0} deleted"), getCodeComment().getId()));
String redirectUrlAfterDelete = WebSession.get().getRedirectUrlAfterDelete(CodeComment.class);
if (redirectUrlAfterDelete != null)
@@ -89,7 +92,7 @@ public class InvalidCodeCommentPage extends ProjectPage {
setVisible(SecurityUtils.canManageCodeComments(getCodeComment().getProject()));
}
- }.add(new ConfirmClickModifier("Really want to delete this code comment?")));
+ }.add(new ConfirmClickModifier(_T("Really want to delete this code comment?"))));
}
public static PageParameters paramsOf(CodeComment codeComment) {
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/pullrequests/InvalidPullRequestPage.html b/server-core/src/main/java/io/onedev/server/web/page/project/pullrequests/InvalidPullRequestPage.html
index d36fb4d096..e988f8c8ea 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/pullrequests/InvalidPullRequestPage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/pullrequests/InvalidPullRequestPage.html
@@ -2,29 +2,29 @@
<div class="card m-2 m-sm-5">
<div class="card-body">
<h2>
- Some related commits of the pull request are missing
+ <wicket:t>Some related commits of the pull request are missing</wicket:t>
</h2>
<p>
- This might happen when project points to a wrong git repository, or these commits are garbage collected.
+ <wicket:t>This might happen when project points to a wrong git repository, or these commits are garbage collected.</wicket:t>
</p>
<div class="bg-light rounded p-4 mb-5">
- <div class="h6 mb-2">Missing Commits</div>
+ <div class="h6 mb-2"><wicket:t>Missing Commits</wicket:t></div>
<div wicket:id="missingCommits" class="text-monospace font-size-sm mb-4"></div>
- <div class="h6 mb-2">Pull Request Branches</div>
+ <div class="h6 mb-2"><wicket:t>Pull Request Branches</wicket:t></div>
<div wicket:id="requestBranches" class="mb-4"></div>
- <div class="h6 mb-2">Pull Request Title</div>
+ <div class="h6 mb-2"><wicket:t>Pull Request Title</wicket:t></div>
<div wicket:id="requestTitle"></div>
<wicket:enclosure child="requestDescription">
- <div class="h6 mb-2">Pull Request Description</div>
+ <div class="h6 mb-2"><wicket:t>Pull Request Description</wicket:t></div>
<div wicket:id="requestDescription"></div>
</wicket:enclosure>
</div>
- <a wicket:id="delete" class="btn btn-danger">Delete Pull Request</a>
+ <a wicket:id="delete" class="btn btn-danger"><wicket:t>Delete Pull Request</wicket:t></a>
</div>
</div>
<wicket:fragment wicket:id="projectTitleFrag">
<span class="d-flex align-items-center">
- <a wicket:id="pullRequests" class="text-nowrap">Pull Requests</a>
+ <a wicket:id="pullRequests" class="text-nowrap"><wicket:t>Pull Requests</wicket:t></a>
<span class="dot"></span>
<span wicket:id="pullRequestNumber"></span>
</span>
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/pullrequests/InvalidPullRequestPage.java b/server-core/src/main/java/io/onedev/server/web/page/project/pullrequests/InvalidPullRequestPage.java
index e34ab35e5d..1f899941ff 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/pullrequests/InvalidPullRequestPage.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/pullrequests/InvalidPullRequestPage.java
@@ -1,8 +1,11 @@
package io.onedev.server.web.page.project.pullrequests;
+import static io.onedev.server.web.translation.Translation._T;
import static java.util.stream.Collectors.toList;
import static org.unbescape.html.HtmlEscape.escapeHtml5;
+import java.text.MessageFormat;
+
import javax.persistence.EntityNotFoundException;
import org.apache.wicket.Component;
@@ -80,7 +83,7 @@ public class InvalidPullRequestPage extends ProjectPage {
public void onClick() {
OneDev.getInstance(PullRequestManager.class).delete(getPullRequest());
- Session.get().success("Pull request #" + getPullRequest().getNumber() + " deleted");
+ Session.get().success(MessageFormat.format(_T("Pull request #{0} deleted"), getPullRequest().getNumber()));
String redirectUrlAfterDelete = WebSession.get().getRedirectUrlAfterDelete(PullRequest.class);
if (redirectUrlAfterDelete != null)
@@ -95,7 +98,7 @@ public class InvalidPullRequestPage extends ProjectPage {
setVisible(SecurityUtils.canManageProject(getPullRequest().getTargetProject()));
}
- }.add(new ConfirmClickModifier("Do you really want to delete pull request #" + getPullRequest().getNumber() + "?")));
+ }.add(new ConfirmClickModifier(MessageFormat.format(_T("Do you really want to delete pull request #{0}?"), getPullRequest().getNumber()))));
}
public static PageParameters paramsOf(PullRequest request) {
diff --git a/server-core/src/main/java/io/onedev/server/web/translation/Translation_zh_CN.java b/server-core/src/main/java/io/onedev/server/web/translation/Translation_zh_CN.java
index 8df5096e99..c7384820a9 100644
--- a/server-core/src/main/java/io/onedev/server/web/translation/Translation_zh_CN.java
+++ b/server-core/src/main/java/io/onedev/server/web/translation/Translation_zh_CN.java
@@ -30,6 +30,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
"<a wicket:id=\"author\" class=\"name link-gray\"></a> 于 <span wicket:id=\"date\"></span> 提交");
m.put("<a wicket:id=\"author\" class=\"name link-gray\"></a> committed with <a wicket:id=\"committer\" class=\"name link-gray\"></a> <span wicket:id=\"date\"></span>",
"<a wicket:id=\"author\" class=\"name link-gray\"></a> 于 <span wicket:id=\"date\"></span> 由 <a wicket:id=\"committer\" class=\"name link-gray\"></a> 提交");
+ m.put("<a wicket:id=\"dependents\"><span wicket:id=\"label\"></span></a> depends on me", "<a wicket:id=\"dependents\"><span wicket:id=\"label\"></span></a> 依赖于我");
m.put("<a wicket:id=\"removePassword\">Remove password</a> to force the user to authenticate via external system",
"<a wicket:id=\"removePassword\">移除密码</a> 以强制用户通过外部系统进行身份验证");
m.put("<a wicket:id=\"verifyRecoveryCode\">Verify by recovery code</a> if you can not access your TOTP authenticator",
@@ -221,8 +222,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Arbitrary type", "任意类型");
m.put("Archived", "已归档");
m.put("Arguments", "参数");
- m.put("Artifacts", "构件");
- m.put("Artifacts to Retrieve", "要检索的构件");
+ m.put("Artifacts", "制品");
+ m.put("Artifacts to Retrieve", "要检索的制品");
m.put("Ascending", "升序");
m.put("Assignees", "分配给");
m.put("Assignees Issue Field", "受让人工单字段");
@@ -230,6 +231,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Assignees have code write permission and will be responsible for merging the pull request",
"分配人员具有代码写入权限,并负责合并合并请求");
m.put("Asymmetric", "非对称");
+ m.put("At least one branch or tag should be selected", "至少选择一个分支或标签");
m.put("At least one choice need to be specified", "至少需要指定一个选项");
m.put("At least one email address should be configured, please add a new one first", "至少应配置一个电子邮件地址,请先添加一个新地址");
m.put("At least one email address should be specified", "至少需要指定一个电子邮件地址");
@@ -346,7 +348,10 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Browse code", "浏览代码");
m.put("Bug Report", "错误报告");
m.put("Build", "构建");
- m.put("Build Artifact Storage", "构建构件存储");
+ m.put("Build #{0} already finished", "构建 #{0} 已完成");
+ m.put("Build #{0} deleted", "构建 #{0} 已删除");
+ m.put("Build #{0} not finished yet", "构建 #{0} 未完成");
+ m.put("Build Artifact Storage", "构建制品存储");
m.put("Build Commit", "构建提交");
m.put("Build Context", "构建上下文");
m.put("Build Description", "构建描述");
@@ -356,6 +361,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Build Management", "构建管理");
m.put("Build Notification", "构建通知");
m.put("Build Number", "构建编号");
+ m.put("Build On Behalf Of", "构建代表");
m.put("Build Path", "构建路径");
m.put("Build Preservation", "构建保留策略");
m.put("Build Preservations", "构建保留策略");
@@ -363,6 +369,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Build Preserve Rules", "构建保留规则");
m.put("Build Provider", "构建提供者");
m.put("Build Spec", "构建规范");
+ m.put("Build Statistics", "构建统计");
m.put("Build Version", "构建版本");
m.put("Build Volume Storage Class", "构建卷存储类");
m.put("Build Volume Storage Size", "构建卷存储大小");
@@ -380,6 +387,11 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Build number", "构建编号");
m.put("Build required for deletion. Submit pull request instead", "需要构建才能删除。请提交合并请求");
m.put("Build required for this change. Submit pull request instead", "需要构建才能更改。请提交合并请求");
+ m.put("Build spec not defined", "构建规范未定义");
+ m.put("Build spec not defined (import project: {0}, import revision: {1})", "构建规范未定义(导入项目:{0},导入版本:{1})");
+ m.put("Build spec not found in commit of this build", "构建规范未在构建提交中找到");
+ m.put("Build statistics is an enterprise feature. <a href='https://onedev.io/pricing' target='_blank'>Try free</a> for 30 days",
+ "构建统计是企业版功能。<a href='https://onedev.io/pricing' target='_blank'>免费试用</a> 30 天");
m.put("Build version", "构建版本");
m.put("Build with Persistent Volume", "使用持久卷构建");
m.put("Builds", "构建");
@@ -424,9 +436,13 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Can not use current or descendant project as parent", "不能使用当前或子项目作为父项目");
m.put("Can only compare with common ancestor when different projects are involved", "跨项目比较时只能使用共同祖先");
m.put("Cancel", "取消");
+ m.put("Cancel All Queried Builds", "取消所有查询的构建");
+ m.put("Cancel Selected Builds", "取消选定的构建");
m.put("Cancel invitation", "取消邀请");
+ m.put("Cancel request submitted", "取消请求已提交");
m.put("Cancel this build", "取消此构建");
m.put("Cancelled", "已取消");
+ m.put("Cancelled By", "已取消");
m.put("Certificates to Trust", "信任的证书");
m.put("Change", "更改");
m.put("Change Detection Excludes", "变更检测排除项");
@@ -437,6 +453,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Change to another field", "更改为其他字段");
m.put("Change to another state", "更改为其他状态");
m.put("Change to another value", "更改为其他值");
+ m.put("Changes", "更改");
m.put("Changes since last review", "上次审查后的更改");
m.put("Changes since last visit", "自上次访问以来的更改");
m.put("Changes since this action", "此操作后的变更");
@@ -483,9 +500,12 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Choose YouTrack project to import issues from", "选择要导入工单的 YouTrack 项目");
m.put("Choose issue...", "选择工单...");
m.put("Choose iterations...", "选择迭代...");
+ m.put("Choose job...", "选择任务...");
+ m.put("Choose jobs...", "选择任务...");
m.put("Choose project", "选择项目");
m.put("Choose repository", "选择仓库");
m.put("Choose...", "选择...");
+ m.put("Circular build spec imports ({0})", "循环构建规范导入({0})");
m.put("Click to select a commit, or shift-click to select multiple commit", "点击选择一个提交,或按住 Shift 点击选择多个提交");
m.put("Click to show comment of marked text", "点击显示标记文本的评论");
m.put("Click to show issue details", "点击显示工单详情");
@@ -522,6 +542,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Code Search", "代码搜索");
m.put("Code clone or download", "克隆或下载代码");
m.put("Code comment", "代码评论");
+ m.put("Code comment #{0} deleted", "代码评论 #{0} 已删除");
m.put("Code comment administrative permission inside a project, including batch operations over multiple code comments",
"项目内的代码评论管理权限,包括对多个代码评论的批量操作");
m.put("Code commit", "代码提交");
@@ -535,6 +556,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Color", "颜色");
m.put("Commands", "命令");
m.put("Comment", "评论");
+ m.put("Comment Content", "评论内容");
+ m.put("Comment on File", "评论文件");
m.put("Comment too long", "评论过长");
m.put("Commented code is outdated", "注释的代码已过时");
m.put("Commented on file \"{0}\" in project \"{1}\"", "在项目 \"{1}\" 的文件 \"{0}\" 上评论");
@@ -560,6 +583,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Commit history of current path", "当前路径的提交历史");
m.put("Commit index version", "提交索引版本");
m.put("Commit not exist or access denied", "提交不存在或访问被拒绝");
+ m.put("Commit of the build is missing", "构建的提交缺失");
m.put("Commit signature required but no GPG signing key specified", "提交签名需要但未指定 GPG 签名密钥");
m.put("Commit suggestion", "提交建议");
m.put("Commits", "提交");
@@ -698,7 +722,11 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Delete All Queried Projects", "删除所有查询到的项目");
m.put("Delete All Queried Pull Requests", "删除所有查询到的合并请求");
m.put("Delete All Queried Users", "删除所有查询到的用户");
+ m.put("Delete Build", "删除构建");
+ m.put("Delete Comment", "删除评论");
+ m.put("Delete Pull Request", "删除合并请求");
m.put("Delete Selected", "删除选中的");
+ m.put("Delete Selected Builds", "删除选定的构建");
m.put("Delete Selected Comments", "删除选中的评论");
m.put("Delete Selected Issues", "删除选定的工单");
m.put("Delete Selected Memberships", "删除选定的成员");
@@ -735,6 +763,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Dependency Management", "依赖管理");
m.put("Dependency job finished", "依赖任务已完成");
m.put("Dependent Fields", "依赖字段");
+ m.put("Depends on <a wicket:id=\"dependencies\"><span wicket:id=\"label\"></span></a>", "依赖于 <a wicket:id=\"dependencies\"><span wicket:id=\"label\"></span></a>");
m.put("Descending", "降序");
m.put("Description", "描述");
m.put("Description Templates", "描述模板");
@@ -769,16 +798,20 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Display Fields", "显示字段");
m.put("Display Links", "显示链接");
m.put("Display Months", "显示月份");
+ m.put("Display Params", "显示参数");
m.put("Do Not Retrieve Groups", "不获取用户组");
m.put("Do not ignore", "不要忽略");
m.put("Do not retrieve", "不检索");
m.put("Do not retrieve groups", "不检索组");
m.put("Do you really want to cancel invitation to \"{0}\"?", "您真的要取消邀请 \"{0}\" 吗?");
+ m.put("Do you really want to cancel this build?", "您确定要取消此构建吗?");
m.put("Do you really want to change target branch to {0}?", "确定要将目标分支更改为 {0} 吗?");
m.put("Do you really want to delete \"{0}\"?", "您真的要删除 \"{0}\" 吗?");
m.put("Do you really want to delete board \"{0}\"?", "您确定要删除看板 \"{0}\" 吗?");
+ m.put("Do you really want to delete build #{0}?", "您确定要删除构建 #{0} 吗?");
m.put("Do you really want to delete group \"{0}\"?", "您真的要删除组 \"{0}\" 吗?");
m.put("Do you really want to delete iteration \"{0}\"?", "您确定要删除迭代 \"{0}\" 吗?");
+ m.put("Do you really want to delete pull request #{0}?", "您确定要删除合并请求 #{0} 吗?");
m.put("Do you really want to delete role \"{0}\"?", "确定要删除角色 \"{0}\" 吗?");
m.put("Do you really want to delete selected query watches?", "您真的要删除选中的查询订阅吗?");
m.put("Do you really want to delete tag {0}?", "确定要删除标签 {0} 吗?");
@@ -786,10 +819,13 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Do you really want to delete this SSH key?", "您确定要删除此 SSH 密钥吗?");
m.put("Do you really want to delete this access token?", "您确定要删除此访问令牌吗?");
m.put("Do you really want to delete this board?", "您确定要删除此看板吗?");
+ m.put("Do you really want to delete this build?", "您确定要删除此构建吗?");
m.put("Do you really want to delete this code comment and all its replies?", "您真的要删除此代码评论及其所有回复吗?");
m.put("Do you really want to delete this code comment?", "您真的要删除此代码评论吗?");
+ m.put("Do you really want to delete this directory?", "您确定要删除此目录吗?");
m.put("Do you really want to delete this email address?", "您真的要删除这个电子邮件地址吗?");
m.put("Do you really want to delete this field?", "您真的要删除这个字段吗?");
+ m.put("Do you really want to delete this file?", "您确定要删除此文件吗?");
m.put("Do you really want to delete this issue?", "您真的要删除这个工单吗?");
m.put("Do you really want to delete this privilege?", "确定要删除此权限吗?");
m.put("Do you really want to delete this pull request?", "确定要删除此合并请求吗?");
@@ -797,6 +833,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Do you really want to delete timesheet \"{0}\"?", "您真的要删除时间表 \"{0}\" 吗?");
m.put("Do you really want to discard batched suggestions?", "您真的要丢弃批量建议吗?");
m.put("Do you really want to enable this account?", "您真的要启用此账户吗?");
+ m.put("Do you really want to rebuild?", "您确定要重建此构建吗?");
m.put("Do you really want to remove password of this user?", "您真的要删除此用户的密码吗?");
m.put("Do you really want to remove the issue from iteration \"{0}\"?", "您真的要从迭代 \"{0}\" 中移除这个工单吗?");
m.put("Do you really want to remove this account?", "您确定要删除此账户吗?");
@@ -819,6 +856,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Due Date Issue Field", "截止日期工单字段");
m.put("Due date", "截止日期");
m.put("Duplicate authorizations found: {0}", "找到重复的授权:{0}");
+ m.put("Duration", "持续时间");
m.put("Durations", "持续时间");
m.put("ESLint Report", "ESLint 报告");
m.put("Edit", "编辑");
@@ -912,6 +950,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Error reverting on {0}: Merge conflicts detected", "revert 到 {0} 时出错:合并冲突检测到");
m.put("Error reverting on {0}: {1}", "revert 到 {0} 时出错:{1}");
m.put("Error validating auto merge commit message: {0}", "验证自动合并提交信息时出错:{0}");
+ m.put("Error validating build spec (location: {0}, error message: {1})", "验证构建规范时发生错误(位置:{0},错误消息:{1})");
+ m.put("Error validating build spec: {0}", "验证构建规范时发生错误:{0}");
m.put("Error validating commit message of \"{0}\": {1}", "验证提交信息 \"{0}\" 时出错:{1}");
m.put("Error validating commit message of <a href=\"{0}\" class='text-monospace font-size-sm'>{1}</a>: {2}",
"验证提交信息 <a href=\"{0}\" class='text-monospace font-size-sm'>{1}</a> 时出错:{2}");
@@ -962,6 +1002,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Fail build if there are vulnerabilities with or severer than specified severity level. Note that this only takes effect if build is not failed by other steps",
"如果存在或严重性高于指定严重性级别的漏洞,则失败构建。注意:此选项仅在构建未被其他步骤失败时生效");
m.put("Failed", "失败");
+ m.put("Failed to validate build spec import. Check server log for details", "无法验证构建规范导入。请检查服务器日志");
m.put("Field Bean", "字段 Bean");
m.put("Field Instance", "字段实例");
m.put("Field Name", "字段名称");
@@ -1011,6 +1052,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Fix Undefined Field Values", "修复未定义的字段值");
m.put("Fix Undefined Fields", "修复未定义的字段");
m.put("Fix Undefined States", "修复未定义的状态");
+ m.put("Fixed Issues", "已修复的工单");
m.put("Fixing Builds", "修复构建");
m.put("Fixing Commits", "修复提交");
m.put("Fixing...", "修复中...");
@@ -1024,6 +1066,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
"对于从默认分支无法到达的构建提交,应该指定一个具有管理工单权限的访问令牌作为任务密钥");
m.put("For docker aware executors, this path is inside container, and accepts both absolute path and relative path (relative to <a href='https://docs.onedev.io/concepts#job-workspace' target='_blank'>job workspace</a>). For shell related executors which runs on host machine directly, only relative path is accepted",
"对于 docker 感知执行器,此路径在容器内,并接受绝对路径和相对路径(相对于 <a href='https://docs.onedev.io/concepts#job-workspace' target='_blank'>job workspace</a>)。对于直接在主机机器上运行的 shell 相关执行器,只接受相对路径");
+ m.put("For each selected branch/tag, a separate build will be generated with branch/tag set to corresponding value",
+ "对于每个选定的分支/标签,将生成一个单独的构建,分支/标签设置为相应的值");
m.put("Force", "强制");
m.put("Forgot Password?", "忘记密码?");
m.put("Fork now", "立即分叉");
@@ -1239,6 +1283,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Insert this image", "插入此图片");
m.put("Install Subscription Key", "安装订阅密钥");
m.put("Integer", "整数");
+ m.put("Interactive web shell access to running jobs is an enterprise feature. <a href='https://onedev.io/pricing' target='_blank'>Try free</a> for 30 days",
+ "交互式 Web shell 访问运行中的任务是企业功能。<a href='https://onedev.io/pricing' target='_blank'>免费试用</a> 30 天");
m.put("Interpreter", "解释器");
m.put("Invalid PCRE syntax", "无效的 PCRE 语法");
m.put("Invalid credentials", "无效的凭据");
@@ -1349,6 +1395,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Jest Coverage Report", "Jest 覆盖率报告");
m.put("Jest Test Report", "Jest 测试报告");
m.put("Job", "任务");
+ m.put("Job \"{0}\" associated with the build not found.", "与构建关联的任务 \"{0}\" 未找到。");
m.put("Job Dependencies", "任务依赖");
m.put("Job Dependency", "任务依赖");
m.put("Job Executor", "任务执行器");
@@ -1404,6 +1451,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Labels can be defined in Administration / Label Management", "标签可以在管理 / 标签管理中定义");
m.put("Language", "语言");
m.put("Last Finished of Specified Job", "指定任务的最后完成");
+ m.put("Last Modified", "最后修改");
+ m.put("Last Update", "最后更新");
m.put("Last commit", "最后提交");
m.put("Last commit hash", "最后提交哈希");
m.put("Last commit index version", "最后提交索引版本");
@@ -1433,6 +1482,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Load Keys", "加载密钥");
m.put("Loading emojis...", "加载表情符号...");
m.put("Loading...", "加载...");
+ m.put("Log", "日志");
m.put("Log Work", "记录工作");
m.put("Log work", "记录工作");
m.put("Login Name", "登录名称");
@@ -1457,6 +1507,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Mail service not configured", "邮件服务未配置");
m.put("Malformed %sbase query", "解析%s基准查询时出错");
m.put("Malformed %squery", "解析%s查询时出错");
+ m.put("Malformed build spec (import project: {0}, import revision: {1})", "构建规范格式错误(导入项目:{0},导入版本:{1})");
m.put("Malformed email address", "格式错误的电子邮件地址");
m.put("Malformed query", "查询语法错误");
m.put("Manage Job", "管理任务");
@@ -1503,6 +1554,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Microsoft 365", "Microsoft 365");
m.put("Microsoft Entra ID", "Microsoft Entra ID");
m.put("Min Value", "最小值");
+ m.put("Missing Commit", "缺失提交");
+ m.put("Missing Commits", "缺失提交");
m.put("Month", "月");
m.put("Months", "月");
m.put("Months to Display", "显示的月数");
@@ -1516,6 +1569,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("More operations", "更多操作");
m.put("Most branch coverage", "最小的分支覆盖率");
m.put("Most line coverage", "最小的行覆盖率");
+ m.put("Most probably there are import errors in the <a wicket:id=\"buildSpec\">build spec</a>",
+ "最有可能的是<a wicket:id=\"buildSpec\">构建规范</a>中存在导入错误");
m.put("Mount Docker Sock", "挂载 Docker Sock");
m.put("Move All Queried Issues To...", "移动所有查询的工单到...");
m.put("Move All Queried Projects To...", "移动所有查询的项目到...");
@@ -1592,6 +1647,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("No aggregation", "无聚合");
m.put("No any", "无任何");
m.put("No applicable transitions or no permission to transit", "没有适用的转换或没有权限转换");
+ m.put("No artifacts published", "没有发布制品");
m.put("No branch to cherry-pick to", "没有分支可以 cherry-pick");
m.put("No branch to revert on", "没有分支可以 revert");
m.put("No branches Found", "未找到分支");
@@ -1649,6 +1705,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("No pull requests to discard", "没有要放弃的合并请求");
m.put("No pull requests to set as read", "没有要设置为已读的合并请求");
m.put("No pull requests to watch/unwatch", "没有要监视/取消监视的合并请求");
+ m.put("No refs to build on behalf of", "没有要构建的引用");
m.put("No required services", "无所需服务");
m.put("No secret config", "无秘密配置");
m.put("No services defined", "未定义服务");
@@ -1700,6 +1757,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Ok", "确定");
m.put("Old Name", "旧名称");
m.put("Old Password", "旧密码");
+ m.put("On Behalf Of", "代表");
m.put("On Branches", "在分支上");
m.put("OneDev Issue Field", "OneDev 工单字段");
m.put("OneDev Issue Link", "OneDev 工单链接");
@@ -1788,7 +1846,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Optionally specify a date field to hold due date information.<br><b>NOTE: </b> You may customize OneDev issue fields in case there is no appropriate option here",
"可选择指定一个日期字段来保存截止日期信息。<br><b>注意:</b>如果这里没有合适的选项,您可以自定义 OneDev 工单字段");
m.put("Optionally specify a path relative to <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a> to put retrieved artifacts. Leave empty to use job workspace itself",
- "可选择指定相对于 <a href='https://docs.onedev.io/concepts#job-workspace'>任务工作空间</a> 的路径来放置检索的构件。留空则使用任务工作空间本身");
+ "可选择指定相对于 <a href='https://docs.onedev.io/concepts#job-workspace'>任务工作空间</a> 的路径来放置检索的制品。留空则使用任务工作空间本身");
m.put("Optionally specify a storage class to allocate build volume dynamically. Leave empty to use default storage class. <b class='text-warning'>NOTE:</b> Reclaim policy of the storage class should be set to <code>Delete</code>, as the volume is only used to hold temporary build files",
"可选择指定一个存储类来动态分配构建卷。留空则使用默认存储类。<b class='text-warning'>注意:</b>存储类的回收策略应设置为 <code>Delete</code>,因为该卷仅用于保存临时构建文件");
m.put("Optionally specify a working period field to hold estimated time infomration.<br><b>NOTE: </b> You may customize OneDev issue fields in case there is no appropriate option here",
@@ -1808,7 +1866,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
"可选择指定适用于提交消息页脚检查的提交类型(按 ENTER 添加值)。留空则适用于所有类型");
m.put("Optionally specify arguments to run above image", "可选择指定运行上述镜像的参数");
m.put("Optionally specify artifacts to retrieve from the dependency into <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>. Only published artifacts (via artifact publish step) can be retrieved. Leave empty to not retrieve any artifacts",
- "可选择指定从依赖项检索到 <a href='https://docs.onedev.io/concepts#job-workspace'>任务工作空间</a> 的构件。只能检索已发布的构件(通过构件发布步骤)。留空则不检索任何构件");
+ "可选择指定从依赖项检索到 <a href='https://docs.onedev.io/concepts#job-workspace'>任务工作空间</a> 的制品。只能检索已发布的制品(通过制品发布步骤)。留空则不检索任何制品");
m.put("Optionally specify authorized executor for this job. Leave empty to use first applicable executor (or use auto-discovered executor if no executors are defined)",
"可选择指定此任务的授权执行器。留空则使用第一个适用的执行器(如果未定义执行器,则使用自动发现的执行器)");
m.put("Optionally specify authorized roles to press this button. If not specified, all users are allowed",
@@ -1886,7 +1944,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Optionally specify path relative to <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a> to be used as trivy <a href='https://aquasecurity.github.io/trivy/v0.50/docs/scanner/secret/#configuration' target='_blank'>secret config</a>",
"可选择指定相对于 <a href='https://docs.onedev.io/concepts#job-workspace'>任务工作空间</a> 的路径,用作 trivy <a href='https://aquasecurity.github.io/trivy/v0.50/docs/scanner/secret/#configuration' target='_blank'>密钥配置</a>");
m.put("Optionally specify path relative to <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a> to publish artifacts from. Leave empty to use job workspace itself",
- "可选择指定相对于 <a href='https://docs.onedev.io/concepts#job-workspace'>任务工作空间</a> 的路径来发布构件。留空则使用任务工作空间本身");
+ "可选择指定相对于 <a href='https://docs.onedev.io/concepts#job-workspace'>任务工作空间</a> 的路径来发布制品。留空则使用任务工作空间本身");
m.put("Optionally specify platform to pull, for instance <tt>linux/amd64</tt>. Leave empty to pull all platforms in image",
"可选择指定要拉取的平台,例如 <tt>linux/amd64</tt>。留空则拉取镜像中的所有平台");
m.put("Optionally specify project to show builds of. Leave empty to show builds of all projects with permissions",
@@ -1910,7 +1968,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Optionally specify revision to create branch from. Leave empty to create from build commit",
"可选择指定用于创建分支的修订版本。留空则从构建提交创建");
m.put("Optionally specify separate directory to store build artifacts. Non-absolute directory is considered to be relative to site directory",
- "可选择指定单独的目录来存储构建构件。非绝对目录被视为相对于站点目录");
+ "可选择指定单独的目录来存储构建制品。非绝对目录被视为相对于站点目录");
m.put("Optionally specify separate directory to store git lfs files. Non-absolute directory is considered to be relative to site directory",
"可选择指定单独的目录来存储 git lfs 文件。非绝对目录被视为相对于站点目录");
m.put("Optionally specify separate directory to store package files. Non-absolute directory is considered to be relative to site directory",
@@ -2004,6 +2062,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Parameter Specs", "参数");
m.put("Params", "参数");
m.put("Params & Triggers", "参数与触发器");
+ m.put("Params to Display", "显示参数");
m.put("Parent Bean", "父Bean");
m.put("Parent OneDev Project", "父OneDev项目");
m.put("Parent Project", "父项目");
@@ -2052,6 +2111,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Physical memory in mega bytes", "物理内存(兆字节)");
m.put("Pick Existing", "选择现有");
m.put("Pin this issue", "置顶此工单");
+ m.put("Pipeline", "流水线");
m.put("Plain text expected", "需要纯文本");
m.put("Platform", "平台");
m.put("Platforms", "平台");
@@ -2073,6 +2133,9 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Please resolve undefined states below. Note that if you select to delete an undefined state, all issues with that state will be deleted",
"请解决以下未定义的状态。请注意,如果您选择删除未定义的状态,所有具有该状态的工单都将被删除");
m.put("Please select branches to create pull request", "请选择分支创建合并请求");
+ m.put("Please select builds to cancel", "请选择要取消的构建");
+ m.put("Please select builds to delete", "请选择要删除的构建");
+ m.put("Please select builds to re-run", "请选择要重新运行的构建");
m.put("Please select comments to delete", "请选择要删除的评论");
m.put("Please select comments to set resolved", "请选择要设置为已解决的评论");
m.put("Please select comments to set unresolved", "请选择要设置为未解决的评论");
@@ -2185,12 +2248,15 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Publish Unit Test Report Step", "发布单元测试报告步骤");
m.put("Pull Image", "拉取镜像");
m.put("Pull Request", "合并请求");
+ m.put("Pull Request Branches", "合并请求分支");
+ m.put("Pull Request Description", "合并请求描述");
m.put("Pull Request Filter", "合并请求过滤");
m.put("Pull Request Management", "合并请求管理");
m.put("Pull Request Markdown Report", "合并请求 Markdown 报告");
m.put("Pull Request Notification", "合并请求通知");
m.put("Pull Request Notification Unsubscribed", "合并请求通知退订");
m.put("Pull Request Statistics", "合并请求统计");
+ m.put("Pull Request Title", "合并请求标题");
m.put("Pull Requests", "合并请求");
m.put("Pull docker image as OCI layout via crane. This step needs to be executed by server docker executor, remote docker executor, or Kubernetes executor",
"此步骤需要由服务器 docker 执行器、远程 docker 执行器或 Kubernetes 执行器执行");
@@ -2256,15 +2322,22 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Query/order packages", "查询/排序包");
m.put("Query/order projects", "查询/排序项目");
m.put("Query/order pull requests", "查询/排序合并请求");
+ m.put("Queueing Takes", "排队中");
m.put("Quick Search", "快速搜索");
m.put("Quote", "引用");
m.put("RESTful API", "RESTful API");
+ m.put("Ran On Agent", "在代理上运行");
+ m.put("Re-run All Queried Builds", "重新运行所有查询的构建");
+ m.put("Re-run Selected Builds", "重新运行选定的构建");
+ m.put("Re-run request submitted", "重新运行请求已提交");
m.put("Re-run this build", "重新运行此构建");
m.put("Read", "读取");
m.put("Read body", "读取正文");
m.put("Readiness Check Command", "准备检查命令");
+ m.put("Really want to delete this code comment?", "您确定要删除此代码评论吗?");
m.put("Rebase", "变基");
m.put("Rebase source branch commits", "Rebase 源分支上的提交");
+ m.put("Rebuild manually", "手动重建");
m.put("Receive Posted Email", "接收已发布邮件");
m.put("Receivers", "接收者");
m.put("Recovery code", "恢复代码");
@@ -2339,6 +2412,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Resource Settings", "资源设置");
m.put("Restore Source Branch", "恢复源分支");
m.put("Restored source branch", "已恢复源分支");
+ m.put("Resubmitted manually", "手动重新提交");
+ m.put("Retried At", "重试于");
m.put("Retrieve Groups", "检索组");
m.put("Retrieve LFS Files", "检索 LFS 文件");
m.put("Retrieve Submodules", "检索子模块");
@@ -2391,6 +2466,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Run trivy rootfs scanner to scan various <a href='https://aquasecurity.github.io/trivy/v0.50/docs/coverage/language/#supported-languages' target='_blank'>distribution files</a>. It can only be executed by a docker aware executor and is recommended to run against staging area of your project",
"运行 trivy 根文件系统扫描器扫描各种 <a href='https://aquasecurity.github.io/trivy/v0.50/docs/coverage/language/#supported-languages' target='_blank'>分布文件</a>。它只能由 docker 感知执行器执行,建议在项目暂存区域运行。");
m.put("Running", "运行中");
+ m.put("Running Takes", "运行中");
m.put("SMTP Host", "SMTP 主机");
m.put("SMTP Password", "SMTP 密码");
m.put("SMTP User", "SMTP 用户");
@@ -2435,6 +2511,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Select", "选择");
m.put("Select Branch to Cherry Pick to", "选择分支进行 cherry-pick");
m.put("Select Branch to Revert on", "选择分支进行 revert");
+ m.put("Select Branch/Tag", "选择分支/标签");
m.put("Select Existing", "选择已有");
m.put("Select Project", "选择项目");
m.put("Select iteration to schedule issues into", "选择迭代调度问题");
@@ -2560,6 +2637,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Single sign on via twitch.tv", "通过 twitch.tv 单点登录");
m.put("Site", "站点");
m.put("Site Publish Enabled", "站点发布已启用");
+ m.put("Size", "大小");
m.put("Size invalid", "大小无效");
m.put("Slack Notifications", "Slack 通知");
m.put("Smtp Ssl Setting", "SMTP SSL 设置");
@@ -2568,6 +2646,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Some one changed the content you are editing. Reload the page and try again.", "有人修改了您正在编辑的内容。重新加载页面并重试。");
m.put("Some other pull requests are opening to this branch", "其他合并请求正在打开此分支");
m.put("Some projects might be hidden due to permission policy", "由于权限策略,某些项目可能被隐藏");
+ m.put("Some related commits of the code comment is missing", "与代码评论相关的提交缺失");
+ m.put("Some related commits of the pull request are missing", "与合并请求相关的提交缺失");
m.put("Some required builds not passed", "一些必需的构建未通过");
m.put("Sort", "排序");
m.put("Source", "源");
@@ -2602,6 +2682,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
"指定 <a href='https://docs.onedev.io/tutorials/cicd/job-secrets' target='_blank'>job secret</a> 的值是具有代码写入权限的访问令牌。提交、问题和合并请求也将以访问令牌所有者的名义创建");
m.put("Specify <a href='https://github.com/rust-lang/rust-clippy'>rust clippy</a> json output file relative to <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>. This file can be generated with clippy json output option, for instance <code>cargo clippy --message-format json>check-result.json</code>. Use * or ? for pattern match",
"指定 <a href='https://github.com/rust-lang/rust-clippy'>rust clippy</a> json 输出文件相对 <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>。此文件可以通过 clippy json 输出选项生成,例如 <code>cargo clippy --message-format json>check-result.json</code>。使用 * 或 ? 进行模式匹配");
+ m.put("Specify Build Options", "指定构建选项");
m.put("Specify CPD result xml file relative to <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, for instance, <tt>target/cpd.xml</tt>. Use * or ? for pattern match",
"指定 CPD 结果 xml 文件相对 <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>,例如 <tt>target/cpd.xml</tt>。使用 * 或 ? 进行模式匹配");
m.put("Specify Commit Message", "指定提交消息");
@@ -2955,6 +3036,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Statistics", "统计");
m.put("Stats", "统计");
m.put("Stats Group", "统计组");
+ m.put("Status", "状态");
m.put("Step", "步骤");
m.put("Step Template", "步骤模板");
m.put("Step Templates", "步骤模板");
@@ -2969,7 +3051,12 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Storage not found", "未找到存储");
m.put("Stored with Git LFS", "使用 Git LFS 存储");
m.put("Subject", "主题");
+ m.put("Submit Reason", "提交原因");
+ m.put("Submitted After", "提交后");
+ m.put("Submitted At", "提交于");
+ m.put("Submitted Before", "提交前");
m.put("Submitted By", "提交者");
+ m.put("Submitted manually", "手动构建");
m.put("Submitter", "提交者");
m.put("Subscription Key", "订阅密钥");
m.put("Subscription Management", "订阅管理");
@@ -3090,6 +3177,10 @@ public class Translation_zh_CN extends TranslationResourceBundle {
"此密钥用于在项目层次结构中下载和上传缓存(按顺序从当前项目搜索到根项目)");
m.put("This key or one of its subkey is already in use", "此密钥或其子密钥已被使用");
m.put("This line has confusable unicode character modification", "此行有可疑的 Unicode 字符修改");
+ m.put("This might happen when project points to a wrong git repository, or the commit is garbage collected.",
+ "这可能发生在项目指向错误的 git 仓库,或者这些提交被垃圾回收。");
+ m.put("This might happen when project points to a wrong git repository, or these commits are garbage collected.",
+ "这可能发生在项目指向错误的 git 仓库,或者这些提交被垃圾回收。");
m.put("This name has already been used by another board", "此名称已被另一个看板使用");
m.put("This name has already been used by another group", "此名称已被另一个组使用");
m.put("This name has already been used by another issue board in the project", "此名称已被项目中的另一个工单看板使用");
@@ -3097,6 +3188,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("This name has already been used by another role", "此名称已被另一个角色使用");
m.put("This name has already been used by another role.", "此名称已被另一个角色使用。");
m.put("This operation is disallowed by branch protection rule", "此操作被分支保护规则禁止");
+ m.put("This page lists changes since previous build on <a href=\"https://docs.onedev.io/concepts#build-stream\" class=\"link-primary\" target=\"_blank\">same stream</a>",
+ "此页面列出了自上一个构建以来的更改,在 <a href=\"https://docs.onedev.io/concepts#build-stream\" class=\"link-primary\" target=\"_blank\">相同流</a> 上");
m.put("This page lists recent commits fixing the issue", "此页面列出了修复工单的最近提交");
m.put("This permission enables one to access confidential issues", "此权限允许访问机密工单");
m.put("This permission enables one to schedule issues into iterations", "此权限允许将工单调度到迭代中");
@@ -3121,6 +3214,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
"此步骤设置 Renovate 缓存。如果需要使用,请将其放置在 Renovate 步骤之前");
m.put("This step sets up trivy db cache to speed up various scanner steps. Place it before scanner steps if you want to use it",
"此步骤设置 trivy 数据库缓存以加速各种扫描步骤。如果需要使用,请将其放置在扫描步骤之前");
+ m.put("This tab shows the pipeline containing current build. Check <a href=\"https://robinshen.medium.com/understanding-onedev-pipeline-db0bb0e54aa7\" target=\"_blank\">this article</a> to understand how build pipeline works",
+ "此标签显示包含当前构建的流水线。请查看 <a href=\"https://robinshen.medium.com/understanding-onedev-pipeline-db0bb0e54aa7\" target=\"_blank\">这篇文章</a> 以了解流水线的工作原理");
m.put("This trigger will only be applicable if tagged commit is reachable from branches specified here. Multiple branches should be separated with spaces. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude. Leave empty to match all branches",
"此触发器仅在标记的提交可从此处指定的分支访问时适用。多个分支应以空格分隔。使用 '**'、'*' 或 '?' 进行 <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>路径通配符匹配</a>。以 '-' 为前缀表示排除。留空表示匹配所有分支");
m.put("This user is authenticating via external system.", "此用户通过外部系统进行身份验证。");
@@ -3191,15 +3286,19 @@ public class Translation_zh_CN extends TranslationResourceBundle {
"为增强安全性,您的账户已强制启用两阶段验证。请按照以下步骤进行设置");
m.put("Two-factor authentication is now configured", "两阶段验证现已配置完成");
m.put("Type", "类型");
+ m.put("Type <code>yes</code> below to cancel all queried builds", "在下面输入 <code>yes</code> 以取消所有查询的构建");
+ m.put("Type <code>yes</code> below to cancel selected builds", "在下面输入 <code>yes</code> 以取消选定的构建");
m.put("Type <code>yes</code> below to confirm deleting all queried users", "在下方输入 <code>yes</code> 确认删除所有查询的用户");
m.put("Type <code>yes</code> below to confirm deleting selected users", "在下方输入 <code>yes</code> 确认删除选定的用户");
m.put("Type <code>yes</code> below to copy all queried issues to project \"{0}\"", "在下方输入 <code>yes</code> 以将所有查询的工单复制到项目 \"{0}\"");
m.put("Type <code>yes</code> below to copy selected issues to project \"{0}\"", "在下方输入 <code>yes</code> 以将选定的工单复制到项目 \"{0}\"");
+ m.put("Type <code>yes</code> below to delete all queried builds", "在下面输入 <code>yes</code> 以删除所有查询的构建");
m.put("Type <code>yes</code> below to delete all queried comments", "在下面输入 <code>yes</code> 以删除所有查询的评论");
m.put("Type <code>yes</code> below to delete all queried issues", "在下方输入 <code>yes</code> 以删除所有查询的工单");
m.put("Type <code>yes</code> below to delete all queried memberships", "在下方输入 <code>yes</code> 删除所有查询的成员");
m.put("Type <code>yes</code> below to delete all queried projects", "在下方输入 <code>yes</code> 以删除所有查询到的项目");
m.put("Type <code>yes</code> below to delete all queried pull requests", "在下方输入 <code>yes</code> 以删除所有查询的合并请求");
+ m.put("Type <code>yes</code> below to delete selected builds", "在下面输入 <code>yes</code> 以删除选定的构建");
m.put("Type <code>yes</code> below to delete selected comments", "在下方输入 <code>yes</code> 以删除选中的评论");
m.put("Type <code>yes</code> below to delete selected issues", "在下方输入 <code>yes</code> 以删除选定的工单");
m.put("Type <code>yes</code> below to delete selected memberships", "在下方输入 <code>yes</code> 删除选定的成员");
@@ -3211,6 +3310,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Type <code>yes</code> below to move all queried projects to be under \"{0}\"", "在下方输入 <code>yes</code> 以将所有查询到的项目移动到 \"{0}\" 下");
m.put("Type <code>yes</code> below to move selected issues to project \"{0}\"", "在下方输入 <code>yes</code> 以将选定的工单移动到项目 \"{0}\"");
m.put("Type <code>yes</code> below to move selected projects to be under \"{0}\"", "在下方输入 <code>yes</code> 以将选中的项目移动到 \"{0}\" 下");
+ m.put("Type <code>yes</code> below to re-run all queried builds", "在下面输入 <code>yes</code> 以重新运行所有查询的构建");
+ m.put("Type <code>yes</code> below to re-run selected builds", "在下面输入 <code>yes</code> 以重新运行选定的构建");
m.put("Type <code>yes</code> below to set all queried as root projects", "在下方输入 <code>yes</code> 以将所有查询到的项目设置为根项目");
m.put("Type <code>yes</code> below to set selected as root projects", "在下方输入 <code>yes</code> 以将选中的项目设置为根项目");
m.put("Type password here", "在此输入密码");
@@ -3224,9 +3325,14 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("Unable to create protected tag", "无法创建受保护的标签");
m.put("Unable to diff as some line is too long.", "无法比较,因为某些行太长");
m.put("Unable to diff as the file is too large.", "无法比较,因为文件太大");
+ m.put("Unable to find build #{0} in project {1}", "在项目 {1} 中找不到构建 #{0}");
+ m.put("Unable to find commit to import build spec (import project: {0}, import revision: {1})",
+ "无法找到要导入的构建规范的提交(导入项目:{0},导入版本:{1})");
m.put("Unable to find issue #{0} in project {1}", "在项目 {1} 中找不到工单 #{0}");
+ m.put("Unable to find project to import build spec: {0}", "无法找到要导入的构建规范的项目:{0}");
m.put("Unable to find pull request #{0} in project {1}", "在项目 {1} 中找不到合并请求 #{0}");
m.put("Unable to find timesheet: ", "找不到时间表:");
+ m.put("Unable to import build spec (import project: {0}, import revision: {1}): {2}", "无法导入构建规范(导入项目:{0},导入版本:{1}):{2}");
m.put("Unable to notify user as mail service is not configured", "无法通知用户,因为邮件服务未配置");
m.put("Unable to send verification email as mail service is not configured yet", "无法发送验证电子邮件,因为邮件服务未配置");
m.put("Unauthorize this user", "取消此用户的授权");
@@ -3472,6 +3578,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("before specified date", "在指定日期之前");
m.put("branch the build commit is merged into", "构建提交合并到的分支");
m.put("branch the job is running against", "任务运行的分支");
+ m.put("branch {0}", "分支 {0}");
m.put("branches", "分支");
m.put("builds", "构建");
m.put("choose a color for this state", "选择一个颜色");
@@ -3504,11 +3611,13 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("find issue by number", "通过编号查找工单");
m.put("find pull request by number", "通过编号查找合并请求");
m.put("find pull request with this number", "查找具有此编号的合并请求");
+ m.put("found 1 build", "找到 1 个构建");
m.put("found 1 comment", "找到 1 条评论");
m.put("found 1 issue", "找到 1 个工单");
m.put("found 1 project", "找到 1 个项目");
m.put("found 1 pull request", "找到 1 个合并请求");
m.put("found 1 user", "找到 1 个用户");
+ m.put("found {0} builds", "找到 {0} 个构建");
m.put("found {0} comments", "找到 {0} 条评论");
m.put("found {0} issues", "找到 {0} 个工单");
m.put("found {0} projects", "找到 {0} 个项目");
@@ -3541,6 +3650,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("month:Nov", "十一月");
m.put("month:Oct", "十月");
m.put("month:Sep", "九月");
+ m.put("n/a", "不适用");
m.put("new field", "新字段");
m.put("on file {0}", "在文件 {0} 上");
m.put("opened", "已创建");
@@ -3563,6 +3673,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("space", "空格");
m.put("submit", "提交");
m.put("tag the job is running against", "任务运行的标签");
+ m.put("tag {0}", "标签 {0}");
m.put("tags", "标签");
m.put("time aggregation link", "时间聚合链接");
m.put("touching specified path", "涉及指定路径");
@@ -3584,6 +3695,7 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("{0} ahead", "{0} 领先");
m.put("{0} behind", "{0} 落后");
m.put("{0} branches", "{0} 个分支");
+ m.put("{0} build(s)", "{0} 个构建");
m.put("{0} child projects", "{0} 个子项目");
m.put("{0} commits", "{0} 个提交");
m.put("{0} commits ahead of base branch", "{0} 个提交领先于基准分支");
@@ -3601,7 +3713,8 @@ public class Translation_zh_CN extends TranslationResourceBundle {
m.put("{javax.validation.constraints.NotEmpty.message}", "不能为空");
m.put("{javax.validation.constraints.NotNull.message}", "不能为空");
m.put("{javax.validation.constraints.Size.message}", "至少需要指定一个值");
- m.put("logged work", "已花费");
+ m.put("Invalid access token: {0}", "无效的访问令牌:{0}");
+ m.put("No authorized job secret found (project: {0}, job secret: {1})", "未找到授权的任务密钥(项目:{0},任务密钥:{1})");
// Manually added keys
m.put("Create Administrator Account", "创建管理员账户");
diff --git a/server-ee b/server-ee
index 58f38c5dd8..cf088d6544 160000
--- a/server-ee
+++ b/server-ee
@@ -1 +1 @@
-Subproject commit 58f38c5dd80787982c9a40576ac630479f8b99c3
+Subproject commit cf088d654447e6cf1a9ce2490b7543584eaa5f0f