Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / file_manager / private_api_strings.cc
blob32ee55694aef825613bb778d74cba4cbf281aa06
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
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_strings.h"
7 #include "base/strings/stringprintf.h"
8 #include "base/sys_info.h"
9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/file_manager/open_with_browser.h"
11 #include "chrome/grit/generated_resources.h"
12 #include "chromeos/system/statistics_provider.h"
13 #include "extensions/common/extension_l10n_util.h"
14 #include "ui/base/l10n/l10n_util.h"
15 #include "ui/base/webui/web_ui_util.h"
16 #include "ui/strings/grit/app_locale_settings.h"
18 namespace {
20 // Location of the page to buy more storage for Google Drive.
21 const char kGoogleDriveBuyStorageUrl[] =
22 "https://www.google.com/settings/storage";
24 // Location of the overview page about Google Drive.
25 const char kGoogleDriveOverviewUrl[] =
26 "https://support.google.com/chromebook/?p=filemanager_drive";
28 // Location of Google drive redeem page.
29 const char kGoogleDriveRedeemUrl[] =
30 "http://www.google.com/intl/en/chrome/devices/goodies.html"
31 "?utm_source=filesapp&utm_medium=banner&utm_campaign=gsg";
33 // Location of Google Drive specific help.
34 const char kGoogleDriveHelpUrl[] =
35 "https://support.google.com/chromebook/?p=filemanager_drivehelp";
37 // Location of Google Drive root.
38 const char kGoogleDriveRootUrl[] = "https://drive.google.com";
40 // Printf format
41 const char kHelpURLFormat[] = "https://support.google.com/chromebook/answer/%d";
43 // Location of the help page for low space warning in the downloads directory.
44 const int kDownloadsLowSpaceWarningHelpNumber = 1061547;
46 // Location of Files App specific help.
47 const int kFilesAppHelpNumber = 1056323;
49 // Location of the help page about connecting to Google Drive.
50 const int kGoogleDriveErrorHelpNumber = 2649458;
52 // Location of the help page about no-action-available files.
53 const int kNoActionForFileHelpNumber = 1700055;
55 #define SET_STRING(id, idr) dict->SetString(id, l10n_util::GetStringUTF16(idr))
57 void AddStringsForFileTypes(base::DictionaryValue* dict) {
58 // TODO(crbug.com/438921): Rename string IDs to something like
59 // FILE_TYPE_WHATEVER.
60 SET_STRING("AUDIO_FILE_TYPE", IDS_FILE_BROWSER_AUDIO_FILE_TYPE);
61 SET_STRING("EXCEL_FILE_TYPE", IDS_FILE_BROWSER_EXCEL_FILE_TYPE);
62 SET_STRING("FOLDER", IDS_FILE_BROWSER_FOLDER);
63 SET_STRING("GDOC_DOCUMENT_FILE_TYPE",
64 IDS_FILE_BROWSER_GDOC_DOCUMENT_FILE_TYPE);
65 SET_STRING("GDRAW_DOCUMENT_FILE_TYPE",
66 IDS_FILE_BROWSER_GDRAW_DOCUMENT_FILE_TYPE);
67 SET_STRING("GENERIC_FILE_TYPE", IDS_FILE_BROWSER_GENERIC_FILE_TYPE);
68 SET_STRING("GFORM_DOCUMENT_FILE_TYPE",
69 IDS_FILE_BROWSER_GFORM_DOCUMENT_FILE_TYPE);
70 SET_STRING("GLINK_DOCUMENT_FILE_TYPE",
71 IDS_FILE_BROWSER_GLINK_DOCUMENT_FILE_TYPE);
72 SET_STRING("GMAP_DOCUMENT_FILE_TYPE",
73 IDS_FILE_BROWSER_GMAP_DOCUMENT_FILE_TYPE);
74 SET_STRING("GSHEET_DOCUMENT_FILE_TYPE",
75 IDS_FILE_BROWSER_GSHEET_DOCUMENT_FILE_TYPE);
76 SET_STRING("GSLIDES_DOCUMENT_FILE_TYPE",
77 IDS_FILE_BROWSER_GSLIDES_DOCUMENT_FILE_TYPE);
78 SET_STRING("GTABLE_DOCUMENT_FILE_TYPE",
79 IDS_FILE_BROWSER_GTABLE_DOCUMENT_FILE_TYPE);
80 SET_STRING("HTML_DOCUMENT_FILE_TYPE",
81 IDS_FILE_BROWSER_HTML_DOCUMENT_FILE_TYPE);
82 SET_STRING("IMAGE_FILE_TYPE", IDS_FILE_BROWSER_IMAGE_FILE_TYPE);
83 SET_STRING("NO_EXTENSION_FILE_TYPE", IDS_FILE_BROWSER_NO_EXTENSION_FILE_TYPE);
84 SET_STRING("PDF_DOCUMENT_FILE_TYPE", IDS_FILE_BROWSER_PDF_DOCUMENT_FILE_TYPE);
85 SET_STRING("PLAIN_TEXT_FILE_TYPE", IDS_FILE_BROWSER_PLAIN_TEXT_FILE_TYPE);
86 SET_STRING("POWERPOINT_PRESENTATION_FILE_TYPE",
87 IDS_FILE_BROWSER_POWERPOINT_PRESENTATION_FILE_TYPE);
88 SET_STRING("RAR_ARCHIVE_FILE_TYPE", IDS_FILE_BROWSER_RAR_ARCHIVE_FILE_TYPE);
89 SET_STRING("TAR_ARCHIVE_FILE_TYPE", IDS_FILE_BROWSER_TAR_ARCHIVE_FILE_TYPE);
90 SET_STRING("TAR_BZIP2_ARCHIVE_FILE_TYPE",
91 IDS_FILE_BROWSER_TAR_BZIP2_ARCHIVE_FILE_TYPE);
92 SET_STRING("TAR_GZIP_ARCHIVE_FILE_TYPE",
93 IDS_FILE_BROWSER_TAR_GZIP_ARCHIVE_FILE_TYPE);
94 SET_STRING("VIDEO_FILE_TYPE", IDS_FILE_BROWSER_VIDEO_FILE_TYPE);
95 SET_STRING("WORD_DOCUMENT_FILE_TYPE",
96 IDS_FILE_BROWSER_WORD_DOCUMENT_FILE_TYPE);
97 SET_STRING("ZIP_ARCHIVE_FILE_TYPE", IDS_FILE_BROWSER_ZIP_ARCHIVE_FILE_TYPE);
100 void AddStringsForDrive(base::DictionaryValue* dict) {
101 SET_STRING("DRIVE_BUY_MORE_SPACE", IDS_FILE_BROWSER_DRIVE_BUY_MORE_SPACE);
102 SET_STRING("DRIVE_BUY_MORE_SPACE_LINK",
103 IDS_FILE_BROWSER_DRIVE_BUY_MORE_SPACE_LINK);
104 SET_STRING("DRIVE_CANNOT_REACH", IDS_FILE_BROWSER_DRIVE_CANNOT_REACH);
105 SET_STRING("DRIVE_DIRECTORY_LABEL", IDS_FILE_BROWSER_DRIVE_DIRECTORY_LABEL);
106 SET_STRING("DRIVE_LEARN_MORE", IDS_FILE_BROWSER_DRIVE_LEARN_MORE);
107 SET_STRING("DRIVE_MENU_HELP", IDS_FILE_BROWSER_DRIVE_MENU_HELP);
108 SET_STRING("DRIVE_MOBILE_CONNECTION_OPTION",
109 IDS_FILE_BROWSER_DRIVE_MOBILE_CONNECTION_OPTION);
110 SET_STRING("DRIVE_MY_DRIVE_LABEL", IDS_FILE_BROWSER_DRIVE_MY_DRIVE_LABEL);
111 SET_STRING("DRIVE_NOT_REACHED", IDS_FILE_BROWSER_DRIVE_NOT_REACHED);
112 SET_STRING("DRIVE_OFFLINE_COLLECTION_LABEL",
113 IDS_FILE_BROWSER_DRIVE_OFFLINE_COLLECTION_LABEL);
114 SET_STRING("DRIVE_OUT_OF_SPACE_HEADER",
115 IDS_FILE_BROWSER_DRIVE_OUT_OF_SPACE_HEADER);
116 SET_STRING("DRIVE_OUT_OF_SPACE_MESSAGE",
117 IDS_FILE_BROWSER_DRIVE_OUT_OF_SPACE_MESSAGE);
118 SET_STRING("DRIVE_RECENT_COLLECTION_LABEL",
119 IDS_FILE_BROWSER_DRIVE_RECENT_COLLECTION_LABEL);
120 SET_STRING("DRIVE_SHARED_WITH_ME_COLLECTION_LABEL",
121 IDS_FILE_BROWSER_DRIVE_SHARED_WITH_ME_COLLECTION_LABEL);
122 SET_STRING("DRIVE_SHARE_TYPE_CAN_COMMENT",
123 IDS_FILE_BROWSER_DRIVE_SHARE_TYPE_CAN_COMMENT);
124 SET_STRING("DRIVE_SHARE_TYPE_CAN_EDIT",
125 IDS_FILE_BROWSER_DRIVE_SHARE_TYPE_CAN_EDIT);
126 SET_STRING("DRIVE_SHARE_TYPE_CAN_VIEW",
127 IDS_FILE_BROWSER_DRIVE_SHARE_TYPE_CAN_VIEW);
128 SET_STRING("DRIVE_SHOW_HOSTED_FILES_OPTION",
129 IDS_FILE_BROWSER_DRIVE_SHOW_HOSTED_FILES_OPTION);
130 SET_STRING("DRIVE_SPACE_AVAILABLE_LONG",
131 IDS_FILE_BROWSER_DRIVE_SPACE_AVAILABLE_LONG);
132 SET_STRING("DRIVE_VISIT_DRIVE_GOOGLE_COM",
133 IDS_FILE_BROWSER_DRIVE_VISIT_DRIVE_GOOGLE_COM);
134 SET_STRING("DRIVE_WELCOME_CHECK_ELIGIBILITY",
135 IDS_FILE_BROWSER_DRIVE_WELCOME_CHECK_ELIGIBILITY);
136 SET_STRING("DRIVE_WELCOME_DISMISS", IDS_FILE_BROWSER_DRIVE_WELCOME_DISMISS);
137 SET_STRING("DRIVE_WELCOME_TEXT_LONG",
138 IDS_FILE_BROWSER_DRIVE_WELCOME_TEXT_LONG);
139 SET_STRING("DRIVE_WELCOME_TEXT_SHORT",
140 IDS_FILE_BROWSER_DRIVE_WELCOME_TEXT_SHORT);
141 SET_STRING("DRIVE_WELCOME_TITLE", IDS_FILE_BROWSER_DRIVE_WELCOME_TITLE);
142 SET_STRING("DRIVE_WELCOME_TITLE_ALTERNATIVE",
143 IDS_FILE_BROWSER_DRIVE_WELCOME_TITLE_ALTERNATIVE);
144 SET_STRING("DRIVE_WELCOME_TITLE_ALTERNATIVE_1TB",
145 IDS_FILE_BROWSER_DRIVE_WELCOME_TITLE_ALTERNATIVE_1TB);
146 SET_STRING("SYNC_DELETE_WITHOUT_PERMISSION_ERROR",
147 IDS_FILE_BROWSER_SYNC_DELETE_WITHOUT_PERMISSION_ERROR);
148 SET_STRING("SYNC_FILE_NAME", IDS_FILE_BROWSER_SYNC_FILE_NAME);
149 SET_STRING("SYNC_FILE_NUMBER", IDS_FILE_BROWSER_SYNC_FILE_NUMBER);
150 SET_STRING("SYNC_MISC_ERROR", IDS_FILE_BROWSER_SYNC_MISC_ERROR);
151 SET_STRING("SYNC_PROGRESS_SUMMARY", IDS_FILE_BROWSER_SYNC_PROGRESS_SUMMARY);
152 SET_STRING("SYNC_SERVICE_UNAVAILABLE_ERROR",
153 IDS_FILE_BROWSER_SYNC_SERVICE_UNAVAILABLE_ERROR);
156 void AddStringsForGallery(base::DictionaryValue* dict) {
157 SET_STRING("GALLERY_ASPECT_RATIO_16_9",
158 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_16_9);
159 SET_STRING("GALLERY_ASPECT_RATIO_1_1",
160 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_1_1);
161 SET_STRING("GALLERY_ASPECT_RATIO_6_4",
162 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_6_4);
163 SET_STRING("GALLERY_ASPECT_RATIO_7_5",
164 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_7_5);
165 SET_STRING("GALLERY_AUTOFIX", IDS_FILE_BROWSER_GALLERY_AUTOFIX);
166 SET_STRING("GALLERY_BRIGHTNESS", IDS_FILE_BROWSER_GALLERY_BRIGHTNESS);
167 SET_STRING("GALLERY_CANCEL_LABEL", IDS_FILE_BROWSER_CANCEL_LABEL);
168 SET_STRING("GALLERY_CONFIRM_DELETE_ONE", IDS_FILE_BROWSER_CONFIRM_DELETE_ONE);
169 SET_STRING("GALLERY_CONFIRM_DELETE_SOME",
170 IDS_FILE_BROWSER_CONFIRM_DELETE_SOME);
171 SET_STRING("GALLERY_CONTRAST", IDS_FILE_BROWSER_GALLERY_CONTRAST);
172 SET_STRING("GALLERY_CROP", IDS_FILE_BROWSER_GALLERY_CROP);
173 SET_STRING("GALLERY_DELETE", IDS_FILE_BROWSER_GALLERY_DELETE);
174 SET_STRING("GALLERY_EDIT", IDS_FILE_BROWSER_GALLERY_EDIT);
175 SET_STRING("GALLERY_EXIT", IDS_FILE_BROWSER_GALLERY_EXIT);
176 SET_STRING("GALLERY_ENTER_WHEN_DONE",
177 IDS_FILE_BROWSER_GALLERY_ENTER_WHEN_DONE);
178 SET_STRING("GALLERY_EXPOSURE", IDS_FILE_BROWSER_GALLERY_EXPOSURE);
179 SET_STRING("GALLERY_FILE_EXISTS", IDS_FILE_BROWSER_GALLERY_FILE_EXISTS);
180 SET_STRING("GALLERY_FIXED", IDS_FILE_BROWSER_GALLERY_FIXED);
181 SET_STRING("GALLERY_IMAGE_ERROR", IDS_FILE_BROWSER_GALLERY_IMAGE_ERROR);
182 SET_STRING("GALLERY_IMAGE_OFFLINE", IDS_FILE_BROWSER_GALLERY_IMAGE_OFFLINE);
183 SET_STRING("GALLERY_ITEMS_SELECTED", IDS_FILE_BROWSER_GALLERY_ITEMS_SELECTED);
184 SET_STRING("GALLERY_NO_IMAGES", IDS_FILE_BROWSER_GALLERY_NO_IMAGES);
185 SET_STRING("GALLERY_OK_LABEL", IDS_FILE_BROWSER_OK_LABEL);
186 SET_STRING("GALLERY_OVERWRITE_BUBBLE",
187 IDS_FILE_BROWSER_GALLERY_OVERWRITE_BUBBLE);
188 SET_STRING("GALLERY_OVERWRITE_ORIGINAL",
189 IDS_FILE_BROWSER_GALLERY_OVERWRITE_ORIGINAL);
190 SET_STRING("GALLERY_PRINT", IDS_FILE_BROWSER_GALLERY_PRINT);
191 SET_STRING("GALLERY_READONLY_WARNING",
192 IDS_FILE_BROWSER_GALLERY_READONLY_WARNING);
193 SET_STRING("GALLERY_NON_WRITABLE_FORMAT_WARNING",
194 IDS_FILE_BROWSER_GALLERY_NON_WRITABLE_FORMAT_WARNING);
195 SET_STRING("GALLERY_REDO", IDS_FILE_BROWSER_GALLERY_REDO);
196 SET_STRING("GALLERY_ROTATE_LEFT", IDS_FILE_BROWSER_GALLERY_ROTATE_LEFT);
197 SET_STRING("GALLERY_ROTATE_RIGHT", IDS_FILE_BROWSER_GALLERY_ROTATE_RIGHT);
198 SET_STRING("GALLERY_SAVED", IDS_FILE_BROWSER_GALLERY_SAVED);
199 SET_STRING("GALLERY_SAVE_FAILED", IDS_FILE_BROWSER_GALLERY_SAVE_FAILED);
200 SET_STRING("GALLERY_SHARE", IDS_FILE_BROWSER_GALLERY_SHARE);
201 SET_STRING("GALLERY_SLIDE", IDS_FILE_BROWSER_GALLERY_SLIDE);
202 SET_STRING("GALLERY_SLIDESHOW", IDS_FILE_BROWSER_GALLERY_SLIDESHOW);
203 SET_STRING("GALLERY_THUMBNAIL", IDS_FILE_BROWSER_GALLERY_THUMBNAIL);
204 SET_STRING("GALLERY_UNDO", IDS_FILE_BROWSER_GALLERY_UNDO);
205 SET_STRING("GALLERY_DONE", IDS_FILE_BROWSER_GALLERY_DONE);
208 void AddStringsForVideoPlayer(base::DictionaryValue* dict) {
209 SET_STRING("VIDEO_PLAYER_LOOPED_MODE", IDS_VIDEO_PLAYER_LOOPED_MODE);
210 SET_STRING("VIDEO_PLAYER_PLAYBACK_ERROR", IDS_VIDEO_PLAYER_PLAYBACK_ERROR);
211 SET_STRING("VIDEO_PLAYER_PLAYING_ON", IDS_VIDEO_PLAYER_PLAYING_ON);
212 SET_STRING("VIDEO_PLAYER_PLAY_ON", IDS_VIDEO_PLAYER_PLAY_ON);
213 SET_STRING("VIDEO_PLAYER_PLAY_THIS_COMPUTER",
214 IDS_VIDEO_PLAYER_PLAY_THIS_COMPUTER);
215 SET_STRING("VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED",
216 IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED);
217 SET_STRING("VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST",
218 IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST);
221 void AddStringsForAudioPlayer(base::DictionaryValue* dict) {
222 SET_STRING("AUDIO_ERROR", IDS_FILE_BROWSER_AUDIO_ERROR);
223 SET_STRING("AUDIO_OFFLINE", IDS_FILE_BROWSER_AUDIO_OFFLINE);
224 SET_STRING("AUDIO_PLAYER_DEFAULT_ARTIST",
225 IDS_FILE_BROWSER_AUDIO_PLAYER_DEFAULT_ARTIST);
226 SET_STRING("AUDIO_PLAYER_TITLE", IDS_FILE_BROWSER_AUDIO_PLAYER_TITLE);
229 void AddStringsForCloudImport(base::DictionaryValue* dict) {
230 SET_STRING("CLOUD_IMPORT_TITLE", IDS_FILE_BROWSER_CLOUD_IMPORT_TITLE);
231 SET_STRING("CLOUD_IMPORT_DESTINATION_FOLDER",
232 IDS_FILE_BROWSER_CLOUD_DESTINATION_FOLDER);
233 SET_STRING("CLOUD_IMPORT_DESCRIPTION",
234 IDS_FILE_BROWSER_CLOUD_IMPORT_DESCRIPTION);
235 SET_STRING("CLOUD_IMPORT_START", IDS_FILE_BROWSER_CLOUD_IMPORT_START);
236 SET_STRING("CLOUD_IMPORT_SHOW_DETAILS",
237 IDS_FILE_BROWSER_CLOUD_IMPORT_SHOW_DETAILS);
238 SET_STRING("CLOUD_IMPORT_COMMAND", IDS_FILE_BROWSER_CLOUD_IMPORT_COMMAND);
239 SET_STRING("CLOUD_IMPORT_CANCEL_COMMAND",
240 IDS_FILE_BROWSER_CLOUD_IMPORT_CANCEL_COMMAND);
242 SET_STRING("CLOUD_IMPORT_STATUS_READY",
243 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_DONE);
244 SET_STRING("CLOUD_IMPORT_STATUS_IMPORTING",
245 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_IMPORTING);
246 SET_STRING("CLOUD_IMPORT_STATUS_INSUFFICIENT_SPACE",
247 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_INSUFFICIENT_SPACE);
248 SET_STRING("CLOUD_IMPORT_STATUS_NO_MEDIA",
249 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_NO_MEDIA);
250 SET_STRING("CLOUD_IMPORT_STATUS_READY",
251 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_READY);
252 SET_STRING("CLOUD_IMPORT_STATUS_SCANNING",
253 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_SCANNING);
254 SET_STRING("CLOUD_IMPORT_ITEMS_REMAINING",
255 IDS_FILE_BROWSER_CLOUD_IMPORT_ITEMS_REMAINING);
257 SET_STRING("CLOUD_IMPORT_TOOLTIP_READY",
258 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_DONE);
259 SET_STRING("CLOUD_IMPORT_TOOLTIP_IMPORTING",
260 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_IMPORTING);
261 SET_STRING("CLOUD_IMPORT_TOOLTIP_INSUFFICIENT_SPACE",
262 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_INSUFFICIENT_SPACE);
263 SET_STRING("CLOUD_IMPORT_TOOLTIP_NO_MEDIA",
264 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_NO_MEDIA);
265 SET_STRING("CLOUD_IMPORT_TOOLTIP_READY",
266 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_READY);
267 SET_STRING("CLOUD_IMPORT_TOOLTIP_SCANNING",
268 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_SCANNING);
271 void AddStringsForCrUiMenuItemShortcuts(base::DictionaryValue* dict) {
272 // Shortcut key names: used from cr.ui.MenuItem.updateShortcut_.
273 SET_STRING("SHORTCUT_ALT", IDS_FILE_BROWSER_SHORTCUT_ALT);
274 SET_STRING("SHORTCUT_CTRL", IDS_FILE_BROWSER_SHORTCUT_CTRL);
275 SET_STRING("SHORTCUT_ENTER", IDS_FILE_BROWSER_SHORTCUT_ENTER);
276 SET_STRING("SHORTCUT_META", IDS_FILE_BROWSER_SHORTCUT_META);
277 SET_STRING("SHORTCUT_SHIFT", IDS_FILE_BROWSER_SHORTCUT_SHIFT);
278 SET_STRING("SHORTCUT_SPACE", IDS_FILE_BROWSER_SHORTCUT_SPACE);
281 void AddStringsForFileErrors(base::DictionaryValue* dict) {
282 SET_STRING("FILE_ERROR_GENERIC", IDS_FILE_BROWSER_FILE_ERROR_GENERIC);
283 SET_STRING("FILE_ERROR_INVALID_MODIFICATION",
284 IDS_FILE_BROWSER_FILE_ERROR_INVALID_MODIFICATION);
285 SET_STRING("FILE_ERROR_INVALID_STATE",
286 IDS_FILE_BROWSER_FILE_ERROR_INVALID_STATE);
287 SET_STRING("FILE_ERROR_NOT_FOUND", IDS_FILE_BROWSER_FILE_ERROR_NOT_FOUND);
288 SET_STRING("FILE_ERROR_NOT_READABLE",
289 IDS_FILE_BROWSER_FILE_ERROR_NOT_READABLE);
290 SET_STRING("FILE_ERROR_NO_MODIFICATION_ALLOWED",
291 IDS_FILE_BROWSER_FILE_ERROR_NO_MODIFICATION_ALLOWED);
292 SET_STRING("FILE_ERROR_PATH_EXISTS", IDS_FILE_BROWSER_FILE_ERROR_PATH_EXISTS);
293 SET_STRING("FILE_ERROR_QUOTA_EXCEEDED",
294 IDS_FILE_BROWSER_FILE_ERROR_QUOTA_EXCEEDED);
295 SET_STRING("FILE_ERROR_SECURITY", IDS_FILE_BROWSER_FILE_ERROR_SECURITY);
298 } // namespace
300 namespace extensions {
302 FileManagerPrivateGetStringsFunction::FileManagerPrivateGetStringsFunction() {
305 FileManagerPrivateGetStringsFunction::~FileManagerPrivateGetStringsFunction() {
308 bool FileManagerPrivateGetStringsFunction::RunSync() {
309 base::DictionaryValue* dict = new base::DictionaryValue();
310 SetResult(dict);
312 AddStringsForDrive(dict);
313 AddStringsForFileTypes(dict);
314 AddStringsForGallery(dict);
315 AddStringsForVideoPlayer(dict);
316 AddStringsForAudioPlayer(dict);
317 AddStringsForCloudImport(dict);
318 AddStringsForCrUiMenuItemShortcuts(dict);
319 AddStringsForFileErrors(dict);
321 SET_STRING("ACTION_LISTEN", IDS_FILE_BROWSER_ACTION_LISTEN);
322 SET_STRING("ACTION_OPEN", IDS_FILE_BROWSER_ACTION_OPEN);
323 SET_STRING("ACTION_OPEN_GDOC", IDS_FILE_BROWSER_ACTION_OPEN_GDOC);
324 SET_STRING("ACTION_OPEN_GSHEET", IDS_FILE_BROWSER_ACTION_OPEN_GSHEET);
325 SET_STRING("ACTION_OPEN_GSLIDES", IDS_FILE_BROWSER_ACTION_OPEN_GSLIDES);
326 SET_STRING("ACTION_VIEW", IDS_FILE_BROWSER_ACTION_VIEW);
327 SET_STRING("ADD_NEW_SERVICES_BUTTON_LABEL",
328 IDS_FILE_BROWSER_ADD_NEW_SERVICES_BUTTON_LABEL);
329 SET_STRING("ALL_FILES_FILTER", IDS_FILE_BROWSER_ALL_FILES_FILTER);
330 SET_STRING("ARCHIVE_MOUNT_FAILED", IDS_FILE_BROWSER_ARCHIVE_MOUNT_FAILED);
331 SET_STRING("CALCULATING_SIZE", IDS_FILE_BROWSER_CALCULATING_SIZE);
332 SET_STRING("CANCEL_LABEL", IDS_FILE_BROWSER_CANCEL_LABEL);
333 SET_STRING("CHANGE_DEFAULT_CAPTION", IDS_FILE_BROWSER_CHANGE_DEFAULT_CAPTION);
334 SET_STRING("CHANGE_DEFAULT_MENU_ITEM",
335 IDS_FILE_BROWSER_CHANGE_DEFAULT_MENU_ITEM);
336 SET_STRING("CLOSE_VOLUME_BUTTON_LABEL",
337 IDS_FILE_BROWSER_CLOSE_VOLUME_BUTTON_LABEL);
338 SET_STRING("CONFIGURE_VOLUME_BUTTON_LABEL",
339 IDS_FILE_BROWSER_CONFIGURE_VOLUME_BUTTON_LABEL);
340 SET_STRING("CONFIRM_MOBILE_DATA_USE",
341 IDS_FILE_BROWSER_CONFIRM_MOBILE_DATA_USE);
342 SET_STRING("CONFIRM_MOBILE_DATA_USE_PLURAL",
343 IDS_FILE_BROWSER_CONFIRM_MOBILE_DATA_USE_PLURAL);
344 SET_STRING("CONFIRM_OVERWRITE_FILE", IDS_FILE_BROWSER_CONFIRM_OVERWRITE_FILE);
345 SET_STRING("CONFLICT_DIALOG_APPLY_TO_ALL",
346 IDS_FILE_BROWSER_CONFLICT_DIALOG_APPLY_TO_ALL);
347 SET_STRING("CONFLICT_DIALOG_KEEP_BOTH",
348 IDS_FILE_BROWSER_CONFLICT_DIALOG_KEEP_BOTH);
349 SET_STRING("CONFLICT_DIALOG_MESSAGE",
350 IDS_FILE_BROWSER_CONFLICT_DIALOG_MESSAGE);
351 SET_STRING("CONFLICT_DIALOG_REPLACE",
352 IDS_FILE_BROWSER_CONFLICT_DIALOG_REPLACE);
353 SET_STRING("COPY_BUTTON_LABEL", IDS_FILE_BROWSER_COPY_BUTTON_LABEL);
354 SET_STRING("COPY_FILESYSTEM_ERROR", IDS_FILE_BROWSER_COPY_FILESYSTEM_ERROR);
355 SET_STRING("COPY_FILE_NAME", IDS_FILE_BROWSER_COPY_FILE_NAME);
356 SET_STRING("COPY_ITEMS_REMAINING", IDS_FILE_BROWSER_COPY_ITEMS_REMAINING);
357 SET_STRING("COPY_PROGRESS_SUMMARY", IDS_FILE_BROWSER_COPY_PROGRESS_SUMMARY);
358 SET_STRING("COPY_SOURCE_NOT_FOUND_ERROR",
359 IDS_FILE_BROWSER_COPY_SOURCE_NOT_FOUND_ERROR);
360 SET_STRING("COPY_TARGET_EXISTS_ERROR",
361 IDS_FILE_BROWSER_COPY_TARGET_EXISTS_ERROR);
362 SET_STRING("COPY_UNEXPECTED_ERROR", IDS_FILE_BROWSER_COPY_UNEXPECTED_ERROR);
363 SET_STRING("CREATE_FOLDER_SHORTCUT_BUTTON_LABEL",
364 IDS_FILE_BROWSER_CREATE_FOLDER_SHORTCUT_BUTTON_LABEL);
365 SET_STRING("CUT_BUTTON_LABEL", IDS_FILE_BROWSER_CUT_BUTTON_LABEL);
366 SET_STRING("DATE_COLUMN_LABEL", IDS_FILE_BROWSER_DATE_COLUMN_LABEL);
367 SET_STRING("DEFAULT_ACTION_LABEL", IDS_FILE_BROWSER_DEFAULT_ACTION_LABEL);
368 SET_STRING("DEFAULT_NEW_FOLDER_NAME",
369 IDS_FILE_BROWSER_DEFAULT_NEW_FOLDER_NAME);
370 SET_STRING("DELETE_BUTTON_LABEL", IDS_FILE_BROWSER_DELETE_BUTTON_LABEL);
371 SET_STRING("DELETE_ERROR", IDS_FILE_BROWSER_DELETE_ERROR);
372 SET_STRING("DELETE_FILE_NAME", IDS_FILE_BROWSER_DELETE_FILE_NAME);
373 SET_STRING("DELETE_ITEMS_REMAINING", IDS_FILE_BROWSER_DELETE_ITEMS_REMAINING);
374 SET_STRING("DELETE_PROGRESS_SUMMARY",
375 IDS_FILE_BROWSER_DELETE_PROGRESS_SUMMARY);
376 SET_STRING("DEVICE_HARD_UNPLUGGED_MESSAGE",
377 IDS_DEVICE_HARD_UNPLUGGED_MESSAGE);
378 SET_STRING("DEVICE_HARD_UNPLUGGED_TITLE", IDS_DEVICE_HARD_UNPLUGGED_TITLE);
379 SET_STRING("DEVICE_UNKNOWN_BUTTON_LABEL", IDS_DEVICE_UNKNOWN_BUTTON_LABEL);
380 SET_STRING("DEVICE_UNKNOWN_DEFAULT_MESSAGE",
381 IDS_DEVICE_UNKNOWN_DEFAULT_MESSAGE);
382 SET_STRING("DEVICE_UNKNOWN_MESSAGE", IDS_DEVICE_UNKNOWN_MESSAGE);
383 SET_STRING("DEVICE_UNSUPPORTED_DEFAULT_MESSAGE",
384 IDS_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE);
385 SET_STRING("DEVICE_UNSUPPORTED_MESSAGE", IDS_DEVICE_UNSUPPORTED_MESSAGE);
386 SET_STRING("DIRECTORY_ALREADY_EXISTS",
387 IDS_FILE_BROWSER_DIRECTORY_ALREADY_EXISTS);
388 SET_STRING("DISABLED_MOBILE_SYNC_NOTIFICATION_ENABLE_BUTTON",
389 IDS_FILE_BROWSER_DISABLED_MOBILE_SYNC_NOTIFICATION_ENABLE_BUTTON);
390 SET_STRING("DISABLED_MOBILE_SYNC_NOTIFICATION_MESSAGE",
391 IDS_FILE_BROWSER_DISABLED_MOBILE_SYNC_NOTIFICATION_MESSAGE);
392 SET_STRING("DOWNLOADS_DIRECTORY_LABEL",
393 IDS_FILE_BROWSER_DOWNLOADS_DIRECTORY_LABEL);
394 SET_STRING("DOWNLOADS_DIRECTORY_WARNING",
395 IDS_FILE_BROWSER_DOWNLOADS_DIRECTORY_WARNING);
396 SET_STRING("DRAGGING_MULTIPLE_ITEMS",
397 IDS_FILE_BROWSER_DRAGGING_MULTIPLE_ITEMS);
398 SET_STRING("ERROR_CREATING_FOLDER", IDS_FILE_BROWSER_ERROR_CREATING_FOLDER);
399 SET_STRING("ERROR_HIDDEN_NAME", IDS_FILE_BROWSER_ERROR_HIDDEN_NAME);
400 SET_STRING("ERROR_INVALID_CHARACTER",
401 IDS_FILE_BROWSER_ERROR_INVALID_CHARACTER);
402 SET_STRING("ERROR_LONG_NAME", IDS_FILE_BROWSER_ERROR_LONG_NAME);
403 SET_STRING("ERROR_PROGRESS_SUMMARY", IDS_FILE_BROWSER_ERROR_PROGRESS_SUMMARY);
404 SET_STRING("ERROR_PROGRESS_SUMMARY_PLURAL",
405 IDS_FILE_BROWSER_ERROR_PROGRESS_SUMMARY_PLURAL);
406 SET_STRING("ERROR_RENAMING", IDS_FILE_BROWSER_ERROR_RENAMING);
407 SET_STRING("ERROR_RESERVED_NAME", IDS_FILE_BROWSER_ERROR_RESERVED_NAME);
408 SET_STRING("ERROR_WHITESPACE_NAME", IDS_FILE_BROWSER_ERROR_WHITESPACE_NAME);
409 SET_STRING("EXTERNAL_STORAGE_DISABLED_MESSAGE",
410 IDS_EXTERNAL_STORAGE_DISABLED_MESSAGE);
411 SET_STRING("FAILED_SPACE_INFO", IDS_FILE_BROWSER_FAILED_SPACE_INFO);
412 SET_STRING("FILENAME_LABEL", IDS_FILE_BROWSER_FILENAME_LABEL);
413 SET_STRING("FILE_ALREADY_EXISTS", IDS_FILE_BROWSER_FILE_ALREADY_EXISTS);
414 SET_STRING("FORMATTING_FINISHED_FAILURE_MESSAGE",
415 IDS_FORMATTING_FINISHED_FAILURE_MESSAGE);
416 SET_STRING("FORMATTING_FINISHED_SUCCESS_MESSAGE",
417 IDS_FORMATTING_FINISHED_SUCCESS_MESSAGE);
418 SET_STRING("FORMATTING_OF_DEVICE_FAILED_TITLE",
419 IDS_FORMATTING_OF_DEVICE_FAILED_TITLE);
420 SET_STRING("FORMATTING_OF_DEVICE_FINISHED_TITLE",
421 IDS_FORMATTING_OF_DEVICE_FINISHED_TITLE);
422 SET_STRING("FORMATTING_OF_DEVICE_PENDING_MESSAGE",
423 IDS_FORMATTING_OF_DEVICE_PENDING_MESSAGE);
424 SET_STRING("FORMATTING_OF_DEVICE_PENDING_TITLE",
425 IDS_FORMATTING_OF_DEVICE_PENDING_TITLE);
426 SET_STRING("FORMATTING_WARNING", IDS_FILE_BROWSER_FORMATTING_WARNING);
427 SET_STRING("FORMAT_DEVICE_BUTTON_LABEL",
428 IDS_FILE_BROWSER_FORMAT_DEVICE_BUTTON_LABEL);
429 SET_STRING("SORT_BUTTON_TOOLTIP", IDS_FILE_BROWSER_SORT_BUTTON_TOOLTIP);
430 SET_STRING("GEAR_BUTTON_TOOLTIP", IDS_FILE_BROWSER_GEAR_BUTTON_TOOLTIP);
431 SET_STRING("HOSTED_OFFLINE_MESSAGE", IDS_FILE_BROWSER_HOSTED_OFFLINE_MESSAGE);
432 SET_STRING("HOSTED_OFFLINE_MESSAGE_PLURAL",
433 IDS_FILE_BROWSER_HOSTED_OFFLINE_MESSAGE_PLURAL);
434 SET_STRING("INSTALL_NEW_EXTENSION_LABEL",
435 IDS_FILE_BROWSER_INSTALL_NEW_EXTENSION_LABEL);
436 SET_STRING("MANY_DIRECTORIES_SELECTED",
437 IDS_FILE_BROWSER_MANY_DIRECTORIES_SELECTED);
438 SET_STRING("MANY_ENTRIES_SELECTED", IDS_FILE_BROWSER_MANY_ENTRIES_SELECTED);
439 SET_STRING("MANY_FILES_SELECTED", IDS_FILE_BROWSER_MANY_FILES_SELECTED);
440 SET_STRING("MORE_ACTIONS", IDS_FILE_BROWSER_MORE_ACTIONS);
441 SET_STRING("MOUNT_ARCHIVE", IDS_FILE_BROWSER_MOUNT_ARCHIVE);
442 SET_STRING("MOVE_FILESYSTEM_ERROR", IDS_FILE_BROWSER_MOVE_FILESYSTEM_ERROR);
443 SET_STRING("MOVE_FILE_NAME", IDS_FILE_BROWSER_MOVE_FILE_NAME);
444 SET_STRING("MOVE_ITEMS_REMAINING", IDS_FILE_BROWSER_MOVE_ITEMS_REMAINING);
445 SET_STRING("MOVE_PROGRESS_SUMMARY", IDS_FILE_BROWSER_MOVE_PROGRESS_SUMMARY);
446 SET_STRING("MOVE_SOURCE_NOT_FOUND_ERROR",
447 IDS_FILE_BROWSER_MOVE_SOURCE_NOT_FOUND_ERROR);
448 SET_STRING("MOVE_TARGET_EXISTS_ERROR",
449 IDS_FILE_BROWSER_MOVE_TARGET_EXISTS_ERROR);
450 SET_STRING("MOVE_UNEXPECTED_ERROR", IDS_FILE_BROWSER_MOVE_UNEXPECTED_ERROR);
451 SET_STRING("MULTIPART_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE",
452 IDS_MULTIPART_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE);
453 SET_STRING("MULTIPART_DEVICE_UNSUPPORTED_MESSAGE",
454 IDS_MULTIPART_DEVICE_UNSUPPORTED_MESSAGE);
455 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_MESSAGE",
456 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_MESSAGE);
457 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL",
458 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL);
459 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_TITLE",
460 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_TITLE);
461 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL",
462 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL);
463 SET_STRING("NAME_COLUMN_LABEL", IDS_FILE_BROWSER_NAME_COLUMN_LABEL);
464 SET_STRING("EMPTY_FOLDER", IDS_FILE_BROWSER_EMPTY_FOLDER);
465 SET_STRING("NEW_FOLDER_BUTTON_LABEL",
466 IDS_FILE_BROWSER_NEW_FOLDER_BUTTON_LABEL);
467 SET_STRING("NEW_WINDOW_BUTTON_LABEL",
468 IDS_FILE_BROWSER_NEW_WINDOW_BUTTON_LABEL);
469 SET_STRING("NO_ACTION_FOR_CRX", IDS_FILE_BROWSER_NO_ACTION_FOR_CRX);
470 SET_STRING("NO_ACTION_FOR_CRX_TITLE",
471 IDS_FILE_BROWSER_NO_ACTION_FOR_CRX_TITLE);
472 SET_STRING("NO_ACTION_FOR_DMG", IDS_FILE_BROWSER_NO_ACTION_FOR_DMG);
473 SET_STRING("NO_ACTION_FOR_EXECUTABLE",
474 IDS_FILE_BROWSER_NO_ACTION_FOR_EXECUTABLE);
475 SET_STRING("NO_ACTION_FOR_FILE", IDS_FILE_BROWSER_NO_ACTION_FOR_FILE);
476 SET_STRING("OFFLINE_COLUMN_LABEL", IDS_FILE_BROWSER_OFFLINE_COLUMN_LABEL);
477 SET_STRING("OFFLINE_HEADER", IDS_FILE_BROWSER_OFFLINE_HEADER);
478 SET_STRING("OFFLINE_MESSAGE", IDS_FILE_BROWSER_OFFLINE_MESSAGE);
479 SET_STRING("OFFLINE_MESSAGE_PLURAL", IDS_FILE_BROWSER_OFFLINE_MESSAGE_PLURAL);
480 SET_STRING("OK_LABEL", IDS_FILE_BROWSER_OK_LABEL);
481 SET_STRING("OPEN_IN_OTHER_DESKTOP_MESSAGE",
482 IDS_FILE_BROWSER_OPEN_IN_OTHER_DESKTOP_MESSAGE);
483 SET_STRING("OPEN_IN_OTHER_DESKTOP_MESSAGE_PLURAL",
484 IDS_FILE_BROWSER_OPEN_IN_OTHER_DESKTOP_MESSAGE_PLURAL);
485 SET_STRING("OPEN_LABEL", IDS_FILE_BROWSER_OPEN_LABEL);
486 SET_STRING("OPEN_WITH_BUTTON_LABEL", IDS_FILE_BROWSER_OPEN_WITH_BUTTON_LABEL);
487 SET_STRING("PASTE_BUTTON_LABEL", IDS_FILE_BROWSER_PASTE_BUTTON_LABEL);
488 SET_STRING("PASTE_INTO_FOLDER_BUTTON_LABEL",
489 IDS_FILE_BROWSER_PASTE_INTO_FOLDER_BUTTON_LABEL);
490 SET_STRING("PREPARING_LABEL", IDS_FILE_BROWSER_PREPARING_LABEL);
491 SET_STRING("REFRESH_BUTTON_LABEL", IDS_FILE_BROWSER_REFRESH_BUTTON_LABEL);
492 SET_STRING("REMOVABLE_DEVICE_DETECTION_TITLE",
493 IDS_REMOVABLE_DEVICE_DETECTION_TITLE);
494 SET_STRING("REMOVABLE_DEVICE_IMPORT_BUTTON_LABEL",
495 IDS_REMOVABLE_DEVICE_IMPORT_BUTTON_LABEL);
496 SET_STRING("REMOVABLE_DEVICE_IMPORT_MESSAGE",
497 IDS_REMOVABLE_DEVICE_IMPORT_MESSAGE);
498 SET_STRING("REMOVABLE_DEVICE_NAVIGATION_BUTTON_LABEL",
499 IDS_REMOVABLE_DEVICE_NAVIGATION_BUTTON_LABEL);
500 SET_STRING("REMOVABLE_DEVICE_NAVIGATION_MESSAGE",
501 IDS_REMOVABLE_DEVICE_NAVIGATION_MESSAGE);
502 SET_STRING("REMOVE_FOLDER_SHORTCUT_BUTTON_LABEL",
503 IDS_FILE_BROWSER_REMOVE_FOLDER_SHORTCUT_BUTTON_LABEL);
504 SET_STRING("RENAME_BUTTON_LABEL", IDS_FILE_BROWSER_RENAME_BUTTON_LABEL);
505 SET_STRING("SAVE_LABEL", IDS_FILE_BROWSER_SAVE_LABEL);
506 SET_STRING("SEARCH_DRIVE_HTML", IDS_FILE_BROWSER_SEARCH_DRIVE_HTML);
507 SET_STRING("SEARCH_NO_MATCHING_FILES_HTML",
508 IDS_FILE_BROWSER_SEARCH_NO_MATCHING_FILES_HTML);
509 SET_STRING("SEARCH_TEXT_LABEL", IDS_FILE_BROWSER_SEARCH_TEXT_LABEL);
510 SET_STRING("TASKS_BUTTON_LABEL", IDS_FILE_BROWSER_TASKS_BUTTON_LABEL);
511 SET_STRING("TOGGLE_HIDDEN_FILES_COMMAND_LABEL",
512 IDS_FILE_BROWSER_TOGGLE_HIDDEN_FILES_COMMAND_LABEL);
513 SET_STRING("SHARE_BUTTON_LABEL", IDS_FILE_BROWSER_SHARE_BUTTON_LABEL);
514 SET_STRING("CHANGE_TO_LISTVIEW_BUTTON_LABEL",
515 IDS_FILE_BROWSER_CHANGE_TO_LISTVIEW_BUTTON_LABEL);
516 SET_STRING("CHANGE_TO_THUMBNAILVIEW_BUTTON_LABEL",
517 IDS_FILE_BROWSER_CHANGE_TO_THUMBNAILVIEW_BUTTON_LABEL);
518 SET_STRING("CANCEL_SELECTION_BUTTON_LABEL",
519 IDS_FILE_BROWSER_CANCEL_SELECTION_BUTTON_LABEL);
520 SET_STRING("SHARE_ERROR", IDS_FILE_BROWSER_SHARE_ERROR);
522 SET_STRING("SIZE_BYTES", IDS_FILE_BROWSER_SIZE_BYTES);
523 SET_STRING("SIZE_COLUMN_LABEL", IDS_FILE_BROWSER_SIZE_COLUMN_LABEL);
524 SET_STRING("SIZE_GB", IDS_FILE_BROWSER_SIZE_GB);
525 SET_STRING("SIZE_KB", IDS_FILE_BROWSER_SIZE_KB);
526 SET_STRING("SIZE_MB", IDS_FILE_BROWSER_SIZE_MB);
527 SET_STRING("SIZE_PB", IDS_FILE_BROWSER_SIZE_PB);
528 SET_STRING("SIZE_TB", IDS_FILE_BROWSER_SIZE_TB);
529 SET_STRING("SPACE_AVAILABLE", IDS_FILE_BROWSER_SPACE_AVAILABLE);
530 SET_STRING("STATUS_COLUMN_LABEL", IDS_FILE_BROWSER_STATUS_COLUMN_LABEL);
531 SET_STRING("SUGGEST_DIALOG_INSTALLATION_FAILED",
532 IDS_FILE_BROWSER_SUGGEST_DIALOG_INSTALLATION_FAILED);
533 SET_STRING("SUGGEST_DIALOG_LINK_TO_WEBSTORE",
534 IDS_FILE_BROWSER_SUGGEST_DIALOG_LINK_TO_WEBSTORE);
535 SET_STRING("SUGGEST_DIALOG_TITLE", IDS_FILE_BROWSER_SUGGEST_DIALOG_TITLE);
536 SET_STRING("SUGGEST_DIALOG_FOR_PROVIDERS_TITLE",
537 IDS_FILE_BROWSER_SUGGEST_DIALOG_FOR_PROVIDERS_TITLE);
538 SET_STRING("SUGGEST_DIALOG_LOADING_SPINNER_ALT",
539 IDS_WEBSTORE_WIDGET_LOADING_SPINNER_ALT);
540 SET_STRING("SUGGEST_DIALOG_INSTALLING_SPINNER_ALT",
541 IDS_WEBSTORE_WIDGET_INSTALLING_SPINNER_ALT);
542 SET_STRING("THUMBNAIL_VIEW_TOOLTIP", IDS_FILE_BROWSER_THUMBNAIL_VIEW_TOOLTIP);
543 SET_STRING("TIME_TODAY", IDS_FILE_BROWSER_TIME_TODAY);
544 SET_STRING("TIME_YESTERDAY", IDS_FILE_BROWSER_TIME_YESTERDAY);
545 SET_STRING("TRANSFER_PROGRESS_SUMMARY",
546 IDS_FILE_BROWSER_TRANSFER_PROGRESS_SUMMARY);
547 SET_STRING("TYPE_COLUMN_LABEL", IDS_FILE_BROWSER_TYPE_COLUMN_LABEL);
548 SET_STRING("UNKNOWN_FILESYSTEM_WARNING",
549 IDS_FILE_BROWSER_UNKNOWN_FILESYSTEM_WARNING);
550 SET_STRING("UNMOUNT_DEVICE_BUTTON_LABEL",
551 IDS_FILE_BROWSER_UNMOUNT_DEVICE_BUTTON_LABEL);
552 SET_STRING("UNMOUNT_FAILED", IDS_FILE_BROWSER_UNMOUNT_FAILED);
553 SET_STRING("UNSUPPORTED_FILESYSTEM_WARNING",
554 IDS_FILE_BROWSER_UNSUPPORTED_FILESYSTEM_WARNING);
555 SET_STRING("UPLOAD_LABEL", IDS_FILE_BROWSER_UPLOAD_LABEL);
556 SET_STRING("WAITING_FOR_SPACE_INFO", IDS_FILE_BROWSER_WAITING_FOR_SPACE_INFO);
557 SET_STRING("ZIP_FILESYSTEM_ERROR", IDS_FILE_BROWSER_ZIP_FILESYSTEM_ERROR);
558 SET_STRING("ZIP_FILE_NAME", IDS_FILE_BROWSER_ZIP_FILE_NAME);
559 SET_STRING("ZIP_ITEMS_REMAINING", IDS_FILE_BROWSER_ZIP_ITEMS_REMAINING);
560 SET_STRING("ZIP_PROGRESS_SUMMARY", IDS_FILE_BROWSER_ZIP_PROGRESS_SUMMARY);
561 SET_STRING("ZIP_SELECTION_BUTTON_LABEL",
562 IDS_FILE_BROWSER_ZIP_SELECTION_BUTTON_LABEL);
563 SET_STRING("ZIP_TARGET_EXISTS_ERROR",
564 IDS_FILE_BROWSER_ZIP_TARGET_EXISTS_ERROR);
565 SET_STRING("ZIP_UNEXPECTED_ERROR", IDS_FILE_BROWSER_ZIP_UNEXPECTED_ERROR);
566 #undef SET_STRING
568 dict->SetBoolean("PDF_VIEW_ENABLED",
569 file_manager::util::ShouldBeOpenedWithPlugin(
570 GetProfile(), FILE_PATH_LITERAL(".pdf")));
571 dict->SetBoolean("SWF_VIEW_ENABLED",
572 file_manager::util::ShouldBeOpenedWithPlugin(
573 GetProfile(), FILE_PATH_LITERAL(".swf")));
574 dict->SetString("CHROMEOS_RELEASE_BOARD",
575 base::SysInfo::GetLsbReleaseBoard());
576 dict->SetString(
577 "DOWNLOADS_LOW_SPACE_WARNING_HELP_URL",
578 base::StringPrintf(kHelpURLFormat, kDownloadsLowSpaceWarningHelpNumber));
579 dict->SetString("FILES_APP_HELP_URL",
580 base::StringPrintf(kHelpURLFormat, kFilesAppHelpNumber));
582 dict->SetString("GOOGLE_DRIVE_BUY_STORAGE_URL", kGoogleDriveBuyStorageUrl);
583 dict->SetString(
584 "GOOGLE_DRIVE_ERROR_HELP_URL",
585 base::StringPrintf(kHelpURLFormat, kGoogleDriveErrorHelpNumber));
586 dict->SetString("GOOGLE_DRIVE_HELP_URL", kGoogleDriveHelpUrl);
587 dict->SetString("GOOGLE_DRIVE_OVERVIEW_URL", kGoogleDriveOverviewUrl);
588 dict->SetString("GOOGLE_DRIVE_REDEEM_URL", kGoogleDriveRedeemUrl);
589 dict->SetString("GOOGLE_DRIVE_ROOT_URL", kGoogleDriveRootUrl);
590 dict->SetString(
591 "NO_ACTION_FOR_FILE_URL",
592 base::StringPrintf(kHelpURLFormat, kNoActionForFileHelpNumber));
593 dict->SetString("UI_LOCALE", extension_l10n_util::CurrentLocaleOrDefault());
595 const std::string& app_locale = g_browser_process->GetApplicationLocale();
596 webui::SetLoadTimeDataDefaults(app_locale, dict);
598 return true;
601 } // namespace extensions