未验证 提交 5a24186d 编写于 作者: J Jesse Glick

Merge branch 'master' into whitelist-JENKINS-47736

......@@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>2.101-SNAPSHOT</version>
<version>2.102-SNAPSHOT</version>
</parent>
<artifactId>cli</artifactId>
......
......@@ -29,7 +29,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>2.101-SNAPSHOT</version>
<version>2.102-SNAPSHOT</version>
</parent>
<artifactId>jenkins-core</artifactId>
......
......@@ -193,7 +193,7 @@ public class Util {
StringBuilder str = new StringBuilder((int)logfile.length());
try (BufferedReader r = new BufferedReader(new InputStreamReader(Files.newInputStream(logfile.toPath()), charset))) {
try (BufferedReader r = Files.newBufferedReader(logfile.toPath(), charset)) {
char[] buf = new char[1024];
int len;
while ((len = r.read(buf, 0, buf.length)) > 0)
......
package hudson.init.impl;
import hudson.init.Initializer;
import java.io.EOFException;
import jenkins.model.Jenkins;
import org.kohsuke.stapler.WebApp;
import org.kohsuke.stapler.compression.CompressionFilter;
......@@ -17,7 +18,7 @@ import java.util.logging.Logger;
import org.kohsuke.stapler.Stapler;
/**
* @author Kohsuke Kawaguchi
* Deals with exceptions that get thrown all the way up to the Stapler rendering layer.
*/
public class InstallUncaughtExceptionHandler {
......@@ -25,23 +26,19 @@ public class InstallUncaughtExceptionHandler {
@Initializer
public static void init(final Jenkins j) throws IOException {
CompressionFilter.setUncaughtExceptionHandler(j.servletContext, new UncaughtExceptionHandler() {
@Override
public void reportException(Throwable e, ServletContext context, HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException {
CompressionFilter.setUncaughtExceptionHandler(j.servletContext, (e, context, req, rsp) -> {
if (rsp.isCommitted()) {
LOGGER.log(Level.WARNING, null, e);
LOGGER.log(isEOFException(e) ? Level.FINE : Level.WARNING, null, e);
return;
}
req.setAttribute("javax.servlet.error.exception",e);
try {
WebApp.get(j.servletContext).getSomeStapler()
.invoke(req,rsp, Jenkins.getInstance(), "/oops");
WebApp.get(j.servletContext).getSomeStapler().invoke(req, rsp, Jenkins.get(), "/oops");
} catch (ServletException | IOException x) {
if (!Stapler.isSocketException(x)) {
throw x;
}
}
}
});
try {
Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler());
......@@ -57,6 +54,16 @@ public class InstallUncaughtExceptionHandler {
}
}
private static boolean isEOFException(Throwable e) {
if (e == null) {
return false;
} else if (e instanceof EOFException) {
return true;
} else {
return isEOFException(e.getCause());
}
}
/** An UncaughtExceptionHandler that just logs the exception */
private static class DefaultUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
......
......@@ -76,8 +76,8 @@ import hudson.util.ConsistentHash.Hash;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.ref.WeakReference;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
......@@ -377,7 +377,7 @@ public class Queue extends ResourceController implements Saveable {
// first try the old format
File queueFile = getQueueFile();
if (queueFile.exists()) {
try (BufferedReader in = new BufferedReader(new InputStreamReader(Files.newInputStream(queueFile.toPath())))) {
try (BufferedReader in = Files.newBufferedReader(queueFile.toPath(), Charset.defaultCharset())) {
String line;
while ((line = in.readLine()) != null) {
AbstractProject j = Jenkins.getInstance().getItemByFullName(line, AbstractProject.class);
......
......@@ -38,6 +38,7 @@ import java.io.RandomAccessFile;
import java.io.Reader;
import java.io.StringWriter;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
/**
......@@ -68,7 +69,7 @@ public class TextFile {
public String read() throws IOException {
StringWriter out = new StringWriter();
PrintWriter w = new PrintWriter(out);
try (BufferedReader in = new BufferedReader(new InputStreamReader(Files.newInputStream(file.toPath()), "UTF-8"))) {
try (BufferedReader in = Files.newBufferedReader(file.toPath(), StandardCharsets.UTF_8)) {
String line;
while ((line = in.readLine()) != null)
w.println(line);
......
......@@ -8,7 +8,11 @@ import hudson.model.View;
import java.util.Collections;
import java.util.List;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;
@Extension
@Restricted(DoNotUse.class)
public class NewViewLink extends TransientViewActionFactory {
@VisibleForTesting
......@@ -40,7 +44,8 @@ public class NewViewLink extends TransientViewActionFactory {
@Override
public String getUrlName() {
return URL_NAME;
String urlName = Jenkins.getInstance().getRootUrl() + URL_NAME;
return urlName;
}
private boolean hasPermission(View view) {
......
......@@ -55,6 +55,11 @@ Node.Mode.EXCLUSIVE=\u53EA\u5141\u8BB8\u8FD0\u884C\u7ED1\u5B9A\u5230\u8FD9\u53F0
MyView.DisplayName=\u6211\u7684\u89C6\u56FE
AbstractItem.Pronoun=\u4EFB\u52A1
MyViewsProperty.DisplayName=\u6211\u7684\u89C6\u56FE
MyViewsProperty.GlobalAction.DisplayName=\u6211\u7684\u89C6\u56FE
ManageJenkinsAction.DisplayName=\u7CFB\u7EDF\u7BA1\u7406
ParametersDefinitionProperty.DisplayName=\u53C2\u6570\u5316\u6784\u5EFA\u8FC7\u7A0B
ListView.DisplayName=\u7B80\u5355\u89C6\u56FE
......
......@@ -51,7 +51,7 @@ THE SOFTWARE.
<j:if test="${!empty(app.itemMap)}">
<div class="item-copy">
<p class="description">${%CopyOption.description}:</p>
<p class="description">${%CopyOption.description}</p>
<div class="add-item-copy">
<input type="radio" name="mode" value="copy" />
<div class="icon">
......
......@@ -5,7 +5,7 @@ ItemName.label=Enter an item name
ItemName.validation.required=This field cannot be empty, please enter a valid name
ItemType.validation.required=Please select an item type
CopyOption.placeholder=Type to autocomplete
CopyOption.description=if you want to create a new item from other existing, you can use this option
CopyOption.description=If you want to create a new item from other existing, you can use this option:
CopyOption.label=Copy from
CopyExisting=Copy existing {0}
......@@ -30,9 +30,9 @@ NewJob=\
# This field cannot be empty, please enter a valid name
ItemName.validation.required=\
\u041f\u043e\u043b\u0435\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0435 \u043f\u0440\u0430\u0437\u043d\u043e. \u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u043a\u043e\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u043c\u0435
# if you want to create a new item from other existing, you can use this option
# If you want to create a new item from other existing, you can use this option:
CopyOption.description=\
\u0422\u043e\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0432\u0430 \u0434\u0430 \u0441\u044a\u0437\u0434\u0430\u0434\u0435\u0442\u0435 \u043d\u043e\u0432 \u043e\u0431\u0435\u043a\u0442 \u043d\u0430 \u0431\u0430\u0437\u0430\u0442\u0430 \u043d\u0430 \u0441\u044a\u0449\u0435\u0441\u0442\u0432\u0443\u0432\u0430\u0449.
\u0422\u043e\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0432\u0430 \u0434\u0430 \u0441\u044a\u0437\u0434\u0430\u0434\u0435\u0442\u0435 \u043d\u043e\u0432 \u043e\u0431\u0435\u043a\u0442 \u043d\u0430 \u0431\u0430\u0437\u0430\u0442\u0430 \u043d\u0430 \u0441\u044a\u0449\u0435\u0441\u0442\u0432\u0443\u0432\u0430\u0449:
# Please select an item type
ItemType.validation.required=\
\u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u0432\u0438\u0434 \u043d\u0430 \u043e\u0431\u0435\u043a\u0442\u0430
......
......@@ -26,7 +26,7 @@ CopyExisting=Copier un {0} existant
ItemName.help=Champ obligatoire
ItemName.label=Saisissez un nom
ItemName.validation.required=Ce champ ne peut pas \u00eatre vide. Veuillez saisir un nom valide et appuyer sur OK.
ItemType.validation.required=Veuillez choisir un type d\'Item
ItemType.validation.required=Veuillez choisir un type d\u2019\u00e9l\u00e9ment
CopyOption.placeholder=Taper pour autocompl\u00e9tion
CopyOption.description=Si vous voulez cr\u00e9er un nouvel item \u00e0 partir d\'un autre, vous pouvez utiliser cette option
CopyOption.description=Si vous voulez cr\u00e9er un nouvel \u00e9l\u00e9ment \u00e0 partir d\u2019un autre, vous pouvez utiliser cette option&nbsp;:
CopyOption.label=Copier depuis
......@@ -5,7 +5,7 @@ ItemName.label=\u012eveskite elemento pavadinim\u0105
ItemName.validation.required=\u0160is laukas negali b\u016bti tu\u0161\u010dias. Pra\u0161ome \u012fvesti tinkam\u0105 pavadinim\u0105 ir spauskite mygtuk\u0105 \u201eGerai\u201c.
ItemType.validation.required=Pra\u0161ome parinkti elemento tip\u0105
CopyOption.placeholder=Ra\u0161ykite automatiniam u\u017ebaigimui
CopyOption.description=galite naudoti \u0161i\u0105 parinkt\u012f, jei norite sukurti nauj\u0105 element\u0105 pagal kit\u0105, jau egzistuojant\u012f
CopyOption.description=galite naudoti \u0161i\u0105 parinkt\u012f, jei norite sukurti nauj\u0105 element\u0105 pagal kit\u0105, jau egzistuojant\u012f:
CopyOption.label=Kopijuoti i\u0161
CopyExisting=Kopijuoti esam\u0105 {0}
......@@ -26,5 +26,5 @@ ItemName.label=Podaj nazw\u0119 projektu
ItemName.validation.required=To pole nie mo\u017Ce by\u0107 puste, podaj nazw\u0119 projektu
ItemType.validation.required=Wybierz rodzaj projektu
CopyOption.placeholder=Podaj nazw\u0119
CopyOption.description=Je\u015Bli chcesz stworzy\u0107 nowy projekt na podstawie istniej\u0105cego, mo\u017Cesz u\u017Cy\u0107 tej opcji
CopyOption.description=Je\u015Bli chcesz stworzy\u0107 nowy projekt na podstawie istniej\u0105cego, mo\u017Cesz u\u017Cy\u0107 tej opcji:
CopyOption.label=Kopiuj z
......@@ -5,7 +5,7 @@ ItemName.label=\u0423\u043D\u0435\u0441\u0438\u0442\u0435 \u0438\u043C\u0435 \u0
ItemName.help=\u041E\u0431\u0430\u0432\u0435\u0437\u043D\u043E \u043F\u043E\u0459\u0435
ItemName.validation.required=\u041F\u043E\u0459\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435 \u0431\u0438\u0442\u0438 \u043F\u0440\u0430\u0437\u043D\u043E. \u0423\u043D\u0435\u0441\u0438\u0442\u0435 \u0432\u0430\u0436\u0435\u045B\u0435 \u0438\u043C\u0435.
ItemType.validation.required=\u0423\u043D\u0435\u0441\u0438\u0442\u0435 \u0442\u0438\u043F \u043E\u0431\u0458\u0435\u043A\u0442\u0430
CopyOption.description=\u043E\u0432\u043E \u0432\u0430\u043C \u043E\u043C\u043E\u0433\u0443\u045B\u0430\u0432\u0430 \u0434\u0430 \u043A\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043D\u043E\u0432\u0438 \u043E\u0431\u0458\u0435\u043A\u0430\u0442 \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0443 \u043F\u043E\u0441\u0442\u043E\u0458\u0435\u045B\u0435\u0433.
CopyOption.description=\u043E\u0432\u043E \u0432\u0430\u043C \u043E\u043C\u043E\u0433\u0443\u045B\u0430\u0432\u0430 \u0434\u0430 \u043A\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043D\u043E\u0432\u0438 \u043E\u0431\u0458\u0435\u043A\u0430\u0442 \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0443 \u043F\u043E\u0441\u0442\u043E\u0458\u0435\u045B\u0435\u0433.:
CopyOption.label=\u041A\u043E\u043F\u0438\u0440\u0430\u0458 \u043E\u0434
CopyOption.placeholder=\u0423\u043D\u0435\u0448\u0435\u043D\u043E \u0438\u043C\u0435 \u045B\u0435 \u0441\u0435 \u0430\u0443\u0442\u043E\u043C\u0430\u0442\u0441\u043A\u0438 \u0434\u043E\u043F\u0438\u0441\u0430\u043D\u043E
JobName=\u041D\u0430\u0437\u0438\u0432 {0}
......
# The MIT License
#
# Copyright (c) 2013, Chunghwa Telecom Co., Ltd., Pei-Tang Huang
#
# 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.
Create\ First\ Admin\ User=\u5EFA\u7ACB\u7B2C\u4E00\u4E2A\u7BA1\u7406\u5458
# The MIT License
#
# Copyright (c) 2017-, vivo.com
# Chinese (Simplified) translated by Gentle Yang
#
# 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.
authenticate-security-token.getting.started=\u5165\u95e8
authenticate-security-token.unlock.jenkins=\u89e3\u9501jenkins
jenkins.install.findSecurityTokenMessage=\u4e3a\u4e86\u786e\u4fdd\u7ba1\u7406\u5458\u5b89\u5168\u5730\u5b89\u88c5jenkins\uff0c\
\u5bc6\u7801\u5df2\u5199\u5165\u5230\u65e5\u5fd7\u4e2d\uff08<small><a href="https://jenkins.io/redirect/find-jenkins-logs" target="_blank">\u4e0d\u77e5\u9053\u5728\u54ea\u91cc\uff1f</a></small>\uff09\u8be5\u6587\u4ef6\u5728\u670d\u52a1\u5668\u4e0a\uff1a<p><small><code>{0}</code></small></p>
authenticate-security-token.copy.password=\u8bf7\u4ece\u672c\u5730\u590d\u5236\u5bc6\u7801\u5e76\u7c98\u8d34\u5230\u4e0b\u9762\u3002
authenticate-security-token.error=\u9519\u8bef\uff1a
authenticate-security-token.password.incorrect=\u8f93\u5165\u7684\u5bc6\u7801\u6709\u8bef\uff0c\u8bf7\u68c0\u67e5\u6587\u4ef6\u4ee5\u786e\u8ba4\u5bc6\u7801\u6b63\u786e
authenticate-security-token.password.administrator=\u7ba1\u7406\u5458\u5bc6\u7801
authenticate-security-token.continue=\u7ee7\u7eed
# The MIT License
#
# Copyright (c) 2017-, vivo.com
# Chinese (Simplified) translated by Gentle Yang
#
# 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.
HTTP\ Proxy\ Configuration=\u914d\u7f6eHTTP\u4ee3\u7406
# The MIT License
#
# Copyright (c) 2017-, vivo.com
# Chinese (Simplified) translated by Gentle Yang
#
# 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.
Create\ First\ Admin\ User=\u521b\u5efa\u7b2c\u4e00\u4e2a\u7ba1\u7406\u5458\u7528\u6237
# The MIT License
#
# Copyright (c) 2017-, vivo.com
# Chinese (Simplified) translated by Gentle Yang
#
# 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.
msg.before=\u6b22\u8fce\u4f7f\u7528jenkins {0}%21\u0020
msg.link=\u73b0\u5728\u66f4\u65b0
msg.after=\u0020\u4ee5\u83b7\u5f97\u65b0\u7279\u6027
# The MIT License
#
# Copyright (c) 2017-, vivo.com
# Chinese (Simplified) translated by Gentle Yang
#
# 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.
installWizard_welcomePanel_title=\u65b0\u624b\u5165\u95e8
installWizard_welcomePanel_banner=\u81ea\u5b9a\u4e49jenkins
installWizard_welcomePanel_message=\u63d2\u4ef6\u901a\u8fc7\u9644\u52a0\u7279\u6027\u6765\u6269\u5c55jenkins\u4ee5\u6ee1\u8db3\u4e0d\u540c\u7684\u9700\u6c42\u3002
installWizard_welcomePanel_recommendedActionTitle=\u5b89\u88c5\u63a8\u8350\u7684\u63d2\u4ef6
installWizard_welcomePanel_recommendedActionDetails=\u5b89\u88c5jenkins\u793e\u533a\u63a8\u8350\u7684\u63d2\u4ef6\u3002
installWizard_welcomePanel_customizeActionTitle=\u9009\u62e9\u63d2\u4ef6\u6765\u5b89\u88c5
installWizard_welcomePanel_customizeActionDetails=\u9009\u62e9\u5e76\u5b89\u88c5\u6700\u9002\u5408\u7684\u63d2\u4ef6\u3002
installWizard_jenkinsVersionTitle=Jenkins
installWizard_offline_title=\u79bb\u7ebf
installWizard_offline_message=\u8be5jenkins\u5b9e\u4f8b\u4f3c\u4e4e\u5df2\u79bb\u7ebf\u3002\
<p style="font-size:18px; margin-top: 6%"> \
\u53c2\u8003 <a href="https://jenkins.io/redirect/offline-installation" target="_blank">\u79bb\u7ebfjenkins\u5b89\u88c5\u6587\u6863</a>\u4e86\u89e3\u672a\u63a5\u5165\u4e92\u8054\u7f51\u65f6\u5b89\u88c5jenkins\u7684\u66f4\u591a\u4fe1\u606f\u3002<br/><br/> \
\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u4e00\u4e2a\u4ee3\u7406\u6216\u8df3\u8fc7\u63d2\u4ef6\u5b89\u88c5\u6765\u9009\u62e9\u7ee7\u7eed\u3002\
</p>
installWizard_error_header=\u51fa\u73b0\u4e00\u4e2a\u9519\u8bef
installWizard_error_message=\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u4e00\u4e2a\u9519\u8bef\uff1a
installWizard_error_connection=\u65e0\u6cd5\u8fde\u63a5\u5230jenkins
installWizard_error_restartNotSupported=\u4e0d\u652f\u6301\u81ea\u52a8\u91cd\u542f\uff0c\u8bf7\u624b\u52a8\u91cd\u542f\u8be5\u5b9e\u4f8b
installWizard_installCustom_title=\u65b0\u624b\u5165\u95e8
installWizard_installCustom_selectAll=\u5168\u90e8
installWizard_installCustom_selectNone=None
installWizard_installCustom_selectRecommended=\u5efa\u8bae
installWizard_installCustom_selected=\u5df2\u9009\u62e9
installWizard_installCustom_dependenciesPrefix=\u4f9d\u8d56
installWizard_installCustom_pluginListDesc=\u6ce8\u610f\uff0c\u8fd9\u91cc\u5e76\u672a\u663e\u793a\u5b8c\u6574\u7684\u63d2\u4ef6\u5217\u8868\u3002\u4e00\u65e6\u521d\u59cb\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u901a\u8fc7<strong>\u63d2\u4ef6\u7ba1\u7406\u5668</strong>\u5b89\u88c5\u5176\u4ed6\u63d2\u4ef6\u3002<a href="https://jenkins.io/redirect/installation-wizard" target="_blank">\u67e5\u770bwiki\u4e86\u89e3\u66f4\u591a</a>\u3002
installWizard_goBack=\u540e\u9000
installWizard_goInstall=\u5b89\u88c5
installWizard_installing_title=\u65b0\u624b\u5165\u95e8
installWizard_installing_detailsLink=\u8be6\u60c5\u3002\u3002\u3002
installWizard_installComplete_title=\u65b0\u624b\u5165\u95e8
installWizard_installComplete_banner=Jenkins\u5df2\u5c31\u7eea\uff01
installWizard_installComplete_bannerRestart=Jenkins\u5373\u5c06\u5c31\u7eea\uff01
installWizard_pluginsInstalled_message=\u63d2\u4ef6\u5b89\u88c5\u5df2\u5b8c\u6210\u3002
installWizard_installComplete_message=jenkins\u5b89\u88c5\u5df2\u5b8c\u6210\u3002
installWizard_installComplete_finishButtonLabel=\u5f00\u59cb\u4f7f\u7528jenkins
installWizard_installComplete_installComplete_restartRequiredMessage=jenkins\u5b89\u88c5\u5df2\u5b8c\u6210\uff0c\u4f46\u90e8\u5206\u63d2\u4ef6\u9700\u8981\u91cd\u542fjenkins\u3002
installWizard_installComplete_installComplete_restartRequiredNotSupportedMessage=jenkins\u5b89\u88c5\u5df2\u5b8c\u6210\uff0c\u4f46\u90e8\u5206\u63d2\u4ef6\u9700\u8981\u91cd\u542fjenkins\uff0c\u8be5\u5b9e\u4f8b\u4f3c\u4e4e\u4e0d\u652f\u6301\u81ea\u52a8\u91cd\u542f\u3002\u8bf7\u73b0\u5728\u624b\u52a8\u91cd\u542f\u5b9e\u4f8b\u4ee5\u5b8c\u6210\u5b89\u88c5\u3002
installWizard_installComplete_restartLabel=\u91cd\u542f
installWizard_installIncomplete_title=\u6062\u590d\u5b89\u88c5
installWizard_installIncomplete_banner=\u6062\u590d\u5b89\u88c5
installWizard_installIncomplete_message=jenkins\u5728\u5b89\u88c5\u8fc7\u7a0b\u5df2\u91cd\u542f\uff0c\u90e8\u5206\u63d2\u4ef6\u4f3c\u4e4e\u672a\u5b89\u88c5\u3002
installWizard_installIncomplete_resumeInstallationButtonLabel=\u6062\u590d
installWizard_saveFirstUser=\u4fdd\u5b58\u5e76\u5b8c\u6210
installWizard_skipFirstUser=\u4f7f\u7528admin\u8d26\u6237\u7ee7\u7eed
installWizard_firstUserSkippedMessage=<div class="alert alert-warning fade in">\
\u4f60\u5df2\u8df3\u8fc7\u521b\u5efaadmin\u7528\u6237\u7684\u6b65\u9aa4\u3002\u8981\u767b\u5f55\u8bf7\u4f7f\u7528\u7528\u6237\u540d\uff1a'admin' \
\u53ca\u7528\u4e8e\u8bbf\u95ee\u5b89\u88c5\u5411\u5bfc\u7684\u7ba1\u7406\u5458\u5bc6\u7801\u3002\
</div>
installWizard_addFirstUser_title=\u65b0\u624b\u5165\u95e8
installWizard_configureProxy_label=\u914d\u7f6e\u4ee3\u7406
installWizard_configureProxy_save=\u4fdd\u5b58\u5e76\u7ee7\u7eed
installWizard_gettingStarted_title=\u65b0\u624b\u5165\u95e8
installWizard_saveSecurity=\u4fdd\u5b58\u5e76\u7ee7\u7eed
installWizard_skipPluginInstallations=\u8df3\u8fc7\u63d2\u4ef6\u5b89\u88c5
installWizard_installIncomplete_dependenciesLabel=\u4f9d\u8d56
installWizard_installingConsole_dependencyIndicatorNote=** - \u9700\u8981\u4f9d\u8d56
installWizard_websiteLinkLabel=\u7f51\u7ad9
installWizard_pluginInstallFailure_title=\u5b89\u88c5\u5931\u8d25
installWizard_pluginInstallFailure_message=\u90e8\u5206\u63d2\u4ef6\u5b89\u88c5\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\u6216\u7ee7\u7eed
installWizard_continue=\u7ee7\u7eed
installWizard_retry=\u91cd\u8bd5
installWizard_upgradePanel_title=\u66f4\u65b0
installWizard_upgradePanel_banner=\u6b22\u8fce\u4f7f\u7528jenkins {0} \uff01
installWizard_upgradePanel_message=jenkins {0} \u5305\u62ec\u4e00\u4e9b\u4e0d\u9519\u7684\u65b0\u7279\u6027\uff0c\u6211\u4eec\u8ba4\u4e3a\u4f60\u53ef\u80fd\u4f1a\u559c\u6b22\uff0c\u5b89\u88c5\u8fd9\u4e9b\u9644\u52a0\u63d2\u4ef6\u6765\u4f53\u9a8c\uff01
installWizard_upgradePanel_skipRecommendedPlugins=\u4e0d\uff0c\u8c22\u8c22
installWizard_upgradeComplete_title=\u66f4\u65b0
installWizard_pluginsInstalled_banner=\u6b22\u8fce\u4f7f\u7528jenkins {0} \uff01
installWizard_upgradeComplete_message=\u606d\u559c\uff01\u4f60\u5df2\u66f4\u65b0\u5230jenkins {0} \u3002</p><p>\u8bbf\u95ee<a target="_blank" href="https://jenkins.io/2.0/">jenkins\u7f51\u7ad9</a>\u4e86\u89e3\u66f4\u591a\u65b0\u7279\u6027\u7684\u4fe1\u606f\u3002
installWizard_upgradeSkipped_title=\u66f4\u65b0
installWizard_upgradeSkipped_banner=\u7279\u6027\u672a\u5b89\u88c5
installWizard_upgradeSkipped_message=<div class="alert alert-warning fade in">\u5efa\u8bae\u7684\u63d2\u4ef6\u5c06\u4e0d\u88ab\u5b89\u88c5\u3002</div> \
<p style="padding: 0 4px">\u5982\u679c\u4f60\u6539\u53d8\u4e3b\u610f\u4e86\uff0c\u8fd8\u53ef\u4ee5\u4ece\u63d2\u4ef6\u7ba1\u7406\u5668\u5b89\u88c5\u65b0\u7279\u6027\u3002</p>\
<p style="padding: 0 4px">\u8bbf\u95ee<a target="_blank" href="https://jenkins.io/2.0/">jenkins\u5b98\u7f51</a>\uff0c\u4e86\u89e3\u8fd9\u4e9b\u65b0\u7279\u6027\u5982\u4f55\u63d0\u5347jenkins\u4f53\u9a8c\u3002</p>
installWizard_upgrading_title=\u6b63\u5728\u5b89\u88c5\u63d2\u4ef6
installWizard_upgradeComplete_finishButtonLabel=\u5b8c\u6210
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc.
# Copyright (c) 2004-2017, Sun Microsystems, Inc.
# suren <zxjlwt@126.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
......@@ -20,5 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Login\ Error=\u767B\u5F55\u5931\u8D25
Invalid\ login\ information.\ Please\ try\ again.=\u767B\u5F55\u4FE1\u606F\u65E0\u6548\u3002\u8BF7\u91CD\u8BD5\u3002
Try\ again=\u91CD\u8BD5
If\ you\ are\ a\ system\ administrator\ and\ suspect\ this\ to\ be\ a\ configuration\ problem,\ see\ the\ server\ console\ output\ for\ more\ details.=\u5982\u679C\u4F60\u662F\u7CFB\u7EDF\u7BA1\u7406\u5458\uFF0C\u5E76\u6000\u7591\u8FD9\u662F\u7531\u4E8E\u914D\u7F6E\u9519\u8BEF\u5BFC\u81F4\u7684\u8BDD\uFF0C\u53EF\u4EE5\u901A\u8FC7\u67E5\u770B\u670D\u52A1\u5668\u63A7\u5236\u53F0\u5F97\u5F97\u8BE6\u7EC6\u4FE1\u606F\u3002
# The MIT License
#
# Copyright (c) 2017, suren <zxjlwt@126.com>
#
# 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.
Console\ Output=\u63A7\u5236\u53F0\u8F93\u51FA
View\ as\ plain\ text=\u6587\u672C\u65B9\u5F0F\u67E5\u770B
......@@ -9,13 +9,36 @@ import static org.mockito.Mockito.when;
import hudson.model.Action;
import hudson.model.View;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@RunWith(PowerMockRunner.class)
@PrepareForTest({NewViewLink.class, Jenkins.class})
public class NewViewLinkTest {
@Mock
private Jenkins jenkins;
@Mock
private final String rootUrl = "https://127.0.0.1:8080/";
private NewViewLink newViewLink = new NewViewLink();
private NewViewLink newViewLink;
private View view = mock(View.class);
@Before
public void initTests() throws Exception {
PowerMockito.mockStatic(Jenkins.class);
PowerMockito.when(Jenkins.getInstance()).thenReturn(jenkins);
PowerMockito.when(jenkins.getRootUrl()).thenReturn(rootUrl);
newViewLink = new NewViewLink();
}
@Test
public void getActionsHasPermission() throws Exception {
......@@ -27,7 +50,7 @@ public class NewViewLinkTest {
final Action action = actions.get(0);
assertEquals(Messages.NewViewLink_NewView(), action.getDisplayName());
assertEquals(NewViewLink.ICON_FILE_NAME, action.getIconFileName());
assertEquals(NewViewLink.URL_NAME, action.getUrlName());
assertEquals(rootUrl + NewViewLink.URL_NAME, action.getUrlName());
}
@Test
......@@ -40,7 +63,7 @@ public class NewViewLinkTest {
final Action action = actions.get(0);
assertNull(action.getDisplayName());
assertNull(action.getIconFileName());
assertEquals(NewViewLink.URL_NAME, action.getUrlName());
assertEquals(rootUrl + NewViewLink.URL_NAME, action.getUrlName());
}
}
\ No newline at end of file
......@@ -33,7 +33,7 @@ THE SOFTWARE.
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>2.101-SNAPSHOT</version>
<version>2.102-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Jenkins main module</name>
......
......@@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>2.101-SNAPSHOT</version>
<version>2.102-SNAPSHOT</version>
</parent>
<artifactId>test</artifactId>
......
......@@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>2.101-SNAPSHOT</version>
<version>2.102-SNAPSHOT</version>
</parent>
<artifactId>jenkins-war</artifactId>
......
<div>
清除字符串前后的白字符。
清除字符串前后的白字符。
</div>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册