Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Jenkins 中文社区
Simplified Chinese Plugin
提交
a58a69f3
S
Simplified Chinese Plugin
项目概览
Jenkins 中文社区
/
Simplified Chinese Plugin
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Simplified Chinese Plugin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a58a69f3
编写于
8月 31, 2018
作者:
JenkinsInChina
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add help request dispatcher
上级
6f659eb1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
91 addition
and
2 deletion
+91
-2
src/main/java/hudson/plugins/localization/I18nDispatcher.java
...main/java/hudson/plugins/localization/I18nDispatcher.java
+25
-0
src/main/java/hudson/plugins/localization/I18nRequestDispatcher.java
...va/hudson/plugins/localization/I18nRequestDispatcher.java
+19
-0
src/main/java/hudson/plugins/localization/L10nDecorator.java
src/main/java/hudson/plugins/localization/L10nDecorator.java
+5
-2
src/main/java/hudson/plugins/localization/LocalizationFacet.java
...n/java/hudson/plugins/localization/LocalizationFacet.java
+32
-0
src/main/resources/META-INF/services/org.kohsuke.stapler.Facet
...ain/resources/META-INF/services/org.kohsuke.stapler.Facet
+1
-0
src/main/resources/hudson/triggers/SCMTrigger/help.html
src/main/resources/hudson/triggers/SCMTrigger/help.html
+9
-0
未找到文件。
src/main/java/hudson/plugins/localization/I18nDispatcher.java
0 → 100644
浏览文件 @
a58a69f3
package
hudson.plugins.localization
;
import
org.kohsuke.stapler.Dispatcher
;
import
org.kohsuke.stapler.RequestImpl
;
import
org.kohsuke.stapler.ResponseImpl
;
import
javax.servlet.ServletException
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
public
class
I18nDispatcher
extends
Dispatcher
{
@Override
public
boolean
dispatch
(
RequestImpl
req
,
ResponseImpl
rsp
,
Object
node
)
throws
IOException
,
ServletException
,
IllegalAccessException
,
InvocationTargetException
{
if
(
req
.
getOriginalRequestURI
().
endsWith
(
"help"
))
{
return
true
;
}
return
false
;
}
@Override
public
String
toString
()
{
return
null
;
}
}
\ No newline at end of file
src/main/java/hudson/plugins/localization/I18nRequestDispatcher.java
0 → 100644
浏览文件 @
a58a69f3
package
hudson.plugins.localization
;
import
javax.servlet.RequestDispatcher
;
import
javax.servlet.ServletException
;
import
javax.servlet.ServletRequest
;
import
javax.servlet.ServletResponse
;
import
java.io.IOException
;
public
class
I18nRequestDispatcher
implements
RequestDispatcher
{
@Override
public
void
forward
(
ServletRequest
servletRequest
,
ServletResponse
servletResponse
)
throws
ServletException
,
IOException
{
System
.
out
.
println
(
"forward"
);
}
@Override
public
void
include
(
ServletRequest
servletRequest
,
ServletResponse
servletResponse
)
throws
ServletException
,
IOException
{
System
.
out
.
println
(
"include"
);
}
}
\ No newline at end of file
src/main/java/hudson/plugins/localization/L10nDecorator.java
浏览文件 @
a58a69f3
...
...
@@ -21,7 +21,10 @@ public class L10nDecorator extends PageDecorator {
// hook into Stapler to activate contributed l10n
hudson
=
Hudson
.
getInstance
();
WebApp
.
get
(
hudson
.
servletContext
).
getFacet
(
JellyFacet
.
class
).
resourceBundleFactory
=
bundleFactory
;
WebApp
webContext
=
WebApp
.
get
(
hudson
.
servletContext
);
JellyFacet
facet
=
webContext
.
getFacet
(
JellyFacet
.
class
);
facet
.
resourceBundleFactory
=
bundleFactory
;
webContext
.
facets
.
add
(
new
LocalizationFacet
());
}
}
src/main/java/hudson/plugins/localization/LocalizationFacet.java
0 → 100644
浏览文件 @
a58a69f3
package
hudson.plugins.localization
;
import
org.kohsuke.stapler.*
;
import
org.kohsuke.stapler.lang.Klass
;
import
javax.servlet.RequestDispatcher
;
import
javax.servlet.ServletException
;
import
java.io.IOException
;
import
java.util.List
;
public
class
LocalizationFacet
extends
Facet
{
@Override
public
void
buildViewDispatchers
(
MetaClass
owner
,
List
<
Dispatcher
>
dispatchers
)
{
System
.
out
.
println
(
12
);
dispatchers
.
add
(
new
I18nDispatcher
());
}
@Override
public
RequestDispatcher
createRequestDispatcher
(
RequestImpl
request
,
Klass
<?>
type
,
Object
it
,
String
viewName
)
throws
IOException
{
return
super
.
createRequestDispatcher
(
request
,
type
,
it
,
viewName
);
}
@Override
public
RequestDispatcher
createRequestDispatcher
(
RequestImpl
request
,
Class
type
,
Object
it
,
String
viewName
)
throws
IOException
{
return
super
.
createRequestDispatcher
(
request
,
type
,
it
,
viewName
);
}
@Override
public
boolean
handleIndexRequest
(
RequestImpl
req
,
ResponseImpl
rsp
,
Object
node
,
MetaClass
nodeMetaClass
)
throws
IOException
,
ServletException
{
return
false
;
}
}
\ No newline at end of file
src/main/resources/META-INF/services/org.kohsuke.stapler.Facet
0 → 100644
浏览文件 @
a58a69f3
hudson.plugins.localization.LocalizationFacet
\ No newline at end of file
src/main/resources/hudson/triggers/SCMTrigger/help.html
0 → 100644
浏览文件 @
a58a69f3
<div>
Configure Jenkins to poll changes in SCM.--
<p>
Note that this is going to be an expensive operation for CVS, as every polling
requires Jenkins to scan the entire workspace and verify it with the server.
Consider setting up a "push" trigger to avoid this overhead, as described in
<a
href=
"https://jenkins.io/redirect/scm-change-trigger"
>
this document
</a>
</div>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录