@@ -, +, @@ can't be translated --- .../intranet-tmpl/prog/en/js/xmlControlfield.js | 23 +- .../cataloguing/value_builder/marc21_field_006.xml | 1562 ++++++------ .../cataloguing/value_builder/marc21_field_008.xml | 2566 ++++++++++---------- .../cataloguing/value_builder/marc21_field_CF.xsd | 26 +- misc/translator/tmpl_process3.pl | 2 +- 5 files changed, 2093 insertions(+), 2086 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js +++ a/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js @@ -241,7 +241,7 @@ function changeH4Result(form, h4_result, tr_result, pos, value) var arrEquiv = new Array(); for (var i=0; i < nodeMaterial.length; i++) { id = nodeMaterial[i].attributes.getNamedItem("id").nodeValue; - name = nodeMaterial[i].attributes.getNamedItem("name").nodeValue; + name = nodeMaterial[i].getElementsByTagName('name')[0].textContent; arrEquiv[id] = i; arrSort.push(id); } @@ -249,7 +249,7 @@ function changeH4Result(form, h4_result, tr_result, pos, value) var j; for (var i=0; i < arrSort.length; i++) { j = arrEquiv[arrSort[i]]; - add_option(this.select, arrSort[i] + " - " + nodeMaterial[j].attributes.getNamedItem("name").nodeValue, arrSort[i], (this.idMaterial != "" && arrSort[i] == this.idMaterial)?true:false); + add_option(this.select, arrSort[i] + " - " + nodeMaterial[j].getElementsByTagName('name')[0].textContent, arrSort[i], (this.idMaterial != "" && arrSort[i] == this.idMaterial)?true:false); } } else if (this.idMaterial != "") { for (var i=0; i < this.select.options.length; i++) { @@ -292,16 +292,21 @@ function changeH4Result(form, h4_result, tr_result, pos, value) var selected; var index; var url; + var description; + var name; while (nodePos != null) { if (nodePos.nodeType == 1 && nodePos.nodeName == "Position") { tr = tbody.insertRow(tbody.rows.length); td = tr.insertCell(tr.cells.length); pos = nodePos.attributes.getNamedItem("pos").nodeValue; - title = ((nodePos.getAttributeNode("description") || nodePos.hasAttribute("description")) && nodePos.getAttribute("description") != "")?nodePos.attributes.getNamedItem("description").nodeValue:nodePos.attributes.getNamedItem("name").nodeValue; + // description is required by schema + description = nodePos.getElementsByTagName('description')[0].textContent; + name = nodePos.getElementsByTagName('name')[0].textContent + title = ( description != "")?description:name; try { - url = ((nodePos.getAttributeNode("url") || nodePos.hasAttribute("url")) && nodePos.getAttribute("url") != "" && nodePos.getAttribute("urltext") != "")?" " + nodePos.attributes.getNamedItem("urltext").nodeValue + "":""; + url = ((nodePos.getAttributeNode("url") || nodePos.hasAttribute("url")) && nodePos.getAttribute("url") != "" && nodePos.getElementsByTagName('urltext')[0].textContent != "")?" " + nodePos.getElementsByTagName('urltext')[0].textContent + "":""; } catch (e) { url = "";} - td.innerHTML = ""; + td.innerHTML = ""; td = tr.insertCell(tr.cells.length); value = returnValuePosFromResult(result, pos); if ((index = pos.indexOf("-")) > 0) { // Position interval @@ -312,14 +317,16 @@ function changeH4Result(form, h4_result, tr_result, pos, value) } else { strInnerHTML = "