Skip to content

Commit 506455b

Browse files
add string replacements and the string in the about modal
1 parent ae0029a commit 506455b

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ export default {
1414

1515
stringReplacements: {
1616
'{{maintainer}}': "<a href='https://wiki.apertium.org/wiki/Apertium' target='_blank' rel='noopener'>Apertium</a>",
17+
'{{more_languages}}': "<a href='https://beta.apertium.org' rel='noreferrer' target='_blank'>beta.apertium.org</a>"
1718
},
1819
} as Config;

src/components/footer/AboutModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const AboutModal = (props: ModalProps): React.ReactElement => {
2525
<Modal.Body>
2626
<div dangerouslySetInnerHTML={{ __html: t('What_Is_Apertium') }} />
2727
<div dangerouslySetInnerHTML={{ __html: t('Maintainer') }} style={{ paddingBottom: '2em' }} />
28+
<div dangerouslySetInnerHTML={{ __html: t('More_Languages') }} style={{ paddingBottom: '2em' }}/>
2829

2930
<div className="row lead">
3031
<Col md="6">

src/strings/eng.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"Help_Improve": "Help us improve Apertium!",
4949
"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.",
5050
"Maintainer": "This website is maintained by {{maintainer}}.",
51+
"More_Languages": "Looking for more languages? Try {{more_languages}}",
5152
"About_Title": "About this website",
5253
"Enable_JS_Warning": "This site only works with JavaScript enabled, if you cannot <a href='http://www.enable-javascript.com/' target='_blank' rel='noopener'>enable Javascript</a>, then try the <a href='http://traductor.prompsit.com' target='_blank' rel='noopener'>translators at Prompsit</a>.",
5354
"Not_Found_Error": "<b>404 Error:</b> Sorry, that page doesn't exist anymore!",

src/util/__tests__/localization.test.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ describe('useLocalization', () => {
4343
'Maintainer',
4444
`<a href='https://wiki.apertium.org/wiki/Apertium' target='_blank' rel='noopener'>Apertium</a>-Default`,
4545
],
46+
[
47+
'More_Languages',
48+
`<a dangerouslySetInnerHTML={{ __html: 'beta.apertium.org' }} href='https://beta.apertium.org' rel='noreferrer' target='_blank'/>`
49+
]
4650
])('maps %s to %s', (id, value) => expect(t(id)).toBe(value));
4751
});
4852

0 commit comments

Comments
 (0)