Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2644)

Unified Diff: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc

Issue 1989563002: i18n of Zoom % to use locally correct numeric glyphs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
index ec5f3d6605d9eba2382e09b337de6fc0327b5614..1d6aca5d9633945a9a2ae46b25a4d9fc8e9850fe 100644
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
+#include "base/i18n/number_formatting.h"
#include "base/i18n/rtl.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -176,8 +177,8 @@ void ZoomBubbleView::Init() {
ui_zoom::ZoomController* zoom_controller =
ui_zoom::ZoomController::FromWebContents(web_contents_);
int zoom_percent = zoom_controller->GetZoomPercent();
- label_ = new views::Label(
- l10n_util::GetStringFUTF16Int(IDS_TOOLTIP_ZOOM, zoom_percent));
+ label_ = new views::Label(l10n_util::GetStringFUTF16(
+ IDS_TOOLTIP_ZOOM, base::FormatPercent(zoom_percent)));
label_->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList(
ui::ResourceBundle::MediumFont));
grid_layout->AddView(label_);
@@ -246,8 +247,8 @@ void ZoomBubbleView::Refresh() {
ui_zoom::ZoomController* zoom_controller =
ui_zoom::ZoomController::FromWebContents(web_contents_);
int zoom_percent = zoom_controller->GetZoomPercent();
- label_->SetText(
- l10n_util::GetStringFUTF16Int(IDS_TOOLTIP_ZOOM, zoom_percent));
+ label_->SetText(l10n_util::GetStringFUTF16(
+ IDS_TOOLTIP_ZOOM, base::FormatPercent(zoom_percent)));
StartTimerIfNecessary();
}

Powered by Google App Engine
This is Rietveld 408576698