Bug 12020 - Allow translating label-edit-batch hardcoded strings
Summary: Allow translating label-edit-batch hardcoded strings
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: paxed
QA Contact: Katrin Fischer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-01 04:42 UTC by paxed
Modified: 2018-06-04 20:15 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 12020: Allow translating label-edit-batch hardcoded strings (5.38 KB, patch)
2018-03-13 08:02 UTC, paxed
Details | Diff | Splinter Review
Bug 12020: Allow translating label-edit-batch hardcoded strings (5.42 KB, patch)
2018-03-14 17:44 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 12020: Allow translating label-edit-batch hardcoded strings (5.54 KB, patch)
2018-03-20 20:41 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2014-04-01 04:42:39 UTC
$ grep errstr labels/label-edit-batch.pl koha-tmpl/intranet-tmpl/prog/en/modules/labels/*

labels/label-edit-batch.pl:my $errstr = undef;
labels/label-edit-batch.pl:    $errstr = "item(s) not removed from batch $batch_id." if $err;
labels/label-edit-batch.pl:    $errstr = "batch $batch_id was not deleted." if $err;
labels/label-edit-batch.pl:        $errstr = "item(s) not added to batch $batch_id." if $err;
labels/label-edit-batch.pl:        $errstr = "items(s) not added, the error was: Branch is not set, you please set your branch before adding items to a batch";
labels/label-edit-batch.pl:    $errstr = "batch $batch_id not fully de-duplicated." if $duplicate_count == -1;
labels/label-edit-batch.pl:                errstr      => $errstr,
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt:                                <strong>WARNING:</strong> An error was encountered and [% errstr %] Please have your system administrator check the error log for details.
Comment 1 paxed 2018-03-13 08:02:12 UTC
Created attachment 72730 [details] [review]
Bug 12020: Allow translating label-edit-batch hardcoded strings

Move the hardcoded error strings in the batch label edit into the template,
so they can be translated.

Test plan:
1) Apply patch
2) Go to Home -> Tools -> Label edit
3) Create a new batch with some items in it
4) Try to trigger any of the errors, check that the error
   messages look correct
5) Update a language xx-YY
5) Check that the error messages show up in xx-YY-staff-prog.po
Comment 2 M. Tompsett 2018-03-14 17:44:07 UTC
Created attachment 72895 [details] [review]
Bug 12020: Allow translating label-edit-batch hardcoded strings

Move the hardcoded error strings in the batch label edit into the template,
so they can be translated.

Test plan:
1) Apply patch
2) Go to Home -> Tools -> Label edit
3) Create a new batch with some items in it
4) Try to trigger any of the errors, check that the error
   messages look correct
5) Update a language xx-YY
5) Check that the error messages show up in xx-YY-staff-prog.po

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

NOTE: compared po's of master and this with patch. Strings showed up.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Katrin Fischer 2018-03-20 20:38:24 UTC
A little sad that it took us so long to fix that!
Comment 4 Katrin Fischer 2018-03-20 20:41:09 UTC
Created attachment 73111 [details] [review]
Bug 12020: Allow translating label-edit-batch hardcoded strings

Move the hardcoded error strings in the batch label edit into the template,
so they can be translated.

Test plan:
1) Apply patch
2) Go to Home -> Tools -> Label edit
3) Create a new batch with some items in it
4) Try to trigger any of the errors, check that the error
   messages look correct
5) Update a language xx-YY
5) Check that the error messages show up in xx-YY-staff-prog.po

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Changed branch to library in one of the error messages.
Comment 5 Jonathan Druart 2018-03-26 20:34:31 UTC
Pushed to master for 18.05, thanks to everybody involved!