[Bug 22236] New: Translation should generate tags with consistent attribute order
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Bug ID: 22236 Summary: Translation should generate tags with consistent attribute order Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Target Milestone: --- When running misc/translator/translate, the order of attributes in the translated templates is not consistent and may vary. This is caused by the random order of hash keys in perl. This causes things like this in run 1: <input type="submit" class="btn" value="Plaats aanvraag" /> And this in run 2: <input value="Plaats aanvraag" type="submit" class="btn" /> As you can see, there is actually no difference apart from the order. When comparing the result of various translation runs, I would rather get rid of such noise and only see the real changes. The needed change is not trivial to find, but only requires a simple addition to a sort operation in tmpl_process3.pl. The current sort only makes sure that the '/' comes at the end. We should sort the names of the keys too when this value is 0 (just meaning: no end tag symbol). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |m.de.rooy@rijksmuseum.nl Patch complexity|--- |Small patch Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 84532 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84532&action=edit Bug 22236: Translation should generate tags with consistent attribute order When running misc/translator/translate, the order of attributes in the translated templates is not consistent and may vary. This is caused by the random order of hash keys in perl. This causes things like this in run 1: <input type="submit" class="btn" value="Plaats aanvraag" /> And this in run 2: <input value="Plaats aanvraag" type="submit" class="btn" /> As you can see, there is actually no difference apart from the order. When comparing the result of various translation runs, I would rather get rid of such noise and only see the real changes. The needed change is not trivial to find, but only requires a simple addition to a sort operation in tmpl_process3.pl. The current sort only makes sure that the '/' comes at the end. We should sort the names of the keys too when this value is 0 (just meaning: no end tag symbol). Test plan: [1] Run a translation without this patch and set a few templates aside. [2] Run a translation with this patch. [3] Run a compare (diff) on the templates copied in step 1. Verify that the only changes are found in the sort order of attributes in html tags. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Pierre-Marc Thibault <pierre-marc.thibault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84532|0 |1 is obsolete| | --- Comment #2 from Pierre-Marc Thibault <pierre-marc.thibault@inlibro.com> --- Created attachment 84652 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84652&action=edit Bug 22236: Translation should generate tags with consistent attribute order When running misc/translator/translate, the order of attributes in the translated templates is not consistent and may vary. This is caused by the random order of hash keys in perl. This causes things like this in run 1: <input type="submit" class="btn" value="Plaats aanvraag" /> And this in run 2: <input value="Plaats aanvraag" type="submit" class="btn" /> As you can see, there is actually no difference apart from the order. When comparing the result of various translation runs, I would rather get rid of such noise and only see the real changes. The needed change is not trivial to find, but only requires a simple addition to a sort operation in tmpl_process3.pl. The current sort only makes sure that the '/' comes at the end. We should sort the names of the keys too when this value is 0 (just meaning: no end tag symbol). Test plan: [1] Run a translation without this patch and set a few templates aside. [2] Run a translation with this patch. [3] Run a compare (diff) on the templates copied in step 1. Verify that the only changes are found in the sort order of attributes in html tags. Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Pierre-Marc Thibault <pierre-marc.thibault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |pierre-marc.thibault@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84652|0 |1 is obsolete| | --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 84655 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84655&action=edit Bug 22236: Translation should generate tags with consistent attribute order When running misc/translator/translate, the order of attributes in the translated templates is not consistent and may vary. This is caused by the random order of hash keys in perl. This causes things like this in run 1: <input type="submit" class="btn" value="Plaats aanvraag" /> And this in run 2: <input value="Plaats aanvraag" type="submit" class="btn" /> As you can see, there is actually no difference apart from the order. When comparing the result of various translation runs, I would rather get rid of such noise and only see the real changes. The needed change is not trivial to find, but only requires a simple addition to a sort operation in tmpl_process3.pl. The current sort only makes sure that the '/' comes at the end. We should sort the names of the keys too when this value is 0 (just meaning: no end tag symbol). Test plan: [1] Run a translation without this patch and set a few templates aside. [2] Run a translation with this patch. [3] Run a compare (diff) on the templates copied in step 1. Verify that the only changes are found in the sort order of attributes in html tags. Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Josef Moravec from comment #3)
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Thanks Pierre-Marc and Josef ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Pushed to Master |Pushed to Stable --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice fix, Pushed to 18.11.x for 18.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 18.05.x for 18.05.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22236 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- I prefer not risk backporting to oldoldstable 17.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org