Bugzilla – Attachment 28276 Details for
Bug 11392
logaction() modulename and action are untranslatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11392: Allow translating the viewlog module and action names
Bug-11392-Allow-translating-the-viewlog-module-and.patch (text/plain), 5.88 KB, created by
Jonathan Druart
on 2014-05-15 11:52:55 UTC
(
hide
)
Description:
Bug 11392: Allow translating the viewlog module and action names
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-05-15 11:52:55 UTC
Size:
5.88 KB
patch
obsolete
>From 3fb7a7d0989159cf166f97404823660ef5b7e608 Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@pttk.fi> >Date: Fri, 9 May 2014 13:40:14 +0300 >Subject: [PATCH] Bug 11392: Allow translating the viewlog module and action > names > >When viewing the logs, the user can see module and action, >such as "SYSTEMPREFERENCE", "MEMBERS" or "CREATE", "MODIFY", etc. >These texts are not translatable. > >This patch allows translating those. It also adds the missing "CREATE" >action to the pulldown. > >To test: > >1) Go browse the system logs. Note the contents of the "Action" and >"Module" -pulldowns, and the contents of those columns in the log table. >2) Apply patch >3) Go browse the system logs again. The pull-downs should work, and >show the same values as before (plus "Create" for Action), and the >Action and Module -columns in the log table should not be in ALL CAPS. >4) cd misc/translator >5) perl translate update xx-YY >6) Check that the po/xx-YY-i-staff-t-prog-v-3006000.po contains the >values for the pull-downs in it. (Look for eg. "System prefs") > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 51 ++++++++++++++------ > 1 file changed, 35 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index 56f1f67..19d0321 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -14,6 +14,33 @@ > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > >+[% BLOCK translate_log_module %] >+[% SWITCH module %] >+[% CASE 'CATALOGUING' %]Catalog >+[% CASE 'AUTHORITIES' %]Authorities >+[% CASE 'MEMBERS' %]Patrons >+[% CASE 'ACQUISITIONS' %]Acquisitions >+[% CASE 'SERIAL' %]Serials >+[% CASE 'CIRCULATION' %]Circulation >+[% CASE 'LETTER' %]Letter >+[% CASE 'FINES' %]Fines >+[% CASE 'SYSTEMPREFERENCE' %]System prefs >+[% CASE %][% module %] >+[% END %] >+[% END %] >+ >+[% BLOCK translate_log_action %] >+[% SWITCH action %] >+[% CASE 'ADD' %]Add >+[% CASE 'DELETE' %]Delete >+[% CASE 'MODIFY' %]Modify >+[% CASE 'ISSUE' %]Checkout >+[% CASE 'RETURN' %]Return >+[% CASE 'CREATE' %]Create >+[% CASE %][% action %] >+[% END %] >+[% END %] >+ > <div id="breadcrumbs"> > <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › > [% IF ( do_it ) %] >@@ -44,26 +71,18 @@ > <label for="modules">Module:</label> > <select name="modules" id="modules" multiple="multiple"> > <option value="" selected="selected">All</option> >- <option value ="CATALOGUING">Catalog</option> >- <option value ="AUTHORITIES">Authorities</option> >- <option value ="MEMBERS">Patrons</option> >- <option value ="ACQUISITION">Acquisitions</option> >- <option value ="SERIAL">Serials</option> >- <option value="CIRCULATION">Circulation</option> >- <option value="LETTER">Letter</option> >- <option value="FINES">Fines</option> >- <option value="SYSTEMPREFERENCE">System prefs</option> >+ [% FOREACH modx IN [ CATALOGUING AUTHORITIES MEMBERS ACQUISITIONS SERIAL CIRCULATION LETTER FINES SYSTEMPREFERENCE ] %] >+ <option value="[% modx %]">[% PROCESS translate_log_module module=modx %]</option> >+ [% END %] > </select> > </li> > <li> > <label for="action">Action:</label> > <select name="action" id="action"> > <option value ="">All</option> >- <option value ="ADD">Add</option> >- <option value ="DELETE">Delete</option> >- <option value ="MODIFY">Modify</option> >- <option value="ISSUE">Checkout</option> >- <option value="RETURN">Return</option> >+ [% FOREACH actx IN [ ADD DELETE MODIFY ISSUE RETURN CREATE ] %] >+ <option value="[% actx %]">[% PROCESS translate_log_action action=actx %]</option> >+ [% END %] > </select> > </li> > <li> >@@ -129,8 +148,8 @@ > <td> > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% IF ( loopro.userfirstname ) || ( loopro.usersurname ) %][% loopro.userfirstname %] [% loopro.usersurname %] ([% loopro.user %]) [% ELSE %][% loopro.user %][% END %]</a> > </td> >- <td>[% loopro.module %]</td> >- <td>[% loopro.action %]</td> >+ <td>[% PROCESS translate_log_module module=loopro.module %]</td> >+ <td>[% PROCESS translate_log_action action=loopro.action %]</td> > <td> > [% IF ( loopro.module == 'MEMBERS' ) || ( loopro.module == 'CIRCULATION' ) || ( loopro.module == 'FINES' ) %] > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> [% IF ( loopro.object ) %][% IF ( loopro.borrowerfirstname ) || ( loopro.borrowersurname ) %][% loopro.borrowerfirstname %] [% loopro.borrowersurname %] ([% loopro.object %]) [% ELSE %]Member [% loopro.object %][% END %][% END %] </a> >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11392
:
28126
|
28191
| 28276