Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
60fccc8b
authored
Jan 20, 2018
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
后端代码国际化定制
parent
0346ddbb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java
xxl-job-admin/src/main/resources/i18n/message.properties
xxl-job-admin/src/main/resources/i18n/message_en.properties
xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java
View file @
60fccc8b
...
@@ -24,9 +24,11 @@ public class I18nUtil {
...
@@ -24,9 +24,11 @@ public class I18nUtil {
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
I18nUtil
.
class
);
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
I18nUtil
.
class
);
private
static
Properties
prop
=
null
;
private
static
Properties
prop
=
null
;
private
static
long
lastCacheTim
=
0L
;
public
static
Properties
loadI18nProp
(){
public
static
Properties
loadI18nProp
(){
if
(
prop
!=
null
)
{
if
(
prop
!=
null
&&
(
System
.
currentTimeMillis
()-
lastCacheTim
)<
3
*
1000
)
{
//
return prop;
return
prop
;
}
}
try
{
try
{
// bild i18n prop
// bild i18n prop
...
@@ -38,9 +40,11 @@ public class I18nUtil {
...
@@ -38,9 +40,11 @@ public class I18nUtil {
Resource
resource
=
new
ClassPathResource
(
i18nFile
);
Resource
resource
=
new
ClassPathResource
(
i18nFile
);
EncodedResource
encodedResource
=
new
EncodedResource
(
resource
,
"UTF-8"
);
EncodedResource
encodedResource
=
new
EncodedResource
(
resource
,
"UTF-8"
);
prop
=
PropertiesLoaderUtils
.
loadProperties
(
encodedResource
);
prop
=
PropertiesLoaderUtils
.
loadProperties
(
encodedResource
);
lastCacheTim
=
System
.
currentTimeMillis
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
logger
.
error
(
e
.
getMessage
(),
e
);
}
}
logger
.
warn
(
"---111---"
);
return
prop
;
return
prop
;
}
}
...
...
xxl-job-admin/src/main/resources/i18n/message.properties
View file @
60fccc8b
...
@@ -108,7 +108,7 @@ jobinfo_field_jobgroup=执行器
...
@@ -108,7 +108,7 @@ jobinfo_field_jobgroup=执行器
jobinfo_field_jobdesc
=
任务描述
jobinfo_field_jobdesc
=
任务描述
jobinfo_field_gluetype
=
运行模式
jobinfo_field_gluetype
=
运行模式
jobinfo_field_executorparam
=
任务参数
jobinfo_field_executorparam
=
任务参数
jobinfo_field_cron_unvalid
=
请输入格式正确的Cron
jobinfo_field_cron_unvalid
=
Cron格式非法
jobinfo_field_author
=
负责人
jobinfo_field_author
=
负责人
jobinfo_field_alarmemail
=
报警邮件
jobinfo_field_alarmemail
=
报警邮件
jobinfo_field_alarmemail_placeholder
=
请输入报警邮件,多个邮件地址则逗号分隔
jobinfo_field_alarmemail_placeholder
=
请输入报警邮件,多个邮件地址则逗号分隔
...
...
xxl-job-admin/src/main/resources/i18n/message_en.properties
View file @
60fccc8b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment