| 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)
|
|
|