diff --git a/conf/app.conf b/conf/app.conf index b8f786a8..3e6a0dc8 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -20,5 +20,5 @@ staticBaseUrl = "https://cdn.casbin.org" isDemoMode = false batchSize = 100 ldapServerPort = 389 -languages = en,zh,es,fr,de,id,ja,ko,ru,vn +languages = en,zh,es,fr,de,id,ja,ko,ru,vi quota = {"organization": -1, "user": -1, "application": -1, "provider": -1} diff --git a/i18n/generate_test.go b/i18n/generate_test.go index fcd97085..e567bdae 100644 --- a/i18n/generate_test.go +++ b/i18n/generate_test.go @@ -31,7 +31,7 @@ func TestGenerateI18nFrontend(t *testing.T) { applyToOtherLanguage("frontend", "ja", data) applyToOtherLanguage("frontend", "ko", data) applyToOtherLanguage("frontend", "ru", data) - applyToOtherLanguage("frontend", "vn", data) + applyToOtherLanguage("frontend", "vi", data) } func TestGenerateI18nBackend(t *testing.T) { @@ -46,5 +46,5 @@ func TestGenerateI18nBackend(t *testing.T) { applyToOtherLanguage("backend", "ja", data) applyToOtherLanguage("backend", "ko", data) applyToOtherLanguage("backend", "ru", data) - applyToOtherLanguage("backend", "vn", data) + applyToOtherLanguage("backend", "vi", data) } diff --git a/i18n/locales/vn/data.json b/i18n/locales/vi/data.json similarity index 100% rename from i18n/locales/vn/data.json rename to i18n/locales/vi/data.json diff --git a/init_data.json.template b/init_data.json.template index 46710975..0e197ec9 100644 --- a/init_data.json.template +++ b/init_data.json.template @@ -12,7 +12,7 @@ "defaultAvatar": "", "defaultApplication": "", "tags": [], - "languages": ["en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vn"], + "languages": ["en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vi"], "masterPassword": "", "initScore": 2000, "enableSoftDeletion": false, diff --git a/object/init.go b/object/init.go index 73619b2c..f858f512 100644 --- a/object/init.go +++ b/object/init.go @@ -89,7 +89,7 @@ func initBuiltInOrganization() bool { CountryCodes: []string{"US", "ES", "CN", "FR", "DE", "GB", "JP", "KR", "VN", "ID", "SG", "IN"}, DefaultAvatar: fmt.Sprintf("%s/img/casbin.svg", conf.GetConfigString("staticBaseUrl")), Tags: []string{}, - Languages: []string{"en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vn"}, + Languages: []string{"en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vi"}, InitScore: 2000, AccountItems: getBuiltInAccountItems(), EnableSoftDeletion: false, diff --git a/web/src/Setting.js b/web/src/Setting.js index bb8289db..7f26d055 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -42,7 +42,7 @@ export const Countries = [{label: "English", key: "en", country: "US", alt: "Eng {label: "日本語", key: "ja", country: "JP", alt: "日本語"}, {label: "한국어", key: "ko", country: "KR", alt: "한국어"}, {label: "Русский", key: "ru", country: "RU", alt: "Русский"}, - {label: "TiếngViệt", key: "vn", country: "VN", alt: "TiếngViệt"}, + {label: "TiếngViệt", key: "vi", country: "VN", alt: "TiếngViệt"}, ]; export function getThemeData(organization, application) { diff --git a/web/src/i18n.js b/web/src/i18n.js index 59765824..b23ad474 100644 --- a/web/src/i18n.js +++ b/web/src/i18n.js @@ -22,7 +22,7 @@ import id from "./locales/id/data.json"; import ja from "./locales/ja/data.json"; import ko from "./locales/ko/data.json"; import ru from "./locales/ru/data.json"; -import vn from "./locales/vn/data.json"; +import vi from "./locales/vi/data.json"; import * as Conf from "./Conf"; import {initReactI18next} from "react-i18next"; @@ -36,7 +36,7 @@ const resources = { ja: ja, ko: ko, ru: ru, - vn: vn, + vi: vi, }; function initLanguage() { @@ -80,8 +80,8 @@ function initLanguage() { case "ru": language = "ru"; break; - case "vn": - language = "vn"; + case "vi": + language = "vi"; break; default: language = Conf.DefaultLanguage; diff --git a/web/src/locales/vn/data.json b/web/src/locales/vi/data.json similarity index 100% rename from web/src/locales/vn/data.json rename to web/src/locales/vi/data.json