Re: [gtk-osx-users] Using localization with "Application" menu with the gtk mac integration library.



Also missing a comma. Make sure you're not pasting "smart quotes".
Changed key to @"Hide %@" for good form, which is what you were using initially.

menuitem = [[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: NSLocalizedStringFromTable (@"Hide 
%@", @"GtkosxApplication", @"Hide menu item title"), appname]
        action: @selector (hide:)
        keyEquivalent: @"h"];


On Oct 2, 2014, at 9:49 PM, Joshua Pettus <jshpettus gmail com> wrote:

Hey!

menuitem = [[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: NSLocalizedStringFromTable (@"Hide" 
@"GtkosxApplication", @"Hide menu item title"), appname]
        action: @selector (hide:)
        keyEquivalent: @"h”];

got

compile error: use of undeclared identifier 'NSLocalizedStringFromTable'

I’m not throwing in the towel yet. :)

Regards,
Josh

On Oct 3, 2014, at 12:36 AM, Kevin Bernhagen <kevin calxalot net> wrote:

Sorry, I clipped the obj message.
Try this.

menuitem = [[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: NSLocalizedStringFromTable 
(@"Hide" "GtkosxApplication", @"Hide menu item title"), appname]
      action: @selector (hide:)
      keyEquivalent: @"h”];


On Oct 2, 2014, at 9:18 PM, Joshua Pettus <jshpettus gmail com> wrote:

But these last two options you just gave, I got to compile with:

menuitem = [[[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: NSLocalizedStringFromTable 
(@"Hide" "GtkosxApplication", @"Hide menu item title"), appname]]  
       action: @selector (hide: ) keyEquivalent: @"h”];  (was missing a “[“)





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