mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-05 10:30:55 +01:00
Added source_lang_en
This commit is contained in:
parent
811f1133a4
commit
bd196b05cb
3 changed files with 4 additions and 2 deletions
|
@ -133,7 +133,8 @@ const populateTweetProperties = async (
|
|||
apiTweet.translation = {
|
||||
text: unescapeText(linkFixer(tweet, translateAPI?.translation || '')),
|
||||
source_lang: translateAPI?.sourceLanguage || '',
|
||||
target_lang: translateAPI?.destinationLanguage || ''
|
||||
target_lang: translateAPI?.destinationLanguage || '',
|
||||
source_lang_en: translateAPI?.localizedSourceLanguage || '',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ export const handleStatus = async (
|
|||
const formatText =
|
||||
language === 'en'
|
||||
? Strings.TRANSLATE_TEXT.format({
|
||||
language: translation.source_lang
|
||||
language: translation.source_lang_en
|
||||
})
|
||||
: Strings.TRANSLATE_TEXT_INTL.format({
|
||||
source: translation.source_lang.toUpperCase(),
|
||||
|
|
1
src/types.d.ts
vendored
1
src/types.d.ts
vendored
|
@ -45,6 +45,7 @@ interface APIResponse {
|
|||
interface APITranslate {
|
||||
text: string;
|
||||
source_lang: string;
|
||||
source_lang_en: string;
|
||||
target_lang: string;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue