OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 | |
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 | |
5 # found in the LICENSE file. | |
6 | |
7 # This script updates the address_input_strings.grdp file based on the strings | |
8 # in libaddressinput. | |
9 | |
10 import os | |
11 | |
12 HEADER = """ | |
13 DO NOT MODIFY. | |
14 | |
15 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.
| |
16 src/third_party/libaddressinput/src/cpp/res/messages.grdp. All modifications | |
17 must be done at https://libaddressinput.googlecode.com/. | |
18 | |
19 """ | |
20 | |
21 script_dir = os.path.dirname(os.path.realpath(__file__)) | |
22 from_file = os.path.abspath(os.path.join( | |
23 script_dir, os.pardir, os.pardir, 'src', 'cpp', 'res', 'messages.grdp')) | |
24 to_file = os.path.abspath(os.path.join( | |
25 script_dir, os.pardir, os.pardir, os.pardir, os.pardir, 'chrome', 'app', | |
26 'address_input_strings.grdp')) | |
27 | |
28 with open(to_file, 'w') as destination: | |
29 with open(from_file, 'r') as source: | |
30 # XML declaration. | |
31 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.
| |
32 # Begin XML comment. | |
33 destination.write(source.readline()) | |
34 destination.write(HEADER) | |
35 destination.write(source.read()) | |
OLD | NEW |