WF-ng introduces some 'yes'/'no' tokens. E.g. [status], [promote], [sticky]. And in the future maybe [page] and [teaser].
Now, imagine this scenario:
- The user creates a 'Textual comparison' condition.
- He types '[node:status]' in the text1 box.
- He types 'yes' in the text2 box.
But there's a problem here:
Since the 'yes' and 'no' string are localized, if the language gets changed for whatever reason, the token will no longer match the english strings 'yes' or 'no.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | loctokens.diff | 1.93 KB | mooffie |
Comments
Comment #1
mooffie commentedPerhaps we should use '1' and '0' instead of 'yes' and 'no'?
Comment #2
fagoor we just remove the t() around yes and no, so backward compatibility would be ensured at least for english users. Thia is the best fix which comes to my mind...
Comment #3
mooffie commentedOK. But before we give up, let's do a little brainstorming:
It's possible to write an upgrade path (that is, hook_update_xxx) that unserializes the data and replaces each '[status]' et all with '[status-text]' (and we'd handle these tokens specially).
Or... if we're lazy, and don't mind being called bad names, and our future boss is surely not to see this, we can simply do
UPDATE workflow_ng_cfgs SET data = REPLACE(data, '[status]', '[STATUS]')and do the aforementioned with the uppercase token versions. Hey, is this your laugh I'm hearing?! :-))OK, I give up, let's just remove the t(). The description has to mention that it's "in English". Patch attached.