I propose that we update the item type translation process in order to avoid using a Greybox modal. We can just as easily move from page to page as the process progresses.
Created attachment 184188 [details] [review] Bug 40418: Update the item type translation process to avoid Greybox modal This patch updates the item type translation process so that it takes place on a separate standalone page instead of in a Greybox modal. Although currently only item types can be translated in this way, the original plan was to expand the range of data that could be translated. For this reason I used [% SWITCH %] in localization.tt for determining whether to use the term "item type." This accommodates, I hope, expansion of the feature. To test you must have more than one installed translation. - Apply the patch and go to Administration -> Item types. - Edit an item type. - On the "Description" line, click "Translate into other languages." - You should be redirected to a new page, "Add translations for item type 'XXX.' - Confirm that the page title, breadcrumbs, and heading are correct. - Test the process of adding and deleting a translation. - Test the process of performing an inline edit of an existing translation by clicking the table cell. - Test that the "Return to item type 'XXX'" button returns you to the item type you were editing. Sponsored-by: Athens County Public Libraries
I had some trouble with "Test the process of performing an inline edit of an existing translation by clicking the table cell." I had never noticed this was possible! It seems you can't modify it right after adding it? - From the item types list, click "Edit" next to Maps - Click "Translate into other languages" - Choose language (fr-CA) - Enter "Cartes" in translation - Click "Add" - Double click "Cartes" to change it --> Nothing happens - Click "Return to item type 'MP'" - Click "Translate into other languages" - Double click "Cartes" to change it --> Now it's OK, but not very visible that the cell is editable now - Change to "Cartes géographiques" - Click outside the table I wonder if this is a functionality worth keeping. It's very rare that table cells are editable in Koha in general (only point of sale uses it I think?)
I think you're absolutely right that the feature is unusual. I find that the issue with not being able to edit a newly-added translation happens in master as well. I think these are issues which should be addressed outside this bug.
Created attachment 184376 [details] [review] Bug 40418: Update the item type translation process to avoid Greybox modal This patch updates the item type translation process so that it takes place on a separate standalone page instead of in a Greybox modal. Although currently only item types can be translated in this way, the original plan was to expand the range of data that could be translated. For this reason I used [% SWITCH %] in localization.tt for determining whether to use the term "item type." This accommodates, I hope, expansion of the feature. To test you must have more than one installed translation. - Apply the patch and go to Administration -> Item types. - Edit an item type. - On the "Description" line, click "Translate into other languages." - You should be redirected to a new page, "Add translations for item type 'XXX.' - Confirm that the page title, breadcrumbs, and heading are correct. - Test the process of adding and deleting a translation. - Test the process of performing an inline edit of an existing translation by clicking the table cell. - Test that the "Return to item type 'XXX'" button returns you to the item type you were editing. Sponsored-by: Athens County Public Libraries Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Alright! I added my so
(In reply to Owen Leonard from comment #3) > I think you're absolutely right that the feature is unusual. I find that the > issue with not being able to edit a newly-added translation happens in > master as well. Yes, it has always been like that.
1. There is a JS error: "Uncaught TypeError: antiClickjack is null" on http://localhost:8081/cgi-bin/koha/admin/localization.pl?entity=itemtypes&code=BK 2. "Return to item type" is a button, shouldn't it be a link instead? 3. When I edit and save: Entity itemtypes (code BK) for lang fr-FR has correctly been updated with 'Français (fr-FR)English (en)हिन्दी (hi)Deutsch (de-DE)Català (ca-ES)Español (es-ES)Svenska (sv-SE)' 4. The confirmation message shows up then hides. Shouldn't we keep it displayed? (not a behaviour change)
(In reply to Jonathan Druart from comment #7) > 1. There is a JS error: "Uncaught TypeError: antiClickjack is null" Will fix in a follow-up. > 2. "Return to item type" is a button, shouldn't it be a link instead? We're not consistent, and there isn't an official guideline for this. Sometimes we use a button and sometimes we use a link. > 3. When I edit and save: Entity itemtypes (code BK) for lang fr-FR has > correctly been updated with 'Français (fr-FR)English (en)हिन्दी (hi)Deutsch > (de-DE)Català (ca-ES)Español (es-ES)Svenska (sv-SE)' This is an existing bug which is fixed in Bug 40453 > 4. The confirmation message shows up then hides. Shouldn't we keep it > displayed? (not a behaviour change) I think that's outside the scope of this bug, but worth a discussion.
Created attachment 184447 [details] [review] Bug 40418: (follow-up) Remove popup flag from INCLUDE