-
Notifications
You must be signed in to change notification settings - Fork 28
Translations as a developer
trigg edited this page Jul 22, 2022
·
1 revision
Each python module that needs translation must have the same setup steps
in imports include import gettext
directly after imports (and logging setup) prepare get text with
t = gettext.translation(
'default', pkg_resources.resource_filename('discover_overlay', 'locales'), fallback=True)
_ = t.gettext
Inside the module any user-facing text string must be first translated using the command _
. So to find the local translation for 'Overlay' the user must print(_('Overlay'))
All Button & Label widgets are automatically translated on Configuration start. An edge case is used for the Overview
blurb