Go to file
Jonathan Druart 9cefbaf964 Bug 18331: Fix CSV export (once and for all!)
I am going to try and explain the problem here in order to make it a
have-to-read for next changes.

There are several things to test when and most of the time we break
something when we try to fix something else.

You have to test different CSV export, not only one. There are not all
processed the same way. For instance acqui/csv/basket.tt does not
contain any strings to translate and the translate script will copy the
original file as it.
But reports/csv/orders_by_budget.tt will not! Indeed it contains "TOTAL"
which will be translated. The generated tt file for the translated
language will remove all the carriage returns! That's why we cannot rely
on TT for newlines (contrary to bug 16914 assumption).

There are two possible methods:
1/ Fix the translate script
=> Hum... nope
2/ Remove all carriage returns and make them explicit by including an
file that only contains 1 carriage return

This second method is implemented in this patch.

How it works: Use the PRE_CHOMP "[%-" and POST_CHOMP "-%]"
(http://www.template-toolkit.org/docs/manual/Config.html#section_PRE_CHOMP_POST_CHOMP)
to remove all the newlines that could be added by TT in the original
(en) files. Then include the new_line.inc to add a new line.
That way original and translated files will behave the same way.
The BLOCK in the csv_headers avoid to have the newlines added, in any
cases. For instance: by default we will have an empty line at the end of
the headers, but the translated headers will not have it.

Test plan:
At least 2 signoffs will be needed, please test carefully!
You will need to generate CSV with at least 2 entries!
Test with the non-translated interface (en) and with the language you
want. To test with a translated language you will *have to*:
- cd misc/translator
- perl translate update LANG
- manually edit the po file, remove the fuzzy tags, correctly translate
the string (do not forget the additional %s in the headers)
- perl translate install LANG
1/ Export basket and basketgroup as CSV
2/ Export late orders as CSV
3/ Export items (from the item search) as CSV
4/ Export the 2 reports "Orders by fund" and "Cash register" as CSV

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8403799c72)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5b1c9cd3f2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2017-09-10 10:33:37 +02:00
C4 Bug 18605: Remove TRUNCATE from C4/HoldsQueue.pm 2017-08-01 07:43:07 +02:00
Koha Bug 18361: [SQUASHED FOR 16.11] Koha::Objects->find should accept composite primary keys 2017-08-16 22:58:34 +02:00
OpenILS Bug 9239 QA follow-up: remove stray debug code 2013-03-16 21:32:34 -04:00
acqui Bug 18716: Remove CGI::param warns from updatesupplier.pl 2017-06-13 08:02:08 +02:00
admin Bug 18632: Remove 'CGI::param called in list context' warnings 2017-08-16 23:19:44 +02:00
api/v1 Bug 17086: Reword borrowers to patrons in Swagger tags for holds 2016-11-22 11:31:08 +00:00
authorities Bug 18019: [QA Follow-up] Also catch the delete from authorities detail 2017-04-02 19:18:25 +02:00
basket Bug 18124: Change the calls to generate and check CSRF tokens 2017-04-02 18:03:53 +02:00
catalogue Bug 18854 - Protect from DOS 2017-07-19 23:17:49 +02:00
cataloguing Bug 17922: Use correct number of digits when replacing date placeholders 2017-02-07 22:18:39 +01:00
circ Bug 18966: Do not deal with duplicate issue_id on checkin 2017-07-28 01:14:36 +02:00
course_reserves Bug 18367 - (QA Followup) Only warn if doing a lookup and not having an item 2017-08-01 07:56:28 +02:00
debian Bug 18554: Adjust a few typos including responsability 2017-07-16 14:47:24 +02:00
docs Bug 7143: [QA Follow-up] Handling tabs 2017-01-22 20:29:05 +01:00
errors Bug 15288: Error pages: Code duplication removal and better translatability 2016-01-27 05:57:34 +00:00
etc Bug 18669 - RewriteCond affecting wrong rule in koha-httpd.conf 2017-06-05 14:54:35 +02:00
installer Increment version for 16.11.11 security release 2017-08-23 19:51:09 +02:00
koha-tmpl Bug 18331: Fix CSV export (once and for all!) 2017-09-10 10:33:37 +02:00
labels Bug 18535 - Clicking 'edit printer profile' in label creator causes software error 2017-05-14 11:52:51 +02:00
members Bug 19079 - XSS Flaws in Membership page 2017-08-20 15:47:21 +02:00
misc Update release notes with security bugs 2017-08-23 21:12:45 +02:00
offline_circ Bug 15902 [QA Followup] - Use Koha::Patrons instead of Koha::Borrowers 2016-09-27 13:53:23 +00:00
opac Bug 16711: OPAC Password recovery: Handling if multiple accounts have the same mail address 2017-08-01 07:18:50 +02:00
patron_lists Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
patroncards Bug 17181: Simplify code 2017-06-28 07:49:04 +02:00
plugins Bug 16586: Koha Plugins: Limit results of GetPlugins by metadata 2016-09-09 12:13:39 +00:00
reports Bug 13452: Fix for plack 2017-06-27 23:26:08 +02:00
reserve Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
reviews Bug 15839: Koha::Reviews - Remove C4::Review residue 2016-09-09 10:31:00 +00:00
rotating_collections Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
serials Bug 18536: [QA Follow-up] Tiny regex simplification 2017-05-21 23:25:47 +02:00
services Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
skel Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00
sms Bug 15258: Fix Perl scripts declaring unused variables 2015-12-30 17:24:45 -07:00
suggestion Bug 18839: Suggestion.pl spelling mistake 2017-08-01 07:27:54 +02:00
svc Bug 17375: Search by dateofbirth - handle invalid dates 2016-10-27 13:18:32 +00:00
t Bug 18976: [16.11] Add missing use statement 2017-08-16 23:50:42 +02:00
tags Bug 16154: CGI->multi_param - Assign a list 2016-04-26 23:16:43 +00:00
test Bug 9819 - 'stopwords'-related code removed 2015-12-30 15:49:35 +00:00
tmp/modified_authorities
…
tools Bug 18577 - Importing a batch using a framework not fully set up causes and endless loop 2017-07-19 23:14:36 +02:00
virtualshelves Bug 15584 - Staff client list errors are incorrectly styled 2017-02-14 22:26:18 +01:00
xt Bug 18746: Add license and remove diag 2017-06-13 07:55:27 +02:00
.editorconfig Bug 12545: Add EditorConfig.org file to the source tree 2014-08-22 11:07:45 -03:00
.htaccess
…
.mailmap Update mailmap - Jonathan Druart 2017-06-29 22:39:52 +02:00
INSTALL Bug 17626: Remove existing install instructions and link to the wiki pages instead 2016-11-22 11:29:07 +00:00
Koha.pm Increment version for 16.11.11 security release 2017-08-23 19:51:09 +02:00
LICENSE Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
Makefile.PL Bug 18373: Re-add UpgradeBackup.pm 2017-04-16 14:28:39 +02:00
README Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
README.md Bug 15465: Fix typo in bugs.k-c.org 2017-06-05 14:20:54 +02:00
README.robots Bug 6411 add another example to README.robots 2011-07-05 14:48:05 +12:00
about.pl Bug 18931 - Follow up - Typo fix in SQL statement 2017-07-28 01:12:13 +02:00
changelanguage.pl Bug 16776: Do not forget external language choice in language switcher 2016-08-10 13:51:33 +00:00
edithelp.pl Bug 16447: Remove occurrence of the borrow permission which does no longer exist 2016-05-05 21:28:14 +00:00
fix-perl-path.PL Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
help.pl Bug 16724: Fix link to the online documentation links 2016-06-24 12:00:42 +00:00
install-CPAN.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
koha_perl_deps.pl bug 10548: fix count of missing required dependencies by koha_perl_deps.pl 2013-07-11 14:03:32 +00:00
kohaversion.pl Bug 13758: Move the Koha version from kohaversion.pl 2015-05-07 11:39:04 -03:00
mainpage.pl Bug 14610 - Add and update scripts 2016-10-26 12:15:14 +00:00
rewrite-config.PL Bug 16222: (QA followup) Add /api dir for the API 2016-04-20 21:18:36 +00:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo