Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Issue 159197: Add a custom subclass of GTMUILocalizer that skips the bundle work so we can ... (Closed)

Created:
11 years, 5 months ago by TVL
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, Ben Goodger (Google)
Visibility:
Public.

Description

Add a custom subclass of GTMUILocalizer that skips the bundle work so we can directly use these from nib files without some extra overhead. Updated the generator to make things based off this subclass. TEST=none BUG=16764 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21280

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 11

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -5 lines) Patch
M build/mac/generate_localizer View 1 2 3 4 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/cocoa/ui_localizer.h View 1 2 3 4 2 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/ui_localizer.mm View 1 2 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
TVL
11 years, 5 months ago (2009-07-22 15:30:15 UTC) #1
TVL
Just to explain, the GTM base needs the owner and goes to find a nib ...
11 years, 5 months ago (2009-07-22 16:04:06 UTC) #2
Mark Mentovai
LGO http://codereview.chromium.org/159197/diff/1/4 File chrome/browser/cocoa/ui_localizer.mm (right): http://codereview.chromium.org/159197/diff/1/4#newcode98 Line 98: // The GTM base is bundle based, ...
11 years, 5 months ago (2009-07-22 16:05:35 UTC) #3
TVL
Comment greatly beefed up (might move this out to the docs and a pointer to ...
11 years, 5 months ago (2009-07-22 16:20:53 UTC) #4
Mark Mentovai
11 years, 5 months ago (2009-07-22 16:27:23 UTC) #5
code-r+, but see http://www.youtube.com/watch?v=t-y3rb_ehFg

http://codereview.chromium.org/159197/diff/17/1002
File build/mac/generate_localizer (right):

http://codereview.chromium.org/159197/diff/17/1002#newcode32
Line 32: // A subclass of ChromeUILocalizer that handles localizes based on
resource
I guess it handles localization.

http://codereview.chromium.org/159197/diff/17/1003
File chrome/browser/cocoa/ui_localizer.h (right):

http://codereview.chromium.org/159197/diff/17/1003#newcode34
Line 34: // To use this, make an instance of subclassed generated by the
I guess the "d" and "s" keys are too close to one another?

"make an instance of a subclass generated" would be best.

http://codereview.chromium.org/159197/diff/17/1003#newcode35
Line 35: // generate_localizer script into your xib. Connect the owner_ outlet
of the
"make an instance of ... into your xib" could use help.

http://codereview.chromium.org/159197/diff/17/1003#newcode36
Line 36: // your instance to the File Owner of the nib. It expects the owner_
outlet to
of the your instance

nit: IB calls it File's Owner, right?
technical nit: xib, not nib

In the new sentence, who is "It?"

http://codereview.chromium.org/159197/diff/17/1003#newcode37
Line 37: // be an instance or subclass of NSWindowController, NSViewController. 
It will
does "," mean "or"?

http://codereview.chromium.org/159197/diff/17/1003#newcode39
Line 39: // the NSViewController's view and subviews when awakeFromNib is called
on the
comma after subviews

http://codereview.chromium.org/159197/diff/17/1003#newcode41
Line 41: // yetAnotherObjectToLocalize_ and those will also be localized.
Strings in the
non-grammatical comment: I like these names!

http://codereview.chromium.org/159197/diff/17/1003#newcode42
Line 42: // xib that you want localized must start with ^IDS. And the value must
be a
Don't start a sentence with "and," just start with "the."

http://codereview.chromium.org/159197/diff/17/1003#newcode45
Line 45: //  - Titles and altTitles (for menus, buttons, windows, menuitems,
tabViewItem)
everything's plural except for tabViewItem

http://codereview.chromium.org/159197/diff/17/1003#newcode46
Line 46: //  - stringValue (for labels)
...and stringValue isn't plural either...

http://codereview.chromium.org/159197/diff/17/1003#newcode47
Line 47: //  - tooltips
...but then some of the rest of these are...

Powered by Google App Engine
This is Rietveld 408576698