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

Unified Diff: third_party/libaddressinput/chromium/tools/update-strings.py

Issue 304223010: Include upstream libaddressinput strings in Chrome build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a do-not-modify warning header. Created 6 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/build/repack_locales.py ('k') | third_party/libaddressinput/libaddressinput.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libaddressinput/chromium/tools/update-strings.py
diff --git a/third_party/libaddressinput/chromium/tools/update-strings.py b/third_party/libaddressinput/chromium/tools/update-strings.py
new file mode 100755
index 0000000000000000000000000000000000000000..b76cd451f18a6345b66bbd967b30ef314358b363
--- /dev/null
+++ b/third_party/libaddressinput/chromium/tools/update-strings.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This script updates the address_input_strings.grdp file based on the strings
+# in libaddressinput.
+
+import os
+
+HEADER = """
+DO NOT MODIFY.
+
+This file will be overwritten by "gclient runhooks". It is a copy of
Evan Stade 2014/06/03 22:16:10 nit: """ DO NOT MODIFY. This file is generated b
please use gerrit instead 2014/06/03 22:39:02 Done.
+src/third_party/libaddressinput/src/cpp/res/messages.grdp. All modifications
+must be done at https://libaddressinput.googlecode.com/.
+
+"""
+
+script_dir = os.path.dirname(os.path.realpath(__file__))
+from_file = os.path.abspath(os.path.join(
+ script_dir, os.pardir, os.pardir, 'src', 'cpp', 'res', 'messages.grdp'))
+to_file = os.path.abspath(os.path.join(
+ script_dir, os.pardir, os.pardir, os.pardir, os.pardir, 'chrome', 'app',
+ 'address_input_strings.grdp'))
+
+with open(to_file, 'w') as destination:
+ with open(from_file, 'r') as source:
+ # XML declaration.
+ destination.write(source.readline())
Evan Stade 2014/06/03 22:16:10 uhhh, I would do: destination.write(source.readli
please use gerrit instead 2014/06/03 22:39:02 Done.
+ # Begin XML comment.
+ destination.write(source.readline())
+ destination.write(HEADER)
+ destination.write(source.read())
« no previous file with comments | « chrome/tools/build/repack_locales.py ('k') | third_party/libaddressinput/libaddressinput.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698