Skip to content

fix: translate dropdown options in the language chosen at startup - #1569

Closed
kratos0718 wants to merge 1 commit into
TagStudioDev:mainfrom
kratos0718:fix-translated-ui-strings
Closed

kratos0718 wants to merge 1 commit into
TagStudioDev:mainfrom
kratos0718:fix-translated-ui-strings

Conversation

@kratos0718

Copy link
Copy Markdown
Contributor

Summary

Fixes #1289. Covers the dropdown part of #1316: thumbnail size, file path visibility, tag click action, theme and splash screen options, plus the field type options in the field template editor, which have the same cause.

These option labels were looked up with Translations[...] in class bodies (MainWindow.THUMB_SIZES, the SettingsPanel maps, EditFieldTemplateModal.field_type_map). Class bodies run when the module is imported, and QtDriver applies the language from the settings later, so these labels were always English even though the keys are translated. The maps now hold translation keys, and the labels are looked up when each combobox is filled. Nothing else reads the map values.

The other items in #1316 (dialog buttons, "All Tags", the colour placeholder, the trash dialog keys) are hard-coded strings or wrong keys rather than this import-time lookup, so I've left them for a separate change.

Tasks Completed

  • Platforms Tested:
    • macOS ARM
  • Tested For:
    • Basic functionality: new tests/qt/test_translated_options.py switches to French after import, as the app does at startup, and checks that the settings panel and field type comboboxes show the French labels. Both tests fail on main (the comboboxes show System, Dark, Light) and pass with this change. pytest tests/qt passes (69 tests); ruff format and ruff check are clean.

The thumbnail size, settings (file path, tag click action, theme and
splash) and field type options were translated in class bodies, which
run when the module is imported, before the language from the settings
is applied. They always showed English. Store the translation keys and
look them up when the comboboxes are filled.
@CyanVoxel CyanVoxel added Type: Invalid This doesn't seem right Type: UI/UX User interface and/or user experience Type: Translations Modifies translation keys or translation capabilities. Type: Fix A fix for a bug, typo, or other issue labels Nov 14, 2026
@CyanVoxel

Copy link
Copy Markdown
Member

Thank you for your work on this, however #1289 is already resolved on dev (these translations went away in 455136b) and the rest of #1316 was fixed on dev by #1535

@CyanVoxel CyanVoxel closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Fix A fix for a bug, typo, or other issue Type: Invalid This doesn't seem right Type: Translations Modifies translation keys or translation capabilities. Type: UI/UX User interface and/or user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Thumbnail Size dropdown options only use English strings, even when translated strings are available

2 participants