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.


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to