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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 2108813002: Added strings of i18n and made the pin-keyboard work for rtl lang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ui/webui/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ash/common/system/chromeos/devicetype_utils.h" 12 #include "ash/common/system/chromeos/devicetype_utils.h"
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "ash/wm/lock_state_controller.h" 14 #include "ash/wm/lock_state_controller.h"
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/i18n/number_formatting.h"
16 #include "base/location.h" 17 #include "base/location.h"
17 #include "base/logging.h" 18 #include "base/logging.h"
18 #include "base/macros.h" 19 #include "base/macros.h"
19 #include "base/metrics/histogram.h" 20 #include "base/metrics/histogram.h"
20 #include "base/single_thread_task_runner.h" 21 #include "base/single_thread_task_runner.h"
21 #include "base/strings/string16.h" 22 #include "base/strings/string16.h"
22 #include "base/strings/string_number_conversions.h" 23 #include "base/strings/string_number_conversions.h"
23 #include "base/strings/string_util.h" 24 #include "base/strings/string_util.h"
24 #include "base/strings/stringprintf.h" 25 #include "base/strings/stringprintf.h"
25 #include "base/strings/utf_string_conversions.h" 26 #include "base/strings/utf_string_conversions.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 if (!succeed) { 358 if (!succeed) {
358 DVLOG(0) << "SetUserInputMethod('" << username 359 DVLOG(0) << "SetUserInputMethod('" << username
359 << "'): failed to set user layout. Switching to default."; 360 << "'): failed to set user layout. Switching to default.";
360 361
361 ime_state->SetInputMethodLoginDefault(); 362 ime_state->SetInputMethodLoginDefault();
362 } 363 }
363 } 364 }
364 365
365 void SigninScreenHandler::DeclareLocalizedValues( 366 void SigninScreenHandler::DeclareLocalizedValues(
366 ::login::LocalizedValuesBuilder* builder) { 367 ::login::LocalizedValuesBuilder* builder) {
368 // Format numbers to be used on the pin keyboard.
369 for (int j = 0; j <= 9; j++) {
370 builder->Add("pinKeyboard" + base::IntToString(j),
371 base::FormatNumber(int64_t{j}));
372 }
373
367 builder->Add("passwordHint", IDS_LOGIN_POD_EMPTY_PASSWORD_TEXT); 374 builder->Add("passwordHint", IDS_LOGIN_POD_EMPTY_PASSWORD_TEXT);
375 builder->Add("pinPlaceholder", IDS_LOGIN_POD_EMPTY_PIN_TEXT);
jdufault 2016/06/28 18:38:47 Please change pinKeyboard* to pin* or pin* to pinK
376 builder->Add("pinClear", IDS_LOGIN_POD_EMPTY_PIN_CLEAR_TEXT);
368 builder->Add("signingIn", IDS_LOGIN_POD_SIGNING_IN); 377 builder->Add("signingIn", IDS_LOGIN_POD_SIGNING_IN);
369 builder->Add("podMenuButtonAccessibleName", 378 builder->Add("podMenuButtonAccessibleName",
370 IDS_LOGIN_POD_MENU_BUTTON_ACCESSIBLE_NAME); 379 IDS_LOGIN_POD_MENU_BUTTON_ACCESSIBLE_NAME);
371 builder->Add("podMenuRemoveItemAccessibleName", 380 builder->Add("podMenuRemoveItemAccessibleName",
372 IDS_LOGIN_POD_MENU_REMOVE_ITEM_ACCESSIBLE_NAME); 381 IDS_LOGIN_POD_MENU_REMOVE_ITEM_ACCESSIBLE_NAME);
373 builder->Add("passwordFieldAccessibleName", 382 builder->Add("passwordFieldAccessibleName",
374 IDS_LOGIN_POD_PASSWORD_FIELD_ACCESSIBLE_NAME); 383 IDS_LOGIN_POD_PASSWORD_FIELD_ACCESSIBLE_NAME);
375 builder->Add("signedIn", IDS_SCREEN_LOCK_ACTIVE_USER); 384 builder->Add("signedIn", IDS_SCREEN_LOCK_ACTIVE_USER);
376 builder->Add("launchAppButton", IDS_LAUNCH_APP_BUTTON); 385 builder->Add("launchAppButton", IDS_LAUNCH_APP_BUTTON);
377 builder->Add("restart", IDS_RESTART_BUTTON); 386 builder->Add("restart", IDS_RESTART_BUTTON);
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 } 1477 }
1469 1478
1470 void SigninScreenHandler::OnFeedbackFinished() { 1479 void SigninScreenHandler::OnFeedbackFinished() {
1471 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1480 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1472 1481
1473 // Recreate user's cryptohome after the feedback is attempted. 1482 // Recreate user's cryptohome after the feedback is attempted.
1474 HandleResyncUserData(); 1483 HandleResyncUserData();
1475 } 1484 }
1476 1485
1477 } // namespace chromeos 1486 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698