WIP(translate): translate ulid-generator, encryption, bip39-generator, hmac-generator, rsa-key-pair-generator, password-strength-analyser and pdf-signature-checker tools

This commit is contained in:
Amery2010 2023-12-22 22:42:03 +08:00
parent 70515d32a5
commit 2ee3b01105
30 changed files with 383 additions and 88 deletions

View file

@ -21,6 +21,7 @@ const messages = _.merge(
const i18n = createI18n({
legacy: false,
locale: 'en',
fallbackLocale: 'en',
messages,
});
@ -32,6 +33,5 @@ export const i18nPlugin: Plugin = {
export const translate = function (localeKey: string) {
// @ts-expect-error global
const hasKey = i18n.global.te(localeKey, i18n.global.locale);
return hasKey ? i18n.global.t(localeKey) : localeKey;
return i18n.global.t(localeKey);
};