Skip to content

Commit

Permalink
Merge pull request #3946 from LinuxSuRen/i18n/api-token
Browse files Browse the repository at this point in the history
Add localization support for default token name
  • Loading branch information
batmat committed Apr 1, 2019
2 parents 278f6a1 + 5ae7a47 commit d7719a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/jenkins/security/ApiTokenProperty.java
Expand Up @@ -474,7 +474,7 @@ public HttpResponse doGenerateNewToken(@AncestorInPath User u, @QueryParameter S

final String tokenName;
if (StringUtils.isBlank(newTokenName)) {
tokenName = String.format("Token created on %s", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(ZonedDateTime.now()));
tokenName = Messages.Token_Created_on(DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(ZonedDateTime.now()));
}else{
tokenName = newTokenName;
}
Expand Down
Expand Up @@ -30,3 +30,4 @@ ApiTokenProperty.NoLegacyToken=This user currently does not have a legacy token
RekeySecretAdminMonitor.DisplayName=Re-keying
UpdateSiteWarningsMonitor.DisplayName=Update Site Warnings
QueueItemAuthenticatorMonitor.DisplayName=Access Control for Builds
Token.Created.on=Token created on {0}
Expand Up @@ -29,3 +29,4 @@ ApiTokenProperty.LegacyTokenName=\u9057\u7559 Token
ApiTokenProperty.NoLegacyToken=\u5F53\u524D\u7528\u6237\u6CA1\u6709\u9057\u7559 Token
RekeySecretAdminMonitor.DisplayName=Re-keying
UpdateSiteWarningsMonitor.DisplayName=\u7AD9\u70B9\u66F4\u65B0\u8B66\u544A
Token.Created.on=Token \u521B\u5EFA\u4E8E {0}

0 comments on commit d7719a3

Please sign in to comment.