damus-io / api

damus api
2 stars 3 forks source link

Add support for translating to and from Arabic for DeepL #8

Closed tyiu closed 1 month ago

tyiu commented 2 months ago

Fixes https://github.com/damus-io/api/issues/4

https://www.deepl.com/en/blog/deepl-welcomes-arabic https://developers.deepl.com/docs/resources/supported-languages

jb55 commented 2 months ago

Hey Semisol,

Do we have Arabic support on the noswhere backend? Is that hard to add?

Some context for Terry et al: we're not currently using the DeepL backend so this wouldn't have any effect in Damus Purple.

On Fri, May 03, 2024 at 09:39:00PM GMT, Terry Yiu wrote:

Closes: https://github.com/damus-io/api/pull/8

src/translate/deepl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/translate/deepl.js b/src/translate/deepl.js index 9145320..d507823 100644 --- a/src/translate/deepl.js +++ b/src/translate/deepl.js @@ -1,5 +1,5 @@ const translate_sources = new Set([

  • 'bg', 'cs', 'da', 'de', 'el',
  • 'ar', 'bg', 'cs', 'da', 'de', 'el', 'en', 'es', 'et', 'fi', 'fr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'nb', 'nl', 'pl', @@ -7,7 +7,7 @@ const translate_sources = new Set([ 'sv', 'tr', 'uk', 'zh' ]) const translate_targets = new Set([
  • 'bg', 'cs', 'da', 'de',
  • 'ar', 'bg', 'cs', 'da', 'de', 'el', 'en', 'en-gb', 'en-us', 'es', 'et', 'fi', 'fr', 'hu', 'id', 'it', 'ja',
jb55 commented 1 month ago

Thanks! pushed to 2b5ce631f8755aa7b588056d8ea8f74b8af3eefb

We don't currently use the DeepL backend but this will be handy if we need to fallback to it.

On Fri, May 03, 2024 at 09:39:00PM -0400, Terry Yiu wrote:

You can view, comment on, or merge this pull request online at:

https://github.com/damus-io/api/pull/8

-- Commit Summary --

  • Add support for translating to and from Arabic for DeepL

-- File Changes --

M src/translate/deepl.js (4)

-- Patch Links --

https://github.com/damus-io/api/pull/8.patch https://github.com/damus-io/api/pull/8.diff

-- Reply to this email directly or view it on GitHub: https://github.com/damus-io/api/pull/8 You are receiving this because you are subscribed to this thread.

Message ID: @.***>