mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
feat: refactor backend i18n (#1373)
* fix: handle the dataSourceName when DB changes * reduce duplication of code * feat: refactor translation error message * feat: use json intsead of ini file * remove useless translation * fix translate problems * remove useless addition * fix pr problems * fix pr problems * fix split problem * use gofumpt to fmt code * use crowdin to execute backend translation * fix pr problems * refactor: change translation file structure same as frontend * delete useless output * update go.mod
This commit is contained in:
@ -44,7 +44,17 @@ func TestGenerateI18nStringsForBackend(t *testing.T) {
|
||||
|
||||
errName := getErrName(paths)
|
||||
|
||||
writeToAllLanguageFiles(errName)
|
||||
dataEn := getI18nJSONData(errName)
|
||||
|
||||
writeI18nFile("backend_en", dataEn)
|
||||
|
||||
applyToOtherLanguage(dataEn, "backend_de")
|
||||
applyToOtherLanguage(dataEn, "backend_es")
|
||||
applyToOtherLanguage(dataEn, "backend_fr")
|
||||
applyToOtherLanguage(dataEn, "backend_ja")
|
||||
applyToOtherLanguage(dataEn, "backend_ko")
|
||||
applyToOtherLanguage(dataEn, "backend_ru")
|
||||
applyToOtherLanguage(dataEn, "backend_zh")
|
||||
|
||||
fmt.Println("Total Err Words:", len(errName))
|
||||
|
||||
|
Reference in New Issue
Block a user