Bug 4497

Summary: Acq > Manage suggestions contains untranslated strings
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: I18N/L10NAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris, oleonard
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: screenshot
Bug 4497: Make tabs for managing suggestions translatable
Signed-off patch

Description Chris Cormack 2010-05-21 01:27:53 UTC


---- Reported by katrin.fischer@bsz-bw.de 2010-05-12 21:16:29 ----

Created an attachment
screenshot

/cgi-bin/koha/suggestion/suggestion.pl contains some not translated strings:

Tab headings 'Pending (x)', 'Accepted (x)'... are not translatable.

Choose a reason > Others > 'please note your reason here' is not translatable.

Not sure how to fix this, help or patch welcome :)



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:27 UTC  ---

This bug was previously known as _bug_ 4497 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4497
Imported an attachment (id=2130)

Unknown operating system Windows NT. Setting to default OS "All".
Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
The original submitter of attachment 2130 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Owen Leonard 2010-06-24 19:21:21 UTC
The first problem arises from the fact that the headings are coming straight from the database where they're stored as English strings. The script does "ucfirst(lc( $criteriumvalue))" on the database values ("ACCEPTED," etc).

The second problem I don't understand. The string comes from this markup in the template:

<input type="text" size="31" id="select-other_reason<!-- TMPL_VAR NAME="suggestiontype" -->" name="other_reason<!-- TMPL_VAR NAME="suggestiontype" -->" value="please note your reason here..." />

Why wouldn't the <input>'s value attribute be translated like any other?
Comment 2 Katrin Fischer 2011-03-06 22:12:04 UTC
Problem still existing in master.
Comment 3 Katrin Fischer 2011-07-17 18:58:35 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2011-07-18 12:40:26 UTC
Created attachment 4658 [details] [review]
Signed-off patch

I didn't do the whole translation procedure to test this patch, but it's a simple and straightforward template change that clearly addresses the issue.

It still feels "wrong" to be storing English strings in the database and using template logic to evaluate them, but this patch solves the practical problem.
Comment 5 Chris Cormack 2011-08-01 01:13:08 UTC
Template changes, effecting translations, please test