megamanfx / grit-i18n

Automatically exported from code.google.com/p/grit-i18n
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Substitutions fail when a tag exists which is a valid infix substring of another tag #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. In the chromium sources, edit src/chrome/app/policy/policy_templates.json
2. Rename some name within <ph> so that it becomes a valid infix string of 
another name

(e.g. rename EXTENSION_NAME_EXAMPLE to EXTENSION_POLICY_EXAMPLE_NAME, which now 
has EXTENSION_POLICY_EXAMPLE as a valid prefix)

3. build policy_templates

BaseMessage in tools/grit/grit/tclib.py will build a regex in an undefined 
order, that can split on EXTENSION_POLICY_EXAMPLE first and will break 
EXTENSION_POLICY_EXAMPLE_NAME into "EXTENSION_POLICY_EXAMPLE" and "_NAME", 
which is not what is intended.

Original issue reported on code.google.com by joaodasilva@chromium.org on 2 May 2012 at 2:25

GoogleCodeExporter commented 9 years ago

Original comment by joaodasilva@chromium.org on 2 May 2012 at 3:28