[Koha-bugs] [Bug 22236] New: Translation should generate tags with consistent attribute order

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 30 16:34:40 CET 2019


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 at myacpl.org
          Reporter: m.de.rooy at rijksmuseum.nl
        QA Contact: testopia at 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.


More information about the Koha-bugs mailing list