Skip to content

Commit

Permalink
fix: translating posts with incorrect language
Browse files Browse the repository at this point in the history
  • Loading branch information
ImLunaHey committed Jan 9, 2025
1 parent de27b7b commit f214bc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ const PostDropdownMenu = ({ post, setTranslatedText }: { post: BSkyPost; setTran
method: 'POST',
body: JSON.stringify({
q: post.record.text,
source,
// fall back to auto detection if the lanauge is the same as the current language
source: source === currentLanguage ? 'auto' : source,
target: navigator.language,
}),
headers: { 'Content-Type': 'application/json' },
Expand Down

0 comments on commit f214bc0

Please sign in to comment.