#10616 closed Uncategorized (duplicate)
Meta.permission does not work with lazy translations
Reported by: | Florian Apolloner | Owned by: | nobody |
---|---|---|---|
Component: | Contrib apps | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | bronger@…, eschler@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
http://paste.pocoo.org/show/109432/
Problem is this line:
permissions = ( ("only_own", _("Restrict to own Obj.")), )
As jacob suggested on irc:
<jacobkm> It's probably a simple fix -- just need a smart_unicode() call somewhere. <jacobkm> File a ticket and mark it for the 1.1 milestone; we'll get it done.
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | permissions-translations.diff added |
---|
comment:1 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
As a note to other people getting the "Error binding parameter 0 - probably unsupported type." error.
You can't translate the permission description name in the model, it's inserted in the database so translations will never work that way. (because then the translated string would be entered in the database and on the fly changing of the language would mean you have to update the database for that user and not for others)
comment:3 by , 14 years ago
Cc: | added |
---|
In this case I think storing the description of a permission in the DB is an error. It should be taken from the code while the program runs. That way, it would be easily translatable. Please consider reopen this ticket if you agree.
comment:4 by , 14 years ago
Cc: | added |
---|---|
Easy pickings: | unset |
Severity: | → Normal |
Type: | → Uncategorized |
Upon reexamination this is really a dupe of #6460.