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

Unified Diff: remoting/tools/remove_official_branding.py

Issue 11150008: Move Chromoting strings to string_resources.grd. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « remoting/tools/json_to_grd.py ('k') | remoting/webapp/_locales.official/ar/messages.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/tools/remove_official_branding.py
diff --git a/remoting/tools/remove_official_branding.py b/remoting/tools/remove_official_branding.py
index 06f9f818389221df5aaad11bf16070dc20f31fca..9d9d4cb4e4e3df201ffebc07bd6032dae6b07c4c 100755
--- a/remoting/tools/remove_official_branding.py
+++ b/remoting/tools/remove_official_branding.py
@@ -17,18 +17,24 @@ def update_xml_node(element):
child.replaceWholeText(
child.data.replace("Chrome Remote Desktop", "Chromoting"))
-def remove_official_branding(input, output):
- xml = minidom.parse(input)
+def remove_official_branding(input_file, output_file):
+ xml = minidom.parse(input_file)
# Remove all translations.
for translations in xml.getElementsByTagName("translations"):
- for translation in xml.getElementsByTagName("translation"):
+ for translation in translations.getElementsByTagName("file"):
translations.removeChild(translation)
+ for outputs in xml.getElementsByTagName("outputs"):
+ for output in outputs.getElementsByTagName("output"):
+ lang = output.getAttribute("lang")
+ if lang and lang != "en":
+ outputs.removeChild(output)
+
# Update branding.
update_xml_node(xml)
- out = file(output, "w")
+ out = file(output_file, "w")
out.write(xml.toxml(encoding = "UTF-8"))
out.close()
« no previous file with comments | « remoting/tools/json_to_grd.py ('k') | remoting/webapp/_locales.official/ar/messages.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698