jenkinsci / localization-zh-cn-plugin

Chinese Localization for Jenkins
https://plugins.jenkins.io/localization-zh-cn/
MIT License
91 stars 30 forks source link

历史任务构建时间显示含有中文,建议修改为普通的24小时制(2019-05-08 20:32:00) #79

Open gnzhoutian opened 5 years ago

gnzhoutian commented 5 years ago

看着不习惯,例如某个任务显示是"上午 00:30" ,感觉很怪

LinuxSuRen commented 5 years ago

谢谢您的反馈,Jenkins 目前还没有统一设置日期格式的配置。不过,这是个很好的提议。

luantu commented 5 years ago

image 似乎不生效?

LinuxSuRen commented 5 years ago

@luantu 麻烦贴一下相关的版本信息

luantu commented 5 years ago

@luantu 麻烦贴一下相关的版本信息

Jenkins2.176.1

Localization: Chinese (Simplified)Jenkins 及其插件的简体中文语言包。 | 0.0.15
-- | --

Jenkins war | org.jenkins-ci.main:jenkins-war:2.176.1 | The MIT license
-- | -- | --
Utility around Java Crypto API | org.jenkins-ci:crypto-util:1.1 | MIT License
HttpCommons Client library | commons-httpclient:commons-httpclient:3.1-jenkins-1 | Apache License 2.0
jcip-annotations | net.jcip:jcip-annotations:1.0 | Creative Commons Attribution License
AOP alliance | aopalliance:aopalliance:1.0 | Public Domain
Apache Commons BeanUtils | commons-beanutils:commons-beanutils:1.9.3 | Apache License, Version 2.0
Google Guice - Core Library | com.google.inject:guice:4.0 | The Apache Software License, Version 2.0
Agent installer module | org.jenkins-ci.modules:slave-installer:1.6 | MIT License
Spring Framework: DAO | org.springframework:spring-dao:1.2.9 | The Apache Software License, Version 2.0
Apache Groovy | org.codehaus.groovy:groovy-all:2.4.12 | The Apache Software License, Version 2.0
Stapler | org.kohsuke.stapler:stapler:1.257 | 2-clause BSD license
Constant Pool Scanner | org.jenkins-ci:constant-pool-scanner:1.2 | NetBeans CDDL/GPL
jbcrypt | org.connectbot.jbcrypt:jbcrypt:1.0.0 | ISC
ASM Commons | org.ow2.asm:asm-commons:5.0.3 | BSD
Symbol annotation | org.jenkins-ci:symbol-annotation:1.1 | MIT License
Commons Digester | commons-digester:commons-digester:2.1 | The Apache Software License, Version 2.0
Java binding for libpam.so | org.kohsuke:libpam4j:1.11 | The MIT license
jnr-posix | com.github.jnr:jnr-posix:3.0.45 | Eclipse Public License - v 1.0GNU General Public License Version 2GNU Lesser General Public License Version 2.1
PuTTY support for Trilead SSH2 library | org.kohsuke:trilead-putty-extension:1.2 | MIT license
Instance Identity | org.jenkins-ci.modules:instance-identity:2.2 | MIT License
Apache Commons Codec | commons-codec:commons-codec:1.9 | The Apache Software License, Version 2.0
asm6 | org.kohsuke:asm6:6.2 | BSD License
FindBugs-jsr305 | com.google.code.findbugs:jsr305:3.0.1 | The Apache Software License, Version 2.0
kXML 2 is a small XML pull parser based on the common XML pull API | net.sf.kxml:kxml2:2.3.0 | BSD stylePublic Domain
libzfs-java | org.kohsuke:libzfs:0.8 | COMMON DEVELOPMENT AND DISTRIBUTION LICENSE
SSH server | org.jenkins-ci.modules:sshd:2.6 | MIT License
Stapler Groovy module | org.kohsuke.stapler:stapler-groovy:1.257 | 2-clause BSD license
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin | org.jenkins-ci.ui:jquery-detached:1.2 | MIT License
json-lib | org.kohsuke.stapler:json-lib:2.4-jenkins-2 | The Apache Software License, Version 2.0
Windows agent installer | org.jenkins-ci.modules:windows-slave-installer:1.10.0 | MIT License
Ganymed SSH2 for Java | org.jenkins-ci:trilead-ssh2:build-217-jenkins-14 | BSD style license
Robust HTTP client library | org.jvnet.robust-http-client:robust-http-client:1.2 | MIT license
ASM Core | org.ow2.asm:asm:5.0.3 | BSD
jnr-ffi | com.github.jnr:jnr-ffi:2.1.8 | The Apache Software License, Version 2.0
Winstone | org.jenkins-ci:winstone:5.2 | GNU Lesser General Public License version 2.1COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
jnr-constants | com.github.jnr:jnr-constants:0.9.9 | The Apache Software License, Version 2.0
Timeline component at http://www.simile-widgets.org/timeline/ | org.kohsuke.stapler:stapler-adjunct-timeline:1.5 | BSD License
Log4j Implemented Over SLF4J | org.slf4j:log4j-over-slf4j:1.7.25 | Apache Software Licenses
commons-jelly-tags-define | org.jvnet.hudson:commons-jelly-tags-define:1.0.1-hudson-20071021 | The Apache Software License, Version 2.0
JmDNS | org.jenkins-ci:jmdns:3.4.0-jenkins-3 | Apache License, Version 2.0
Commons Lang | commons-lang:commons-lang:2.6 | The Apache Software License, Version 2.0
Spring Framework: JDBC | org.springframework:spring-jdbc:1.2.9 | The Apache Software License, Version 2.0
Woodstox | org.codehaus.woodstox:wstx-asl:3.2.9 | The Apache Software License, Version 2.0
Spring Framework: Core | org.springframework:spring-core:2.5.6.SEC03 | The Apache Software License, Version 2.0
Spring Framework: AOP | org.springframework:spring-aop:2.5.6.SEC03 | The Apache Software License, Version 2.0
jCIFS | org.samba.jcifs:jcifs:1.3.17-kohsuke-1 | GNU Lesser General Public License, version 2.1
EdDSA-Java | net.i2p.crypto:eddsa:0.3.0 | CC0 1.0 Universal
Apache Ant Core | org.apache.ant:ant:1.9.2 | The Apache Software License, Version 2.0
embedded_su for Java | com.sun.solaris:embedded_su4j:1.1 | MIT license
jffi | com.github.jnr:jffi:1.2.17 | The Apache Software License, Version 2.0
javax.inject | javax.inject:javax.inject:1 | The Apache Software License, Version 2.0
Upstart slave installer | org.jenkins-ci.modules:upstart-slave-installer:1.1 | MIT License
Apache Commons Compress | org.apache.commons:commons-compress:1.10 | Apache License, Version 2.0
jansi | org.fusesource.jansi:jansi:1.11 | The Apache Software License, Version 2.0
Spring Framework: Beans | org.springframework:spring-beans:2.5.6.SEC03 | The Apache Software License, Version 2.0
SezPoz Library | net.java.sezpoz:sezpoz:1.13 | CDDL
stax-api | javax.xml.stream:stax-api:1.0-2 | CDDL
SLF4J JDK14 Binding | org.slf4j:slf4j-jdk14:1.7.25 | MIT License
activation | org.jvnet.hudson:activation:1.1.1-hudson-1 | CDDL
commons-jelly-tags-fmt | commons-jelly:commons-jelly-tags-fmt:1.0 | The Apache Software License, Version 2.0
jfreechart | jfree:jfreechart:1.0.9 | GNU Lesser General Public Licence
oro | oro:oro:2.0.8 | The Apache Software License, Version 2.0
Commons JEXL | org.jenkins-ci:commons-jexl:1.1-jenkins-20111212 | The Apache Software License, Version 2.0
Icon-Set module | org.jenkins-ci.plugins.icon-shim:icon-set:1.0.5 | MIT License
StAX API | stax:stax-api:1.0.1 | The Apache Software License, Version 2.0
windows-package-checker | org.kohsuke:windows-package-checker:1.2 | MIT license
Acegi Security Core | org.acegisecurity:acegi-security:1.0.7 | The Apache Software License, Version 2.0
Apache Commons FileUpload | commons-fileupload:commons-fileupload:1.3.1-jenkins-2 | The Apache Software License, Version 2.0
OS X slave installer | org.jenkins-ci.modules:launchd-slave-installer:1.2 | MIT License
Annotation Indexer | org.jenkins-ci:annotation-indexer:1.12 | MIT License
JLine | jline:jline:2.12 | The BSD License
Jenkins Task Reactor | org.jenkins-ci:task-reactor:1.5 | MIT License
Jenkins remoting layer | org.jenkins-ci.main:remoting:3.29 | The MIT licenseApache License 2.0
Stapler adjunct for ZeroClipboard | org.kohsuke.stapler:stapler-adjunct-zeroclipboard:1.3.5-1 | MIT License
Apache Commons IO | commons-io:commons-io:2.6 | Apache License, Version 2.0
CodeMirror library from http://codemirror.net/ | org.kohsuke.stapler:stapler-adjunct-codemirror:1.3 | MIT License
ASM Util | org.ow2.asm:asm-util:5.0.3 | BSD
Stapler Jelly module | org.kohsuke.stapler:stapler-jelly:1.257 | 2-clause BSD license
Bytecode transformation-based library for managing backward compatibility | org.jenkins-ci:bytecode-compatibility-transformer:2.0-beta-2 | The MIT license
Apache Mina SSHD :: Core | org.apache.sshd:sshd-core:1.7.0 | Apache 2.0 License
JCL 1.2 implemented over SLF4J | org.slf4j:jcl-over-slf4j:1.7.25 | MIT License
Embeddable daemonization library | org.kohsuke:akuma:1.10 | MIT license
JavaMail API (compat) | javax.mail:mail:1.4.4 | CDDLGPLv2+CE
Hamcrest Core | org.hamcrest:hamcrest-core:1.3 | New BSD License
jcommon | jfree:jcommon:1.0.12 | GNU Lesser General Public Licence
Spring Framework: Context Support | org.springframework:spring-context-support:2.5.6.SEC03 | The Apache Software License, Version 2.0
Guava: Google Core Libraries for Java | com.google.guava:guava:11.0.1 | The Apache Software License, Version 2.0
JTidy | org.jvnet.hudson:jtidy:4aug2000r7-dev-hudson-1 | Java HTML Tidy License
Version number manipulation | org.jenkins-ci:version-number:1.6 | MIT License
commons-jelly | org.jenkins-ci:commons-jelly:1.1-jenkins-20120928 | The Apache Software License, Version 2.0
JavaScript GUI Lib: Handlebars bundle plugin | org.jenkins-ci.ui:handlebars:1.1.1 | MIT License
Spring Framework: Context | org.springframework:spring-context:2.5.6.SEC03 | The Apache Software License, Version 2.0
Localizer | org.jvnet.localizer:localizer:1.26 | The MIT license
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin | org.jenkins-ci.ui:jquery-detached:1.2.1 | MIT License
ASM Analysis | org.ow2.asm:asm-analysis:5.0.3 | BSD
Self-Signed Certificate Generator | io.github.stephenc.crypto:self-signed-cert-generator:1.0.0 | The MIT license
JavaServer Pages(TM) Standard Tag Library API | javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1 | CDDL + GPLv2 with classpath exception
Discovery | commons-discovery:commons-discovery:0.4 | The Apache Software License, Version 2.0
jffi | com.github.jnr:jffi:1.2.16 | The Apache Software License, Version 2.0
dom4j | org.jenkins-ci.dom4j:dom4j:1.6.1-jenkins-4 | BSD License
Memory Monitor | org.jenkins-ci:memory-monitor:1.9 | MIT
Systemd slave installer | org.jenkins-ci.modules:systemd-slave-installer:1.1 | MIT License
XStream Core | org.jvnet.hudson:xstream:1.4.7-jenkins-1 | BSD style
Type arithmetic library for Java5 | org.jvnet:tiger-types:2.2 | CDDL/GPLv2 dual license
TXW2 Runtime | com.sun.xml.txw2:txw2:20110809 | CDDL v1.1 / GPL v2 dual license
Spring Framework: Web | org.springframework:spring-web:2.5.6.SEC03 | The Apache Software License, Version 2.0
Pure Java - COM bridge | org.kohsuke.jinterop:j-interop:2.0.6-kohsuke-1 | LGPL v3
winp | org.jvnet.winp:winp:1.27 | The MIT license
JNA-POSIX | org.jruby.ext.posix:jna-posix:1.0.3-jenkins-1 | GNU Lesser General Public License Version 2.1
Apache Ant Launcher | org.apache.ant:ant-launcher:1.9.2 | The Apache Software License, Version 2.0
Jenkins core | org.jenkins-ci.main:jenkins-core:2.176.1 | The MIT license
Java Native Access | net.java.dev.jna:jna:4.5.2 | LGPL, version 2.1Apache License v2.0
javax.annotation API | javax.annotation:javax.annotation-api:1.2 | CDDL + GPLv2 with classpath exception
Pure Java - COM bridge | org.kohsuke.jinterop:j-interopdeps:2.0.6-kohsuke-1 | LGPL v3
Bridge method injection annotations | com.infradna.tool:bridge-method-annotation:1.13 | MIT License
ASM Tree | org.ow2.asm:asm-tree:5.0.3 | BSD
asm5 | org.kohsuke:asm5:5.0.1 | BSD License
Jenkins Stapler Support Library | io.jenkins.stapler:jenkins-stapler-support:1.0 | MIT License
args4j | args4j:args4j:2.0.31 | MIT License
SSH CLI client authenticator | org.jenkins-ci.modules:ssh-cli-auth:1.5 | MIT License
AntLR | antlr:antlr:2.7.6 | BSD License
relaxngDatatype | relaxngDatatype:relaxngDatatype:20020414 | BSD License
JZlib | com.jcraft:jzlib:1.1.3-kohsuke-1 | BSD
JavaScript GUI Lib: Twitter Bootstrap bundle plugin | org.jenkins-ci.ui:bootstrap:1.3.2 | MIT License
Custom Access Modifier annotations | org.kohsuke:access-modifier-annotation:1.14 | MIT License
Apache Commons Collections | commons-collections:commons-collections:3.2.2 | Apache License, Version 2.0
Stapler JRebel module | org.kohsuke.stapler:stapler-jrebel:1.257 | 2-clause BSD license
JUnit | junit:junit:4.12 | Eclipse Public License 1.0
FindBugs-Annotations | com.google.code.findbugs:annotations:3.0.1 | GNU Lesser Public License
SLF4J API Module | org.slf4j:slf4j-api:1.7.25 | MIT License
ezmorph | net.sf.ezmorph:ezmorph:1.0.6 | The Apache Software License, Version 2.0
Spring Framework: Web MVC | org.springframework:spring-webmvc:2.5.6.SEC03 | The Apache Software License, Version 2.0
jnr-x86asm | com.github.jnr:jnr-x86asm:1.0.2 | MIT License
Jenkins cli | org.jenkins-ci.main:cli:2.176.1 | The MIT license
MXP1: Xml Pull Parser 3rd Edition (XPP3) | xpp3:xpp3:1.1.4c | Indiana University Extreme! Lab Software License, vesion 1.1.1Public DomainApache Software License, version 1.1
jaxen | jaxen:jaxen:1.1-beta-11 | BSD License
commons-jelly-tags-xml | commons-jelly:commons-jelly-tags-xml:1.1 | The Apache Software License, Version 2.0
zgq5555 commented 5 years ago

我安装了中文插件,系统里边也设置了 zh_CN 并且勾选了强制所有用户使用此语言 重启过服务 但是还是默认英文

LinuxSuRen commented 5 years ago

@zgq5555 你说的这个情况,和当前 issue 的主题无关,建议重新开一个

mamh2021 commented 4 years ago

日期格式 好像是和浏览器 语言设置有关的.https://issues.jenkins-ci.org/browse/JENKINS-4508

Jenkins uses the locale of the web browser doing the request. Just fix your Accept-Language header.

mamh2021 commented 4 years ago

我研究了一下,在这个文件中控制的 core/src/main/resources/hudson/widgets/HistoryWidget/entry.jelly
在48行左右: ${h.getUserTimeZonePostfix()}

jenkins 通过 这个 tag "" 来格式化日期的,这个确实和本地浏览器 有点关系的.

dateStyle="medium" timeStyle="medium" will show 2020-8-19 17:27:01 dateStyle="medium" timeStyle="short" will show 2020-8-19 下午5:27 dateStyle="medium" timeStyle="long" will show 2020-8-19 下午05时27分01秒

dateStyle="long" timeStyle="long" will show 2020年8月19日 下午05时27分01秒 dateStyle="short" timeStyle="long" will show 20-8-19 下午05时27分01秒

不过很奇怪的 是 点进去每个构建历史中, 中间主页上也显示了个日期时间,这个的格式 就 不一样了. 见这个文件 core/src/main/resources/hudson/model/AbstractBuild/index.jelly 52 行.: ()

可以试着给jenkins 提个 PR 看看老外怎么想的/ 这2个地方的日期格式 不统一. 总之老外的想法和我们的不一样的. 我们觉得24小时比较方便, 老外估计不这样想.....

mamh2021 commented 4 years ago

火狐中文语言 中文 火狐英式英语 英式英语 火狐美式英语 美式英语