Koha/misc
Marcel de Rooy fb62e8d1fc 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>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-04 14:40:46 +00:00
..
admin
bin
cronjobs Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema 2019-01-30 11:35:34 +00:00
devel Bug 22048: Use set_password in create_superlibrarian.pl 2019-01-25 20:15:30 +00:00
interface_customization Bug 20647: (alternate) When ILL is enabled the hover effect on the ILL requests button is wrong 2018-08-10 10:38:12 +00:00
load_testing
maintenance Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema 2019-01-30 11:35:34 +00:00
migration_tools Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema 2019-01-30 11:35:34 +00:00
release_notes Correct release notes encoding issues 2018-11-27 12:04:15 +00:00
search_tools Bug 19893: Add pods, remove syspref, add tests for serialization format 2018-11-16 11:04:59 +00:00
translator Bug 22236: Translation should generate tags with consistent attribute order 2019-02-04 14:40:46 +00:00
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl Bug 21719: Fix typos 2018-11-08 02:18:46 +00:00
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl Bug 20893: batchRebuildItemsTables.pl has incorrect parameter 2018-06-29 19:40:16 +00:00
batchRepairMissingBiblionumbers.pl
check_sysprefs.pl Bug 21719: Fix typos 2018-11-08 02:18:46 +00:00
commit_file.pl
export_borrowers.pl
export_records.pl Bug 20486: Add --marc_conditions option to export_records.pl 2018-11-08 02:23:29 +00:00
exportauth.pl
import_patrons.pl Bug 12598: Fix POD 2018-02-16 14:05:18 -03:00
koha-install-log Bug 14302: Remove GRS1 specific code 2018-08-31 11:24:20 +00:00
kohalib.pl
link_bibs_to_authorities.pl Bug 19365: Fix several issues with the Elasticsearch code 2018-11-26 16:11:01 +00:00
mod_zebraqueue.pl
perlmodule_ls.pl
perlmodule_rm.pl
recreateIssueStatistics.pl
sax_parser_print.pl
sax_parser_test.pl
sip_cli_emulator.pl
stage_file.pl