Bug 13637 - Make the permission's descriptions translatable in template
Summary: Make the permission's descriptions translatable in template
Status: RESOLVED DUPLICATE of bug 13632
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-28 14:34 UTC by Jonathan Druart
Modified: 2015-02-11 10:32 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2015-01-28 14:34:02 UTC
It could be quite easy to extract the description of the permissions (tables userflags and permissions) into the templates.
They could be translatable like any other strings in templates.

alter table permissions drop column description;
alter table userflags drop column flagdesc;

And in the templates: 
[% IF flag == superlibrarian %]
  Access to all librarian functions
[...]
[% IF code == 'circulate_remaining_permissions' %]
   Remaining circulation permissions
[...]

And delete / move sql files:
  mv installer/data/mysql/en/mandatory/userpermissions.sql installer/data/mysql/userpermissions.sq
  rm installer/data/mysql/LANG/*/userpermissions.*
# same for userflags.sql

Someone against the idea?
Comment 1 Katrin Fischer 2015-01-28 14:40:38 UTC
I think it would make sense to move those descriptions out of the database as they don't change often and it's always a lot of work to add a new permission to all files.

I think the installer bit needs a bit more thought, but is solvable:
Currently if you don't have a mandatory file in the directory, there is no fallback to the en file. So we'd have to have a mechanism like for the sysprefs.sql file that is outside and always loaded, no matter that language you run the installer in.
Comment 2 Jonathan Druart 2015-01-28 14:43:25 UTC
Bernardo, any thoughts? Something you already have developed somewhere else?
Comment 3 Jonathan Druart 2015-02-11 10:32:12 UTC

*** This bug has been marked as a duplicate of bug 13632 ***