discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Translation of the Info Panel


From: Csanyi Pal
Subject: Re: Translation of the Info Panel
Date: Thu, 14 Oct 2010 18:28:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Yavor Doganov <address@hidden> writes:

> At Sat, 09 Oct 2010 09:39:39 +0200,
> Csanyi Pal wrote:
>> can one to translate Info Panel for an application?
>
> I think you could use this simple trick: move all translatable keys
> from the .plist to application code, as standard localized Objective-C
> strings.  For example, use your own method in the MainMenu.gsmarkup
> file, e.g.
>
>   <menuItem title="Info Panel..." action="LPTFrontStandardInfoPanel:" />
>
> with the following (example) implementation:
>
> - (void) LPTFrontStandardInfoPanel: (id) sender
> {
>   NSDictionary *dict =
>     [NSDictionary dictionaryWithObjectsAndKeys:
>                     _(@"Write & read the parallel port."),
>                     @"ApplicationDescription",
>                     _(@"Released under the GNU General Public License 3"),
>                     @"CopyrightDescription",
>                     _(@"...example..."),
>                     @"SomeOtherLocalizedKey",
>                   nil];
>   
>   return [NSApp orderFrontStandardInfoPanelWithOptions: dict];
> }
>
> Use make_strings to generate/update Localizable.strings, and don't
> forget to add it to the xxx_LOCALIZED_RESOURCE_FILES variable in your
> makefile.  All of this is untested, although right now I can't see a
> reason why it shouldn't do the job.

It works! :)
Thanks!

-- 
Regards, Paul Chany
<http://www.debian.org> <http://wiki.debian.org/DebianEdu>
<http://sourceforge.net/projects/lptinterface/>
<http://csanyi-pal.info>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]