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

Side by Side Diff: chrome/browser/media/desktop_media_list_ash.cc

Issue 2002783002: Use plural formats and native digits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plural: use "=1" instead of "one" for pop-up block infobar Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/media/native_desktop_media_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media/desktop_media_list_ash.h" 5 #include "chrome/browser/media/desktop_media_list_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 content::DesktopMediaID::TYPE_SCREEN, root_windows[i]), 75 content::DesktopMediaID::TYPE_SCREEN, root_windows[i]),
76 root_windows[i]->title()); 76 root_windows[i]->title());
77 77
78 if (root_windows[i] == ash::Shell::GetPrimaryRootWindow()) 78 if (root_windows[i] == ash::Shell::GetPrimaryRootWindow())
79 sources->insert(sources->begin(), screen_source); 79 sources->insert(sources->begin(), screen_source);
80 else 80 else
81 sources->push_back(screen_source); 81 sources->push_back(screen_source);
82 82
83 if (screen_source.name.empty()) { 83 if (screen_source.name.empty()) {
84 if (root_windows.size() > 1) { 84 if (root_windows.size() > 1) {
85 screen_source.name = l10n_util::GetStringFUTF16Int( 85 // 'Screen' in 'Screen 1, Screen 2, etc ' might be inflected in some
86 // languages depending on the number although rather unlikely. To be
87 // safe, use the plural format.
88 // TODO(jshin): Revert to GetStringFUTF16Int (with native digits)
89 // if none of UI languages inflects 'Screen' in this context.
90 screen_source.name = l10n_util::GetPluralStringFUTF16(
86 IDS_DESKTOP_MEDIA_PICKER_MULTIPLE_SCREEN_NAME, 91 IDS_DESKTOP_MEDIA_PICKER_MULTIPLE_SCREEN_NAME,
87 static_cast<int>(i + 1)); 92 static_cast<int>(i + 1));
88 } else { 93 } else {
89 screen_source.name = l10n_util::GetStringUTF16( 94 screen_source.name = l10n_util::GetStringUTF16(
90 IDS_DESKTOP_MEDIA_PICKER_SINGLE_SCREEN_NAME); 95 IDS_DESKTOP_MEDIA_PICKER_SINGLE_SCREEN_NAME);
91 } 96 }
92 } 97 }
93 98
94 CaptureThumbnail(screen_source.id, root_windows[i]); 99 CaptureThumbnail(screen_source.id, root_windows[i]);
95 } 100 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 133
129 --pending_window_capture_requests_; 134 --pending_window_capture_requests_;
130 DCHECK_GE(pending_window_capture_requests_, 0); 135 DCHECK_GE(pending_window_capture_requests_, 0);
131 136
132 if (!pending_window_capture_requests_) { 137 if (!pending_window_capture_requests_) {
133 // Once we've finished capturing all windows post a task for the next list 138 // Once we've finished capturing all windows post a task for the next list
134 // update. 139 // update.
135 ScheduleNextRefresh(); 140 ScheduleNextRefresh();
136 } 141 }
137 } 142 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/media/native_desktop_media_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698