about summary refs log tree commit diff
path: root/src/locale/helpers.ts
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-09-21 13:33:19 -0500
committerGitHub <noreply@github.com>2023-09-21 11:33:19 -0700
commit8a5f9cd43df6afde99c0e0111c7de0faa7635162 (patch)
tree64fa6efcb4d66be8df51780657599e91565fb0c9 /src/locale/helpers.ts
parent335061f76349a4cecfdefb0348fc26bb67f6ebfa (diff)
downloadvoidsky-8a5f9cd43df6afde99c0e0111c7de0faa7635162.tar.zst
Language settings updates, new primary language setting (#1471)
* move content languages to screen

* add dropdown library, style primary lang select

* update settings button

* show selected langauges in button

* use primary language in translator link

* update copy

* lint
Diffstat (limited to 'src/locale/helpers.ts')
-rw-r--r--src/locale/helpers.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/locale/helpers.ts b/src/locale/helpers.ts
index 3ada8ef0e..65db32f2f 100644
--- a/src/locale/helpers.ts
+++ b/src/locale/helpers.ts
@@ -79,8 +79,8 @@ export function isPostInLanguage(
   return bcp47Match.basicFilter(lang, targetLangs).length > 0
 }
 
-export function getTranslatorLink(text: string): string {
-  return `https://translate.google.com/?sl=auto&text=${encodeURIComponent(
+export function getTranslatorLink(text: string, lang: string): string {
+  return `https://translate.google.com/?sl=auto&tl=${lang}&text=${encodeURIComponent(
     text,
   )}`
 }