Summary: | Easier translation of ElasticSearch mappings page | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Templates | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | f.demians, julian.maurice, lucas, martin.renvoize, nick |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 15395 | ||
Bug Blocks: | |||
Attachments: |
Bug 22080 - Easier translation of ElasticSearch mappings page
Bug 22080: [DO NOT PUSH] test code Bug 22080: Easier translation of ElasticSearch mappings page Bug 22080: Easier translation of ElasticSearch mappings page Bug 22080: [DO NOT PUSH] test code Bug 22080: [DO NOT PUSH] test code Bug 22080: Easier translation of ElasticSearch mappings page Bug 22080: (QA Follow-up) Add filters |
Description
Fridolin Somers
2019-01-08 08:51:02 UTC
Created attachment 83705 [details] [review] Bug 22080 - Easier translation of ElasticSearch mappings page Actual translation of ElasticSearch mappings page contains a huge block with a lot of %s. It makes translation hard. This patch adds <span> to split into several translation blocks. Test plan : 1) Compare page with and without patch, check the only difference is span tags. 2) Check HTML is OK with patch. 3) Update a PO file and see new translation blocks. Isn't it a good place to use new translation mechanism introduced by bug #15395 (thanks Julian)? A sample usage is available on bug #21789. (In reply to Frédéric Demians from comment #2) > Isn't it a good place to use new translation mechanism introduced by bug > #15395 (thanks Julian)? A sample usage is available on bug #21789. Absolutely. Fridolin, please look at https://wiki.koha-community.org/wiki/Internationalization,_plural_forms,_context,_and_more_RFC to see how to do it (or ask me directly ;)) Comment on attachment 83705 [details] [review] Bug 22080 - Easier translation of ElasticSearch mappings page I'm creating a new patch with new translate system. Created attachment 83791 [details] [review] Bug 22080: [DO NOT PUSH] test code This code is not generate all messages to template : koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt Created attachment 83792 [details] [review] Bug 22080: Easier translation of ElasticSearch mappings page Actual translation of ElasticSearch mappings page contains a huge block with a lot of %s. It makes translation hard. This patch uses new method from Bug 15395 to split into several translation blocks. Test plan : 1) Apply patch "Bug 22080: [DO NOT PUSH] test code" 2) Apply this patch 3) Enable ElasticSearch in SearchEngine preference 4) Go to Administration > Search engine configuration 5) Check page is OK 6) Update the PO files of a language : perl translate update xx-YY 7) Write translation strings in misc/translator/po/xx-YY-messages.po 8) Install translation : perl translate install xx-YY 9) Check translated page (In reply to Fridolin SOMERS from comment #5) > Created attachment 83791 [details] [review] [review] > Bug 22080: [DO NOT PUSH] test code > > This code is not generate all messages to template : > koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/ > mappings.tt To make the strings easy to see in template, I've added this code to the perl page. Of course, don't sign it nor push it ;) (In reply to Frédéric Demians from comment #2) > Isn't it a good place to use new translation mechanism introduced by bug > #15395 (thanks Julian)? A sample usage is available on bug #21789. This mechanism is great, thanks a lot Julian and Frédéric :D Created attachment 85012 [details] [review] Bug 22080: Easier translation of ElasticSearch mappings page Actual translation of ElasticSearch mappings page contains a huge block with a lot of %s. It makes translation hard. This patch uses new method from Bug 15395 to split into several translation blocks. Test plan : 1) Apply patch "Bug 22080: [DO NOT PUSH] test code" 2) Apply this patch 3) Enable ElasticSearch in SearchEngine preference 4) Go to Administration > Search engine configuration 5) Check page is OK 6) Update the PO files of a language : perl translate update xx-YY 7) Write translation strings in misc/translator/po/xx-YY-messages.po 8) Install translation : perl translate install xx-YY 9) Check translated page Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Works well for me.. signing off.. As a side note, I 'think' the qa script may need updating for the new translation stuff.. currently with this patch it yields: ``` FAIL koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt FAIL filters missing_filter at line 92 ( [% t("Mappings updated successfully.") %]) missing_filter at line 94 ( [% t("Mappings have been reset successfully.") %]) missing_filter at line 81 ( [% t("An error occurred when deleting the existing mappings. Nothing has been changed!") %]) ``` Created attachment 85441 [details] [review] Bug 22080: [DO NOT PUSH] test code This code is not generate all messages to template : koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 85442 [details] [review] Bug 22080: [DO NOT PUSH] test code This code is not generate all messages to template : koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 85443 [details] [review] Bug 22080: Easier translation of ElasticSearch mappings page Actual translation of ElasticSearch mappings page contains a huge block with a lot of %s. It makes translation hard. This patch uses new method from Bug 15395 to split into several translation blocks. Test plan : 1) Apply patch "Bug 22080: [DO NOT PUSH] test code" 2) Apply this patch 3) Enable ElasticSearch in SearchEngine preference 4) Go to Administration > Search engine configuration 5) Check page is OK 6) Update the PO files of a language : perl translate update xx-YY 7) Write translation strings in misc/translator/po/xx-YY-messages.po 8) Install translation : perl translate install xx-YY 9) Check translated page Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 85444 [details] [review] Bug 22080: (QA Follow-up) Add filters Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Awesome work all! Pushed to master for 19.05 Pushed to 18.11.x for 18.11.04 skipping this ES patch in 18.05.x, if I am wrong let me know No problem, its just for translation |