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 @@
</object>
<object class="NSMenuItem" id="594819081">
<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"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="657443692"/>
......
......@@ -70,9 +70,7 @@ class Observer : public chrome::BrowserListObserver,
mainMenuItem_ = item;
base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:
l10n_util::GetNSStringWithFixup(switches::IsNewAvatarMenu() ?
IDS_NEW_PROFILES_OPTIONS_GROUP_NAME :
IDS_PROFILES_OPTIONS_GROUP_NAME)]);
l10n_util::GetNSStringWithFixup(IDS_NEW_PROFILES_OPTIONS_GROUP_NAME)]);
[mainMenuItem_ setSubmenu:menu];
// This object will be constructed as part of nib loading, which happens
......@@ -112,9 +110,8 @@ class Observer : public chrome::BrowserListObserver,
return NO;
if (dock) {
NSString* headerName = l10n_util::GetNSStringWithFixup(
switches::IsNewAvatarMenu() ? IDS_NEW_PROFILES_OPTIONS_GROUP_NAME :
IDS_PROFILES_OPTIONS_GROUP_NAME);
NSString* headerName =
l10n_util::GetNSStringWithFixup(IDS_NEW_PROFILES_OPTIONS_GROUP_NAME);
base::scoped_nsobject<NSMenuItem> header(
[[NSMenuItem alloc] initWithTitle:headerName
action:NULL
......@@ -193,20 +190,14 @@ class Observer : public chrome::BrowserListObserver,
[[self menu] addItem:[NSMenuItem separatorItem]];
bool usingNewProfilesUI = switches::IsNewAvatarMenu();
NSString* editProfileTitle = l10n_util::GetNSStringWithFixup(
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
NSMenuItem* item = [self createItemWithTitle:
l10n_util::GetNSStringWithFixup(IDS_PROFILES_MANAGE_BUTTON_LABEL)
action:@selector(editProfile:)];
[[self menu] addItem:item];
[[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:)];
[[self menu] addItem:item];
......
......@@ -193,8 +193,6 @@ BrowserOptionsHandler::~BrowserOptionsHandler() {
void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
DCHECK(values);
const bool using_new_profiles_ui = switches::IsNewAvatarMenu();
#if defined(OS_CHROMEOS)
const int device_type_resource_id = chromeos::GetChromeDeviceTypeResourceId();
#else
......@@ -295,15 +293,9 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON },
{ "profileAddPersonEnable", IDS_PROFILE_ADD_PERSON_ENABLE },
{ "profileBrowserGuestEnable", IDS_PROFILE_BROWSER_GUEST_ENABLE },
{ "profilesCreate", using_new_profiles_ui ?
IDS_NEW_PROFILES_CREATE_BUTTON_LABEL :
IDS_PROFILES_CREATE_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 },
{ "profilesCreate", IDS_NEW_PROFILES_CREATE_BUTTON_LABEL },
{ "profilesDelete", IDS_NEW_PROFILES_DELETE_BUTTON_LABEL },
{ "profilesDeleteSingle", IDS_NEW_PROFILES_DELETE_SINGLE_BUTTON_LABEL },
{ "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT },
{ "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL },
{ "profilesSupervisedDashboardTip",
......@@ -325,9 +317,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
IDS_OPTIONS_SAFEBROWSING_ENABLE_EXTENDED_REPORTING },
{ "sectionTitleAppearance", IDS_APPEARANCE_GROUP_NAME },
{ "sectionTitleDefaultBrowser", IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME },
{ "sectionTitleUsers", using_new_profiles_ui ?
IDS_NEW_PROFILES_OPTIONS_GROUP_NAME :
IDS_PROFILES_OPTIONS_GROUP_NAME },
{ "sectionTitleUsers", IDS_NEW_PROFILES_OPTIONS_GROUP_NAME },
{ "sectionTitleProxy", IDS_OPTIONS_PROXY_GROUP_NAME },
{ "sectionTitleSearch", IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME },
{ "sectionTitleStartup", IDS_OPTIONS_STARTUP_GROUP_NAME },
......@@ -647,7 +637,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableWebsiteSettingsManager));
values->SetBoolean("usingNewProfilesUI", using_new_profiles_ui);
values->SetBoolean("usingNewProfilesUI", switches::IsNewAvatarMenu());
}
#if defined(ENABLE_FULL_PRINTING)
......
......@@ -34,7 +34,6 @@
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/google_chrome_strings.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/notification_service.h"
#include "content/public/browser/web_ui.h"
......@@ -82,8 +81,6 @@ void ManageProfileHandler::GetLocalizedValues(
base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
const bool using_new_profiles_ui = switches::IsNewAvatarMenu();
static OptionsStringResource resources[] = {
{ "manageProfilesNameLabel", IDS_PROFILES_MANAGE_NAME_LABEL },
{ "manageProfilesDuplicateNameError",
......@@ -99,25 +96,19 @@ void ManageProfileHandler::GetLocalizedValues(
IDS_PROFILES_CREATE_SUPERVISED_ACCOUNT_DETAILS_OUT_OF_DATE_LABEL },
{ "manageProfilesSupervisedSignInAgainLink",
IDS_PROFILES_CREATE_SUPERVISED_SIGN_IN_AGAIN_LINK },
{ "manageProfilesConfirm", using_new_profiles_ui ? IDS_SAVE : IDS_OK },
{ "deleteProfileTitle", using_new_profiles_ui ?
IDS_NEW_PROFILES_DELETE_TITLE : IDS_PROFILES_DELETE_TITLE },
{ "deleteProfileOK", using_new_profiles_ui ?
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 },
{ "manageProfilesConfirm", IDS_SAVE },
{ "deleteProfileTitle", IDS_NEW_PROFILES_DELETE_TITLE },
{ "deleteProfileOK", IDS_NEW_PROFILES_DELETE_OK_BUTTON_LABEL },
{ "deleteProfileMessage", IDS_NEW_PROFILES_DELETE_MESSAGE },
{ "deleteSupervisedProfileAddendum",
IDS_PROFILES_DELETE_SUPERVISED_ADDENDUM },
{ "disconnectManagedProfileTitle",
IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_TITLE },
{ "disconnectManagedProfileOK",
IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_OK_BUTTON_LABEL },
{ "createProfileTitle", using_new_profiles_ui ?
IDS_NEW_PROFILES_CREATE_TITLE : IDS_PROFILES_CREATE_TITLE },
{ "createProfileTitle", IDS_NEW_PROFILES_CREATE_TITLE },
{ "createProfileInstructions", IDS_PROFILES_CREATE_INSTRUCTIONS },
{ "createProfileConfirm", using_new_profiles_ui ?
IDS_ADD : IDS_PROFILES_CREATE_CONFIRM },
{ "createProfileConfirm", IDS_ADD },
{ "createProfileShortcutCheckbox", IDS_PROFILES_CREATE_SHORTCUT_CHECKBOX },
{ "createProfileShortcutButton", IDS_PROFILES_CREATE_SHORTCUT_BUTTON },
{ "removeProfileShortcutButton", IDS_PROFILES_REMOVE_SHORTCUT_BUTTON },
......@@ -127,11 +118,9 @@ void ManageProfileHandler::GetLocalizedValues(
RegisterStrings(localized_strings, resources, arraysize(resources));
RegisterTitle(localized_strings, "manageProfile",
using_new_profiles_ui ? IDS_NEW_PROFILES_MANAGE_TITLE :
IDS_PROFILES_MANAGE_TITLE);
IDS_NEW_PROFILES_MANAGE_TITLE);
RegisterTitle(localized_strings, "createProfile",
using_new_profiles_ui ? IDS_NEW_PROFILES_CREATE_TITLE :
IDS_PROFILES_CREATE_TITLE);
IDS_NEW_PROFILES_CREATE_TITLE);
localized_strings->SetBoolean("profileShortcutsEnabled",
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