Bug 12020

Summary: Allow translating label-edit-batch hardcoded strings
Product: Koha Reporter: paxed <pasi.kallinen>
Component: I18N/L10NAssignee: paxed <pasi.kallinen>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: trivial    
Priority: P5 - low CC: f.demians, katrin.fischer, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 12020: Allow translating label-edit-batch hardcoded strings
Bug 12020: Allow translating label-edit-batch hardcoded strings
Bug 12020: Allow translating label-edit-batch hardcoded strings

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 Mark 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!