Permalink
Browse files

fix translations

some systems, seem to have issue finding translation where full locale is specified
(i.e. fr_FR) instead just use language (i.e. fr)
  • Loading branch information...
darkxst committed Jul 3, 2012
1 parent ba59da1 commit 3117df5ea79090f83b60fe55e170b75240f427b2
Showing with 2 additions and 3 deletions.
  1. +0 −1 .gitignore
  2. 0 po/{cs_CZ → cs}/system-monitor-applet.po
  3. 0 po/{de_DE → de}/system-monitor-applet.po
  4. 0 po/{fr_FR → fr}/system-monitor-applet.po
  5. 0 po/{it_IT → it}/system-monitor-applet.po
  6. 0 po/{pt_PT → pt}/system-monitor-applet.po
  7. 0 po/{ro_RO → ro}/system-monitor-applet.po
  8. 0 po/{ru_RU → ru}/system-monitor-applet.po
  9. 0 po/{sl_SL → sl}/system-monitor-applet.po
  10. +1 −1 system-monitor@paradoxxx.zero.gmail.com/convenience.js
  11. BIN system-monitor@paradoxxx.zero.gmail.com/locale/cs/LC_MESSAGES/system-monitor-applet.mo
  12. BIN system-monitor@paradoxxx.zero.gmail.com/locale/cs_CZ/LC_MESSAGES/system-monitor-applet.mo
  13. BIN system-monitor@paradoxxx.zero.gmail.com/locale/{de_DE → de}/LC_MESSAGES/system-monitor-applet.mo
  14. BIN system-monitor@paradoxxx.zero.gmail.com/locale/fr/LC_MESSAGES/system-monitor-applet.mo
  15. BIN system-monitor@paradoxxx.zero.gmail.com/locale/fr_FR/LC_MESSAGES/system-monitor-applet.mo
  16. BIN system-monitor@paradoxxx.zero.gmail.com/locale/{it_IT → it}/LC_MESSAGES/system-monitor-applet.mo
  17. BIN system-monitor@paradoxxx.zero.gmail.com/locale/pt/LC_MESSAGES/system-monitor-applet.mo
  18. BIN system-monitor@paradoxxx.zero.gmail.com/locale/pt_PT/LC_MESSAGES/system-monitor-applet.mo
  19. BIN system-monitor@paradoxxx.zero.gmail.com/locale/{ro_RO → ro}/LC_MESSAGES/system-monitor-applet.mo
  20. BIN system-monitor@paradoxxx.zero.gmail.com/locale/{ru_RU → ru}/LC_MESSAGES/system-monitor-applet.mo
  21. BIN system-monitor@paradoxxx.zero.gmail.com/locale/sl/LC_MESSAGES/system-monitor-applet.mo
  22. +1 −1 ...em-monitor@paradoxxx.zero.gmail.com/schemas/org.gnome.shell.extensions.system-monitor.gschema.xml
View
@@ -1,5 +1,4 @@
*~
-*.mo
tmp
*.pyc
*.swp
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -3,7 +3,7 @@ const Gio = imports.gi.Gio;
function initTranslations(metadata) {
let localeDir = metadata.dir.get_child('locale').get_path();
- Gettext.bindtextdomain('gnome-shell-extensions', localeDir);
+ Gettext.bindtextdomain('system-monitor-applet', localeDir);
}
function getSettings(metadata, extension_id) {
@@ -1,4 +1,4 @@
-<schemalist gettext-domain="gnome-shell-extensions">
+<schemalist gettext-domain="system-monitor-applet">
<enum id="org.gnome.shell.extensions.system-monitor.display-style">
<value value="0" nick="digit"/>
<value value="1" nick="graph"/>

7 comments on commit 3117df5

Contributor

NVieville replied Jul 4, 2012

Hello,

Sorry for that, but I had to revert modifications made on gettext-domain from files system-monitor@paradoxxx.zero.gmail.com/convenience.js and system-monitor@paradoxxx.zero.gmail.com/schemas/org.gnome.shell.extensions.system-monitor.gschema.xml to get correct localization on my french Fedora 17.

Don't know what is the reason for now.

Cordially,

NVieville

Collaborator

darkxst replied Jul 4, 2012

did you try recompile the new (changed) schema first?
glib-compile-schemas ~/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/schemas/

git fails miserably at tracking binary files, so that included gschemas.compiled, is out of date ;(

Contributor

NVieville replied Jul 9, 2012

Sorry for the late response, I was off these days.

Even with schema recompiled as you suggested, the issue still persist. The only solution I've found is to revert "schemalist gettext-domain" to "gnome-shell-extensions". Maybe a specificity of Fedora here? I'll try to investigate further if I have time.

Cordially,

NVieville

Collaborator

darkxst replied Jul 11, 2012

The gettext domain should be arbitrary and unique to our extension. I suspect that we might in some cases cause issues/conflicts with the official gnome-shell-extensions translations if we are using their gettext domain (although thats just a guess I don't actually use any translations).

Contributor

NVieville replied Aug 3, 2012

Hello,

Finally I get it working, but still get more testing even if for now french translation is correct! The gettext domain name have to be uniform in the schema xml file and in the sources files of the applet. In your schema file you declare your domain as "system-monitor-applet"

line:

and in the rest of this file you use another tree, for example:

As you can see, system-monitor is different than system-monitor-applet (for my part I saw it very late - today only).
So, to resolve and test this point, I just rename system-monitor-applet in system-monitor in line 6 of system-monitor system-monitor@paradoxxx.zero.gmail.com/convenience.js file and in the first line of system-monitor@paradoxxx.zero.gmail.com/schemas/org.gnome.shell.extensions.system-monitor.gschema.xml.
Another solution would be to rename all the system-monitor strings in system-monitor-applet strings in all the files of the applet that need it. I didn't check if system-monitor domain string would conflict with existing gnome component, but at the moment I don't see some of the possible troubles about such a thing on my machine, and it's the simplest solution.

Hope this would help to catch the thing!

One last information, my attempt to correct this problem were done on the last commit (d437c9c) and were successful.

Cordially,

NVieville

Collaborator

darkxst replied Aug 9, 2012

Interesting, must be a fedora thing, on Ubuntu the gettext domain and gsettings domain appear to be independent.

Anyway I will apply your changes.

Thanks

Collaborator

darkxst replied Aug 9, 2012

Please sign in to comment.