Bug 15662 - String and translatability fix to Label Creator
Summary: String and translatability fix to Label Creator
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-26 02:12 UTC by Aleisha Amohia
Modified: 2017-06-14 22:08 UTC (History)
6 users (show)

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


Attachments
Bug 15662: String and translatability fix to Label Creator (1.93 KB, patch)
2016-01-26 02:15 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 15662: String and translatability fix to Label Creator (2.04 KB, patch)
2016-01-26 14:59 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 15662: String and translatability fix to Label Creator (2.12 KB, patch)
2016-02-05 09:46 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 Aleisha Amohia 2016-01-26 02:12:30 UTC
1) "Please select at least label to delete" - missing a word
2) <strong>[% duplicate_count %] duplicate item(s) found</strong> and removed from batch [% batch_id %] - split string
Comment 1 Aleisha Amohia 2016-01-26 02:15:18 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-01-26 14:59:45 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-01-27 12:17:20 UTC
The translatability issue came from the <strong> tag in the middle of the sentence.
I think we can keep the previous sentence:
  [% duplicate_count %] duplicate item(s) found and removed from batch [% batch_id %].

Which looks better then the new one:
  Duplicate item(s) removed from batch number [% batch_id %]: [% duplicate_count %]

Marc, any thoughts?
Comment 4 Chris Nighswonger 2016-01-27 13:09:36 UTC
(In reply to Jonathan Druart from comment #3)
> The translatability issue came from the <strong> tag in the middle of the
> sentence.
> I think we can keep the previous sentence:
>   [% duplicate_count %] duplicate item(s) found and removed from batch [%
> batch_id %].
> 
> Which looks better then the new one:
>   Duplicate item(s) removed from batch number [% batch_id %]: [%
> duplicate_count %]

The original flows better than the proposed replacement imho.
Comment 5 Aleisha Amohia 2016-01-27 22:05:07 UTC
I changed it so that it would be consistent with the duplicates message for Patron Card Creator, see Bug 15573 which has been pushed
Comment 6 Jonathan Druart 2016-01-29 11:20:27 UTC
I have let a note on bug 15573 comment 9
Comment 7 Kyle M Hall 2016-01-29 18:10:26 UTC
(In reply to Jonathan Druart from comment #6)
> I have let a note on bug 15573 comment 9

This syntax style is based on coding guideline JS4. I think we should retain it for consistencies sake, or update the guidelines to reflect this new stance. Now that we have the format method for strings, this style of wording is no longer necessary.
Comment 8 Chris Nighswonger 2016-01-29 18:22:11 UTC
(In reply to Kyle M Hall from comment #7)
> (In reply to Jonathan Druart from comment #6)
> > I have let a note on bug 15573 comment 9
> 
> This syntax style is based on coding guideline JS4. I think we should retain
> it for consistencies sake, or update the guidelines to reflect this new
> stance. Now that we have the format method for strings, this style of
> wording is no longer necessary.

Reading over JS4, it seems that even that may not cover all cases. It is conceivable that some languages may have syntax which wants the strings at the beginning rather than the end.

That said, I have no problem with it going where ever; just a preference for the original.
Comment 9 Kyle M Hall 2016-01-29 19:23:14 UTC
> Reading over JS4, it seems that even that may not cover all cases. It is
> conceivable that some languages may have syntax which wants the strings at
> the beginning rather than the end.
> 
> That said, I have no problem with it going where ever; just a preference for
> the original.

That sounds like a good argument for updating JS4. Using the format method allows the translator more control over where the numbers would appear. The only limitation would be that they must still be in the same order.
Comment 10 Marcel de Rooy 2016-02-05 09:46:15 UTC
Created attachment 47681 [details] [review]
Bug 15662: String and translatability fix to Label Creator

To test:
1) Go to Tools -> Label Creator -> New label batch
2) Add an item
3) Click 'Remove selected items' button. Confirm message now reads "Please select at least one label to delete."
4) Click 'Remove duplicates' button. Confirm message now reads "Duplicate item(s) removed from batch number X: Y", all in bold.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Rewording Ok for translatability purpose

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Brendan Gallagher 2016-02-24 03:57:53 UTC
Pushed to Master - Should be in the May 2016 release. Thanks!