Yavor Doganov <[email protected]> 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>


_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to