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

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

Issue 337163002: Check in chrome/app/address_input_strings.grdp. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/tools/build/repack_locales.py ('k') | third_party/libaddressinput/libaddressinput.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright 2014 The Chromium Authors. All rights reserved. 3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This script updates the address_input_strings.grdp file based on the strings 7 # This script updates the address_input_strings.grdp file based on the strings
8 # in libaddressinput. 8 # in libaddressinput.
9 9
10 import os 10 import os
11 import sys 11 import sys
12 12
13 HEADER = """<!-- 13 HEADER = """<!--
14 14
15 DO NOT MODIFY. 15 DO NOT MODIFY.
16 16
17 This file is generated by "gclient runhooks" from 17 This file is generated by
18 third_party/libaddressinput/chromium/tools/update-strings.py from
18 src/third_party/libaddressinput/src/cpp/res/messages.grdp. Submit modifications 19 src/third_party/libaddressinput/src/cpp/res/messages.grdp. Submit modifications
19 to the upstream library at https://libaddressinput.googlecode.com/. 20 to the upstream library at https://libaddressinput.googlecode.com/.
20 21
21 --> 22 -->
22 """ 23 """
23 24
24 script_dir = os.path.dirname(os.path.realpath(__file__)) 25 script_dir = os.path.dirname(os.path.realpath(__file__))
25 from_file = os.path.abspath(os.path.join( 26 from_file = os.path.abspath(os.path.join(
26 script_dir, os.pardir, os.pardir, 'src', 'cpp', 'res', 'messages.grdp')) 27 script_dir, os.pardir, os.pardir, 'src', 'cpp', 'res', 'messages.grdp'))
27 to_file = os.path.abspath(os.path.join( 28 to_file = os.path.abspath(os.path.join(
28 script_dir, os.pardir, os.pardir, os.pardir, os.pardir, 'chrome', 'app', 29 script_dir, os.pardir, os.pardir, os.pardir, os.pardir, 'chrome', 'app',
29 'address_input_strings.grdp')) 30 'address_input_strings.grdp'))
30 31
31 with open(from_file, 'r') as source: 32 with open(from_file, 'r') as source:
32 with open(to_file, 'w') as destination: 33 with open(to_file, 'w') as destination:
33 destination.write(source.readline()) # XML declaration. 34 destination.write(source.readline()) # XML declaration.
34 destination.write(HEADER) 35 destination.write(HEADER)
35 destination.write(source.read()) 36 destination.write(source.read())
OLDNEW
« 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