Commit 59d92f6b authored by Jason Song's avatar Jason Song Committed by Jason Song

polish translations and fix some bugs introduced

parent aee511ba
...@@ -45,6 +45,7 @@ public class WebMvcConfig implements WebMvcConfigurer, WebServerFactoryCustomize ...@@ -45,6 +45,7 @@ public class WebMvcConfig implements WebMvcConfigurer, WebServerFactoryCustomize
addCacheControl(registry, "scripts", 86400); addCacheControl(registry, "scripts", 86400);
addCacheControl(registry, "styles", 86400); addCacheControl(registry, "styles", 86400);
addCacheControl(registry, "views", 86400); addCacheControl(registry, "views", 86400);
addCacheControl(registry, "i18n", 86400);
} }
private void addCacheControl(ResourceHandlerRegistry registry, String folder, int cachePeriod) { private void addCacheControl(ResourceHandlerRegistry registry, String folder, int cachePeriod) {
......
...@@ -11,7 +11,7 @@ public class AppDTO extends BaseDTO{ ...@@ -11,7 +11,7 @@ public class AppDTO extends BaseDTO{
@Pattern( @Pattern(
regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR, regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR,
message = "AppId格式错误: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE message = "Invalid AppId format: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE
) )
private String appId; private String appId;
......
...@@ -11,7 +11,7 @@ public class ClusterDTO extends BaseDTO{ ...@@ -11,7 +11,7 @@ public class ClusterDTO extends BaseDTO{
@NotBlank(message = "cluster name cannot be blank") @NotBlank(message = "cluster name cannot be blank")
@Pattern( @Pattern(
regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR, regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR,
message = "Cluster格式错误: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE message = "Invalid Cluster format: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE
) )
private String name; private String name;
......
...@@ -12,7 +12,7 @@ public class NamespaceDTO extends BaseDTO{ ...@@ -12,7 +12,7 @@ public class NamespaceDTO extends BaseDTO{
@Pattern( @Pattern(
regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR, regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR,
message = "Namespace格式错误: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE message = "Invalid Namespace format: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE
) )
private String namespaceName; private String namespaceName;
......
...@@ -22,7 +22,7 @@ public class AppNamespace extends BaseEntity { ...@@ -22,7 +22,7 @@ public class AppNamespace extends BaseEntity {
@NotBlank(message = "AppNamespace Name cannot be blank") @NotBlank(message = "AppNamespace Name cannot be blank")
@Pattern( @Pattern(
regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR, regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR,
message = "Namespace格式错误: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE + " & " + InputValidator.INVALID_NAMESPACE_NAMESPACE_MESSAGE message = "Invalid Namespace format: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE + " & " + InputValidator.INVALID_NAMESPACE_NAMESPACE_MESSAGE
) )
@Column(name = "Name", nullable = false) @Column(name = "Name", nullable = false)
private String name; private String name;
......
...@@ -8,8 +8,8 @@ import java.util.regex.Pattern; ...@@ -8,8 +8,8 @@ import java.util.regex.Pattern;
* @author Jason Song(song_s@ctrip.com) * @author Jason Song(song_s@ctrip.com)
*/ */
public class InputValidator { public class InputValidator {
public static final String INVALID_CLUSTER_NAMESPACE_MESSAGE = "只允许输入数字,字母和符号 - _ ."; public static final String INVALID_CLUSTER_NAMESPACE_MESSAGE = "Only digits, alphabets and symbol - _ . are allowed";
public static final String INVALID_NAMESPACE_NAMESPACE_MESSAGE = "不允许以.json, .yml, .yaml, .xml, .properties结尾"; public static final String INVALID_NAMESPACE_NAMESPACE_MESSAGE = "not allowed to end with .json, .yml, .yaml, .xml, .properties";
public static final String CLUSTER_NAMESPACE_VALIDATOR = "[0-9a-zA-Z_.-]+"; public static final String CLUSTER_NAMESPACE_VALIDATOR = "[0-9a-zA-Z_.-]+";
private static final String APP_NAMESPACE_VALIDATOR = "[a-zA-Z0-9._-]+(?<!\\.(json|yml|yaml|xml|properties))$"; private static final String APP_NAMESPACE_VALIDATOR = "[a-zA-Z0-9._-]+(?<!\\.(json|yml|yaml|xml|properties))$";
private static final Pattern CLUSTER_NAMESPACE_PATTERN = Pattern.compile(CLUSTER_NAMESPACE_VALIDATOR); private static final Pattern CLUSTER_NAMESPACE_PATTERN = Pattern.compile(CLUSTER_NAMESPACE_VALIDATOR);
......
...@@ -59,7 +59,7 @@ public class ClusterController { ...@@ -59,7 +59,7 @@ public class ClusterController {
if (!InputValidator.isValidClusterNamespace(clusterName)) { if (!InputValidator.isValidClusterNamespace(clusterName)) {
throw new BadRequestException( throw new BadRequestException(
String.format("Cluster Name 格式错误: %s", InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE)); String.format("Invalid ClusterName format: %s", InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE));
} }
if (userService.findByUserId(operator) == null) { if (userService.findByUserId(operator) == null) {
......
...@@ -68,7 +68,7 @@ public class NamespaceController { ...@@ -68,7 +68,7 @@ public class NamespaceController {
appNamespaceDTO.getFormat(), appNamespaceDTO.getDataChangeCreatedBy()); appNamespaceDTO.getFormat(), appNamespaceDTO.getDataChangeCreatedBy());
if (!InputValidator.isValidAppNamespace(appNamespaceDTO.getName())) { if (!InputValidator.isValidAppNamespace(appNamespaceDTO.getName())) {
throw new BadRequestException(String.format("Namespace格式错误: %s", throw new BadRequestException(String.format("Invalid Namespace format: %s",
InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE + " & " InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE + " & "
+ InputValidator.INVALID_NAMESPACE_NAMESPACE_MESSAGE)); + InputValidator.INVALID_NAMESPACE_NAMESPACE_MESSAGE));
} }
......
...@@ -193,7 +193,7 @@ public class NamespaceController { ...@@ -193,7 +193,7 @@ public class NamespaceController {
@RequestParam(defaultValue = "true") boolean appendNamespacePrefix, @RequestParam(defaultValue = "true") boolean appendNamespacePrefix,
@Valid @RequestBody AppNamespace appNamespace) { @Valid @RequestBody AppNamespace appNamespace) {
if (!InputValidator.isValidAppNamespace(appNamespace.getName())) { if (!InputValidator.isValidAppNamespace(appNamespace.getName())) {
throw new BadRequestException(String.format("Namespace格式错误: %s", throw new BadRequestException(String.format("Invalid Namespace format: %s",
InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE + " & " + InputValidator.INVALID_NAMESPACE_NAMESPACE_MESSAGE)); InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE + " & " + InputValidator.INVALID_NAMESPACE_NAMESPACE_MESSAGE));
} }
......
...@@ -154,7 +154,7 @@ public class PermissionController { ...@@ -154,7 +154,7 @@ public class PermissionController {
Set<String> assignedUser = rolePermissionService.assignRoleToUsers(RoleUtils.buildNamespaceRoleName(appId, namespaceName, roleType, env), Set<String> assignedUser = rolePermissionService.assignRoleToUsers(RoleUtils.buildNamespaceRoleName(appId, namespaceName, roleType, env),
Sets.newHashSet(user), userInfoHolder.getUser().getUserId()); Sets.newHashSet(user), userInfoHolder.getUser().getUserId());
if (CollectionUtils.isEmpty(assignedUser)) { if (CollectionUtils.isEmpty(assignedUser)) {
throw new BadRequestException(user + "已授权"); throw new BadRequestException(user + " already authorized");
} }
return ResponseEntity.ok().build(); return ResponseEntity.ok().build();
...@@ -209,7 +209,7 @@ public class PermissionController { ...@@ -209,7 +209,7 @@ public class PermissionController {
Set<String> assignedUser = rolePermissionService.assignRoleToUsers(RoleUtils.buildNamespaceRoleName(appId, namespaceName, roleType), Set<String> assignedUser = rolePermissionService.assignRoleToUsers(RoleUtils.buildNamespaceRoleName(appId, namespaceName, roleType),
Sets.newHashSet(user), userInfoHolder.getUser().getUserId()); Sets.newHashSet(user), userInfoHolder.getUser().getUserId());
if (CollectionUtils.isEmpty(assignedUser)) { if (CollectionUtils.isEmpty(assignedUser)) {
throw new BadRequestException(user + "已授权"); throw new BadRequestException(user + " already authorized");
} }
return ResponseEntity.ok().build(); return ResponseEntity.ok().build();
...@@ -253,7 +253,7 @@ public class PermissionController { ...@@ -253,7 +253,7 @@ public class PermissionController {
Set<String> assignedUsers = rolePermissionService.assignRoleToUsers(RoleUtils.buildAppRoleName(appId, roleType), Set<String> assignedUsers = rolePermissionService.assignRoleToUsers(RoleUtils.buildAppRoleName(appId, roleType),
Sets.newHashSet(user), userInfoHolder.getUser().getUserId()); Sets.newHashSet(user), userInfoHolder.getUser().getUserId());
if (CollectionUtils.isEmpty(assignedUsers)) { if (CollectionUtils.isEmpty(assignedUsers)) {
throw new BadRequestException(user + "已授权"); throw new BadRequestException(user + " already authorized");
} }
return ResponseEntity.ok().build(); return ResponseEntity.ok().build();
......
...@@ -14,7 +14,7 @@ public class AppModel { ...@@ -14,7 +14,7 @@ public class AppModel {
@NotBlank(message = "appId cannot be blank") @NotBlank(message = "appId cannot be blank")
@Pattern( @Pattern(
regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR, regexp = InputValidator.CLUSTER_NAMESPACE_VALIDATOR,
message = "AppId格式错误: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE message = "Invalid AppId format: " + InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE
) )
private String appId; private String appId;
......
...@@ -12,11 +12,11 @@ public class RelativeDateFormat { ...@@ -12,11 +12,11 @@ public class RelativeDateFormat {
private static final long ONE_HOUR = 3600000L; private static final long ONE_HOUR = 3600000L;
private static final long ONE_DAY = 86400000L; private static final long ONE_DAY = 86400000L;
private static final String ONE_SECOND_AGO = "秒前"; private static final String ONE_SECOND_AGO = " seconds ago";
private static final String ONE_MINUTE_AGO = "分钟前"; private static final String ONE_MINUTE_AGO = " minutes ago";
private static final String ONE_HOUR_AGO = "小时前"; private static final String ONE_HOUR_AGO = " hours ago";
private static final String ONE_DAY_AGO = "天前"; private static final String ONE_DAY_AGO = " days ago";
private static final String ONE_MONTH_AGO = "月前"; private static final String ONE_MONTH_AGO = " months ago";
public static String format(Date date) { public static String format(Date date) {
if (date.after(new Date())) { if (date.after(new Date())) {
...@@ -39,11 +39,11 @@ public class RelativeDateFormat { ...@@ -39,11 +39,11 @@ public class RelativeDateFormat {
Date lastDayBeginTime = getDateOffset(-1); Date lastDayBeginTime = getDateOffset(-1);
if (date.after(lastDayBeginTime)) { if (date.after(lastDayBeginTime)) {
return "昨天"; return "yesterday";
} }
Date lastTwoDaysBeginTime = getDateOffset(-2); Date lastTwoDaysBeginTime = getDateOffset(-2);
if (date.after(lastTwoDaysBeginTime)) { if (date.after(lastTwoDaysBeginTime)) {
return "前天"; return "the day before yesterday";
} }
if (delta < 30L * ONE_DAY) { if (delta < 30L * ONE_DAY) {
long days = toDays(delta); long days = toDays(delta);
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label">
<apollorequiredfield></apollorequiredfield> <apollorequiredfield></apollorequiredfield>
{{'Common.AppOwner' | translate }}</label> {{'Common.AppOwnerLong' | translate }}</label>
<div class="col-sm-6 J_ownerSelectorPanel"> <div class="col-sm-6 J_ownerSelectorPanel">
<apollouserselector apollo-id="'ownerSelector'" disabled="isOpenManageAppMasterRoleLimit"></apollouserselector> <apollouserselector apollo-id="'ownerSelector'" disabled="isOpenManageAppMasterRoleLimit"></apollouserselector>
<small style="color: maroon" ng-if="isOpenManageAppMasterRoleLimit">{{'App.AppOwnerTips' | translate }}</small> <small style="color: maroon" ng-if="isOpenManageAppMasterRoleLimit">{{'App.AppOwnerTips' | translate }}</small>
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
<section class="context" ng-show="!hasAssignUserPermission"> <section class="context" ng-show="!hasAssignUserPermission">
<div class="panel-body text-center"> <div class="panel-body text-center">
<h4 translate="App.Setting.NoPermissonTips" translate-value-users="{{admins.join(',')}}"></h4> <h4 translate="App.Setting.NoPermissionTips" translate-value-users="{{admins.join(',')}}"></h4>
</div> </div>
</section> </section>
</div> </div>
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
{{'Common.ClusterName' | translate }}</label> {{'Common.ClusterName' | translate }}</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" class="form-control" name="clusterName" ng-model="clusterName"> <input type="text" class="form-control" name="clusterName" ng-model="clusterName">
<small>{{'Cluster.CreaterNameTips' | translate }}</small> <small>{{'Cluster.CreateNameTips' | translate }}</small>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
<!--default cluster tip --> <!--default cluster tip -->
<div ng-show="pageContext.clusterName == 'default'"> <div ng-show="pageContext.clusterName == 'default'">
<strong>{{'Config.Note' | translate }}:</strong> <strong>{{'Config.Note' | translate }}:</strong>
<span translate="Config.ClusterIsDefualtTipContent" <span translate="Config.ClusterIsDefaultTipContent"
translate-value-name="{{envMapClusters[pageContext.env]}}"></span> translate-value-name="{{envMapClusters[pageContext.env]}}"></span>
</div> </div>
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
<div class="operation-caption release-operation-normal text-center" style="left:0;"> <div class="operation-caption release-operation-normal text-center" style="left:0;">
<small>{{'Config.History.MasterVersionPublish' | translate }}</small> <small>{{'Config.History.MasterVersionPublish' | translate }}</small>
</div> </div>
<div class="operation-caption release-operation-rollback text-center" style="left: 80px;"> <div class="operation-caption release-operation-rollback text-center" style="left: 110px;">
<small>{{'Config.History.MasterVersionRollback' | translate }}</small> <small>{{'Config.History.MasterVersionRollback' | translate }}</small>
</div> </div>
<div class="operation-caption release-operation-gray text-center" style="left: 160px;"> <div class="operation-caption release-operation-gray text-center" style="left: 220px;">
<small>{{'Config.History.GrayscaleOperator' | translate }}</small> <small>{{'Config.History.GrayscaleOperator' | translate }}</small>
</div> </div>
</div> </div>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<div class="load-more media panel-heading text-center hover" ng-show="!hasLoadAll" <div class="load-more media panel-heading text-center hover" ng-show="!hasLoadAll"
ng-click="findReleaseHistory()"> ng-click="findReleaseHistory()">
{{'Config.History.LoadingMore' | translate }} {{'Config.History.LoadMore' | translate }}
</div> </div>
</div> </div>
...@@ -114,12 +114,12 @@ ...@@ -114,12 +114,12 @@
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default btn-sm" <button type="button" class="btn btn-default btn-sm"
ng-class="{'active':history.viewType == 'diff'}" data-tooltip="tooltip" ng-class="{'active':history.viewType == 'diff'}" data-tooltip="tooltip"
data-placement="bottom" title="查看此次发布与上次版本的变更" data-placement="bottom" title="{{'Config.History.ChangedItemTips' | translate }}"
ng-click="switchConfigViewType(history, 'diff')">{{'Config.History.ChangedItem' | translate }} ng-click="switchConfigViewType(history, 'diff')">{{'Config.History.ChangedItem' | translate }}
</button> </button>
<button type="button" class="btn btn-default btn-sm" <button type="button" class="btn btn-default btn-sm"
ng-class="{'active':history.viewType == 'all'}" data-tooltip="tooltip" ng-class="{'active':history.viewType == 'all'}" data-tooltip="tooltip"
data-placement="bottom" title="查看此次发布的所有配置信息" data-placement="bottom" title="{{'Config.History.AllItemTips' | translate }}"
ng-click="switchConfigViewType(history, 'all')">{{'Config.History.AllItem' | translate }} ng-click="switchConfigViewType(history, 'all')">{{'Config.History.AllItem' | translate }}
</button> </button>
</div> </div>
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
<div class="panel-body" ng-show="isConfigHidden || !releaseHistories || releaseHistories.length == 0"> <div class="panel-body" ng-show="isConfigHidden || !releaseHistories || releaseHistories.length == 0">
<h4 class="text-center empty-container" ng-show="isConfigHidden"> <h4 class="text-center empty-container" ng-show="isConfigHidden">
{{'Config.History.NoPermissonTips' | translate }}</h4> {{'Config.History.NoPermissionTips' | translate }}</h4>
<h4 class="text-center empty-container" ng-show="!isConfigHidden"> <h4 class="text-center empty-container" ng-show="!isConfigHidden">
{{'Config.History.NoPublishHistory' | translate }}</h4> {{'Config.History.NoPublishHistory' | translate }}</h4>
</div> </div>
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
ng-click="getUserCreatedApps()"> ng-click="getUserCreatedApps()">
<div href="#" class="thumbnail hover cursor-pointer"> <div href="#" class="thumbnail hover cursor-pointer">
<img class="more-img" src="img/more.png" /> <img class="more-img" src="img/more.png" />
<h5>{{'Index.LoadingMore' | translate }}</h5> <h5>{{'Index.LoadMore' | translate }}</h5>
</div> </div>
</div> </div>
</aside> </aside>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<div class="col-md-2 text-center" ng-show="hasMoreFavorites" ng-click="getUserFavorites()"> <div class="col-md-2 text-center" ng-show="hasMoreFavorites" ng-click="getUserFavorites()">
<div href="#" class="thumbnail hover cursor-pointer"> <div href="#" class="thumbnail hover cursor-pointer">
<img class="more-img" src="img/more.png" /> <img class="more-img" src="img/more.png" />
<h5>{{'Index.LoadingMore' | translate }}</h5> <h5>{{'Index.LoadMore' | translate }}</h5>
</div> </div>
</div> </div>
<div class="no-favorites text-center" ng-show="!favorites || favorites.length == 0"> <div class="no-favorites text-center" ng-show="!favorites || favorites.length == 0">
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<section class="media visit-app-list" ng-show="visitedApps && visitedApps.length"> <section class="media visit-app-list" ng-show="visitedApps && visitedApps.length">
<aside class="media-left text-center"> <aside class="media-left text-center">
<h5>{{'Index.RecentyViewedItems' | translate }}</h5> <h5>{{'Index.RecentlyViewedItems' | translate }}</h5>
</aside> </aside>
<aside class="media-body"> <aside class="media-body">
<div class="app-panel col-md-2 text-center" ng-repeat="app in visitedApps" <div class="app-panel col-md-2 text-center" ng-repeat="app in visitedApps"
...@@ -117,10 +117,6 @@ ...@@ -117,10 +117,6 @@
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-loader-static-files.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate-loader-static-files.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-translate/2.18.1/angular-translate.min.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-translate/2.18.1/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-translate/2.18.1/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js"></script>-->
<!-- jquery.js --> <!-- jquery.js -->
<script src="vendor/jquery.min.js" type="text/javascript"></script> <script src="vendor/jquery.min.js" type="text/javascript"></script>
<script src="vendor/select2/select2.min.js" type="text/javascript"></script> <script src="vendor/select2/select2.min.js" type="text/javascript"></script>
......
...@@ -62,10 +62,10 @@ ...@@ -62,10 +62,10 @@
<div class="row text-right" style="padding-right: 20px;"> <div class="row text-right" style="padding-right: 20px;">
<div class="btn-group btn-group-sm" role="group" aria-label="..."> <div class="btn-group btn-group-sm" role="group" aria-label="...">
<button type="button" class="btn btn-default" ng-class="{active:type=='link'}" <button type="button" class="btn btn-default" ng-class="{active:type=='link'}"
ng-click="switchType('link')">{{'Namespace.AssociationPublicNamespcae' | translate }} ng-click="switchType('link')">{{'Namespace.AssociationPublicNamespace' | translate }}
</button> </button>
<button type="button" class="btn btn-default" ng-class="{active:type=='create'}" <button type="button" class="btn btn-default" ng-class="{active:type=='create'}"
ng-click="switchType('create')">{{'Namespace.CreateNamespcae' | translate }} ng-click="switchType('create')">{{'Namespace.CreateNamespace' | translate }}
</button> </button>
</div> </div>
</div> </div>
...@@ -142,16 +142,16 @@ ...@@ -142,16 +142,16 @@
ng-show="type == 'create' && (pageSetting.canAppAdminCreatePrivateNamespace || hasRootPermission)"> ng-show="type == 'create' && (pageSetting.canAppAdminCreatePrivateNamespace || hasRootPermission)">
<label class="col-sm-3 control-label"> <label class="col-sm-3 control-label">
<apollorequiredfield></apollorequiredfield> <apollorequiredfield></apollorequiredfield>
{{'Namespace.NamespcaeType' | translate }} {{'Namespace.NamespaceType' | translate }}
</label> </label>
<div class="col-sm-4" valdr-form-group> <div class="col-sm-4" valdr-form-group>
<label class="radio-inline"> <label class="radio-inline">
<input type="radio" name="namespaceType" value="true" ng-value="true" <input type="radio" name="namespaceType" value="true" ng-value="true"
ng-model="appNamespace.isPublic"> {{'Namespace.NamespcaeType.Public' | translate }} ng-model="appNamespace.isPublic"> {{'Namespace.NamespaceType.Public' | translate }}
</label> </label>
<label class="radio-inline"> <label class="radio-inline">
<input type="radio" name="namespaceType" value="false" ng-value="false" <input type="radio" name="namespaceType" value="false" ng-value="false"
ng-model="appNamespace.isPublic"> {{'Namespace.NamespcaeType.Private' | translate }} ng-model="appNamespace.isPublic"> {{'Namespace.NamespaceType.Private' | translate }}
</label> </label>
</div> </div>
</div> </div>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label <label
class="col-sm-2 control-label">{{'Namespace.Role.GrantModifyTo' | translate }}<br><small>{{'Namespace.Role.GrantModifyT2' | translate }}</small></label> class="col-sm-2 control-label">{{'Namespace.Role.GrantModifyTo' | translate }}<br><small>{{'Namespace.Role.GrantModifyTo2' | translate }}</small></label>
<div class="col-sm-8"> <div class="col-sm-8">
<form class="form-inline" ng-submit="assignRoleToUser('ModifyNamespace')"> <form class="form-inline" ng-submit="assignRoleToUser('ModifyNamespace')">
<div class="form-group"> <div class="form-group">
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<div class="form-horizontal"> <div class="form-horizontal">
<div class="col-sm-2 text-right"> <div class="col-sm-2 text-right">
<label <label
class="control-label">{{'Namespace.Role.GrantPubishTo' | translate }}<br><small>{{'Namespace.Role.GrantPubishTo2' | translate }}</small></label> class="control-label">{{'Namespace.Role.GrantPublishTo' | translate }}<br><small>{{'Namespace.Role.GrantPublishTo2' | translate }}</small></label>
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">
<form class="form-inline" ng-submit="assignRoleToUser('ReleaseNamespace')"> <form class="form-inline" ng-submit="assignRoleToUser('ReleaseNamespace')">
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
</div> </div>
<div class="panel-body text-center" ng-show="!hasAssignUserPermission"> <div class="panel-body text-center" ng-show="!hasAssignUserPermission">
<h2>{{'Namespace.Role.NoPermisson' | translate }}</h2> <h2>{{'Namespace.Role.NoPermission' | translate }}</h2>
</div> </div>
</section> </section>
......
...@@ -2,7 +2,7 @@ appUtil.service('AppUtil', ['toastr', '$window', '$q', '$translate', function (t ...@@ -2,7 +2,7 @@ appUtil.service('AppUtil', ['toastr', '$window', '$q', '$translate', function (t
function parseErrorMsg(response) { function parseErrorMsg(response) {
if (response.status == -1) { if (response.status == -1) {
return $translate.instant('Common.LoginExprieTips'); return $translate.instant('Common.LoginExpiredTips');
} }
var msg = "Code:" + response.status; var msg = "Code:" + response.status;
if (response.data.message != null) { if (response.data.message != null) {
...@@ -13,7 +13,7 @@ appUtil.service('AppUtil', ['toastr', '$window', '$q', '$translate', function (t ...@@ -13,7 +13,7 @@ appUtil.service('AppUtil', ['toastr', '$window', '$q', '$translate', function (t
function parsePureErrorMsg(response) { function parsePureErrorMsg(response) {
if (response.status == -1) { if (response.status == -1) {
return $translate.instant('Common.LoginExprieTips'); return $translate.instant('Common.LoginExpiredTips');
} }
if (response.data.message != null) { if (response.data.message != null) {
return response.data.message; return response.data.message;
......
...@@ -2,15 +2,19 @@ ...@@ -2,15 +2,19 @@
var appUtil = angular.module('app.util', ['toastr', 'ngCookies', 'pascalprecht.translate']) var appUtil = angular.module('app.util', ['toastr', 'ngCookies', 'pascalprecht.translate'])
.config(['$translateProvider', function ($translateProvider) { .config(['$translateProvider', function ($translateProvider) {
// $translateProvider.useMissingTranslationHandlerLog(); $translateProvider.useSanitizeValueStrategy(null); // disable sanitization by default
$translateProvider.useCookieStorage(); $translateProvider.useCookieStorage();
$translateProvider.useStaticFilesLoader({ $translateProvider.useStaticFilesLoader({
prefix: '/i18n/', prefix: '/i18n/',
suffix: '.json' suffix: '.json'
}); });
$translateProvider.preferredLanguage('en'); $translateProvider.registerAvailableLanguageKeys(['en', 'zh-CN'], {
$translateProvider.fallbackLanguage('zh-cn'); 'zh-*': 'zh-CN',
'zh': 'zh-CN',
'en-*': 'en',
"*": "en"
})
$translateProvider.uniformLanguageTag('bcp47').determinePreferredLanguage();
}]); }]);
/**service module 定义*/ /**service module 定义*/
var appService = angular.module('app.service', ['ngResource', 'app.util']) var appService = angular.module('app.service', ['ngResource', 'app.util'])
......
...@@ -27,7 +27,7 @@ function createAppController($scope, $window, $translate, toastr, AppService, Ap ...@@ -27,7 +27,7 @@ function createAppController($scope, $window, $translate, toastr, AppService, Ap
organizations.push(org); organizations.push(org);
}); });
$('#organization').select2({ $('#organization').select2({
placeholder: $translate.instant('Common.PelaseChooseDepartment'), placeholder: $translate.instant('Common.PleaseChooseDepartment'),
width: '100%', width: '100%',
data: organizations data: organizations
}); });
...@@ -60,7 +60,7 @@ function createAppController($scope, $window, $translate, toastr, AppService, Ap ...@@ -60,7 +60,7 @@ function createAppController($scope, $window, $translate, toastr, AppService, Ap
var selectedOrg = $('#organization').select2('data')[0]; var selectedOrg = $('#organization').select2('data')[0];
if (!selectedOrg.id) { if (!selectedOrg.id) {
toastr.warning($translate.instant('Common.PelaseChooseDepartment')); toastr.warning($translate.instant('Common.PleaseChooseDepartment'));
$scope.submitBtnDisabled = false; $scope.submitBtnDisabled = false;
return; return;
} }
...@@ -74,7 +74,7 @@ function createAppController($scope, $window, $translate, toastr, AppService, Ap ...@@ -74,7 +74,7 @@ function createAppController($scope, $window, $translate, toastr, AppService, Ap
owner = { id: $scope.currentUser.userId }; owner = { id: $scope.currentUser.userId };
} }
if (!owner) { if (!owner) {
toastr.warning($translate.instant('Common.PelaseChooseOwner')); toastr.warning($translate.instant('Common.PleaseChooseOwner'));
$scope.submitBtnDisabled = false; $scope.submitBtnDisabled = false;
return; return;
} }
......
...@@ -62,7 +62,7 @@ function DeleteAppClusterNamespaceController($scope, $translate, toastr, AppUtil ...@@ -62,7 +62,7 @@ function DeleteAppClusterNamespaceController($scope, $translate, toastr, AppUtil
toastr.warning($translate.instant('Delete.PleaseEnterAppId')); toastr.warning($translate.instant('Delete.PleaseEnterAppId'));
return; return;
} }
if (confirm($translate.instant('Delete.PleaseEnterAppId', { appId: $scope.app.appId }))) { if (confirm($translate.instant('Delete.ConfirmDeleteAppId', { appId: $scope.app.appId }))) {
AppService.delete_app($scope.app.appId).then(function (result) { AppService.delete_app($scope.app.appId).then(function (result) {
toastr.success($translate.instant('Delete.Deleted')); toastr.success($translate.instant('Delete.Deleted'));
$scope.deleteAppBtnDisabled = true; $scope.deleteAppBtnDisabled = true;
...@@ -99,9 +99,9 @@ function DeleteAppClusterNamespaceController($scope, $translate, toastr, AppUtil ...@@ -99,9 +99,9 @@ function DeleteAppClusterNamespaceController($scope, $translate, toastr, AppUtil
return; return;
} }
var confirmTip = $translate.instant('Delete.ConfirmDeleteCluster', { var confirmTip = $translate.instant('Delete.ConfirmDeleteCluster', {
appId: result.appId, appId: $scope.cluster.appId,
env: $scope.cluster.env, env: $scope.cluster.env,
clusterName: result.name clusterName: $scope.cluster.name
}); });
if (confirm(confirmTip)) { if (confirm(confirmTip)) {
......
...@@ -8,10 +8,12 @@ function LoginController($scope, $window, $location, $translate, toastr, AppUtil ...@@ -8,10 +8,12 @@ function LoginController($scope, $window, $location, $translate, toastr, AppUtil
if (params.error) { if (params.error) {
$translate('Login.UserNameOrPasswordIncorrect').then(function(result) { $translate('Login.UserNameOrPasswordIncorrect').then(function(result) {
$scope.info = result; $scope.info = result;
}) });
} }
if (params.logout) { if (params.logout) {
$scope.info = $translate.instant('Login.LogoutSuccessfully'); $translate('Login.LogoutSuccessfully').then(function(result) {
$scope.info = result;
});
} }
} }
......
...@@ -118,7 +118,7 @@ namespace_module.controller("LinkNamespaceController", ...@@ -118,7 +118,7 @@ namespace_module.controller("LinkNamespaceController",
var namespaceNameLength = $scope.concatNamespace().length; var namespaceNameLength = $scope.concatNamespace().length;
if (namespaceNameLength > 32) { if (namespaceNameLength > 32) {
var errorTip = $translate.instant('Namespace.ChecknamespaceNameLengthTip', { var errorTip = $translate.instant('Namespace.CheckNamespaceNameLengthTip', {
departmentLength: namespaceNameLength - $scope.appNamespace.name.length, departmentLength: namespaceNameLength - $scope.appNamespace.name.length,
namespaceLength: $scope.appNamespace.name.length namespaceLength: $scope.appNamespace.name.length
}); });
......
...@@ -7,17 +7,17 @@ server_config_module.controller('ServerConfigController', ...@@ -7,17 +7,17 @@ server_config_module.controller('ServerConfigController',
$scope.create = function () { $scope.create = function () {
ServerConfigService.create($scope.serverConfig).then(function (result) { ServerConfigService.create($scope.serverConfig).then(function (result) {
toastr.success($translate.instant('SericeConfig.Saved')); toastr.success($translate.instant('ServiceConfig.Saved'));
$scope.saveBtnDisabled = true; $scope.saveBtnDisabled = true;
$scope.serverConfig = result; $scope.serverConfig = result;
}, function (result) { }, function (result) {
toastr.error(AppUtil.errorMsg(result), $translate.instant('SericeConfig.SaveFailed')); toastr.error(AppUtil.errorMsg(result), $translate.instant('ServiceConfig.SaveFailed'));
}); });
}; };
$scope.getServerConfigInfo = function () { $scope.getServerConfigInfo = function () {
if (!$scope.serverConfig.key) { if (!$scope.serverConfig.key) {
toastr.warning($translate.instant('SericeConfig.PleaseEnterKey')); toastr.warning($translate.instant('ServiceConfig.PleaseEnterKey'));
return; return;
} }
...@@ -25,11 +25,11 @@ server_config_module.controller('ServerConfigController', ...@@ -25,11 +25,11 @@ server_config_module.controller('ServerConfigController',
$scope.saveBtnDisabled = false; $scope.saveBtnDisabled = false;
if (!result.key) { if (!result.key) {
toastr.info($translate.instant('SericeConfig.KeyNotExistsAndCreateTip', { key: $scope.serverConfig.key })); toastr.info($translate.instant('ServiceConfig.KeyNotExistsAndCreateTip', { key: $scope.serverConfig.key }));
return; return;
} }
toastr.info($translate.instant('SericeConfig.KeyExistsAndSaveTip', { key: $scope.serverConfig.key })); toastr.info($translate.instant('ServiceConfig.KeyExistsAndSaveTip', { key: $scope.serverConfig.key }));
$scope.serverConfig = result; $scope.serverConfig = result;
}, function (result) { }, function (result) {
AppUtil.showErrorMsg(result); AppUtil.showErrorMsg(result);
......
...@@ -49,7 +49,7 @@ function SettingController($scope, $location, $translate, toastr, ...@@ -49,7 +49,7 @@ function SettingController($scope, $location, $translate, toastr,
organizations.push(org); organizations.push(org);
}); });
$orgWidget.select2({ $orgWidget.select2({
placeholder: $translate.instant('Common.PelaseChooseDepartment'), placeholder: $translate.instant('Common.PleaseChooseDepartment'),
width: '100%', width: '100%',
data: organizations data: organizations
}); });
...@@ -177,7 +177,7 @@ function SettingController($scope, $location, $translate, toastr, ...@@ -177,7 +177,7 @@ function SettingController($scope, $location, $translate, toastr,
var selectedOrg = $orgWidget.select2('data')[0]; var selectedOrg = $orgWidget.select2('data')[0];
if (!selectedOrg.id) { if (!selectedOrg.id) {
toastr.warning($translate.instant('Common.PelaseChooseDepartment')); toastr.warning($translate.instant('Common.PleaseChooseDepartment'));
return; return;
} }
...@@ -187,13 +187,13 @@ function SettingController($scope, $location, $translate, toastr, ...@@ -187,13 +187,13 @@ function SettingController($scope, $location, $translate, toastr,
// owner // owner
var owner = $('.ownerSelector').select2('data')[0]; var owner = $('.ownerSelector').select2('data')[0];
if (!owner) { if (!owner) {
toastr.warning($translate.instant('Common.PelaseChooseOwner')); toastr.warning($translate.instant('Common.PleaseChooseOwner'));
return; return;
} }
app.ownerName = owner.id; app.ownerName = owner.id;
AppService.update(app).then(function (app) { AppService.update(app).then(function (app) {
toastr.success($translate.instant('Common.Modifed')); toastr.success($translate.instant('App.Setting.Modified'));
initApplication(); initApplication();
$scope.display.app.edit = false; $scope.display.app.edit = false;
$scope.submitBtnDisabled = false; $scope.submitBtnDisabled = false;
......
...@@ -45,7 +45,7 @@ function ConfigBaseInfoController($rootScope, $scope, $window, $location, $trans ...@@ -45,7 +45,7 @@ function ConfigBaseInfoController($rootScope, $scope, $window, $location, $trans
loadAppInfo(); loadAppInfo();
handleFavorite(); handleFavorite();
}, function (result) { }, function (result) {
toastr.error(AppUtil.errorMsg(result), $translate.instant('Config.GetrUserInfoFailed')); toastr.error(AppUtil.errorMsg(result), $translate.instant('Config.GetUserInfoFailed'));
}); });
handlePermission(); handlePermission();
...@@ -326,7 +326,7 @@ function ConfigBaseInfoController($rootScope, $scope, $window, $location, $trans ...@@ -326,7 +326,7 @@ function ConfigBaseInfoController($rootScope, $scope, $window, $location, $trans
$scope.favoriteId = 0; $scope.favoriteId = 0;
toastr.success($translate.instant('Config.CancelledFavorite')); toastr.success($translate.instant('Config.CancelledFavorite'));
}, function (result) { }, function (result) {
toastr.error(AppUtil.errorMsg(result), $translate.instant('Config.CanceFavoriteFailed')); toastr.error(AppUtil.errorMsg(result), $translate.instant('Config.CancelFavoriteFailed'));
}) })
}; };
} }
......
...@@ -35,7 +35,7 @@ function OpenManageController($scope, $translate, toastr, AppUtil, OrganizationS ...@@ -35,7 +35,7 @@ function OpenManageController($scope, $translate, toastr, AppUtil, OrganizationS
organizations.push(org); organizations.push(org);
}); });
$orgWidget.select2({ $orgWidget.select2({
placeholder: $translate.instant('Common.PelaseChooseDepartment'), placeholder: $translate.instant('Common.PleaseChooseDepartment'),
width: '100%', width: '100%',
data: organizations data: organizations
}); });
...@@ -103,7 +103,7 @@ function OpenManageController($scope, $translate, toastr, AppUtil, OrganizationS ...@@ -103,7 +103,7 @@ function OpenManageController($scope, $translate, toastr, AppUtil, OrganizationS
var selectedOrg = $orgWidget.select2('data')[0]; var selectedOrg = $orgWidget.select2('data')[0];
if (!selectedOrg.id) { if (!selectedOrg.id) {
toastr.warning($translate.instant('Common.PelaseChooseDepartment')); toastr.warning($translate.instant('Common.PleaseChooseDepartment'));
return; return;
} }
...@@ -113,7 +113,7 @@ function OpenManageController($scope, $translate, toastr, AppUtil, OrganizationS ...@@ -113,7 +113,7 @@ function OpenManageController($scope, $translate, toastr, AppUtil, OrganizationS
// owner // owner
var owner = $('.ownerSelector').select2('data')[0]; var owner = $('.ownerSelector').select2('data')[0];
if (!owner) { if (!owner) {
toastr.warning($translate.instant('Common.PelaseChooseOwner')); toastr.warning($translate.instant('Common.PleaseChooseOwner'));
return; return;
} }
$scope.consumer.ownerName = owner.id; $scope.consumer.ownerName = owner.id;
......
...@@ -18,8 +18,9 @@ directive_module.directive('apollonav', ...@@ -18,8 +18,9 @@ directive_module.directive('apollonav',
scope.$apply(function () {}); scope.$apply(function () {});
}); });
$translate('ApolloConfirmDialog.SearchPlaceHolder').then(function(placeholderLabel) {
$('#app-search-list').select2({ $('#app-search-list').select2({
placeholder: $translate.instant('ApolloConfirmDialog.SearchPlaceHolder'), placeholder: placeholderLabel,
ajax: { ajax: {
url: "/apps/search", url: "/apps/search",
dataType: 'json', dataType: 'json',
...@@ -67,6 +68,7 @@ directive_module.directive('apollonav', ...@@ -67,6 +68,7 @@ directive_module.directive('apollonav',
jumpToConfigPage(selected[0].id) jumpToConfigPage(selected[0].id)
} }
}); });
});
function jumpToConfigPage(selectedAppId) { function jumpToConfigPage(selectedAppId) {
if ($window.location.href.indexOf("config.html") > -1) { if ($window.location.href.indexOf("config.html") > -1) {
......
...@@ -124,7 +124,7 @@ function itemModalDirective($translate, toastr, $sce, AppUtil, EventManager, Con ...@@ -124,7 +124,7 @@ function itemModalDirective($translate, toastr, $sce, AppUtil, EventManager, Con
AppUtil.hideModal('#itemModal'); AppUtil.hideModal('#itemModal');
toastr.success($translate.instant('ItemModal.ModifedTips')); toastr.success($translate.instant('ItemModal.ModifiedTips'));
}, function (result) { }, function (result) {
toastr.error(AppUtil.errorMsg(result), $translate.instant('ItemModal.ModifyFailed')); toastr.error(AppUtil.errorMsg(result), $translate.instant('ItemModal.ModifyFailed'));
}); });
......
...@@ -659,7 +659,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio ...@@ -659,7 +659,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
branch.rules branch.rules
) )
.then(function (result) { .then(function (result) {
toastr.success($translate.instant('ApolloNsPanel.GrayscaleModifed')); toastr.success($translate.instant('ApolloNsPanel.GrayscaleModified'));
//show tips if branch has not release configs //show tips if branch has not release configs
if (branch.itemModifiedCnt) { if (branch.itemModifiedCnt) {
...@@ -729,7 +729,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio ...@@ -729,7 +729,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
namespace.baseInfo.namespaceName, namespace.baseInfo.namespaceName,
model).then( model).then(
function (result) { function (result) {
toastr.success($translate.instant('ApolloNsPanel.ModifedTips')); toastr.success($translate.instant('ApolloNsPanel.ModifiedTips'));
//refresh all namespace items //refresh all namespace items
EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE, EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE,
{ {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css"> <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css"> <link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link rel="stylesheet" type="text/css" href="styles/common-style.css"> <link rel="stylesheet" type="text/css" href="styles/common-style.css">
<title>{{'SericeConfig.Title' | translate }}</title> <title>{{'ServiceConfig.Title' | translate }}</title>
</head> </head>
<body> <body>
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
<div class="col-md-8 col-md-offset-2"> <div class="col-md-8 col-md-offset-2">
<div class="panel"> <div class="panel">
<header class="panel-heading"> <header class="panel-heading">
{{'SericeConfig.Title' | translate }} {{'ServiceConfig.Title' | translate }}
<small>{{'SericeConfig.Tips' | translate }}</small> <small>{{'ServiceConfig.Tips' | translate }}</small>
</header> </header>
<div class="panel-body"> <div class="panel-body">
...@@ -31,12 +31,12 @@ ...@@ -31,12 +31,12 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label"> <label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield> <apollorequiredfield></apollorequiredfield>
{{'SericeConfig.Key' | translate }} {{'ServiceConfig.Key' | translate }}
</label> </label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="text" class="form-control" name="key" ng-model="serverConfig.key" <input type="text" class="form-control" name="key" ng-model="serverConfig.key"
required> required>
<small>{{'SericeConfig.KeyTips' | translate }}</small> <small>{{'ServiceConfig.KeyTips' | translate }}</small>
</div> </div>
<div class="col-sm-1"> <div class="col-sm-1">
<button class="btn btn-info" <button class="btn btn-info"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label"> <label class="col-sm-2 control-label">
<apollorequiredfield></apollorequiredfield> <apollorequiredfield></apollorequiredfield>
{{'SericeConfig.Value' | translate }} {{'ServiceConfig.Value' | translate }}
</label> </label>
<div class="col-sm-9"> <div class="col-sm-9">
<textarea class="form-control" rows="4" name="value" <textarea class="form-control" rows="4" name="value"
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label"> <label class="col-sm-2 control-label">
{{'SericeConfig.Comment' | translate }}</label> {{'ServiceConfig.Comment' | translate }}</label>
<div class="col-sm-9"> <div class="col-sm-9">
<textarea class="form-control" rows="4" name="comment" <textarea class="form-control" rows="4" name="comment"
ng-model="serverConfig.comment"></textarea> ng-model="serverConfig.comment"></textarea>
......
...@@ -297,7 +297,7 @@ table th { ...@@ -297,7 +297,7 @@ table th {
.project-info th { .project-info th {
text-align: right; text-align: right;
padding: 4px 6px; padding: 4px 2px;
width: 5em; width: 5em;
} }
...@@ -654,7 +654,7 @@ table th { ...@@ -654,7 +654,7 @@ table th {
.release-history .operation-caption { .release-history .operation-caption {
position: absolute; position: absolute;
top: 45px; top: 45px;
width: 75px; width: 100px;
height: 18px; height: 18px;
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li value="en"><a href="javascript:void(0)" ng-click="changeLanguage('en')">English</a></li> <li value="en"><a href="javascript:void(0)" ng-click="changeLanguage('en')">English</a></li>
<li value="zh-cn"><a href="javascript:void(0)" ng-click="changeLanguage('zh-cn')">简体中文</a></li> <li value="zh-CN"><a href="javascript:void(0)" ng-click="changeLanguage('zh-CN')">简体中文</a></li>
</ul> </ul>
</li> </li>
<li class="dropdown" ng-if="hasRootPermission"> <li class="dropdown" ng-if="hasRootPermission">
......
<table class="table table-hover" style="width: 250px"> <table class="table table-hover" style="width: 300px">
<thead> <thead>
<tr> <tr>
<td><input type="checkbox" ng-checked="envAllSelected" ng-click="toggleEnvsCheckedStatus()"></td> <td><input type="checkbox" ng-checked="envAllSelected" ng-click="toggleEnvsCheckedStatus()"></td>
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span> title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span>
<span class="label label-info" ng-if="!config.isDeleted && config.masterItemExists" <span class="label label-info" ng-if="!config.isDeleted && config.masterItemExists"
data-tooltip="tooltip" data-placement="bottom" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ChangedFormMaster' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span> title="{{'Component.Namespace.Branch.Body.ChangedFromMaster' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span>
<span class="label label-success" <span class="label label-success"
ng-if="!config.isDeleted && !config.masterItemExists" data-tooltip="tooltip" ng-if="!config.isDeleted && !config.masterItemExists" data-tooltip="tooltip"
data-placement="bottom" data-placement="bottom"
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
<span class="label label-info" <span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted" ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.ModifedItem' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span> title="{{'Component.Namespace.Branch.Body.ModifiedItem' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip" <span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom" data-placement="bottom"
title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span> title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span>
...@@ -307,7 +307,7 @@ ...@@ -307,7 +307,7 @@
<div class="alert alert-warning no-radius" <div class="alert alert-warning no-radius"
ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission"> ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission">
<strong>Tips:</strong> <strong>Tips:</strong>
{{'Component.Namespace.Branch.GrayScaleRule.NoPermissonTips' | translate }} {{'Component.Namespace.Branch.GrayScaleRule.NoPermissionTips' | translate }}
</div> </div>
<table class="table table-bordered table-hover"> <table class="table table-bordered table-hover">
...@@ -397,7 +397,7 @@ ...@@ -397,7 +397,7 @@
<div class="row text-center" <div class="row text-center"
ng-show="namespace.branch.latestReleaseInstances.content.length < namespace.branch.latestReleaseInstances.total"> ng-show="namespace.branch.latestReleaseInstances.content.length < namespace.branch.latestReleaseInstances.total">
<button class="btn btn-default" <button class="btn btn-default"
ng-click="loadInstanceInfo(namespace.branch)">{{'Component.Namespace.Branch.Instance.LoadingMore' | translate }}</button> ng-click="loadInstanceInfo(namespace.branch)">{{'Component.Namespace.Branch.Instance.LoadMore' | translate }}</button>
</div> </div>
</div> </div>
...@@ -450,7 +450,7 @@ ...@@ -450,7 +450,7 @@
<!--兼容老数据,不显示item类型为空行和注释的item--> <!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key"> <tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="2%"> <td width="6%">
{{'Component.Namespace.Branch.History.NewAdded' | translate }} {{'Component.Namespace.Branch.History.NewAdded' | translate }}
</td> </td>
<td width="20%" title="{{item.key}}"> <td width="20%" title="{{item.key}}">
...@@ -458,9 +458,9 @@ ...@@ -458,9 +458,9 @@
<span ng-bind="item.key | limitTo: 250"></span> <span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span> <span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td> </td>
<td width="30%"> <td width="28%">
</td> </td>
<td width="30%" class="cursor-pointer" title="{{item.value}}" <td width="28%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)"> ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span> <span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span> <span ng-bind="item.value.length > 250 ? '...': ''"></span>
...@@ -471,19 +471,19 @@ ...@@ -471,19 +471,19 @@
</td> </td>
</tr> </tr>
<tr ng-repeat="item in commits.changeSets.updateItems"> <tr ng-repeat="item in commits.changeSets.updateItems">
<td width="2%"> <td width="6%">
{{'Component.Namespace.Branch.History.Modifed' | translate }} {{'Component.Namespace.Branch.History.Modified' | translate }}
</td> </td>
<td width="20%" title="{{item.newItem.key}}"> <td width="20%" title="{{item.newItem.key}}">
<span ng-bind="item.newItem.key | limitTo: 250"></span> <span ng-bind="item.newItem.key | limitTo: 250"></span>
<span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span> <span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span>
</td> </td>
<td width="30%" class="cursor-pointer" title="{{item.oldItem.value}}" <td width="28%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)"> ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span> <span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span> <span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="30%" class="cursor-pointer" title="{{item.newItem.value}}" <td width="28%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)"> ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span> <span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span> <span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
...@@ -495,18 +495,18 @@ ...@@ -495,18 +495,18 @@
</tr> </tr>
<tr ng-repeat="item in commits.changeSets.deleteItems" <tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment"> ng-show="item.key || item.comment">
<td width="2%"> <td width="6%">
{{'Component.Namespace.Branch.History.Deleted' | translate }} {{'Component.Namespace.Branch.History.Deleted' | translate }}
</td> </td>
<td width="20%" title="{{item.key}}"> <td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span> <span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span> <span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td> </td>
<td width="30%" title="{{item.value}}"> <td width="28%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span> <span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span> <span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="30%"> <td width="28%">
</td> </td>
<td width="18%" title="{{item.comment}}"> <td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span> <span ng-bind="item.comment | limitTo: 250"></span>
...@@ -537,7 +537,7 @@ ...@@ -537,7 +537,7 @@
</div> </div>
<div class="text-center"> <div class="text-center">
<button type="button" class="btn btn-default" ng-show="!namespace.branch.hasLoadAllCommit" <button type="button" class="btn btn-default" ng-show="!namespace.branch.hasLoadAllCommit"
ng-click="loadCommitHistory(namespace.branch)">{{'Component.Namespace.Branch.History.LoadingMore' | translate }} ng-click="loadCommitHistory(namespace.branch)">{{'Component.Namespace.Branch.History.LoadMore' | translate }}
<span class="glyphicon glyphicon-menu-down"></span></button> <span class="glyphicon glyphicon-menu-down"></span></button>
</div> </div>
<div class="empty-container text-center" <div class="empty-container text-center"
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<span class="label label-info" <span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted" ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Publish.ModifedTips' | translate }}">{{'Component.Publish.Modifed' | translate }}</span> title="{{'Component.Publish.ModifiedTips' | translate }}">{{'Component.Publish.Modified' | translate }}</span>
<span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip" <span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip"
data-placement="bottom" data-placement="bottom"
title="{{'Component.Publish.DeletedTips' | translate }}">{{'Component.Publish.Deleted' | translate }}</span> title="{{'Component.Publish.DeletedTips' | translate }}">{{'Component.Publish.Deleted' | translate }}</span>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
aria-hidden="true">&times;</span></button> aria-hidden="true">&times;</span></button>
<div class="modal-title text-center"> <div class="modal-title text-center">
<span style="font-size: 18px;" ng-bind="toRollbackNamespace.firstRelease.name"></span> <span style="font-size: 18px;" ng-bind="toRollbackNamespace.firstRelease.name"></span>
<span style="font-size: 18px;"> &nbsp;{{'Component.Rollback.Goto' | translate }}&nbsp;</span> <span style="font-size: 18px;"> &nbsp;{{'Component.Rollback.To' | translate }}&nbsp;</span>
<span style="font-size: 18px;" ng-bind="toRollbackNamespace.secondRelease.name"></span> <span style="font-size: 18px;" ng-bind="toRollbackNamespace.secondRelease.name"></span>
</div> </div>
</div> </div>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="alert alert-warning" role="alert"> <div class="alert alert-warning" role="alert">
{{'Component.Rollback.Tips' | translate }} {{'Component.Rollback.Tips' | translate }}
<a target="_blank" <a target="_blank"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{toRollbackNamespace.baseInfo.clusterName}}&namespaceName={{toRollbackNamespace.baseInfo.namespaceName}}">点击查看</a> href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{toRollbackNamespace.baseInfo.clusterName}}&namespaceName={{toRollbackNamespace.baseInfo.namespaceName}}">{{'Component.Rollback.ClickToView' | translate }}</a>
</div> </div>
<div class="form-group" style="margin-top: 15px;"> <div class="form-group" style="margin-top: 15px;">
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<span <span
ng-show="change.type == 'ADDED'">{{'Component.Rollback.Added' | translate }}</span> ng-show="change.type == 'ADDED'">{{'Component.Rollback.Added' | translate }}</span>
<span <span
ng-show="change.type == 'MODIFIED'">{{'Component.Rollback.Modifed' | translate }}</span> ng-show="change.type == 'MODIFIED'">{{'Component.Rollback.Modified' | translate }}</span>
<span <span
ng-show="change.type == 'DELETED'">{{'Component.Rollback.Deleted' | translate }}</span> ng-show="change.type == 'DELETED'">{{'Component.Rollback.Deleted' | translate }}</span>
</td> </td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment