| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/i18n/number_formatting.h" | 10 #include "base/i18n/number_formatting.h" |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 {"displayOverscanInstructions", | 555 {"displayOverscanInstructions", |
| 556 IDS_SETTINGS_DISPLAY_OVERSCAN_INSTRUCTIONS}, | 556 IDS_SETTINGS_DISPLAY_OVERSCAN_INSTRUCTIONS}, |
| 557 {"displayOverscanResize", IDS_SETTINGS_DISPLAY_OVERSCAN_RESIZE}, | 557 {"displayOverscanResize", IDS_SETTINGS_DISPLAY_OVERSCAN_RESIZE}, |
| 558 {"displayOverscanPosition", IDS_SETTINGS_DISPLAY_OVERSCAN_POSITION}, | 558 {"displayOverscanPosition", IDS_SETTINGS_DISPLAY_OVERSCAN_POSITION}, |
| 559 {"displayOverscanReset", IDS_SETTINGS_DISPLAY_OVERSCAN_RESET}, | 559 {"displayOverscanReset", IDS_SETTINGS_DISPLAY_OVERSCAN_RESET}, |
| 560 {"displayOverscanSave", IDS_SETTINGS_DISPLAY_OVERSCAN_SAVE}, | 560 {"displayOverscanSave", IDS_SETTINGS_DISPLAY_OVERSCAN_SAVE}, |
| 561 }; | 561 }; |
| 562 AddLocalizedStringsBulk(html_source, display_strings, | 562 AddLocalizedStringsBulk(html_source, display_strings, |
| 563 arraysize(display_strings)); | 563 arraysize(display_strings)); |
| 564 | 564 |
| 565 LocalizedString storage_strings[] = { |
| 566 {"storageTitle", IDS_SETTINGS_STORAGE_TITLE}, |
| 567 {"storageItemInUse", IDS_SETTINGS_STORAGE_ITEM_IN_USE}, |
| 568 {"storageItemAvailable", IDS_SETTINGS_STORAGE_ITEM_AVAILABLE}, |
| 569 {"storageItemDownloads", IDS_SETTINGS_STORAGE_ITEM_DOWNLOADS}, |
| 570 {"storageItemDriveCache", IDS_SETTINGS_STORAGE_ITEM_DRIVE_CACHE}, |
| 571 {"storageItemBrowsingData", IDS_SETTINGS_STORAGE_ITEM_BROWSING_DATA}, |
| 572 {"storageItemAndroid", IDS_SETTINGS_STORAGE_ITEM_ANDROID}, |
| 573 {"storageItemOtherUsers", IDS_SETTINGS_STORAGE_ITEM_OTHER_USERS}, |
| 574 {"storageSizeComputing", IDS_SETTINGS_STORAGE_SIZE_CALCULATING}, |
| 575 {"storageSizeUnknown", IDS_SETTINGS_STORAGE_SIZE_UNKNOWN}, |
| 576 {"storageSpaceLowMessageTitle", |
| 577 IDS_SETTINGS_STORAGE_SPACE_LOW_MESSAGE_TITLE}, |
| 578 {"storageSpaceLowMessageLine1", |
| 579 IDS_SETTINGS_STORAGE_SPACE_LOW_MESSAGE_LINE_1}, |
| 580 {"storageSpaceLowMessageLine2", |
| 581 IDS_SETTINGS_STORAGE_SPACE_LOW_MESSAGE_LINE_2}, |
| 582 {"storageSpaceCriticallyLowMessageTitle", |
| 583 IDS_SETTINGS_STORAGE_SPACE_CRITICALLY_LOW_MESSAGE_TITLE}, |
| 584 {"storageSpaceCriticallyLowMessageLine1", |
| 585 IDS_SETTINGS_STORAGE_SPACE_CRITICALLY_LOW_MESSAGE_LINE_1}, |
| 586 {"storageSpaceCriticallyLowMessageLine2", |
| 587 IDS_SETTINGS_STORAGE_SPACE_CRITICALLY_LOW_MESSAGE_LINE_2}, |
| 588 {"storageClearDriveCacheDialogTitle", |
| 589 IDS_SETTINGS_STORAGE_CLEAR_DRIVE_CACHE_DIALOG_TITLE}, |
| 590 {"storageClearDriveCacheDialogDescription", |
| 591 IDS_SETTINGS_STORAGE_CLEAR_DRIVE_CACHE_DESCRIPTION}, |
| 592 {"storageDeleteAllButtonTitle", |
| 593 IDS_SETTINGS_STORAGE_DELETE_ALL_BUTTON_TITLE}}; |
| 594 AddLocalizedStringsBulk(html_source, storage_strings, |
| 595 arraysize(storage_strings)); |
| 596 |
| 565 html_source->AddString("naturalScrollLearnMoreLink", | 597 html_source->AddString("naturalScrollLearnMoreLink", |
| 566 base::ASCIIToUTF16(chrome::kNaturalScrollHelpURL)); | 598 base::ASCIIToUTF16(chrome::kNaturalScrollHelpURL)); |
| 599 |
| 600 html_source->AddBoolean("showStorageManager", |
| 601 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 602 chromeos::switches::kEnableMdStorageManager)); |
| 567 } | 603 } |
| 568 #endif | 604 #endif |
| 569 | 605 |
| 570 void AddDownloadsStrings(content::WebUIDataSource* html_source) { | 606 void AddDownloadsStrings(content::WebUIDataSource* html_source) { |
| 571 LocalizedString localized_strings[] = { | 607 LocalizedString localized_strings[] = { |
| 572 {"downloadsPageTitle", IDS_SETTINGS_DOWNLOADS}, | 608 {"downloadsPageTitle", IDS_SETTINGS_DOWNLOADS}, |
| 573 {"downloadLocation", IDS_SETTINGS_DOWNLOAD_LOCATION}, | 609 {"downloadLocation", IDS_SETTINGS_DOWNLOAD_LOCATION}, |
| 574 {"changeDownloadLocation", IDS_SETTINGS_CHANGE_DOWNLOAD_LOCATION}, | 610 {"changeDownloadLocation", IDS_SETTINGS_CHANGE_DOWNLOAD_LOCATION}, |
| 575 {"promptForDownload", IDS_SETTINGS_PROMPT_FOR_DOWNLOAD}, | 611 {"promptForDownload", IDS_SETTINGS_PROMPT_FOR_DOWNLOAD}, |
| 576 {"disconnectGoogleDriveAccount", IDS_SETTINGS_DISCONNECT_GOOGLE_DRIVE}, | 612 {"disconnectGoogleDriveAccount", IDS_SETTINGS_DISCONNECT_GOOGLE_DRIVE}, |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 #endif | 1684 #endif |
| 1649 AddUsersStrings(html_source); | 1685 AddUsersStrings(html_source); |
| 1650 AddWebContentStrings(html_source); | 1686 AddWebContentStrings(html_source); |
| 1651 | 1687 |
| 1652 policy_indicator::AddLocalizedStrings(html_source); | 1688 policy_indicator::AddLocalizedStrings(html_source); |
| 1653 | 1689 |
| 1654 html_source->SetJsonPath(kLocalizedStringsFile); | 1690 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1655 } | 1691 } |
| 1656 | 1692 |
| 1657 } // namespace settings | 1693 } // namespace settings |
| OLD | NEW |