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

Unified Diff: remoting/webapp/verify-webapp.py

Issue 10703034: Remove 'Enable' button on unsupported platforms. Added 'No hosts' message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated after UX input. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/remoting.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/verify-webapp.py
diff --git a/remoting/webapp/verify-webapp.py b/remoting/webapp/verify-webapp.py
index 038de019cdfa38bd909b011307d7bb1b6b77b583..13883eec66c64c29188449a47f19fbb78f3bc751 100755
--- a/remoting/webapp/verify-webapp.py
+++ b/remoting/webapp/verify-webapp.py
@@ -13,6 +13,7 @@ annotated with the string "i18n-content", for example:
This script also recognises localized strings in HTML and manifest.json files:
HTML: <span i18n-content="PRODUCT_NAME"></span>
+ or ...i18n-value-name-1="BUTTON_NAME"...
manifest.json: __MSG_PRODUCT_NAME__
Note that these forms must be exact; extra spaces are not permitted, though
@@ -39,9 +40,12 @@ prefix /*i18n-content*/
def ExtractTagFromLine(line):
"""Extract a tag from a line of HTML, C++, JS or JSON."""
- # HTML-style
+ # HTML-style (tags)
m = re.search('i18n-content=[\'"]([^\'"]*)[\'"]', line)
if m: return m.group(1)
+ # HTML-style (substitutions)
+ m = re.search('i18n-value-name-[1-9]=[\'"]([^\'"]*)[\'"]', line)
+ if m: return m.group(1)
# C++/Javascript style
m = re.search('/\*i18n-content\*/[\'"]([^\`"]*)[\'"]', line)
if m: return m.group(1)
« no previous file with comments | « remoting/webapp/remoting.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698