mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 22:07:10 -04:00
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:
parent
70515d32a5
commit
2ee3b01105
30 changed files with 383 additions and 88 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue