Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jenkinsci/jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsuke committed Aug 26, 2018
2 parents d735752 + b8b484e commit d6d2a17
Show file tree
Hide file tree
Showing 17 changed files with 258 additions and 36 deletions.
53 changes: 27 additions & 26 deletions core/src/main/java/hudson/console/ConsoleAnnotator.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,41 +91,42 @@ public static <T> ConsoleAnnotator<T> cast(ConsoleAnnotator<? super T> a) {
return (ConsoleAnnotator)a;
}

/**
* Bundles all the given {@link ConsoleAnnotator} into a single annotator.
*/
public static <T> ConsoleAnnotator<T> combine(Collection<? extends ConsoleAnnotator<? super T>> all) {
switch (all.size()) {
case 0: return null; // none
case 1: return cast(all.iterator().next()); // just one
}

class Aggregator extends ConsoleAnnotator<T> {
List<ConsoleAnnotator<T>> list;
private static final class ConsoleAnnotatorAggregator<T> extends ConsoleAnnotator<T> {
List<ConsoleAnnotator<T>> list;

Aggregator(Collection list) {
this.list = new ArrayList<ConsoleAnnotator<T>>(list);
}
ConsoleAnnotatorAggregator(Collection list) {
this.list = new ArrayList<ConsoleAnnotator<T>>(list);
}

public ConsoleAnnotator annotate(T context, MarkupText text) {
ListIterator<ConsoleAnnotator<T>> itr = list.listIterator();
while (itr.hasNext()) {
ConsoleAnnotator a = itr.next();
ConsoleAnnotator b = a.annotate(context,text);
if (a!=b) {
if (b==null) itr.remove();
else itr.set(b);
}
public ConsoleAnnotator annotate(T context, MarkupText text) {
ListIterator<ConsoleAnnotator<T>> itr = list.listIterator();
while (itr.hasNext()) {
ConsoleAnnotator a = itr.next();
ConsoleAnnotator b = a.annotate(context,text);
if (a!=b) {
if (b==null) itr.remove();
else itr.set(b);
}
}

switch (list.size()) {
switch (list.size()) {
case 0: return null; // no more annotator left
case 1: return list.get(0); // no point in aggregating
default: return this;
}
}
}
return new Aggregator(all);
}

/**
* Bundles all the given {@link ConsoleAnnotator} into a single annotator.
*/
public static <T> ConsoleAnnotator<T> combine(Collection<? extends ConsoleAnnotator<? super T>> all) {
switch (all.size()) {
case 0: return null; // none
case 1: return cast(all.iterator().next()); // just one
}

return new ConsoleAnnotatorAggregator<T>(all);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import javax.servlet.ServletException;
Expand Down Expand Up @@ -133,7 +134,8 @@ public void _doBuild(StaplerRequest req, StaplerResponse rsp) throws IOException
* This method is supposed to be invoked from {@link ParameterizedJobMixIn#doBuild(StaplerRequest, StaplerResponse, TimeDuration)}.
*/
public void _doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException {
if (delay==null) delay=new TimeDuration(getJob().getQuietPeriod());
if (delay==null)
delay=new TimeDuration(TimeUnit.MILLISECONDS.convert(getJob().getQuietPeriod(), TimeUnit.SECONDS));


List<ParameterValue> values = new ArrayList<ParameterValue>();
Expand Down Expand Up @@ -182,7 +184,8 @@ public void buildWithParameters(StaplerRequest req, StaplerResponse rsp, @CheckF
values.add(value);
}
}
if (delay==null) delay=new TimeDuration(getJob().getQuietPeriod());
if (delay==null)
delay=new TimeDuration(TimeUnit.MILLISECONDS.convert(getJob().getQuietPeriod(), TimeUnit.SECONDS));

Queue.Item item = Jenkins.getInstance().getQueue().schedule2(
getJob(), delay.getTimeInSeconds(), new ParametersAction(values), ParameterizedJobMixIn.getBuildCause(getJob(), req)).getItem();
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/jenkins/model/ParameterizedJobMixIn.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.CheckForNull;
import javax.servlet.ServletException;
import static javax.servlet.http.HttpServletResponse.SC_CREATED;
Expand Down Expand Up @@ -190,7 +191,7 @@ public final boolean isParameterized() {
@SuppressWarnings("deprecation")
public final void doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException {
if (delay == null) {
delay = new TimeDuration(asJob().getQuietPeriod());
delay=new TimeDuration(TimeUnit.MILLISECONDS.convert(asJob().getQuietPeriod(), TimeUnit.SECONDS));
}

if (!asJob().isBuildable()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

login=Iniciar sesión
login=Iniciar sesi\u00F3n
25 changes: 25 additions & 0 deletions core/src/main/resources/jenkins/install/Messages_zh_CN.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# The MIT License
#
# Copyright 2018 suren
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

SetupWizard_ConfigureInstance_ValidationErrors=\u6709\u975E\u6CD5\u8BBE\u7F6E\u3002\u8BF7\u67E5\u770B\u9519\u8BEF\u4FE1\u606F\u4E2D\u8BE6\u60C5\u3002
SetupWizard_ConfigureInstance_RootUrl_Empty=URL \u4E0D\u80FD\u4E3A\u7A7A
SetupWizard_ConfigureInstance_RootUrl_Invalid=URL \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u786E\u8BA4\u4F60\u4F7F\u7528 http:// \u6216 https:// \u7B49\u5408\u6CD5\u7684\u57DF\u540D\u3002
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# The MIT License
#
# Copyright (c) 2018, suren
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

Manage\ Jenkins=\u7BA1\u7406 Jenkins
tooltip=\u6709 {0} \u4E2A\u6D3B\u8DC3\u7684\u7BA1\u7406\u76D1\u63A7\u3002
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# The MIT License
#
# Copyright (c) 2012, CloudBees, Intl., Nicolas De loof
# Copyright (c) 2018, CloudBees, Intl., Nicolas De loof, suren
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -48,3 +48,6 @@ SystemInfoLink.DisplayName=\u7CFB\u7EDF\u4FE1\u606F
SystemLogLink.DisplayName=\u7CFB\u7EDF\u65E5\u5FD7
SystemLogLink.Description=\u7CFB\u7EDF\u65E5\u5FD7\u4ECE<tt>java.util.logging</tt>\u6355\u83B7Jenkins\u76F8\u5173\u7684\u65E5\u5FD7\u4FE1\u606F\u3002
ShutdownLink.DisplayName_cancel=\u53D6\u6D88\u5173\u673A

CliLink.DisplayName=Jenkins \u547D\u4EE4\u884C\u63A5\u53E3
AdministrativeMonitorsDecorator.DisplayName=\u7BA1\u7406\u76D1\u63A7\u901A\u77E5
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Jenkins\ URL=Dirección web de Jenkins
Sender\ E-mail\ Address=Dirección de remitente
Jenkins\ URL=Direcci\u00F3n web de Jenkins
Sender\ E-mail\ Address=Direcci\u00F3n de remitente
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ Cancel=\u53D6\u6D88
Show\ Legacy\ API\ Token=\u663E\u793A\u9057\u7559\u7684 API Token
Legacy\ API\ Token=\u9057\u7559\u7684 API Token
Change\ API\ Token=\u4FEE\u6539 API Token
TokenNeverUsedValue=Token \u4ECE\u672A\u7528\u8FC7\u7684\u503C
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
tokenGenerationOnCreationEnabled=\u4E3A\u6BCF\u4E2A\u65B0\u521B\u5EFA\u7684\u7528\u6237\u751F\u6210\u4E00\u4E2A\u9057\u7559\u7684 API token \uFF08\u4E0D\u5EFA\u8BAE\uFF09
creationOfLegacyTokenEnabled=\u5141\u8BB8\u7528\u6237\u624B\u52A8\u521B\u5EFA\u4E00\u4E2A\u9057\u7559\u7684 API token \uFF08\u4E0D\u5EFA\u8BAE\uFF09
usageStatisticsEnabled=\u542F\u7528 API Token \u4F7F\u7528\u7EDF\u8BA1
API\ Token=API Token
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,8 @@ RevokeAllSelected_nothing=\u6CA1\u6709\u9009\u62E9 Token\uFF0C\u8BF7\u81F3\u5C11
Select=\u9009\u62E9
only\ recent=\u4EC5\u6700\u8FD1\u7528\u8FC7\u7684
only\ fresh=\u4EC5\u65B0\u7684
all=\u6240\u6709
all=\u6240\u6709
Recently\ used\ token=\u6700\u8FD1\u4F7F\u7528\u8FC7\u7684 Token
No\ fresh\ token=\u6CA1\u6709\u65B0\u7684 Token
Fresh\ token=\u65B0\u7684 Token
No\ recently\ used\ token=\u6CA1\u6709\u6700\u8FD1\u4F7F\u7528\u8FC7\u7684 Token
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# The MIT License
#
# Copyright (c) 2018, suren
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

CSRFAdministrativeMonitor.displayName=\u8DE8\u7AD9\u8BF7\u6C42\u4F2A\u9020\uFF08CSRF\uFF09\u4FDD\u62A4\u76D1\u63A7
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# The MIT License
#
# Copyright (c) 2018, suren
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

blurb=\u7531\u4E8E\u6211\u4EEC\u4E0D\u786E\u5B9A\u5B83\u662F\u5426\u5141\u8BB8\u4EE3\u7406\u6267\u884C\uFF0CJenkins \u5DF2\u7ECF\u62D2\u7EDD\u4E86\u90E8\u5206\u6765\u81EA\u4EE3\u7406\u7684\u547D\u4EE4\uFF0C\u8FD9\u53EF\u80FD\u4F1A\u5F71\u54CD\u90E8\u5206\u6784\u5EFA\u3002\
\u60A8\u56E0\u8BE5\u68C0\u67E5\u8BE5\u60C5\u51B5\uFF0C\u51B3\u5B9A\u662F\u5426\u628A\u8FD9\u4E9B\u547D\u4EE4\u6DFB\u52A0\u5230\u767D\u540D\u5355\u3002
Dismiss=\u53D6\u6D88
Examine=\u68C0\u67E5
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# The MIT License
#
# Copyright (c) 2018, suren
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

Whitelist=\u767D\u540D\u5355
Agent\ &\#8594;\ Master\ Access\ Control=Master \u5BF9\u4EE3\u7406\u7684\u8BBF\u95EE\u63A7\u5236
Update=\u66F4\u65B0
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# The MIT License
#
# Copyright (c) 2018, suren
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

blurb=\u4ECE\u4EE3\u7406\u5230 Master \u7684\u5B89\u5168\u5B50\u7CFB\u7EDF\u5DF2\u5173\u95ED\u3002
<a href="https://jenkins.io/redirect/security-144" target="_blank">\u8BF7\u67E5\u770B\u6587\u6863</a>\u540E\u8003\u8651\u662F\u5426\u8981\u6253\u5F00\u5B89\u5168\u8BBE\u7F6E\u3002
Dismiss=\u53D6\u6D88
Examine=\u68C0\u67E5
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# The MIT License
#
# Copyright (c) 2018, suren
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

AdminCallableMonitor.DisplayName=\u62D2\u7EDD\u4EE3\u7406\u5230 Master \u7684\u8BBF\u95EE
MasterKillSwitchWarning.DisplayName=\u7981\u7528\u4EE3\u7406\u5230 Master \u7684\u8BBF\u95EE\u63A7\u5236
Loading

0 comments on commit d6d2a17

Please sign in to comment.