Bug 20141: Untranslatable string in transport cost matrix
authorPasi Kallinen <pasi.kallinen@joensuu.fi>
Tue, 6 Feb 2018 10:19:17 +0000 (12:19 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 27 Feb 2018 16:53:15 +0000 (13:53 -0300)
Make the "Disable" checkboxes in transport cost matrix translatable

Test plan:

1) Go to Home -> Administration -> Transport cost matrix
2) Click on any cell
3) Note the "Disable" checkbox text
4) Install patch, add a language, translate the text, etc
5) Repeat 1-3, the "Disable" text should now be translated

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt

index ae4ae0f..4376eb6 100644 (file)
 
             $('#celldiv_'+cost_id).html(
                 '<input type="text" name="cost_'+cost_id+'" class="cost_input" size="4" value="'+$.trim(cost)+'" />'+
-                '<br/>Disable <input name="disable_'+cost_id+'" value="1" class="disable_transport_cost" type="checkbox" '+(disabled ? 'checked' : '')+' />'
+                '<br/>' + _("Disable ") + '<input name="disable_'+cost_id+'" value="1" class="disable_transport_cost" type="checkbox" '+(disabled ? 'checked' : '')+' />'
             );
             disable_transport_cost(cost_id, disabled);
         }