diff --git a/config.ts b/config.ts index 09cd7c12c..3ab622386 100644 --- a/config.ts +++ b/config.ts @@ -14,5 +14,6 @@ export default { stringReplacements: { '{{maintainer}}': "Apertium", + '{{more_languages}}': "beta.apertium.org" }, } as Config; diff --git a/src/components/footer/AboutModal.tsx b/src/components/footer/AboutModal.tsx index 69aa0ff13..1a1678ea7 100644 --- a/src/components/footer/AboutModal.tsx +++ b/src/components/footer/AboutModal.tsx @@ -13,9 +13,13 @@ import gplLogo from './img/gplv3-88x31.png'; import maeLogo from './img/logo_mae_ro_75pc.jpg'; import mineturLogo from './img/logomitc120.jpg'; import prompsitLogo from './img/prompsit150x52.png'; +import { useLocation } from "react-router-dom"; const AboutModal = (props: ModalProps): React.ReactElement => { const { t } = useLocalization(); + const location = useLocation(); + const { pathname } = location; + const splitLocation = pathname.split("/"); return ( @@ -25,6 +29,7 @@ const AboutModal = (props: ModalProps): React.ReactElement => {
+
diff --git a/src/strings/eng.json b/src/strings/eng.json index a976f68ea..5e3be48a3 100644 --- a/src/strings/eng.json +++ b/src/strings/eng.json @@ -48,6 +48,7 @@ "Help_Improve": "Help us improve Apertium!", "Contact_Us": "Feel free to contact us if you find a mistake, there's a project you would like to see us work on, or you would like to help out.", "Maintainer": "This website is maintained by {{maintainer}}.", + "More_Languages": "Looking for more languages? Try {{more_languages}}", "About_Title": "About this website", "Enable_JS_Warning": "This site only works with JavaScript enabled, if you cannot enable Javascript, then try the translators at Prompsit.", "Not_Found_Error": "404 Error: Sorry, that page doesn't exist anymore!", diff --git a/src/util/__tests__/localization.test.tsx b/src/util/__tests__/localization.test.tsx index 463d00eb9..cce60eaef 100644 --- a/src/util/__tests__/localization.test.tsx +++ b/src/util/__tests__/localization.test.tsx @@ -43,6 +43,10 @@ describe('useLocalization', () => { 'Maintainer', `Apertium-Default`, ], + [ + 'More_Languages', + `` + ] ])('maps %s to %s', (id, value) => expect(t(id)).toBe(value)); });