Bugzilla – Attachment 19818 Details for
Bug 10576
Untranslatable strings in additem.js
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10576 - Untranslatable strings in additem.js
Bug-10576---Untranslatable-strings-in-additemjs.patch (text/plain), 3.26 KB, created by
Chris Cormack
on 2013-07-20 03:50:43 UTC
(
hide
)
Description:
Bug 10576 - Untranslatable strings in additem.js
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-07-20 03:50:43 UTC
Size:
3.26 KB
patch
obsolete
>From dc026d35d282b475b75f4d17f84553da493cc05c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 11 Jul 2013 10:53:06 -0400 >Subject: [PATCH] Bug 10576 - Untranslatable strings in additem.js > >There are a couple of untranslatable strings in additem.js. This patch >moves the strings out of the script and into the include file which has >been created for this purpose. > >To test, apply the patch and test the process for adding an item to an >existing or new basket (with AcqCreateItem set to "when placing an >order." > >The add item form should be correctly labeled "Add item." After adding >an item, click to edit it again. The form should now be labeled "Update >item." > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/js/additem.js | 5 ++--- > 2 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc >index 5ab37f4..28d39e4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc >@@ -1,5 +1,7 @@ > <script type="text/javascript"> > //<![CDATA[ >+var MSG_ADDITEM_JS_ADDITEM = _("Add item"); >+var MSG_ADDITEM_JS_UPDATEITEM = _("Update item"); > var MSG_ADDITEM_JS_EDIT = _("Edit"); > var MSG_ADDITEM_JS_DELETE = _("Delete"); > var MSG_ADDITEM_JS_CLEAR = _("Clear"); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js >index 1cea437..aa19155 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js >@@ -12,7 +12,7 @@ function addItem( node, unique_item_fields ) { > if ( current_qty < max_qty - 1 ) > cloneItemBlock(index, unique_item_fields); > addItemInList(index, unique_item_fields); >- $("#" + index).find("input[name='buttonPlus']").val("Update"); >+ $("#" + index).find("input[name='buttonPlus']").val( (window.MSG_ADDITEM_JS_UPDATEITEM || "Update item") ); > $("#quantity").val(current_qty + 1).change(); > } else if ( current_qty >= max_qty ) { > alert(window.MSG_ADDITEM_JS_CANT_RECEIVE_MORE_ITEMS >@@ -135,8 +135,7 @@ function cloneItemBlock(index, unique_item_fields) { > }); > /* Add buttons + and Clear */ > var buttonPlus = "<fieldset class=\"action\">"; >- var buttonPlusText = _("Add item"); >- buttonPlus += '<input type="button" class="addItemControl" name="buttonPlus" style="cursor:pointer; margin:0 1em;" onclick="addItem(this,\'' + unique_item_fields + '\')" value="' + buttonPlusText + '" />'; >+ buttonPlus += '<input type="button" class="addItemControl" name="buttonPlus" style="cursor:pointer; margin:0 1em;" onclick="addItem(this,\'' + unique_item_fields + '\')" value="' + (window.MSG_ADDITEM_JS_ADDITEM || 'Add item')+ '" />'; > buttonPlus += '<a class="addItemControl cancel" name="buttonClear" style="cursor:pointer;" onclick="clearItemBlock(this)">' + (window.MSG_ADDITEM_JS_CLEAR || 'Clear') + '</a>'; > buttonPlus += "</fieldset>"; > $(clone).append(buttonPlus); >-- >1.8.3.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10576
:
19796
|
19818
|
19829