Translation tool shows [% count %] item(s) are... in translation for koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
Created attachment 63627 [details] [review] Bug 18650 - Translatability: Get rid of tt directive in translation for cat-toolbar.inc Translation tool shows [% count %] item(s) are... in translation for koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc This patch fixes it. To test: - Apply patch - Go to a biblio record with at least 1 item attached - Verify that tooltip for 'Edit > Delete record' shows same text as before (n item(s) are attached...)
Created attachment 63758 [details] [review] Bug 18650 - Translatability: Get rid of tt directive in translation for cat-toolbar.inc Translation tool shows [% count %] item(s) are... in translation for koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc This patch fixes it. To test: - Apply patch - Go to a biblio record with at least 1 item attached - Verify that tooltip for 'Edit > Delete record' shows same text as before (n item(s) are attached...) (Amended to remove superfluous chomps 2017-05-27 mv)
Created attachment 63776 [details] [review] Bug 18650 - Translatability: Get rid of tt directive in translation for cat-toolbar.inc Translation tool shows [% count %] item(s) are... in translation for koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc This patch fixes it. To test: - Apply patch - Go to a biblio record with at least 1 item attached - Verify that tooltip for 'Edit > Delete record' shows same text as before (n item(s) are attached...) (Amended to remove superfluous chomps 2017-05-27 mv) Followed test plan and everything worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Created attachment 63929 [details] [review] Bug 18650 - Translatability: Get rid of tt directive in translation for cat-toolbar.inc Translation tool shows [% count %] item(s) are... in translation for koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc This patch fixes it. To test: - Apply patch - Go to a biblio record with at least 1 item attached - Verify that tooltip for 'Edit > Delete record' shows same text as before (n item(s) are attached...) (Amended to remove superfluous chomps 2017-05-27 mv) Followed test plan and everything worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Marc, it would make more sense to use a TT variable instead of a block.
(In reply to Jonathan Druart from comment #5) > Marc, it would make more sense to use a TT variable instead of a block. Not sure, the block contains text. If I assign a variable containing text, the text is inside the tt directive - and will not be translatable.
Ha yes, you might be right.
I do not understand the problem, please detail and propose a test plan for translators. What I see, before the patch (fr-FR) 5465 #. SCRIPT 5466 #: intranet-tmpl/prog/en/includes/cat-toolbar.inc:1 5467 msgid "" 5468 "%s item(s) are attached to this record. You must delete all items before " 5469 "deleting this record." 5470 msgstr "" 5471 "%s exemplaire(s) sont attachés à cette notice. Vous devez supprimer tous les " 5472 "exemplaires avant de supprimer cette notice." After the patch applied and translate update fr-FR: 592 #. %1$s: END. 593 #. %2$s: IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ). 594 #. %3$s: IF ( count ). 595 #. %4$s: BLOCK delrectitle. 596 #. %5$s: count. 597 #. %6$s: END. 598 #: intranet-tmpl/prog/en/includes/cat-toolbar.inc:191 599 #, fuzzy, c-format 600 msgid "" 601 "%s %s %s %s%s item(s) are attached to this record. You must delete all items " 602 "before deleting this record.%s " 603 msgstr "" 604 "%s exemplaire(s) sont attachés à cette notice. Vous devez supprimer tous les " 605 "exemplaires avant de supprimer cette notice." AND 5465 #. SCRIPT 5466 #: intranet-tmpl/prog/en/includes/cat-toolbar.inc:1 5467 msgid "" 5468 "%s item(s) are attached to this record. You must delete all items before " 5469 "deleting this record." 5470 msgstr "" 5471 "%s exemplaire(s) sont attachés à cette notice. Vous devez supprimer tous les " 5472 "exemplaires avant de supprimer cette notice." What is supposed to be better for translator? Moreover it seems that the problem is the [% count %] in the string, but it is needed to make the sentence translatable correctly in any languages.
Sorry, there was nothing to fix. Mea culpa.