[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Translation of the Info Panel
From: |
Yavor Doganov |
Subject: |
Re: Translation of the Info Panel |
Date: |
Tue, 12 Oct 2010 19:26:00 +0300 |
User-agent: |
Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
At Sat, 09 Oct 2010 09:39:39 +0200,
Csanyi Pal wrote:
> can one to translate Info Panel for an application?
Someone may correct me, but no -- TTBOMK this is not possible, at
least not when using the most common technique of providing a .plist
template which is later installed by gnustep-make's rules.
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.