[Adium-devl] Issues with translated preferences
Christopher Harms
Chris_Harms at t-online.de
Tue Apr 17 14:30:19 UTC 2007
This happens with any language. Tested this with an App which starts
Application in a selected language. Randomly tested with some
languages (Norwegian, Dutch, Russian, etc. [not that I would
understand any of them ;-)]).
As I already said: SS_PrefsController uses everytime -paneName which
loads the localized string from the according .m-/.nib-File (e.g.
AIAccountListPreferences.m). For identifying the views you have to
use -paneIdentifier (which is, in fact, the English original-string
of -paneName). That's, what's my patch does: two times using
paneIdentifier instead of paneName. It works and seems to be
correct. ;-)
Regards,
Christopher
Am 17.04.2007 um 14:34 schrieb Kiel Gillard:
> Does the same thing happen with languages other than English and
> German (in which case, wouldn't we know about it already)?
>
> Kiel :-)
> "Miracles happen to those who believe in them."
> Berhard Berenson
>
> On 17/04/2007, at 10:19 PM, Christopher Harms wrote:
>
>> I think, they are both. As far as I can see that (and as far as I
>> remember the project I used SS_PrefsController myself), they are
>> loaded dynamically from the according nib-Files. Nevertheless,
>> they are translated, which leads to the problem mentioned below.
>> Easy proof: iterating all items in [prefsController loadedPanes]
>> gives all loaded Panes, stored in the SS_PrefsController with
>> their name/identifier. I get the following list:
>> 2007-04-17 14:10:53.238 Adium[1996] Erscheinungsbild
>> 2007-04-17 14:10:53.238 Adium[1996] Erweitert
>> 2007-04-17 14:10:53.238 Adium[1996] Status
>> 2007-04-17 14:10:53.238 Adium[1996] Konten
>> 2007-04-17 14:10:53.238 Adium[1996] Allgemein
>> 2007-04-17 14:10:53.238 Adium[1996] Persönliches
>> 2007-04-17 14:10:53.238 Adium[1996] Dateiübertragung
>> 2007-04-17 14:10:53.238 Adium[1996] Nachrichten
>> 2007-04-17 14:10:53.238 Adium[1996] Ereignisse
>> This are all translated. I suppose, you'll get something like
>> this: Appearance, Advanced, Status (that's, btw, the reason I see
>> only the Status-pane), Accounts, General, Personal, File Transfer,
>> Messages, Events. As you can see, the names stored in the
>> SS_PrefsController, are depending on the used translation. So it's
>> clear, that setPanesOrder: won't work with English names if you're
>> using a translated Adium/MacOs/whatever.
>>
>> Christopher
>>
>> Am 17.04.2007 um 13:58 schrieb Kiel Gillard:
>>
>>> Aren't those hard coded strings toolbar item identifiers? That
>>> is, they're not supposed to be human readable they're just used
>>> purely for the internal workings of Adium?
>>>
>>> Kiel
>>> "Science without religion is lame, religion without science is
>>> blind."
>>> Albert Einstein
>>>
>>>
>>> On 17/04/2007, at 9:50 PM, Christopher Harms wrote:
>>>
>>>> Hi again,
>>>> sorry, for double-mailing, but I think this is more a bug than
>>>> something done for purpose.
>>>> The problem is, that the [[[AIObject sharedAdiumInstance]
>>>> preferenceController] paneArray]-Array (s.
>>>> AIPreferenceWindowController.m, line 69) contains the panes with
>>>> translated captions (loaded from the translated nib-files of
>>>> course). By calling setPanesOrder: the Controller doesn't know
>>>> what to do, because you are giving him the English names, which
>>>> he doesn't know (from the paneArray he only knows the German-or-
>>>> whatever names). (Hard-coded strings suck. ;-))
>>>> I don't have a fix for this by now, because I'm not sure how all
>>>> the stuff works, but as soon as I have something for this, I'm
>>>> uploading a patch to Trac.
>>>>
>>>> Regards,
>>>> Christopher
>>>>
>>>> Am 17.04.2007 um 12:56 schrieb Christopher Harms:
>>>>
>>>>> Hi all,
>>>>> I'm not sure if you are aware of this and I'm not sure if this is
>>>>> sufficient to create a new bug report, since it's about the
>>>>> development-sources.
>>>>>
>>>>> Whenever I compile the current Adium-source and open the
>>>>> Preferences-
>>>>> window I online see the "Status"-pane and no toolbar. The
>>>>> problem is,
>>>>> that SS_PrefsController loads only this specific pane (see
>>>>> debuglog
>>>>> says that there is no toolbar, because only one pane is loaded [s.
>>>>> SS_PrefsController.m, l. 479]).
>>>>> The reason is, that I'm working on a German MacOS X, so Adium
>>>>> loads
>>>>> the German translation of all nib-Files.
>>>>> In AIPreferenceWindowController.m, line 72 it says:
>>>>> [prefsController setPanesOrder:[NSArray arrayWithObjects:
>>>>> @"Accounts",
>>>>> NSToolbarSeparatorItemIdentifier,
>>>>> @"General", @"Personal", @"Appearance", @"Messages", @"Status",
>>>>> @"Events", @"File Transfer", @"Advanced", nil]];
>>>>> I guess, prefsController is now going to load Views, titled with
>>>>> "General", "Personal", etc. But though the panes and views
>>>>> (i.e. the
>>>>> nib-files) are translated the loader won't find anything, because
>>>>> they are now titled with "Allgemein", "Persönlich", etc. (i.e. the
>>>>> German translations).
>>>>>
>>>>> Is this a known issue?
>>>>> I would just go ahead to fix this bug, but I'm still diving
>>>>> into the
>>>>> code and I'm not finished with unterstanding it. ;-)
>>>>>
>>>>> Regards,
>>>>> Christopher
>>>>> _______________________________________________
>>>>> Adium-devl mailing list
>>>>> Adium-devl at adiumx.com
>>>>> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
>>>>
>>>> _______________________________________________
>>>> Adium-devl mailing list
>>>> Adium-devl at adiumx.com
>>>> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
>>>
>>> _______________________________________________
>>> Adium-devl mailing list
>>> Adium-devl at adiumx.com
>>> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
>>
>> _______________________________________________
>> Adium-devl mailing list
>> Adium-devl at adiumx.com
>> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
>
> _______________________________________________
> Adium-devl mailing list
> Adium-devl at adiumx.com
> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070417/5eaa7f03/attachment-0001.html>
More information about the devel
mailing list