L20n/Features/Conditional blocks
goal
allow for entities to be enabled only for some screen sizes, operating systems, languages etc.
examples
Basically there are two concepts here. One is to group a list of entities into some form of "if" block, another is to make @import command work only when a pattern matches.
Use cases here are entities that are used only for a given operating system (mac or win only), or different entities for different screen sizes (if screen width is below 480, use shorter entities).
For the block cases, the syntax might look similar to this:
if (@width<600 && @locale="pl") {
<title "Short text">
<windowDesc "About this app">
}
of course it's entirely possible to achieve the same with index and globals:
<title[@width<600 ? 'long' : 'short'] {
short: "Settings",
long: "Settings Manager"
}>
This syntax would also allow for @import commands to be encapsulated within such a conditional block.
status
- stas - ?
- gandalf - for
- pike - ?
This is needed for multilocale resources (Gaia)