feat(mobile/note_actions): indicate current content language

This commit is contained in:
Elian Doran 2026-02-04 18:05:37 +02:00
parent 2cbe96d815
commit e00e3999c5
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View File

@ -761,7 +761,8 @@
"note_revisions": "Note revisions",
"error_cannot_get_branch_id": "Cannot get branchId for notePath '{{notePath}}'",
"error_unrecognized_command": "Unrecognized command {{command}}",
"backlinks": "Backlinks"
"backlinks": "Backlinks",
"content_language_switcher": "Content language: {{language}}"
},
"note_icon": {
"change_note_icon": "Change note icon",

View File

@ -112,12 +112,12 @@ export default function MobileDetailMenu() {
function ContentLanguageSelector({ note }: { note: FNote | null | undefined }) {
const { locales, DEFAULT_LOCALE, currentNoteLanguage, setCurrentNoteLanguage } = useLanguageSwitcher(note);
const { processedLocales } = useProcessedLocales(locales, DEFAULT_LOCALE, currentNoteLanguage ?? DEFAULT_LOCALE.id);
const { activeLocale, processedLocales } = useProcessedLocales(locales, DEFAULT_LOCALE, currentNoteLanguage ?? DEFAULT_LOCALE.id);
return (
<FormDropdownSubmenu
icon="bx bx-globe"
title={t("status_bar.language_title")}
title={t("mobile_detail_menu.content_language_switcher", { language: getLocaleName(activeLocale ?? DEFAULT_LOCALE) })}
>
{processedLocales.map((locale, index) =>
(typeof locale === "object") ? (