| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/settings/md_settings_localized_strings_provide
r.h" | 5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide
r.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "chrome/grit/chromium_strings.h" | 10 #include "chrome/grit/chromium_strings.h" |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 html_source->AddLocalizedString("supervisedUsersLabel", | 518 html_source->AddLocalizedString("supervisedUsersLabel", |
| 519 IDS_SETTINGS_USERS_SUPERVISED_USERS_LABEL); | 519 IDS_SETTINGS_USERS_SUPERVISED_USERS_LABEL); |
| 520 html_source->AddLocalizedString("showOnSigninLabel", | 520 html_source->AddLocalizedString("showOnSigninLabel", |
| 521 IDS_SETTINGS_USERS_SHOW_ON_SIGNIN_LABEL); | 521 IDS_SETTINGS_USERS_SHOW_ON_SIGNIN_LABEL); |
| 522 html_source->AddLocalizedString("restrictSigninLabel", | 522 html_source->AddLocalizedString("restrictSigninLabel", |
| 523 IDS_SETTINGS_USERS_RESTRICT_SIGNIN_LABEL); | 523 IDS_SETTINGS_USERS_RESTRICT_SIGNIN_LABEL); |
| 524 html_source->AddLocalizedString("addUsersLabel", | 524 html_source->AddLocalizedString("addUsersLabel", |
| 525 IDS_SETTINGS_USERS_ADD_USERS_LABEL); | 525 IDS_SETTINGS_USERS_ADD_USERS_LABEL); |
| 526 } | 526 } |
| 527 | 527 |
| 528 void AddWebContentStrings(content::WebUIDataSource* html_source) { |
| 529 html_source->AddLocalizedString("webContent", IDS_SETTINGS_WEB_CONTENT); |
| 530 html_source->AddLocalizedString("pageZoom", IDS_SETTINGS_PAGE_ZOOM_LABEL); |
| 531 html_source->AddLocalizedString("fontSize", IDS_SETTINGS_FONT_SIZE_LABEL); |
| 532 html_source->AddLocalizedString("verySmall", IDS_SETTINGS_VERY_SMALL_FONT); |
| 533 html_source->AddLocalizedString("small", IDS_SETTINGS_SMALL_FONT); |
| 534 html_source->AddLocalizedString("medium", IDS_SETTINGS_MEDIUM_FONT); |
| 535 html_source->AddLocalizedString("large", IDS_SETTINGS_LARGE_FONT); |
| 536 html_source->AddLocalizedString("veryLarge", IDS_SETTINGS_VERY_LARGE_FONT); |
| 537 html_source->AddLocalizedString("custom", IDS_SETTINGS_CUSTOM); |
| 538 html_source->AddLocalizedString("customizeFonts", |
| 539 IDS_SETTINGS_CUSTOMIZE_FONTS); |
| 540 html_source->AddLocalizedString("fontsAndEncoding", |
| 541 IDS_SETTINGS_FONTS_AND_ENCODING); |
| 542 html_source->AddLocalizedString("standardFont", |
| 543 IDS_SETTINGS_STANDARD_FONT_LABEL); |
| 544 html_source->AddLocalizedString("serifFont", IDS_SETTINGS_SERIF_FONT_LABEL); |
| 545 html_source->AddLocalizedString("sansSerifFont", |
| 546 IDS_SETTINGS_SANS_SERIF_FONT_LABEL); |
| 547 html_source->AddLocalizedString("fixedWidthFont", |
| 548 IDS_SETTINGS_FIXED_WIDTH_FONT_LABEL); |
| 549 html_source->AddLocalizedString("minimumFont", |
| 550 IDS_SETTINGS_MINIMUM_FONT_SIZE_LABEL); |
| 551 html_source->AddLocalizedString("encoding", IDS_SETTINGS_ENCODING_LABEL); |
| 552 html_source->AddLocalizedString("tiny", IDS_SETTINGS_TINY_FONT_SIZE); |
| 553 html_source->AddLocalizedString("huge", IDS_SETTINGS_HUGE_FONT_SIZE); |
| 554 html_source->AddLocalizedString("loremIpsum", IDS_SETTINGS_LOREM_IPSUM); |
| 555 html_source->AddLocalizedString("loading", IDS_SETTINGS_LOADING); |
| 556 html_source->AddLocalizedString("advancedFontSettings", |
| 557 IDS_SETTINGS_ADVANCED_FONT_SETTINGS); |
| 558 } |
| 559 |
| 528 } // namespace | 560 } // namespace |
| 529 | 561 |
| 530 namespace settings { | 562 namespace settings { |
| 531 | 563 |
| 532 void AddLocalizedStrings(content::WebUIDataSource* html_source, | 564 void AddLocalizedStrings(content::WebUIDataSource* html_source, |
| 533 Profile* profile) { | 565 Profile* profile) { |
| 534 AddCommonStrings(html_source); | 566 AddCommonStrings(html_source); |
| 535 | 567 |
| 536 #if defined(OS_CHROMEOS) | 568 #if defined(OS_CHROMEOS) |
| 537 AddA11yStrings(html_source); | 569 AddA11yStrings(html_source); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 549 #if defined(OS_CHROMEOS) | 581 #if defined(OS_CHROMEOS) |
| 550 AddMultiProfilesStrings(html_source, profile); | 582 AddMultiProfilesStrings(html_source, profile); |
| 551 #endif | 583 #endif |
| 552 AddOnStartupStrings(html_source); | 584 AddOnStartupStrings(html_source); |
| 553 AddPrivacyStrings(html_source); | 585 AddPrivacyStrings(html_source); |
| 554 AddSearchEnginesStrings(html_source); | 586 AddSearchEnginesStrings(html_source); |
| 555 AddSearchStrings(html_source); | 587 AddSearchStrings(html_source); |
| 556 AddSiteSettingsStrings(html_source); | 588 AddSiteSettingsStrings(html_source); |
| 557 AddSyncStrings(html_source); | 589 AddSyncStrings(html_source); |
| 558 AddUsersStrings(html_source); | 590 AddUsersStrings(html_source); |
| 591 AddWebContentStrings(html_source); |
| 559 | 592 |
| 560 html_source->SetJsonPath(kLocalizedStringsFile); | 593 html_source->SetJsonPath(kLocalizedStringsFile); |
| 561 } | 594 } |
| 562 | 595 |
| 563 } // namespace settings | 596 } // namespace settings |
| OLD | NEW |