Bug 11392

Summary: logaction() modulename and action are untranslatable
Product: Koha Reporter: paxed <pasi.kallinen>
Component: I18N/L10NAssignee: paxed <pasi.kallinen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: f.demians, gmcharlt, jonathan.druart
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Allow translating the viewlog module and action names
Bug 11392: Allow translating the viewlog module and action names
Bug 11392: Allow translating the viewlog module and action names

Description paxed 2013-12-13 06:39:47 UTC
When viewing the logs, the user can see module and action, such as "SYSTEMPREFERENCE", "MEMBERS" or "CREATE", "MODIFY", etc. These texts are not translatable.
Comment 1 paxed 2014-05-09 11:22:38 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2014-05-13 03:46:19 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-05-15 11:38:07 UTC
I got

#. %1$s:  INCLUDE 'header.inc' 
#. %2$s:  INCLUDE 'cat-search.inc' 
#. %3$s:  BLOCK translate_log_module 
#. %4$s:     SWITCH module 
#. %5$s:         CASE 'CATALOGUING'  
#. %6$s:         CASE 'AUTHORITIES'  
#. %7$s:         CASE 'MEMBERS'      
#. %8$s:         CASE 'ACQUISITIONS' 
#. %9$s:         CASE 'SERIAL'       
#. %10$s:         CASE 'CIRCULATION'  
#. %11$s:         CASE 'LETTER'       
#. %12$s:         CASE 'FINES'        
#. %13$s:         CASE 'SYSTEMPREFERENCE' 
#. %14$s:         CASE 
#. %15$s:  module 
#. %16$s:     END 
#. %17$s:  END 
#. %18$s:  BLOCK translate_log_action 
#. %19$s:     SWITCH action 
#. %20$s:         CASE 'ADD'    
#. %21$s:         CASE 'DELETE' 
#. %22$s:         CASE 'MODIFY' 
#. %23$s:         CASE 'ISSUE'  
#. %24$s:         CASE 'RETURN' 
#. %25$s:         CASE 'CREATE' 
#. %26$s:         CASE 
#. %27$s:  action 
#. %28$s:     END 
#. %29$s:  END 
#: intranet-tmpl/prog/en/modules/tools/viewlog.tt:13
#, c-format
msgid ""
"%s %s %s %s %sCatalog %sAuthorities %sPatrons %sAcquisitions %sSerials "
"%sCirculation %sLetter %sFines %sSystem prefs %s%s %s %s %s %s %sAdd "
"%sDelete %sModify %sCheckout %sReturn %sCreate %s%s %s %s "
msgstr ""

in the po file. Is it what is expected?
Comment 4 paxed 2014-05-15 11:41:33 UTC
(In reply to Jonathan Druart from comment #3)
> I got
> 
> "%s %s %s %s %sCatalog %sAuthorities %sPatrons %sAcquisitions %sSerials "
> "%sCirculation %sLetter %sFines %sSystem prefs %s%s %s %s %s %s %sAdd "
> "%sDelete %sModify %sCheckout %sReturn %sCreate %s%s %s %s "
> msgstr ""
> 
> in the po file. Is it what is expected?

Yes.
Comment 5 Jonathan Druart 2014-05-15 11:52:26 UTC
Not sure it is very nice for translators, but a lot of strings are in the same case.

Marked as Passed QA.
Comment 6 Jonathan Druart 2014-05-15 11:52:55 UTC
Created attachment 28276 [details] [review]
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>
Comment 7 paxed 2014-05-16 03:54:08 UTC
(In reply to Jonathan Druart from comment #5)
> Not sure it is very nice for translators, but a lot of strings are in the
> same case.
> 

Unless you explicitly insert html entities in between, outside the TT statements, stuff just gets put together like that. See also bug 12221
Comment 8 Galen Charlton 2014-05-23 15:12:40 UTC
Pushed to master and 3.16.x, along with a follow-up that fixes a syntax error in the Template (that maybe TT didn't care about in previous versions?)

Thanks, Pasi!