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

Side by Side Diff: chrome/browser/ui/webui/help/help_handler.cc

Issue 1996993002: i18n of Copyright line to use locally correct numeric glyphs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add time.h includes, as per review (also merge) Created 4 years, 6 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
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/ui/webui/settings/about_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/help/help_handler.h" 5 #include "chrome/browser/ui/webui/help/help_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "ash/system/chromeos/devicetype_utils.h" 11 #include "ash/system/chromeos/devicetype_utils.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
17 #include "base/i18n/message_formatter.h"
17 #include "base/location.h" 18 #include "base/location.h"
18 #include "base/macros.h" 19 #include "base/macros.h"
19 #include "base/strings/string16.h" 20 #include "base/strings/string16.h"
20 #include "base/strings/string_number_conversions.h"
21 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
22 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
23 #include "base/task_runner_util.h" 23 #include "base/task_runner_util.h"
24 #include "base/time/time.h"
24 #include "base/values.h" 25 #include "base/values.h"
25 #include "build/build_config.h" 26 #include "build/build_config.h"
26 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
27 #include "chrome/browser/chrome_notification_types.h" 28 #include "chrome/browser/chrome_notification_types.h"
28 #include "chrome/browser/obsolete_system/obsolete_system.h" 29 #include "chrome/browser/obsolete_system/obsolete_system.h"
29 #include "chrome/browser/ui/browser.h" 30 #include "chrome/browser/ui/browser.h"
30 #include "chrome/browser/ui/browser_commands.h" 31 #include "chrome/browser/ui/browser_commands.h"
31 #include "chrome/browser/ui/browser_finder.h" 32 #include "chrome/browser/ui/browser_finder.h"
32 #include "chrome/browser/ui/chrome_pages.h" 33 #include "chrome/browser/ui/chrome_pages.h"
33 #include "chrome/common/channel_info.h" 34 #include "chrome/common/channel_info.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 localized_strings->SetString("updateObsoleteSystem", 314 localized_strings->SetString("updateObsoleteSystem",
314 ObsoleteSystem::LocalizedObsoleteString()); 315 ObsoleteSystem::LocalizedObsoleteString());
315 localized_strings->SetString("updateObsoleteSystemURL", 316 localized_strings->SetString("updateObsoleteSystemURL",
316 ObsoleteSystem::GetLinkURL()); 317 ObsoleteSystem::GetLinkURL());
317 318
318 localized_strings->SetString( 319 localized_strings->SetString(
319 "browserVersion", 320 "browserVersion",
320 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, 321 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION,
321 BuildBrowserVersionString())); 322 BuildBrowserVersionString()));
322 323
323 base::Time::Exploded exploded_time;
324 base::Time::Now().LocalExplode(&exploded_time);
325 localized_strings->SetString( 324 localized_strings->SetString(
326 "productCopyright", 325 "productCopyright",
327 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, 326 base::i18n::MessageFormatter::FormatWithNumberedArgs(
328 base::IntToString16(exploded_time.year))); 327 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT),
328 base::Time::Now()));
329 329
330 base::string16 license = l10n_util::GetStringFUTF16( 330 base::string16 license = l10n_util::GetStringFUTF16(
331 IDS_VERSION_UI_LICENSE, base::ASCIIToUTF16(chrome::kChromiumProjectURL), 331 IDS_VERSION_UI_LICENSE, base::ASCIIToUTF16(chrome::kChromiumProjectURL),
332 base::ASCIIToUTF16(chrome::kChromeUICreditsURL)); 332 base::ASCIIToUTF16(chrome::kChromeUICreditsURL));
333 localized_strings->SetString("productLicense", license); 333 localized_strings->SetString("productLicense", license);
334 334
335 #if defined(OS_CHROMEOS) 335 #if defined(OS_CHROMEOS)
336 base::string16 os_license = l10n_util::GetStringFUTF16( 336 base::string16 os_license = l10n_util::GetStringFUTF16(
337 IDS_ABOUT_CROS_VERSION_LICENSE, 337 IDS_ABOUT_CROS_VERSION_LICENSE,
338 base::ASCIIToUTF16(chrome::kChromeUIOSCreditsURL)); 338 base::ASCIIToUTF16(chrome::kChromeUIOSCreditsURL));
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } 739 }
740 740
741 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) { 741 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) {
742 // Remove unnecessary whitespace. 742 // Remove unnecessary whitespace.
743 web_ui()->CallJavascriptFunction( 743 web_ui()->CallJavascriptFunction(
744 "help.HelpPage.setRegulatoryLabelText", 744 "help.HelpPage.setRegulatoryLabelText",
745 base::StringValue(base::CollapseWhitespaceASCII(text, true))); 745 base::StringValue(base::CollapseWhitespaceASCII(text, true)));
746 } 746 }
747 747
748 #endif // defined(OS_CHROMEOS) 748 #endif // defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/ui/webui/settings/about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698