[Bug 34983] New: Retranslating causes changes in locale_data.json
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 Bug ID: 34983 Summary: Retranslating causes changes in locale_data.json Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Actually, nothing may have changed. But the hash keys are processed in random order. We could force ordering them at a slightly slower rate. Advantage would be to see only changes when translations really changed. Actually, the performance changes that I saw were neglectible. The staff po file is converted in about 600-700 ms both ways. Sometimes the one is faster than the other even. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=34983 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 156538 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156538&action=edit Bug 34983: Force a sort order in JSON output of po2json This patch does so by default. If you do not want them sorted, export CANONICAL-0 on the command line. Test plan: Copy a staff PO file from misc/translator to test.po Now run: time misc/translator/po2json test.po > json1 And do: time misc/translator/po2json test.po > json2 Run: diff json1 json2; #They should be the same. Now: export CANONICAL=0 And run: time misc/translator/po2json test.po > json3 And again: time misc/translator/po2json test.po > json4 And run: diff json3 json4; # Lots of changes Remove the created cruft. And signoff :) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- if you test, please check the times reported for the various runs. If you see something unusual, please copy it on the report here. Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156538|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 156712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156712&action=edit Bug 34983: Force a sort order in JSON output of po2json This patch does so by default. If you do not want them sorted, export CANONICAL-0 on the command line. Test plan: Copy a staff PO file from misc/translator to test.po Now run: time misc/translator/po2json test.po > json1 And do: time misc/translator/po2json test.po > json2 Run: diff json1 json2; #They should be the same. Now: export CANONICAL=0 And run: time misc/translator/po2json test.po > json3 And again: time misc/translator/po2json test.po > json4 And run: diff json3 json4; # Lots of changes Remove the created cruft. And signoff :) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34959 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- kyle@docker:~/repos/koha$ time misc/translator/po2json /home/kyle/repos/koha/misc/translator/po/zh-Hant-TW-messages.po > json1 real 0m0.022s user 0m0.011s sys 0m0.011s kyle@docker:~/repos/koha$ time misc/translator/po2json /home/kyle/repos/koha/misc/translator/po/zh-Hant-TW-messages.po > json2 real 0m0.022s user 0m0.015s sys 0m0.008s kyle@docker:~/repos/koha$ diff json1 json2 kyle@docker:~/repos/koha$ export CANONICAL=0 kyle@docker:~/repos/koha$ time misc/translator/po2json /home/kyle/repos/koha/misc/translator/po/zh-Hant-TW-messages.po > json1 real 0m0.022s user 0m0.013s sys 0m0.009s kyle@docker:~/repos/koha$ time misc/translator/po2json /home/kyle/repos/koha/misc/translator/po/zh-Hant-TW-messages.po > json2 real 0m0.023s user 0m0.015s sys 0m0.008s -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 Kyle M Hall <kyle@bywatersolutions.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=34983 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156712|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 157084 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157084&action=edit Bug 34983: Force a sort order in JSON output of po2json This patch does so by default. If you do not want them sorted, export CANONICAL-0 on the command line. Test plan: Copy a staff PO file from misc/translator to test.po Now run: time misc/translator/po2json test.po > json1 And do: time misc/translator/po2json test.po > json2 Run: diff json1 json2; #They should be the same. Now: export CANONICAL=0 And run: time misc/translator/po2json test.po > json3 And again: time misc/translator/po2json test.po > json4 And run: diff json3 json4; # Lots of changes Remove the created cruft. And signoff :) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.05 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- I bet we need to backport for new translation system, like Bug 34959 Pushed to 23.05.x for 23.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.05 |23.11.00,23.05.05,22.11.12 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34983 --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org