This patch fixes an awkward string concatenation which prevents correct translations in the permission filter dropdown on the user listing page. We can’t just expect all language to have the same word order as in English. Also, some languages might want to use additional punctuation (e.g. in German, it’s “System-Modul”, not “system Modul”).
| Comment | File | Size | Author |
|---|---|---|---|
| user-filter-dropdown.patch | 817 bytes | kkaefer |
Comments
Comment #1
gábor hojtsyBecause the form output will escape the value anyway, I would not use @, but simply !.
Comment #2
kkaefer commentedNo,
@moduleis better because we already have the exact same string for the exact same use case (headers on the permissions page).Comment #3
Freso commentedPatch applies cleanly and site (D6, fresh from CVS) runs the same as without patch. The patch, however, doesn't change one string to another:
Unless Gábor wants to keep up his critique, I'd say this is RTBC.
Comment #4
Freso commentedI, of course, meant that the patch does change one string () to another (). (I really should go to bed. It's bloody half past one in the morn! Oh well. Time flies by when you're having fun, I guess.)
Comment #5
gábor hojtsyI think if we ever have a module name, which has special HTML chars (I am not sure Drupal recognizes these as modules), we would end up with the module name double escaped due to the use of @ here. As I understand it, @ escapes it and then the select dropdown generation process also escapes it, right? It would be nice to check:
- whether the select dropdown generation actually escapes
- what chars are allowed in module names
Comment #6
Freso commentedI tried adding a
$module = '<>"\'';before thet()-call with thearray('@module' => $module), to test the escaping.The result on the page (admin/user/user - are there other places to test this?) was as such:
<optgroup label="<>"'-MODUL">( is a test translation into Danish)As you can see, the special characters are escaped only once.
I don't know about which characters are allowed in module names.
Comment #7
gábor hojtsyGreat, thanks. Committed then.
Comment #8
kkaefer commentedNote: The module name here is *not* the module name from the .info file but the module identifier.
Comment #9
(not verified) commented