zbraniecki / l20n

Python l20n support library
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

l20n grammar: allow {{.attr}} references #16

Open fabi1cazenave opened 12 years ago

fabi1cazenave commented 12 years ago

In the l20n toolbox, see the Entity Properties section:

<buttonClick "Click me"
    info: "{{buttonClick.title}}"
    title: "In order to press the button use ctrl+{{buttonClick.accesskey}}"
    accesskey: "c">

The l20n markup would be simpler if we could use:

<buttonClick "Click me"
    info: "{{.title}}"
    title: "In order to press the button use ctrl+{{.accesskey}}"
    accesskey: "c">

i.e. {{.foo}} would refer to the entity’s “foo” attribute. Is that possible?

zbraniecki commented 12 years ago

I don't see why not. Sounds like a good addition!