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

Unified Diff: chrome/tools/mac_helpers/infoplist_strings_util.mm

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, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/tools/mac_helpers/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/mac_helpers/infoplist_strings_util.mm
diff --git a/chrome/tools/mac_helpers/infoplist_strings_util.mm b/chrome/tools/mac_helpers/infoplist_strings_util.mm
index 932005f35bf59779c9c2d4c74eec187801005506..61f363e33704a356ae652dc8756e09deff07946a 100644
--- a/chrome/tools/mac_helpers/infoplist_strings_util.mm
+++ b/chrome/tools/mac_helpers/infoplist_strings_util.mm
@@ -15,12 +15,13 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "base/i18n/message_formatter.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
+#include "base/time/time.h"
#include "chrome/grit/chromium_strings.h"
#include "ui/base/resource/data_pack.h"
@@ -257,13 +258,9 @@ int main(int argc, char* const argv[]) {
IDS_AUTOFILL_ADDRESS_BOOK_PROMPT_DESCRIPTION,
"IDS_AUTOFILL_ADDRESS_BOOK_PROMPT_DESCRIPTION");
- base::Time::Exploded exploded_time;
- base::Time::Now().LocalExplode(&exploded_time);
- std::vector<base::string16> replacements;
- replacements.push_back(base::IntToString16(exploded_time.year));
NSString* copyright = base::SysUTF16ToNSString(
- base::ReplaceStringPlaceholders(
- base::SysNSStringToUTF16(copyright_format), replacements, NULL));
+ base::i18n::MessageFormatter::FormatWithNumberedArgs(
+ base::SysNSStringToUTF16(copyright_format), base::Time::Now()));
// For now, assume this is ok for all languages. If we need to, this could
// be moved into generated_resources.grd and fetched.
« no previous file with comments | « chrome/tools/mac_helpers/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698