Summary: | logaction() modulename and action are untranslatable | ||
---|---|---|---|
Product: | Koha | Reporter: | paxed <pasi.kallinen> |
Component: | I18N/L10N | Assignee: | 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: | ||
Circulation function: | |||
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
Created attachment 28126 [details] [review] 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") Created attachment 28191 [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> 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? (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. Not sure it is very nice for translators, but a lot of strings are in the same case. Marked as Passed QA. 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> (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 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! |