summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-03 02:46:02 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-03 02:46:02 +0000
commit336224ac47dd932386feb83e06f525d34754b3f1 (patch)
treeb60f41388351a999160b7e5247fe60e025921b77 /chrome
parentdd23fceb3c4304bd71ba65b63a52ef14252a93ac (diff)
downloadchromium_src-336224ac47dd932386feb83e06f525d34754b3f1.zip
chromium_src-336224ac47dd932386feb83e06f525d34754b3f1.tar.gz
chromium_src-336224ac47dd932386feb83e06f525d34754b3f1.tar.bz2
reland string fixes (r99324)
with fix for linux views unit tests BUG=94828, 95022, 94785 TEST=manual, trybots Review URL: http://codereview.chromium.org/7834004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99518 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd55
-rw-r--r--chrome/browser/resources/ntp4/new_tab.html2
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc9
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc22
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache.cc8
5 files changed, 38 insertions, 58 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index d048f79..f8cca58 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -1083,6 +1083,9 @@ are declared in build/common.gypi.
<message name="IDS_SHOW_BOOKMARK_BAR" desc="The toggle to show the bookmark bar">
&amp;Show bookmarks bar
</message>
+ <message name="IDS_IMPORT_SETTINGS_MENU_LABEL" desc="In sentence case: The app menu label to import bookmarks and settings.">
+ Import bookmarks and settings...
+ </message>
<message name="IDS_PROFILING_ENABLED" desc="The toggle to turn profiling on / off">
&amp;Profiling enabled
</message>
@@ -1133,6 +1136,9 @@ are declared in build/common.gypi.
<message name="IDS_SHOW_BOOKMARK_BAR" desc="In Title Case: The toggle to show the bookmark bar">
&amp;Show Bookmarks Bar
</message>
+ <message name="IDS_IMPORT_SETTINGS_MENU_LABEL" desc="In Title Case: The app menu label to import bookmarks and settings.">
+ Import Bookmarks and Settings...
+ </message>
<message name="IDS_PROFILING_ENABLED" desc="In Title Case: The toggle to turn profiling on / off">
&amp;Profiling Enabled
</message>
@@ -8433,7 +8439,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
Bookmarks
</message>
<message name="IDS_NEW_TAB_BOOKMARKS_MANAGER_LINK_TITLE" desc="The title of the link to invoke the bookmarks manager from the New Tab Page.">
- More...
+ Show all
</message>
<message name="IDS_NEW_TAB_RESTORE_THUMBNAILS_LINK"
desc="The link that restores previously removed thumbnails">
@@ -8545,8 +8551,8 @@ Keep your key file in a safe place. You will need it to create new versions of y
Settings
</message>
<message name="IDS_NEW_TAB_APP_UNINSTALL"
- desc="Text for the button that allows uninstalling an app.">
- Uninstall
+ desc="Text for the trash can that appears when the user drags apps.">
+ Remove from <ph name="SHORT_PRODUCT_NAME">$1<ex>Chrome</ex></ph>
</message>
<message name="IDS_NEW_TAB_APP_OPTIONS"
desc="Text for the button that takes the user to the options of an app.">
@@ -8556,10 +8562,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
desc="Text for the button that creates an app shortcut.">
Create shortcut
</message>
- <message name="IDS_NEW_TAB_TRASH_LABEL"
- desc="Text for the trash can that appears when the user drags apps.">
- Remove from <ph name="SHORT_PRODUCT_NAME">$1<ex>Chrome</ex></ph>.
- </message>
<message name="IDS_NEW_TAB_WEBSTORE_PAGE_TITLE"
desc="Title for the hard coded thumbnail that represents the webstore page. This is used on the NTP when there aren't enough thumbnails to show.">
Apps, Extensions and Themes
@@ -9756,26 +9758,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
</message>
<!-- Customize Sync dialog -->
- <if expr="not pp_ifdef('use_titlecase')">
- <message name="IDS_SYNC_SETUP_CONFIGURE_TITLE" desc="The title of the Customize page of the sync setup dialog.">
- Customize sync preferences
- </message>
- </if>
- <if expr="pp_ifdef('use_titlecase')">
- <message name="IDS_SYNC_SETUP_CONFIGURE_TITLE" desc="In title case: the title of the Customize page of the sync setup dialog.">
- Customize Sync Preferences
- </message>
- </if>
- <if expr="not pp_ifdef('use_titlecase')">
- <message name="IDS_SYNC_CONFIRM_SYNC_PREFERENCES" desc="The title of the 'Confirm Sync Preferences' page of the customize sync dialog.">
- Confirm sync preferences
- </message>
- </if>
- <if expr="pp_ifdef('use_titlecase')">
- <message name="IDS_SYNC_CONFIRM_SYNC_PREFERENCES" desc="In title case: The title of the 'Confirm Sync Preferences' page of the customize sync dialog.">
- Confirm Sync Preferences
- </message>
- </if>
+ <message name="IDS_SYNC_SETUP_CONFIGURE_TITLE" desc="In title case: the title of the Customize page of the sync setup dialog.">
+ Customize Sync Preferences
+ </message>
+ <message name="IDS_SYNC_CONFIRM_SYNC_PREFERENCES" desc="In title case: The title of the 'Confirm Sync Preferences' page of the customize sync dialog.">
+ Confirm Sync Preferences
+ </message>
<message name="IDS_SYNC_SYNC_EVERYTHING" desc="The text of the OK button of the 'Confirm Sync Preferences' page of the customize sync dialog.">
OK, sync everything
</message>
@@ -9927,16 +9915,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> sync makes it easy to share your data (such as bookmarks and preferences) between your computers.
<ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> synchronizes your data by storing it online with Google when you sign in with your Google Account.
</message>
- <if expr="not pp_ifdef('use_titlecase')">
- <message name="IDS_SYNC_SETUP_TITLE" desc="The title of the Sync Setup overlay.">
- Sign in with your Google Account
- </message>
- </if>
- <if expr="pp_ifdef('use_titlecase')">
- <message name="IDS_SYNC_SETUP_TITLE" desc="In title case: The title of the Sync Setup overlay.">
- Sign In With Your Google Account
- </message>
- </if>
+ <message name="IDS_SYNC_SETUP_TITLE" desc="In title case: The title of the Sync Setup overlay.">
+ Sign In With Your Google Account
+ </message>
<message name="IDS_SYNC_LOGIN_SIGNIN_PREFIX" desc="The first part of the sentence that is displayed after the login info">
Sign in with your
</message>
diff --git a/chrome/browser/resources/ntp4/new_tab.html b/chrome/browser/resources/ntp4/new_tab.html
index d641c19..f3e843c 100644
--- a/chrome/browser/resources/ntp4/new_tab.html
+++ b/chrome/browser/resources/ntp4/new_tab.html
@@ -98,7 +98,7 @@ document.documentElement.setAttribute('touchui', true);
</button>
<div id="trash">
- <span i18n-content="trashLabel"></span>
+ <span i18n-content="appuninstall"></span>
</div>
</div>
</div>
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index f785a58..39d570c 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -199,7 +199,7 @@ void BookmarkSubMenuModel::Build(Browser* browser) {
AddCheckItemWithStringId(IDC_SHOW_BOOKMARK_BAR, IDS_SHOW_BOOKMARK_BAR);
AddItemWithStringId(IDC_SHOW_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER);
#if !defined(OS_CHROMEOS)
- AddItemWithStringId(IDC_IMPORT_SETTINGS, IDS_IMPORT_SETTINGS_TITLE);
+ AddItemWithStringId(IDC_IMPORT_SETTINGS, IDS_IMPORT_SETTINGS_MENU_LABEL);
#endif
#if defined(OS_MACOSX)
AddSeparator();
@@ -416,6 +416,10 @@ void WrenchMenuModel::Build() {
AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
#endif
+ bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_));
+ AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU,
+ bookmark_sub_menu_model_.get());
+
AddSeparator();
#if defined(OS_POSIX) && !defined(TOOLKIT_VIEWS)
// WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the
@@ -462,9 +466,6 @@ void WrenchMenuModel::Build() {
AddSeparator();
- bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_));
- AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU,
- bookmark_sub_menu_model_.get());
AddItemWithStringId(IDC_SHOW_HISTORY, IDS_SHOW_HISTORY);
AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS);
AddSeparator();
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc b/chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc
index 2287139..e58773c 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -76,21 +76,21 @@ TEST_F(WrenchMenuModelTest, Basics) {
model.execute_count_ = 0;
model.enable_count_ = 0;
- // Choose something from the tools submenu and make sure it makes it back to
- // the delegate as well. Use the first submenu as the tools one.
- int toolsModelIndex = -1;
+ // Choose something from the bookmark submenu and make sure it makes it back
+ // to the delegate as well.
+ int bookmarksModelIndex = -1;
for (int i = 0; i < itemCount; ++i) {
if (model.GetTypeAt(i) == ui::MenuModel::TYPE_SUBMENU) {
- toolsModelIndex = i;
+ bookmarksModelIndex = i;
break;
}
}
- EXPECT_GT(toolsModelIndex, -1);
- ui::MenuModel* toolsModel = model.GetSubmenuModelAt(toolsModelIndex);
- EXPECT_TRUE(toolsModel);
- EXPECT_GT(toolsModel->GetItemCount(), 2);
- toolsModel->ActivatedAt(2);
- EXPECT_TRUE(toolsModel->IsEnabledAt(2));
+ EXPECT_GT(bookmarksModelIndex, -1);
+ ui::MenuModel* bookmarksModel = model.GetSubmenuModelAt(bookmarksModelIndex);
+ EXPECT_TRUE(bookmarksModel);
+ EXPECT_GT(bookmarksModel->GetItemCount(), 1);
+ bookmarksModel->ActivatedAt(1);
+ EXPECT_TRUE(bookmarksModel->IsEnabledAt(1));
EXPECT_EQ(model.execute_count_, 1);
EXPECT_EQ(model.enable_count_, 1);
}
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 9bdbedd..2e5ca3d 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -337,7 +337,9 @@ void NTPResourceCache::CreateNewTabHTML() {
localized_strings.SetString("appsettings",
l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_SETTINGS));
localized_strings.SetString("appuninstall",
- l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_UNINSTALL));
+ l10n_util::GetStringFUTF16(
+ IDS_NEW_TAB_APP_UNINSTALL,
+ l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
localized_strings.SetString("appoptions",
l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_OPTIONS));
localized_strings.SetString("appcreateshortcut",
@@ -360,10 +362,6 @@ void NTPResourceCache::CreateNewTabHTML() {
l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL));
localized_strings.SetString("syncLinkText",
l10n_util::GetStringUTF16(IDS_SYNC_ADVANCED_OPTIONS));
- localized_strings.SetString("trashLabel",
- l10n_util::GetStringFUTF16(
- IDS_NEW_TAB_TRASH_LABEL,
- l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
localized_strings.SetString("bookmarksManagerLinkTitle",
l10n_util::GetStringUTF16(IDS_NEW_TAB_BOOKMARKS_MANAGER_LINK_TITLE));
#if defined(OS_CHROMEOS)