Skip to content

Commit

Permalink
fix CI reported issues:
Browse files Browse the repository at this point in the history
   update copyright year in header
   fix Codacy issue
  • Loading branch information
huihuiw01 committed Nov 15, 2023
1 parent e2166b2 commit 36eabc0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 VMware, Inc.
* Copyright 2019-2023 VMware, Inc.
* SPDX-License-Identifier: EPL-2.0
*/
package com.vmware.i18n.l2.service.locale;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package com.vmware.i18n.l2.service.locale;

import com.ibm.icu.impl.LocaleUtility;
import com.vmware.i18n.cldr.CLDR;
import com.vmware.i18n.utils.CommonUtil;
import com.vmware.vip.common.cache.CacheName;
import com.vmware.vip.common.cache.TranslationCache3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ public static String normalizeToLanguageTag(String localeStr) {
if(null ==localeStr || "".equalsIgnoreCase(localeStr)){
return localeStr;
}
localeStr = localeStr.replace("_", "-");
if(localeStr.indexOf(ConstantsUnicode.ALT)>0)//handle languages like en-US-alt-short
localeStr = localeStr.substring(0, localeStr.indexOf(ConstantsUnicode.ALT));
if (isLanguageTag(localeStr)) {
return Locale.forLanguageTag(localeStr).toLanguageTag();
String localeTag = localeStr.replace("_", "-");
if(localeTag.indexOf(ConstantsUnicode.ALT)>0)//handle languages like en-US-alt-short
localeTag = localeTag.substring(0, localeTag.indexOf(ConstantsUnicode.ALT));
if (isLanguageTag(localeTag)) {
return Locale.forLanguageTag(localeTag).toLanguageTag();
} else {
String language = "", country = "", script = "";
String[] os = localeStr.split("-");
Expand Down
2 changes: 1 addition & 1 deletion g11n-ws/vip-manager-i18n/src/main/resources/ehcache3.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2019-2022 VMware, Inc.
Copyright 2019-2023 VMware, Inc.
SPDX-License-Identifier: EPL-2.0
-->
<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
Expand Down

0 comments on commit 36eabc0

Please sign in to comment.