diff --git a/i18n/en.pot b/i18n/en.pot index 02aa434..b9e9556 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-05-27T14:20:48.393Z\n" -"PO-Revision-Date: 2024-05-27T14:20:48.393Z\n" +"POT-Creation-Date: 2024-06-04T15:36:46.256Z\n" +"PO-Revision-Date: 2024-06-04T15:36:46.256Z\n" msgid "Field {{field}} cannot be blank" msgstr "" @@ -431,6 +431,9 @@ msgstr "" msgid "Loading the user configuration..." msgstr "" +msgid "Available Home Pages" +msgstr "" + msgid "Create" msgstr "" diff --git a/i18n/es.po b/i18n/es.po index be3d534..04e8cf5 100644 --- a/i18n/es.po +++ b/i18n/es.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-05-27T14:20:48.393Z\n" +"POT-Creation-Date: 2024-06-04T15:36:46.256Z\n" "PO-Revision-Date: 2018-10-25T09:02:35.143Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -430,6 +430,9 @@ msgstr "" msgid "Loading the user configuration..." msgstr "" +msgid "Available Home Pages" +msgstr "Páginas de inicio disponibles" + msgid "Create" msgstr "" diff --git a/src/types/i18n.d.ts b/src/types/i18n.d.ts index 168a99a..636fc49 100644 --- a/src/types/i18n.d.ts +++ b/src/types/i18n.d.ts @@ -1,4 +1,5 @@ declare module "@dhis2/d2-i18n" { export function t(value: string, namespace?: object): string; export function changeLanguage(locale: string); + export function setDefaultNamespace(namespace: string); } diff --git a/src/webapp/contexts/app-context.tsx b/src/webapp/contexts/app-context.tsx index d6746fe..f0b2b41 100644 --- a/src/webapp/contexts/app-context.tsx +++ b/src/webapp/contexts/app-context.tsx @@ -91,6 +91,7 @@ async function getLaunchAppBaseUrl() { export function useAppContext(): AppContextState { const context = useContext(AppContext); + i18n.setDefaultNamespace("homepage-app"); if (context) { return context; } else { diff --git a/src/webapp/pages/home/HomePage.tsx b/src/webapp/pages/home/HomePage.tsx index 89b1ebb..a785ac7 100644 --- a/src/webapp/pages/home/HomePage.tsx +++ b/src/webapp/pages/home/HomePage.tsx @@ -177,7 +177,7 @@ export const HomePage: React.FC = React.memo(() => { ) : initLandings && pageType === "userLandings" ? ( <> -