[Thunar-dev] xfdesktop and thunar

Jari Rahkonen jari.rahkonen at pp1.inet.fi
Fri Apr 28 10:48:40 CEST 2006


Brian J. Tarricone wrote:
> Benedikt Meurer wrote:
>>> Brian J. Tarricone schrieb:
>>>>>> Well finally, here are the screenshots:
>>>>>>
>>>>>> http://www.dcc.ufrj.br/~rcoacci/thunar.jpg
>>>>>> http://www.dcc.ufrj.br/~rcoacci/xfdesktop.jpg
>>>>>>
>>>>>> The first one shows the properties dialog from Thunar
>>>>>> an the second one, from xfdektop. Tha language is pt_BR. Notice the "??" in
>>>>>> the xfdesktop dialog.
>>>>>> Those are the last thunar and xfdesktop svn versions.
>>>>>> Hope it helps
>>>>> It's also weird that the file context menu on the desktop and parts of
>>>>> the dialog are in English, if your locale is actually set to pt_BR. Were
>>>>> both packages started with the same locale? Or do you manually (or
>>>>> otherwise) switch locales after the desktop has started? This might be
>>>>> completely off the mark, but personally I've never seen this problem.
>>>>>
>>>>> BTW, as far as I understand, the dialog in xfdesktop is actually copied
>>>> >from thunar, but isn't really the _same_ dialog. I recall seeing these
>>>>> same strings in the translation files for both packages. So this has
>>>>> possibly nothing to do with thunar and the thread should probably be on
>>>>> xfce4-dev.
>>>> The Launcher properties page is actually supplied by a Thunar plugin.
>>>> I'm not sure how the translation works at all, since the strings would
>>>> be in a thunar's .mo file, and it would be trying to look in
>>>> xfdesktop's.  Unless Benny did some trickery.
>>> Well, weird thing is, GETTEXT_PACKAGE is Thunar for the plugins, and 
>>> bindtextdomain() is not called by the plugins (have to fix that). So, 
>>> where does the translation come from?
> 
> I bet some of them - like "Use startup notification" and "Run in
> terminal" come from menueditor.  Well, actually, the latter does, but
> the former has its mnemonic in a different place (which may indicate why
> it's blank in the screenshot; though I thought gettext would just return
> the English string if it didn't find one).  Menueditor does have
> "Command".  I'm sure there's an "Options" somewhere.  Not sure about the
> others, but you get the idea...

You're right. It's easy to see from the translation files that the
"duplicate" strings mostly come from files in the menueditor subdirectory.

> If the plugins call bindtextdomain(), won't this mess up xfdesktop's
> translations?  Or does gettext just accumulate text domains, and not
> replace them when you call bindtextdomain() again?
> 
> 	-brian


Wouldn't dgettext [1] be the correct function to use here? You could
bind the Thunar domain separately and use dgettext for the strings in
the plugins to avoid switching domains permanently. AFAIK this is the
correct way to internationalize libraries and the like.

[1] char *dgettext (const char *domain_name, const char *msgid);

- Jari



More information about the Thunar-dev mailing list