Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#10616 closed Uncategorized (duplicate)

Meta.permission does not work with lazy translations

Reported by: apollo13 Owned by: nobody
Component: Contrib apps Version: master
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:


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)

permissions-translations.diff (1.9 KB) - added by Alex 7 years ago.

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Alex

comment:1 Changed 7 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Upon reexamination this is really a dupe of #6460.

comment:2 Changed 7 years ago by hvdklauw

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 Changed 6 years ago by bronger

  • Cc bronger@… 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 Changed 5 years ago by deschler

  • Cc eschler@… added
  • Easy pickings unset
  • Severity set to Normal
  • Type set to Uncategorized

comment:5 Changed 5 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top