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="grid-layout layout-normal layout-full"><table cols="2">
<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 width="1%" style="white-space: pre;">Throttle delay</td>
<td><input bind="throttleDelayInput" size="10" value="5000" /> milliseconds</td>
<td width="1%" style="white-space: pre;" bind="or_views_throttle"></td>
<td><input bind="throttleDelayInput" size="10" value="5000" /> <span bind="or_views_milli"></span></td>
</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">
<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" />
<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><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>
</table></div>
</div>
<div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">&nbsp;&nbsp;OK&nbsp;&nbsp;</button>
<button class="button" bind="cancelButton">Cancel</button>
<button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton"></button>
</div>
</div>
</div>

View File

@ -4,18 +4,18 @@
<div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full"><table cols="2">
<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>
</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>
<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" />
<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" />
<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><td colspan="2">$EXPRESSION_PREVIEW_WIDGET$</td></tr>
</table></div>

View File

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

View File

@ -1,5 +1,5 @@
<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 all visible cells with same content" bind="matchSimilarButton">Match All Identical Cells</button>
<button class="button" title="Cancel" bind="cancelButton">Cancel</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"></button>
<button class="button" title="Cancel" bind="cancelButton"></button>
</div>

View File

@ -1,27 +1,27 @@
<div class="dialog-frame" style="width: 450px;">
<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="grid-layout layout-tighter"><table>
<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>
</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><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>
<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>
</table></div>
</div>
<div class="dialog-footer" bind="dialogFooter">
<button class="button button-primary" bind="okButton">Match</button>
<button class="button" bind="newButton">New Topic</button>
<button class="button" bind="clearButton">Don't Reconcile Cell</button>
<button class="button" bind="cancelButton">Cancel</button>
<button class="button button-primary" bind="okButton"></button>
<button class="button" bind="newButton"></button>
<button class="button" bind="clearButton"></button>
<button class="button" bind="cancelButton"></button>
</div>
</div>
</div>

View File

@ -50,7 +50,7 @@ DataTableCellUI.prototype._render = function() {
var editLink = $('<a href="javascript:{}">&nbsp;</a>')
.addClass("data-table-cell-edit")
.attr("title", "Edit this cell")
.attr("title", $.i18n._('core-views')["edit-cell"])
.appendTo(divContent)
.click(function() { self._startEdit(this); });
@ -92,7 +92,7 @@ DataTableCellUI.prototype._render = function() {
$('<span>').addClass("data-table-recon-new").text("new").appendTo(divContent);
$('<a href="javascript:{}"></a>')
.text("Choose new match")
.text($.i18n._('core-views')["choose-match"])
.addClass("data-table-recon-action")
.appendTo(divContent).click(function(evt) {
self._doRematch();
@ -112,7 +112,7 @@ DataTableCellUI.prototype._render = function() {
$('<span> </span>').appendTo(divContent);
$('<a href="javascript:{}"></a>')
.text("Choose new match")
.text($.i18n._('core-views')["choose-match"])
.addClass("data-table-recon-action")
.appendTo(divContent)
.click(function(evt) {
@ -130,14 +130,14 @@ DataTableCellUI.prototype._render = function() {
$('<a href="javascript:{}">&nbsp;</a>')
.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) {
self._doMatchTopicToSimilarCells(candidate);
});
$('<a href="javascript:{}">&nbsp;</a>')
.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) {
self._doMatchTopicToOneCell(candidate);
});
@ -188,19 +188,19 @@ DataTableCellUI.prototype._render = function() {
var liNew = $('<div></div>').addClass("data-table-recon-candidate").appendTo(ul);
$('<a href="javascript:{}">&nbsp;</a>')
.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) {
self._doMatchNewTopicToSimilarCells();
});
$('<a href="javascript:{}">&nbsp;</a>')
.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) {
self._doMatchNewTopicToOneCell();
});
$('<span>').text("Create new topic").appendTo(liNew);
$('<span>').text($.i18n._('core-views')["create-topic"]).appendTo(liNew);
var suggestOptions;
var addSuggest = false;
@ -218,7 +218,7 @@ DataTableCellUI.prototype._render = function() {
self._searchForMatch(suggestOptions);
return false;
})
.text("Search for match")
.text($.i18n._('core-views')["search-match"])
.appendTo(extraChoices);
}
}
@ -316,6 +316,15 @@ DataTableCellUI.prototype._searchForMatch = function(suggestOptions) {
var self = this;
var frame = $(DOM.loadHTML("core", "scripts/views/data-table/cell-recon-search-for-match.html"));
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 dismiss = function() {
@ -456,6 +465,11 @@ DataTableCellUI.prototype._previewCandidateTopic = function(candidate, elmt, pre
MenuSystem.positionMenuLeftRight(fakeMenu, $(elmt));
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() {
self._doMatchTopicToOneCell(candidate);
MenuSystem.dismissAll();
@ -478,6 +492,18 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
menu.html(DOM.loadHTML("core", "scripts/views/data-table/cell-editor.html"));
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.positionMenuLeftRight(menu, $(this._td));
@ -495,7 +521,7 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
if (type == "number") {
value = parseFloat(text);
if (isNaN(value)) {
alert("Not a valid number.");
alert($.i18n._('core-views')["not-valid-number"]);
return;
}
} else if (type == "boolean") {
@ -506,7 +532,7 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
value = DateTimeUtil.parseIso8601DateTime(text);
}
if (!value) {
alert("Not a valid date.");
alert($.i18n._('core-views')["not-valid-date"]);
return;
}
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 matchPercent = Math.ceil(100 * stats.matchedTopics / 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>')
.addClass("column-header-recon-stats-bar")
@ -101,25 +101,25 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
var menu = [
{
id: "core/facet",
label: "Facet",
label: $.i18n._('core-views')["facet"],
width: "170px",
submenu: []
},
{},
{
id: "core/edit-cells",
label: "Edit cells",
label: $.i18n._('core-views')["edit-cells"],
width: "170px",
submenu: []
},
{
id: "core/edit-column",
label: "Edit column",
label: $.i18n._('core-views')["edit-column"],
submenu: []
},
{
id: "core/transpose",
label: "Transpose",
label: $.i18n._('core-views')["transpose"],
submenu: []
},
{},
@ -127,31 +127,31 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
this._dataTableView._getSortingCriterionForColumn(this._column.name) === null ?
{
id: "core/sort",
"label": "Sort...",
"label": $.i18n._('core-views')["sort"]+"...",
"click": function() {
self._showSortingCriterion(null, self._dataTableView._getSortingCriteriaCount() > 0);
}
} :
{
id: "core/sort",
label: "Sort",
label: $.i18n._('core-views')["sort"],
submenu: this.createSortingMenu()
}
),
{
id: "core/view",
label: "View",
tooltip: "Collapse/expand columns to make viewing the data more convenient",
tooltip: $.i18n._('core-views')["collapse-expand"],
submenu: [
{
label: "Collapse this column",
label: $.i18n._('core-views')["collapse-this"],
click: function() {
self._dataTableView._collapsedColumnNames[self._column.name] = true;
self._dataTableView.render();
}
},
{
label: "Collapse all other columns",
label: $.i18n._('core-views')["collapse-all"],
click: function() {
var collapsedColumnNames = {};
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() {
for (var i = 0; i < self._columnIndex; i++) {
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() {
for (var i = self._columnIndex + 1; i < theProject.columnModel.columns.length; i++) {
self._dataTableView._collapsedColumnNames[theProject.columnModel.columns[i].name] = true;
@ -186,8 +186,8 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
{},
{
id: "core/reconcile",
label: "Reconcile",
tooltip: "Match this column's cells to topics on Freebase",
label: $.i18n._('core-views')["reconcile"],
tooltip: $.i18n._('core-views')["match-fb"],
width: "170px",
submenu: []
}
@ -208,7 +208,7 @@ DataTableColumnHeaderUI.prototype.createSortingMenu = function() {
var items = [
{
"label": "Sort...",
"label": $.i18n._('core-views')["sort"]+"...",
"click": function() {
self._showSortingCriterion(criterion, hasOtherCriteria);
}
@ -217,14 +217,14 @@ DataTableColumnHeaderUI.prototype.createSortingMenu = function() {
if (criterion !== null) {
items.push({
"label": "Reverse",
"label": $.i18n._('core-views')["reverse"],
"click": function() {
criterion.reverse = !criterion.reverse;
self._dataTableView._addSortingCriterion(criterion);
}
});
items.push({
"label": "Remove sort",
"label": $.i18n._('core-views')["remove-sort"],
"click": function() {
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 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
.find("input[type='radio'][value='" + criterion.valueType + "']")
@ -260,14 +275,14 @@ DataTableColumnHeaderUI.prototype._showSortingCriterion = function(criterion, ha
forward.html("a - z");
reverse.html("z - a");
} else if (valueType == "number") {
forward.html("smallest first");
reverse.html("largest first");
forward.html($.i18n._('core-views')["smallest-first"]);
reverse.html($.i18n._('core-views')["largest-first"]);
} else if (valueType == "date") {
forward.html("earliest first");
reverse.html("latest first");
forward.html($.i18n._('core-views')["earliest-first"]);
reverse.html($.i18n._('core-views')["latest-first"]);
} else if (valueType == "boolean") {
forward.html("false then true");
reverse.html("true then false");
forward.html($.i18n._('core-views')["false-true"]);
reverse.html($.i18n._('core-views')["true-false"]);
}
};
elmts.valueTypeOptions
@ -288,9 +303,9 @@ DataTableColumnHeaderUI.prototype._showSortingCriterion = function(criterion, ha
elmts.sortAloneContainer.show();
}
var validValuesHtml = '<li kind="value">Valid values</li>';
var blankValuesHtml = '<li kind="blank">Blanks</li>';
var errorValuesHtml = '<li kind="error">Errors</li>';
var validValuesHtml = '<li kind="value">'+$.i18n._('core-views')["valid-values"]+'</li>';
var blankValuesHtml = '<li kind="blank">'+$.i18n._('core-views')["blanks"]+'</li>';
var errorValuesHtml = '<li kind="error">'+$.i18n._('core-views')["errors"]+'</li>';
var positionsHtml;
if (criterion.blankPosition < 0) {
if (criterion.errorPosition > 0) {

View File

@ -4,31 +4,31 @@
<div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full grid-layout-for-ui"><table>
<tr>
<td>Copy to Columns</td>
<td>Copying Options</td>
<td bind="or_views_copyToCol"></td>
<td bind="or_views_copyOpt"></td>
</tr>
<tr>
<td><select bind="toColumnSelect" multiple size="20" style="width: 100%;"></select></td>
<td><div class="grid-layout layout-normal"><table>
<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>
<td colspan="2">What to copy:</td>
<td colspan="2" bind="or_views_whatToCopy"></td>
</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>
<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>
</table></div></td>
</tr>
</table></div>
</div>
<div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">Copy</button>
<button class="button" bind="cancelButton">Cancel</button>
<button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton"></button>
</div>
</div>
</div>

View File

@ -91,7 +91,7 @@ DataTableView.prototype.render = function() {
var html = $(
'<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>' +
'</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 to = Math.min(theProject.rowModel.filtered, theProject.rowModel.start + theProject.rowModel.limit);
var firstPage = $('<a href="javascript:{}">&laquo; first</a>').appendTo(pagingControls);
var previousPage = $('<a href="javascript:{}">&lsaquo; previous</a>').appendTo(pagingControls);
var firstPage = $('<a href="javascript:{}">&laquo; '+$.i18n._('core-views')["first"]+'</a>').appendTo(pagingControls);
var previousPage = $('<a href="javascript:{}">&lsaquo; '+$.i18n._('core-views')["previous"]+'</a>').appendTo(pagingControls);
if (theProject.rowModel.start > 0) {
firstPage.addClass("action").click(function(evt) { self._onClickFirstPage(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);
var nextPage = $('<a href="javascript:{}">next &rsaquo;</a>').appendTo(pagingControls);
var lastPage = $('<a href="javascript:{}">last &raquo;</a>').appendTo(pagingControls);
var nextPage = $('<a href="javascript:{}">'+$.i18n._('core-views')["next"]+' &rsaquo;</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) {
nextPage.addClass("action").click(function(evt) { self._onClickNextPage(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")
.html(
'<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>'
)
).dropdownMenu.click(function() {
@ -557,18 +557,18 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
var self = this;
var menu = [
{
label: "Facet",
label: $.i18n._('core-views')["facet"],
id: "core/facets",
width: "200px",
submenu: [
{
label: "Facet by star",
label: $.i18n._('core-views')["facet-star"],
id: "core/facet-by-star",
click: function() {
ui.browsingEngine.addFacet(
"list",
{
"name" : "Starred Rows",
"name" : $.i18n._('core-views')["starred-rows"],
"columnName" : "",
"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",
click: function() {
ui.browsingEngine.addFacet(
"list",
{
"name" : "Flagged Rows",
"name" : $.i18n._('core-views')["flagged-rows"],
"columnName" : "",
"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",
width: "200px",
submenu: [
{
label: "Star rows",
label: $.i18n._('core-views')["star-rows"],
id: "core/star-rows",
click: function() {
Refine.postCoreProcess("annotate-rows", { "starred" : "true" }, null, { rowMetadataChanged: true });
}
},
{
label: "Unstar rows",
label: $.i18n._('core-views')["unstar-rows"],
id: "core/unstar-rows",
click: function() {
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",
click: function() {
Refine.postCoreProcess("annotate-rows", { "flagged" : "true" }, null, { rowMetadataChanged: true });
}
},
{
label: "Unflag rows",
label: $.i18n._('core-views')["unflag-rows"],
id: "core/unflag-rows",
click: function() {
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",
click: function() {
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",
width: "200px",
submenu: [
{
label: "Re-order / remove columns...",
label: $.i18n._('core-views')["reorder-remove"]+"...",
id: "core/reorder-columns",
click: function() {
new ColumnReorderingDialog();
@ -658,12 +658,12 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
},
{},
{
label: "View",
label: $.i18n._('core-views')["view"],
id: "core/view",
width: "200px",
submenu: [
{
label: "Collapse all columns",
label: $.i18n._('core-views')["collapse-all"],
id: "core/collapse-all-columns",
click: function() {
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",
click: function() {
self._collapsedColumnNames = [];
@ -695,14 +695,14 @@ DataTableView.prototype._createSortingMenu = function(elmt) {
var self = this;
var items = [
{
"label" : "Remove sort",
"label" : $.i18n._('core-views')["remove-sort"],
"click" : function() {
self._sorting.criteria = [];
self.update();
}
},
{
"label" : "Reorder rows permanently",
"label" : $.i18n._('core-views')["reorder-perma"],
"click" : function() {
Refine.postCoreProcess(
"reorder-rows",
@ -733,7 +733,7 @@ DataTableView.prototype._createSortingMenu = function(elmt) {
var columnHeaderUI = getColumnHeaderUI(criterion.column);
if (columnHeaderUI !== null) {
items.push({
"label" : "By " + criterion.column,
"label" : $.i18n._('core-views')["by"]+" " + criterion.column,
"submenu" : columnHeaderUI.createSortingMenu()
});
}

View File

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

View File

@ -53,7 +53,15 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
.replace("$EXPRESSION_PREVIEW_WIDGET$", ExpressionPreviewDialog.generateWidgetHtml()));
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 dismiss = function() { DialogSystem.dismissUntil(level - 1); };
@ -109,7 +117,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
};
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) {
Refine.postCoreProcess(
"join-multi-value-cells",
@ -125,7 +133,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
};
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) {
Refine.postCoreProcess(
"split-multi-value-cells",
@ -144,65 +152,65 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/edit-cells" ], [
{
id: "core/text-transform",
label: "Transform...",
label: $.i18n._('core-views')["transform"]+"...",
click: function() { doTextTransformPrompt(); }
},
{
id: "core/common-transforms",
label: "Common transforms",
label: $.i18n._('core-views')["common-transform"],
submenu: [
{
id: "core/trim-whitespace",
label: "Trim leading and trailing whitespace",
label: $.i18n._('core-views')["trim-all"],
click: function() { doTextTransform("value.trim()", "keep-original", false, ""); }
},
{
id: "core/collapse-whitespace",
label: "Collapse consecutive whitespace",
label: $.i18n._('core-views')["collapse-white"],
click: function() { doTextTransform("value.replace(/\\s+/,' ')", "keep-original", false, ""); }
},
{},
{
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); }
},
{},
{
id: "core/to-titlecase",
label: "To titlecase",
label: $.i18n._('core-views')["titlecase"],
click: function() { doTextTransform("value.toTitlecase()", "keep-original", false, ""); }
},
{
id: "core/to-uppercase",
label: "To uppercase",
label: $.i18n._('core-views')["uppercase"],
click: function() { doTextTransform("value.toUppercase()", "keep-original", false, ""); }
},
{
id: "core/to-lowercase",
label: "To lowercase",
label: $.i18n._('core-views')["lowercase"],
click: function() { doTextTransform("value.toLowercase()", "keep-original", false, ""); }
},
{},
{
id: "core/to-number",
label: "To number",
label: $.i18n._('core-views')["to-number"],
click: function() { doTextTransform("value.toNumber()", "keep-original", false, ""); }
},
{
id: "core/to-date",
label: "To date",
label: $.i18n._('core-views')["to-date"],
click: function() { doTextTransform("value.toDate()", "keep-original", false, ""); }
},
{
id: "core/to-text",
label: "To text",
label: $.i18n._('core-views')["to-text"],
click: function() { doTextTransform("value.toString()", "keep-original", false, ""); }
},
{},
{
id: "core/to-blank",
label: "Blank out cells",
label: $.i18n._('core-views')["blank-out"],
click: function() { doTextTransform("null", "keep-original", false, ""); }
}
]
@ -210,29 +218,29 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/fill-down",
label: "Fill down",
label: $.i18n._('core-views')["fill-down"],
click: doFillDown
},
{
id: "core/blank-down",
label: "Blank down",
label: $.i18n._('core-views')["blank-down"],
click: doBlankDown
},
{},
{
id: "core/split-multi-valued-cells",
label: "Split multi-valued cells...",
label: $.i18n._('core-views')["split-cells"]+"...",
click: doSplitMultiValueCells
},
{
id: "core/join-multi-valued-cells",
label: "Join multi-valued cells...",
label: $.i18n._('core-views')["join-cells"]+"...",
click: doJoinMultiValueCells
},
{},
{
id: "core/cluster",
label: "Cluster and edit...",
label: $.i18n._('core-views')["cluster-edit"]+"...",
click: function() { new ClusteringDialog(column.name, "value"); }
}
]);
@ -242,6 +250,25 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var elmts = DOM.bind(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() {
DialogSystem.dismissUntil(level - 1);
};
@ -262,10 +289,10 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
config.keyColumnName = $.trim(elmts.keyColumnNameInput[0].value);
config.valueColumnName = $.trim(elmts.valueColumnNameInput[0].value);
if (config.keyColumnName == "") {
alert("Please specify the new key column's name.");
alert($.i18n._('core-views')["spec-new-name"]);
return;
} else if (config.valueColumnName == "") {
alert("Please specify the new value column's name.");
alert($.i18n._('core-views')["spec-new-val"]);
return;
}
} else {
@ -273,10 +300,10 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
config.prependColumnName = elmts.prependColumnNameCheckbox[0].checked;
config.separator = elmts.separatorInput[0].value;
if (config.combinedColumnName == "") {
alert("Please specify the new column's name.");
alert($.i18n._('core-views')["spec-col-name"]);
return;
} 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;
}
}
@ -330,7 +357,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
};
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) {
try {
rowCount = parseInt(rowCount,10);
@ -339,7 +366,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
}
if (isNaN(rowCount) || rowCount < 2) {
alert("Expected an integer at least 2.");
alert($.i18n._('core-views')["expect-two"]);
} else {
var config = {
columnName: column.name,
@ -361,6 +388,14 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var elmts = DOM.bind(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() {
DialogSystem.dismissUntil(level - 1);
};
@ -377,7 +412,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
if (config.keyColumnName == null ||
config.valueColumnName == null ||
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;
}
@ -385,7 +420,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
if (noteColumnName != null) {
if (noteColumnName == config.keyColumnName ||
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;
}
config.noteColumnName = noteColumnName;
@ -422,18 +457,18 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/transpose" ], [
{
id: "core/transpose-columns-into-rows",
label: "Transpose cells across columns into rows...",
label: $.i18n._('core-views')["transp-cell-row"]+"...",
click: doTransposeColumnsIntoRows
},
{
id: "core/transpose-rows-into-columns",
label: "Transpose cells in rows into columns...",
label: $.i18n._('core-views')["transp-cell-col"]+"...",
click: doTransposeRowsIntoColumns
},
{},
{
id: "core/key-value-columnize",
label: "Columnize by key/value columns...",
label: $.i18n._('core-views')["columnize-col"]+"...",
click: doKeyValueColumnize
}
]

View File

@ -39,7 +39,15 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
.replace("$EXPRESSION_PREVIEW_WIDGET$", ExpressionPreviewDialog.generateWidgetHtml()));
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 dismiss = function() { DialogSystem.dismissUntil(level - 1); };
@ -48,7 +56,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
elmts.okButton.click(function() {
var columnName = $.trim(elmts.columnNameInput[0].value);
if (!columnName.length) {
alert("You must enter a column name.");
alert($.i18n._('core-views')["warning-col-name"]);
return;
}
@ -87,7 +95,17 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
.replace("$EXPRESSION_PREVIEW_WIDGET$", ExpressionPreviewDialog.generateWidgetHtml()));
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 dismiss = function() { DialogSystem.dismissUntil(level - 1); };
@ -96,7 +114,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
elmts.okButton.click(function() {
var columnName = $.trim(elmts.columnNameInput[0].value);
if (!columnName.length) {
alert("You must enter a column name.");
alert($.i18n._('core-views')["warning-col-name"]);
return;
}
@ -138,7 +156,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
};
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) {
Refine.postCoreProcess(
"rename-column",
@ -179,7 +197,21 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var doSplitColumn = function() {
var frame = $(DOM.loadHTML("core", "scripts/views/data-table/split-column-dialog.html"));
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 dismiss = function() { DialogSystem.dismissUntil(level - 1); };
@ -196,7 +228,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
if (mode == "separator") {
config.separator = elmts.separatorInput[0].value;
if (!(config.separator)) {
alert("Please specify a separator.");
alert($.i18n._('core-views')["specify-sep"]);
return;
}
@ -222,14 +254,14 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
});
if (lengths.length === 0) {
alert("No field length is specified.");
alert($.i18n._('core-views')["warning-no-length"]);
return;
}
config.fieldLengths = JSON.stringify(lengths);
} catch (e) {
alert("The given field lengths are not properly formatted.");
alert($.i18n._('core-views')["warning-format"]);
return;
}
}
@ -247,50 +279,50 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/edit-column" ], [
{
id: "core/split-column",
label: "Split into several columns...",
label: $.i18n._('core-views')["split-into-col"]+"...",
click: doSplitColumn
},
{},
{
id: "core/add-column",
label: "Add column based on this column...",
label: $.i18n._('core-views')["add-based-col"]+"...",
click: doAddColumn
},
{
id: "core/add-column-by-fetching-urls",
label: "Add column by fetching URLs...",
label: $.i18n._('core-views')["add-by-urls"]+"...",
click: doAddColumnByFetchingURLs
},
{},
{
id: "core/rename-column",
label: "Rename this column",
label: $.i18n._('core-views')["rename-col"],
click: doRenameColumn
},
{
id: "core/remove-column",
label: "Remove this column",
label: $.i18n._('core-views')["remove-col"],
click: doRemoveColumn
},
{},
{
id: "core/move-column-to-beginning",
label: "Move column to beginning",
label: $.i18n._('core-views')["move-to-beg"],
click: function() { doMoveColumnTo(0); }
},
{
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); }
},
{
id: "core/move-column-to-left",
label: "Move column left",
label: $.i18n._('core-views')["move-to-left"],
click: function() { doMoveColumnBy(-1); }
},
{
id: "core/move-column-to-right",
label: "Move column right",
label: $.i18n._('core-views')["move-to-right"],
click: function() { doMoveColumnBy(1); }
}
]

View File

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

View File

@ -76,11 +76,11 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var frame = DialogSystem.createDialog();
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 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));
@ -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);
}).appendTo(footer);
@ -127,7 +127,16 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var doCopyAcrossColumns = function() {
var frame = $(DOM.loadHTML("core", "scripts/views/data-table/copy-recon-across-columns-dialog.html"));
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;
for (var i = 0; i < columns.length; i++) {
@ -162,9 +171,9 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
});
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) {
alert("Please select at least one kind of judgment to copy.");
alert($.i18n._('core-views')["warning-sel-judg"]);
} else {
Refine.postCoreProcess(
"recon-copy-across-columns",
@ -180,18 +189,18 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
MenuSystem.appendTo(menu, [ "core/reconcile" ], [
{
id: "core/reconcile",
label: "Start reconciling...",
tooltip: "Reconcile text in this column with topics on Freebase",
label: $.i18n._('core-views')["start-recon"]+'...',
tooltip: $.i18n._('core-views')["recon-text-fb"],
click: doReconcile
},
{},
{
id: "core/facets",
label: "Facets",
label: $.i18n._('core-views')["facets"],
submenu: [
{
id: "core/by-judgment",
label: "By judgment",
label: $.i18n._('core-views')["by-judg"],
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -209,12 +218,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/by-best-candidates-score",
label: "Best candidate's score",
label: $.i18n._('core-views')["best-score"],
click: function() {
ui.browsingEngine.addFacet(
"range",
{
"name" : column.name + ": best candidate's score",
"name" : column.name + ": "+$.i18n._('core-views')["best-cand-score"],
"columnName" : column.name,
"expression" : "cell.recon.best.score",
"mode" : "range"
@ -226,12 +235,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/by-best-candidates-type-match",
label: "Best candidate's type match",
label: $.i18n._('core-views')["best-type-match"],
click: function() {
ui.browsingEngine.addFacet(
"list",
{
"name" : column.name + ": best candidate's types match?",
"name" : column.name + ": "+$.i18n._('core-views')["best-cand-type.match"],
"columnName" : column.name,
"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",
label: "Best candidate's name match",
label: $.i18n._('core-views')["best-name"],
click: function() {
ui.browsingEngine.addFacet(
"list",
{
"name" : column.name + ": best candidate's name match?",
"name" : column.name + ": "+ $.i18n._('core-views')["best-cand-name"],
"columnName" : column.name,
"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",
label: "Best candidate's name edit distance",
label: $.i18n._('core-views')["best-edit-dist"],
click: function() {
ui.browsingEngine.addFacet(
"range",
{
"name" : column.name + ": best candidate's name edit distance",
"name" : column.name + ": "+$.i18n._('core-views')["best-cand-edit-dist"],
"columnName" : column.name,
"expression" : "cell.recon.features.nameLevenshtein",
"mode" : "range"
@ -278,12 +287,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/by-best-candidates-name-word-similarity",
label: "Best candidate's name word similarity",
label: $.i18n._('core-views')["best-word-sim"],
click: function() {
ui.browsingEngine.addFacet(
"range",
{
"name" : column.name + ": best candidate's name word similarity",
"name" : column.name + ": "+$.i18n._('core-views')["best-cand-word-sim"],
"columnName" : column.name,
"expression" : "cell.recon.features.nameWordDistance",
"mode" : "range"
@ -296,7 +305,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/by-best-candidates-types",
label: "Best candidate's types",
label: $.i18n._('core-views')["best-type"],
click: function() {
ui.browsingEngine.addFacet(
"list",
@ -312,16 +321,16 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/qa-facets",
label: "QA facets",
label: $.i18n._('core-views')["qa-facets"],
submenu: [
{
id: "core/by-qa-results",
label: "QA results",
label: $.i18n._('core-views')["qa-results"],
click: function() {
ui.browsingEngine.addFacet(
"list",
{
"name" : column.name + " QA Results",
"name" : column.name + " "+$.i18n._('core-views')["qa-results2"],
"columnName" : column.name,
"expression" : "cell.recon.features.qaResult"
}
@ -330,12 +339,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/by-judgment-actions",
label: "Judgment actions",
label: $.i18n._('core-views')["judg-actions"],
click: function() {
ui.browsingEngine.addFacet(
"list",
{
"name" : column.name + " Judgment Actions",
"name" : column.name + " "+$.i18n._('core-views')["judg-actions2"],
"columnName" : column.name,
"expression" : "cell.recon.judgmentAction"
}
@ -344,12 +353,12 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/by-judgment-history-entries",
label: "Judgment history entries",
label: $.i18n._('core-views')["judg-hist"],
click: function() {
ui.browsingEngine.addFacet(
"list",
{
"name" : column.name + " History Entries",
"name" : column.name + " "+$.i18n._('core-views')["hist-entries"],
"columnName" : column.name,
"expression" : "cell.recon.judgmentHistoryEntry"
}
@ -360,18 +369,18 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
},
{
id: "core/actions",
label: "Actions",
label: $.i18n._('core-views')["actions"],
submenu: [
{
id: "core/match-to-best-candidate",
label: "Match each cell to its best candidate",
tooltip: "Match each cell to its best candidate in this column for all current filtered rows",
label: $.i18n._('core-views')["best-cand"],
tooltip: $.i18n._('core-views')["best-cand2"],
click: doReconMatchBestCandidates
},
{
id: "core/match-to-new-topic",
label: "Create a new topic for each cell",
tooltip: "Mark to create one new topic for each cell in this column for all current filtered rows",
label: $.i18n._('core-views')["new-topic"],
tooltip: $.i18n._('core-views')["new-topic2"],
click: function() {
doReconMarkNewTopics(false);
}
@ -379,29 +388,29 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/match-similar-to-new-topic",
label: "Create one new topic for similar cells",
tooltip: "Mark to create one new topic for each group of similar cells in this column for all current filtered rows",
label: $.i18n._('core-views')["new-topic"],
tooltip: $.i18n._('core-views')["new-topic2"],
click: function() {
doReconMarkNewTopics(true);
}
},
{
id: "core/match-to-specific",
label: "Match all filtered cells to...",
tooltip: "Search for a topic to match all filtered cells to",
label: $.i18n._('core-views')["filtered-cell"],
tooltip: $.i18n._('core-views')["filtered-cell2"],
click: doSearchToMatch
},
{},
{
id: "core/discard-judgments",
label: "Discard reconciliation judgments",
tooltip: "Discard reconciliation judgments in this column for all current filtered rows",
label: $.i18n._('core-views')["discard-judg"],
tooltip: $.i18n._('core-views')["discard-judg2"],
click: doReconDiscardJudgments
},
{
id: "core/clear-recon-data",
label: "Clear reconciliation data",
tooltip: "Clear reconciliation data in this column for all current filtered rows",
label: $.i18n._('core-views')["clear-recon"],
tooltip: $.i18n._('core-views')["clear-recon2"],
click: doClearReconData
}
]
@ -409,8 +418,8 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
{},
{
id: "core/copy-across-columns",
label: "Copy reconciliation data...",
tooltip: "Copy this column's reconciliation data to other columns",
label: $.i18n._('core-views')["copy-recon"],
tooltip: $.i18n._('core-views')["copy-recon2"],
click: doCopyAcrossColumns
}
]);

View File

@ -4,50 +4,50 @@
<div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full "><table>
<tr>
<td>Sort cell values as</td>
<td>Position blanks and errors</td>
<td><span bind="or_views_sortAs"></span></td>
<td><span bind="or_views_positionBlank"></span></td>
</tr>
<tr>
<td>
<div class="grid-layout layout-tightest grid-layout-for-text" bind="valueTypeOptions"><table>
<tr>
<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" />
<label for="$sorting-dialog-case-sensitive">case-sensitive</label></td>
<label for="$sorting-dialog-case-sensitive" bind="or_views_caseSens"></label></td>
</tr>
<tr>
<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>
<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>
<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>
</table></div>
</td>
<td>
<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>
</tr>
<tr><td colspan="2" bind="directionOptions">
<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" />
<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" />
<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>
</table></div>
</div>
<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>
</div>
</div>

View File

@ -6,54 +6,54 @@
<td>
<div class="grid-layout layout-tighter"><table>
<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>
<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><td></td>
<td>Separator</td>
<td bind="or_views_separator"></td>
<td><input size="10" value="," bind="separatorInput" />
<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><td></td>
<td>Split into</td>
<td style="white-space: pre;"><input size="3" bind="maxColumnsInput" /> columns at most (leave blank for no limit)</td>
<td bind="or_views_splitInto"></td>
<td style="white-space: pre;"><input size="3" bind="maxColumnsInput" /> <span bind="or_views_colMost"></span></td>
</tr>
<tr>
<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><td></td>
<td colspan="2"><textarea style="width: 100%;" bind="lengthsTextarea"></textarea></td>
</tr>
<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>
</table></div>
</td>
<td>
<div class="grid-layout layout-tighter"><table>
<tr>
<td colspan="3"><h3>After Splitting</h3></td>
<td colspan="3"><h3><span bind="or_views_afterSplit"></span></h3></td>
</tr>
<tr>
<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>
<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>
</table></div>
</td>
</table></div>
</div>
<div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">&nbsp;&nbsp;OK&nbsp;&nbsp;</button>
<button class="button" bind="cancelButton">Cancel</button>
<button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton"></button>
</div>
</div>
</div>

View File

@ -8,20 +8,20 @@
<td>On error</td>
<td>
<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" />
<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" />
<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" />
<label for="$text-transform-repeat">Re-transform up to</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_reTrans"></label> <input bind="repeatCountInput" value="10" size="2" />
<label for="$text-transform-repeat" bind="or_views_timesChang"></label></td>
</tr>
</table>
</div>
</div>
<div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">&nbsp;&nbsp;OK&nbsp;&nbsp;</button>
<button class="button" bind="cancelButton">Cancel</button>
<button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton"></button>
</div>
</div>

View File

@ -1,12 +1,12 @@
<div class="dialog-frame" style="width: 700px;">
<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="grid-layout layout-normal layout-full grid-layout-for-ui"><table>
<tr>
<td>From Column</td>
<td>To Column</td>
<td>Transpose into</td>
<td bind="or_views_fromCol"></td>
<td bind="or_views_toCol"></td>
<td bind="or_views_transpose"></td>
</tr>
<tr>
<td><select bind="fromColumnSelect" size="20" style="width: 100%;"></select></td>
@ -14,57 +14,57 @@
<td><div class="grid-layout layout-tight"><table>
<tr>
<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>
<td>&nbsp;</td>
<td><div class="grid-layout layout-tightest"><table>
<tr>
<td>Key column</td>
<td><input bind="keyColumnNameInput" size="15"> (containing original columns' names)</td>
<td bind="or_views_keyCol"></td>
<td><input bind="keyColumnNameInput" size="15"> <span bind="or_views_containNames"></span></td>
</tr>
<tr>
<td>Value column</td>
<td><input bind="valueColumnNameInput" size="15"> (containing original cells' values)</td>
<td bind="or_views_valCol"></td>
<td><input bind="valueColumnNameInput" size="15"> <span bind="or_views_containOrig"></span></td>
</tr>
</table></div></td>
</tr>
<tr>
<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>
<td>&nbsp;</td>
<td><div class="grid-layout layout-tightest"><table>
<tr>
<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>
<td>&nbsp;</td>
<td>followed by
<td><span bind="or_views_followBy"></span>
<input bind="separatorInput" size="2" value=":" />
before the cell's value
<span bind="or_views_beforeVal"></span>
</td>
</tr>
</table></div></td>
</tr>
<tr>
<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>
<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>
</table></div></td>
</tr>
</table></div>
</div>
<div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="okButton">Transpose</button>
<button class="button" bind="cancelButton">Cancel</button>
<button class="button" bind="okButton"></button>
<button class="button" bind="cancelButton"></button>
</div>
</div>
</div>

View File

@ -361,6 +361,244 @@
"working": "Working",
"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": {
"cancel": "Cancel",
"ok": "&nbsp;&nbsp;OK&nbsp;&nbsp;",
@ -396,6 +634,12 @@
"add-std-svc": "Add Standard Service",
"add-named-svc": "Add Namespaced Service",
"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"
}
}