aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMUILocalizer.h
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-08-06 17:00:44 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-08-06 17:00:44 +0000
commit1aac50492d94c282511a6484760405b314d1f1f0 (patch)
tree33a3b3e20f874a77bdff3f0238a5f6d393e562c0 /AppKit/GTMUILocalizer.h
parenteff8351b590bcf190b175e2add2ab87c8e7204ec (diff)
[Author: thomasvl]
Move the nib finding code in GTMUILocalizer to a class methods so it can be called without an instance. Add GTMUILocalizerAndLayoutTweaker getting UI localized and then running through it to auto size UI items that have been marked and also support limited tweaks on other objects based on a group of tweaks. Provide a class method for this sizeToFit fixup of individual objects. Unittests for the new class. R=dmaclach,stuartmorgan DELTA=3161 (3157 added, 0 deleted, 4 changed)
Diffstat (limited to 'AppKit/GTMUILocalizer.h')
-rw-r--r--AppKit/GTMUILocalizer.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/AppKit/GTMUILocalizer.h b/AppKit/GTMUILocalizer.h
index b07b861..8ce00c6 100644
--- a/AppKit/GTMUILocalizer.h
+++ b/AppKit/GTMUILocalizer.h
@@ -6,9 +6,9 @@
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
-//
+//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -25,12 +25,12 @@
// NSViewController or NSApplication. Using the bundle of the nib it will then
// localize any items in the NSWindowController's window and subviews, or the
// NSViewController's view and subviews or the NSApplication's main menu
-// and dockmenu at when awakeFromNib is called on the GTMUILocalizer instance.
-// You can optionally hook up otherObjectToLocalize_ and
+// and dockmenu at when awakeFromNib is called on the GTMUILocalizer instance.
+// You can optionally hook up otherObjectToLocalize_ and
// yetAnotherObjectToLocalize_ and those will also be localized. Strings in the
// nib that you want localized must start with ^ (shift-6). The strings will
-// be looked up in the Localizable.strings table without the caret as the
-// key.
+// be looked up in the Localizable.strings table without the caret as the
+// key.
// Things that will be localized are:
// - Titles and altTitles (for menus, buttons, windows, menuitems, tabViewItem)
// - stringValue (for labels)
@@ -38,15 +38,15 @@
// - accessibility help
// - accessibility description
// - menus
-//
+//
// As an example if I wanted to localize a button with the word "Print" on
// it, I would put it in a window controlled by a NSWindowController that was
// the owner of the nib. I would set it's title to be "^Print". I would then
// create an instance of GTMUILocalizer and set it's owner_ to be the owner
// of the nib.
-// In my Localizable.strings file in my fr.lproj directory for the bundle
+// In my Localizable.strings file in my fr.lproj directory for the bundle
// I would put "Print" = "Imprimer";
-// Then when my app launched in French I would get a button labeled
+// Then when my app launched in French I would get a button labeled
// "Imprimer". Note that GTMUILocalizer is only for strings, and doesn't
// resize, move or change text alignment on any of the things it modifies.
// If you absolutely need a caret at the beginning of the string
@@ -81,5 +81,5 @@
// If |string| is nil, you should return nil
- (NSString *)localizedStringForString:(NSString *)string;
// Allows subclasses to override how the bundle is picked up
-- (NSBundle *)bundleForOwner:(id)owner;
++ (NSBundle *)bundleForOwner:(id)owner;
@end