Internationalization of the dialog part
This commit is contained in:
parent
0adadb55dd
commit
5a6bef4162
@ -4,40 +4,38 @@
|
||||
<div class="grid-layout layout-normal layout-full"><table>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
This feature helps you find groups of different cell values that might be
|
||||
alternative representations of the same thing. For example, the two strings
|
||||
"New York" and "new york" are very likely to refer to the same concept and
|
||||
just have capitalization differences, and "Gödel" and "Godel" probably refer
|
||||
to the same person.
|
||||
<a href="https://github.com/OpenRefine/OpenRefine/wiki/Clustering" target="_blank">Find out more ...</a>
|
||||
<span bind="or_dialog_descr"></span>
|
||||
<a href="https://github.com/OpenRefine/OpenRefine/wiki/Clustering" target="_blank" bind="or_dialog_findMore"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Method <select bind="methodSelector">
|
||||
<option selected="true">key collision</option>
|
||||
<option>nearest neighbor</option>
|
||||
<span bind="or_dialog_method"></span><select bind="methodSelector">
|
||||
<option selected="true" bind="or_dialog_keyCollision"></option>
|
||||
<option bind="or_dialog_neighbor"></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<div class="binning-controls">Keying Function <select bind="keyingFunctionSelector">
|
||||
<option selected="true">fingerprint</option>
|
||||
<option>ngram-fingerprint</option>
|
||||
<option>metaphone3</option>
|
||||
<option>cologne-phonetic</option>
|
||||
<div class="binning-controls"><span bind="or_dialog_keying"></span>
|
||||
<select bind="keyingFunctionSelector">
|
||||
<option selected="true" bind="or_dialog_fingerprint"></option>
|
||||
<option bind="or_dialog_ngram"></option>
|
||||
<option bind="or_dialog_metaphone"></option>
|
||||
<option bind="or_dialog_phonetic"></option>
|
||||
</select></div>
|
||||
<div class="knn-controls hidden">Distance Function <select bind="distanceFunctionSelector">
|
||||
<option selected="true">levenshtein</option>
|
||||
<option>PPM</option>
|
||||
<div class="knn-controls hidden"><span bind="or_dialog_distance"></span>
|
||||
<select bind="distanceFunctionSelector">
|
||||
<option selected="true" bind="or_dialog_leven"></option>
|
||||
<option bind="or_dialog_ppm"></option>
|
||||
</select></div>
|
||||
</td>
|
||||
<td>
|
||||
<div id="ngram-fingerprint-params" class="function-params hidden">
|
||||
Ngram Size <input type="text" value="2" bind="ngramSize" name="ngram-size" size="2" class="param" datatype="int">
|
||||
<span bind="or_dialog_ngramSize"></span><input type="text" value="2" bind="ngramSize" name="ngram-size" size="2" class="param" datatype="int">
|
||||
</div>
|
||||
<div class="knn-controls hidden">
|
||||
<span style="margin-right: 1em">Radius <input type="text" value="1.0" bind="radius" name="radius" size="2" class="param" datatype="float"></span>
|
||||
<span>Block Chars <input type="text" value="6" bind="ngramBlock" name="blocking-ngram-size" size="2" class="param" datatype="int"></span>
|
||||
<span style="margin-right: 1em"><span bind="or_dialog_radius"></span><input type="text" value="1.0" bind="radius" name="radius" size="2" class="param" datatype="float"></span>
|
||||
<span><span bind="or_dialog_blockChars"></span><input type="text" value="6" bind="ngramBlock" name="blocking-ngram-size" size="2" class="param" datatype="int"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td bind="resultSummary" style="text-align:right;">
|
||||
@ -54,13 +52,13 @@
|
||||
<div class="dialog-footer" bind="dialogFooter">
|
||||
<table width="100%"><tr>
|
||||
<td class="left" style="text-align: left">
|
||||
<button class="button" bind="selectAllButton">Select All</button>
|
||||
<button class="button" bind="deselectAllButton">Deselect All</button>
|
||||
<button class="button" bind="selectAllButton"></button>
|
||||
<button class="button" bind="deselectAllButton"></button>
|
||||
</td>
|
||||
<td class="right" style="text-align: right">
|
||||
<button class="button button-primary" bind="applyReClusterButton">Merge Selected & Re-Cluster</button>
|
||||
<button class="button" bind="applyCloseButton">Merge Selected & Close</button>
|
||||
<button class="button" bind="closeButton">Close</button>
|
||||
<button class="button button-primary" bind="applyReClusterButton"></button>
|
||||
<button class="button" bind="applyCloseButton"></button>
|
||||
<button class="button" bind="closeButton"></button>
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
|
@ -49,23 +49,45 @@ ClusteringDialog.prototype._createDialog = function() {
|
||||
var dialog = $(DOM.loadHTML("core", "scripts/dialogs/clustering-dialog.html"));
|
||||
|
||||
this._elmts = DOM.bind(dialog);
|
||||
this._elmts.dialogHeader.text('Cluster & Edit column "' + this._columnName + '"');
|
||||
|
||||
this._elmts.dialogHeader.text($.i18n._('core-dialogs')["cluster-edit"]+' "' + this._columnName + '"');
|
||||
|
||||
this._elmts.or_dialog_descr.html($.i18n._('core-dialogs')["cluster-descr"]);
|
||||
this._elmts.or_dialog_findMore.html($.i18n._('core-dialogs')["find-more"]);
|
||||
this._elmts.or_dialog_method.html($.i18n._('core-dialogs')["method"]);
|
||||
this._elmts.or_dialog_keyCollision.html($.i18n._('core-dialogs')["key-collision"]);
|
||||
this._elmts.or_dialog_neighbor.html($.i18n._('core-dialogs')["nearest-neighbor"]);
|
||||
this._elmts.or_dialog_keying.html($.i18n._('core-dialogs')["keying-function"]);
|
||||
this._elmts.or_dialog_fingerprint.html($.i18n._('core-dialogs')["fingerprint"]);
|
||||
this._elmts.or_dialog_ngram.html($.i18n._('core-dialogs')["ngram"]);
|
||||
this._elmts.or_dialog_metaphone.html($.i18n._('core-dialogs')["metaphone"]);
|
||||
this._elmts.or_dialog_phonetic.html($.i18n._('core-dialogs')["phonetic"]);
|
||||
this._elmts.or_dialog_distance.html($.i18n._('core-dialogs')["distance-fun"]);
|
||||
this._elmts.or_dialog_leven.html($.i18n._('core-dialogs')["leven"]);
|
||||
this._elmts.or_dialog_ppm.html($.i18n._('core-dialogs')["ppm"]);
|
||||
this._elmts.or_dialog_ngramSize.html($.i18n._('core-dialogs')["ngram-size"]);
|
||||
this._elmts.or_dialog_radius.html($.i18n._('core-dialogs')["ngram-radius"]);
|
||||
this._elmts.or_dialog_blockChars.html($.i18n._('core-dialogs')["block-chars"]);
|
||||
this._elmts.selectAllButton.html($.i18n._('core-buttons')["select-all"]);
|
||||
this._elmts.deselectAllButton.html($.i18n._('core-buttons')["unselect-all"]);
|
||||
this._elmts.applyReClusterButton.html($.i18n._('core-buttons')["merge-cluster"]);
|
||||
this._elmts.applyCloseButton.html($.i18n._('core-buttons')["merge-close"]);
|
||||
this._elmts.closeButton.html($.i18n._('core-buttons')["close"]);
|
||||
|
||||
this._elmts.methodSelector.change(function() {
|
||||
var selection = $(this).find("option:selected").text();
|
||||
if (selection == 'key collision') {
|
||||
if (selection == $.i18n._('core-dialogs')["key-collision"]) {
|
||||
dialog.find(".binning-controls").show();
|
||||
dialog.find(".knn-controls").hide();
|
||||
self._method = "binning";
|
||||
self._elmts.keyingFunctionSelector.change();
|
||||
} else if (selection === 'nearest neighbor') {
|
||||
} else if (selection === $.i18n._('core-dialogs')["nearest-neighbor"]) {
|
||||
dialog.find(".binning-controls").hide();
|
||||
dialog.find(".knn-controls").show();
|
||||
self._method = "knn";
|
||||
self._elmts.distanceFunctionSelector.change();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var changer = function() {
|
||||
self._function = $(this).find("option:selected").text();
|
||||
$(".function-params").hide();
|
||||
@ -116,11 +138,11 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
|
||||
|
||||
var trHead = table.insertRow(table.rows.length);
|
||||
trHead.className = "header";
|
||||
$(trHead.insertCell(0)).text("Cluster Size");
|
||||
$(trHead.insertCell(1)).text("Row Count");
|
||||
$(trHead.insertCell(2)).text("Values in Cluster");
|
||||
$(trHead.insertCell(3)).text("Merge?");
|
||||
$(trHead.insertCell(4)).text("New Cell Value");
|
||||
$(trHead.insertCell(0)).text($.i18n._('core-dialogs')["cluster-size"]);
|
||||
$(trHead.insertCell(1)).text($.i18n._('core-dialogs')["row-count"]);
|
||||
$(trHead.insertCell(2)).text($.i18n._('core-dialogs')["cluster-values"]);
|
||||
$(trHead.insertCell(3)).text($.i18n._('core-dialogs')["merge"]);
|
||||
$(trHead.insertCell(4)).text($.i18n._('core-dialogs')["new-cell-val"]);
|
||||
|
||||
var renderCluster = function(cluster) {
|
||||
var tr = table.insertRow(table.rows.length);
|
||||
@ -159,7 +181,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
|
||||
for (var c = 0; c < choices.length; c++) {
|
||||
var choice = choices[c];
|
||||
var li = $('<li></li>');
|
||||
$('<a href="javascript:{}" title="Use this value"></a>').text(choice.v).click(onClick).appendTo(li);
|
||||
$('<a href="javascript:{}" title='+$.i18n._('core-dialogs')["use-this-val"]+'></a>').text(choice.v).click(onClick).appendTo(li);
|
||||
$('<span></span>').text("(" + choice.c + " rows)").addClass("clustering-dialog-entry-count").appendTo(li);
|
||||
rowCount += choice.c;
|
||||
facet.s[c] = {
|
||||
@ -181,7 +203,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
|
||||
|
||||
var div = $('<div></div>').addClass("clustering-dialog-value-focus");
|
||||
|
||||
var browseLink = $('<a target="_new" title="Browse only these values">Browse this cluster</a>')
|
||||
var browseLink = $('<a target="_new" title="'+$.i18n._('core-dialogs')["browse-only-these"]+'">'+$.i18n._('core-dialogs')["browse-this-cluster"]+'</a>')
|
||||
.addClass("clustering-dialog-browse-focus")
|
||||
.attr("href",url)
|
||||
.css("visibility","hidden")
|
||||
@ -218,12 +240,12 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
|
||||
this._elmts.resultSummary.html(
|
||||
(clusters.length === this._clusters.length) ?
|
||||
("<b>" + this._clusters.length + "</b> cluster" + ((this._clusters.length != 1) ? "s" : "") + " found") :
|
||||
("<b>" + clusters.length + "</b> cluster" + ((clusters.length != 1) ? "s" : "") + " filtered from <b>" + this._clusters.length + "</b> total")
|
||||
("<b>" + clusters.length + "</b> cluster" + ((clusters.length != 1) ? "s" : "") + " "+$.i18n._('core-dialogs')["filtered-from"]+ this._clusters.length +$.i18n._('core-dialogs')["from-total"] )
|
||||
);
|
||||
|
||||
} else {
|
||||
container.html(
|
||||
'<div style="margin: 2em;"><div style="font-size: 130%; color: #333;">No clusters were found with the selected method</div><div style="padding-top: 1em; font-size: 110%; color: #888;">Try selecting another method above or changing its parameters</div></div>'
|
||||
'<div style="margin: 2em;"><div style="font-size: 130%; color: #333;">'+$.i18n._('core-dialogs')["no-cluster-found"]+'</div><div style="padding-top: 1em; font-size: 110%; color: #888;">'+$.i18n._('core-dialogs')["try-another-method"]+'</div></div>'
|
||||
);
|
||||
}
|
||||
};
|
||||
@ -232,7 +254,7 @@ ClusteringDialog.prototype._cluster = function() {
|
||||
var self = this;
|
||||
|
||||
var container = this._elmts.tableContainer.html(
|
||||
'<div style="margin: 1em; font-size: 130%; color: #888;">Clustering... <img src="images/small-spinner.gif"></div>'
|
||||
'<div style="margin: 1em; font-size: 130%; color: #888;">'+$.i18n._('core-dialogs')["clustering"]+'<img src="images/small-spinner.gif"></div>'
|
||||
);
|
||||
|
||||
this._elmts.resultSummary.empty();
|
||||
@ -346,7 +368,7 @@ ClusteringDialog.prototype._apply = function(onDone) {
|
||||
}
|
||||
);
|
||||
} else {
|
||||
alert("You must check some Edit? checkboxes for your edits to be applied.");
|
||||
alert($.i18n._('core-dialogs')["warning-check-boxes"]);
|
||||
}
|
||||
};
|
||||
|
||||
@ -386,10 +408,10 @@ ClusteringDialog.prototype._resetFacets = function() {
|
||||
}
|
||||
this._facets = [];
|
||||
|
||||
this._createFacet("# Choices in Cluster", "size");
|
||||
this._createFacet("# Rows in Cluster", "rowCount");
|
||||
this._createFacet("Average Length of Choices", "avg");
|
||||
this._createFacet("Length Variance of Choices", "variance");
|
||||
this._createFacet($.i18n._('core-dialogs')["choices-in-cluster"], "size");
|
||||
this._createFacet($.i18n._('core-dialogs')["rows-in-cluster"], "rowCount");
|
||||
this._createFacet($.i18n._('core-dialogs')["choice-avg-length"], "avg");
|
||||
this._createFacet($.i18n._('core-dialogs')["choice-var-length"], "variance");
|
||||
};
|
||||
|
||||
ClusteringDialog.prototype._createFacet = function(title, property) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
<div class="dialog-frame" style="width: 600px;">
|
||||
<div class="dialog-header" bind="dialogHeader">Re-order / Remove Columns</div>
|
||||
<div class="dialog-header" bind="dialogHeader"></div>
|
||||
<div class="dialog-body" bind="dialogBody"><div class="grid-layout grid-layout-for-ui layout-normal layout-full"><table>
|
||||
<tr>
|
||||
<td>Drag columns to re-order</td>
|
||||
<td>Drop columns here to remove</td>
|
||||
<td bind="or_dialog_dragCol"></td>
|
||||
<td bind="or_dialog_dropCol"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%"><div class="column-reordering-dialog-column-container" bind="columnContainer"></div></td>
|
||||
@ -11,7 +11,7 @@
|
||||
</tr>
|
||||
</table></div></div>
|
||||
<div class="dialog-footer" bind="dialogFooter">
|
||||
<button class="button" bind="okButton"> OK </button>
|
||||
<button class="button" bind="cancelButton">Cancel</button>
|
||||
<button class="button" bind="okButton"></button>
|
||||
<button class="button" bind="cancelButton"></button>
|
||||
</div>
|
||||
</div>
|
@ -39,9 +39,16 @@ ColumnReorderingDialog.prototype._createDialog = function() {
|
||||
var self = this;
|
||||
var dialog = $(DOM.loadHTML("core", "scripts/dialogs/column-reordering-dialog.html"));
|
||||
this._elmts = DOM.bind(dialog);
|
||||
|
||||
this._elmts.cancelButton.click(function() { self._dismiss(); });
|
||||
this._elmts.okButton.click(function() { self._commit(); });
|
||||
|
||||
this._elmts.dialogHeader.html($.i18n._('core-dialogs')["reorder-column"]);
|
||||
this._elmts.or_dialog_dragCol.html($.i18n._('core-dialogs')["drag-column"]);
|
||||
this._elmts.or_dialog_dropCol.html($.i18n._('core-dialogs')["drop-column"]);
|
||||
this._elmts.okButton.html($.i18n._('core-buttons')["ok"]);
|
||||
this._elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
|
||||
|
||||
this._level = DialogSystem.showDialog(dialog);
|
||||
|
||||
for (var i = 0; i < theProject.columnModel.columns.length; i++) {
|
||||
|
@ -1,91 +1,91 @@
|
||||
<div class="dialog-frame" style="width: 800px;">
|
||||
<div class="dialog-header" bind="dialogHeader">Custom Tabular Exporter</div>
|
||||
<div class="dialog-header" bind="dialogHeader"></div>
|
||||
<div class="dialog-body" bind="dialogBody">
|
||||
<div id="custom-tabular-exporter-tabs" class="refine-tabs">
|
||||
<ul>
|
||||
<li><a href="#custom-tabular-exporter-tabs-content">Content</a></li>
|
||||
<li><a href="#custom-tabular-exporter-tabs-download">Download</a></li>
|
||||
<li bind="uploadTabHeader"><a href="#custom-tabular-exporter-tabs-upload">Upload</a></li>
|
||||
<li><a href="#custom-tabular-exporter-tabs-code">Option Code</a></li>
|
||||
<li><a href="#custom-tabular-exporter-tabs-content" bind="or_dialog_content"></a></li>
|
||||
<li><a href="#custom-tabular-exporter-tabs-download" bind="or_dialog_download"></a></li>
|
||||
<li bind="uploadTabHeader"><a href="#custom-tabular-exporter-tabs-upload" bind="or_dialog_upload"></a></li>
|
||||
<li><a href="#custom-tabular-exporter-tabs-code" bind="or_dialog_optCode"></a></li>
|
||||
</ul>
|
||||
|
||||
<div id="custom-tabular-exporter-tabs-content"><div class="grid-layout grid-layout-for-ui layout-normal layout-full"><table>
|
||||
<tr>
|
||||
<td>Select and Order Columns to Export</td>
|
||||
<td>Options for <span bind="columnNameSpan" class="custom-tabular-exporter-selected-column"></span></td>
|
||||
<td bind="or_dialog_selAndOrd"></td>
|
||||
<td><span bind="or_dialog_optFor"></span><span bind="columnNameSpan" class="custom-tabular-exporter-selected-column"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%"><div bind="columnList" class="custom-tabular-exporter-columns"></div></td>
|
||||
<td><div bind="columnOptionPane" class="custom-tabular-exporter-column-options"><div class="grid-layout layout-normal"><table>
|
||||
<tr><td colspan="2">For reconciled cells, output</td></tr>
|
||||
<tr><td><div class="grid-layout layout-tightest"><table>
|
||||
<tr><td colspan="2" bind="or_dialog_forReconCell"></td></tr>
|
||||
<tr><td><div class="grid-layout layout-tightest" ><table>
|
||||
<tr>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-recon" value="entity-name" id="$custom-exporter-recon-entity-name" /></td>
|
||||
<td><label for="$custom-exporter-recon-entity-name">Matched entity's name</label></td>
|
||||
<td><label for="$custom-exporter-recon-entity-name" bind="or_dialog_matchedName"></label></td>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-recon" value="cell-content" id="$custom-exporter-recon-cell-content" /></td>
|
||||
<td><label for="$custom-exporter-recon-cell-content">Cell's content</label></td>
|
||||
<td><label for="$custom-exporter-recon-cell-content" bind="or_dialog_cellCont"></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-recon" value="entity-id" id="$custom-exporter-recon-entity-id" /></td>
|
||||
<td><label for="$custom-exporter-recon-entity-id">Matched entity's ID</label></td>
|
||||
<td><label for="$custom-exporter-recon-entity-id" bind="or_dialog_matchedId"></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1%"><input type="checkbox" bind="reconLinkCheckbox" id="$custom-exporter-recon-link" /></td>
|
||||
<td width="50%"><label for="$custom-exporter-recon-link">Link to matched entity's page</label></td>
|
||||
<td width="50%"><label for="$custom-exporter-recon-link" bind="or_dialog_linkMatch"></label></td>
|
||||
<td width="1%"><input type="checkbox" bind="reconBlankUnmatchedCheckbox" id="$custom-exporter-recon-blank-unmatched" /></td>
|
||||
<td width="50%"><label for="$custom-exporter-recon-blank-unmatched">Output nothing for unmatched cells</label></td>
|
||||
<td width="50%"><label for="$custom-exporter-recon-blank-unmatched" bind="or_dialog_outNotUnMatch"></label></td>
|
||||
</tr>
|
||||
</table></td></tr>
|
||||
|
||||
<tr><td colspan="2">For date/time values, use format</td></tr>
|
||||
<tr><td colspan="2" bind="or_dialog_dateFormat"></td></tr>
|
||||
<tr><td><div class="grid-layout layout-tightest"><table>
|
||||
<tr>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-date" value="iso-8601" id="$custom-exporter-date-iso" /></td>
|
||||
<td colspan="3"><label for="$custom-exporter-date-iso">ISO 8601, e.g., 2011-08-24T18:36:10+08:00</label></td>
|
||||
<td colspan="3"><label for="$custom-exporter-date-iso" bind="or_dialog_dateIso"></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-date" value="locale-short" id="$custom-exporter-date-locale-short" /></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-locale-short">Short locale format</label></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-locale-short" bind="or_dialog_shortFormat"></label></td>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-date" value="locale-medium" id="$custom-exporter-date-locale-medium" /></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-locale-medium">Medium locale format</label></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-locale-medium" bind="or_dialog_mediumFormat"></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-date" value="locale-long" id="$custom-exporter-date-locale-long" /></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-locale-long">Long locale format</label></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-locale-long" bind="or_dialog_longFormat"></label></td>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-date" value="locale-full" id="$custom-exporter-date-locale-full" /></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-locale-full">Full locale format</label></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-locale-full" bind="or_dialog_fullFormat"></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-date" value="custom" id="$custom-exporter-date-custom" /></td>
|
||||
<td colspan="3">
|
||||
<label for="$custom-exporter-date-custom">Custom</label> <input size="35" class="lightweight" bind="dateCustomInput" />
|
||||
<a href="" target="_blank">Help</a>
|
||||
<label for="$custom-exporter-date-custom" bind="or_dialog_custom"></label> <input size="35" class="lightweight" bind="dateCustomInput" />
|
||||
<a href="" target="_blank" bind="or_dialog_help"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1%"><input type="checkbox" bind="dateLocalTimeZoneCheckbox" id="$custom-exporter-date-local-timezone" /></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-local-timezone">Use local time zone</label></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-local-timezone" bind="or_dialog_localTime"></label></td>
|
||||
<td width="1%"><input type="checkbox" bind="omitTimeCheckbox" id="$custom-exporter-date-omit-time" /></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-omit-time">Omit time</label></td>
|
||||
<td width="50%"><label for="$custom-exporter-date-omit-time" bind="or_dialog_omitTime"></label></td>
|
||||
</tr>
|
||||
</table></td></tr>
|
||||
</table></div></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<button class="button" bind="selectAllButton">Select All</button>
|
||||
<button class="button" bind="deselectAllButton">De-select All</button>
|
||||
<button class="button" bind="selectAllButton"></button>
|
||||
<button class="button" bind="deselectAllButton"></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><div class="grid-layout layout-tighter layout-full"><table>
|
||||
<tr>
|
||||
<td width="1%"><input type="checkbox" bind="outputColumnHeadersCheckbox" checked id="$custom-exporter-output-column-headers" /></td>
|
||||
<td width="25%"><label for="$custom-exporter-output-column-headers">Output column headers</label></td>
|
||||
<td width="25%"><label for="$custom-exporter-output-column-headers" bind="or_dialog_outColHeader"></label></td>
|
||||
<td width="1%"><input type="checkbox" bind="outputEmptyRowsCheckbox" id="$custom-exporter-output-empty-rows" /></td>
|
||||
<td width="25%"><label for="$custom-exporter-output-empty-rows">Output empty rows (ie all cells null)</label></td>
|
||||
<td width="25%"><label for="$custom-exporter-output-empty-rows" bind="or_dialog_outEmptyRow"></label></td>
|
||||
<td width="1%"><input type="checkbox" bind="exportAllRowsCheckbox" id="$custom-exporter-output-all-rows" /></td>
|
||||
<td width="50%"><label for="$custom-exporter-output-all-rows">Ignore facets and filters and export all rows</label></td>
|
||||
<td width="50%"><label for="$custom-exporter-output-all-rows" bind="or_dialog_ignoreFacets"></label></td>
|
||||
</tr>
|
||||
</table></div></td>
|
||||
</tr>
|
||||
@ -94,48 +94,48 @@
|
||||
|
||||
<div id="custom-tabular-exporter-tabs-download" style="display: none;"><div class="grid-layout grid-layout-for-ui layout-loose layout-full"><table>
|
||||
<tr>
|
||||
<th>Line-based text formats</th>
|
||||
<th>Other formats</th>
|
||||
<th bind="or_dialog_lineFormat"></th>
|
||||
<th bind="or_dialog_otherFormat"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="60%"><div class="grid-layout grid-layout-for-text layout-tightest"><table>
|
||||
<tr><td width="1%"><input type="radio" name="custom-tabular-exporter-download-format" value="tsv" checked id="$custom-exporter-download-tsv" /></td>
|
||||
<td><label for="$custom-exporter-download-tsv">Tab-separated values (TSV)</label></td></tr>
|
||||
<td><label for="$custom-exporter-download-tsv" bind="or_dialog_tsv"></label></td></tr>
|
||||
<tr><td width="1%"><input type="radio" name="custom-tabular-exporter-download-format" value="csv" id="$custom-exporter-download-csv" /></td>
|
||||
<td><label for="$custom-exporter-download-csv">Comma-separated values (CSV)</label></td></tr>
|
||||
<td><label for="$custom-exporter-download-csv" bind="or_dialog_csv"></label></td></tr>
|
||||
<tr><td width="1%"><input type="radio" name="custom-tabular-exporter-download-format" value="*sv" id="$custom-exporter-download-sv" /></td>
|
||||
<td><label for="$custom-exporter-download-sv">Custom separator</label>
|
||||
<td><label for="$custom-exporter-download-sv" bind="or_dialog_customSep"></label>
|
||||
<input type="text" class="lightweight" size="5" bind="separatorInput" /></td></tr>
|
||||
</table></div></td>
|
||||
|
||||
<td><div class="grid-layout grid-layout-for-text layout-tightest"><table>
|
||||
<tr>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-download-format" value="xls" id="$custom-exporter-download-xls" /></td>
|
||||
<td><label for="$custom-exporter-download-xls">Excel (.xls)</label></td>
|
||||
<td><label for="$custom-exporter-download-xls" bind="or_dialog_excel"></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-download-format" value="xlsx" id="$custom-exporter-download-xlsx" /></td>
|
||||
<td><label for="$custom-exporter-download-xlsx">Excel in XML (.xlsx)</label></td>
|
||||
<td><label for="$custom-exporter-download-xlsx" bind="or_dialog_excelXml"></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="1%"><input type="radio" name="custom-tabular-exporter-download-format" value="html" id="$custom-exporter-download-html" /></td>
|
||||
<td><label for="$custom-exporter-download-html">HTML table</label></td>
|
||||
<td><label for="$custom-exporter-download-html" bind="or_dialog_htmlTable"></label></td>
|
||||
</tr>
|
||||
</table></div></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><div class="grid-layout grid-layout-for-text layout-tightest"><table>
|
||||
<tr><td>Line separator</td><td><input type="text" size="5" class="lightweight" bind="lineSeparatorInput" /></td></tr>
|
||||
<tr><td>Character encoding</td><td><input type="text" size="10" class="lightweight" bind="encodingInput" /></td></tr>
|
||||
<tr><td bind="or_dialog_lineSep"></td><td><input type="text" size="5" class="lightweight" bind="lineSeparatorInput" /></td></tr>
|
||||
<tr><td bind="or_dialog_charEnc"></td><td><input type="text" size="10" class="lightweight" bind="encodingInput" /></td></tr>
|
||||
</table></div></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><div class="grid-layout grid-layout-for-text layout-tightest layout-full"><table><tr>
|
||||
<td width="100%"> </td>
|
||||
<td width="1%"><button class="button" bind="downloadPreviewButton">Preview</button></td>
|
||||
<td width="1%"><button class="button button-primary" bind="downloadButton">Download</button></td>
|
||||
<td width="1%"><button class="button" bind="downloadPreviewButton"></button></td>
|
||||
<td width="1%"><button class="button button-primary" bind="downloadButton"></button></td>
|
||||
</tr></table></div></td>
|
||||
</tr>
|
||||
</table></div></div>
|
||||
@ -143,30 +143,27 @@
|
||||
|
||||
<div bind="uploadTabBody" id="custom-tabular-exporter-tabs-upload" style="display: none;"><div class="grid-layout grid-layout-for-ui layout-loose layout-full"><table>
|
||||
<tr>
|
||||
<th>Upload to</th>
|
||||
<th bind="or_dialog_uploadTo"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="grid-layout grid-layout-for-text layout-tightest"><table bind="uploadTargetTable"></table></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button class="button button-primary" bind="uploadButton">Upload</button></td>
|
||||
<td><button class="button button-primary" bind="uploadButton"></button></td>
|
||||
</tr>
|
||||
</table></div></div>
|
||||
|
||||
|
||||
<div id="custom-tabular-exporter-tabs-code" style="display: none;"><div class="grid-layout grid-layout-for-ui layout-loose layout-full"><table>
|
||||
<tr>
|
||||
<td>The following JSON text encodes the options you have set in the other tabs.
|
||||
You can copy it out and save it for later, and paste it back in and click Apply
|
||||
to re-use the same options.
|
||||
</td>
|
||||
<td width="30%" style="text-align: right;"><button class="button" bind="applyOptionCodeButton">Apply</button></td>
|
||||
<td bind="or_dialog_jsonText"></td>
|
||||
<td width="30%" style="text-align: right;"><button class="button" bind="applyOptionCodeButton"></button></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"><textarea class="custom-tabular-exporter-code" bind="optionCodeInput"></textarea></td></tr>
|
||||
</table></div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-footer" bind="dialogFooter"><div class="grid-layout layout-tightest layout-full"><table><tr>
|
||||
<td><button class="button" bind="cancelButton">Cancel</button></td>
|
||||
<td><button class="button" bind="cancelButton"></button></td>
|
||||
</tr></table></div></div>
|
||||
</div>
|
@ -82,6 +82,51 @@ CustomTabularExporterDialog.prototype._createDialog = function(options) {
|
||||
this._elmts.uploadTabBody.remove();
|
||||
}
|
||||
|
||||
this._elmts.dialogHeader.html($.i18n._('core-dialogs')["custom-tab-exp"]);
|
||||
this._elmts.or_dialog_content.html($.i18n._('core-dialogs')["content"]);
|
||||
this._elmts.or_dialog_download.html($.i18n._('core-dialogs')["download"]);
|
||||
this._elmts.or_dialog_upload.html($.i18n._('core-dialogs')["upload"]);
|
||||
this._elmts.or_dialog_optCode.html($.i18n._('core-dialogs')["opt-code"]);
|
||||
this._elmts.or_dialog_selAndOrd.html($.i18n._('core-dialogs')["sel-and-ord"]);
|
||||
this._elmts.or_dialog_optFor.html($.i18n._('core-dialogs')["opt-for"]+" ");
|
||||
this._elmts.or_dialog_forReconCell.html($.i18n._('core-dialogs')["for-recon-cell"]);
|
||||
this._elmts.or_dialog_matchedName.html($.i18n._('core-dialogs')["match-ent-name"]);
|
||||
this._elmts.or_dialog_cellCont.html($.i18n._('core-dialogs')["cell-content"]);
|
||||
this._elmts.or_dialog_matchedId.html($.i18n._('core-dialogs')["match-ent-id"]);
|
||||
this._elmts.or_dialog_linkMatch.html($.i18n._('core-dialogs')["link-match"]);
|
||||
this._elmts.or_dialog_outNotUnMatch.html($.i18n._('core-dialogs')["out-not-unmatch"]);
|
||||
this._elmts.or_dialog_dateIso.html($.i18n._('core-dialogs')["date-iso"]);
|
||||
this._elmts.or_dialog_shortFormat.html($.i18n._('core-dialogs')["short-format"]);
|
||||
this._elmts.or_dialog_mediumFormat.html($.i18n._('core-dialogs')["medium-format"]);
|
||||
this._elmts.or_dialog_longFormat.html($.i18n._('core-dialogs')["long-format"]);
|
||||
this._elmts.or_dialog_fullFormat.html($.i18n._('core-dialogs')["full-format"]);
|
||||
this._elmts.or_dialog_custom.html($.i18n._('core-dialogs')["custom"]);
|
||||
this._elmts.or_dialog_help.html($.i18n._('core-dialogs')["help"]);
|
||||
this._elmts.or_dialog_localTime.html($.i18n._('core-dialogs')["local-time"]);
|
||||
this._elmts.or_dialog_omitTime.html($.i18n._('core-dialogs')["omit-time"]);
|
||||
this._elmts.selectAllButton.html($.i18n._('core-buttons')["select-all"]);
|
||||
this._elmts.deselectAllButton.html($.i18n._('core-buttons')["deselect-all"]);
|
||||
this._elmts.or_dialog_outColHeader.html($.i18n._('core-dialogs')["out-col-header"]);
|
||||
this._elmts.or_dialog_outEmptyRow.html($.i18n._('core-dialogs')["out-empty-row"]);
|
||||
this._elmts.or_dialog_ignoreFacets.html($.i18n._('core-dialogs')["ignore-facets"]);
|
||||
this._elmts.or_dialog_lineFormat.html($.i18n._('core-dialogs')["line-based"]);
|
||||
this._elmts.or_dialog_otherFormat.html($.i18n._('core-dialogs')["other-format"]);
|
||||
this._elmts.or_dialog_tsv.html($.i18n._('core-dialogs')["tsv"]);
|
||||
this._elmts.or_dialog_csv.html($.i18n._('core-dialogs')["csv"]);
|
||||
this._elmts.or_dialog_customSep.html($.i18n._('core-dialogs')["custom-separator"]);
|
||||
this._elmts.or_dialog_excel.html($.i18n._('core-dialogs')["excel"]);
|
||||
this._elmts.or_dialog_excelXml.html($.i18n._('core-dialogs')["excel-xml"]);
|
||||
this._elmts.or_dialog_htmlTable.html($.i18n._('core-dialogs')["html-table"]);
|
||||
this._elmts.or_dialog_lineSep.html($.i18n._('core-dialogs')["line-sep"]);
|
||||
this._elmts.or_dialog_charEnc.html($.i18n._('core-dialogs')["char-enc"]);
|
||||
this._elmts.downloadPreviewButton.html($.i18n._('core-buttons')["preview"]);
|
||||
this._elmts.downloadButton.html($.i18n._('core-buttons')["download"]);
|
||||
this._elmts.downloadButton.html($.i18n._('core-dialog')["upload-to"]);
|
||||
this._elmts.uploadButton.html($.i18n._('core-buttons')["upload"]);
|
||||
this._elmts.or_dialog_jsonText.html($.i18n._('core-dialogs')["json-text"]);
|
||||
this._elmts.applyOptionCodeButton.html($.i18n._('core-buttons')["apply"]);
|
||||
this._elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
|
||||
|
||||
$("#custom-tabular-exporter-tabs-content").css("display", "");
|
||||
$("#custom-tabular-exporter-tabs-download").css("display", "");
|
||||
$("#custom-tabular-exporter-tabs-upload").css("display", "");
|
||||
@ -326,9 +371,9 @@ CustomTabularExporterDialog.prototype._applyOptionCode = function() {
|
||||
var json = JSON.parse(s);
|
||||
this._configureUIFromOptionCode(json);
|
||||
|
||||
alert('Option code successfully applied.');
|
||||
alert($.i18n._('core-dialogs')["opt-code-applied"]);
|
||||
} catch (e) {
|
||||
alert('Error applying option code: ' + e);
|
||||
alert($.i18n._('core-dialogs')["error-apply-code"]+': ' + e);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="grid-layout layout-tight layout-full"><table rows="4" cols="4">
|
||||
<tr style="vertical-align: bottom;">
|
||||
<td>Expression</td>
|
||||
<td style="text-align: right;">Language</td>
|
||||
<td bind="or_dialog_expr"></td>
|
||||
<td style="text-align: right;" bind="or_dialog_lang"></td>
|
||||
<td colspan="2"><select bind="expressionPreviewLanguageSelect">$LANGUAGE_OPTIONS$</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -12,10 +12,10 @@
|
||||
<td colspan="4">
|
||||
<div id="expression-preview-tabs" class="refine-tabs">
|
||||
<ul>
|
||||
<li><a href="#expression-preview-tabs-preview">Preview</a></li>
|
||||
<li><a href="#expression-preview-tabs-history">History</a></li>
|
||||
<li><a href="#expression-preview-tabs-starred">Starred</a></li>
|
||||
<li><a href="#expression-preview-tabs-help">Help</a></li>
|
||||
<li><a href="#expression-preview-tabs-preview" bind="or_dialog_preview"></a></li>
|
||||
<li><a href="#expression-preview-tabs-history" bind="or_dialog_history"></a></li>
|
||||
<li><a href="#expression-preview-tabs-starred" bind="or_dialog_starred"></a></li>
|
||||
<li><a href="#expression-preview-tabs-help" bind="or_dialog_help"></a></li>
|
||||
</ul>
|
||||
<div id="expression-preview-tabs-preview">
|
||||
<div class="expression-preview-container" bind="expressionPreviewPreviewContainer"></div>
|
||||
|
@ -45,12 +45,12 @@ function ExpressionPreviewDialog(title, cellIndex, rowIndices, values, expressio
|
||||
|
||||
this._elmts = DOM.bind(html);
|
||||
|
||||
$('<button class="button"></button>').html(" OK ").click(function() {
|
||||
$('<button class="button"></button>').html($.i18n._('core-buttons')["ok"]).click(function() {
|
||||
DialogSystem.dismissUntil(self._level - 1);
|
||||
self._onDone(self._previewWidget.getExpression(true));
|
||||
}).appendTo(footer);
|
||||
|
||||
$('<button class="button"></button>').text("Cancel").click(function() {
|
||||
$('<button class="button"></button>').text($.i18n._('core-buttons')["cancel"]).click(function() {
|
||||
DialogSystem.dismissUntil(self._level - 1);
|
||||
}).appendTo(footer);
|
||||
|
||||
@ -139,6 +139,13 @@ ExpressionPreviewDialog.Widget = function(
|
||||
|
||||
this._tabContentWidth = this._elmts.expressionPreviewPreviewContainer.width() + "px";
|
||||
|
||||
this._elmts.or_dialog_expr.html($.i18n._('core-dialogs')["expression"]);
|
||||
this._elmts.or_dialog_lang.html($.i18n._('core-dialogs')["language"]);
|
||||
this._elmts.or_dialog_preview.html($.i18n._('core-dialogs')["preview"]);
|
||||
this._elmts.or_dialog_history.html($.i18n._('core-dialogs')["history"]);
|
||||
this._elmts.or_dialog_starred.html($.i18n._('core-dialogs')["starred"]);
|
||||
this._elmts.or_dialog_help.html($.i18n._('core-dialogs')["help"]);
|
||||
|
||||
this.update();
|
||||
this._renderExpressionHistoryTab();
|
||||
this._renderStarredExpressionsTab();
|
||||
@ -188,21 +195,19 @@ ExpressionPreviewDialog.Widget.prototype._renderHelp = function(data) {
|
||||
var varTable = $('<table cellspacing="5"></table>').appendTo(elmt)[0];
|
||||
var vars = [
|
||||
{ name: "cell",
|
||||
description: "The current cell. It has a few fields: 'value' and 'recon'."
|
||||
description: $.i18n._('core-dialogs')["cell-fields"]
|
||||
},
|
||||
{ name: "value",
|
||||
description: "The current cell's value. This is a shortcut for 'cell.value'."
|
||||
description: $.i18n._('core-dialogs')["cell-value"]
|
||||
},
|
||||
{ name: "row",
|
||||
description: "The current row. It has 5 fields: 'flagged', 'starred', 'index', 'cells', and 'record'."
|
||||
description: $.i18n._('core-dialogs')["row-fields"]
|
||||
},
|
||||
{ name: "cells",
|
||||
description: "The cells of the current row. This is a shortcut for 'row.cells'. " +
|
||||
"A particular cell can be retrieved with 'cells.<column name>' if the <column name> is a single word, " +
|
||||
"or with 'cells[\"<column name>\"] otherwise."
|
||||
description: $.i18n._('core-dialogs')["cells-of-row"]
|
||||
},
|
||||
{ name: "rowIndex",
|
||||
description: "The current row's index. This is a shortcut for 'row.index'."
|
||||
description: $.i18n._('core-dialogs')["row-index"]
|
||||
}
|
||||
];
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
@ -221,7 +226,7 @@ ExpressionPreviewDialog.Widget.prototype._renderHelp = function(data) {
|
||||
$(tr0.insertCell(1)).addClass("expression-preview-doc-item-params").text("(" + entry.params + ")");
|
||||
|
||||
$(tr1.insertCell(0));
|
||||
$(tr1.insertCell(1)).addClass("expression-preview-doc-item-returns").text("returns: " + entry.returns);
|
||||
$(tr1.insertCell(1)).addClass("expression-preview-doc-item-returns").text($.i18n._('core-dialogs')["returns"]+": " + entry.returns);
|
||||
|
||||
$(tr2.insertCell(0));
|
||||
$(tr2.insertCell(1)).addClass("expression-preview-doc-item-desc").text(entry.description);
|
||||
@ -268,7 +273,7 @@ ExpressionPreviewDialog.Widget.prototype._renderExpressionHistory = function(dat
|
||||
|
||||
var table = $(
|
||||
'<table>' +
|
||||
'<tr><th></th><th></th><th>From</th><th colspan="2">Expression</th><th></th></tr>' +
|
||||
'<tr><th></th><th></th><th>'+$.i18n._('core-dialogs')["from"]+'</th><th colspan="2">'+$.i18n._('core-dialogs')["expression"]+'</th><th></th></tr>' +
|
||||
'</table>'
|
||||
).appendTo($('<div>').addClass("expression-preview-table-wrapper").appendTo(elmt))[0];
|
||||
|
||||
@ -291,7 +296,7 @@ ExpressionPreviewDialog.Widget.prototype._renderExpressionHistory = function(dat
|
||||
);
|
||||
});
|
||||
|
||||
$('<a href="javascript:{}">Reuse</a>').appendTo(tr.insertCell(1)).click(function() {
|
||||
$('<a href="javascript:{}">'+$.i18n._('core-dialogs')["reuse"]+'</a>').appendTo(tr.insertCell(1)).click(function() {
|
||||
self._elmts.expressionPreviewTextarea[0].value = o.expression;
|
||||
self._elmts.expressionPreviewLanguageSelect[0].value = o.language;
|
||||
|
||||
@ -334,7 +339,7 @@ ExpressionPreviewDialog.Widget.prototype._renderStarredExpressions = function(da
|
||||
|
||||
var table = $(
|
||||
'<table>' +
|
||||
'<tr><th></th><th></th><th colspan="2">Expression</th><th></th></tr>' +
|
||||
'<tr><th></th><th></th><th colspan="2">'+$.i18n._('core-dialogs')["expression"]+'</th><th></th></tr>' +
|
||||
'</table>'
|
||||
).appendTo($('<div>').addClass("expression-preview-table-wrapper").appendTo(elmt))[0];
|
||||
|
||||
@ -342,7 +347,7 @@ ExpressionPreviewDialog.Widget.prototype._renderStarredExpressions = function(da
|
||||
var tr = table.insertRow(table.rows.length);
|
||||
var o = Scripting.parse(entry.code);
|
||||
|
||||
$('<a href="javascript:{}">Remove</a>').appendTo(tr.insertCell(0)).click(function() {
|
||||
$('<a href="javascript:{}">'+$.i18n._('core-dialogs')["remove"]+'</a>').appendTo(tr.insertCell(0)).click(function() {
|
||||
$.post(
|
||||
"command/core/toggle-starred-expression",
|
||||
{ expression: entry.code, returnList: true },
|
||||
@ -427,7 +432,7 @@ ExpressionPreviewDialog.Widget.prototype._renderPreview = function(expression, d
|
||||
var renderValue = function(td, v) {
|
||||
if (v !== null && v !== undefined) {
|
||||
if ($.isPlainObject(v)) {
|
||||
$('<span></span>').addClass("expression-preview-special-value").text("Error: " + v.message).appendTo(td);
|
||||
$('<span></span>').addClass("expression-preview-special-value").text($.i18n._('core-dialogs')["error"]+": " + v.message).appendTo(td);
|
||||
} else {
|
||||
td.text(v);
|
||||
}
|
||||
@ -437,9 +442,9 @@ ExpressionPreviewDialog.Widget.prototype._renderPreview = function(expression, d
|
||||
};
|
||||
|
||||
if (this._results !== null) {
|
||||
this._elmts.expressionPreviewParsingStatus.empty().removeClass("error").text("No syntax error.");
|
||||
this._elmts.expressionPreviewParsingStatus.empty().removeClass("error").text($.i18n._('core-dialogs')["no-syntax-err"]+".");
|
||||
} else {
|
||||
var message = (data.type == "parser") ? data.message : "Internal error";
|
||||
var message = (data.type == "parser") ? data.message : $.i18n._('core-dialogs')["internal-err"];
|
||||
this._elmts.expressionPreviewParsingStatus.empty().addClass("error").text(message);
|
||||
}
|
||||
|
||||
|
@ -12,29 +12,29 @@
|
||||
<table class="scatterplot-selectors"><tr>
|
||||
<td nowrap>
|
||||
<div class="buttonset scatterplot-dim-selector" bind="plotSelector">
|
||||
<input type="radio" id="clustering-dialog-dim-lin" name="clustering-dialog-dim" value="lin" checked="checked"/><label class="dim-lin-label" for="clustering-dialog-dim-lin" title="Linear Plot">lin</label>
|
||||
<input type="radio" id="clustering-dialog-dim-log" name="clustering-dialog-dim" value="log"/><label class="dim-log-label" for="clustering-dialog-dim-log" title="Logarithmic Plot">log</label>
|
||||
<input type="radio" id="clustering-dialog-dim-lin" name="clustering-dialog-dim" value="lin" checked="checked"/><label class="dim-lin-label" for="clustering-dialog-dim-lin" bind="or_dialog_linplot">lin</label>
|
||||
<input type="radio" id="clustering-dialog-dim-log" name="clustering-dialog-dim" value="log"/><label class="dim-log-label" for="clustering-dialog-dim-log" bind="or_dialog_logplot">log</label>
|
||||
</div>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<div class="buttonset scatterplot-rot-selector" bind="rotationSelector">
|
||||
<input type="radio" id="clustering-dialog-rot-ccw" name="clustering-dialog-rot" value="ccw"/><label class="rot-ccw-label" for="clustering-dialog-rot-ccw" title="Rotated 45° Counter-Clockwise"> </label>
|
||||
<input type="radio" id="clustering-dialog-rot-none" name="clustering-dialog-rot" value="none" checked="checked"/><label class="rot-none-label" for="clustering-dialog-rot-none" title="No rotation"> </label>
|
||||
<input type="radio" id="clustering-dialog-rot-cw" name="clustering-dialog-rot" value="cw"/><label class="rot-cw-label" for="clustering-dialog-rot-cw" title="Rotated 45° Clockwise"> </label>
|
||||
<input type="radio" id="clustering-dialog-rot-ccw" name="clustering-dialog-rot" value="ccw"/><label class="rot-ccw-label" for="clustering-dialog-rot-ccw" bind="or_dialog_counter"> </label>
|
||||
<input type="radio" id="clustering-dialog-rot-none" name="clustering-dialog-rot" value="none" checked="checked"/><label class="rot-none-label" for="clustering-dialog-rot-none" bind="or_dialog_norot"> </label>
|
||||
<input type="radio" id="clustering-dialog-rot-cw" name="clustering-dialog-rot" value="cw"/><label class="rot-cw-label" for="clustering-dialog-rot-cw" bind="or_dialog_clock"> </label>
|
||||
</div>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<div class="buttonset scatterplot-dot-selector" bind="dotSelector">
|
||||
<input type="radio" id="clustering-dialog-dot-small" name="clustering-dialog-dot" value="small"/><label class="dot-small-label" for="clustering-dialog-dot-small" title="Small Dot Size"> </label>
|
||||
<input type="radio" id="clustering-dialog-dot-regular" name="clustering-dialog-dot" value="regular" checked="checked"/><label class="dot-regular-label" for="clustering-dialog-dot-regular" title="Regular Dot Size"> </label>
|
||||
<input type="radio" id="clustering-dialog-dot-big" name="clustering-dialog-dot" value="big"/><label class="dot-big-label" for="clustering-dialog-dot-big" title="Big Dot Size"> </label>
|
||||
<input type="radio" id="clustering-dialog-dot-small" name="clustering-dialog-dot" value="small"/><label class="dot-small-label" for="clustering-dialog-dot-small" bind="or_dialog_smallDot"> </label>
|
||||
<input type="radio" id="clustering-dialog-dot-regular" name="clustering-dialog-dot" value="regular" checked="checked"/><label class="dot-regular-label" for="clustering-dialog-dot-regular" bind="or_dialog_regularDot"> </label>
|
||||
<input type="radio" id="clustering-dialog-dot-big" name="clustering-dialog-dot" value="big"/><label class="dot-big-label" for="clustering-dialog-dot-big" bind="or_dialog_bigDot"> </label>
|
||||
</div>
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
</td>
|
||||
<td class="right" style="text-align: right">
|
||||
<button class="button" bind="closeButton">Close</button>
|
||||
<button class="button" bind="closeButton"></button>
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
|
@ -43,10 +43,19 @@ ScatterplotDialog.prototype._createDialog = function() {
|
||||
var dialog = $(DOM.loadHTML("core", "scripts/dialogs/scatterplot-dialog.html"));
|
||||
this._elmts = DOM.bind(dialog);
|
||||
this._elmts.dialogHeader.text(
|
||||
'Scatterplot Matrix' +
|
||||
((typeof this._column == "undefined") ? "" : " (focusing on '" + this._column + "')"));
|
||||
$.i18n._('core-dialogs')["scatterplot-matrix"] +
|
||||
((typeof this._column == "undefined") ? "" : " ("+$.i18n._('core-dialogs')["focusing-on"]+" '" + this._column + "')"));
|
||||
|
||||
this._elmts.closeButton.click(function() { self._dismiss(); });
|
||||
this._elmts.or_dialog_linplot.attr("title", $.i18n._('core-dialogs')["linear-plot"]);
|
||||
this._elmts.or_dialog_logplot.attr("title", $.i18n._('core-dialogs')["logarithmic-plot"]);
|
||||
this._elmts.or_dialog_counter.attr("title", $.i18n._('core-dialogs')["rotated-counter-clock"]);
|
||||
this._elmts.or_dialog_norot.attr("title", $.i18n._('core-dialogs')["no-rotation"]);
|
||||
this._elmts.or_dialog_clock.attr("title", $.i18n._('core-dialogs')["rotated-clock"]);
|
||||
this._elmts.or_dialog_smallDot.attr("title", $.i18n._('core-dialogs')["small-dot"]);
|
||||
this._elmts.or_dialog_regularDot.attr("title", $.i18n._('core-dialogs')["regular-dot"]);
|
||||
this._elmts.or_dialog_bigDot.attr("title", $.i18n._('core-dialogs')["big-dot"]);
|
||||
this._elmts.closeButton.text($.i18n._('core-buttons')["close"]);
|
||||
|
||||
this._elmts.plotSelector.buttonset().change(function() {
|
||||
self._plot_method = $(this).find("input:checked").val();
|
||||
@ -78,7 +87,7 @@ ScatterplotDialog.prototype._renderMatrix = function() {
|
||||
var self = this;
|
||||
|
||||
var container = this._elmts.tableContainer.html(
|
||||
'<div style="margin: 1em; font-size: 130%; color: #888; background-color: white;">Processing... <img src="images/small-spinner.gif"></div>'
|
||||
'<div style="margin: 1em; font-size: 130%; color: #888; background-color: white;">'+$.i18n._('core-dialogs')["focusing-on"]+' <img src="images/small-spinner.gif"></div>'
|
||||
);
|
||||
|
||||
if (theProject.columnModel.columns.length > 0) {
|
||||
@ -87,7 +96,7 @@ ScatterplotDialog.prototype._renderMatrix = function() {
|
||||
};
|
||||
$.getJSON("command/core/get-columns-info?" + $.param(params),function(data) {
|
||||
if (data === null || typeof data.length == 'undefined') {
|
||||
container.html("Error calling 'get-columns-info'");
|
||||
container.html($.i18n._('core-dialogs')["error-getColumnInfo"]);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -205,7 +214,7 @@ ScatterplotDialog.prototype._renderMatrix = function() {
|
||||
});
|
||||
} else {
|
||||
container.html(
|
||||
'<div style="margin: 2em;"><div style="font-size: 130%; color: #333;">There are no columns in this dataset</div></div>'
|
||||
'<div style="margin: 2em;"><div style="font-size: 130%; color: #333;">'+$.i18n._('core-dialogs')["no-column-dataset"]+ '</div></div>'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
<div class="dialog-frame" style="width: 900px;">
|
||||
<div class="dialog-header" bind="dialogHeader">Templating Export</div>
|
||||
<div class="dialog-header" bind="dialogHeader"></div>
|
||||
<div class="dialog-body" bind="dialogBody">
|
||||
<div class="grid-layout layout-normal layout-full"><table>
|
||||
<tr>
|
||||
<td style="vertical-align: top"><div class="grid-layout layout-tighter layout-full" bind="controls"><table>
|
||||
<tr><td>Prefix</td></tr>
|
||||
<tr><td bind="or_dialog_prefix"></td></tr>
|
||||
<tr><td><div class="input-container"><textarea bind="prefixTextarea" class="code" wrap="off" style="height:5em;"></textarea></div></td></tr>
|
||||
<tr><td>Row Template</td></tr>
|
||||
<tr><td bind="or_dialog_rowTmpl"></td></tr>
|
||||
<tr><td><div class="input-container"><textarea bind="templateTextarea" class="code" wrap="off" style="height:20em;"></textarea></div></td></tr>
|
||||
<tr><td>Row Separator</td></tr>
|
||||
<tr><td bind="or_dialog_rowSep"></td></tr>
|
||||
<tr><td><div class="input-container"><textarea bind="separatorTextarea" class="code" wrap="off" style="height:3em;"></textarea></div></td></tr>
|
||||
<tr><td>Suffix</td></tr>
|
||||
<tr><td bind="or_dialog_suffix"></td></tr>
|
||||
<tr><td><div class="input-container"><textarea bind="suffixTextarea" class="code" wrap="off" style="height:5em;"></textarea></div></td></tr>
|
||||
</table></div></td>
|
||||
<td width="50%" style="vertical-align: top">
|
||||
@ -21,11 +21,11 @@
|
||||
</div>
|
||||
<div class="dialog-footer" bind="dialogFooter"><div class="grid-layout layout-normal layout-full"><table><tr>
|
||||
<td align="left">
|
||||
<button class="button" bind="resetButton">Reset Template</button>
|
||||
<button class="button" bind="resetButton"></button>
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
<button class="button" bind="exportButton">Export</button>
|
||||
<button class="button" bind="cancelButton">Cancel</button>
|
||||
<button class="button" bind="exportButton"></button>
|
||||
<button class="button" bind="cancelButton"></button>
|
||||
</td>
|
||||
</tr></table></div></div>
|
||||
</div>
|
@ -43,6 +43,15 @@ TemplatingExporterDialog.prototype._createDialog = function() {
|
||||
this._elmts = DOM.bind(dialog);
|
||||
this._elmts.controls.find("textarea").bind("keyup change input",function() { self._scheduleUpdate(); });
|
||||
|
||||
this._elmts.dialogHeader.html($.i18n._('core-dialogs')["template-export"]);
|
||||
this._elmts.or_dialog_prefix.html($.i18n._('core-dialogs')["template-prefix"]);
|
||||
this._elmts.or_dialog_rowTmpl.html($.i18n._('core-dialogs')["template-rowt"]);
|
||||
this._elmts.or_dialog_rowSep.html($.i18n._('core-dialogs')["template-rows"]);
|
||||
this._elmts.or_dialog_suffix.html($.i18n._('core-dialogs')["template-suffix"]);
|
||||
this._elmts.resetButton.html($.i18n._('core-buttons')["reset-template"]);
|
||||
this._elmts.exportButton.html($.i18n._('core-buttons')["export"]);
|
||||
this._elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
|
||||
|
||||
this._elmts.exportButton.click(function() { self._export(); self._dismiss(); });
|
||||
this._elmts.cancelButton.click(function() { self._dismiss(); });
|
||||
this._elmts.resetButton.click(function() {
|
||||
@ -98,10 +107,10 @@ TemplatingExporterDialog.prototype._scheduleUpdate = function() {
|
||||
window.clearTimeout(this._timerID);
|
||||
}
|
||||
|
||||
this._elmts.previewTextarea[0].value = "Idling...";
|
||||
this._elmts.previewTextarea[0].value = $.i18n._('core-dialogs')["idling"];
|
||||
this._timerID = window.setTimeout(function() {
|
||||
self._timerID = null;
|
||||
self._elmts.previewTextarea[0].value = "Updating...";
|
||||
self._elmts.previewTextarea[0].value = $.i18n._('core-dialogs')["updating"];
|
||||
self._updatePreview();
|
||||
}, 1000);
|
||||
};
|
||||
|
@ -34,6 +34,24 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
var theProject;
|
||||
var ui = {};
|
||||
|
||||
var lang = navigator.language.split("-")[0]
|
||||
|| navigator.userLanguage.split("-")[0];
|
||||
var dictionary = "";
|
||||
$.ajax({
|
||||
url : "/command/core/load-language?",
|
||||
type : "POST",
|
||||
async : false,
|
||||
data : {
|
||||
// lng : lang
|
||||
lng : 'en'
|
||||
},
|
||||
success : function(data) {
|
||||
dictionary = data;
|
||||
}
|
||||
});
|
||||
$.i18n.setDictionary(dictionary);
|
||||
// End internationalization
|
||||
|
||||
var Refine = {
|
||||
refineHelperService: "http://openrefine-helper.freebaseapps.com"
|
||||
};
|
||||
|
@ -120,12 +120,131 @@
|
||||
"encoding": "Encoding",
|
||||
"aliases": "Aliases"
|
||||
},
|
||||
"core-dialogs": {
|
||||
"cluster-edit": "Cluster & Edit column",
|
||||
"cluster-size": "Cluster Size",
|
||||
"row-count": "Row Count",
|
||||
"cluster-values": "Values in Cluster",
|
||||
"merge": "Merge?",
|
||||
"new-cell-val": "New Cell Value",
|
||||
"use-this-val": "Use this value",
|
||||
"browse-only-these": "Browse only these values",
|
||||
"browse-this-cluster": "Browse this cluster",
|
||||
"no-cluster-found": "No clusters were found with the selected method",
|
||||
"try-another-method": "Try selecting another method above or changing its parameters",
|
||||
"clustering": "Clustering... ",
|
||||
"warning-check-boxes": "You must check some Edit? checkboxes for your edits to be applied.",
|
||||
"choices-in-cluster": "# Choices in Cluster",
|
||||
"rows-in-cluster": "# Rows in Cluster",
|
||||
"choice-avg-length": "Average Length of Choices",
|
||||
"choice-var-length": "Length Variance of Choices",
|
||||
"filtered-from": "filtered from <b>",
|
||||
"from-total": "</b> total",
|
||||
"cluster-descr": "This feature helps you find groups of different cell values that might be alternative representations of the same thing. For example, the two strings \"New York\" and \"new york\" are very likely to refer to the same concept and just have capitalization differences, and \"Gödel\" and \"Godel\" probably refer to the same person.",
|
||||
"find-more": "Find out more ...",
|
||||
"method": "Method ",
|
||||
"key-collision": "key collision",
|
||||
"nearest-neighbor": "nearest neighbor",
|
||||
"keying-function": "Keying Function ",
|
||||
"fingerprint": "fingerprint",
|
||||
"ngram": "ngram-fingerprint",
|
||||
"metaphone": "metaphone3",
|
||||
"phonetic": "cologne-phonetic",
|
||||
"distance-fun": "Distance Function ",
|
||||
"leven": "levenshtein",
|
||||
"ppm" : "PPM",
|
||||
"ngram-size": "Ngram Size ",
|
||||
"ngram-radius": "Radius ",
|
||||
"block-chars": "Block Chars ",
|
||||
"reorder-column": "Re-order / Remove Columns",
|
||||
"drag-column": "Drag columns to re-order",
|
||||
"drop-column": "Drop columns here to remove",
|
||||
"template-export": "Templating Export",
|
||||
"template-prefix": "Prefix",
|
||||
"template-rowt": "Row Template",
|
||||
"template-rows": "Row Separator",
|
||||
"template-suffix": "Suffix",
|
||||
"idling": "Idling...",
|
||||
"updating": "Updating...",
|
||||
"scatterplot-matrix": "Scatterplot Matrix",
|
||||
"focusing-on": "focusing on",
|
||||
"processing": "Processing...",
|
||||
"error-getColumnInfo": "Error calling 'get-columns-info'",
|
||||
"no-column-dataset": "There are no columns in this dataset",
|
||||
"linear-plot": "Linear Plot",
|
||||
"logarithmic-plot": "Logarithmic Plot",
|
||||
"rotated-counter-clock": "Rotated 45° Counter-Clockwise",
|
||||
"no-rotation": "No rotation",
|
||||
"rotated-clock": "Rotated 45° Clockwise",
|
||||
"small-dot": "Small Dot Size",
|
||||
"regular-dot": "Regular Dot Size",
|
||||
"big-dot": "Big Dot Size",
|
||||
"cell-fields": "The current cell. It has a few fields: 'value' and 'recon'.",
|
||||
"cell-value": "The current cell's value. This is a shortcut for 'cell.value'.",
|
||||
"row-fields": "The current row. It has 5 fields: 'flagged', 'starred', 'index', 'cells', and 'record'.",
|
||||
"cells-of-row": "The cells of the current row. This is a shortcut for 'row.cells'. A particular cell can be retrieved with 'cells.<column name>' if the <column name> is a single word, or with 'cells[\"<column name>\"] otherwise.",
|
||||
"row-index": "The current row's index. This is a shortcut for 'row.index'.",
|
||||
"returns": "returns",
|
||||
"from": "From",
|
||||
"expression": "Expression",
|
||||
"reuse": "Reuse",
|
||||
"remove": "Remove",
|
||||
"error": "Error",
|
||||
"no-syntax-err": "No syntax error",
|
||||
"internal-err": "Internal error",
|
||||
"language": "Language",
|
||||
"preview": "Preview",
|
||||
"history": "History",
|
||||
"starred": "Starred",
|
||||
"help": "Help",
|
||||
"opt-code-applied": "Option code successfully applied.",
|
||||
"error-apply-code": "Error applying option code",
|
||||
"custom-tab-exp": "Custom Tabular Exporter",
|
||||
"content": "Content",
|
||||
"download": "Download",
|
||||
"upload": "Upload",
|
||||
"opt-code": "Option Code",
|
||||
"sel-and-ord": "Select and Order Columns to Export",
|
||||
"opt-for": "Options for",
|
||||
"for-recon-cell": "For reconciled cells, output",
|
||||
"match-ent-name": "Matched entity's name",
|
||||
"cell-content": "Cell's content",
|
||||
"match-ent-id": "Matched entity's ID",
|
||||
"link-match": "Link to matched entity's page",
|
||||
"out-not-unmatch": "Output nothing for unmatched cells",
|
||||
"date-format": "For date/time values, use format",
|
||||
"date-iso": "ISO 8601, e.g., 2011-08-24T18:36:10+08:00",
|
||||
"short-format": "Short locale format",
|
||||
"medium-format": "Medium locale format",
|
||||
"long-format": "Long locale format",
|
||||
"full-format": "Full locale format",
|
||||
"custom": "Custom",
|
||||
"help": "Help",
|
||||
"local-time": "Use local time zone",
|
||||
"omit-time": "Omit time",
|
||||
"out-col-header": "Output column headers",
|
||||
"out-empty-row": "Output empty rows (ie all cells null)",
|
||||
"ignore-facets": "Ignore facets and filters and export all rows",
|
||||
"line-based": "Line-based text formats",
|
||||
"other-format": "Other formats",
|
||||
"tsv": "Tab-separated values (TSV)",
|
||||
"csv": "Comma-separated values (CSV)",
|
||||
"custom-separator": "Custom separator",
|
||||
"excel": "Excel (.xls)",
|
||||
"excel-xml": "Excel in XML (.xlsx)",
|
||||
"html-table": "HTML table",
|
||||
"char-enc": "Character encoding",
|
||||
"line-sep": "Line separator",
|
||||
"upload-to": "Upload to",
|
||||
"json-text": "The following JSON text encodes the options you have set in the other tabs. You can copy it out and save it for later, and paste it back in and click Apply to re-use the same options."
|
||||
},
|
||||
"core-buttons": {
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"ok": " OK ",
|
||||
"import-proj": "Import Project",
|
||||
"select-all": "Select All",
|
||||
"unselect-all": "Unselect All",
|
||||
"deselect-all": "De-select All",
|
||||
"select": "Select",
|
||||
"unselect": "Unselect",
|
||||
"startover": "« Start Over",
|
||||
@ -135,6 +254,15 @@
|
||||
"next": "Next »",
|
||||
"add-url": "Add Another URL",
|
||||
"update-preview": "Update Preview",
|
||||
"pick-record": "Pick Record Elements"
|
||||
"pick-record": "Pick Record Elements",
|
||||
"merge-cluster": "Merge Selected & Re-Cluster",
|
||||
"merge-close": "Merge Selected & Close",
|
||||
"close": "Close",
|
||||
"reset-template": "Reset Template",
|
||||
"export": "Export",
|
||||
"preview": "Preview",
|
||||
"download": "Download",
|
||||
"upload": "Upload",
|
||||
"apply": "Apply"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user