Bug 18650 - Translatability: Get rid of tt directive in translation for cat-toolbar.inc
Summary: Translatability: Get rid of tt directive in translation for cat-toolbar.inc
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Marc Véron
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-22 16:25 UTC by Marc Véron
Modified: 2018-06-04 20:10 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18650 - Translatability: Get rid of tt directive in translation for cat-toolbar.inc (1.92 KB, patch)
2017-05-22 16:30 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18650 - Translatability: Get rid of tt directive in translation for cat-toolbar.inc (1.97 KB, patch)
2017-05-27 05:09 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18650 - Translatability: Get rid of tt directive in translation for cat-toolbar.inc (2.08 KB, patch)
2017-05-28 11:08 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 18650 - Translatability: Get rid of tt directive in translation for cat-toolbar.inc (2.17 KB, patch)
2017-06-02 09:19 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2017-05-22 16:25:45 UTC
Translation tool shows [% count %] item(s) are... in translation for
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
Comment 1 Marc Véron 2017-05-22 16:30:16 UTC
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...)
Comment 2 Marc Véron 2017-05-27 05:09:44 UTC
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)
Comment 3 Alex Buckley 2017-05-28 11:08:56 UTC
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>
Comment 4 Marcel de Rooy 2017-06-02 09:19:47 UTC
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>
Comment 5 Jonathan Druart 2017-06-06 19:54:51 UTC
Marc, it would make more sense to use a TT variable instead of a block.
Comment 6 Marc Véron 2017-06-06 20:21:43 UTC
(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.
Comment 7 Jonathan Druart 2017-06-07 15:12:55 UTC
Ha yes, you might be right.
Comment 8 Jonathan Druart 2017-06-09 12:42:55 UTC
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.
Comment 9 Marc Véron 2017-06-09 15:13:35 UTC
Sorry, there was nothing to fix. Mea culpa.