| 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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 {"displayOverscanInstructions", | 554 {"displayOverscanInstructions", |
| 555 IDS_SETTINGS_DISPLAY_OVERSCAN_INSTRUCTIONS}, | 555 IDS_SETTINGS_DISPLAY_OVERSCAN_INSTRUCTIONS}, |
| 556 {"displayOverscanResize", IDS_SETTINGS_DISPLAY_OVERSCAN_RESIZE}, | 556 {"displayOverscanResize", IDS_SETTINGS_DISPLAY_OVERSCAN_RESIZE}, |
| 557 {"displayOverscanPosition", IDS_SETTINGS_DISPLAY_OVERSCAN_POSITION}, | 557 {"displayOverscanPosition", IDS_SETTINGS_DISPLAY_OVERSCAN_POSITION}, |
| 558 {"displayOverscanReset", IDS_SETTINGS_DISPLAY_OVERSCAN_RESET}, | 558 {"displayOverscanReset", IDS_SETTINGS_DISPLAY_OVERSCAN_RESET}, |
| 559 {"displayOverscanSave", IDS_SETTINGS_DISPLAY_OVERSCAN_SAVE}, | 559 {"displayOverscanSave", IDS_SETTINGS_DISPLAY_OVERSCAN_SAVE}, |
| 560 }; | 560 }; |
| 561 AddLocalizedStringsBulk(html_source, display_strings, | 561 AddLocalizedStringsBulk(html_source, display_strings, |
| 562 arraysize(display_strings)); | 562 arraysize(display_strings)); |
| 563 | 563 |
| 564 LocalizedString storage_strings[] = { |
| 565 {"storageTitle", IDS_SETTINGS_STORAGE_TITLE}, |
| 566 {"storageItemInUse", IDS_SETTINGS_STORAGE_ITEM_IN_USE}, |
| 567 {"storageItemAvailable", IDS_SETTINGS_STORAGE_ITEM_AVAILABLE}, |
| 568 {"storageItemDownloads", IDS_SETTINGS_STORAGE_ITEM_DOWNLOADS}, |
| 569 {"storageItemDriveCache", IDS_SETTINGS_STORAGE_ITEM_DRIVE_CACHE}, |
| 570 {"storageItemBrowsingData", IDS_SETTINGS_STORAGE_ITEM_BROWSING_DATA}, |
| 571 {"storageItemAndroid", IDS_SETTINGS_STORAGE_ITEM_ANDROID}, |
| 572 {"storageItemOtherUsers", IDS_SETTINGS_STORAGE_ITEM_OTHER_USERS}, |
| 573 {"storageSizeComputing", IDS_SETTINGS_STORAGE_SIZE_CALCULATING}, |
| 574 {"storageSizeUnknown", IDS_SETTINGS_STORAGE_SIZE_UNKNOWN}, |
| 575 {"storageSpaceLowMessageTitle", |
| 576 IDS_SETTINGS_STORAGE_SPACE_LOW_MESSAGE_TITLE}, |
| 577 {"storageSpaceLowMessageLine1", |
| 578 IDS_SETTINGS_STORAGE_SPACE_LOW_MESSAGE_LINE_1}, |
| 579 {"storageSpaceLowMessageLine2", |
| 580 IDS_SETTINGS_STORAGE_SPACE_LOW_MESSAGE_LINE_2}, |
| 581 {"storageSpaceCriticallyLowMessageTitle", |
| 582 IDS_SETTINGS_STORAGE_SPACE_CRITICALLY_LOW_MESSAGE_TITLE}, |
| 583 {"storageSpaceCriticallyLowMessageLine1", |
| 584 IDS_SETTINGS_STORAGE_SPACE_CRITICALLY_LOW_MESSAGE_LINE_1}, |
| 585 {"storageSpaceCriticallyLowMessageLine2", |
| 586 IDS_SETTINGS_STORAGE_SPACE_CRITICALLY_LOW_MESSAGE_LINE_2}, |
| 587 {"storageClearDriveCacheDialogTitle", |
| 588 IDS_SETTINGS_STORAGE_CLEAR_DRIVE_CACHE_DIALOG_TITLE}, |
| 589 {"storageClearDriveCacheDialogDescription", |
| 590 IDS_SETTINGS_STORAGE_CLEAR_DRIVE_CACHE_DESCRIPTION}, |
| 591 {"storageDeleteAllButtonTitle", |
| 592 IDS_SETTINGS_STORAGE_DELETE_ALL_BUTTON_TITLE}}; |
| 593 AddLocalizedStringsBulk(html_source, storage_strings, |
| 594 arraysize(storage_strings)); |
| 595 |
| 564 html_source->AddString("naturalScrollLearnMoreLink", | 596 html_source->AddString("naturalScrollLearnMoreLink", |
| 565 base::ASCIIToUTF16(chrome::kNaturalScrollHelpURL)); | 597 base::ASCIIToUTF16(chrome::kNaturalScrollHelpURL)); |
| 598 |
| 599 html_source->AddBoolean("showStorageManager", |
| 600 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 601 chromeos::switches::kEnableMdStorageManager)); |
| 566 } | 602 } |
| 567 #endif | 603 #endif |
| 568 | 604 |
| 569 void AddDownloadsStrings(content::WebUIDataSource* html_source) { | 605 void AddDownloadsStrings(content::WebUIDataSource* html_source) { |
| 570 LocalizedString localized_strings[] = { | 606 LocalizedString localized_strings[] = { |
| 571 {"downloadsPageTitle", IDS_SETTINGS_DOWNLOADS}, | 607 {"downloadsPageTitle", IDS_SETTINGS_DOWNLOADS}, |
| 572 {"downloadLocation", IDS_SETTINGS_DOWNLOAD_LOCATION}, | 608 {"downloadLocation", IDS_SETTINGS_DOWNLOAD_LOCATION}, |
| 573 {"changeDownloadLocation", IDS_SETTINGS_CHANGE_DOWNLOAD_LOCATION}, | 609 {"changeDownloadLocation", IDS_SETTINGS_CHANGE_DOWNLOAD_LOCATION}, |
| 574 {"promptForDownload", IDS_SETTINGS_PROMPT_FOR_DOWNLOAD}, | 610 {"promptForDownload", IDS_SETTINGS_PROMPT_FOR_DOWNLOAD}, |
| 575 {"disconnectGoogleDriveAccount", IDS_SETTINGS_DISCONNECT_GOOGLE_DRIVE}, | 611 {"disconnectGoogleDriveAccount", IDS_SETTINGS_DISCONNECT_GOOGLE_DRIVE}, |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 #endif | 1669 #endif |
| 1634 AddUsersStrings(html_source); | 1670 AddUsersStrings(html_source); |
| 1635 AddWebContentStrings(html_source); | 1671 AddWebContentStrings(html_source); |
| 1636 | 1672 |
| 1637 policy_indicator::AddLocalizedStrings(html_source); | 1673 policy_indicator::AddLocalizedStrings(html_source); |
| 1638 | 1674 |
| 1639 html_source->SetJsonPath(kLocalizedStringsFile); | 1675 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1640 } | 1676 } |
| 1641 | 1677 |
| 1642 } // namespace settings | 1678 } // namespace settings |
| OLD | NEW |