Modify issue about cannot switch to franch

This commit is contained in:
pfh 2018-05-02 15:48:55 +08:00
parent a8737116a6
commit 80ff0e4553
2 changed files with 5 additions and 4 deletions

View File

@ -11,12 +11,13 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
export const supportedLangs = ['en-us', 'zh-cn', 'es-es'];
export const supportedLangs = ['en-us', 'zh-cn', 'es-es', 'fr-fr'];
export const enLang = "en-us";
export const languageNames = {
"en-us": "English",
"zh-cn": "中文简体",
"es-es": "Español"
"es-es": "Español",
"fr-fr": "Français"
};
export const enum AlertType {
DANGER, WARNING, INFO, SUCCESS

View File

@ -34,7 +34,7 @@ export const DEFAULT_LANG_COOKIE_KEY = 'harbor-lang';
/**
* Declare what languages are supported now.
*/
export const DEFAULT_SUPPORTING_LANGS = ['en-us', 'zh-cn', 'es-es'];
export const DEFAULT_SUPPORTING_LANGS = ['en-us', 'zh-cn', 'es-es', 'fr-fr'];
/**
* The default language.
@ -184,7 +184,7 @@ export function doFiltering<T extends { [key: string]: any | any[] }>(items: T[]
let arr = filter['property'].split('.');
if (Array.isArray(item[arr[0]]) && item[arr[0]].length) {
return item[arr[0]].some((data: any) => {
return regexpFilter(filter['value'], data[arr[1]]);
return filter['value'] === data[arr[1]];
});
}
}else {