From b7c5a7ab6d2b08624391e81cedc82d3795d465fb Mon Sep 17 00:00:00 2001 From: Hari Krishna Date: Sat, 13 Jan 2024 10:53:03 +0000 Subject: [PATCH 1/4] added a href in the anchor tag --- src/strings/eng.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strings/eng.json b/src/strings/eng.json index cc7d6a706..c0294176b 100644 --- a/src/strings/eng.json +++ b/src/strings/eng.json @@ -58,7 +58,7 @@ "Norm_Preferences": "Style preferences", "Documentation": "Documentation", "About_Apertium": "About Apertium", - "What_Is_Apertium": "

Apertium is a free/open-source machine translation platform, initially aimed at related-language pairs but expanded to deal with more divergent language pairs (such as English-Catalan). The platform provides

  1. a language-independent machine translation engine
  2. tools to manage the linguistic data necessary to build a machine translation system for a given language pair and
  3. linguistic data for a growing number of language pairs.

Apertium welcomes new developers: if you think you can improve the engine or the tools, or develop linguistic data for us, do not hesitate to contact us.

", + "What_Is_Apertium": "

Apertium is a free/open-source machine translation platform, initially aimed at related-language pairs but expanded to deal with more divergent language pairs (such as English-Catalan). The platform provides

  1. a language-independent machine translation engine
  2. tools to manage the linguistic data necessary to build a machine translation system for a given language pair and
  3. linguistic data for a growing number of language pairs.

Apertium welcomes new developers: if you think you can improve the engine or the tools, or develop linguistic data for us, do not hesitate to contact us.

", "Documentation_Para": "Documentation can be found on our Wiki under the Documentation sub-page. We have published various conference papers and journal articles, a list of which may be found on the Wiki under Publications.", "Apertium_Downloads": "Apertium Downloads", "Downloads_Para": "Current versions of the Apertium toolbox as well as of language-pair data are available from the GitHub page. Installation instructions for Apertium on all major platforms are provided on the Wiki's Installation page.", From 82adb4cc351b6ffa8aff77f97c33c34b2fbbb01a Mon Sep 17 00:00:00 2001 From: Hari Krishna Date: Thu, 18 Jan 2024 14:31:10 +0000 Subject: [PATCH 2/4] modified "help us improve " link --- src/components/footer/index.tsx | 21 ++++++++++----------- src/strings/eng.json | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index 41d0102f9..63dec5b92 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -111,18 +111,17 @@ const Footer = ({
{t('Notice_Mistake')}{' '} - + + {t('Help_Improve')}{' '} +
- - {version} - + + {version}
diff --git a/src/strings/eng.json b/src/strings/eng.json index c0294176b..6df08572e 100644 --- a/src/strings/eng.json +++ b/src/strings/eng.json @@ -58,7 +58,7 @@ "Norm_Preferences": "Style preferences", "Documentation": "Documentation", "About_Apertium": "About Apertium", - "What_Is_Apertium": "

Apertium is a free/open-source machine translation platform, initially aimed at related-language pairs but expanded to deal with more divergent language pairs (such as English-Catalan). The platform provides

  1. a language-independent machine translation engine
  2. tools to manage the linguistic data necessary to build a machine translation system for a given language pair and
  3. linguistic data for a growing number of language pairs.

Apertium welcomes new developers: if you think you can improve the engine or the tools, or develop linguistic data for us, do not hesitate to contact us.

", + "What_Is_Apertium": "

Apertium is a free/open-source machine translation platform, initially aimed at related-language pairs but expanded to deal with more divergent language pairs (such as English-Catalan). The platform provides

  1. a language-independent machine translation engine
  2. tools to manage the linguistic data necessary to build a machine translation system for a given language pair and
  3. linguistic data for a growing number of language pairs.

Apertium welcomes new developers: if you think you can improve the engine or the tools, or develop linguistic data for us, do not hesitate to contact us.

", "Documentation_Para": "Documentation can be found on our Wiki under the Documentation sub-page. We have published various conference papers and journal articles, a list of which may be found on the Wiki under Publications.", "Apertium_Downloads": "Apertium Downloads", "Downloads_Para": "Current versions of the Apertium toolbox as well as of language-pair data are available from the GitHub page. Installation instructions for Apertium on all major platforms are provided on the Wiki's Installation page.", From 9b359a14be25f32905e9a3fc0bdfe2184425addd Mon Sep 17 00:00:00 2001 From: Hari Krishna Date: Sun, 10 Mar 2024 13:45:23 +0000 Subject: [PATCH 3/4] made changes as requested --- src/App.tsx | 80 ++++++++++--------- .../footer/__tests__/index.test.tsx | 7 +- src/components/footer/index.tsx | 12 ++- .../translator/TextTranslationForm.tsx | 13 ++- .../__tests__/TextTranslationForm.test.tsx | 10 ++- src/context.ts | 4 +- src/types.ts | 7 ++ src/util/initialTextValues.tsx | 30 +++++++ 8 files changed, 110 insertions(+), 53 deletions(-) create mode 100644 src/util/initialTextValues.tsx diff --git a/src/App.tsx b/src/App.tsx index 8780ccb22..76d378389 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,6 +12,7 @@ import { ConfigContext, LocaleContext, StringsContext } from './context'; import { PRELOADED_STRINGS, Strings, tt } from './util/localization'; import { langDirection, toAlpha2Code } from './util/languages'; import { Mode } from './types'; +import { TextProvider } from './util/initialTextValues'; import Analyzer from './components/Analyzer'; import { Path as DocTranslationPath } from './components/translator/DocTranslationForm'; @@ -23,6 +24,7 @@ import Sandbox from './components/Sandbox'; import Translator from './components/translator/Translator'; import { Mode as TranslatorMode } from './components/translator'; import { Path as WebpageTranslationPath } from './components/translator/WebpageTranslationForm'; + import WithInstallationAlert from './components/WithInstallationAlert'; import WithLocale from './components/WithLocale'; @@ -96,44 +98,46 @@ const App = ({ setLocale }: { setLocale: React.Dispatch -
- - - {Object.values(Mode).map( - (mode) => - enabledModes.has(mode) && ( - - ), - )} - {enabledModes.has(Mode.Translation) && ( - <> - - - - - - - - )} -
- -
-
-
-
-