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

Issue 155774: Starting mac l10n:... (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

Starting mac l10n: Added a script to process a xib file and generate a localizer out of the resource constants it finds in the xib. Update the MainMenu.xib to use a generated localizer. Kill off the menu_localizer in favor of a generated one. ui_localizer is a helper so each "localizer" is as small as possible. Build some menus out of base strings and the product name like windows. Added the dir generated for the localizers so we can load the header to directly create them (menubar one). Enable the other 3 languages we were building to help test. Made the context menu code use the new code for handling window's accelerators and ellipsis. Added unittest for ui_localizer. Opened http://crbug.com/17380 to track the problem with the menu titles so I can move on to other parts of the UI for now. TEST=The main menu will have some items localized now (and more will be localizable in the TC). BUG=16764 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21272

Patch Set 1 #

Total comments: 14

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 4

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 24

Patch Set 10 : '' #

Patch Set 11 : '' #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+575 lines, -162 lines) Patch
A build/mac/generate_localizer View 1 2 3 4 5 6 7 8 9 10 1 chunk +175 lines, -0 lines 0 comments Download
M chrome/app/chromium_strings.grd View 9 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/app/generated_resources.grd View 9 1 chunk +140 lines, -0 lines 0 comments Download
M chrome/app/google_chrome_strings.grd View 9 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/app/nibs/MainMenu.xib View 7 8 9 62 chunks +70 lines, -70 lines 0 comments Download
M chrome/browser/DEPS View 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -3 lines 0 comments Download
D chrome/browser/cocoa/menu_localizer.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -19 lines 0 comments Download
D chrome/browser/cocoa/menu_localizer.mm View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -33 lines 0 comments Download
A chrome/browser/cocoa/ui_localizer.h View 9 10 1 chunk +31 lines, -0 lines 2 comments Download
A chrome/browser/cocoa/ui_localizer.mm View 9 10 1 chunk +81 lines, -0 lines 3 comments Download
A chrome/browser/cocoa/ui_localizer_unittest.mm View 9 10 1 chunk +46 lines, -0 lines 1 comment Download
M chrome/browser/tab_contents/render_view_context_menu_mac.mm View 9 10 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 7 chunks +24 lines, -10 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
TVL
11 years, 5 months ago (2009-07-20 16:19:01 UTC) #1
TVL
This basic approach is what I'm gonna go after for the strings with the xib ...
11 years, 5 months ago (2009-07-20 16:24:39 UTC) #2
Mark Mentovai
http://codereview.chromium.org/155774/diff/1/2 File build/mac/generate_localizer (right): http://codereview.chromium.org/155774/diff/1/2#newcode18 Line 18: '''// Copyright (c) 2009 The Chromium Authors. All ...
11 years, 5 months ago (2009-07-20 16:34:53 UTC) #3
TVL
I think this gets everything but the generated class name. due to how we do ...
11 years, 5 months ago (2009-07-20 17:09:24 UTC) #4
TVL
ok, updated: added a needed DEPS for checkdeps. did a better class name generation.
11 years, 5 months ago (2009-07-20 19:15:20 UTC) #5
Mark Mentovai
http://codereview.chromium.org/155774/diff/29/30 File build/mac/generate_localizer (right): http://codereview.chromium.org/155774/diff/29/30#newcode30 Line 30: #import <Cocoa/Cocoa.h> I don't think we need this ...
11 years, 5 months ago (2009-07-20 19:29:55 UTC) #6
TVL
fyi - i split the whitespace stuff in chrome.gyp into a different cl along with ...
11 years, 5 months ago (2009-07-20 21:31:12 UTC) #7
TVL
CL description update, new snapshot up. I'd like to go ahead and get this landed ...
11 years, 5 months ago (2009-07-21 20:10:12 UTC) #8
pink (ping after 24hrs)
LGTM with comments below http://codereview.chromium.org/155774/diff/51/1056 File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/155774/diff/51/1056#newcode4212 Line 4212: </message> <!-- os == ...
11 years, 5 months ago (2009-07-21 20:41:38 UTC) #9
Mark Mentovai
Rietveld didn't let me finish reviewing the unit test. http://codereview.chromium.org/155774/diff/51/1054 File build/mac/generate_localizer (right): http://codereview.chromium.org/155774/diff/51/1054#newcode39 Line ...
11 years, 5 months ago (2009-07-21 20:47:53 UTC) #10
pink (ping after 24hrs)
http://codereview.chromium.org/155774/diff/51/1061 File chrome/browser/cocoa/ui_localizer.mm (right): http://codereview.chromium.org/155774/diff/51/1061#newcode16 Line 16: const char16 elipsisUTF16 = 0x2026; this should probably ...
11 years, 5 months ago (2009-07-21 20:53:35 UTC) #11
Mark Mentovai
http://codereview.chromium.org/155774/diff/51/1061 File chrome/browser/cocoa/ui_localizer.mm (right): http://codereview.chromium.org/155774/diff/51/1061#newcode26 Line 26: } else if (('.' == c) && (i ...
11 years, 5 months ago (2009-07-21 21:00:30 UTC) #12
TVL
new diffs up. http://codereview.chromium.org/155774/diff/51/1060 File chrome/browser/cocoa/ui_localizer.h (right): http://codereview.chromium.org/155774/diff/51/1060#newcode15 Line 15: // Remove the window's style ...
11 years, 5 months ago (2009-07-21 21:12:42 UTC) #13
Mark Mentovai
11 years, 5 months ago (2009-07-21 21:23:52 UTC) #14
LGTM

http://codereview.chromium.org/155774/diff/80/1083
File chrome/browser/cocoa/ui_localizer.h (right):

http://codereview.chromium.org/155774/diff/80/1083#newcode15
Line 15: // Remove the window's style accelerator marker and change "..." into
an
Windows-style

http://codereview.chromium.org/155774/diff/80/1083#newcode16
Line 16: // ellipsis and return the result in an autoreleased NSString.
This becomes a run-on at the second "and".

// ellipsis.  Returns the result...

http://codereview.chromium.org/155774/diff/80/1084
File chrome/browser/cocoa/ui_localizer.mm (right):

http://codereview.chromium.org/155774/diff/80/1084#newcode16
Line 16: const char16 ellipsis_utf16 = 0x2026;
pink suggested kEllipsisUTF16 because it's konstant, do you agree?

http://codereview.chromium.org/155774/diff/80/1084#newcode23
Line 23: if (i + 1 < label_len && '&' == label[i + 1]) {
label[i + 1] == '&' to placate pink again.

http://codereview.chromium.org/155774/diff/80/1084#newcode63
Line 63: 
This blank line is not helpful.

http://codereview.chromium.org/155774/diff/80/1085
File chrome/browser/cocoa/ui_localizer_unittest.mm (right):

http://codereview.chromium.org/155774/diff/80/1085#newcode36
Line 36: for (size_t idx = 0; idx < ARRAYSIZE_UNSAFE(data) ; ++idx) {
Nit: consistency with spacing around ;s.

Powered by Google App Engine
This is Rietveld 408576698