chore: Update translations

This commit is contained in:
2023-11-06 13:34:09 +00:00
parent 6e349051a2
commit 5fe8a5e3b6
4 changed files with 27 additions and 14 deletions

View File

@ -66,7 +66,11 @@ export function NoteContextMenu({ ev, ...props }: NosteContextMenuProps) {
});
if ("translations" in result) {
if (typeof props.onTranslated === "function" && result.translations.length > 0 && targetLang != result.translations[0].detected_source_language) {
if (
typeof props.onTranslated === "function" &&
result.translations.length > 0 &&
targetLang != result.translations[0].detected_source_language
) {
props.onTranslated({
text: result.translations[0].text,
fromLanguage: langNames.of(result.translations[0].detected_source_language),