feat: fix wrong Vietnamese flag (#1724)

* fix wrong Vietnam country code

* fix wrong Vietnam country code

* fix wrong Vietnam country code

* fix wrong Vietnam country code
This commit is contained in:
Dzung Do
2023-04-10 21:42:12 +07:00
committed by GitHub
parent 098a1ece68
commit 984a69cb4b
8 changed files with 10 additions and 10 deletions

View File

@@ -20,5 +20,5 @@ staticBaseUrl = "https://cdn.casbin.org"
isDemoMode = false isDemoMode = false
batchSize = 100 batchSize = 100
ldapServerPort = 389 ldapServerPort = 389
languages = en,zh,es,fr,de,id,ja,ko,ru,vi languages = en,zh,es,fr,de,id,ja,ko,ru,vn
quota = {"organization": -1, "user": -1, "application": -1, "provider": -1} quota = {"organization": -1, "user": -1, "application": -1, "provider": -1}

View File

@@ -31,7 +31,7 @@ func TestGenerateI18nFrontend(t *testing.T) {
applyToOtherLanguage("frontend", "ja", data) applyToOtherLanguage("frontend", "ja", data)
applyToOtherLanguage("frontend", "ko", data) applyToOtherLanguage("frontend", "ko", data)
applyToOtherLanguage("frontend", "ru", data) applyToOtherLanguage("frontend", "ru", data)
applyToOtherLanguage("frontend", "vi", data) applyToOtherLanguage("frontend", "vn", data)
} }
func TestGenerateI18nBackend(t *testing.T) { func TestGenerateI18nBackend(t *testing.T) {
@@ -46,5 +46,5 @@ func TestGenerateI18nBackend(t *testing.T) {
applyToOtherLanguage("backend", "ja", data) applyToOtherLanguage("backend", "ja", data)
applyToOtherLanguage("backend", "ko", data) applyToOtherLanguage("backend", "ko", data)
applyToOtherLanguage("backend", "ru", data) applyToOtherLanguage("backend", "ru", data)
applyToOtherLanguage("backend", "vi", data) applyToOtherLanguage("backend", "vn", data)
} }

View File

@@ -12,7 +12,7 @@
"defaultAvatar": "", "defaultAvatar": "",
"defaultApplication": "", "defaultApplication": "",
"tags": [], "tags": [],
"languages": ["en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vi"], "languages": ["en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vn"],
"masterPassword": "", "masterPassword": "",
"initScore": 2000, "initScore": 2000,
"enableSoftDeletion": false, "enableSoftDeletion": false,

View File

@@ -89,7 +89,7 @@ func initBuiltInOrganization() bool {
CountryCodes: []string{"US", "ES", "CN", "FR", "DE", "GB", "JP", "KR", "VN", "ID", "SG", "IN"}, CountryCodes: []string{"US", "ES", "CN", "FR", "DE", "GB", "JP", "KR", "VN", "ID", "SG", "IN"},
DefaultAvatar: fmt.Sprintf("%s/img/casbin.svg", conf.GetConfigString("staticBaseUrl")), DefaultAvatar: fmt.Sprintf("%s/img/casbin.svg", conf.GetConfigString("staticBaseUrl")),
Tags: []string{}, Tags: []string{},
Languages: []string{"en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vi"}, Languages: []string{"en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vn"},
InitScore: 2000, InitScore: 2000,
AccountItems: getBuiltInAccountItems(), AccountItems: getBuiltInAccountItems(),
EnableSoftDeletion: false, EnableSoftDeletion: false,

View File

@@ -42,7 +42,7 @@ export const Countries = [{label: "English", key: "en", country: "US", alt: "Eng
{label: "日本語", key: "ja", country: "JP", alt: "日本語"}, {label: "日本語", key: "ja", country: "JP", alt: "日本語"},
{label: "한국어", key: "ko", country: "KR", alt: "한국어"}, {label: "한국어", key: "ko", country: "KR", alt: "한국어"},
{label: "Русский", key: "ru", country: "RU", alt: "Русский"}, {label: "Русский", key: "ru", country: "RU", alt: "Русский"},
{label: "TiếngViệt", key: "vi", country: "VI", alt: "TiếngViệt"}, {label: "TiếngViệt", key: "vn", country: "VN", alt: "TiếngViệt"},
]; ];
export function getThemeData(organization, application) { export function getThemeData(organization, application) {

View File

@@ -22,7 +22,7 @@ import id from "./locales/id/data.json";
import ja from "./locales/ja/data.json"; import ja from "./locales/ja/data.json";
import ko from "./locales/ko/data.json"; import ko from "./locales/ko/data.json";
import ru from "./locales/ru/data.json"; import ru from "./locales/ru/data.json";
import vi from "./locales/vi/data.json"; import vn from "./locales/vn/data.json";
import * as Conf from "./Conf"; import * as Conf from "./Conf";
import {initReactI18next} from "react-i18next"; import {initReactI18next} from "react-i18next";
@@ -36,7 +36,7 @@ const resources = {
ja: ja, ja: ja,
ko: ko, ko: ko,
ru: ru, ru: ru,
vi: vi, vn: vn,
}; };
function initLanguage() { function initLanguage() {
@@ -80,8 +80,8 @@ function initLanguage() {
case "ru": case "ru":
language = "ru"; language = "ru";
break; break;
case "vi": case "vn":
language = "vi"; language = "vn";
break; break;
default: default:
language = Conf.DefaultLanguage; language = Conf.DefaultLanguage;