Commit 7252caf5 authored by noms's avatar noms Committed by Commit bot

User Person/People instead of User/Users everywhere profile related.

Previously we were only doing this if the --new-avatar-menu was flipped.
This is a two-part CL. This CL removes the usages of the strings, but not
the strings themselves, since that involves some renaming and I'd like
to merge this to M39.

The CL that actually removes the unused strings is:
https://codereview.chromium.org/603023004/

XIB changes: use a different string ID for the profiles menu in the menu bar.
BUG=405988

Review URL: https://codereview.chromium.org/611033002

Cr-Commit-Position: refs/heads/master@{#297222}
parent bceff726
...@@ -1190,7 +1190,7 @@ ...@@ -1190,7 +1190,7 @@
</object> </object>
<object class="NSMenuItem" id="594819081"> <object class="NSMenuItem" id="594819081">
<reference key="NSMenu" ref="6368794"/> <reference key="NSMenu" ref="6368794"/>
<string key="NSTitle">^IDS_PROFILES_OPTIONS_GROUP_NAME</string> <string key="NSTitle">^IDS_NEW_PROFILES_OPTIONS_GROUP_NAME</string>
<string key="NSKeyEquiv"/> <string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int> <int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="657443692"/> <reference key="NSOnImage" ref="657443692"/>
......
...@@ -70,9 +70,7 @@ class Observer : public chrome::BrowserListObserver, ...@@ -70,9 +70,7 @@ class Observer : public chrome::BrowserListObserver,
mainMenuItem_ = item; mainMenuItem_ = item;
base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle: base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:
l10n_util::GetNSStringWithFixup(switches::IsNewAvatarMenu() ? l10n_util::GetNSStringWithFixup(IDS_NEW_PROFILES_OPTIONS_GROUP_NAME)]);
IDS_NEW_PROFILES_OPTIONS_GROUP_NAME :
IDS_PROFILES_OPTIONS_GROUP_NAME)]);
[mainMenuItem_ setSubmenu:menu]; [mainMenuItem_ setSubmenu:menu];
// This object will be constructed as part of nib loading, which happens // This object will be constructed as part of nib loading, which happens
...@@ -112,9 +110,8 @@ class Observer : public chrome::BrowserListObserver, ...@@ -112,9 +110,8 @@ class Observer : public chrome::BrowserListObserver,
return NO; return NO;
if (dock) { if (dock) {
NSString* headerName = l10n_util::GetNSStringWithFixup( NSString* headerName =
switches::IsNewAvatarMenu() ? IDS_NEW_PROFILES_OPTIONS_GROUP_NAME : l10n_util::GetNSStringWithFixup(IDS_NEW_PROFILES_OPTIONS_GROUP_NAME);
IDS_PROFILES_OPTIONS_GROUP_NAME);
base::scoped_nsobject<NSMenuItem> header( base::scoped_nsobject<NSMenuItem> header(
[[NSMenuItem alloc] initWithTitle:headerName [[NSMenuItem alloc] initWithTitle:headerName
action:NULL action:NULL
...@@ -193,20 +190,14 @@ class Observer : public chrome::BrowserListObserver, ...@@ -193,20 +190,14 @@ class Observer : public chrome::BrowserListObserver,
[[self menu] addItem:[NSMenuItem separatorItem]]; [[self menu] addItem:[NSMenuItem separatorItem]];
bool usingNewProfilesUI = switches::IsNewAvatarMenu(); NSMenuItem* item = [self createItemWithTitle:
NSString* editProfileTitle = l10n_util::GetNSStringWithFixup( l10n_util::GetNSStringWithFixup(IDS_PROFILES_MANAGE_BUTTON_LABEL)
usingNewProfilesUI ? IDS_PROFILES_MANAGE_BUTTON_LABEL :
IDS_PROFILES_CUSTOMIZE_PROFILE);
NSString* newProfileTitle = l10n_util::GetNSStringWithFixup(
usingNewProfilesUI ? IDS_NEW_PROFILES_CREATE_NEW_PROFILE_OPTION :
IDS_PROFILES_CREATE_NEW_PROFILE_OPTION);
NSMenuItem* item = [self createItemWithTitle:editProfileTitle
action:@selector(editProfile:)]; action:@selector(editProfile:)];
[[self menu] addItem:item]; [[self menu] addItem:item];
[[self menu] addItem:[NSMenuItem separatorItem]]; [[self menu] addItem:[NSMenuItem separatorItem]];
item = [self createItemWithTitle:newProfileTitle item = [self createItemWithTitle:l10n_util::GetNSStringWithFixup(
IDS_NEW_PROFILES_CREATE_NEW_PROFILE_OPTION)
action:@selector(newProfile:)]; action:@selector(newProfile:)];
[[self menu] addItem:item]; [[self menu] addItem:item];
......
...@@ -193,8 +193,6 @@ BrowserOptionsHandler::~BrowserOptionsHandler() { ...@@ -193,8 +193,6 @@ BrowserOptionsHandler::~BrowserOptionsHandler() {
void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) { void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
DCHECK(values); DCHECK(values);
const bool using_new_profiles_ui = switches::IsNewAvatarMenu();
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
const int device_type_resource_id = chromeos::GetChromeDeviceTypeResourceId(); const int device_type_resource_id = chromeos::GetChromeDeviceTypeResourceId();
#else #else
...@@ -295,15 +293,9 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) { ...@@ -295,15 +293,9 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON }, IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON },
{ "profileAddPersonEnable", IDS_PROFILE_ADD_PERSON_ENABLE }, { "profileAddPersonEnable", IDS_PROFILE_ADD_PERSON_ENABLE },
{ "profileBrowserGuestEnable", IDS_PROFILE_BROWSER_GUEST_ENABLE }, { "profileBrowserGuestEnable", IDS_PROFILE_BROWSER_GUEST_ENABLE },
{ "profilesCreate", using_new_profiles_ui ? { "profilesCreate", IDS_NEW_PROFILES_CREATE_BUTTON_LABEL },
IDS_NEW_PROFILES_CREATE_BUTTON_LABEL : { "profilesDelete", IDS_NEW_PROFILES_DELETE_BUTTON_LABEL },
IDS_PROFILES_CREATE_BUTTON_LABEL }, { "profilesDeleteSingle", IDS_NEW_PROFILES_DELETE_SINGLE_BUTTON_LABEL },
{ "profilesDelete", using_new_profiles_ui ?
IDS_NEW_PROFILES_DELETE_BUTTON_LABEL :
IDS_PROFILES_DELETE_BUTTON_LABEL },
{ "profilesDeleteSingle", using_new_profiles_ui ?
IDS_NEW_PROFILES_DELETE_SINGLE_BUTTON_LABEL :
IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL },
{ "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT }, { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT },
{ "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL }, { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL },
{ "profilesSupervisedDashboardTip", { "profilesSupervisedDashboardTip",
...@@ -325,9 +317,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) { ...@@ -325,9 +317,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
IDS_OPTIONS_SAFEBROWSING_ENABLE_EXTENDED_REPORTING }, IDS_OPTIONS_SAFEBROWSING_ENABLE_EXTENDED_REPORTING },
{ "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME }, { "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME },
{ "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME }, { "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME },
{ "sectionTitleUsers", using_new_profiles_ui ? { "sectionTitleUsers", IDS_NEW_PROFILES_OPTIONS_GROUP_NAME },
IDS_NEW_PROFILES_OPTIONS_GROUP_NAME :
IDS_PROFILES_OPTIONS_GROUP_NAME },
{ "sectionTitleProxy", IDS_OPTIONS_PROXY_GROUP_NAME }, { "sectionTitleProxy", IDS_OPTIONS_PROXY_GROUP_NAME },
{ "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME }, { "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME },
{ "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME }, { "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME },
...@@ -647,7 +637,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) { ...@@ -647,7 +637,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
CommandLine::ForCurrentProcess()->HasSwitch( CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableWebsiteSettingsManager)); switches::kEnableWebsiteSettingsManager));
values->SetBoolean("usingNewProfilesUI", using_new_profiles_ui); values->SetBoolean("usingNewProfilesUI", switches::IsNewAvatarMenu());
} }
#if defined(ENABLE_FULL_PRINTING) #if defined(ENABLE_FULL_PRINTING)
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "chrome/grit/google_chrome_strings.h" #include "chrome/grit/google_chrome_strings.h"
#include "components/signin/core/browser/signin_manager.h" #include "components/signin/core/browser/signin_manager.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_service.h"
#include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui.h"
...@@ -82,8 +81,6 @@ void ManageProfileHandler::GetLocalizedValues( ...@@ -82,8 +81,6 @@ void ManageProfileHandler::GetLocalizedValues(
base::DictionaryValue* localized_strings) { base::DictionaryValue* localized_strings) {
DCHECK(localized_strings); DCHECK(localized_strings);
const bool using_new_profiles_ui = switches::IsNewAvatarMenu();
static OptionsStringResource resources[] = { static OptionsStringResource resources[] = {
{ "manageProfilesNameLabel", IDS_PROFILES_MANAGE_NAME_LABEL }, { "manageProfilesNameLabel", IDS_PROFILES_MANAGE_NAME_LABEL },
{ "manageProfilesDuplicateNameError", { "manageProfilesDuplicateNameError",
...@@ -99,25 +96,19 @@ void ManageProfileHandler::GetLocalizedValues( ...@@ -99,25 +96,19 @@ void ManageProfileHandler::GetLocalizedValues(
IDS_PROFILES_CREATE_SUPERVISED_ACCOUNT_DETAILS_OUT_OF_DATE_LABEL }, IDS_PROFILES_CREATE_SUPERVISED_ACCOUNT_DETAILS_OUT_OF_DATE_LABEL },
{ "manageProfilesSupervisedSignInAgainLink", { "manageProfilesSupervisedSignInAgainLink",
IDS_PROFILES_CREATE_SUPERVISED_SIGN_IN_AGAIN_LINK }, IDS_PROFILES_CREATE_SUPERVISED_SIGN_IN_AGAIN_LINK },
{ "manageProfilesConfirm", using_new_profiles_ui ? IDS_SAVE : IDS_OK }, { "manageProfilesConfirm", IDS_SAVE },
{ "deleteProfileTitle", using_new_profiles_ui ? { "deleteProfileTitle", IDS_NEW_PROFILES_DELETE_TITLE },
IDS_NEW_PROFILES_DELETE_TITLE : IDS_PROFILES_DELETE_TITLE }, { "deleteProfileOK", IDS_NEW_PROFILES_DELETE_OK_BUTTON_LABEL },
{ "deleteProfileOK", using_new_profiles_ui ? { "deleteProfileMessage", IDS_NEW_PROFILES_DELETE_MESSAGE },
IDS_NEW_PROFILES_DELETE_OK_BUTTON_LABEL :
IDS_PROFILES_DELETE_OK_BUTTON_LABEL },
{ "deleteProfileMessage", using_new_profiles_ui ?
IDS_NEW_PROFILES_DELETE_MESSAGE : IDS_PROFILES_DELETE_MESSAGE },
{ "deleteSupervisedProfileAddendum", { "deleteSupervisedProfileAddendum",
IDS_PROFILES_DELETE_SUPERVISED_ADDENDUM }, IDS_PROFILES_DELETE_SUPERVISED_ADDENDUM },
{ "disconnectManagedProfileTitle", { "disconnectManagedProfileTitle",
IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_TITLE }, IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_TITLE },
{ "disconnectManagedProfileOK", { "disconnectManagedProfileOK",
IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_OK_BUTTON_LABEL }, IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_OK_BUTTON_LABEL },
{ "createProfileTitle", using_new_profiles_ui ? { "createProfileTitle", IDS_NEW_PROFILES_CREATE_TITLE },
IDS_NEW_PROFILES_CREATE_TITLE : IDS_PROFILES_CREATE_TITLE },
{ "createProfileInstructions", IDS_PROFILES_CREATE_INSTRUCTIONS }, { "createProfileInstructions", IDS_PROFILES_CREATE_INSTRUCTIONS },
{ "createProfileConfirm", using_new_profiles_ui ? { "createProfileConfirm", IDS_ADD },
IDS_ADD : IDS_PROFILES_CREATE_CONFIRM },
{ "createProfileShortcutCheckbox", IDS_PROFILES_CREATE_SHORTCUT_CHECKBOX }, { "createProfileShortcutCheckbox", IDS_PROFILES_CREATE_SHORTCUT_CHECKBOX },
{ "createProfileShortcutButton", IDS_PROFILES_CREATE_SHORTCUT_BUTTON }, { "createProfileShortcutButton", IDS_PROFILES_CREATE_SHORTCUT_BUTTON },
{ "removeProfileShortcutButton", IDS_PROFILES_REMOVE_SHORTCUT_BUTTON }, { "removeProfileShortcutButton", IDS_PROFILES_REMOVE_SHORTCUT_BUTTON },
...@@ -127,11 +118,9 @@ void ManageProfileHandler::GetLocalizedValues( ...@@ -127,11 +118,9 @@ void ManageProfileHandler::GetLocalizedValues(
RegisterStrings(localized_strings, resources, arraysize(resources)); RegisterStrings(localized_strings, resources, arraysize(resources));
RegisterTitle(localized_strings, "manageProfile", RegisterTitle(localized_strings, "manageProfile",
using_new_profiles_ui ? IDS_NEW_PROFILES_MANAGE_TITLE : IDS_NEW_PROFILES_MANAGE_TITLE);
IDS_PROFILES_MANAGE_TITLE);
RegisterTitle(localized_strings, "createProfile", RegisterTitle(localized_strings, "createProfile",
using_new_profiles_ui ? IDS_NEW_PROFILES_CREATE_TITLE : IDS_NEW_PROFILES_CREATE_TITLE);
IDS_PROFILES_CREATE_TITLE);
localized_strings->SetBoolean("profileShortcutsEnabled", localized_strings->SetBoolean("profileShortcutsEnabled",
ProfileShortcutManager::IsFeatureEnabled()); ProfileShortcutManager::IsFeatureEnabled());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment