Summary: | Add multi-language support to SIP2 | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | SIP2 | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | anne-claire.bernaudin, colin.campbell, kyle, magnus, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12571 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Katrin Fischer
2018-04-09 10:29:26 UTC
If we moved all SIP2 strings into Template Toolkit files it would make translation easy. I would recommend we use TT directly in the SIP2 code and *not* use C4::Templates do to it's cgi-centriticy and the fact that it would add a huge amount of overhead to the SIP server. Also, if we are going this far, we should also allow alternative templates to be specified on a per-login basis in the SIP2 config. Better idea from cait, use YAML and hook into the same translation system as the sysprefs. Still should allow alternatives in the config ; ) This hints at a bug in the SIP2 implementation in Koha. In the SIP2 standard that Katrin references in Comment 1, "language" is listed as a "3-char, fixed length required field". The contents of this field should be the 3-digit language codes that Katrin lists. As fas as I can tell, Koha uses the contents of the borrowers.lang database field for the language, using 000 if the field is not set: http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=C4/SIP/ILS/Patron.pm;h=23c576493fbc6214905efd1297225057a80c537a;hb=HEAD#l252 If a language code like nb-NO is used for the language in SIP2 the language info will have both the wrong length and the wrong format. As far as I can tell, we should have a mapping somewhere from the codes we use in borrowers.lang to the 3-digit codes required by SIP2. Not sure if it makes sense to fix this as part of the present bug or if it should be a separate bug. Hm, I was wondering if we should just response in the lanugage that was set in the request, assuming that it's the language selected on the self check GUI. Maybe a fallback to borrowers.lang? Yes, we'd need to map the Koha language codes to the SIP2 codes in some way. Maybe a YAML system preference? Actually we always return 000 for the language because the language does not get set in the ILS::Patron objectand we fall back on default. Would be interesting to see if self-issue machines take much notice of whats set, what they are configured for may override anything in the response (In reply to Colin Campbell from comment #6) > Actually we always return 000 for the language because the language does not > get set in the ILS::Patron objectand we fall back on default. That has not been my experience. The one time I checked, borrowers.lang was empty and the three-digit language code was missing from the SIP2 response, giving the "fixed length" part of the response the wrong length. I think borrowers.lang was added in 17.05 or 17.11, maybe you are looking at different versions? It's a rather recent addition. Hello, in my opinion, we should only use the language that was set in the request, assuming that it's the language selected on the self check GUI, as Katrin said in Comment #5. All the messages displayed on the selfcheck machines aren't coming from Koha : some messages are sent directly by the selfcheck machine itself. So it would be better to use the language set on the GUI. Best wishes Anne-Claire (from Rennes, France) |