summaryrefslogtreecommitdiffstats
path: root/chrome/chrome.gyp
diff options
context:
space:
mode:
authorpkotwicz <pkotwicz@chromium.org>2015-05-29 10:18:17 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-29 17:18:43 +0000
commit14d5522c49b0fbd55e92989e54c7ad06e11745ec (patch)
tree51893c4d0d2826f6a9a645e5a173fcc9d9ff0d7b /chrome/chrome.gyp
parent04ed4aa99bbefc2589588e6c0428c688a5669d4c (diff)
downloadchromium_src-14d5522c49b0fbd55e92989e54c7ad06e11745ec.zip
chromium_src-14d5522c49b0fbd55e92989e54c7ad06e11745ec.tar.gz
chromium_src-14d5522c49b0fbd55e92989e54c7ad06e11745ec.tar.bz2
Merge android_strings.grd and android_chrome_strings.grd part 2/2
BUG=484934 TEST=None R=newt TBR=sky (for trivial change to chrome/android/BUILD.gn) Script for merging translations: import os import re # Gets the id from a <translation> tag. def get_id(line): m = re.search(r"id=\"([^\"]*)\"", line) if m == None: return None return m.group(1) src_dir = "chrome/android/java_staging/strings/translations" dst_dir = "chrome/android/java/strings/translations" for f in os.listdir(src_dir): src_path = os.path.join(src_dir, f) dst_path = os.path.join(dst_dir, f.replace("android_strings", "android_chrome_strings")) src_lines = [] with open(src_path) as fin: src_lines = fin.readlines() dst_lines = [] with open(dst_path) as fin: dst_lines = fin.readlines() # Concatenate src_lines and dst_lines. Ensure that we end up with just one # pair of <translationbundle> tags. dst_lines.pop() dst_lines.extend(src_lines[1:]) # Write dst_lines to dst_path skipping duplicate ids ids = set() with open(dst_path, "w") as fout: for line in dst_lines: id = get_id(line) if id == None: fout.write(line) elif not (id in ids): fout.write(line) Review URL: https://codereview.chromium.org/1156833003 Cr-Commit-Position: refs/heads/master@{#331997}
Diffstat (limited to 'chrome/chrome.gyp')
-rw-r--r--chrome/chrome.gyp13
1 files changed, 0 insertions, 13 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 22785ca..7e2f369 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -574,7 +574,6 @@
'dependencies': [
'activity_type_ids_java',
'chrome_resources.gyp:chrome_strings',
- 'chrome_staging_strings_grd',
'chrome_strings_grd',
'chrome_version_java',
'connection_security_helper_security_levels_java',
@@ -624,18 +623,6 @@
],
},
{
- # TODO(pkotwicz): Merge into chrome_strings_grd
- # GN: //chrome/android:chrome_staging_strings_grd
- 'target_name': 'chrome_staging_strings_grd',
- 'type': 'none',
- 'variables': {
- 'grd_file': '../chrome/android/java_staging/strings/android_strings.grd',
- },
- 'includes': [
- '../build/java_strings_grd.gypi',
- ],
- },
- {
# GN: //chrome/android:chrome_strings_grd
'target_name': 'chrome_strings_grd',
'type': 'none',