Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JEP-216] Extract localization support infrastructure into localization-support plugin #31

Merged
merged 23 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bc6c5e4
Use new localization-support plugin
daniel-beck Nov 11, 2018
b7fc9a4
Update with new core contributed resources
daniel-beck Nov 11, 2018
6c54f75
Use localization-support timestamped snapshot
daniel-beck Nov 11, 2018
d244bf4
Timestamped snapshots
daniel-beck Nov 11, 2018
49274c5
Make NewVersionAvailable work based on new third argument from core
daniel-beck Nov 12, 2018
8072306
Migrate webapp/ help files
daniel-beck Nov 12, 2018
d5636bb
Add dummy zn_CN localization html files for credentials plugin
daniel-beck Nov 12, 2018
7c78cf8
[JEP-216] Add support for webapp resources
daniel-beck Feb 5, 2019
5772244
Make webapp location explicit matching LocalizationContributorImpl
daniel-beck Feb 5, 2019
4ee4aa6
MUST REVERT: Use dummy localization of credentials-plugin
daniel-beck Feb 5, 2019
09a069c
Fix pom
daniel-beck Feb 5, 2019
f813590
Rename file to match actual resource name
daniel-beck Feb 5, 2019
41e83a5
Merge branch 'master' into jep-216
LinuxSuRen Apr 19, 2019
5ca8959
move credentials-plugin into plugins dir
LinuxSuRen Apr 30, 2019
3db835b
Use Jenkins 2.173 and incrementals deployment of localization-support
daniel-beck Apr 30, 2019
c5af283
Remove duplicate help files
LinuxSuRen May 1, 2019
1f829ca
Fix credentials plugin resource location
daniel-beck May 2, 2019
8cf2438
Integrate jenkinsci/localization-support-plugin#1
daniel-beck May 2, 2019
4f896a7
Use webapp subdirectory in resources
daniel-beck May 2, 2019
b4415a8
Remove utility localizations for use during development only
daniel-beck May 2, 2019
14a45a2
Depend on released version of localization-support:1.1
daniel-beck May 2, 2019
93f7e8e
Remove more temporary localization files
daniel-beck May 2, 2019
d9b32fc
Back to original resource location
daniel-beck May 2, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Pconsume-incrementals
2 changes: 1 addition & 1 deletion core/src/main/resources/hudson/Messages_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Util.millisecond={0} \u6BEB\u79D2
Util.second={0} \u79D2
Util.minute={0} \u5206
Util.hour ={0} \u5C0F\u65F6
Util.day ={0} {0,choice,0#days|1#day|1<days}
Util.day ={0} {0,choice,0#\u5929|1#\u5929|1<\u5929}
Util.month ={0} \u6708
Util.year ={0} \u5E74

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ AbstractProject.WorkspaceOffline=\u5de5\u4f5c\u7a7a\u95f4\u79bb\u7ebf\u3002
AbstractProject.BuildPermission.Description=\
\u8be5\u6743\u9650\u5141\u8bb8\u542f\u52a8\u4e00\u4e2a\u65b0\u7684\u6784\u5efa\u4efb\u52a1\u3002
AbstractProject.WorkspacePermission.Description=\
\u8be5\u6743\u9650\u5141\u8bb8\u83b7\u53d6Jenkins\u6267\u884c\u6784\u5efa\u4efb\u52a1\u65f6\u68c0\u51fa\u7684\u5de5\u4f5c\u7a7a\u95f4\u5185\u5bb9\u3002\u5982\u679c\u4f60\u4e0d\u5e0c\u671b\u7528\u6237\u8bbf\u95ee\u5de5\u4f5c\u7a7a\u95f4\u4e2d\u7684\u6587\u4ef6\uff08\u4f8b\u5982\uff1aSCM\u68c0\u51fa\u7684\u6e90\u7801\u6216\u8005\u6784\u5efa\u7684\u4e2d\u95f4\u4ea7\u7269\uff09\uff0c\u4f60\u53ef\u4ee5\u53d6\u6d88\u8be5\u6743\u9650\u3002
\u8be5\u6743\u9650\u5141\u8bb8\u83b7\u53d6 Jenkins \u6267\u884c\u6784\u5efa\u4efb\u52a1\u65f6\u68c0\u51fa\u7684\u5de5\u4f5c\u7a7a\u95f4\u5185\u5bb9\u3002\u5982\u679c\u4f60\u4e0d\u5e0c\u671b\u7528\u6237\u901a\u8fc7\u5de5\u4f5c\u7a7a\u95f4\u6d4f\u89c8\u5668\u8bbf\u95ee\u5de5\u4f5c\u7a7a\u95f4\u4e2d\u7684\u6587\u4ef6\uff08\u4f8b\u5982\uff1a SCM \u68c0\u51fa\u7684\u6e90\u7801\u6216\u8005\u6784\u5efa\u7684\u4e2d\u95f4\u4ea7\u7269\uff09\uff0c\u4f60\u53ef\u4ee5\u53d6\u6d88\u8be5\u6743\u9650\u3002\u000d\u000a
AbstractProject.ExtendedReadPermission.Description=\
\u8be5\u6743\u9650\u6388\u4e88\u9879\u76ee\u914d\u7f6e\u7684\u53ea\u8bfb\u8bbf\u95ee\u3002\u8bf7\u6ce8\u610f\uff0c\u4f60\u6784\u5efa\u8fc7\u7a0b\u4e2d\u7684\u654f\u611f\u4fe1\u606f\uff0c\u4f8b\u5982\u5bc6\u7801\uff0c\u5c31\u4f1a\u88ab\u66b4\u9732\u3002
AbstractProject.DiscoverPermission.Description=\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License
#
# Copyright (c) 2018, linuxsuren
# 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
Expand All @@ -20,11 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Or\ Upgrade\ Automatically=\u6216\u81EA\u52A8\u5347\u7EA7
NewVersionAvailable=\u65B0\u7248\u672C\u7684 Jenkins ({0}) \u53EF\u4EE5<a href="{1}">\u4E0B\u8F7D</a> \
(<a href="${changelog.url}">\u53D8\u66F4\u8BB0\u5F55</a>)\u3002
Retry=\u91CD\u8BD5
UpgradeComplete=Jenkins \u5DF2\u7ECF\u5347\u7EA7\u5230 {0} \uFF0C\u7B49\u5F85<a href="{1}/safeRestart">\u91CD\u542F</a>\u3002
UpgradeCompleteRestartNotSupported=Jenkins \u5DF2\u7ECF\u5347\u7EA7\u5230 {0} \uFF0C\u7B49\u5F85\u91CD\u542F\u3002
UpgradeProgress=Jenkins <a href="{1}">\u6B63\u5728\u5347\u7EA7\u5230 {0}</a>\u3002
UpgradeFailed=Jenkins \u5347\u7EA7\u5230 {0} \u5931\u8D25\uFF1A<a href="{2}">{1}</a>\u3002
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
@@ -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
@@ -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,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
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.7</version>
<version>3.42</version>
</parent>

<artifactId>localization-zh-cn</artifactId>
Expand All @@ -21,7 +21,7 @@
</scm>

<properties>
<jenkins.version>1.580.1</jenkins.version>
<jenkins.version>2.173</jenkins.version>
<java.level>8</java.level>
</properties>

Expand Down Expand Up @@ -142,6 +142,7 @@
</resource>
<resource>
<directory>core/src/main/webapp</directory>
<targetPath>webapp</targetPath>
</resource>
<resource>
<directory>src/main/resources</directory>
Expand All @@ -158,6 +159,11 @@
<artifactId>symbol-annotation</artifactId>
<version>1.14</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>localization-support</artifactId>
<version>1.1</version>
</dependency>
</dependencies>

<pluginRepositories>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package io.jenkins.plugins.localization_zh_cn;

import hudson.Extension;
import hudson.PluginWrapper;
import io.jenkins.plugins.localization.support.LocalizationContributor;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import java.net.URL;

@Extension
public class LocalizationContributorImpl extends LocalizationContributor {
@CheckForNull
daniel-beck marked this conversation as resolved.
Show resolved Hide resolved
@Override
public URL getResource(@Nonnull String s) {
return getClass().getClassLoader().getResource(s);
}

@CheckForNull
@Override
public URL getPluginResource(@Nonnull String s, @Nonnull PluginWrapper pluginWrapper) {
return getClass().getClassLoader().getResource("/webapp/" + s);
}
}

This file was deleted.

27 changes: 0 additions & 27 deletions src/main/java/jenkins/plugins/localization/L10nDecorator.java

This file was deleted.

59 changes: 0 additions & 59 deletions src/main/java/jenkins/plugins/localization/LocalizationFacet.java

This file was deleted.

This file was deleted.

Loading