Bug 17322 - Translation breaks opac-ics.tt
Summary: Translation breaks opac-ics.tt
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Target Milestone: ---
Assignee: Marc Véron
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 5456
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-20 08:54 UTC by Marc Véron
Modified: 2017-12-07 22:18 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17322 - Translation breaks opac-ics.tt (1.97 KB, patch)
2016-09-20 14:20 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 17322 - Translation breaks opac-ics.tt (2.03 KB, patch)
2016-09-21 09:12 UTC, Josef Moravec
Details | Diff | Splinter Review
[PASSED QA] Bug 17322 - Translation breaks opac-ics.tt (2.09 KB, patch)
2016-09-25 14:03 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2016-09-20 08:54:41 UTC
File opac-ics.tt is broken in translations.

First line says: [% First line will be summary, second line will be description. Avoid indenting. -%]

However, in pootle everything is on one line, and ics won't work on translated pages.

%s %s %s is overdue Your copy of %s (barcode %s) is overdue %s %s is due Your copy of %s (barcode %s) is due back at the library today %s 

See:
http://lists.koha-community.org/pipermail/koha-translate/2016-September/002599.html

Workaround: 
Insert newline character directly into the translation.
http://lists.koha-community.org/pipermail/koha-translate/2016-September/002600.html

Related to Bug 5456 - Create a link to opac-ics.pl
Comment 1 Marc Véron 2016-09-20 14:20:53 UTC
Created attachment 55718 [details] [review]
Bug 17322 - Translation breaks opac-ics.tt

This patch adds newlines to opac-ics.tt that are preserved by the translating process.

To test:
- Apply patch
- Create a translation (perl translate xy-XY)
- With a text editor or poedit, translate misc/translator/po/xy-XY-opac-bootstrap.po
  (it is enough to translate "%s %s %s %s is overdue %sYour copy of........")
- Install language xx-XY and select it for OPAC (perl translate install xy-XY)
- Make sure you have at least a couple of loans, including one overdue
- Go to /cgi-bin/koha/opac-user.pl and click on the link labeled "Download as
  iCal/.ics file"
- Inspect the file in a text editor and/or view the result in a calendar
  appplication. Make sure the data makes sense. Compare it to the english version.
Comment 2 Josef Moravec 2016-09-21 09:12:12 UTC
Created attachment 55733 [details] [review]
Bug 17322 - Translation breaks opac-ics.tt

This patch adds newlines to opac-ics.tt that are preserved by the translating process.

To test:
- Apply patch
- Create a translation (perl translate xy-XY)
- With a text editor or poedit, translate misc/translator/po/xy-XY-opac-bootstrap.po
  (it is enough to translate "%s %s %s %s is overdue %sYour copy of........")
- Install language xx-XY and select it for OPAC (perl translate install xy-XY)
- Make sure you have at least a couple of loans, including one overdue
- Go to /cgi-bin/koha/opac-user.pl and click on the link labeled "Download as
  iCal/.ics file"
- Inspect the file in a text editor and/or view the result in a calendar
  appplication. Make sure the data makes sense. Compare it to the english version.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Works as described
Comment 3 Katrin Fischer 2016-09-25 14:03:54 UTC
Created attachment 55798 [details] [review]
[PASSED QA] Bug 17322 - Translation breaks opac-ics.tt

This patch adds newlines to opac-ics.tt that are preserved by the translating process.

To test:
- Apply patch
- Create a translation (perl translate xy-XY)
- With a text editor or poedit, translate misc/translator/po/xy-XY-opac-bootstrap.po
  (it is enough to translate "%s %s %s %s is overdue %sYour copy of........")
- Install language xx-XY and select it for OPAC (perl translate install xy-XY)
- Make sure you have at least a couple of loans, including one overdue
- Go to /cgi-bin/koha/opac-user.pl and click on the link labeled "Download as
  iCal/.ics file"
- Inspect the file in a text editor and/or view the result in a calendar
  appplication. Make sure the data makes sense. Compare it to the english version.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 4 Kyle M Hall 2016-09-27 11:13:13 UTC
Pushed to master for 16.11, thanks Marc!
Comment 5 Frédéric Demians 2016-09-30 08:50:44 UTC
Pushed in 16.05. Will be in 16.05.05.