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

Side by Side Diff: chrome/browser/ui/webui/version_ui.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: Trying to fix mac builds, take 2 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
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/version_ui.h" 5 #include "chrome/browser/ui/webui/version_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/i18n/message_formatter.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/webui/version_handler.h" 11 #include "chrome/browser/ui/webui/version_handler.h"
12 #include "chrome/common/channel_info.h" 12 #include "chrome/common/channel_info.h"
13 #include "chrome/common/chrome_content_client.h" 13 #include "chrome/common/chrome_content_client.h"
14 #include "chrome/common/url_constants.h" 14 #include "chrome/common/url_constants.h"
15 #include "chrome/grit/chromium_strings.h" 15 #include "chrome/grit/chromium_strings.h"
16 #include "chrome/grit/generated_resources.h" 16 #include "chrome/grit/generated_resources.h"
17 #include "components/version_info/version_info.h" 17 #include "components/version_info/version_info.h"
18 #include "components/version_ui/version_ui_constants.h" 18 #include "components/version_ui/version_ui_constants.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #else 72 #else
73 html_source->AddString(version_ui::kOSVersion, std::string()); 73 html_source->AddString(version_ui::kOSVersion, std::string());
74 html_source->AddString(version_ui::kFlashPlugin, "Flash"); 74 html_source->AddString(version_ui::kFlashPlugin, "Flash");
75 // Note that the Flash version is retrieve asynchronously and returned in 75 // Note that the Flash version is retrieve asynchronously and returned in
76 // VersionHandler::OnGotPlugins. The area is initially blank. 76 // VersionHandler::OnGotPlugins. The area is initially blank.
77 html_source->AddString(version_ui::kFlashVersion, std::string()); 77 html_source->AddString(version_ui::kFlashVersion, std::string());
78 #endif // defined(OS_ANDROID) 78 #endif // defined(OS_ANDROID)
79 79
80 html_source->AddLocalizedString(version_ui::kCompany, 80 html_source->AddLocalizedString(version_ui::kCompany,
81 IDS_ABOUT_VERSION_COMPANY_NAME); 81 IDS_ABOUT_VERSION_COMPANY_NAME);
82 base::Time::Exploded exploded_time;
83 base::Time::Now().LocalExplode(&exploded_time);
84 html_source->AddString( 82 html_source->AddString(
85 version_ui::kCopyright, 83 version_ui::kCopyright,
86 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, 84 base::i18n::MessageFormatter::FormatWithNumberedArgs(
87 base::IntToString16(exploded_time.year))); 85 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT),
86 base::Time::Now()));
88 html_source->AddLocalizedString(version_ui::kRevision, 87 html_source->AddLocalizedString(version_ui::kRevision,
89 IDS_VERSION_UI_REVISION); 88 IDS_VERSION_UI_REVISION);
90 html_source->AddString(version_ui::kCL, version_info::GetLastChange()); 89 html_source->AddString(version_ui::kCL, version_info::GetLastChange());
91 html_source->AddLocalizedString(version_ui::kOfficial, 90 html_source->AddLocalizedString(version_ui::kOfficial,
92 version_info::IsOfficialBuild() 91 version_info::IsOfficialBuild()
93 ? IDS_VERSION_UI_OFFICIAL 92 ? IDS_VERSION_UI_OFFICIAL
94 : IDS_VERSION_UI_UNOFFICIAL); 93 : IDS_VERSION_UI_UNOFFICIAL);
95 #if defined(ARCH_CPU_64_BITS) 94 #if defined(ARCH_CPU_64_BITS)
96 html_source->AddLocalizedString(version_ui::kVersionBitSize, 95 html_source->AddLocalizedString(version_ui::kVersionBitSize,
97 IDS_VERSION_UI_64BIT); 96 IDS_VERSION_UI_64BIT);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // Set up the chrome://theme/ source. 171 // Set up the chrome://theme/ source.
173 ThemeSource* theme = new ThemeSource(profile); 172 ThemeSource* theme = new ThemeSource(profile);
174 content::URLDataSource::Add(profile, theme); 173 content::URLDataSource::Add(profile, theme);
175 #endif 174 #endif
176 175
177 WebUIDataSource::Add(profile, CreateVersionUIDataSource()); 176 WebUIDataSource::Add(profile, CreateVersionUIDataSource());
178 } 177 }
179 178
180 VersionUI::~VersionUI() { 179 VersionUI::~VersionUI() {
181 } 180 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698