After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683630 - Improve i18n support
Improve i18n support
Status: RESOLVED FIXED
Product: gnome-tweak-tool
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Tweak Tool maintainer(s)
GNOME Tweak Tool maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-09-08 17:03 UTC by Giovanni Campagna
Modified: 2012-10-02 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use translations from schema files in the UI (4.56 KB, patch)
2012-09-08 17:04 UTC, Giovanni Campagna
committed Details | Review
Add missing translation marks (2.14 KB, patch)
2012-09-08 17:04 UTC, Giovanni Campagna
committed Details | Review
Don't translate tweak group names at module load time (2.69 KB, patch)
2012-09-08 17:04 UTC, Giovanni Campagna
committed Details | Review
Use Python class-based gettext (3.92 KB, patch)
2012-09-09 14:28 UTC, Giovanni Campagna
committed Details | Review
Translate again the window title from GtkBuilder (1002 bytes, patch)
2012-09-09 14:28 UTC, Giovanni Campagna
committed Details | Review
Improve main window styling (1.51 KB, patch)
2012-09-09 14:28 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-09-08 17:03:56 UTC
See patches
Comment 1 Giovanni Campagna 2012-09-08 17:04:13 UTC
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.
Comment 2 Giovanni Campagna 2012-09-08 17:04:19 UTC
Created attachment 223814 [details] [review]
Add missing translation marks
Comment 3 Giovanni Campagna 2012-09-08 17:04:27 UTC
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.
Comment 4 John Stowers 2012-09-08 22:47:42 UTC
I'm away at a conference. Please push these.
Comment 5 Giovanni Campagna 2012-09-09 12:14:54 UTC
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
Comment 6 Giovanni Campagna 2012-09-09 14:25:07 UTC
Reopening, found more problems...
Comment 7 Giovanni Campagna 2012-09-09 14:28:43 UTC
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.
Comment 8 Giovanni Campagna 2012-09-09 14:28:51 UTC
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.
Comment 9 Giovanni Campagna 2012-09-09 14:28:59 UTC
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.
Comment 10 John Stowers 2012-09-09 18:13:05 UTC
As before, please commit.
Comment 11 Giovanni Campagna 2012-09-10 08:39:30 UTC
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
Comment 12 John Stowers 2012-09-25 19:55:04 UTC
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?
Comment 13 Giovanni Campagna 2012-10-02 18:56:50 UTC
Seems to work fine here, no regressions noticed.