GNOME Bugzilla – Bug 683630
Improve i18n support
Last modified: 2012-10-02 18:56:50 UTC
See patches
Created attachment 223813 [details] [review] Use translations from schema files in the UI All GSettings schema files are translated by their respective packages, so we can retrieve the translation by looking up the gettext-domain and show the localized version of summary and description in the UI.
Created attachment 223814 [details] [review] Add missing translation marks
Created attachment 223815 [details] [review] Don't translate tweak group names at module load time When the modules are loaded, the gettext infrastructure is not ready, and therefore the names don't get translated.
I'm away at a conference. Please push these.
Attachment 223813 [details] pushed as 743a1b5 - Use translations from schema files in the UI Attachment 223814 [details] pushed as 3ed1ba8 - Add missing translation marks Attachment 223815 [details] pushed as 61147f2 - Don't translate tweak group names at module load time
Reopening, found more problems...
Created attachment 223851 [details] [review] Use Python class-based gettext Python's gettext does not use gettext from the glibc, so the function _ provided by gettext.install does not care about textdomain() or bindtextdomain(). Instead, it wants a domain and localedir explicitly, as well as any extra function that should be installed. This fixes the translations for all strings provided by gnome-tweak-tool.
Created attachment 223852 [details] [review] Translate again the window title from GtkBuilder Python gettext is broken, in that it does not set textdomain or bindtextdomain for apps calling gettext from C, so GtkBuilder translations don't work.
Created attachment 223853 [details] [review] Improve main window styling Use a bigger window size (same as the control center), to avoid showing most description truncated or having the scrollbars in any view but the extensions one. Use @theme_bg_color instead of @bg_color to work with the dark theme too.
As before, please commit.
Attachment 223851 [details] pushed as 2818d1e - Use Python class-based gettext Attachment 223852 [details] pushed as 39ecf90 - Translate again the window title from GtkBuilder Attachment 223853 [details] pushed as 9788048 - Improve main window styling
Giovanni - I just pushed a patch that prevents crashes I was seeing on untranslated schemas / g-t-t being run uninstalled Can you test if this is still working for you?
Seems to work fine here, no regressions noticed.