Internationalization of the data-table part

This commit is contained in:
Blakko 2013-07-09 15:57:25 +02:00
parent 5e10a91175
commit 8a0f23be3b
19 changed files with 634 additions and 273 deletions

View File

@ -4,27 +4,27 @@
<div class="dialog-body" bind="dialogBody"> <div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full"><table cols="2"> <div class="grid-layout layout-normal layout-full"><table cols="2">
<tr> <tr>
<td width="1%" style="white-space: pre;">New column name</td> <td width="1%" style="white-space: pre;" bind="or_views_newCol"></td>
<td><input bind="columnNameInput" size="40" /></td> <td><input bind="columnNameInput" size="40" /></td>
<td width="1%" style="white-space: pre;">Throttle delay</td> <td width="1%" style="white-space: pre;" bind="or_views_throttle"></td>
<td><input bind="throttleDelayInput" size="10" value="5000" /> milliseconds</td> <td><input bind="throttleDelayInput" size="10" value="5000" /> <span bind="or_views_milli"></span></td>
</tr> </tr>
<tr> <tr>
<td width="1%" style="white-space: pre;">On error</td> <td width="1%" style="white-space: pre;" bind="or_views_onErr"></td>
<td colspan="3"> <td colspan="3">
<input type="radio" name="dialog-onerror-choice" value="set-to-blank" checked id="$add-column-error-set-to-blank"/> <input type="radio" name="dialog-onerror-choice" value="set-to-blank" checked id="$add-column-error-set-to-blank"/>
<label for="$add-column-error-set-to-blank">set to blank</label> <label for="$add-column-error-set-to-blank" bind="or_views_setBlank"></label>
<input type="radio" name="dialog-onerror-choice" value="store-error" id="$add-column-error-store-error" /> <input type="radio" name="dialog-onerror-choice" value="store-error" id="$add-column-error-store-error" />
<label for="$add-column-error-store-error">store error</label></td> <label for="$add-column-error-store-error" bind="or_views_storeErr"></label></td>
</tr> </tr>
<tr><td colspan="4"><h3>Formulate the URLs to fetch:</h3></td></tr> <tr><td colspan="4"><h3><span bind="or_views_urlFetch"></span></h3></td></tr>
<tr><td colspan="4">$EXPRESSION_PREVIEW_WIDGET$</td></tr> <tr><td colspan="4">$EXPRESSION_PREVIEW_WIDGET$</td></tr>
</table></div> </table></div>
</div> </div>
<div class="dialog-footer" bind="dialogFooter"> <div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">&nbsp;&nbsp;OK&nbsp;&nbsp;</button> <button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton">Cancel</button> <button class="button" bind="cancelButton"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -4,18 +4,18 @@
<div class="dialog-body" bind="dialogBody"> <div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full"><table cols="2"> <div class="grid-layout layout-normal layout-full"><table cols="2">
<tr> <tr>
<td width="1%" style="white-space: pre;">New column name</td> <td width="1%" style="white-space: pre;" bind="or_views_newCol"></td>
<td><input bind="columnNameInput" size="40" /></td> <td><input bind="columnNameInput" size="40" /></td>
</tr> </tr>
<tr> <tr>
<td width="1%" style="white-space: pre;">On error</td> <td width="1%" style="white-space: pre;" bind="or_views_onErr"></td>
<td> <td>
<input type="radio" name="create-column-dialog-onerror-choice" value="set-to-blank" checked id="$add-column-error-set-to-blank" /> <input type="radio" name="create-column-dialog-onerror-choice" value="set-to-blank" checked id="$add-column-error-set-to-blank" />
<label for="$add-column-error-set-to-blank">set to blank</label> <label for="$add-column-error-set-to-blank" bind="or_views_setBlank"></label>
<input type="radio" name="create-column-dialog-onerror-choice" value="store-error" id="$add-column-error-store-error" /> <input type="radio" name="create-column-dialog-onerror-choice" value="store-error" id="$add-column-error-store-error" />
<label for="$add-column-error-store-error">store error</label> <label for="$add-column-error-store-error" bind="or_views_storeErr"></label>
<input type="radio" name="create-column-dialog-onerror-choice" value="keep-original" id="$add-column-error-keep-original" /> <input type="radio" name="create-column-dialog-onerror-choice" value="keep-original" id="$add-column-error-keep-original" />
<label for="$add-column-error-keep-original">copy value from original column</label></td> <label for="$add-column-error-keep-original" bind="or_views_copyVal"></label></td>
</tr> </tr>
<tr><td colspan="2">$EXPRESSION_PREVIEW_WIDGET$</td></tr> <tr><td colspan="2">$EXPRESSION_PREVIEW_WIDGET$</td></tr>
</table></div> </table></div>

View File

@ -1,24 +1,24 @@
Data type: <select bind="typeSelect"> <span bind="or_views_dataType"></span> <select bind="typeSelect">
<option value="text">text</option> <option value="text" bind="or_views_text"></option>
<option value="number">number</option> <option value="number" bind="or_views_number"></option>
<option value="boolean">boolean</option> <option value="boolean" bind="or_views_boolean"></option>
<option value="date">date</option> <option value="date" bind="or_views_date"></option>
</select> </select>
<textarea class="data-table-cell-editor-editor" bind="textarea" /> <textarea class="data-table-cell-editor-editor" bind="textarea" />
<div id="data-table-cell-editor-actions"> <div id="data-table-cell-editor-actions">
<div class="data-table-cell-editor-action"> <div class="data-table-cell-editor-action">
<button class="button" bind="okButton">Apply</button> <button class="button" bind="okButton"></button>
<div class="data-table-cell-editor-key">Enter</div> <div class="data-table-cell-editor-key" bind="or_views_enter"></div>
</div> </div>
<div class="data-table-cell-editor-action"> <div class="data-table-cell-editor-action">
<button class="button" bind="okallButton">Apply to All Identical Cells</button> <button class="button" bind="okallButton"></button>
<div class="data-table-cell-editor-key">Ctrl-Enter</div> <div class="data-table-cell-editor-key" bind="or_views_ctrlEnter"></div>
</div> </div>
<div class="data-table-cell-editor-action"> <div class="data-table-cell-editor-action">
<button class="button" bind="cancelButton">Cancel</button> <button class="button" bind="cancelButton"></button>
<div class="data-table-cell-editor-key">Esc</div> <div class="data-table-cell-editor-key" bind="or_views_esc"></div>
</div> </div>
</div> </div>

View File

@ -1,5 +1,5 @@
<div class="data-table-topic-popup-header"> <div class="data-table-topic-popup-header">
<button class="button" title="Match topic to this cell" bind="matchButton">Match this Cell</button> <button class="button" title="Match topic to this cell" bind="matchButton"></button>
<button class="button" title="Match topic to all visible cells with same content" bind="matchSimilarButton">Match All Identical Cells</button> <button class="button" title="Match topic to all visible cells with same content" bind="matchSimilarButton"></button>
<button class="button" title="Cancel" bind="cancelButton">Cancel</button> <button class="button" title="Cancel" bind="cancelButton"></button>
</div> </div>

View File

@ -1,27 +1,27 @@
<div class="dialog-frame" style="width: 450px;"> <div class="dialog-frame" style="width: 450px;">
<div class="dialog-border"> <div class="dialog-border">
<div class="dialog-header" bind="dialogHeader">Search for Match</div> <div class="dialog-header" bind="dialogHeader"></div>
<div class="dialog-body" bind="dialogBody"> <div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-tighter"><table> <div class="grid-layout layout-tighter"><table>
<tr> <tr>
<td colspan="2">Search for "<span bind="cellTextSpan"></span>"</td> <td colspan="2"><span bind="or_views_searchFor"></span> "<span bind="cellTextSpan"></span>"</td>
<td><input bind="input" /></td> <td><input bind="input" /></td>
</tr> </tr>
<tr> <tr>
<td width="1%"><input type="radio" name="cell-recon-search-for-match-mode" checked="true" bind="radioSimilar" id="$cell-recon-search-match-similar" /></td> <td width="1%"><input type="radio" name="cell-recon-search-for-match-mode" checked="true" bind="radioSimilar" id="$cell-recon-search-match-similar" /></td>
<td><label for="$cell-recon-search-match-similar">Match other cells with same content</label></td> <td><label for="$cell-recon-search-match-similar" bind="or_views_matchOther"></label></td>
</tr> </tr>
<tr> <tr>
<td width="1%"><input type="radio" name="cell-recon-search-for-match-mode" bind="radioOne" id="$cell-recon-search-match-one" /></td> <td width="1%"><input type="radio" name="cell-recon-search-for-match-mode" bind="radioOne" id="$cell-recon-search-match-one" /></td>
<td><label for="$cell-recon-search-match-one">Match this cell only</label></td> <td><label for="$cell-recon-search-match-one" bind="or_views_matchThis"></label></td>
</tr> </tr>
</table></div> </table></div>
</div> </div>
<div class="dialog-footer" bind="dialogFooter"> <div class="dialog-footer" bind="dialogFooter">
<button class="button button-primary" bind="okButton">Match</button> <button class="button button-primary" bind="okButton"></button>
<button class="button" bind="newButton">New Topic</button> <button class="button" bind="newButton"></button>
<button class="button" bind="clearButton">Don't Reconcile Cell</button> <button class="button" bind="clearButton"></button>
<button class="button" bind="cancelButton">Cancel</button> <button class="button" bind="cancelButton"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -50,7 +50,7 @@ DataTableCellUI.prototype._render = function() {
var editLink = $('<a href="javascript:{}">&nbsp;</a>') var editLink = $('<a href="javascript:{}">&nbsp;</a>')
.addClass("data-table-cell-edit") .addClass("data-table-cell-edit")
.attr("title", "Edit this cell") .attr("title", $.i18n._('core-views')["edit-cell"])
.appendTo(divContent) .appendTo(divContent)
.click(function() { self._startEdit(this); }); .click(function() { self._startEdit(this); });
@ -92,7 +92,7 @@ DataTableCellUI.prototype._render = function() {
$('<span>').addClass("data-table-recon-new").text("new").appendTo(divContent); $('<span>').addClass("data-table-recon-new").text("new").appendTo(divContent);
$('<a href="javascript:{}"></a>') $('<a href="javascript:{}"></a>')
.text("Choose new match") .text($.i18n._('core-views')["choose-match"])
.addClass("data-table-recon-action") .addClass("data-table-recon-action")
.appendTo(divContent).click(function(evt) { .appendTo(divContent).click(function(evt) {
self._doRematch(); self._doRematch();
@ -112,7 +112,7 @@ DataTableCellUI.prototype._render = function() {
$('<span> </span>').appendTo(divContent); $('<span> </span>').appendTo(divContent);
$('<a href="javascript:{}"></a>') $('<a href="javascript:{}"></a>')
.text("Choose new match") .text($.i18n._('core-views')["choose-match"])
.addClass("data-table-recon-action") .addClass("data-table-recon-action")
.appendTo(divContent) .appendTo(divContent)
.click(function(evt) { .click(function(evt) {
@ -130,14 +130,14 @@ DataTableCellUI.prototype._render = function() {
$('<a href="javascript:{}">&nbsp;</a>') $('<a href="javascript:{}">&nbsp;</a>')
.addClass("data-table-recon-match-similar") .addClass("data-table-recon-match-similar")
.attr("title", "Match this topic to this and all identical cells") .attr("title", $.i18n._('core-views')["match-all-cells"])
.appendTo(li).click(function(evt) { .appendTo(li).click(function(evt) {
self._doMatchTopicToSimilarCells(candidate); self._doMatchTopicToSimilarCells(candidate);
}); });
$('<a href="javascript:{}">&nbsp;</a>') $('<a href="javascript:{}">&nbsp;</a>')
.addClass("data-table-recon-match") .addClass("data-table-recon-match")
.attr("title", "Match this topic to this cell") .attr("title", $.i18n._('core-views')["match-this-cell"] )
.appendTo(li).click(function(evt) { .appendTo(li).click(function(evt) {
self._doMatchTopicToOneCell(candidate); self._doMatchTopicToOneCell(candidate);
}); });
@ -188,19 +188,19 @@ DataTableCellUI.prototype._render = function() {
var liNew = $('<div></div>').addClass("data-table-recon-candidate").appendTo(ul); var liNew = $('<div></div>').addClass("data-table-recon-candidate").appendTo(ul);
$('<a href="javascript:{}">&nbsp;</a>') $('<a href="javascript:{}">&nbsp;</a>')
.addClass("data-table-recon-match-similar") .addClass("data-table-recon-match-similar")
.attr("title", "Create a new topic for this and all identical cells") .attr("title", $.i18n._('core-views')["create-topic-cells"])
.appendTo(liNew).click(function(evt) { .appendTo(liNew).click(function(evt) {
self._doMatchNewTopicToSimilarCells(); self._doMatchNewTopicToSimilarCells();
}); });
$('<a href="javascript:{}">&nbsp;</a>') $('<a href="javascript:{}">&nbsp;</a>')
.addClass("data-table-recon-match") .addClass("data-table-recon-match")
.attr("title", "Create a new topic for this cell") .attr("title", $.i18n._('core-views')["create-topic-cell"])
.appendTo(liNew).click(function(evt) { .appendTo(liNew).click(function(evt) {
self._doMatchNewTopicToOneCell(); self._doMatchNewTopicToOneCell();
}); });
$('<span>').text("Create new topic").appendTo(liNew); $('<span>').text($.i18n._('core-views')["create-topic"]).appendTo(liNew);
var suggestOptions; var suggestOptions;
var addSuggest = false; var addSuggest = false;
@ -218,7 +218,7 @@ DataTableCellUI.prototype._render = function() {
self._searchForMatch(suggestOptions); self._searchForMatch(suggestOptions);
return false; return false;
}) })
.text("Search for match") .text($.i18n._('core-views')["search-match"])
.appendTo(extraChoices); .appendTo(extraChoices);
} }
} }
@ -316,6 +316,15 @@ DataTableCellUI.prototype._searchForMatch = function(suggestOptions) {
var self = this; var self = this;
var frame = $(DOM.loadHTML("core", "scripts/views/data-table/cell-recon-search-for-match.html")); var frame = $(DOM.loadHTML("core", "scripts/views/data-table/cell-recon-search-for-match.html"));
var elmts = DOM.bind(frame); var elmts = DOM.bind(frame);
elmts.dialogHeader.html($.i18n._('core-views')["search-match"]);
elmts.or_views_searchFor.html($.i18n._('core-views')["search-for"]);
elmts.or_views_matchOther.html($.i18n._('core-views')["match-other"]);
elmts.or_views_matchThis.html($.i18n._('core-views')["match-this"]);
elmts.okButton.html($.i18n._('core-buttons')["match"]);
elmts.newButton.html($.i18n._('core-buttons')["new-topic"]);
elmts.clearButton.html($.i18n._('core-buttons')["dont-reconcile"]);
elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
var level = DialogSystem.showDialog(frame); var level = DialogSystem.showDialog(frame);
var dismiss = function() { var dismiss = function() {
@ -456,6 +465,11 @@ DataTableCellUI.prototype._previewCandidateTopic = function(candidate, elmt, pre
MenuSystem.positionMenuLeftRight(fakeMenu, $(elmt)); MenuSystem.positionMenuLeftRight(fakeMenu, $(elmt));
var elmts = DOM.bind(fakeMenu); var elmts = DOM.bind(fakeMenu);
elmts.matchButton.html($.i18n._('core-views')["match-cell"]);
elmts.matchSimilarButton.html($.i18n._('core-views')["match-identical"]);
elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
elmts.matchButton.click(function() { elmts.matchButton.click(function() {
self._doMatchTopicToOneCell(candidate); self._doMatchTopicToOneCell(candidate);
MenuSystem.dismissAll(); MenuSystem.dismissAll();
@ -478,6 +492,18 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
menu.html(DOM.loadHTML("core", "scripts/views/data-table/cell-editor.html")); menu.html(DOM.loadHTML("core", "scripts/views/data-table/cell-editor.html"));
var elmts = DOM.bind(menu); var elmts = DOM.bind(menu);
elmts.or_views_dataType.html($.i18n._('core-views')["data-type"]);
elmts.or_views_text.html($.i18n._('core-views')["text"]);
elmts.or_views_number.html($.i18n._('core-views')["number"]);
elmts.or_views_boolean.html($.i18n._('core-views')["boolean"]);
elmts.or_views_date.html($.i18n._('core-views')["date"]);
elmts.okButton.html($.i18n._('core-buttons')["apply"]);
elmts.or_views_enter.html($.i18n._('core-buttons')["enter"]);
elmts.okallButton.html($.i18n._('core-buttons')["apply-to-all"]);
elmts.or_views_ctrlEnter.html($.i18n._('core-views')["ctrl-enter"]);
elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
elmts.or_views_esc.html($.i18n._('core-buttons')["esc"]);
MenuSystem.showMenu(menu, function(){}); MenuSystem.showMenu(menu, function(){});
MenuSystem.positionMenuLeftRight(menu, $(this._td)); MenuSystem.positionMenuLeftRight(menu, $(this._td));
@ -495,7 +521,7 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
if (type == "number") { if (type == "number") {
value = parseFloat(text); value = parseFloat(text);
if (isNaN(value)) { if (isNaN(value)) {
alert("Not a valid number."); alert($.i18n._('core-views')["not-valid-number"]);
return; return;
} }
} else if (type == "boolean") { } else if (type == "boolean") {
@ -506,7 +532,7 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
value = DateTimeUtil.parseIso8601DateTime(text); value = DateTimeUtil.parseIso8601DateTime(text);
} }
if (!value) { if (!value) {
alert("Not a valid date."); alert($.i18n._('core-views')["not-valid-date"]);
return; return;
} }
value = value.toString("yyyy-MM-ddTHH:mm:ssZ"); value = value.toString("yyyy-MM-ddTHH:mm:ssZ");

View File

@ -76,7 +76,7 @@ DataTableColumnHeaderUI.prototype._render = function() {
var newPercent = Math.ceil(100 * stats.newTopics / stats.nonBlanks); var newPercent = Math.ceil(100 * stats.newTopics / stats.nonBlanks);
var matchPercent = Math.ceil(100 * stats.matchedTopics / stats.nonBlanks); var matchPercent = Math.ceil(100 * stats.matchedTopics / stats.nonBlanks);
var unreconciledPercent = Math.ceil(100 * (stats.nonBlanks - stats.matchedTopics - stats.newTopics) / stats.nonBlanks); var unreconciledPercent = Math.ceil(100 * (stats.nonBlanks - stats.matchedTopics - stats.newTopics) / stats.nonBlanks);
var title = matchPercent + "% matched, " + newPercent + "% new, " + unreconciledPercent + "% to be reconciled"; var title = matchPercent + "% "+$.i18n._('core-views')["matched"]+", " + newPercent + "% "+$.i18n._('core-views')["new"]+", " + unreconciledPercent + "% "+$.i18n._('core-views')["to-be-recon"];
var whole = $('<div>') var whole = $('<div>')
.addClass("column-header-recon-stats-bar") .addClass("column-header-recon-stats-bar")
@ -101,25 +101,25 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
var menu = [ var menu = [
{ {
id: "core/facet", id: "core/facet",
label: "Facet", label: $.i18n._('core-views')["facet"],
width: "170px", width: "170px",
submenu: [] submenu: []
}, },
{}, {},
{ {
id: "core/edit-cells", id: "core/edit-cells",
label: "Edit cells", label: $.i18n._('core-views')["edit-cells"],
width: "170px", width: "170px",
submenu: [] submenu: []
}, },
{ {
id: "core/edit-column", id: "core/edit-column",
label: "Edit column", label: $.i18n._('core-views')["edit-column"],
submenu: [] submenu: []
}, },
{ {
id: "core/transpose", id: "core/transpose",
label: "Transpose", label: $.i18n._('core-views')["transpose"],
submenu: [] submenu: []
}, },
{}, {},
@ -127,31 +127,31 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
this._dataTableView._getSortingCriterionForColumn(this._column.name) === null ? this._dataTableView._getSortingCriterionForColumn(this._column.name) === null ?
{ {
id: "core/sort", id: "core/sort",
"label": "Sort...", "label": $.i18n._('core-views')["sort"]+"...",
"click": function() { "click": function() {
self._showSortingCriterion(null, self._dataTableView._getSortingCriteriaCount() > 0); self._showSortingCriterion(null, self._dataTableView._getSortingCriteriaCount() > 0);
} }
} : } :
{ {
id: "core/sort", id: "core/sort",
label: "Sort", label: $.i18n._('core-views')["sort"],
submenu: this.createSortingMenu() submenu: this.createSortingMenu()
} }
), ),
{ {
id: "core/view", id: "core/view",
label: "View", label: "View",
tooltip: "Collapse/expand columns to make viewing the data more convenient", tooltip: $.i18n._('core-views')["collapse-expand"],
submenu: [ submenu: [
{ {
label: "Collapse this column", label: $.i18n._('core-views')["collapse-this"],
click: function() { click: function() {
self._dataTableView._collapsedColumnNames[self._column.name] = true; self._dataTableView._collapsedColumnNames[self._column.name] = true;
self._dataTableView.render(); self._dataTableView.render();
} }
}, },
{ {
label: "Collapse all other columns", label: $.i18n._('core-views')["collapse-all"],
click: function() { click: function() {
var collapsedColumnNames = {}; var collapsedColumnNames = {};
for (var i = 0; i < theProject.columnModel.columns.length; i++) { for (var i = 0; i < theProject.columnModel.columns.length; i++) {
@ -164,7 +164,7 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
} }
}, },
{ {
label: "Collapse all columns to left", label: $.i18n._('core-views')["collapse-left"],
click: function() { click: function() {
for (var i = 0; i < self._columnIndex; i++) { for (var i = 0; i < self._columnIndex; i++) {
self._dataTableView._collapsedColumnNames[theProject.columnModel.columns[i].name] = true; self._dataTableView._collapsedColumnNames[theProject.columnModel.columns[i].name] = true;
@ -173,7 +173,7 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
} }
}, },
{ {
label: "Collapse all columns to right", label: $.i18n._('core-views')["collapse-right"],
click: function() { click: function() {
for (var i = self._columnIndex + 1; i < theProject.columnModel.columns.length; i++) { for (var i = self._columnIndex + 1; i < theProject.columnModel.columns.length; i++) {
self._dataTableView._collapsedColumnNames[theProject.columnModel.columns[i].name] = true; self._dataTableView._collapsedColumnNames[theProject.columnModel.columns[i].name] = true;
@ -186,8 +186,8 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
{}, {},
{ {
id: "core/reconcile", id: "core/reconcile",
label: "Reconcile", label: $.i18n._('core-views')["reconcile"],
tooltip: "Match this column's cells to topics on Freebase", tooltip: $.i18n._('core-views')["match-fb"],
width: "170px", width: "170px",
submenu: [] submenu: []
} }
@ -208,7 +208,7 @@ DataTableColumnHeaderUI.prototype.createSortingMenu = function() {
var items = [ var items = [
{ {
"label": "Sort...", "label": $.i18n._('core-views')["sort"]+"...",
"click": function() { "click": function() {
self._showSortingCriterion(criterion, hasOtherCriteria); self._showSortingCriterion(criterion, hasOtherCriteria);
} }
@ -217,14 +217,14 @@ DataTableColumnHeaderUI.prototype.createSortingMenu = function() {
if (criterion !== null) { if (criterion !== null) {
items.push({ items.push({
"label": "Reverse", "label": $.i18n._('core-views')["reverse"],
"click": function() { "click": function() {
criterion.reverse = !criterion.reverse; criterion.reverse = !criterion.reverse;
self._dataTableView._addSortingCriterion(criterion); self._dataTableView._addSortingCriterion(criterion);
} }
}); });
items.push({ items.push({
"label": "Remove sort", "label": $.i18n._('core-views')["remove-sort"],
"click": function() { "click": function() {
self._dataTableView._removeSortingCriterionOfColumn(criterion.column); self._dataTableView._removeSortingCriterionOfColumn(criterion.column);
} }
@ -247,7 +247,22 @@ DataTableColumnHeaderUI.prototype._showSortingCriterion = function(criterion, ha
var frame = $(DOM.loadHTML("core", "scripts/views/data-table/sorting-criterion-dialog.html")); var frame = $(DOM.loadHTML("core", "scripts/views/data-table/sorting-criterion-dialog.html"));
var elmts = DOM.bind(frame); var elmts = DOM.bind(frame);
elmts.dialogHeader.text('Sort by ' + this._column.name); elmts.dialogHeader.text($.i18n._('core-views')["sort-by"]+' ' + this._column.name);
elmts.or_views_sortAs.text($.i18n._('core-views')["sort-cell"]);
elmts.or_views_positionBlank.text($.i18n._('core-views')["pos-blank"]);
elmts.or_views_text.text($.i18n._('core-views')["text"]);
elmts.or_views_caseSens.text($.i18n._('core-views')["case-sensitive"]);
elmts.or_views_numbers.text($.i18n._('core-views')["numbers"]);
elmts.or_views_dates.text($.i18n._('core-views')["dates"]);
elmts.or_views_booleans.text($.i18n._('core-views')["booleans"]);
elmts.or_views_dragDrop.text($.i18n._('core-views')["drag-drop"]);
elmts.directionForwardLabel.text($.i18n._('core-views')["forward"]);
elmts.directionReverseLabel.text($.i18n._('core-views')["reverse"]);
elmts.or_views_sortByCol.text($.i18n._('core-views')["sort-by-col"]);
elmts.okButton.html($.i18n._('core-buttons')["ok"]);
elmts.cancelButton.text($.i18n._('core-buttons')["cancel"]);
elmts.valueTypeOptions elmts.valueTypeOptions
.find("input[type='radio'][value='" + criterion.valueType + "']") .find("input[type='radio'][value='" + criterion.valueType + "']")
@ -260,14 +275,14 @@ DataTableColumnHeaderUI.prototype._showSortingCriterion = function(criterion, ha
forward.html("a - z"); forward.html("a - z");
reverse.html("z - a"); reverse.html("z - a");
} else if (valueType == "number") { } else if (valueType == "number") {
forward.html("smallest first"); forward.html($.i18n._('core-views')["smallest-first"]);
reverse.html("largest first"); reverse.html($.i18n._('core-views')["largest-first"]);
} else if (valueType == "date") { } else if (valueType == "date") {
forward.html("earliest first"); forward.html($.i18n._('core-views')["earliest-first"]);
reverse.html("latest first"); reverse.html($.i18n._('core-views')["latest-first"]);
} else if (valueType == "boolean") { } else if (valueType == "boolean") {
forward.html("false then true"); forward.html($.i18n._('core-views')["false-true"]);
reverse.html("true then false"); reverse.html($.i18n._('core-views')["true-false"]);
} }
}; };
elmts.valueTypeOptions elmts.valueTypeOptions
@ -288,9 +303,9 @@ DataTableColumnHeaderUI.prototype._showSortingCriterion = function(criterion, ha
elmts.sortAloneContainer.show(); elmts.sortAloneContainer.show();
} }
var validValuesHtml = '<li kind="value">Valid values</li>'; var validValuesHtml = '<li kind="value">'+$.i18n._('core-views')["valid-values"]+'</li>';
var blankValuesHtml = '<li kind="blank">Blanks</li>'; var blankValuesHtml = '<li kind="blank">'+$.i18n._('core-views')["blanks"]+'</li>';
var errorValuesHtml = '<li kind="error">Errors</li>'; var errorValuesHtml = '<li kind="error">'+$.i18n._('core-views')["errors"]+'</li>';
var positionsHtml; var positionsHtml;
if (criterion.blankPosition < 0) { if (criterion.blankPosition < 0) {
if (criterion.errorPosition > 0) { if (criterion.errorPosition > 0) {

View File

@ -4,31 +4,31 @@
<div class="dialog-body" bind="dialogBody"> <div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full grid-layout-for-ui"><table> <div class="grid-layout layout-normal layout-full grid-layout-for-ui"><table>
<tr> <tr>
<td>Copy to Columns</td> <td bind="or_views_copyToCol"></td>
<td>Copying Options</td> <td bind="or_views_copyOpt"></td>
</tr> </tr>
<tr> <tr>
<td><select bind="toColumnSelect" multiple size="20" style="width: 100%;"></select></td> <td><select bind="toColumnSelect" multiple size="20" style="width: 100%;"></select></td>
<td><div class="grid-layout layout-normal"><table> <td><div class="grid-layout layout-normal"><table>
<tr> <tr>
<td><input type="checkbox" bind="applyToJudgedCellsCheckbox" checked /></td><td>Apply to judged cells</td> <td><input type="checkbox" bind="applyToJudgedCellsCheckbox" checked /></td><td bind="or_views_applyToCell"></td>
</tr> </tr>
<tr> <tr>
<td colspan="2">What to copy:</td> <td colspan="2" bind="or_views_whatToCopy"></td>
</tr> </tr>
<tr> <tr>
<td><input type="checkbox" bind="newCheckbox" checked /></td><td>new recon judgments</td> <td><input type="checkbox" bind="newCheckbox" checked /></td><td bind="or_views_newRecon"></td>
</tr> </tr>
<tr> <tr>
<td><input type="checkbox" bind="matchCheckbox" checked /></td><td>match recon judgments</td> <td><input type="checkbox" bind="matchCheckbox" checked /></td><td bind="or_views_matchRecon"></td>
</tr> </tr>
</table></div></td> </table></div></td>
</tr> </tr>
</table></div> </table></div>
</div> </div>
<div class="dialog-footer" bind="dialogFooter"> <div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">Copy</button> <button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton">Cancel</button> <button class="button" bind="cancelButton"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -91,7 +91,7 @@ DataTableView.prototype.render = function() {
var html = $( var html = $(
'<div class="viewpanel-header">' + '<div class="viewpanel-header">' +
'<div class="viewpanel-rowrecord" bind="rowRecordControls">Show as: ' + '<div class="viewpanel-rowrecord" bind="rowRecordControls">'+$.i18n._('core-views')["show-as"]+': ' +
'<span bind="modeSelectors"></span>' + '<span bind="modeSelectors"></span>' +
'</div>' + '</div>' +
'<div class="viewpanel-pagesize" bind="pageSizeControls"></div>' + '<div class="viewpanel-pagesize" bind="pageSizeControls"></div>' +
@ -159,8 +159,8 @@ DataTableView.prototype._renderPagingControls = function(pageSizeControls, pagin
var from = (theProject.rowModel.start + 1); var from = (theProject.rowModel.start + 1);
var to = Math.min(theProject.rowModel.filtered, theProject.rowModel.start + theProject.rowModel.limit); var to = Math.min(theProject.rowModel.filtered, theProject.rowModel.start + theProject.rowModel.limit);
var firstPage = $('<a href="javascript:{}">&laquo; first</a>').appendTo(pagingControls); var firstPage = $('<a href="javascript:{}">&laquo; '+$.i18n._('core-views')["first"]+'</a>').appendTo(pagingControls);
var previousPage = $('<a href="javascript:{}">&lsaquo; previous</a>').appendTo(pagingControls); var previousPage = $('<a href="javascript:{}">&lsaquo; '+$.i18n._('core-views')["previous"]+'</a>').appendTo(pagingControls);
if (theProject.rowModel.start > 0) { if (theProject.rowModel.start > 0) {
firstPage.addClass("action").click(function(evt) { self._onClickFirstPage(this, evt); }); firstPage.addClass("action").click(function(evt) { self._onClickFirstPage(this, evt); });
previousPage.addClass("action").click(function(evt) { self._onClickPreviousPage(this, evt); }); previousPage.addClass("action").click(function(evt) { self._onClickPreviousPage(this, evt); });
@ -171,8 +171,8 @@ DataTableView.prototype._renderPagingControls = function(pageSizeControls, pagin
$('<span>').addClass("viewpanel-pagingcount").html(" " + from + " - " + to + " ").appendTo(pagingControls); $('<span>').addClass("viewpanel-pagingcount").html(" " + from + " - " + to + " ").appendTo(pagingControls);
var nextPage = $('<a href="javascript:{}">next &rsaquo;</a>').appendTo(pagingControls); var nextPage = $('<a href="javascript:{}">'+$.i18n._('core-views')["next"]+' &rsaquo;</a>').appendTo(pagingControls);
var lastPage = $('<a href="javascript:{}">last &raquo;</a>').appendTo(pagingControls); var lastPage = $('<a href="javascript:{}">'+$.i18n._('core-views')["last"]+' &raquo;</a>').appendTo(pagingControls);
if (theProject.rowModel.start + theProject.rowModel.limit < theProject.rowModel.filtered) { if (theProject.rowModel.start + theProject.rowModel.limit < theProject.rowModel.filtered) {
nextPage.addClass("action").click(function(evt) { self._onClickNextPage(this, evt); }); nextPage.addClass("action").click(function(evt) { self._onClickNextPage(this, evt); });
lastPage.addClass("action").click(function(evt) { self._onClickLastPage(this, evt); }); lastPage.addClass("action").click(function(evt) { self._onClickLastPage(this, evt); });
@ -302,7 +302,7 @@ DataTableView.prototype._renderDataTables = function(table, headerTable) {
.addClass("column-header") .addClass("column-header")
.html( .html(
'<div class="column-header-title">' + '<div class="column-header-title">' +
'<a class="column-header-menu" bind="dropdownMenu"></a><span class="column-header-name">All</span>' + '<a class="column-header-menu" bind="dropdownMenu"></a><span class="column-header-name">'+$.i18n._('core-views')["all"]+'</span>' +
'</div>' '</div>'
) )
).dropdownMenu.click(function() { ).dropdownMenu.click(function() {
@ -557,18 +557,18 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
var self = this; var self = this;
var menu = [ var menu = [
{ {
label: "Facet", label: $.i18n._('core-views')["facet"],
id: "core/facets", id: "core/facets",
width: "200px", width: "200px",
submenu: [ submenu: [
{ {
label: "Facet by star", label: $.i18n._('core-views')["facet-star"],
id: "core/facet-by-star", id: "core/facet-by-star",
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
{ {
"name" : "Starred Rows", "name" : $.i18n._('core-views')["starred-rows"],
"columnName" : "", "columnName" : "",
"expression" : "row.starred" "expression" : "row.starred"
}, },
@ -579,13 +579,13 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
} }
}, },
{ {
label: "Facet by flag", label: $.i18n._('core-views')["facet-flag"],
id: "core/facet-by-flag", id: "core/facet-by-flag",
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
{ {
"name" : "Flagged Rows", "name" : $.i18n._('core-views')["flagged-rows"],
"columnName" : "", "columnName" : "",
"expression" : "row.flagged" "expression" : "row.flagged"
}, },
@ -599,19 +599,19 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
}, },
{}, {},
{ {
label: "Edit rows", label: $.i18n._('core-views')["edit-rows"],
id: "core/edit-rows", id: "core/edit-rows",
width: "200px", width: "200px",
submenu: [ submenu: [
{ {
label: "Star rows", label: $.i18n._('core-views')["star-rows"],
id: "core/star-rows", id: "core/star-rows",
click: function() { click: function() {
Refine.postCoreProcess("annotate-rows", { "starred" : "true" }, null, { rowMetadataChanged: true }); Refine.postCoreProcess("annotate-rows", { "starred" : "true" }, null, { rowMetadataChanged: true });
} }
}, },
{ {
label: "Unstar rows", label: $.i18n._('core-views')["unstar-rows"],
id: "core/unstar-rows", id: "core/unstar-rows",
click: function() { click: function() {
Refine.postCoreProcess("annotate-rows", { "starred" : "false" }, null, { rowMetadataChanged: true }); Refine.postCoreProcess("annotate-rows", { "starred" : "false" }, null, { rowMetadataChanged: true });
@ -619,14 +619,14 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
}, },
{}, {},
{ {
label: "Flag rows", label: $.i18n._('core-views')["flag-rows"],
id: "core/flag-rows", id: "core/flag-rows",
click: function() { click: function() {
Refine.postCoreProcess("annotate-rows", { "flagged" : "true" }, null, { rowMetadataChanged: true }); Refine.postCoreProcess("annotate-rows", { "flagged" : "true" }, null, { rowMetadataChanged: true });
} }
}, },
{ {
label: "Unflag rows", label: $.i18n._('core-views')["unflag-rows"],
id: "core/unflag-rows", id: "core/unflag-rows",
click: function() { click: function() {
Refine.postCoreProcess("annotate-rows", { "flagged" : "false" }, null, { rowMetadataChanged: true }); Refine.postCoreProcess("annotate-rows", { "flagged" : "false" }, null, { rowMetadataChanged: true });
@ -634,7 +634,7 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
}, },
{}, {},
{ {
label: "Remove all matching rows", label: $.i18n._('core-views')["remove-matching"],
id: "core/remove-rows", id: "core/remove-rows",
click: function() { click: function() {
Refine.postCoreProcess("remove-rows", {}, null, { rowMetadataChanged: true }); Refine.postCoreProcess("remove-rows", {}, null, { rowMetadataChanged: true });
@ -643,12 +643,12 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
] ]
}, },
{ {
label: "Edit columns", label: $.i18n._('core-views')["edit-col"],
id: "core/edit-columns", id: "core/edit-columns",
width: "200px", width: "200px",
submenu: [ submenu: [
{ {
label: "Re-order / remove columns...", label: $.i18n._('core-views')["reorder-remove"]+"...",
id: "core/reorder-columns", id: "core/reorder-columns",
click: function() { click: function() {
new ColumnReorderingDialog(); new ColumnReorderingDialog();
@ -658,12 +658,12 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
}, },
{}, {},
{ {
label: "View", label: $.i18n._('core-views')["view"],
id: "core/view", id: "core/view",
width: "200px", width: "200px",
submenu: [ submenu: [
{ {
label: "Collapse all columns", label: $.i18n._('core-views')["collapse-all"],
id: "core/collapse-all-columns", id: "core/collapse-all-columns",
click: function() { click: function() {
for (var i = 0; i < theProject.columnModel.columns.length; i++) { for (var i = 0; i < theProject.columnModel.columns.length; i++) {
@ -673,7 +673,7 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
} }
}, },
{ {
label: "Expand all columns", label: $.i18n._('core-views')["expand-all"],
id: "core/expand-all-columns", id: "core/expand-all-columns",
click: function() { click: function() {
self._collapsedColumnNames = []; self._collapsedColumnNames = [];
@ -695,14 +695,14 @@ DataTableView.prototype._createSortingMenu = function(elmt) {
var self = this; var self = this;
var items = [ var items = [
{ {
"label" : "Remove sort", "label" : $.i18n._('core-views')["remove-sort"],
"click" : function() { "click" : function() {
self._sorting.criteria = []; self._sorting.criteria = [];
self.update(); self.update();
} }
}, },
{ {
"label" : "Reorder rows permanently", "label" : $.i18n._('core-views')["reorder-perma"],
"click" : function() { "click" : function() {
Refine.postCoreProcess( Refine.postCoreProcess(
"reorder-rows", "reorder-rows",
@ -733,7 +733,7 @@ DataTableView.prototype._createSortingMenu = function(elmt) {
var columnHeaderUI = getColumnHeaderUI(criterion.column); var columnHeaderUI = getColumnHeaderUI(criterion.column);
if (columnHeaderUI !== null) { if (columnHeaderUI !== null) {
items.push({ items.push({
"label" : "By " + criterion.column, "label" : $.i18n._('core-views')["by"]+" " + criterion.column,
"submenu" : columnHeaderUI.createSortingMenu() "submenu" : columnHeaderUI.createSortingMenu()
}); });
} }

View File

@ -1,12 +1,12 @@
<div class="dialog-frame" style="width: 600px;"> <div class="dialog-frame" style="width: 600px;">
<div class="dialog-border"> <div class="dialog-border">
<div class="dialog-header" bind="dialogHeader">Columnize by Key/Value Columns</div> <div class="dialog-header" bind="dialogHeader"></div>
<div class="dialog-body" bind="dialogBody"> <div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full grid-layout-for-ui"><table> <div class="grid-layout layout-normal layout-full grid-layout-for-ui"><table>
<tr> <tr>
<td>Key Column</td> <td bind="or_views_keyCol"></td>
<td>Value Column</td> <td bind="or_views_valCol"></td>
<td>Note Column (optional)</td> <td bind="or_views_noteCol"></td>
</tr> </tr>
<tr> <tr>
<td><select bind="keyColumnSelect" size="15" style="width: 100%;"></select></td> <td><select bind="keyColumnSelect" size="15" style="width: 100%;"></select></td>
@ -16,8 +16,8 @@
</table></div> </table></div>
</div> </div>
<div class="dialog-footer" bind="dialogFooter"> <div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">OK</button> <button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton">Cancel</button> <button class="button" bind="cancelButton"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -53,7 +53,15 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
.replace("$EXPRESSION_PREVIEW_WIDGET$", ExpressionPreviewDialog.generateWidgetHtml())); .replace("$EXPRESSION_PREVIEW_WIDGET$", ExpressionPreviewDialog.generateWidgetHtml()));
var elmts = DOM.bind(frame); var elmts = DOM.bind(frame);
elmts.dialogHeader.text("Custom text transform on column " + column.name); elmts.dialogHeader.text($.i18n._('core-views')["custom-text-trans"]+" " + column.name);
elmts.or_views_keepOr.text($.i18n._('core-views')["keep-or"]);
elmts.or_views_setBlank.text($.i18n._('core-views')["set-blank"]);
elmts.or_views_storeErr.text($.i18n._('core-views')["store-err"]);
elmts.or_views_reTrans.text($.i18n._('core-views')["re-trans"]);
elmts.or_views_timesChang.text($.i18n._('core-views')["times-chang"]);
elmts.okButton.html($.i18n._('core-buttons')["ok"]);
elmts.cancelButton.text($.i18n._('core-buttons')["cancel"]);
var level = DialogSystem.showDialog(frame); var level = DialogSystem.showDialog(frame);
var dismiss = function() { DialogSystem.dismissUntil(level - 1); }; var dismiss = function() { DialogSystem.dismissUntil(level - 1); };
@ -109,7 +117,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}; };
var doJoinMultiValueCells = function() { var doJoinMultiValueCells = function() {
var separator = window.prompt("Enter separator to use between values", ", "); var separator = window.prompt($.i18n._('core-views')["enter-separator"], ", ");
if (separator !== null) { if (separator !== null) {
Refine.postCoreProcess( Refine.postCoreProcess(
"join-multi-value-cells", "join-multi-value-cells",
@ -125,7 +133,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}; };
var doSplitMultiValueCells = function() { var doSplitMultiValueCells = function() {
var separator = window.prompt("What separator currently separates the values?", ","); var separator = window.prompt($.i18n._('core-views')["what-separator"], ",");
if (separator !== null) { if (separator !== null) {
Refine.postCoreProcess( Refine.postCoreProcess(
"split-multi-value-cells", "split-multi-value-cells",
@ -144,65 +152,65 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/edit-cells" ], [ MenuSystem.appendTo(menu, [ "core/edit-cells" ], [
{ {
id: "core/text-transform", id: "core/text-transform",
label: "Transform...", label: $.i18n._('core-views')["transform"]+"...",
click: function() { doTextTransformPrompt(); } click: function() { doTextTransformPrompt(); }
}, },
{ {
id: "core/common-transforms", id: "core/common-transforms",
label: "Common transforms", label: $.i18n._('core-views')["common-transform"],
submenu: [ submenu: [
{ {
id: "core/trim-whitespace", id: "core/trim-whitespace",
label: "Trim leading and trailing whitespace", label: $.i18n._('core-views')["trim-all"],
click: function() { doTextTransform("value.trim()", "keep-original", false, ""); } click: function() { doTextTransform("value.trim()", "keep-original", false, ""); }
}, },
{ {
id: "core/collapse-whitespace", id: "core/collapse-whitespace",
label: "Collapse consecutive whitespace", label: $.i18n._('core-views')["collapse-white"],
click: function() { doTextTransform("value.replace(/\\s+/,' ')", "keep-original", false, ""); } click: function() { doTextTransform("value.replace(/\\s+/,' ')", "keep-original", false, ""); }
}, },
{}, {},
{ {
id: "core/unescape-html-entities", id: "core/unescape-html-entities",
label: "Unescape HTML entities", label: $.i18n._('core-views')["unescape-html"],
click: function() { doTextTransform("value.unescape('html')", "keep-original", true, 10); } click: function() { doTextTransform("value.unescape('html')", "keep-original", true, 10); }
}, },
{}, {},
{ {
id: "core/to-titlecase", id: "core/to-titlecase",
label: "To titlecase", label: $.i18n._('core-views')["titlecase"],
click: function() { doTextTransform("value.toTitlecase()", "keep-original", false, ""); } click: function() { doTextTransform("value.toTitlecase()", "keep-original", false, ""); }
}, },
{ {
id: "core/to-uppercase", id: "core/to-uppercase",
label: "To uppercase", label: $.i18n._('core-views')["uppercase"],
click: function() { doTextTransform("value.toUppercase()", "keep-original", false, ""); } click: function() { doTextTransform("value.toUppercase()", "keep-original", false, ""); }
}, },
{ {
id: "core/to-lowercase", id: "core/to-lowercase",
label: "To lowercase", label: $.i18n._('core-views')["lowercase"],
click: function() { doTextTransform("value.toLowercase()", "keep-original", false, ""); } click: function() { doTextTransform("value.toLowercase()", "keep-original", false, ""); }
}, },
{}, {},
{ {
id: "core/to-number", id: "core/to-number",
label: "To number", label: $.i18n._('core-views')["to-number"],
click: function() { doTextTransform("value.toNumber()", "keep-original", false, ""); } click: function() { doTextTransform("value.toNumber()", "keep-original", false, ""); }
}, },
{ {
id: "core/to-date", id: "core/to-date",
label: "To date", label: $.i18n._('core-views')["to-date"],
click: function() { doTextTransform("value.toDate()", "keep-original", false, ""); } click: function() { doTextTransform("value.toDate()", "keep-original", false, ""); }
}, },
{ {
id: "core/to-text", id: "core/to-text",
label: "To text", label: $.i18n._('core-views')["to-text"],
click: function() { doTextTransform("value.toString()", "keep-original", false, ""); } click: function() { doTextTransform("value.toString()", "keep-original", false, ""); }
}, },
{}, {},
{ {
id: "core/to-blank", id: "core/to-blank",
label: "Blank out cells", label: $.i18n._('core-views')["blank-out"],
click: function() { doTextTransform("null", "keep-original", false, ""); } click: function() { doTextTransform("null", "keep-original", false, ""); }
} }
] ]
@ -210,29 +218,29 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/fill-down", id: "core/fill-down",
label: "Fill down", label: $.i18n._('core-views')["fill-down"],
click: doFillDown click: doFillDown
}, },
{ {
id: "core/blank-down", id: "core/blank-down",
label: "Blank down", label: $.i18n._('core-views')["blank-down"],
click: doBlankDown click: doBlankDown
}, },
{}, {},
{ {
id: "core/split-multi-valued-cells", id: "core/split-multi-valued-cells",
label: "Split multi-valued cells...", label: $.i18n._('core-views')["split-cells"]+"...",
click: doSplitMultiValueCells click: doSplitMultiValueCells
}, },
{ {
id: "core/join-multi-valued-cells", id: "core/join-multi-valued-cells",
label: "Join multi-valued cells...", label: $.i18n._('core-views')["join-cells"]+"...",
click: doJoinMultiValueCells click: doJoinMultiValueCells
}, },
{}, {},
{ {
id: "core/cluster", id: "core/cluster",
label: "Cluster and edit...", label: $.i18n._('core-views')["cluster-edit"]+"...",
click: function() { new ClusteringDialog(column.name, "value"); } click: function() { new ClusteringDialog(column.name, "value"); }
} }
]); ]);
@ -242,6 +250,25 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var elmts = DOM.bind(dialog); var elmts = DOM.bind(dialog);
var level = DialogSystem.showDialog(dialog); var level = DialogSystem.showDialog(dialog);
elmts.dialogHeader.html($.i18n._('core-views')["transp-cell"]);
elmts.or_views_fromCol.html($.i18n._('core-views')["from-col"]);
elmts.or_views_toCol.html($.i18n._('core-views')["to-col"]);
elmts.or_views_transpose.html($.i18n._('core-views')["transp-into"]);
elmts.or_views_twoCol.html($.i18n._('core-views')["two-new-col"]);
elmts.or_views_keyCol.html($.i18n._('core-views')["key-col"]);
elmts.or_views_containNames.html($.i18n._('core-views')["contain-names"]);
elmts.or_views_valCol.html($.i18n._('core-views')["val-col"]);
elmts.or_views_containOrig.html($.i18n._('core-views')["contain-val"]);
elmts.or_views_oneCol.html($.i18n._('core-views')["one-col"]);
elmts.or_views_prependName.html($.i18n._('core-views')["prepend-name"]);
elmts.or_views_followBy.html($.i18n._('core-views')["follow-by"]);
elmts.or_views_beforeVal.html($.i18n._('core-views')["before-val"]);
elmts.or_views_ignoreBlank.html($.i18n._('core-views')["ignore-blank"]);
elmts.or_views_fillOther.html($.i18n._('core-views')["fill-other"]);
elmts.okButton.html($.i18n._('core-buttons')["transpose"]);
elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
var dismiss = function() { var dismiss = function() {
DialogSystem.dismissUntil(level - 1); DialogSystem.dismissUntil(level - 1);
}; };
@ -262,10 +289,10 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
config.keyColumnName = $.trim(elmts.keyColumnNameInput[0].value); config.keyColumnName = $.trim(elmts.keyColumnNameInput[0].value);
config.valueColumnName = $.trim(elmts.valueColumnNameInput[0].value); config.valueColumnName = $.trim(elmts.valueColumnNameInput[0].value);
if (config.keyColumnName == "") { if (config.keyColumnName == "") {
alert("Please specify the new key column's name."); alert($.i18n._('core-views')["spec-new-name"]);
return; return;
} else if (config.valueColumnName == "") { } else if (config.valueColumnName == "") {
alert("Please specify the new value column's name."); alert($.i18n._('core-views')["spec-new-val"]);
return; return;
} }
} else { } else {
@ -273,10 +300,10 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
config.prependColumnName = elmts.prependColumnNameCheckbox[0].checked; config.prependColumnName = elmts.prependColumnNameCheckbox[0].checked;
config.separator = elmts.separatorInput[0].value; config.separator = elmts.separatorInput[0].value;
if (config.combinedColumnName == "") { if (config.combinedColumnName == "") {
alert("Please specify the new column's name."); alert($.i18n._('core-views')["spec-col-name"]);
return; return;
} else if (config.prependColumnName && config.separator == "") { } else if (config.prependColumnName && config.separator == "") {
alert("Please specify the separator between original column names and cell values."); alert($.i18n._('core-views')["spec-separator"]);
return; return;
} }
} }
@ -330,7 +357,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}; };
var doTransposeRowsIntoColumns = function() { var doTransposeRowsIntoColumns = function() {
var rowCount = window.prompt("How many rows to transpose?", "2"); var rowCount = window.prompt($.i18n._('core-views')["how-many-rows"], "2");
if (rowCount !== null) { if (rowCount !== null) {
try { try {
rowCount = parseInt(rowCount,10); rowCount = parseInt(rowCount,10);
@ -339,7 +366,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
} }
if (isNaN(rowCount) || rowCount < 2) { if (isNaN(rowCount) || rowCount < 2) {
alert("Expected an integer at least 2."); alert($.i18n._('core-views')["expect-two"]);
} else { } else {
var config = { var config = {
columnName: column.name, columnName: column.name,
@ -361,6 +388,14 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var elmts = DOM.bind(dialog); var elmts = DOM.bind(dialog);
var level = DialogSystem.showDialog(dialog); var level = DialogSystem.showDialog(dialog);
elmts.dialogHeader.html($.i18n._('core-views')["columnize"]);
elmts.or_views_keyCol.html($.i18n._('core-views')["key-col"]);
elmts.or_views_valCol.html($.i18n._('core-views')["val-col"]);
elmts.or_views_noteCol.html($.i18n._('core-views')["note-col"]);
elmts.okButton.html($.i18n._('core-buttons')["ok"]);
elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
var dismiss = function() { var dismiss = function() {
DialogSystem.dismissUntil(level - 1); DialogSystem.dismissUntil(level - 1);
}; };
@ -377,7 +412,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
if (config.keyColumnName == null || if (config.keyColumnName == null ||
config.valueColumnName == null || config.valueColumnName == null ||
config.keyColumnName == config.valueColumnName) { config.keyColumnName == config.valueColumnName) {
alert('Please select one key column and one value column that are different from one another.'); alert($.i18n._('core-views')["sel-col-val"]);
return; return;
} }
@ -385,7 +420,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
if (noteColumnName != null) { if (noteColumnName != null) {
if (noteColumnName == config.keyColumnName || if (noteColumnName == config.keyColumnName ||
noteColumnName == config.valueColumnName) { noteColumnName == config.valueColumnName) {
alert('If specified, the note column cannot be the same as the key column or the value column.'); alert($.i18n._('core-views')["cannot-same"]);
return; return;
} }
config.noteColumnName = noteColumnName; config.noteColumnName = noteColumnName;
@ -422,18 +457,18 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/transpose" ], [ MenuSystem.appendTo(menu, [ "core/transpose" ], [
{ {
id: "core/transpose-columns-into-rows", id: "core/transpose-columns-into-rows",
label: "Transpose cells across columns into rows...", label: $.i18n._('core-views')["transp-cell-row"]+"...",
click: doTransposeColumnsIntoRows click: doTransposeColumnsIntoRows
}, },
{ {
id: "core/transpose-rows-into-columns", id: "core/transpose-rows-into-columns",
label: "Transpose cells in rows into columns...", label: $.i18n._('core-views')["transp-cell-col"]+"...",
click: doTransposeRowsIntoColumns click: doTransposeRowsIntoColumns
}, },
{}, {},
{ {
id: "core/key-value-columnize", id: "core/key-value-columnize",
label: "Columnize by key/value columns...", label: $.i18n._('core-views')["columnize-col"]+"...",
click: doKeyValueColumnize click: doKeyValueColumnize
} }
] ]

View File

@ -39,7 +39,15 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
.replace("$EXPRESSION_PREVIEW_WIDGET$", ExpressionPreviewDialog.generateWidgetHtml())); .replace("$EXPRESSION_PREVIEW_WIDGET$", ExpressionPreviewDialog.generateWidgetHtml()));
var elmts = DOM.bind(frame); var elmts = DOM.bind(frame);
elmts.dialogHeader.text("Add column based on column " + column.name); elmts.dialogHeader.text($.i18n._('core-views')["add-col-col"]+" " + column.name);
elmts.or_views_newCol.text($.i18n._('core-views')["new-col-name"]);
elmts.or_views_onErr.text($.i18n._('core-views')["addasdasd"]);
elmts.or_views_setBlank.text($.i18n._('core-views')["set-blank"]);
elmts.or_views_storeErr.text($.i18n._('core-views')["store-err"]);
elmts.or_views_copyVal.text($.i18n._('core-views')["copy-val"]);
elmts.okButton.html($.i18n._('core-buttons')["ok"]);
elmts.cancelButton.text($.i18n._('core-buttons')["cancel"]);
var level = DialogSystem.showDialog(frame); var level = DialogSystem.showDialog(frame);
var dismiss = function() { DialogSystem.dismissUntil(level - 1); }; var dismiss = function() { DialogSystem.dismissUntil(level - 1); };
@ -48,7 +56,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
elmts.okButton.click(function() { elmts.okButton.click(function() {
var columnName = $.trim(elmts.columnNameInput[0].value); var columnName = $.trim(elmts.columnNameInput[0].value);
if (!columnName.length) { if (!columnName.length) {
alert("You must enter a column name."); alert($.i18n._('core-views')["warning-col-name"]);
return; return;
} }
@ -87,7 +95,17 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
.replace("$EXPRESSION_PREVIEW_WIDGET$", ExpressionPreviewDialog.generateWidgetHtml())); .replace("$EXPRESSION_PREVIEW_WIDGET$", ExpressionPreviewDialog.generateWidgetHtml()));
var elmts = DOM.bind(frame); var elmts = DOM.bind(frame);
elmts.dialogHeader.text("Add column by fetching URLs based on column " + column.name); elmts.dialogHeader.text($.i18n._('core-views')["add-col-fetch"]+" " + column.name);
elmts.or_views_newCol.text($.i18n._('core-views')["new-col-name"]);
elmts.or_views_throttle.text($.i18n._('core-views')["throttle-delay"]);
elmts.or_views_milli.text($.i18n._('core-views')["milli"]);
elmts.or_views_onErr.text($.i18n._('core-views')["on-error"]);
elmts.or_views_setBlank.text($.i18n._('core-views')["set-blank"]);
elmts.or_views_storeErr.text($.i18n._('core-views')["store-err"]);
elmts.or_views_urlFetch.text($.i18n._('core-views')["url-fetch"]);
elmts.okButton.html($.i18n._('core-buttons')["ok"]);
elmts.cancelButton.text($.i18n._('core-buttons')["cancel"]);
var level = DialogSystem.showDialog(frame); var level = DialogSystem.showDialog(frame);
var dismiss = function() { DialogSystem.dismissUntil(level - 1); }; var dismiss = function() { DialogSystem.dismissUntil(level - 1); };
@ -96,7 +114,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
elmts.okButton.click(function() { elmts.okButton.click(function() {
var columnName = $.trim(elmts.columnNameInput[0].value); var columnName = $.trim(elmts.columnNameInput[0].value);
if (!columnName.length) { if (!columnName.length) {
alert("You must enter a column name."); alert($.i18n._('core-views')["warning-col-name"]);
return; return;
} }
@ -138,7 +156,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}; };
var doRenameColumn = function() { var doRenameColumn = function() {
var newColumnName = window.prompt("Enter new column name", column.name); var newColumnName = window.prompt($.i18n._('core-views')["enter-col-name"], column.name);
if (newColumnName !== null) { if (newColumnName !== null) {
Refine.postCoreProcess( Refine.postCoreProcess(
"rename-column", "rename-column",
@ -179,7 +197,21 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var doSplitColumn = function() { var doSplitColumn = function() {
var frame = $(DOM.loadHTML("core", "scripts/views/data-table/split-column-dialog.html")); var frame = $(DOM.loadHTML("core", "scripts/views/data-table/split-column-dialog.html"));
var elmts = DOM.bind(frame); var elmts = DOM.bind(frame);
elmts.dialogHeader.text("Split column " + column.name + " into several columns"); elmts.dialogHeader.text($.i18n._('core-views')["split-col"]+" " + column.name + " "+$.i18n._('core-views')["several-col"]);
elmts.or_views_howSplit.text($.i18n._('core-views')["how-split"]);
elmts.or_views_bySep.text($.i18n._('core-views')["by-sep"]);
elmts.or_views_separator.text($.i18n._('core-views')["separator"]);
elmts.or_views_regExp.text($.i18n._('core-views')["reg-exp"]);
elmts.or_views_splitInto.text($.i18n._('core-views')["split-into"]);
elmts.or_views_colMost.text($.i18n._('core-views')["col-at-most"]);
elmts.or_views_fieldLen.text($.i18n._('core-views')["field-len"]);
elmts.or_views_listInt.text($.i18n._('core-views')["list-int"]);
elmts.or_views_afterSplit.text($.i18n._('core-views')["after-split"]);
elmts.or_views_guessType.text($.i18n._('core-views')["guess-cell"]);
elmts.or_views_removeCol.text($.i18n._('core-views')["remove-col"]);
elmts.okButton.html($.i18n._('core-buttons')["ok"]);
elmts.cancelButton.text($.i18n._('core-buttons')["cancel"]);
var level = DialogSystem.showDialog(frame); var level = DialogSystem.showDialog(frame);
var dismiss = function() { DialogSystem.dismissUntil(level - 1); }; var dismiss = function() { DialogSystem.dismissUntil(level - 1); };
@ -196,7 +228,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
if (mode == "separator") { if (mode == "separator") {
config.separator = elmts.separatorInput[0].value; config.separator = elmts.separatorInput[0].value;
if (!(config.separator)) { if (!(config.separator)) {
alert("Please specify a separator."); alert($.i18n._('core-views')["specify-sep"]);
return; return;
} }
@ -222,14 +254,14 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}); });
if (lengths.length === 0) { if (lengths.length === 0) {
alert("No field length is specified."); alert($.i18n._('core-views')["warning-no-length"]);
return; return;
} }
config.fieldLengths = JSON.stringify(lengths); config.fieldLengths = JSON.stringify(lengths);
} catch (e) { } catch (e) {
alert("The given field lengths are not properly formatted."); alert($.i18n._('core-views')["warning-format"]);
return; return;
} }
} }
@ -247,50 +279,50 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/edit-column" ], [ MenuSystem.appendTo(menu, [ "core/edit-column" ], [
{ {
id: "core/split-column", id: "core/split-column",
label: "Split into several columns...", label: $.i18n._('core-views')["split-into-col"]+"...",
click: doSplitColumn click: doSplitColumn
}, },
{}, {},
{ {
id: "core/add-column", id: "core/add-column",
label: "Add column based on this column...", label: $.i18n._('core-views')["add-based-col"]+"...",
click: doAddColumn click: doAddColumn
}, },
{ {
id: "core/add-column-by-fetching-urls", id: "core/add-column-by-fetching-urls",
label: "Add column by fetching URLs...", label: $.i18n._('core-views')["add-by-urls"]+"...",
click: doAddColumnByFetchingURLs click: doAddColumnByFetchingURLs
}, },
{}, {},
{ {
id: "core/rename-column", id: "core/rename-column",
label: "Rename this column", label: $.i18n._('core-views')["rename-col"],
click: doRenameColumn click: doRenameColumn
}, },
{ {
id: "core/remove-column", id: "core/remove-column",
label: "Remove this column", label: $.i18n._('core-views')["remove-col"],
click: doRemoveColumn click: doRemoveColumn
}, },
{}, {},
{ {
id: "core/move-column-to-beginning", id: "core/move-column-to-beginning",
label: "Move column to beginning", label: $.i18n._('core-views')["move-to-beg"],
click: function() { doMoveColumnTo(0); } click: function() { doMoveColumnTo(0); }
}, },
{ {
id: "core/move-column-to-end", id: "core/move-column-to-end",
label: "Move column to end", label: $.i18n._('core-views')["move-to-end"],
click: function() { doMoveColumnTo(theProject.columnModel.columns.length - 1); } click: function() { doMoveColumnTo(theProject.columnModel.columns.length - 1); }
}, },
{ {
id: "core/move-column-to-left", id: "core/move-column-to-left",
label: "Move column left", label: $.i18n._('core-views')["move-to-left"],
click: function() { doMoveColumnBy(-1); } click: function() { doMoveColumnBy(-1); }
}, },
{ {
id: "core/move-column-to-right", id: "core/move-column-to-right",
label: "Move column right", label: $.i18n._('core-views')["move-to-right"],
click: function() { doMoveColumnBy(1); } click: function() { doMoveColumnBy(1); }
} }
] ]

View File

@ -35,7 +35,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var doFilterByExpressionPrompt = function(expression, type) { var doFilterByExpressionPrompt = function(expression, type) {
DataTableView.promptExpressionOnVisibleRows( DataTableView.promptExpressionOnVisibleRows(
column, column,
(type == "list" ? "Custom Facet on column " : "Custom Numeric Facet on column") + column.name, (type == "list" ? $.i18n._('core-views')["custom-facet"] : $.i18n._('core-views')["custom-numeric"]) + column.name,
expression, expression,
function(expression) { function(expression) {
var config = { var config = {
@ -55,7 +55,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/facet" ], [ MenuSystem.appendTo(menu, [ "core/facet" ], [
{ {
id: "core/text-facet", id: "core/text-facet",
label: "Text facet", label: $.i18n._('core-views')["text-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
@ -69,7 +69,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/numeric-facet", id: "core/numeric-facet",
label: "Numeric facet", label: $.i18n._('core-views')["numeric-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"range", "range",
@ -84,7 +84,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/time-facet", id: "core/time-facet",
label: "Timeline facet", label: $.i18n._('core-views')["timeline-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"timerange", "timerange",
@ -99,7 +99,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/scatterplot-facet", id: "core/scatterplot-facet",
label: "Scatterplot facet", label: $.i18n._('core-views')["scatterplot-facet"],
click: function() { click: function() {
new ScatterplotDialog(column.name); new ScatterplotDialog(column.name);
} }
@ -107,25 +107,25 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/custom-text-facet", id: "core/custom-text-facet",
label: "Custom text facet...", label: $.i18n._('core-views')["custom-facet"]+'...',
click: function() { click: function() {
doFilterByExpressionPrompt(null, "list"); doFilterByExpressionPrompt(null, "list");
} }
}, },
{ {
id: "core/custom-numeric-facet", id: "core/custom-numeric-facet",
label: "Custom numeric facet...", label: $.i18n._('core-views')["custom-numeric"]+'...',
click: function() { click: function() {
doFilterByExpressionPrompt(null, "range"); doFilterByExpressionPrompt(null, "range");
} }
}, },
{ {
id: "core/customized-facets", id: "core/customized-facets",
label: "Customized facets", label: $.i18n._('core-views')["custom-facets"],
submenu: [ submenu: [
{ {
id: "core/word-facet", id: "core/word-facet",
label: "Word facet", label: $.i18n._('core-views')["word-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
@ -140,7 +140,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/duplicates-facet", id: "core/duplicates-facet",
label: "Duplicates facet", label: $.i18n._('core-views')["duplicates-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
@ -156,7 +156,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/numeric-log-facet", id: "core/numeric-log-facet",
label: "Numeric log facet", label: $.i18n._('core-views')["numeric-log-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"range", "range",
@ -171,7 +171,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/bounded-numeric-log-facet", id: "core/bounded-numeric-log-facet",
label: "1-bounded numeric log facet", label: $.i18n._('core-views')["bounded-log-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"range", "range",
@ -187,7 +187,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/text-length-facet", id: "core/text-length-facet",
label: "Text length facet", label: $.i18n._('core-views')["text-length-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"range", "range",
@ -202,7 +202,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/log-text-length-facet", id: "core/log-text-length-facet",
label: "Log of text length facet", label: $.i18n._('core-views')["log-length-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"range", "range",
@ -217,7 +217,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/unicode-charcode-facet", id: "core/unicode-charcode-facet",
label: "Unicode char-code facet", label: $.i18n._('core-views')["unicode-facet"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"range", "range",
@ -233,7 +233,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/error-facet", id: "core/error-facet",
label: "Facet by error", label: $.i18n._('core-views')["facet-error"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
@ -247,7 +247,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/blank-facet", id: "core/blank-facet",
label: "Facet by blank", label: $.i18n._('core-views')["facet-blank"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
@ -265,7 +265,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.insertAfter(menu, [ "core/facet" ], [ MenuSystem.insertAfter(menu, [ "core/facet" ], [
{ {
label: "Text filter", label: $.i18n._('core-views')["text-filter"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"text", "text",

View File

@ -76,11 +76,11 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var frame = DialogSystem.createDialog(); var frame = DialogSystem.createDialog();
frame.width("400px"); frame.width("400px");
var header = $('<div></div>').addClass("dialog-header").text("Search for Match").appendTo(frame); var header = $('<div></div>').addClass("dialog-header").text($.i18n._('core-views')["search-match"]).appendTo(frame);
var body = $('<div></div>').addClass("dialog-body").appendTo(frame); var body = $('<div></div>').addClass("dialog-body").appendTo(frame);
var footer = $('<div></div>').addClass("dialog-footer").appendTo(frame); var footer = $('<div></div>').addClass("dialog-footer").appendTo(frame);
$('<p></p>').text("Search Freebase for a topic to match all filtered cells:").appendTo(body); $('<p></p>').text($.i18n._('core-views')["search-fb-topic"]).appendTo(body);
var input = $('<input />').appendTo($('<p></p>').appendTo(body)); var input = $('<input />').appendTo($('<p></p>').appendTo(body));
@ -116,7 +116,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
); );
}); });
$('<button class="button"></button>').text("Cancel").click(function() { $('<button class="button"></button>').text($.i18n._('core-buttons')["cancel"]).click(function() {
DialogSystem.dismissUntil(level - 1); DialogSystem.dismissUntil(level - 1);
}).appendTo(footer); }).appendTo(footer);
@ -127,7 +127,16 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var doCopyAcrossColumns = function() { var doCopyAcrossColumns = function() {
var frame = $(DOM.loadHTML("core", "scripts/views/data-table/copy-recon-across-columns-dialog.html")); var frame = $(DOM.loadHTML("core", "scripts/views/data-table/copy-recon-across-columns-dialog.html"));
var elmts = DOM.bind(frame); var elmts = DOM.bind(frame);
elmts.dialogHeader.text("Copy recon judgments from column " + column.name); elmts.dialogHeader.text($.i18n._('core-views')["copy-recon-judg"]+" " + column.name);
elmts.or_views_copyToCol.text($.i18n._('core-views')["copy-to-col"]);
elmts.or_views_copyOpt.text($.i18n._('core-views')["copy-opt"]);
elmts.or_views_applyToCell.text($.i18n._('core-views')["apply-to-cell"]);
elmts.or_views_whatToCopy.text($.i18n._('core-views')["what-to-copy"]);
elmts.or_views_newRecon.text($.i18n._('core-views')["new-recon"]);
elmts.or_views_matchRecon.text($.i18n._('core-views')["match-recon"]);
elmts.okButton.text($.i18n._('core-buttons')["copy"]);
elmts.cancelButton.text($.i18n._('core-buttons')["cancel"]);
var columns = theProject.columnModel.columns; var columns = theProject.columnModel.columns;
for (var i = 0; i < columns.length; i++) { for (var i = 0; i < columns.length; i++) {
@ -162,9 +171,9 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}); });
if (config.toColumnName.length === 0) { if (config.toColumnName.length === 0) {
alert("Please select some other column to copy to."); alert($.i18n._('core-views')["warning-other-col"]);
} else if (config.judgment.length === 0) { } else if (config.judgment.length === 0) {
alert("Please select at least one kind of judgment to copy."); alert($.i18n._('core-views')["warning-sel-judg"]);
} else { } else {
Refine.postCoreProcess( Refine.postCoreProcess(
"recon-copy-across-columns", "recon-copy-across-columns",
@ -180,18 +189,18 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/reconcile" ], [ MenuSystem.appendTo(menu, [ "core/reconcile" ], [
{ {
id: "core/reconcile", id: "core/reconcile",
label: "Start reconciling...", label: $.i18n._('core-views')["start-recon"]+'...',
tooltip: "Reconcile text in this column with topics on Freebase", tooltip: $.i18n._('core-views')["recon-text-fb"],
click: doReconcile click: doReconcile
}, },
{}, {},
{ {
id: "core/facets", id: "core/facets",
label: "Facets", label: $.i18n._('core-views')["facets"],
submenu: [ submenu: [
{ {
id: "core/by-judgment", id: "core/by-judgment",
label: "By judgment", label: $.i18n._('core-views')["by-judg"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
@ -209,12 +218,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/by-best-candidates-score", id: "core/by-best-candidates-score",
label: "Best candidate's score", label: $.i18n._('core-views')["best-score"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"range", "range",
{ {
"name" : column.name + ": best candidate's score", "name" : column.name + ": "+$.i18n._('core-views')["best-cand-score"],
"columnName" : column.name, "columnName" : column.name,
"expression" : "cell.recon.best.score", "expression" : "cell.recon.best.score",
"mode" : "range" "mode" : "range"
@ -226,12 +235,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/by-best-candidates-type-match", id: "core/by-best-candidates-type-match",
label: "Best candidate's type match", label: $.i18n._('core-views')["best-type-match"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
{ {
"name" : column.name + ": best candidate's types match?", "name" : column.name + ": "+$.i18n._('core-views')["best-cand-type.match"],
"columnName" : column.name, "columnName" : column.name,
"expression" : 'forNonBlank(cell.recon.features.typeMatch, v, v, if(isNonBlank(value), "(unreconciled)", "(blank)"))' "expression" : 'forNonBlank(cell.recon.features.typeMatch, v, v, if(isNonBlank(value), "(unreconciled)", "(blank)"))'
}, },
@ -243,12 +252,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/by-best-candidates-name-match", id: "core/by-best-candidates-name-match",
label: "Best candidate's name match", label: $.i18n._('core-views')["best-name"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
{ {
"name" : column.name + ": best candidate's name match?", "name" : column.name + ": "+ $.i18n._('core-views')["best-cand-name"],
"columnName" : column.name, "columnName" : column.name,
"expression" : 'forNonBlank(cell.recon.features.nameMatch, v, v, if(isNonBlank(value), "(unreconciled)", "(blank)"))' "expression" : 'forNonBlank(cell.recon.features.nameMatch, v, v, if(isNonBlank(value), "(unreconciled)", "(blank)"))'
}, },
@ -261,12 +270,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/by-best-candidates-name-edit-distance", id: "core/by-best-candidates-name-edit-distance",
label: "Best candidate's name edit distance", label: $.i18n._('core-views')["best-edit-dist"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"range", "range",
{ {
"name" : column.name + ": best candidate's name edit distance", "name" : column.name + ": "+$.i18n._('core-views')["best-cand-edit-dist"],
"columnName" : column.name, "columnName" : column.name,
"expression" : "cell.recon.features.nameLevenshtein", "expression" : "cell.recon.features.nameLevenshtein",
"mode" : "range" "mode" : "range"
@ -278,12 +287,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/by-best-candidates-name-word-similarity", id: "core/by-best-candidates-name-word-similarity",
label: "Best candidate's name word similarity", label: $.i18n._('core-views')["best-word-sim"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"range", "range",
{ {
"name" : column.name + ": best candidate's name word similarity", "name" : column.name + ": "+$.i18n._('core-views')["best-cand-word-sim"],
"columnName" : column.name, "columnName" : column.name,
"expression" : "cell.recon.features.nameWordDistance", "expression" : "cell.recon.features.nameWordDistance",
"mode" : "range" "mode" : "range"
@ -296,7 +305,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/by-best-candidates-types", id: "core/by-best-candidates-types",
label: "Best candidate's types", label: $.i18n._('core-views')["best-type"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
@ -312,16 +321,16 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/qa-facets", id: "core/qa-facets",
label: "QA facets", label: $.i18n._('core-views')["qa-facets"],
submenu: [ submenu: [
{ {
id: "core/by-qa-results", id: "core/by-qa-results",
label: "QA results", label: $.i18n._('core-views')["qa-results"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
{ {
"name" : column.name + " QA Results", "name" : column.name + " "+$.i18n._('core-views')["qa-results2"],
"columnName" : column.name, "columnName" : column.name,
"expression" : "cell.recon.features.qaResult" "expression" : "cell.recon.features.qaResult"
} }
@ -330,12 +339,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/by-judgment-actions", id: "core/by-judgment-actions",
label: "Judgment actions", label: $.i18n._('core-views')["judg-actions"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
{ {
"name" : column.name + " Judgment Actions", "name" : column.name + " "+$.i18n._('core-views')["judg-actions2"],
"columnName" : column.name, "columnName" : column.name,
"expression" : "cell.recon.judgmentAction" "expression" : "cell.recon.judgmentAction"
} }
@ -344,12 +353,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/by-judgment-history-entries", id: "core/by-judgment-history-entries",
label: "Judgment history entries", label: $.i18n._('core-views')["judg-hist"],
click: function() { click: function() {
ui.browsingEngine.addFacet( ui.browsingEngine.addFacet(
"list", "list",
{ {
"name" : column.name + " History Entries", "name" : column.name + " "+$.i18n._('core-views')["hist-entries"],
"columnName" : column.name, "columnName" : column.name,
"expression" : "cell.recon.judgmentHistoryEntry" "expression" : "cell.recon.judgmentHistoryEntry"
} }
@ -360,18 +369,18 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}, },
{ {
id: "core/actions", id: "core/actions",
label: "Actions", label: $.i18n._('core-views')["actions"],
submenu: [ submenu: [
{ {
id: "core/match-to-best-candidate", id: "core/match-to-best-candidate",
label: "Match each cell to its best candidate", label: $.i18n._('core-views')["best-cand"],
tooltip: "Match each cell to its best candidate in this column for all current filtered rows", tooltip: $.i18n._('core-views')["best-cand2"],
click: doReconMatchBestCandidates click: doReconMatchBestCandidates
}, },
{ {
id: "core/match-to-new-topic", id: "core/match-to-new-topic",
label: "Create a new topic for each cell", label: $.i18n._('core-views')["new-topic"],
tooltip: "Mark to create one new topic for each cell in this column for all current filtered rows", tooltip: $.i18n._('core-views')["new-topic2"],
click: function() { click: function() {
doReconMarkNewTopics(false); doReconMarkNewTopics(false);
} }
@ -379,29 +388,29 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/match-similar-to-new-topic", id: "core/match-similar-to-new-topic",
label: "Create one new topic for similar cells", label: $.i18n._('core-views')["new-topic"],
tooltip: "Mark to create one new topic for each group of similar cells in this column for all current filtered rows", tooltip: $.i18n._('core-views')["new-topic2"],
click: function() { click: function() {
doReconMarkNewTopics(true); doReconMarkNewTopics(true);
} }
}, },
{ {
id: "core/match-to-specific", id: "core/match-to-specific",
label: "Match all filtered cells to...", label: $.i18n._('core-views')["filtered-cell"],
tooltip: "Search for a topic to match all filtered cells to", tooltip: $.i18n._('core-views')["filtered-cell2"],
click: doSearchToMatch click: doSearchToMatch
}, },
{}, {},
{ {
id: "core/discard-judgments", id: "core/discard-judgments",
label: "Discard reconciliation judgments", label: $.i18n._('core-views')["discard-judg"],
tooltip: "Discard reconciliation judgments in this column for all current filtered rows", tooltip: $.i18n._('core-views')["discard-judg2"],
click: doReconDiscardJudgments click: doReconDiscardJudgments
}, },
{ {
id: "core/clear-recon-data", id: "core/clear-recon-data",
label: "Clear reconciliation data", label: $.i18n._('core-views')["clear-recon"],
tooltip: "Clear reconciliation data in this column for all current filtered rows", tooltip: $.i18n._('core-views')["clear-recon2"],
click: doClearReconData click: doClearReconData
} }
] ]
@ -409,8 +418,8 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{}, {},
{ {
id: "core/copy-across-columns", id: "core/copy-across-columns",
label: "Copy reconciliation data...", label: $.i18n._('core-views')["copy-recon"],
tooltip: "Copy this column's reconciliation data to other columns", tooltip: $.i18n._('core-views')["copy-recon2"],
click: doCopyAcrossColumns click: doCopyAcrossColumns
} }
]); ]);

View File

@ -4,50 +4,50 @@
<div class="dialog-body" bind="dialogBody"> <div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full "><table> <div class="grid-layout layout-normal layout-full "><table>
<tr> <tr>
<td>Sort cell values as</td> <td><span bind="or_views_sortAs"></span></td>
<td>Position blanks and errors</td> <td><span bind="or_views_positionBlank"></span></td>
</tr> </tr>
<tr> <tr>
<td> <td>
<div class="grid-layout layout-tightest grid-layout-for-text" bind="valueTypeOptions"><table> <div class="grid-layout layout-tightest grid-layout-for-text" bind="valueTypeOptions"><table>
<tr> <tr>
<td width="1"><input type="radio" name="sorting-dialog-value-type" value="string" id="$sorting-dialog-value-type-string" /></td> <td width="1"><input type="radio" name="sorting-dialog-value-type" value="string" id="$sorting-dialog-value-type-string" /></td>
<td><label for="$sorting-dialog-value-type-string">text</label> <td><label for="$sorting-dialog-value-type-string" bind="or_views_text"></label>
<input type="checkbox" class="inline" bind="caseSensitiveCheckbox" id="$sorting-dialog-case-sensitive" /> <input type="checkbox" class="inline" bind="caseSensitiveCheckbox" id="$sorting-dialog-case-sensitive" />
<label for="$sorting-dialog-case-sensitive">case-sensitive</label></td> <label for="$sorting-dialog-case-sensitive" bind="or_views_caseSens"></label></td>
</tr> </tr>
<tr> <tr>
<td width="1"><input type="radio" name="sorting-dialog-value-type" value="number" id="$sorting-dialog-value-type-number" /></td> <td width="1"><input type="radio" name="sorting-dialog-value-type" value="number" id="$sorting-dialog-value-type-number" /></td>
<td><label for="$sorting-dialog-value-type-number">numbers</label></td> <td><label for="$sorting-dialog-value-type-number" bind="or_views_numbers"></label></td>
</tr> </tr>
<tr> <tr>
<td width="1"><input type="radio" name="sorting-dialog-value-type" value="date" id="$sorting-dialog-value-type-date" /></td> <td width="1"><input type="radio" name="sorting-dialog-value-type" value="date" id="$sorting-dialog-value-type-date" /></td>
<td><label for="$sorting-dialog-value-type-date">dates</label></td> <td><label for="$sorting-dialog-value-type-date" bind="or_views_dates"></label></td>
</tr> </tr>
<tr> <tr>
<td width="1"><input type="radio" name="sorting-dialog-value-type" value="boolean" id="$sorting-dialog-value-type-boolean" /></td> <td width="1"><input type="radio" name="sorting-dialog-value-type" value="boolean" id="$sorting-dialog-value-type-boolean" /></td>
<td><label for="$sorting-dialog-value-type-boolean">booleans</label></td> <td><label for="$sorting-dialog-value-type-boolean" bind="or_views_booleans"></label></td>
</tr> </tr>
</table></div> </table></div>
</td> </td>
<td> <td>
<ul class="sorting-dialog-blank-error-positions" bind="blankErrorPositions"></ul> <ul class="sorting-dialog-blank-error-positions" bind="blankErrorPositions"></ul>
<p>Drag and drop to re-order</p> <p bind="or_views_dragDrop"></p>
</td> </td>
</tr> </tr>
<tr><td colspan="2" bind="directionOptions"> <tr><td colspan="2" bind="directionOptions">
<input type="radio" class="inline" name="sorting-dialog-direction" value="forward" id="$sorting-dialog-direction-forward" /> <input type="radio" class="inline" name="sorting-dialog-direction" value="forward" id="$sorting-dialog-direction-forward" />
<label for="$sorting-dialog-direction-forward" bind="directionForwardLabel">forward</label> <label for="$sorting-dialog-direction-forward" bind="directionForwardLabel"></label>
<input type="radio" class="inline" name="sorting-dialog-direction" value="reverse" id="$sorting-dialog-direction-reverse" /> <input type="radio" class="inline" name="sorting-dialog-direction" value="reverse" id="$sorting-dialog-direction-reverse" />
<label for="$sorting-dialog-direction-reverse" bind="directionReverseLabel">reverse</label> <label for="$sorting-dialog-direction-reverse" bind="directionReverseLabel"></label>
<span bind="sortAloneContainer" style="display:none;"><input type="checkbox" class="inline" id="$sorting-dialog-alone" /> <span bind="sortAloneContainer" style="display:none;"><input type="checkbox" class="inline" id="$sorting-dialog-alone" />
<label for="$sorting-dialog-alone">sort by this column alone</label></span> <label for="$sorting-dialog-alone" bind="or_views_sortByCol"></label></span>
</td></tr> </td></tr>
</table></div> </table></div>
</div> </div>
<div class="dialog-footer" bind="dialogFooter"> <div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">&nbsp;&nbsp;OK&nbsp;&nbsp;</button> <button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton">Cancel</button> <button class="button" bind="cancelButton">Cancel</button>
</div> </div>
</div> </div>

View File

@ -6,54 +6,54 @@
<td> <td>
<div class="grid-layout layout-tighter"><table> <div class="grid-layout layout-tighter"><table>
<tr> <tr>
<td colspan="3"><h3>How to Split Column</h3></td> <td colspan="3"><h3><span bind="or_views_howSplit"></span></h3></td>
</tr> </tr>
<tr> <tr>
<td width="1%"><input type="radio" checked="true" name="split-by-mode" value="separator" id="$split-column-by-separator" /></td> <td width="1%"><input type="radio" checked="true" name="split-by-mode" value="separator" id="$split-column-by-separator" /></td>
<td colspan="2"><label for="$split-column-by-separator">by separator</label></td> <td colspan="2"><label for="$split-column-by-separator" bind="or_views_bySep"></label></td>
</tr> </tr>
<tr><td></td> <tr><td></td>
<td>Separator</td> <td bind="or_views_separator"></td>
<td><input size="10" value="," bind="separatorInput" /> <td><input size="10" value="," bind="separatorInput" />
<input type="checkbox" bind="regexInput" id="$split-column-regex" /> <input type="checkbox" bind="regexInput" id="$split-column-regex" />
<label for="$split-column-regex">regular expression</label></td> <label for="$split-column-regex" bind="or_views_regExp"></label></td>
</tr> </tr>
<tr><td></td> <tr><td></td>
<td>Split into</td> <td bind="or_views_splitInto"></td>
<td style="white-space: pre;"><input size="3" bind="maxColumnsInput" /> columns at most (leave blank for no limit)</td> <td style="white-space: pre;"><input size="3" bind="maxColumnsInput" /> <span bind="or_views_colMost"></span></td>
</tr> </tr>
<tr> <tr>
<td width="1%"><input type="radio" name="split-by-mode" value="lengths" id="$split-column-by-lengths" /></td> <td width="1%"><input type="radio" name="split-by-mode" value="lengths" id="$split-column-by-lengths" /></td>
<td colspan="2"><label for="$split-column-by-lengths">by field lengths</label></td> <td colspan="2"><label for="$split-column-by-lengths" bind="or_views_fieldLen"></label></td>
</tr> </tr>
<tr><td></td> <tr><td></td>
<td colspan="2"><textarea style="width: 100%;" bind="lengthsTextarea"></textarea></td> <td colspan="2"><textarea style="width: 100%;" bind="lengthsTextarea"></textarea></td>
</tr> </tr>
<tr><td></td> <tr><td></td>
<td colspan="2">List of integers separated by commas, e.g., 5, 7, 15</td> <td colspan="2" bind="or_views_listInt"></td>
</tr> </tr>
</table></div> </table></div>
</td> </td>
<td> <td>
<div class="grid-layout layout-tighter"><table> <div class="grid-layout layout-tighter"><table>
<tr> <tr>
<td colspan="3"><h3>After Splitting</h3></td> <td colspan="3"><h3><span bind="or_views_afterSplit"></span></h3></td>
</tr> </tr>
<tr> <tr>
<td width="1%"><input type="checkbox" checked="true" bind="guessCellTypeInput" id="$split-column-guess" /></td> <td width="1%"><input type="checkbox" checked="true" bind="guessCellTypeInput" id="$split-column-guess" /></td>
<td colspan="2"><label for="$split-column-guess">Guess cell type</label></td> <td colspan="2"><label for="$split-column-guess" bind="or_views_guessType"></label></td>
</tr> </tr>
<tr> <tr>
<td width="1%"><input type="checkbox" checked="true" bind="removeColumnInput" id="$split-column-remove" /></td> <td width="1%"><input type="checkbox" checked="true" bind="removeColumnInput" id="$split-column-remove" /></td>
<td colspan="2"><label for="$split-column-remove">Remove this column</label></td> <td colspan="2"><label for="$split-column-remove" bind="or_views_removeCol"></label></td>
</tr> </tr>
</table></div> </table></div>
</td> </td>
</table></div> </table></div>
</div> </div>
<div class="dialog-footer" bind="dialogFooter"> <div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">&nbsp;&nbsp;OK&nbsp;&nbsp;</button> <button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton">Cancel</button> <button class="button" bind="cancelButton"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,20 +8,20 @@
<td>On error</td> <td>On error</td>
<td> <td>
<input type="radio" name="text-transform-dialog-onerror-choice" value="keep-original" checked id="$text-transform-error-keep-original" /> <input type="radio" name="text-transform-dialog-onerror-choice" value="keep-original" checked id="$text-transform-error-keep-original" />
<label for="$text-transform-error-keep-original">keep original</label><br/> <label for="$text-transform-error-keep-original" bind="or_views_keepOr"></label><br/>
<input type="radio" name="text-transform-dialog-onerror-choice" value="set-to-blank" id="$text-transform-error-set-to-blank" /> <input type="radio" name="text-transform-dialog-onerror-choice" value="set-to-blank" id="$text-transform-error-set-to-blank" />
<label for="$text-transform-error-set-to-blank">set to blank</label><br/> <label for="$text-transform-error-set-to-blank" bind="or_views_setBlank"></label><br/>
<input type="radio" name="text-transform-dialog-onerror-choice" value="store-error" id="$text-transform-error-store-error" /> <input type="radio" name="text-transform-dialog-onerror-choice" value="store-error" id="$text-transform-error-store-error" />
<label for="$text-transform-error-store-error">store error</label></td> <label for="$text-transform-error-store-error" bind="or_views_storeErr"></label></td>
<td><input type="checkbox" bind="repeatCheckbox" id="$text-transform-repeat" /> <td><input type="checkbox" bind="repeatCheckbox" id="$text-transform-repeat" />
<label for="$text-transform-repeat">Re-transform up to</label> <input bind="repeatCountInput" value="10" size="2" /> <label for="$text-transform-repeat" bind="or_views_reTrans"></label> <input bind="repeatCountInput" value="10" size="2" />
<label for="$text-transform-repeat">times until no change</label></td> <label for="$text-transform-repeat" bind="or_views_timesChang"></label></td>
</tr> </tr>
</table> </table>
</div> </div>
</div> </div>
<div class="dialog-footer" bind="dialogFooter"> <div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">&nbsp;&nbsp;OK&nbsp;&nbsp;</button> <button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton">Cancel</button> <button class="button" bind="cancelButton"></button>
</div> </div>
</div> </div>

View File

@ -1,12 +1,12 @@
<div class="dialog-frame" style="width: 700px;"> <div class="dialog-frame" style="width: 700px;">
<div class="dialog-border"> <div class="dialog-border">
<div class="dialog-header" bind="dialogHeader">Transpose Cells Across Columns into Rows</div> <div class="dialog-header" bind="dialogHeader"></div>
<div class="dialog-body" bind="dialogBody"> <div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full grid-layout-for-ui"><table> <div class="grid-layout layout-normal layout-full grid-layout-for-ui"><table>
<tr> <tr>
<td>From Column</td> <td bind="or_views_fromCol"></td>
<td>To Column</td> <td bind="or_views_toCol"></td>
<td>Transpose into</td> <td bind="or_views_transpose"></td>
</tr> </tr>
<tr> <tr>
<td><select bind="fromColumnSelect" size="20" style="width: 100%;"></select></td> <td><select bind="fromColumnSelect" size="20" style="width: 100%;"></select></td>
@ -14,57 +14,57 @@
<td><div class="grid-layout layout-tight"><table> <td><div class="grid-layout layout-tight"><table>
<tr> <tr>
<td><input type="radio" id="$transpose-dialog-two-columns" name="transpose-dialog-column-choices" value="2" checked /></td> <td><input type="radio" id="$transpose-dialog-two-columns" name="transpose-dialog-column-choices" value="2" checked /></td>
<td><label for="$transpose-dialog-two-columns">Two new columns</td> <td><label for="$transpose-dialog-two-columns"><span bind="or_views_twoCol"></span></td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><div class="grid-layout layout-tightest"><table> <td><div class="grid-layout layout-tightest"><table>
<tr> <tr>
<td>Key column</td> <td bind="or_views_keyCol"></td>
<td><input bind="keyColumnNameInput" size="15"> (containing original columns' names)</td> <td><input bind="keyColumnNameInput" size="15"> <span bind="or_views_containNames"></span></td>
</tr> </tr>
<tr> <tr>
<td>Value column</td> <td bind="or_views_valCol"></td>
<td><input bind="valueColumnNameInput" size="15"> (containing original cells' values)</td> <td><input bind="valueColumnNameInput" size="15"> <span bind="or_views_containOrig"></span></td>
</tr> </tr>
</table></div></td> </table></div></td>
</tr> </tr>
<tr> <tr>
<td><input type="radio" id="$transpose-dialog-one-column" name="transpose-dialog-column-choices" value="1" /></td> <td><input type="radio" id="$transpose-dialog-one-column" name="transpose-dialog-column-choices" value="1" /></td>
<td><label for="$transpose-dialog-one-column">One column <input bind="combinedColumnNameInput" size="15" /></td> <td><label for="$transpose-dialog-one-column"><span bind="or_views_oneCol"></span> <input bind="combinedColumnNameInput" size="15" /></td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><div class="grid-layout layout-tightest"><table> <td><div class="grid-layout layout-tightest"><table>
<tr> <tr>
<td><input type="checkbox" bind="prependColumnNameCheckbox" id="$transpose-dialog-prepend" /></td> <td><input type="checkbox" bind="prependColumnNameCheckbox" id="$transpose-dialog-prepend" /></td>
<td><label for="$transpose-dialog-prepend">prepend the original column's name to each cell</label></td> <td><label for="$transpose-dialog-prepend"><span bind="or_views_prependName"></span></label></td>
</tr> </tr>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>followed by <td><span bind="or_views_followBy"></span>
<input bind="separatorInput" size="2" value=":" /> <input bind="separatorInput" size="2" value=":" />
before the cell's value <span bind="or_views_beforeVal"></span>
</td> </td>
</tr> </tr>
</table></div></td> </table></div></td>
</tr> </tr>
<tr> <tr>
<td><input type="checkbox" bind="ignoreBlankCellsCheckbox" checked id="$transpose-dialog-ignore" /></td> <td><input type="checkbox" bind="ignoreBlankCellsCheckbox" checked id="$transpose-dialog-ignore" /></td>
<td><label for="$transpose-dialog-ignore">Ignore blank cells</label></td> <td><label for="$transpose-dialog-ignore"><span bind="or_views_ignoreBlank"></span></label></td>
</tr> </tr>
<tr> <tr>
<td><input type="checkbox" bind="fillDownCheckbox" id="$transpose-dialog-fill-down" /></td> <td><input type="checkbox" bind="fillDownCheckbox" id="$transpose-dialog-fill-down" /></td>
<td><label for="$transpose-dialog-fill-down">Fill down in other columns</label></td> <td><label for="$transpose-dialog-fill-down"><span bind="or_views_fillOther"></span></label></td>
</tr> </tr>
</table></div></td> </table></div></td>
</tr> </tr>
</table></div> </table></div>
</div> </div>
<div class="dialog-footer" bind="dialogFooter"> <div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">Transpose</button> <button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton">Cancel</button> <button class="button" bind="cancelButton"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -361,6 +361,244 @@
"working": "Working", "working": "Working",
"invalid-date": "Invalid date string" "invalid-date": "Invalid date string"
}, },
"core-views": {
"edit-cell": "Edit this cell",
"choose-match": "Choose new match",
"match-all-cells": "Match this topic to this and all identical cells",
"match-this-cell": "Match this topic to this cell",
"create-topic-cells": "Create a new topic for this and all identical cells",
"create-topic-cell": "Create a new topic for this cell",
"create-topic": "Create new topic",
"search-match": "Search for match",
"not-valid-number": "Not a valid number.",
"not-valid-date": "Not a valid date.",
"search-match": "Search for Match",
"match-this": "Match this cell only",
"match-other": "Match other cells with same content",
"search-for": "Search for",
"match-cell": "Match this Cell",
"match-identical": "Match All Identical Cells",
"matched": "matched",
"new": "new",
"to-be-recon": "to be reconciled",
"facet": "Facet",
"edit-cells": "Edit cells",
"edit-column": "Edit column",
"transpose": "Transpose",
"sort": "Sort",
"collapse-expand": "Collapse/expand columns to make viewing the data more convenient",
"collapse-this": "Collapse this column",
"collapse-all": "Collapse all other columns",
"collapse-left": "Collapse all columns to left",
"collapse-right": "Collapse all columns to right",
"reconcile": "Reconcile",
"match-fb": "Match this column's cells to topics on Freebase",
"reverse": "Reverse",
"remove-sort": "Remove sort",
"sort-by": "Sort by",
"sort-cell": "Sort cell values as",
"pos-blank": "Position blanks and errors",
"text": "text",
"case-sensitive": "case-sensitive",
"numbers": "numbers",
"dates": "dates",
"booleans": "booleans",
"drag-drop": "Drag and drop to re-order",
"forward": "forward",
"reverse": "reverse",
"sort-by-col": "sort by this column alone",
"smallest-first": "smallest first",
"largest-first": "largest first",
"earliest-first": "earliest first",
"latest-first": "latest first",
"false-true": "false then true",
"true-fasle": "true then false",
"valid-values": "Valid values",
"blanks": "Blanks",
"errors": "Errors",
"search-fb-topic": "Search Freebase for a topic to match all filtered cells:",
"copy-recon-judg": "Copy recon judgments from column",
"copy-to-col": "Copy to Columns",
"copy-opt": "Copying Options",
"apply-to-cell": "Apply to judged cells",
"what-to-copy": "What to copy:",
"new-recon": "new recon judgments",
"match-recon": "match recon judgments",
"warning-other-col": "Please select some other column to copy to.",
"warning-sel-judg": "Please select at least one kind of judgment to copy.",
"start-recon": "Start reconciling",
"recon-text-fb": "Reconcile text in this column with topics on Freebase",
"facets": "Facets",
"by-judg": "By judgment",
"best-score": "Best candidate's score",
"best-cand-score": "best candidate's score",
"best-type-match": "Best candidate's type match",
"best-cand-type-match": "best candidate's types match?",
"best-name": "Best candidate's name match",
"best-cand-name": "best candidate's name match?",
"best-edit-dist": "Best candidate's name edit distance",
"best-cand-edit-dist": "best candidate's name edit distance",
"best-word-sim": "Best candidate's name word similarity",
"best-cand-word-sim": "best candidate's name word similarity",
"best-type": "Best candidate's types",
"qa-facets": "QA facets",
"qa-results": "QA results",
"qa-results2": "QA Results",
"judg-actions": "Judgment actions",
"judg-actions2": "Judgment Actions",
"judg-hist": "Judgment history entries",
"hist-entries": "History Entries",
"actions": "Actions",
"best-cand": "Match each cell to its best candidate",
"best-cand2": "Match each cell to its best candidate in this column for all current filtered rows",
"new-topic": "Create a new topic for each cell",
"new-topic2": "Mark to create one new topic for each cell in this column for all current filtered rows",
"one-topic": "Create one new topic for similar cells",
"one-topic2": "Mark to create one new topic for each group of similar cells in this column for all current filtered rows",
"filtered-cell": "Match all filtered cells to...",
"filtered-cell2": "Search for a topic to match all filtered cells to",
"discard-judg": "Discard reconciliation judgments",
"discard-judg2": "Discard reconciliation judgments in this column for all current filtered rows",
"clear-recon": "Clear reconciliation data",
"clear-recon2": "Clear reconciliation data in this column for all current filtered rows",
"copy-recon": "Copy reconciliation data...",
"copy-recon2": "Copy this column's reconciliation data to other columns",
"custom-facet": "Custom Facet on column",
"custom-numeric": "Custom Numeric Facet on column",
"text-facet": "Text facet",
"numeric-facet": "Numeric facet",
"timeline-facet": "Timeline facet",
"scatterplot-facet": "Scatterplot facet",
"custom-facet": "Custom text facet",
"custom-numeric": "Custom numeric facet",
"custom-facets": "Customized facets",
"word-facet": "Word facet",
"duplicates-facet": "Duplicates facet",
"numeric-log-facet": "Numeric log facet",
"bounded-log-facet": "1-bounded numeric log facet",
"text-length-facet": "Text length facet",
"log-length-facet": "Log of text length facet",
"unicode-facet": "Unicode char-code facet",
"facet-error": "Facet by error",
"facet-blank": "Facet by blank",
"text-filter": "Text filter",
"add-col-col": "Add column based on column",
"new-col-name": "New column name",
"on-error": "On error",
"set-blank": "set to blank",
"store-err": "store error",
"copy-val": "copy value from original column",
"warning-col-name": "You must enter a column name.",
"add-col-fetch": "Add column by fetching URLs based on column",
"throttle-delay": "Throttle delay",
"milli": "milliseconds",
"url-fetch": "Formulate the URLs to fetch:",
"enter-col-name": "Enter new column name",
"split-col": "Split column",
"several-col": "into several columns",
"how-split": "How to Split Column",
"by-sep": "by separator",
"separator": "Separator",
"reg-exp": "regular expression",
"split-into": "Split into",
"col-at-most": "columns at most (leave blank for no limit)",
"field-len": "by field lengths",
"list-int": "List of integers separated by commas, e.g., 5, 7, 15",
"after-split": "After Splitting",
"guess-cell": "Guess cell type",
"remove-col": "Remove this column",
"specify-sep": "Please specify a separator.",
"warning-no-length": "No field length is specified.",
"warning-format": "The given field lengths are not properly formatted.",
"split-into-col": "Split into several columns",
"add-based-col": "Add column based on this column",
"add-by-urls": "Add column by fetching URLs",
"rename-col": "Rename this column",
"move-to-beg": "Move column to beginning",
"move-to-end": "Move column to end",
"move-to-left": "Move column left",
"move-to-right": "Move column right",
"show-as": "Show as",
"first": "first",
"previous": "previous",
"next": "next",
"last": "last",
"all": "All",
"facet-star": "Facet by star",
"starred-rows": "Starred Rows",
"facet-flag": "Facet by flag",
"flagged-rows": "Flagged Rows",
"edit-rows": "Edit rows",
"star-rows": "Star rows",
"unstar-rows": "Unstar rows",
"flag-rows": "Flag rows",
"unflag-rows": "Unflag rows",
"remove-matching": "Remove all matching rows",
"edit-col": "Edit columns",
"reorder-remove": "Re-order / remove columns",
"view": "View",
"collapse-all": "Collapse all columns",
"expand-all": "Expand all columns",
"remove-sort": "Remove sort",
"reorder-perma": "Reorder rows permanently",
"by": "By",
"custom-text-trans": "Custom text transform on column",
"keep-or": "keep original",
"re-trans": "Re-transform up to",
"times-chang": "times until no change",
"enter-separator": "Enter separator to use between values",
"what-separator": "What separator currently separates the values?",
"transform": "Transform",
"common-transform": "Common transforms",
"trim-all": "Trim leading and trailing whitespace",
"collapse-white": "Collapse consecutive whitespace",
"unescape-html": "Unescape HTML entities",
"titlecase": "To titlecase",
"uppercase": "To uppercase",
"lowercase": "To lowercase",
"to-number": "To number",
"to-date": "To date",
"to-text": "To text",
"blank-out": "Blank out cells",
"fill-down": "Fill down",
"blank-down": "Blank down",
"split-cells": "Split multi-valued cells",
"join-cells": "Join multi-valued cells",
"cluster-edit": "Cluster and edit",
"transp-cell": "Transpose Cells Across Columns into Rows",
"from-col": "From Column",
"to-col": "To Column",
"transp-into": "Transpose into",
"two-new-col": "Two new columns",
"key-col": "Key Column",
"contain-names": "(containing original columns' names)",
"val-col": "Value Column",
"contain-val": "(containing original cells' values)",
"one-col": "One column",
"prepend-name": "prepend the original column's name to each cell",
"follow-by": "followed by",
"before-val": "before the cell's value",
"ignore-blank": "Ignore blank cells",
"fill-other": "Fill down in other columns",
"spec-new-name": "Please specify the new key column's name.",
"spec-new-val": "Please specify the new value column's name.",
"spec-col-name": "Please specify the new column's name.",
"spec-separator": "Please specify the separator between original column names and cell values.",
"how-many-rows": "How many rows to transpose?",
"expect-two": "Expected an integer at least 2.",
"columnize": "Columnize by Key/Value Columns",
"note-col": "Note Column (optional)",
"sel-col-val": "Please select one key column and one value column that are different from one another.",
"cannot-same": "If specified, the note column cannot be the same as the key column or the value column.",
"transp-cell-row": "Transpose cells across columns into rows",
"transp-cell-col": "Transpose cells in rows into columns",
"columnize-col": "Columnize by key/value columns",
"data-type": "Data type:",
"number": "number",
"boolean": "boolean",
"date": "date",
"ctrl-enter": "Ctrl-Enter"
},
"core-buttons": { "core-buttons": {
"cancel": "Cancel", "cancel": "Cancel",
"ok": "&nbsp;&nbsp;OK&nbsp;&nbsp;", "ok": "&nbsp;&nbsp;OK&nbsp;&nbsp;",
@ -396,6 +634,12 @@
"add-std-svc": "Add Standard Service", "add-std-svc": "Add Standard Service",
"add-named-svc": "Add Namespaced Service", "add-named-svc": "Add Namespaced Service",
"start-recon": "Start Reconciling", "start-recon": "Start Reconciling",
"add-service": "Add Service" "add-service": "Add Service",
"dont-reconcile": "Don't Reconcile Cell",
"new-topic": "New Topic",
"match": "Match",
"copy": "Copy",
"transpose": "Transpose",
"apply-to-all": "Apply to All Identical Cells"
} }
} }