Description
Katrin Fischer
2015-05-24 14:25:08 UTC
This is a bigger problem - also other CSV exports suffer from this: basket, late orders, serial claims. Created attachment 39465 [details] [review] Bug 14263: Fix export of item search results when translated This csv does not use the correct way to display headers. They should be put in a separate file to get a correct display. Without this patch, the first line of the generated file contains the headers + data Test plan: 1/ choose a language and update + translate the templates for instance: cd misc/translate; ./translate update es-ES; ./translate install es-ES 2/ Go to the item search form using this language 3/ Launch a search and select CSV to display the results. The CSV headers should be correct (In reply to Katrin Fischer from comment #1) > This is a bigger problem - also other CSV exports suffer from this: basket, > late orders, serial claims. Should work for basket and serial claims. See bug 14169 for late orders. (In reply to Jonathan Druart from comment #3) > (In reply to Katrin Fischer from comment #1) > > This is a bigger problem - also other CSV exports suffer from this: basket, > > late orders, serial claims. > > Should work for basket and serial claims. > See bug 14169 for late orders. See bug 14264! I can't make it working properly. Without the patch: 1 unique line. With it: 2 lines, one for field name, one for all records aggregated. Created attachment 39532 [details] [review] Bug 14263: Fix export of item search results when translated This csv does not use the correct way to display headers. They should be put in a separate file to get a correct display. Without this patch, the first line of the generated file contains the headers + data Test plan: 1/ choose a language and update + translate the templates for instance: cd misc/translate; ./translate update es-ES; ./translate install es-ES 2/ Go to the item search form using this language 3/ Launch a search and select CSV to display the results. The CSV headers should be correct Actually(In reply to Frédéric Demians from comment #5) > I can't make it working properly. Without the patch: 1 unique line. With it: > 2 lines, one for field name, one for all records aggregated. Sorry about that, I tested with a wrong record. This patch is dirty but works as expected. (In reply to Jonathan Druart from comment #7) > Actually(In reply to Frédéric Demians from comment #5) > > I can't make it working properly. Without the patch: 1 unique line. With it: > > 2 lines, one for field name, one for all records aggregated. > > Sorry about that, I tested with a wrong record. > This patch is dirty but works as expected. Yes, your workaround reintroduces newlines required by CSV format. In the first place, the template toolkit translation machinery is the culprit, but can't be fixed that easily, unfortunately. Created attachment 39533 [details] [review] Bug 14263: Fix export of item search results when translated This csv does not use the correct way to display headers. They should be put in a separate file to get a correct display. Without this patch, the first line of the generated file contains the headers + data Test plan: 1/ choose a language and update + translate the templates for instance: cd misc/translate; ./translate update es-ES; ./translate install es-ES 2/ Go to the item search form using this language 3/ Launch a search and select CSV to display the results. The CSV headers should be correct Signed-off-by: Frederic Demians <f.demians@tamil.fr> Seen the bug. Works as described. Should this be set to Signed-off? Thanks Marc! Created attachment 39718 [details] [review] [PASSED QA] Bug 14263: Fix export of item search results when translated This csv does not use the correct way to display headers. They should be put in a separate file to get a correct display. Without this patch, the first line of the generated file contains the headers + data Test plan: 1/ choose a language and update + translate the templates for instance: cd misc/translate; ./translate update es-ES; ./translate install es-ES 2/ Go to the item search form using this language 3/ Launch a search and select CSV to display the results. The CSV headers should be correct Signed-off-by: Frederic Demians <f.demians@tamil.fr> Seen the bug. Works as described. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Thx for the quick fix! Patch pushed to master. Thanks Jonathan! Pushed to 3.20.x will be in 3.20.1 Pushed to 3.18.x, will be in 3.18.10. |