diff --git a/i18n/generate.go b/i18n/generate.go index 05933f9c..47076ef7 100644 --- a/i18n/generate.go +++ b/i18n/generate.go @@ -136,3 +136,11 @@ func parseEnData(category string) *I18nData { return &data } + +func applyToOtherLanguage(category string, language string, i18nData *I18nData) { + newData := readI18nFile(category, language) + println(newData) + + applyData(i18nData, newData) + writeI18nFile(category, language, i18nData) +} diff --git a/i18n/generate_test.go b/i18n/generate_test.go index d2937cbe..60aa220e 100644 --- a/i18n/generate_test.go +++ b/i18n/generate_test.go @@ -17,22 +17,12 @@ package i18n -import ( - "testing" -) - -func applyToOtherLanguage(category string, language string, i18nData *I18nData) { - newData := readI18nFile(category, language) - println(newData) - - applyData(i18nData, newData) - writeI18nFile(category, language, i18nData) -} +import "testing" func TestGenerateI18nFrontend(t *testing.T) { enData := parseEnData("frontend") - writeI18nFile("frontend", "en", enData) + applyToOtherLanguage("frontend", "en", enData) applyToOtherLanguage("frontend", "zh", enData) applyToOtherLanguage("frontend", "es", enData) applyToOtherLanguage("frontend", "fr", enData) @@ -45,8 +35,8 @@ func TestGenerateI18nFrontend(t *testing.T) { func TestGenerateI18nBackend(t *testing.T) { enData := parseEnData("backend") - writeI18nFile("backend", "en", enData) + applyToOtherLanguage("backend", "en", enData) applyToOtherLanguage("backend", "zh", enData) applyToOtherLanguage("backend", "es", enData) applyToOtherLanguage("backend", "fr", enData) diff --git a/web/src/locales/de/data.json b/web/src/locales/de/data.json index d467b126..536b4049 100644 --- a/web/src/locales/de/data.json +++ b/web/src/locales/de/data.json @@ -315,7 +315,6 @@ "No account?": "Kein Konto?", "Or sign in with another account": "Oder melden Sie sich mit einem anderen Konto an", "Password": "Passwort", - "Password - Tooltip": "Password - Tooltip", "Please input your Email or Phone!": "Please input your Email or Phone!", "Please input your code!": "Bitte gib deinen Code ein!", "Please input your password!": "Bitte geben Sie Ihr Passwort ein!", @@ -658,7 +657,6 @@ "The input is not valid Email!": "Die Eingabe ist ungültig!", "The input is not valid Phone!": "Die Eingabe ist nicht gültig!", "Username": "Benutzername", - "Username - Tooltip": "Username - Tooltip", "Your account has been created!": "Ihr Konto wurde erstellt!", "Your confirmed password is inconsistent with the password!": "Ihr bestätigtes Passwort stimmt nicht mit dem Passwort überein!", "sign in now": "jetzt anmelden" diff --git a/web/src/locales/en/data.json b/web/src/locales/en/data.json index abfdc205..08103802 100644 --- a/web/src/locales/en/data.json +++ b/web/src/locales/en/data.json @@ -315,7 +315,6 @@ "No account?": "No account?", "Or sign in with another account": "Or sign in with another account", "Password": "Password", - "Password - Tooltip": "Make sure the password is correct", "Please input your Email or Phone!": "Please input your Email or Phone!", "Please input your code!": "Please input your code!", "Please input your password!": "Please input your password!", @@ -658,7 +657,6 @@ "The input is not valid Email!": "The input is not valid Email!", "The input is not valid Phone!": "The input is not valid Phone!", "Username": "Username", - "Username - Tooltip": "Allowed characters include letters, numbers, underscores, and may not begin with a number", "Your account has been created!": "Your account has been created!", "Your confirmed password is inconsistent with the password!": "Your confirmed password is inconsistent with the password!", "sign in now": "sign in now" diff --git a/web/src/locales/es/data.json b/web/src/locales/es/data.json index be032cee..85906452 100644 --- a/web/src/locales/es/data.json +++ b/web/src/locales/es/data.json @@ -315,7 +315,6 @@ "No account?": "¿No estás registrado?", "Or sign in with another account": "O inicia sesión con otra cuenta", "Password": "Contraseña", - "Password - Tooltip": "Password - Tooltip", "Please input your Email or Phone!": "Please input your Email or Phone!", "Please input your code!": "¡Por favor ingrese su código!", "Please input your password!": "¡Por favor ingrese su contraseña!", @@ -658,7 +657,6 @@ "The input is not valid Email!": "El valor ingresado no es un Email válido!", "The input is not valid Phone!": "El valor ingresado no es un Teléfono válido!", "Username": "Nombre de usuario", - "Username - Tooltip": "Username - Tooltip", "Your account has been created!": "¡Tu cuenta ha sido creada!", "Your confirmed password is inconsistent with the password!": "¡La confirmación de su contraseña es inconsistente!", "sign in now": "iniciar sesión ahora" diff --git a/web/src/locales/fr/data.json b/web/src/locales/fr/data.json index 1d6ee12f..b12000af 100644 --- a/web/src/locales/fr/data.json +++ b/web/src/locales/fr/data.json @@ -315,7 +315,6 @@ "No account?": "Pas de compte ?", "Or sign in with another account": "Ou connectez-vous avec un autre compte", "Password": "Mot de passe", - "Password - Tooltip": "Password - Tooltip", "Please input your Email or Phone!": "Please input your Email or Phone!", "Please input your code!": "Veuillez saisir votre code !", "Please input your password!": "Veuillez saisir votre mot de passe !", @@ -658,7 +657,6 @@ "The input is not valid Email!": "L'entrée n'est pas un email valide !", "The input is not valid Phone!": "L'entrée n'est pas un téléphone valide !", "Username": "Nom d'utilisateur", - "Username - Tooltip": "Username - Tooltip", "Your account has been created!": "Votre compte a été créé !", "Your confirmed password is inconsistent with the password!": "Votre mot de passe confirmé est incompatible avec le mot de passe !", "sign in now": "connectez-vous maintenant" diff --git a/web/src/locales/ja/data.json b/web/src/locales/ja/data.json index dfb2f24a..e05900fc 100644 --- a/web/src/locales/ja/data.json +++ b/web/src/locales/ja/data.json @@ -315,7 +315,6 @@ "No account?": "アカウントがありませんか?", "Or sign in with another account": "または別のアカウントでサインイン", "Password": "パスワード", - "Password - Tooltip": "Password - Tooltip", "Please input your Email or Phone!": "Please input your Email or Phone!", "Please input your code!": "コードを入力してください!", "Please input your password!": "パスワードを入力してください!", @@ -658,7 +657,6 @@ "The input is not valid Email!": "入力されたメールアドレスが無効です!", "The input is not valid Phone!": "入力された電話番号が正しくありません!", "Username": "ユーザー名", - "Username - Tooltip": "Username - Tooltip", "Your account has been created!": "あなたのアカウントが作成されました!", "Your confirmed password is inconsistent with the password!": "確認されたパスワードがパスワードと一致していません!", "sign in now": "今すぐサインイン" diff --git a/web/src/locales/ko/data.json b/web/src/locales/ko/data.json index d883a00c..7896f687 100644 --- a/web/src/locales/ko/data.json +++ b/web/src/locales/ko/data.json @@ -315,7 +315,6 @@ "No account?": "No account?", "Or sign in with another account": "Or sign in with another account", "Password": "Password", - "Password - Tooltip": "Password - Tooltip", "Please input your Email or Phone!": "Please input your Email or Phone!", "Please input your code!": "Please input your code!", "Please input your password!": "Please input your password!", @@ -658,7 +657,6 @@ "The input is not valid Email!": "The input is not valid Email!", "The input is not valid Phone!": "The input is not valid Phone!", "Username": "Username", - "Username - Tooltip": "Username - Tooltip", "Your account has been created!": "Your account has been created!", "Your confirmed password is inconsistent with the password!": "Your confirmed password is inconsistent with the password!", "sign in now": "sign in now" diff --git a/web/src/locales/ru/data.json b/web/src/locales/ru/data.json index bcb1f795..7703cde2 100644 --- a/web/src/locales/ru/data.json +++ b/web/src/locales/ru/data.json @@ -315,7 +315,6 @@ "No account?": "Нет учетной записи?", "Or sign in with another account": "Или войти с помощью другой учетной записи", "Password": "Пароль", - "Password - Tooltip": "Password - Tooltip", "Please input your Email or Phone!": "Please input your Email or Phone!", "Please input your code!": "Пожалуйста, введите ваш код!", "Please input your password!": "Пожалуйста, введите ваш пароль!", @@ -658,7 +657,6 @@ "The input is not valid Email!": "Ввод не является допустимым Email!", "The input is not valid Phone!": "Введен неверный телефон!", "Username": "Имя пользователя", - "Username - Tooltip": "Username - Tooltip", "Your account has been created!": "Ваша учетная запись была создана!", "Your confirmed password is inconsistent with the password!": "Подтвержденный пароль не соответствует паролю!", "sign in now": "войти сейчас" diff --git a/web/src/locales/vi/data.json b/web/src/locales/vi/data.json index 58d670a4..fa6661e2 100644 --- a/web/src/locales/vi/data.json +++ b/web/src/locales/vi/data.json @@ -315,7 +315,6 @@ "No account?": "No account?", "Or sign in with another account": "Or sign in with another account", "Password": "Password", - "Password - Tooltip": "Password - Tooltip", "Please input your Email or Phone!": "Please input your Email or Phone!", "Please input your code!": "Please input your code!", "Please input your password!": "Please input your password!", @@ -658,7 +657,6 @@ "The input is not valid Email!": "The input is not valid Email!", "The input is not valid Phone!": "The input is not valid Phone!", "Username": "Username", - "Username - Tooltip": "Username - Tooltip", "Your account has been created!": "Your account has been created!", "Your confirmed password is inconsistent with the password!": "Your confirmed password is inconsistent with the password!", "sign in now": "sign in now" diff --git a/web/src/locales/zh/data.json b/web/src/locales/zh/data.json index 94d288cf..b7bf96be 100644 --- a/web/src/locales/zh/data.json +++ b/web/src/locales/zh/data.json @@ -315,7 +315,6 @@ "No account?": "没有账号?", "Or sign in with another account": "或者,登录其他账号", "Password": "密码", - "Password - Tooltip": "密码", "Please input your Email or Phone!": "请输入您的Email或手机号!", "Please input your code!": "请输入您的验证码!", "Please input your password!": "请输入您的密码!", @@ -658,7 +657,6 @@ "The input is not valid Email!": "您输入的电子邮箱格式有误!", "The input is not valid Phone!": "您输入的手机号格式有误!", "Username": "用户名", - "Username - Tooltip": "唯一的用户名", "Your account has been created!": "您的账号已创建!", "Your confirmed password is inconsistent with the password!": "您两次输入的密码不一致!", "sign in now": "立即登录"