Chromium Code Reviews| Index: ash/system/chromeos/power/power_status_view.cc |
| diff --git a/ash/system/chromeos/power/power_status_view.cc b/ash/system/chromeos/power/power_status_view.cc |
| index 9aa461c90cdcd80369056eb54cf5b3cf5708c78f..aac50de3dfe5302ac2ebffd040ab1304e4ce8138 100644 |
| --- a/ash/system/chromeos/power/power_status_view.cc |
| +++ b/ash/system/chromeos/power/power_status_view.cc |
| @@ -32,6 +32,13 @@ const int kLabelMinWidth = 120; |
| const int kPaddingBetweenBatteryStatusAndIcon = 3; |
| // Minimum battery percentage rendered in UI. |
| const int kMinBatteryPercent = 1; |
| + |
| +base::string16 GetChargingUnreliableString() { |
| + // String is intentionally hard-coded in English for backport to M28 only. |
| + // See crbug.com/246336 for details. |
| + return UTF8ToUTF16("Low-power charger"); |
| +} |
| + |
| } // namespace |
| PowerStatusView::PowerStatusView(ViewType view_type, |
| @@ -124,17 +131,16 @@ void PowerStatusView::UpdateTextForDefaultView() { |
| rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_FULL); |
| } else if (supply_status_.battery_percentage < 0.0f) { |
| battery_time_status = |
| - is_charging_unreliable ? |
| - rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE) : |
| - rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_CALCULATING); |
| + is_charging_unreliable |
| + ? GetChargingUnreliableString() |
|
Daniel Erat
2013/06/04 19:23:15
this style seems strange to me -- i think that i'v
|
| + : rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_CALCULATING); |
| } else { |
| battery_percentage = l10n_util::GetStringFUTF16( |
| IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_ONLY, |
| base::IntToString16(TrayPower::GetRoundedBatteryPercentage( |
| supply_status_.battery_percentage))); |
| if (is_charging_unreliable) { |
| - battery_time_status = rb.GetLocalizedString( |
| - IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE); |
| + battery_time_status = GetChargingUnreliableString(); |
| } else { |
| if (supply_status_.is_calculating_battery_time) { |
| battery_time_status = |
| @@ -207,9 +213,7 @@ void PowerStatusView::UpdateTextForNotificationView() { |
| } |
| if (is_charging_unreliable) { |
| - time_label_->SetText( |
| - ui::ResourceBundle::GetSharedInstance().GetLocalizedString( |
| - IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE)); |
| + time_label_->SetText(GetChargingUnreliableString()); |
| } else if (supply_status_.is_calculating_battery_time) { |
| time_label_->SetText( |
| ui::ResourceBundle::GetSharedInstance().GetLocalizedString( |