---- Reported by serhijdubyk@gmail.com 2008-07-04 02:15:06 ---- Way to translate calendar interface in other languages: 1) In files: includes/calendar.inc modules/circ/billing.tmpl modules/circ/pendingreserves.tmpl modules/circ/reserveratios.tmpl modules/tools/export.tmpl make next changes 2) replace string <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-en.js"></script> with next <!-- TMPL_VAR ESCAPE=JS EXPR="'<script type='" -->"<!-- TMPL_VAR ESCAPE=JS EXPR="'text/javascript'" -->"<!-- TMPL_VAR ESCAPE=JS EXPR="' src='" -->"<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-en.js"<!-- TMPL_VAR ESCAPE=JS EXPR="'>'" --></script> 3) In result in po-files we found string-term %s"%s"%s"%s/lib/calendar/calendar-en.js"%s that can be translated, i.e., as next %s"%s"%s"%s/lib/calendar/lang/calendar-uk.js"%s 4) Language pack can be found here: http://sourceforge.net/project/showfiles.php?group_id=75569 (extract lang from jscalendar 1.0, languages work good in calendar.js version in Koha, I tested uk & ru) also some new and updated languages present here: http://sourceforge.net/tracker/?group_id=75569&atid=544287 (I can help with extracting all languages from here and make lang-pack for Koha, contact me - serhijdubyk(fine_symbol)gmail.com) ... I tested such sheme for Koha RC1 - all good ---- Additional Comments From jmf@liblime.com 2008-07-08 17:08:12 ---- This is a good idea, and I'd like to suggest we implement it for rel_3_2, as I think we'd need to do a bit more testing and documenting for translations to get it into 3.0. Thanks! ---- Additional Comments From oleonard@myacpl.org 2008-09-17 08:28:13 ---- The template can be aware of the current language, so why not just do: <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-<!-- TMPL_VAR NAME="language" -->.js"></script> ---- Additional Comments From kyle.m.hall@gmail.com 2008-12-05 09:35:43 ---- I've submitted a patch that ports my dev_week reserves enhancements to Koha 3. ---- Additional Comments From nengard@gmail.com 2009-12-23 17:59:14 ---- This bug hasn't been touched in nearly a year, please revisit and test and close if appropriate. --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:49 UTC --- This bug was previously known as _bug_ 2307 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2307 Actual time not defined. Setting to 0.0 The original reporter of this bug does not have an account here. Reassigning to the person who moved it here: chris@bigballofwax.co.nz. Previous reporter was serhijdubyk@gmail.com.
Created attachment 2351 [details] [review] Proposed fix The idea of using the TMPL_VAR "lang" might work, but would require that all possible language files be included with all templates. This patch copies the calendar's language strings from a standalone javascript file into calendar.inc where they can be translated along with other strings.
Created attachment 2358 [details] screenshot of translated calendar Tested successfully with Koha version 3.01.00.143 and German (de-DE). I tested the calendar display under tools > calendar and the smaller version on the checkout page.
Patch pushed, please test
This bug is mentioned in: Possible fix for Bug 2307, Calendar widget cannot be translated http://lists.koha-community.org/pipermail/koha-patches/2010-December/013260.html
A follow-up is needed for the OPAC.
Created attachment 6604 [details] [review] Follow-up fix Implementing the same fix in the OPAC which we now use in the staff client.
Created attachment 6619 [details] [review] Bug 2307 - Calendar widget cannot be translated Implementing the same fix in the OPAC which we now use in the staff client. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
QA comment: templates change only i've tested that calendar still works after applying the patch. The rest will appear when translations will be updated ! passed QA patch pushed, please test