Localization support. Change many names in NJKeyInputField to standard keyboard short...
[enjoyable.git] / Classes / NJInputButton.m
index 0c3b0ce..caa4d8e 100644 (file)
 - (id)initWithName:(NSString *)name idx:(int)idx max:(long)max {
     if ((self = [super init])) {
         _max = max;
 - (id)initWithName:(NSString *)name idx:(int)idx max:(long)max {
     if ((self = [super init])) {
         _max = max;
+        self.name = [NSString stringWithFormat:NSLocalizedString(@"button %d", @"button name"), idx];
+        
         if (name.length)
         if (name.length)
-            self.name = [NSString stringWithFormat:@"Button %d - %@", idx, name];
-        else
-            self.name = [NSString stringWithFormat:@"Button %d", idx];
+            self.name = [self.name stringByAppendingFormat:@"- %@", name];
     }
     return self;
 }
     }
     return self;
 }