Remove some dependencies from //chrome to ash_strings
Some strings are only used by //chrome and can be moved to //chrome/app
string targets. Some are used by //chrome and //ash and are moved to
//chromeos/chromeos_strings.grd
Bug: 756095
Change-Id: If7b3b89486035d36505f6d133b35593d10570f20
Reviewed-on: https://chromium-review.googlesource.com/1213585
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: James Cook <[email protected]>
Commit-Queue: Evan Stade <[email protected]>
Cr-Commit-Position: refs/heads/master@{#591494}
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index c90a9f51b..7b6d03b 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -1368,6 +1368,7 @@
"//chromeos/components/proximity_auth/logging",
"//chromeos/services/assistant/public/mojom",
"//chromeos/services/multidevice_setup/public/mojom",
+ "//chromeos/strings",
"//components/account_id",
"//components/device_event_log",
"//components/discardable_memory/service",
@@ -1412,7 +1413,6 @@
"//ui/chromeos",
"//ui/chromeos/events",
"//ui/chromeos/resources",
- "//ui/chromeos/strings",
"//ui/compositor",
"//ui/compositor_extra",
"//ui/display",
@@ -2423,6 +2423,7 @@
sources = [
"$root_gen_dir/ash/components/resources/ash_components_resources_100_percent.pak",
"$root_gen_dir/ash/strings/ash_strings_en-US.pak",
+ "$root_gen_dir/chromeos/strings/chromeos_strings_en-US.pak",
"$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_100_percent.pak",
"$root_gen_dir/ui/chromeos/strings/ui_chromeos_strings_en-US.pak",
"$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
@@ -2433,6 +2434,7 @@
deps = [
"//ash/components/resources",
"//ash/strings",
+ "//chromeos/strings",
"//ui/chromeos/resources",
"//ui/chromeos/strings",
"//ui/resources",
diff --git a/ash/DEPS b/ash/DEPS
index 9a98b4b0..bab1a63 100644
--- a/ash/DEPS
+++ b/ash/DEPS
@@ -83,6 +83,7 @@
"+chromeos/services/multidevice_setup/public",
# TODO(jamescook): Eliminate this. http://crbug.com/644361
"+chromeos/settings/timezone_settings.h",
+ "+chromeos/strings",
"+chromeos/system",
# InputMethodManager lives in the browser process. Use ImeController.
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd
index b5de6f1f..d85eee2 100644
--- a/ash/ash_strings.grd
+++ b/ash/ash_strings.grd
@@ -129,13 +129,6 @@
<ph> element). You can also use the 'grit add' tool to help you identify
nontranslateable parts and create placeholders for them. -->
- <!-- TODO(zork): Only include these in Aura builds -->
- <message name="IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE" desc="The title used for the Ash Launcher in the Shelf (not mentioning 'Apps' since this is a general launcher).">
- Launcher
- </message>
- <message name="IDS_ASH_SHELF_APP_LIST_LAUNCHER_SYNCING_TITLE" desc="The title used for the Ash Launcher in the Shelf to indicate loading/syncinc apps.">
- Launcher (syncing apps...)
- </message>
<message name="IDS_ASH_SHELF_BACK_BUTTON_TITLE" desc="The title used for the back button on the Shelf, which is avaliable in tablet mode.">
Back
</message>
@@ -164,32 +157,6 @@
Shelf
</message>
- <!-- Shelf buttons -->
- <message name="IDS_ASH_SHELF_SHUTDOWN_BUTTON" desc="Text shown on shutdown button on login/lock screen.">
- Shut down
- </message>
- <message name="IDS_ASH_SHELF_RESTART_BUTTON" desc="Text shown on restart button on login/lock screen.">
- Restart
- </message>
- <message name="IDS_ASH_SHELF_UNLOCK_BUTTON" desc="Text shown on unlock button on lock screen.">
- Unlock
- </message>
- <message name="IDS_ASH_SHELF_SIGN_OUT_BUTTON" desc="Text shown on sign out button on lock screen.">
- Sign out
- </message>
- <message name="IDS_ASH_SHELF_CANCEL_BUTTON" desc="Text shown on cancel button on add user screen.">
- Cancel
- </message>
- <message name="IDS_ASH_BROWSE_AS_GUEST_BUTTON" desc="Text shown on Chrome OS sign-in screen button that launches guest session. Should be short.">
- Browse as Guest
- </message>
- <message name="IDS_ASH_ADD_USER_BUTTON" desc="Text shown on an add user button on login/locker screen">
- Add Person
- </message>
- <message name="IDS_ASH_SHELF_APPS_BUTTON" desc="Text shown on apps button on login screen.">
- Apps
- </message>
-
<message name="IDS_ASH_KEYBOARD_OVERLAY_TITLE" desc="The title of the keyboard overlay.">
Keyboard overlay
</message>
@@ -570,17 +537,6 @@
Do not disturb
</message>
- <!-- Status tray enterprise management. -->
- <message name="IDS_ASH_ENTERPRISE_DEVICE_MANAGED_BY" desc="Text for notifications showing that this device is enterpise managed. Used when the organization's domain name is available.">
- This device is managed by <ph name="DOMAIN">$1<ex>acmecorp.com</ex></ph>.
- </message>
- <message name="IDS_ASH_ENTERPRISE_DEVICE_MANAGED" desc="Text for notifications showing that this device is enterprise managed. Used when the organization's domain name is not available (e.g. Active Directory).">
- This device is enterprise managed
- </message>
- <message name="IDS_ASH_ENTERPRISE_DEVICE_MANAGED_SHORT" desc="Short text showing that the device is enterprise managed.">
- Managed
- </message>
-
<!-- Status tray supervised users. -->
<message name="IDS_ASH_STATUS_TRAY_SUPERVISED_LABEL" desc="Label shown instead of email for supervised users">
Supervised user
@@ -1222,9 +1178,6 @@
<message name="IDS_ASH_STATUS_TRAY_NETWORK_MOBILE_DISABLED" desc="The message to display in the network list when mobile data is turned off.">
Mobile data is turned off.
</message>
- <message name="IDS_ASH_STATUS_TRAY_ENABLE_BLUETOOTH" desc="The message to display in the network list when Tether is enabled but Bluetooth is disabled.">
- Turn on Bluetooth to discover nearby devices
- </message>
<message name="IDS_ASH_STATUS_TRAY_VPN_DISCONNECTED" desc="The label used in system tray bubble to display vpn is disconnected.">
VPN disconnected
</message>
@@ -1707,28 +1660,6 @@
To get the update, use the touchscreen to restart your Chromebook with the keyboard attached.
</message>
- <!-- Mojo service names (displayed in task manager) -->
- <message name="IDS_ASH_ASH_SERVICE_NAME" desc="Name of the internal software service that manages windows. Appears in the task manager.">
- Window manager
- </message>
- <!-- TODO(jamescook): Move next to font service code. -->
- <message name="IDS_ASH_FONT_SERVICE_NAME" desc="Name of the internal software service that provides fonts. Appears in the task manager.">
- Font service
- </message>
- <message name="IDS_ASH_QUICK_LAUNCH_APP_NAME" desc="Name of the app used to launch other apps by typing an app name. Appears in the task manager.">
- Quick launch
- </message>
- <message name="IDS_ASH_SHORTCUT_VIEWER_APP_NAME" desc="Name of the app that shows the list of keyboard shortcuts. Appears in the task manager.">
- Shortcut viewer
- </message>
- <message name="IDS_ASH_TAP_VISUALIZER_APP_NAME" desc="Name of the app that displays touch tap points on the screen. Appears in the task manager.">
- Show taps
- </message>
- <!-- TODO(jamescook): Remove when mash switches to ws2. -->
- <message name="IDS_ASH_UI_SERVICE_NAME" desc="Name of the internal software service that manages the user interface (UI). Appears in the task manager.">
- UI service
- </message>
-
<!-- Assistant -->
<message name="IDS_ASH_ASSISTANT_DIALOG_PLATE_HINT" desc="Message shown as a placeholder in Assistant's input textfield when empty.">
Type a message
@@ -1754,18 +1685,6 @@
<message name="IDS_ASH_ASSISTANT_NOTIFICATION_DISPLAY_SOURCE" desc="The name for the source of the assistant notification.">
Assistant
</message>
- <message name="IDS_ASH_SETTINGS_LOCK_SCREEN_NOTIFICATION_TITLE" desc="The title of options to change the behavior of notifications on the lock screen.">
- On the lock screen
- </message>
- <message name="IDS_ASH_SETTINGS_LOCK_SCREEN_NOTIFICATION_SHOW" desc="One of options of the lock screen notification mode to show all the notifications and its contents on the lock screen.">
- Show all notification content
- </message>
- <message name="IDS_ASH_SETTINGS_LOCK_SCREEN_NOTIFICATION_HIDE" desc="One of options of the lock screen notification mode to hide all the notifications on the lock screen.">
- Don't show notifications at all
- </message>
- <message name="IDS_ASH_SETTINGS_LOCK_SCREEN_NOTIFICATION_HIDE_SENSITIVE" desc="One of options of the lock screen notification mode to hide sensitive contents and show the others on the lock screen.">
- Hide sensitive content
- </message>
<message name="IDS_ASH_ASSISTANT_OPT_IN_UNLOCK_MORE_FEATURES" desc="Message shown in Assistant UI when the user is opted out to promote an opted in experience.">
Unlock more Assistant features.
</message>
diff --git a/ash/public/cpp/power_utils.cc b/ash/public/cpp/power_utils.cc
index 467e6a3a..7178cfe 100644
--- a/ash/public/cpp/power_utils.cc
+++ b/ash/public/cpp/power_utils.cc
@@ -6,8 +6,6 @@
#include "base/time/time.h"
#include "chromeos/dbus/power_manager/power_supply_properties.pb.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/chromeos/strings/grit/ui_chromeos_strings.h"
namespace ash {
@@ -38,40 +36,6 @@
*minutes = total_minutes % 60;
}
-base::string16 PowerSourceToDisplayString(
- const power_manager::PowerSupplyProperties_PowerSource& source) {
- auto source_to_id = [](const power_manager::PowerSupplyProperties_PowerSource&
- source) {
- switch (source.port()) {
- case power_manager::PowerSupplyProperties_PowerSource_Port_UNKNOWN:
- return IDS_POWER_SOURCE_PORT_UNKNOWN;
- case power_manager::PowerSupplyProperties_PowerSource_Port_LEFT:
- return IDS_POWER_SOURCE_PORT_LEFT;
- case power_manager::PowerSupplyProperties_PowerSource_Port_RIGHT:
- return IDS_POWER_SOURCE_PORT_RIGHT;
- case power_manager::PowerSupplyProperties_PowerSource_Port_BACK:
- return IDS_POWER_SOURCE_PORT_BACK;
- case power_manager::PowerSupplyProperties_PowerSource_Port_FRONT:
- return IDS_POWER_SOURCE_PORT_FRONT;
- case power_manager::PowerSupplyProperties_PowerSource_Port_LEFT_FRONT:
- return IDS_POWER_SOURCE_PORT_LEFT_FRONT;
- case power_manager::PowerSupplyProperties_PowerSource_Port_LEFT_BACK:
- return IDS_POWER_SOURCE_PORT_LEFT_BACK;
- case power_manager::PowerSupplyProperties_PowerSource_Port_RIGHT_FRONT:
- return IDS_POWER_SOURCE_PORT_RIGHT_FRONT;
- case power_manager::PowerSupplyProperties_PowerSource_Port_RIGHT_BACK:
- return IDS_POWER_SOURCE_PORT_RIGHT_BACK;
- case power_manager::PowerSupplyProperties_PowerSource_Port_BACK_LEFT:
- return IDS_POWER_SOURCE_PORT_BACK_LEFT;
- case power_manager::PowerSupplyProperties_PowerSource_Port_BACK_RIGHT:
- return IDS_POWER_SOURCE_PORT_BACK_RIGHT;
- }
- NOTREACHED();
- return 0;
- };
- return l10n_util::GetStringUTF16(source_to_id(source));
-}
-
} // namespace power_utils
} // namespace ash
diff --git a/ash/public/cpp/power_utils.h b/ash/public/cpp/power_utils.h
index a7146eb..a3e62f4c 100644
--- a/ash/public/cpp/power_utils.h
+++ b/ash/public/cpp/power_utils.h
@@ -6,16 +6,11 @@
#define ASH_PUBLIC_CPP_POWER_UTILS_H_
#include "ash/public/cpp/ash_public_export.h"
-#include "base/strings/string16.h"
namespace base {
class TimeDelta;
}
-namespace power_manager {
-class PowerSupplyProperties_PowerSource;
-}
-
namespace ash {
namespace power_utils {
@@ -36,9 +31,6 @@
int* hours,
int* minutes);
-base::string16 ASH_PUBLIC_EXPORT PowerSourceToDisplayString(
- const power_manager::PowerSupplyProperties_PowerSource& source);
-
} // namespace power_utils
} // namespace ash
diff --git a/ash/shelf/app_list_button.cc b/ash/shelf/app_list_button.cc
index e77d8e3..59c3fa47 100644
--- a/ash/shelf/app_list_button.cc
+++ b/ash/shelf/app_list_button.cc
@@ -21,7 +21,6 @@
#include "ash/shelf/shelf_view.h"
#include "ash/shell.h"
#include "ash/shell_state.h"
-#include "ash/strings/grit/ash_strings.h"
#include "ash/system/tray/tray_popup_utils.h"
#include "ash/voice_interaction/voice_interaction_controller.h"
#include "base/command_line.h"
@@ -30,6 +29,7 @@
#include "base/metrics/user_metrics_action.h"
#include "base/timer/timer.h"
#include "chromeos/chromeos_switches.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "components/account_id/account_id.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/ash/shelf/login_shelf_view.cc b/ash/shelf/login_shelf_view.cc
index 95022940..dbb063a 100644
--- a/ash/shelf/login_shelf_view.cc
+++ b/ash/shelf/login_shelf_view.cc
@@ -32,6 +32,7 @@
#include "ash/tray_action/tray_action.h"
#include "ash/wm/lock_state_controller.h"
#include "base/metrics/user_metrics.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "skia/ext/image_operations.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/ash/shelf/shelf_controller.cc b/ash/shelf/shelf_controller.cc
index eb83793b..af96c81 100644
--- a/ash/shelf/shelf_controller.cc
+++ b/ash/shelf/shelf_controller.cc
@@ -20,7 +20,7 @@
#include "ash/system/message_center/arc/arc_notification_constants.h"
#include "ash/wm/tablet_mode/tablet_mode_controller.h"
#include "base/auto_reset.h"
-#include "base/strings/utf_string_conversions.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_change_registrar.h"
#include "components/prefs/pref_registry_simple.h"
diff --git a/ash/strings/BUILD.gn b/ash/strings/BUILD.gn
index adf6aff..ea3e60d0 100644
--- a/ash/strings/BUILD.gn
+++ b/ash/strings/BUILD.gn
@@ -81,6 +81,7 @@
sources = [
"$root_gen_dir/ash/components/strings/ash_components_strings_${locale}.pak",
"$root_gen_dir/ash/strings/ash_strings_${locale}.pak",
+ "$root_gen_dir/chromeos/strings/chromeos_strings_${locale}.pak",
"$root_gen_dir/components/strings/components_strings_${locale}.pak",
"$root_gen_dir/device/bluetooth/strings/bluetooth_strings_${locale}.pak",
"$root_gen_dir/ui/chromeos/strings/ui_chromeos_strings_${locale}.pak",
@@ -91,6 +92,7 @@
deps = [
"//ash/components/strings",
"//ash/strings",
+ "//chromeos/strings",
"//components/strings",
"//device/bluetooth/strings",
"//ui/chromeos/strings",
diff --git a/ash/system/DEPS b/ash/system/DEPS
index e5f2f91..158ad04 100644
--- a/ash/system/DEPS
+++ b/ash/system/DEPS
@@ -3,5 +3,4 @@
"+components/device_event_log/device_event_log.h",
"+components/prefs",
"+grit/ui_chromeos_resources.h",
- "+grit/ui_chromeos_strings.h",
]
diff --git a/ash/system/enterprise/tray_enterprise.cc b/ash/system/enterprise/tray_enterprise.cc
index 3b9bd98..4638136 100644
--- a/ash/system/enterprise/tray_enterprise.cc
+++ b/ash/system/enterprise/tray_enterprise.cc
@@ -16,6 +16,7 @@
#include "base/logging.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "ui/base/l10n/l10n_util.h"
namespace ash {
diff --git a/ash/system/network/network_list.cc b/ash/system/network/network_list.cc
index 044f63b..d1f91c6 100644
--- a/ash/system/network/network_list.cc
+++ b/ash/system/network/network_list.cc
@@ -44,6 +44,7 @@
#include "chromeos/network/network_state_handler.h"
#include "chromeos/network/network_state_handler_observer.h"
#include "chromeos/network/proxy/ui_proxy_config_service.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "components/device_event_log/device_event_log.h"
#include "components/onc/onc_constants.h"
#include "components/vector_icons/vector_icons.h"
@@ -326,7 +327,7 @@
// Bluetooth' if Tether is available but not initialized, otherwise
// show 'no networks'.
if (tether_state == NetworkStateHandler::TECHNOLOGY_UNINITIALIZED)
- subtitle = IDS_ASH_STATUS_TRAY_ENABLE_BLUETOOTH;
+ subtitle = IDS_ENABLE_BLUETOOTH;
else
subtitle = IDS_ASH_STATUS_TRAY_NO_MOBILE_NETWORKS;
}
diff --git a/ash/system/unified/unified_system_info_view.cc b/ash/system/unified/unified_system_info_view.cc
index 4b3b617..d829767 100644
--- a/ash/system/unified/unified_system_info_view.cc
+++ b/ash/system/unified/unified_system_info_view.cc
@@ -22,6 +22,7 @@
#include "base/i18n/time_formatting.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/animation/ink_drop_highlight.h"
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp
index 99b6bd6..ef19959 100644
--- a/chrome/app/chromeos_strings.grdp
+++ b/chrome/app/chromeos_strings.grdp
@@ -3600,12 +3600,6 @@
<message name="IDS_ASSISTANT_ACTIVITY_CONTROL_POPUP_LINK" desc="Link text for activity control details popup.">
Learn more
</message>
- <message name="IDS_ASSISTANT_TIMER_NOTIFICATION_TITLE" desc="Title for assistant timer notification.">
- Timer done
- </message>
- <message name="IDS_ASSISTANT_STOP_TIMER_QUERY" desc="Query for stopping assistant timer.">
- stop timer
- </message>
<!-- Print Job Notification -->
<message name="IDS_PRINT_JOB_NOTIFICATION_DISPLAY_SOURCE" desc="The context title of printing notification.">
@@ -4198,4 +4192,55 @@
<message name="IDS_OOBE_FINGERPINT_SETUP_SCREEN_INSTRUCTION_TRY_AGAIN" desc="Text in the fingerprint setup screen telling users what to scan their finger again.">
Try again.
</message>
+
+ <!-- Mojo service names (displayed in task manager) -->
+ <message name="IDS_ASH_ASH_SERVICE_NAME" desc="Name of the internal software service that manages windows. Appears in the task manager.">
+ Window manager
+ </message>
+ <message name="IDS_ASH_QUICK_LAUNCH_APP_NAME" desc="Name of the app used to launch other apps by typing an app name. Appears in the task manager.">
+ Quick launch
+ </message>
+ <message name="IDS_ASH_SHORTCUT_VIEWER_APP_NAME" desc="Name of the app that shows the list of keyboard shortcuts. Appears in the task manager.">
+ Shortcut viewer
+ </message>
+ <message name="IDS_ASH_TAP_VISUALIZER_APP_NAME" desc="Name of the app that displays touch tap points on the screen. Appears in the task manager.">
+ Show taps
+ </message>
+ <message name="IDS_ASH_UI_SERVICE_NAME" desc="Name of the internal software service that manages the user interface (UI). Appears in the task manager.">
+ UI service
+ </message>
+
+ <message name="IDS_POWER_SOURCE_PORT_LEFT" desc="The text identifying an external device, when that device is connected to the USB Type-C port on the left side of this device.">
+ USB-C device (left port)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_RIGHT" desc="The text identifying an external device, when that device is connected to the USB Type-C port on the right side of this device.">
+ USB-C device (right port)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_BACK" desc="The text identifying an external device, when that device is connected to the USB Type-C port on the back of this device.">
+ USB-C device (rear port)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_FRONT" desc="The text identifying an external device, when that device is connected to the USB Type-C port on the front of this device.">
+ USB-C device (front port)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_LEFT_FRONT" desc="The text identifying an external device, when that device is connected to a USB Type-C port on the left side of this device. In this case there are two ports on that side, so this text should refer to the front one on that side.">
+ USB-C device (left side front port)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_LEFT_BACK" desc="The text identifying an external device, when that device is connected to a USB Type-C port on the left side of this device. In this case there are two ports on that side, so this text should refer to the back one on that side.">
+ USB-C device (left side back port)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_RIGHT_FRONT" desc="The text identifying an external device, when that device is connected to a USB Type-C port on the right side of this device. In this case there are two ports on that side, so this text should refer to the front one on that side.">
+ USB-C device (right side front port)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_RIGHT_BACK" desc="The text identifying an external device, when that device is connected to a USB Type-C port on the right side of this device. In this case there are two ports on that side, so this text should refer to the back one on that side.">
+ USB-C device (right side back port)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_BACK_LEFT" desc="The text identifying an external device, when that device is connected to a USB Type-C port on the back of this device. In this case there are two ports on the back, so this text should refer to the one on the left.">
+ USB-C device (left port in the back)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_BACK_RIGHT" desc="The text identifying an external device, when that device is connected to a USB Type-C port on the back of this device. In this case there are two ports on the back, so this text should refer to the one on the right.">
+ USB-C device (right port in the back)
+ </message>
+ <message name="IDS_POWER_SOURCE_PORT_UNKNOWN" desc="The text referring to the device to charge from, when its port location cannot be determined.">
+ USB-C device
+ </message>
</grit-part>
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
index b4a7704..8d85a32 100644
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -4438,4 +4438,19 @@
<message name="IDS_PAGE_NOT_AVAILABLE_FOR_GUEST_HEADING" desc="This is the heading for the page not available for guest.">
<ph name="PAGE_NAME">$1<ex>Bookmarks</ex></ph> is not available to Guest users.
</message>
+
+ <if expr="chromeos">
+ <message name="IDS_ASH_SETTINGS_LOCK_SCREEN_NOTIFICATION_TITLE" desc="The title of options to change the behavior of notifications on the lock screen.">
+ On the lock screen
+ </message>
+ <message name="IDS_ASH_SETTINGS_LOCK_SCREEN_NOTIFICATION_SHOW" desc="One of options of the lock screen notification mode to show all the notifications and its contents on the lock screen.">
+ Show all notification content
+ </message>
+ <message name="IDS_ASH_SETTINGS_LOCK_SCREEN_NOTIFICATION_HIDE" desc="One of options of the lock screen notification mode to hide all the notifications on the lock screen.">
+ Don't show notifications at all
+ </message>
+ <message name="IDS_ASH_SETTINGS_LOCK_SCREEN_NOTIFICATION_HIDE_SENSITIVE" desc="One of options of the lock screen notification mode to hide sensitive contents and show the others on the lock screen.">
+ Hide sensitive content
+ </message>
+ </if>
</grit-part>
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index ce1e8ce..ee0d8f1 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3117,6 +3117,7 @@
"//chromeos/services/multidevice_setup/public/mojom",
"//chromeos/services/secure_channel",
"//chromeos/services/secure_channel/public/mojom",
+ "//chromeos/strings",
"//components/services/font:lib",
"//components/services/font/public/interfaces",
"//services/ws:lib",
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index 3ece52b..ad7bbdd 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -93,8 +93,6 @@
# interfaces in //ash/public/interfaces. See //ash/README.md.
"-ash",
"+ash/public",
- # Ash string IDs can be used in src/chrome.
- "+ash/strings/grit/ash_strings.h",
"+ash/components/quick_launch/public/mojom",
"+ash/components/shortcut_viewer/public/mojom",
"+ash/components/tap_visualizer/public/mojom",
@@ -220,7 +218,6 @@
# The following are needed for classic mode to create the WindowService.
# Once Ash runs out of process no longer needed.
"+ash/shell.h",
- "+ash/strings/grit/ash_strings.h",
# Needed for classic mode.
"+ash/ash_service.h",
diff --git a/chrome/browser/ash_service_registry.cc b/chrome/browser/ash_service_registry.cc
index 47afd07..0a694395 100644
--- a/chrome/browser/ash_service_registry.cc
+++ b/chrome/browser/ash_service_registry.cc
@@ -11,14 +11,13 @@
#include "ash/public/cpp/window_properties.h"
#include "ash/public/interfaces/constants.mojom.h"
#include "ash/public/interfaces/window_properties.mojom.h"
-#include "ash/shell.h"
-#include "ash/strings/grit/ash_strings.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "chrome/browser/chromeos/accessibility/ax_host_service.h"
#include "chrome/browser/chromeos/prefs/pref_connector_service.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/common/service_manager_connection.h"
#include "services/ws/public/mojom/constants.mojom.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index e5a8cad..dc6a4b5 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -33,6 +33,7 @@
"//chromeos:power_manager_proto",
"//chromeos:seneschal_proto",
"//chromeos:vm_applications_apps_proto",
+ "//chromeos/strings",
"//components/policy/proto",
"//content/app/resources",
"//ui/accessibility/mojom",
diff --git a/chrome/browser/chromeos/login/version_info_updater.cc b/chrome/browser/chromeos/login/version_info_updater.cc
index 1207701..4ec917a 100644
--- a/chrome/browser/chromeos/login/version_info_updater.cc
+++ b/chrome/browser/chromeos/login/version_info_updater.cc
@@ -6,7 +6,6 @@
#include <vector>
-#include "ash/strings/grit/ash_strings.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/macros.h"
@@ -21,6 +20,7 @@
#include "chrome/grit/generated_resources.h"
#include "chromeos/dbus/util/version_loader.h"
#include "chromeos/settings/cros_settings_names.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "chromeos/system/statistics_provider.h"
#include "components/version_info/version_info.h"
#include "device/bluetooth/bluetooth_adapter.h"
diff --git a/chrome/browser/chromeos/shutdown_policy_browsertest.cc b/chrome/browser/chromeos/shutdown_policy_browsertest.cc
index 06b0054..4cca90d 100644
--- a/chrome/browser/chromeos/shutdown_policy_browsertest.cc
+++ b/chrome/browser/chromeos/shutdown_policy_browsertest.cc
@@ -10,13 +10,13 @@
#include "ash/public/cpp/ash_view_ids.h"
#include "ash/public/interfaces/constants.mojom.h"
#include "ash/public/interfaces/system_tray_test_api.mojom.h"
-#include "ash/strings/grit/ash_strings.h"
#include "base/command_line.h"
#include "base/location.h"
#include "base/macros.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/lock/screen_locker.h"
@@ -41,7 +41,6 @@
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "services/service_manager/public/cpp/connector.h"
-#include "ui/base/l10n/l10n_util.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/views/view.h"
@@ -167,21 +166,21 @@
// Returns true if the shutdown button's tooltip matches the text of the
// resource |message_id|.
- bool HasShutdownButtonTooltip(int message_id) {
+ bool HasShutdownButtonTooltip(const std::string& tooltip) {
ash::mojom::SystemTrayTestApiAsyncWaiter wait_for(tray_test_api_.get());
base::string16 actual_tooltip;
wait_for.GetBubbleViewTooltip(ash::VIEW_ID_POWER_BUTTON, &actual_tooltip);
- return l10n_util::GetStringUTF16(message_id) == actual_tooltip;
+ return base::UTF8ToUTF16(tooltip) == actual_tooltip;
}
private:
DISALLOW_COPY_AND_ASSIGN(ShutdownPolicyInSessionTest);
};
-// Tests that by default the shutdown button tooltip is "shutdown".
+// Tests that by default the shutdown button tooltip is "Shut down".
IN_PROC_BROWSER_TEST_F(ShutdownPolicyInSessionTest, TestBasic) {
OpenSystemTrayMenu();
- EXPECT_TRUE(HasShutdownButtonTooltip(IDS_ASH_STATUS_TRAY_SHUTDOWN));
+ EXPECT_TRUE(HasShutdownButtonTooltip("Shut down"));
CloseSystemTrayMenu();
}
@@ -197,9 +196,8 @@
SyncRefreshDevicePolicy();
content::RunAllPendingInMessageLoop();
- // When the menu is opened the tooltip reads "reboot".
OpenSystemTrayMenu();
- EXPECT_TRUE(HasShutdownButtonTooltip(IDS_ASH_STATUS_TRAY_REBOOT));
+ EXPECT_TRUE(HasShutdownButtonTooltip("Restart"));
CloseSystemTrayMenu();
// Change the policy to shutdown and let it propagate over mojo to ash.
@@ -207,9 +205,8 @@
SyncRefreshDevicePolicy();
content::RunAllPendingInMessageLoop();
- // When the menu is opened the tooltip reads "shutdown".
OpenSystemTrayMenu();
- EXPECT_TRUE(HasShutdownButtonTooltip(IDS_ASH_STATUS_TRAY_SHUTDOWN));
+ EXPECT_TRUE(HasShutdownButtonTooltip("Shut down"));
CloseSystemTrayMenu();
}
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index e4d944e5f..b58d063 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -2143,7 +2143,6 @@
"//ash/public/cpp",
"//ash/public/cpp/resources:ash_public_unscaled_resources",
"//ash/public/cpp/vector_icons",
- "//ash/strings",
"//chrome/browser/chromeos",
"//chromeos:cryptohome_proto",
"//chromeos/components/proximity_auth",
@@ -2156,6 +2155,7 @@
"//chromeos/services/multidevice_setup/public/cpp:cpp",
"//chromeos/services/multidevice_setup/public/cpp:url_provider",
"//chromeos/services/multidevice_setup/public/mojom",
+ "//chromeos/strings",
"//components/arc",
"//components/captive_portal",
"//components/consent_auditor:consent_auditor",
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 868c28b..e53289312 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -15,7 +15,6 @@
#include "ash/public/cpp/shelf_prefs.h"
#include "ash/public/interfaces/constants.mojom.h"
#include "ash/shell.h"
-#include "ash/strings/grit/ash_strings.h"
#include "base/strings/pattern.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -66,6 +65,7 @@
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "components/account_id/account_id.h"
#include "components/arc/arc_prefs.h"
#include "components/favicon/content/content_favicon_driver.h"
diff --git a/chrome/browser/ui/ash/network/networking_config_chromeos_browsertest.cc b/chrome/browser/ui/ash/network/networking_config_chromeos_browsertest.cc
index fdf888a..5cd935a7 100644
--- a/chrome/browser/ui/ash/network/networking_config_chromeos_browsertest.cc
+++ b/chrome/browser/ui/ash/network/networking_config_chromeos_browsertest.cc
@@ -5,7 +5,6 @@
#include "ash/public/cpp/ash_view_ids.h"
#include "ash/public/interfaces/constants.mojom.h"
#include "ash/public/interfaces/system_tray_test_api.mojom.h"
-#include "ash/strings/grit/ash_strings.h"
#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
@@ -40,9 +39,9 @@
wait_for.ShowDetailedView(ash::mojom::TrayItem::kNetwork);
// Expect that the extension-controlled VPN item appears.
- base::string16 expected_tooltip = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_EXTENSION_CONTROLLED_WIFI,
- base::UTF8ToUTF16("NetworkingConfig test extension"));
+ base::string16 expected_tooltip = base::UTF8ToUTF16(
+ "The extension \"NetworkingConfig test extension\" can help connect to "
+ "this network.");
base::string16 tooltip;
wait_for.GetBubbleViewTooltip(ash::VIEW_ID_EXTENSION_CONTROLLED_WIFI,
&tooltip);
diff --git a/chrome/browser/ui/webui/DEPS b/chrome/browser/ui/webui/DEPS
index 1c49a31..10bf6c8 100644
--- a/chrome/browser/ui/webui/DEPS
+++ b/chrome/browser/ui/webui/DEPS
@@ -1,6 +1,4 @@
include_rules = [
- # TODO(mash): Remove. http://crbug.com/628715
- "+ash/strings",
"+device/bluetooth",
"+extensions/strings/grit/extensions_strings.h",
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 27f16b3..cb74b85 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -17,7 +17,6 @@
#include "ash/public/interfaces/shutdown.mojom.h"
#include "ash/public/interfaces/tray_action.mojom.h"
#include "ash/shell.h"
-#include "ash/strings/grit/ash_strings.h"
#include "base/bind.h"
#include "base/i18n/number_formatting.h"
#include "base/location.h"
@@ -92,6 +91,7 @@
#include "chromeos/login/auth/user_context.h"
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "components/login/localized_values_builder.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index bef5c96..b99f2360 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -52,8 +52,8 @@
#include "ui/gfx/color_utils.h"
#if defined(OS_CHROMEOS)
-#include "ash/strings/grit/ash_strings.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#endif
#if defined(OS_MACOSX)
diff --git a/chrome/browser/ui/webui/settings/chromeos/device_power_handler.cc b/chrome/browser/ui/webui/settings/chromeos/device_power_handler.cc
index c11fa3d9..e7a3a9f 100644
--- a/chrome/browser/ui/webui/settings/chromeos/device_power_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/device_power_handler.cc
@@ -47,6 +47,36 @@
time_left);
}
+int PowerSourceToDisplayId(
+ const power_manager::PowerSupplyProperties_PowerSource& source) {
+ switch (source.port()) {
+ case power_manager::PowerSupplyProperties_PowerSource_Port_UNKNOWN:
+ return IDS_POWER_SOURCE_PORT_UNKNOWN;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_LEFT:
+ return IDS_POWER_SOURCE_PORT_LEFT;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_RIGHT:
+ return IDS_POWER_SOURCE_PORT_RIGHT;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_BACK:
+ return IDS_POWER_SOURCE_PORT_BACK;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_FRONT:
+ return IDS_POWER_SOURCE_PORT_FRONT;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_LEFT_FRONT:
+ return IDS_POWER_SOURCE_PORT_LEFT_FRONT;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_LEFT_BACK:
+ return IDS_POWER_SOURCE_PORT_LEFT_BACK;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_RIGHT_FRONT:
+ return IDS_POWER_SOURCE_PORT_RIGHT_FRONT;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_RIGHT_BACK:
+ return IDS_POWER_SOURCE_PORT_RIGHT_BACK;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_BACK_LEFT:
+ return IDS_POWER_SOURCE_PORT_BACK_LEFT;
+ case power_manager::PowerSupplyProperties_PowerSource_Port_BACK_RIGHT:
+ return IDS_POWER_SOURCE_PORT_BACK_RIGHT;
+ }
+ NOTREACHED();
+ return 0;
+}
+
} // namespace
const char PowerHandler::kPowerManagementSettingsChangedName[] =
@@ -302,7 +332,7 @@
dict->SetString("id", source.id());
dict->SetBoolean("is_dedicated_charger", source.active_by_default());
dict->SetString("description",
- ash::power_utils::PowerSourceToDisplayString(source));
+ l10n_util::GetStringUTF16(PowerSourceToDisplayId(source)));
sources_list.Append(std::move(dict));
}
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
index b8e3f255..1c41efd5 100644
--- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -50,7 +50,6 @@
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/ash_switches.h"
#include "ash/public/interfaces/voice_interaction_controller.mojom.h"
-#include "ash/strings/grit/ash_strings.h"
#include "base/sys_info.h"
#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
@@ -62,6 +61,7 @@
#include "chromeos/chromeos_features.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/services/multidevice_setup/public/cpp/url_provider.h"
+#include "chromeos/strings/grit/chromeos_strings.h"
#include "components/arc/arc_util.h"
#include "components/user_manager/user_manager.h"
#include "ui/chromeos/devicetype_utils.h"
@@ -1242,7 +1242,7 @@
IDS_SETTINGS_INTERNET_TETHER_CONNECTION_NOT_NOW_BUTTON},
{"tetherConnectionConnectButton",
IDS_SETTINGS_INTERNET_TETHER_CONNECTION_CONNECT_BUTTON},
- {"tetherEnableBluetooth", IDS_ASH_STATUS_TRAY_ENABLE_BLUETOOTH},
+ {"tetherEnableBluetooth", IDS_ENABLE_BLUETOOTH},
};
AddLocalizedStringsBulk(html_source, localized_strings,
arraysize(localized_strings));
diff --git a/chromeos/chromeos_strings.grd b/chromeos/chromeos_strings.grd
index 44442b7..62bf9dd 100644
--- a/chromeos/chromeos_strings.grd
+++ b/chromeos/chromeos_strings.grd
@@ -136,6 +136,55 @@
<message name="IDS_ASSISTANT_STOP_TIMER_QUERY" desc="Query for stopping assistant timer.">
Stop timer
</message>
+
+ <!-- The following strings are located here for accessibility from both //ash and //chrome -->
+ <message name="IDS_ENABLE_BLUETOOTH" desc="The message to display in the network list when Tether is enabled but Bluetooth is disabled.">
+ Turn on Bluetooth to discover nearby devices
+ </message>
+
+ <!-- Status tray enterprise management. -->
+ <message name="IDS_ASH_ENTERPRISE_DEVICE_MANAGED_BY" desc="Text for notifications showing that this device is enterpise managed. Used when the organization's domain name is available.">
+ This device is managed by <ph name="DOMAIN">$1<ex>acmecorp.com</ex></ph>.
+ </message>
+ <message name="IDS_ASH_ENTERPRISE_DEVICE_MANAGED" desc="Text for notifications showing that this device is enterprise managed. Used when the organization's domain name is not available (e.g. Active Directory).">
+ This device is enterprise managed
+ </message>
+ <message name="IDS_ASH_ENTERPRISE_DEVICE_MANAGED_SHORT" desc="Short text showing that the device is enterprise managed.">
+ Managed
+ </message>
+
+ <!-- Shelf buttons -->
+ <message name="IDS_ASH_SHELF_SHUTDOWN_BUTTON" desc="Text shown on shutdown button on login/lock screen.">
+ Shut down
+ </message>
+ <message name="IDS_ASH_SHELF_RESTART_BUTTON" desc="Text shown on restart button on login/lock screen.">
+ Restart
+ </message>
+ <message name="IDS_ASH_SHELF_UNLOCK_BUTTON" desc="Text shown on unlock button on lock screen.">
+ Unlock
+ </message>
+ <message name="IDS_ASH_SHELF_SIGN_OUT_BUTTON" desc="Text shown on sign out button on lock screen.">
+ Sign out
+ </message>
+ <message name="IDS_ASH_SHELF_CANCEL_BUTTON" desc="Text shown on cancel button on add user screen.">
+ Cancel
+ </message>
+ <message name="IDS_ASH_BROWSE_AS_GUEST_BUTTON" desc="Text shown on Chrome OS sign-in screen button that launches guest session. Should be short.">
+ Browse as Guest
+ </message>
+ <message name="IDS_ASH_ADD_USER_BUTTON" desc="Text shown on an add user button on login/locker screen">
+ Add Person
+ </message>
+ <message name="IDS_ASH_SHELF_APPS_BUTTON" desc="Text shown on apps button on login screen.">
+ Apps
+ </message>
+
+ <message name="IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE" desc="The title used for the Ash Launcher in the Shelf (not mentioning 'Apps' since this is a general launcher).">
+ Launcher
+ </message>
+ <message name="IDS_ASH_SHELF_APP_LIST_LAUNCHER_SYNCING_TITLE" desc="The title used for the Ash Launcher in the Shelf to indicate loading/syncinc apps.">
+ Launcher (syncing apps...)
+ </message>
</messages>
</release>
</grit>
diff --git a/ash/ash_strings_grd/IDS_ASH_SHELF_APPS_BUTTON.png.sha1 b/chromeos/chromeos_strings_grd/IDS_ASH_SHELF_APPS_BUTTON.png.sha1
similarity index 100%
rename from ash/ash_strings_grd/IDS_ASH_SHELF_APPS_BUTTON.png.sha1
rename to chromeos/chromeos_strings_grd/IDS_ASH_SHELF_APPS_BUTTON.png.sha1