mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
feat(i18n): change location of translation files
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
import { i18n } from "@lingui/core";
|
||||
import { t } from "@lingui/macro";
|
||||
|
||||
export const defaultLocale = "en-US";
|
||||
|
||||
export const getLocales = () => ({
|
||||
"en-US": t`English`,
|
||||
"de-DE": t`German`,
|
||||
});
|
||||
|
||||
export const defaultLocale = "en-US";
|
||||
|
||||
export async function dynamicActivate(locale: string) {
|
||||
const { messages } = await import(`../locales/${locale}.po`);
|
||||
const { messages } = await import(`../locales/${locale}/messages.po`);
|
||||
|
||||
i18n.load(locale, messages);
|
||||
i18n.activate(locale);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2023-11-10 08:58+0100\n"
|
||||
"POT-Creation-Date: 2023-11-10 09:26+0100\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@ -1,6 +1,6 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2023-11-10 08:58+0100\n"
|
||||
"POT-Creation-Date: 2023-11-10 09:26+0100\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@ -11,6 +11,10 @@ msgstr ""
|
||||
msgid "You have enabled two-factor authentication successfully."
|
||||
msgstr "You have enabled two-factor authentication successfully."
|
||||
|
||||
#: apps/client/src/pages/builder/sidebars/left/sections/shared/section-options.tsx:113
|
||||
msgid "{value, plural, one {Column} other {Columns}}"
|
||||
msgstr "{value, plural, one {Column} other {Columns}}"
|
||||
|
||||
#: apps/client/src/pages/builder/sidebars/right/sections/information.tsx:20
|
||||
msgid "<0>I built Reactive Resume mostly by myself during my spare time, with a lot of help from other great open-source contributors.</0><1>If you like the app and want to support keeping it free forever, please donate whatever you can afford to give.</1><2>Your donations could be tax-deductible, depending on your location.</2>"
|
||||
msgstr "<0>I built Reactive Resume mostly by myself during my spare time, with a lot of help from other great open-source contributors.</0><1>If you like the app and want to support keeping it free forever, please donate whatever you can afford to give.</1><2>Your donations could be tax-deductible, depending on your location.</2>"
|
||||
@ -1,11 +1,12 @@
|
||||
import type { LinguiConfig } from "@lingui/conf";
|
||||
|
||||
const config: LinguiConfig = {
|
||||
locales: ["en-US", "de-DE"],
|
||||
format: "po",
|
||||
sourceLocale: "en-US",
|
||||
locales: ["en-US", "de-DE"],
|
||||
catalogs: [
|
||||
{
|
||||
path: "<rootDir>/apps/client/src/locales/{locale}",
|
||||
path: "<rootDir>/apps/client/src/locales/{locale}/messages",
|
||||
include: ["<rootDir>/apps/client/src"],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user