diff --git a/i18n/es.po b/i18n/es.po index ce1d654..4004449 100644 --- a/i18n/es.po +++ b/i18n/es.po @@ -123,7 +123,7 @@ msgid "No" msgstr "" msgid "Bulk apply sharing settings" -msgstr "" +msgstr "Aplicar configuraciĆ³n de uso compartido en masa" msgid "Select Metadata" 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.ts b/src/webapp/contexts/app-context.ts index fb7ec33..feb7554 100644 --- a/src/webapp/contexts/app-context.ts +++ b/src/webapp/contexts/app-context.ts @@ -2,6 +2,7 @@ import React, { useContext } from "react"; import { CompositionRoot } from "../../CompositionRoot"; import { User } from "../../domain/entities/User"; import { D2Api } from "../../types/d2-api"; +import i18n from "../../locales"; export interface AppContextState { api: D2Api; @@ -13,6 +14,7 @@ export const AppContext = React.createContext(null); export function useAppContext() { const context = useContext(AppContext); + i18n.setDefaultNamespace("sharing-settings-app"); if (context) { return context; } else { diff --git a/src/webapp/pages/app/App.tsx b/src/webapp/pages/app/App.tsx index e97b93a..6bf2b84 100644 --- a/src/webapp/pages/app/App.tsx +++ b/src/webapp/pages/app/App.tsx @@ -9,13 +9,13 @@ import { appConfig } from "../../../app-config"; import { getCompositionRoot } from "../../../CompositionRoot"; import { Instance } from "../../../data/entities/Instance"; import { D2Api } from "../../../types/d2-api"; +import { Feedback } from "@eyeseetea/feedback-component"; import Share from "../../components/share/Share"; import { AppContext, AppContextState } from "../../contexts/app-context"; import { Router } from "../Router"; import "./App.css"; import muiThemeLegacy from "./themes/dhis2-legacy.theme"; import { muiTheme } from "./themes/dhis2.theme"; -import { Feedback } from "@eyeseetea/feedback-component"; export interface AppProps { api: D2Api;