Internationalization of the index part (create/open/update) of refine

This commit is contained in:
Blakko 2013-07-02 13:40:50 +02:00
parent 6048ef29f4
commit 552b0bf94b
41 changed files with 552 additions and 185 deletions

View File

@ -0,0 +1,67 @@
package com.google.refine.commands.lang;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.refine.commands.Command;
public class LoadLanguageCommand extends Command {
public LoadLanguageCommand() {
// TODO Auto-generated constructor stub
}
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request, response);
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String rawDirectoryFile = request.getSession().getServletContext()
.getRealPath("webapp/modules/langs/");
String cleanedDirectory = rawDirectoryFile.replace("main" + File.separator + "webapp" + File.separator, "main" + File.separator);
BufferedReader reader = null;
String[] langs = request.getParameterValues("lng");
langs = langs[0].split(" ");
try {
String file = cleanedDirectory + File.separator + "translation-" + langs[0] + ".json";
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
} catch (FileNotFoundException e1) {
try {
String file = cleanedDirectory + File.separator + "translation-default.json";
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
} catch (FileNotFoundException e3) {
e3.printStackTrace();
}
}
String line = null;
String message = new String();
if (reader != null) {
while ((line = reader.readLine()) != null) {
// buffer.append(line);
message += line + System.getProperty("line.separator");
}
}
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json");
response.getWriter().println(message);
response.getWriter().flush();
response.getWriter().close();
}
}

View File

@ -98,6 +98,8 @@ function registerCommands() {
RS.registerCommand(module, "transpose-rows-into-columns", new Packages.com.google.refine.commands.cell.TransposeRowsIntoColumnsCommand());
RS.registerCommand(module, "key-value-columnize", new Packages.com.google.refine.commands.cell.KeyValueColumnizeCommand());
RS.registerCommand(module, "load-language", Packages.com.google.refine.commands.lang.LoadLanguageCommand());
RS.registerCommand(module, "add-column", new Packages.com.google.refine.commands.column.AddColumnCommand());
RS.registerCommand(module, "add-column-by-fetching-urls", new Packages.com.google.refine.commands.column.AddColumnByFetchingURLsCommand());
RS.registerCommand(module, "remove-column", new Packages.com.google.refine.commands.column.RemoveColumnCommand());

View File

@ -37,6 +37,24 @@ var Refine = {
actionAreas: []
};
var lang = navigator.language.split("-")[0]
|| navigator.userLanguage.split("-")[0];
var dictionary = "";
$.ajax({
url : "/command/core/load-language?",
type : "POST",
async : false,
data : {
//lng : lang
lng: 'en'
},
success : function(data) {
dictionary = data;
}
});
$.i18n.setDictionary(dictionary);
// End internationalization
Refine.selectActionArea = function(id) {
$('.action-area-tab').removeClass('selected');
$('.action-area-tab-body').css('visibility', 'hidden').css('z-index', '50');
@ -75,7 +93,7 @@ $(function() {
function(data) {
OpenRefineVersion = data;
$("#openrefine-version").text("Version " + OpenRefineVersion.full_version);
$("#openrefine-version").text($.i18n._('core-index')["version"]+" " + OpenRefineVersion.full_version);
var script = $('<script></script>')
.attr("src", "http://google-refine.googlecode.com/svn/support/releases.js")
@ -88,12 +106,12 @@ $(function() {
var container = $('<div id="notification-container">')
.appendTo(document.body);
var notification = $('<div id="notification">')
.text('New version! ')
.text($.i18n._('core-index')["new-version"]+' ')
.appendTo(container);
$('<a>')
.addClass('notification-action')
.attr("href", releases.homepage)
.text('Download ' + releases.releases[0].description + ' now.')
.text($.i18n._('core-index')["download"]+' ' + releases.releases[0].description + ' '+$.i18n._('core-index')["now"]+'.')
.appendTo(notification);
}
} else {

View File

@ -1,5 +1,5 @@
<div id="create-project-error-panel"><div class="grid-layout layout-normal layout-full"><table>
<tr><td id="create-project-error-message"></td></tr>
<tr><td id="create-project-error-stack"></td></tr>
<tr><td><button class="button button-primary" id="create-project-error-ok-button">OK</button></td></tr>
<tr><td><button class="button button-primary" id="create-project-error-ok-button"></button></td></tr>
</table></div></div>

View File

@ -5,7 +5,7 @@
<div id="create-project-progress-bar-frame"><div id="create-project-progress-bar-body"></div></div>
</td></tr>
<tr><td colspan="3">
<button class="button" id="create-project-progress-cancel-button">Cancel</button>
<button class="button" id="create-project-progress-cancel-button"></button>
<span id="create-project-progress-timing"></span>
<span id="create-project-progress-memory"></span>
</td></tr>

View File

@ -1,16 +1,13 @@
<div id="create-project-ui-source-selection" class="relative-frame"><table id="create-project-ui-source-selection-layout">
<tr>
<td colspan="2" id="create-project-ui-source-selection-message">
<h3>Create a project by importing data. What kinds of data files can I import?</h3>
<div>TSV, CSV, *SV, Excel (.xls and .xlsx), JSON, XML, RDF as XML, and
Google Data documents are all supported. Support for other formats can
be added with OpenRefine extensions.
</div>
<h3 id="or-create-question"></h3>
<div id="or-create-formats"></div>
</td>
</tr>
<tr>
<td id="create-project-ui-source-selection-tabs">
<div>Get data from</div>
<div id="or-create-from"></div>
</td>
<td id="create-project-ui-source-selection-tab-bodies"></td>
</tr>

View File

@ -49,6 +49,13 @@ Refine.CreateProjectUI = function(elmt) {
this._errorPanel = this.addCustomPanel();
this._errorPanel.html(DOM.loadHTML("core", "scripts/index/create-project-error-panel.html"));
$('#or-create-question').text($.i18n._('core-index-create')["question"]);
$('#or-create-formats').text($.i18n._('core-index-create')["formats"]);
$('#or-create-from').text($.i18n._('core-index-create')["from"]);
$('#create-project-progress-cancel-button').text($.i18n._('core-buttons')["cancel"]);
$('#create-project-error-ok-button').text($.i18n._('core-buttons')["ok"]);
$.post(
"command/core/get-importing-configuration",
null,
@ -155,7 +162,7 @@ Refine.CreateProjectUI.prototype.showSourceSelectionPanel = function() {
Refine.actionAreas.push({
id: "create-project",
label: "Create Project",
label: $.i18n._('core-index-create')["create-proj"],
uiClass: Refine.CreateProjectUI
});
@ -166,7 +173,7 @@ Refine.CreateProjectUI.prototype.showImportProgressPanel = function(progressMess
$('#create-project-progress-message').text(progressMessage);
$('#create-project-progress-bar-body').css("width", "0%");
$('#create-project-progress-message-left').text('Starting');
$('#create-project-progress-message-left').text($.i18n._('core-index-create')["starting"]);
$('#create-project-progress-message-center').empty();
$('#create-project-progress-message-right').empty();
$('#create-project-progress-timing').empty();
@ -196,7 +203,7 @@ Refine.CreateProjectUI.prototype.pollImportJob = function(start, jobID, timerID,
onError(job);
} else if (checkDone(job)) {
$('#create-project-progress-message').text('Done.');
$('#create-project-progress-message').text($.i18n._('core-index-create')["done"]);
window.clearInterval(timerID);
if (callback) {
@ -215,13 +222,13 @@ Refine.CreateProjectUI.prototype.pollImportJob = function(start, jobID, timerID,
if (secondsRemaining > 1) {
if (secondsRemaining > 60) {
$('#create-project-progress-timing').text(
Math.ceil(secondsRemaining / 60) + " minutes remaining");
Math.ceil(secondsRemaining / 60) + " "+$.i18n._('core-index-create')["min-remaining"]);
} else {
$('#create-project-progress-timing').text(
Math.ceil(secondsRemaining) + " seconds remaining");
Math.ceil(secondsRemaining) + " "+$.i18n._('core-index-create')["sec-remaining"]);
}
} else {
$('#create-project-progress-timing').text('almost done ...');
$('#create-project-progress-timing').text($.i18n._('core-index-create')["almost-done"]);
}
} else {
$('#create-project-progress-bar-body').addClass('indefinite');
@ -230,7 +237,7 @@ Refine.CreateProjectUI.prototype.pollImportJob = function(start, jobID, timerID,
$('#create-project-progress-message').text(progress.message);
if ('memory' in progress) {
var percent = progress.memory * 100.0 / progress.maxmemory;
$('#create-project-progress-memory').text("Memory usage: "+percent.toFixed()+'% ('+progress.memory+'/'+progress.maxmemory+"MB)");
$('#create-project-progress-memory').text($.i18n._('core-index-create')["memory-usage"]+" "+percent.toFixed()+'% ('+progress.memory+'/'+progress.maxmemory+"MB)");
if (percent > 90) {
$('#create-project-progress-memory').addClass('warning');
} else {
@ -247,7 +254,7 @@ Refine.CreateProjectUI.prototype.showImportJobError = function(message, stack) {
var self = this;
$('#create-project-error-message').text(message);
$('#create-project-error-stack').text(stack || 'No technical details.');
$('#create-project-error-stack').text(stack || $.i18n._('core-index-create')["no-details"]);
this.showCustomPanel(this._errorPanel);
$('#create-project-error-ok-button').unbind().click(function() {

View File

@ -174,7 +174,7 @@ Refine.DefaultImportingController.prototype._prepareData = function() {
Refine.DefaultImportingController.prototype._ensureFormatParserUIHasInitializationData = function(format, onDone) {
if (!(format in this._parserOptions)) {
var self = this;
var dismissBusy = DialogSystem.showBusy("Inspecting selected files ...");
var dismissBusy = DialogSystem.showBusy($.i18n._('core-index-import')["inspecting"]);
$.post(
"command/core/importing-controller?" + $.param({
"controller": "core/default-importing-controller",
@ -263,7 +263,7 @@ Refine.DefaultImportingController.prototype._createProject = function() {
if ((this._formatParserUI) && this._formatParserUI.confirmReadyToCreateProject()) {
var projectName = $.trim(this._parsingPanelElmts.projectNameInput[0].value);
if (projectName.length === 0) {
window.alert("Please name the project.");
window.alert($.i18n._('core-index-import')["warning-name"]);
this._parsingPanelElmts.projectNameInput.focus();
return;
}
@ -302,14 +302,14 @@ Refine.DefaultImportingController.prototype._createProject = function() {
document.location = "project?project=" + job.config.projectID;
},
function(job) {
alert('Errors:\n' + Refine.CreateProjectUI.composeErrorMessage(job));
alert($.i18n._('core-index-import')["errors"]+'\n' + Refine.CreateProjectUI.composeErrorMessage(job));
self._onImportJobReady();
}
);
},
1000
);
self._createProjectUI.showImportProgressPanel("Creating project ...", function() {
self._createProjectUI.showImportProgressPanel($.i18n._('core-index-import')["creating-proj"], function() {
// stop the timed polling
window.clearInterval(timerID);

View File

@ -1,34 +1,31 @@
<div bind="wizardHeader" class="default-importing-wizard-header"><div class="grid-layout layout-tightest layout-full"><table><tr>
<td width="1%"><button bind="startOverButton" class="button">&laquo; Start Over</button></td>
<td width="98%">Select Files to Import</td>
<td width="1%"><button bind="nextButton" class="button button-primary">Configure Parsing Options &raquo;</button></td>
<td width="1%"><button bind="startOverButton" class="button"></button></td>
<td width="98%" id="or-import-select"></td>
<td width="1%"><button bind="nextButton" class="button button-primary"></button></td>
</tr></table></div></div>
<div bind="controlPanel" class="default-importing-file-selection-control-panel">
<div class="grid-layout layout-full layout-tighter"><table>
<tr>
<td colspan="3">
There are several files available.
Please select the ones to import.
</td>
<td colspan="3" id="or-import-severalFile"></td>
</tr>
<tr>
<td width="98%" bind="summary"></td>
<td width="1%"><button bind="selectAllButton" class="button">Select All</button></td>
<td width="1%"><button bind="unselectAllButton" class="button">Unselect All</button></td>
<td width="1%"><button bind="selectAllButton" class="button"></button></td>
<td width="1%"><button bind="unselectAllButton" class="button"></button></td>
</tr>
</table></div>
<h2>Select by Extension</h2>
<h2 id="or-import-selExt"></h2>
<div bind="extensionContainer" class="grid-layout layout-full layout-tightest"></div>
<h2>Select by Regex on File Names</h2>
<h2 id="or-import-regex"></h2>
<div class="grid-layout layout-full layout-tighter"><table>
<tr><td colspan="3"><input bind="regexInput" style="width: 100%;"/></td></tr>
<tr>
<td bind="regexSummary"></td>
<td width="1%"><button bind="selectRegexButton" class="button">Select</button></td>
<td width="1%"><button bind="unselectRegexButton" class="button">Unselect</button></td>
<td width="1%"><button bind="selectRegexButton" class="button"></button></td>
<td width="1%"><button bind="unselectRegexButton" class="button"></button></td>
</tr>
</table></div>
</div>

View File

@ -52,12 +52,25 @@ Refine.DefaultImportingController.prototype._disposeFileSelectionPanel = functio
};
Refine.DefaultImportingController.prototype._prepareFileSelectionPanel = function() {
var self = this;
var self = this;
this._fileSelectionPanel.unbind().empty().html(
DOM.loadHTML("core", "scripts/index/default-importing-controller/file-selection-panel.html"));
this._fileSelectionPanelElmts = DOM.bind(this._fileSelectionPanel);
$('#or-import-select').text($.i18n._('core-index-import')["select-file"]);
$('#or-import-severalFile').text($.i18n._('core-index-import')["several-file"]);
$('#or-import-selExt').text($.i18n._('core-index-import')["sel-by-extension"]);
$('#or-import-regex').text($.i18n._('core-index-import')["sel-by-regex"]);
this._fileSelectionPanelElmts.startOverButton.html($.i18n._('core-buttons')["startover"]);
this._fileSelectionPanelElmts.nextButton.html($.i18n._('core-buttons')["conf-pars-opt"]);
this._fileSelectionPanelElmts.selectAllButton.text($.i18n._('core-buttons')["select-all"]);
this._fileSelectionPanelElmts.unselectAllButton.text($.i18n._('core-buttons')["unselect-all"]);
this._fileSelectionPanelElmts.selectRegexButton.text($.i18n._('core-buttons')["select"]);
this._fileSelectionPanelElmts.unselectRegexButton.text($.i18n._('core-buttons')["unselect"]);
this._fileSelectionPanelElmts.startOverButton.click(function() {
self._startOver();
});
@ -97,7 +110,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelFileTable =
this._fileSelectionPanelElmts.filePanel.empty();
var fileTable = $('<table><tr><th>Import?</th><th>Name</th><th>Mime-type</th><th>Format</th><th>Size</th></tr></table>')
var fileTable = $('<table><tr><th>'+$.i18n._('core-index-import')["import"]+'</th><th>'+$.i18n._('core-index-import')["name"]+'</th><th>'+$.i18n._('core-index-import')["mime-type"]+'</th><th>'+$.i18n._('core-index-import')["format"]+'</th><th>'+$.i18n._('core-index-import')["size"]+'</th></tr></table>')
.appendTo(this._fileSelectionPanelElmts.filePanel)[0];
var round = function(n) {
@ -189,7 +202,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
$('<td>').text(extension.extension).appendTo(tr);
$('<td>').text(extension.count + (extension.count > 1 ? " files" : " file")).appendTo(tr);
$('<button>')
.text("Select")
.text($.i18n._('core-buttons')["select"])
.addClass("button")
.appendTo($('<td>').appendTo(tr))
.click(function() {
@ -207,7 +220,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
self._updateFileSelectionSummary();
});
$('<button>')
.text("Unselect")
.text($.i18n._('core-buttons')["unselect"])
.addClass("button")
.appendTo($('<td>').appendTo(tr))
.click(function() {
@ -309,12 +322,12 @@ Refine.DefaultImportingController.prototype._updateFileSelectionSummary = functi
Refine.DefaultImportingController.prototype._commitFileSelection = function() {
if (this._job.config.fileSelection.length === 0) {
alert("Please select at least one file.");
alert();
return;
}
var self = this;
var dismissBusy = DialogSystem.showBusy("Inspecting<br/>selected files ...");
var dismissBusy = DialogSystem.showBusy($.i18n._('core-index-import')["inspecting-files"]);
$.post(
"command/core/importing-controller?" + $.param({
"controller": "core/default-importing-controller",
@ -328,9 +341,9 @@ Refine.DefaultImportingController.prototype._commitFileSelection = function() {
dismissBusy();
if (!(data)) {
self._createProjectUI.showImportJobError("Unknown error");
self._createProjectUI.showImportJobError($.i18n._('core-index-import')["unknown-err"]);
} else if (data.code == "error" || !("job" in data)) {
self._createProjectUI.showImportJobError((data.message) ? ("Error: " + data.message) : "Unknown error");
self._createProjectUI.showImportJobError((data.message) ? ($.i18n._('core-index-import')["error"]+ ' ' + data.message) : $.i18n._('core-index-import')["unknown-err"]);
} else {
// Different files might be selected. We start over again.
delete this._parserOptions;

View File

@ -1,20 +1,20 @@
<div bind="wizardHeader" class="default-importing-wizard-header"><div class="grid-layout layout-tightest layout-full"><table><tr>
<td width="1%"><button bind="startOverButton" class="button">&laquo; Start Over</button></td>
<td width="1%"><button bind="previousButton" class="button">&laquo; Re-select Files</button></td>
<td width="98%">Configure Parsing Options</td>
<td style="text-align: right;">Project&nbsp;name</td>
<td width="1%"><button bind="startOverButton" class="button"></button></td>
<td width="1%"><button bind="previousButton" class="button"></button></td>
<td width="98%" id="or-import-parsopt"></td>
<td style="text-align: right;" id="or-import-projname"></td>
<td width="1%"><input class="inline" type="text" size="30" bind="projectNameInput" /></td>
<td width="1%"><button bind="nextButton" class="button button-primary">Create Project &raquo;</button></td>
<td width="1%"><button bind="nextButton" class="button button-primary"></button></td>
</tr></table></div></div>
<div bind="dataPanel" class="default-importing-parsing-data-panel"></div>
<div bind="progressPanel" class="default-importing-progress-data-panel">
<img src="images/large-spinner.gif" /> Updating preview ...
<img src="images/large-spinner.gif" /> <span id="or-import-updating"></span>
</div>
<div bind="controlPanel" class="default-importing-parsing-control-panel"><table><tr>
<td class="default-importing-parsing-control-panel-formats">
<div class="default-importing-parsing-control-panel-formats-message">Parse data as</div>
<div class="default-importing-parsing-control-panel-formats-message" id="or-import-parseas"></div>
<div bind="formatsContainer"></div>
</td>
<td bind="optionsContainer" class="default-importing-parsing-control-panel-options-panel"></td>

View File

@ -44,7 +44,7 @@ Refine.DefaultImportingController.prototype._showParsingPanel = function(hasFile
this._formatParserUI.dispose();
delete this._formatParserUI;
}
this._prepareParsingPanel();
this._parsingPanelElmts.nextButton.click(function() {
self._createProject();
@ -92,6 +92,13 @@ Refine.DefaultImportingController.prototype._prepareParsingPanel = function() {
});
this._parsingPanelElmts.progressPanel.hide();
this._parsingPanelElmts.startOverButton.html($.i18n._('core-buttons')["startover"]);
this._parsingPanelElmts.nextButton.html($.i18n._('core-buttons')["create-project"]);
$('#or-import-parsopt').text($.i18n._('core-index-import')["parsing-options"]);
$('#or-import-projname').text($.i18n._('core-index-import')["project-name"]);
$('#or-import-updating').text($.i18n._('core-index-import')["updating-preview"]);
$('#or-import-parseas').text($.i18n._('core-index-import')["parse-as"]);
this._parsingPanelResizer = function() {
var elmts = self._parsingPanelElmts;
var width = self._parsingPanel.width();

View File

@ -1,6 +1,6 @@
<form bind="form"><div class="grid-layout layout-normal"><table>
<tr><td>Paste data from clipboard here:</td></tr>
<tr><td id="or-import-clipboard"></td></tr>
<tr><td><textarea bind="textInput" name="clipboard" id="default-importing-clipboard-textarea"></textarea>
</td></tr>
<tr><td><button bind="nextButton" class="button button-primary" type="button">Next &raquo;</button></td></tr>
<tr><td><button bind="nextButton" class="button button-primary" type="button"></button></td></tr>
</table></div></form>

View File

@ -1,5 +1,5 @@
<form bind="form"><div class="grid-layout layout-normal"><table>
<tr><td>Locate one or more files on your computer to upload:</td></tr>
<tr><td id="or-import-locate"></td></tr>
<tr><td><input type="file" multiple bind="fileInput" name="upload" /></td></tr>
<tr><td><button bind="nextButton" class="button button-primary" type="button">Next &raquo;</button></td></tr>
<tr><td><button bind="nextButton" class="button button-primary" type="button"></button></td></tr>
</table></div></form>

View File

@ -1,8 +1,8 @@
<form bind="form"><div class="grid-layout layout-normal"><table>
<tr><td colspan="2">Enter one or more web addresses (URLs) pointing to data to download:</td></tr>
<tr><td colspan="2" id="or-import-enterurl"></td></tr>
<tr bind="urlRow"><td colspan="2"><input bind="urlInput" name="download" class="default-importing-web-url" /></td></tr>
<tr bind="buttons">
<td width="1"><button bind="addButton" class="button" type="button">Add Another URL</button></td>
<td><button bind="nextButton" class="button button-primary" type="button">Next &raquo;</button></td>
<td width="1"><button bind="addButton" class="button" type="button"></button></td>
<td><button bind="nextButton" class="button button-primary" type="button"></button></td>
</tr>
</table></div></form>

View File

@ -35,7 +35,7 @@ function ThisComputerImportingSourceUI(controller) {
this._controller = controller;
}
Refine.DefaultImportingController.sources.push({
"label": "This Computer",
"label": $.i18n._('core-index-import')["this-computer"],
"id": "upload",
"uiClass": ThisComputerImportingSourceUI
});
@ -46,11 +46,16 @@ ThisComputerImportingSourceUI.prototype.attachUI = function(bodyDiv) {
bodyDiv.html(DOM.loadHTML("core", "scripts/index/default-importing-sources/import-from-computer-form.html"));
this._elmts = DOM.bind(bodyDiv);
$('#or-import-locate').text($.i18n._('core-index-import')["locate-files"]);
$('#or-import-locate').text($.i18n._('core-index-import')["locate-files"]);
this._elmts.nextButton.html($.i18n._('core-buttons')["next"]);
this._elmts.nextButton.click(function(evt) {
if (self._elmts.fileInput[0].files.length === 0) {
window.alert("You must specify a data file to import.");
window.alert($.i18n._('core-index-import')["warning-data-file"]);
} else {
self._controller.startImportJob(self._elmts.form, "Uploading data ...");
self._controller.startImportJob(self._elmts.form, $.i18n._('core-index-import')["uploading-data"]);
}
});
};
@ -62,7 +67,7 @@ function UrlImportingSourceUI(controller) {
this._controller = controller;
}
Refine.DefaultImportingController.sources.push({
"label": "Web Addresses (URLs)",
"label": $.i18n._('core-index-import')["web-address"],
"id": "download",
"uiClass": UrlImportingSourceUI
});
@ -73,11 +78,16 @@ UrlImportingSourceUI.prototype.attachUI = function(bodyDiv) {
bodyDiv.html(DOM.loadHTML("core", "scripts/index/default-importing-sources/import-from-web-form.html"));
this._elmts = DOM.bind(bodyDiv);
$('#or-import-enterurl').text($.i18n._('core-index-import')["enter-url"]);
this._elmts.addButton.html($.i18n._('core-buttons')["add-url"]);
this._elmts.nextButton.html($.i18n._('core-buttons')["next"]);
this._elmts.nextButton.click(function(evt) {
if ($.trim(self._elmts.urlInput[0].value).length === 0) {
window.alert("You must specify a web address (URL) to import.");
window.alert($.i18n._('core-index-import')["warning-web-address"]);
} else {
self._controller.startImportJob(self._elmts.form, "Downloading data ...");
self._controller.startImportJob(self._elmts.form, $.i18n._('core-index-import')["downloading-data"]);
}
});
this._elmts.addButton.click(function(evt) {
@ -93,7 +103,7 @@ function ClipboardImportingSourceUI(controller) {
this._controller = controller;
}
Refine.DefaultImportingController.sources.push({
"label": "Clipboard",
"label": $.i18n._('core-index-import')["clipboard"],
"id": "clipboard",
"uiClass": ClipboardImportingSourceUI
});
@ -104,11 +114,15 @@ ClipboardImportingSourceUI.prototype.attachUI = function(bodyDiv) {
bodyDiv.html(DOM.loadHTML("core", "scripts/index/default-importing-sources/import-from-clipboard-form.html"));
this._elmts = DOM.bind(bodyDiv);
$('#or-import-clipboard').text($.i18n._('core-index-import')["clipboard-label"]);
this._elmts.nextButton.html($.i18n._('core-buttons')["next"]);
this._elmts.nextButton.click(function(evt) {
if ($.trim(self._elmts.textInput[0].value).length === 0) {
window.alert("You must paste some data to import.");
window.alert($.i18n._('core-index-import')["warning-clipboard"]);
} else {
self._controller.startImportJob(self._elmts.form, "Uploading pasted data ...");
self._controller.startImportJob(self._elmts.form, $.i18n._('core-index-import')["uploading-pasted-data"]);
}
});
};

View File

@ -1,17 +1,17 @@
<form id="project-upload-form" method="post" enctype="multipart/form-data" action="command/core/import-project" accept-charset="UTF-8">
<div class="grid-layout layout-normal"><table>
<tr>
<td colspan="2">Locate an existing Refine project file (.tar or .tar.gz):</td>
<td colspan="2" id="or-import-locate"></td>
<tr>
<td>Project file:</th>
<td id="or-import-file"></th>
<td><input type="file" id="project-tar-file-input" name="project-file" /></td>
</tr>
<tr>
<td>Re-name project (optional):</th>
<td id="or-import-rename"></th>
<td><input type="text" size="25" id="project-name-input" name="project-name" /></td></tr>
<tr>
<td></td>
<td><input type="submit" value="Import Project" id="import-project-button" class="button button-primary" /></td>
<td><input type="submit" id="import-project-button" class="button button-primary" /></td>
</tr>
</table></div>
</form>

View File

@ -36,11 +36,16 @@ Refine.ImportProjectUI = function(elmt) {
this._elmt = elmt;
this._elmts = DOM.bind(elmt);
$('#or-import-locate').text($.i18n._('core-index-import')["locate"]);
$('#or-import-file').text($.i18n._('core-index-import')["file"]);
$('#or-import-rename').text($.i18n._('core-index-import')["rename"]);
$('#import-project-button').attr("value",$.i18n._('core-buttons')["import-proj"]);
};
Refine.actionAreas.push({
id: "import-project",
label: "Import Project",
label: $.i18n._('core-index-import')["import-proj"],
uiClass: Refine.ImportProjectUI
});

View File

@ -1,4 +1,4 @@
<div class="relative-frame">
<div bind="projectsContainer" id="projects-container"></div>
<div bind="workspaceControls" id="projects-workspace-controls"><a id="projects-workspace-open" href="javascript:{}" class="secondary">Browse workspace directory</a></div>
<div bind="workspaceControls" id="projects-workspace-controls"><a id="projects-workspace-open" href="javascript:{}" class="secondary"></a></div>
</div>

View File

@ -57,6 +57,7 @@ Refine.OpenProjectUI = function(elmt) {
return self._onClickUploadFileButton(evt);
});
$('#projects-workspace-open').text($.i18n._('core-index-open')["browse"]);
$('#projects-workspace-open').click(function() {
$.ajax({
type: "POST",
@ -122,8 +123,8 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
'<table class="list-table"><tr>' +
'<th></th>' +
'<th></th>' +
'<th>Last&nbsp;modified</th>' +
'<th>Name</th>' +
'<th>'+$.i18n._('core-index-open')["last-mod"]+'</th>' +
'<th>'+$.i18n._('core-index-open')["name"]+'</th>' +
'</tr></table>'
).appendTo(container)[0];
@ -133,12 +134,12 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
var deleteLink = $('<a></a>')
.addClass("delete-project")
.attr("title","Delete this project")
.attr("title",$.i18n._('core-index-open')["del-title"])
.attr("href","")
.css("visibility", "hidden")
.html("<img src='images/close.png' />")
.click(function() {
if (window.confirm("Are you sure you want to delete project \"" + project.name + "\"?")) {
if (window.confirm($.i18n._('core-index-open')["del-body"] + project.name + "\"?")) {
$.ajax({
type: "POST",
url: "command/core/delete-project",
@ -162,7 +163,7 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
.attr("href", "javascript:{}")
.css("visibility", "hidden")
.click(function() {
var name = window.prompt("New project name:", project.name);
var name = window.prompt($.i18n._('core-index-open')["new-title"], project.name);
if (name === null) {
return;
}
@ -181,7 +182,7 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
if (data && typeof data.code != 'undefined' && data.code == "ok") {
nameLink.text(name);
} else {
alert("Failed to rename project: " + data.message);
alert($.i18n._('core-index-open')["warning-rename"]+" " + data.message);
}
}
});
@ -220,10 +221,10 @@ Refine.OpenProjectUI.prototype._onClickUploadFileButton = function(evt) {
var projectName = $("#project-name-input")[0].value;
var dataURL = $.trim($("#project-url-input")[0].value);
if (! $.trim(projectName).length) {
window.alert("You must specify a project name.");
window.alert($.i18n._('core-index-open')["warning-proj-name"]);
} else if ($("#project-file-input")[0].files.length === 0 && ! dataURL.length) {
window.alert("You must specify a data file to upload or a URL to retrieve.");
window.alert($.i18n._('core-index-open')["warning-data-file"]);
} else {
$("#file-upload-form").attr("action",
@ -248,6 +249,6 @@ Refine.OpenProjectUI.prototype._onClickUploadFileButton = function(evt) {
Refine.actionAreas.push({
id: "open-project",
label: "Open Project",
label: $.i18n._('core-index-open')["open-proj"],
uiClass: Refine.OpenProjectUI
});

View File

@ -4,42 +4,42 @@
<td><div class="grid-layout layout-tighter layout-full"><table>
<tr>
<td style="text-align: right;">&nbsp;</td>
<td width="1%"><button class="button" bind="previewButton">Update&nbsp;Preview</button></td>
<td width="1%"><button class="button" bind="previewButton"></button></td>
</tr>
</table></div></td>
</tr>
<tr>
<td><div class="grid-layout layout-tightest"><table bind="sheetRecordContainer">
<tr><td colspan="3">Worksheets to Import</td></tr>
<tr><td colspan="3" id="or-import-worksheet"></td></tr>
</table></div></td>
<td><div class="grid-layout layout-tightest"><table>
<tr>
<td width="1%"><input type="checkbox" bind="ignoreCheckbox" id="$ignore" /></td>
<td><label for="$ignore">Ignore first</label></td>
<td><label for="$ignore" id="or-import-ignore"></label></td>
<td><input bind="ignoreInput" type="text" class="lightweight" size="2" value="0" />
<label for="$ignore">line(s) at beginning of file</label></td></tr>
<label for="$ignore" id="or-import-lines"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="headerLinesCheckbox" id="$headers" /></td>
<td><label for="$headers">Parse next</label></td>
<td><label for="$headers" id="or-import-parse"></label></td>
<td><input bind="headerLinesInput" type="text" class="lightweight" size="2" value="1" />
<label for="$headers">line(s) as column headers</label></td></tr>
<label for="$headers" id="or-import-header"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="skipCheckbox" id="$skip" /></td>
<td><label for="$skip">Discard initial</label></td>
<td><label for="$skip" id="or-import-discard"></label></td>
<td><input bind="skipInput" type="text" class="lightweight" size="2" value="0" />
<label for="$skip">row(s) of data</label></td></tr>
<label for="$skip" id="or-import-rows"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="limitCheckbox" id="$limit" /></td>
<td><label for="$limit">Load at most</label></td>
<td><label for="$limit" id="or-import-load"></label></td>
<td><input bind="limitInput" type="text" class="lightweight" size="2" value="0" />
<label for="$limit">row(s) of data</label></td></tr>
<label for="$limit" id="or-import-rows2"></label></td></tr>
</table></div></td>
<td><div class="grid-layout layout-tightest"><table>
<tr><td width="1%"><input type="checkbox" bind="storeBlankRowsCheckbox" id="$store-blank-rows" /></td>
<td colspan="2"><label for="$store-blank-rows">Store blank rows</label></td></tr>
<td colspan="2"><label for="$store-blank-rows" id="or-import-blank"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="storeBlankCellsAsNullsCheckbox" id="$store-blank-cells" /></td>
<td colspan="2"><label for="$store-blank-cells">Store blank cells as nulls</label></td></tr>
<td colspan="2"><label for="$store-blank-cells" id="or-import-null"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="includeFileSourcesCheckbox" id="$include-file-sources" /></td>
<td><label for="$include-file-sources">Store file source<br/>(file names, URLs)<br/>in each row</label></td></tr>
<td><label for="$include-file-sources" id="or-import-source"></label></td></tr>
</table></div></td>
</tr>
</table></div>

View File

@ -118,6 +118,20 @@ Refine.ExcelParserUI.prototype._initialize = function() {
DOM.loadHTML("core", "scripts/index/parser-interfaces/excel-parser-ui.html"));
this._optionContainerElmts = DOM.bind(this._optionContainer);
this._optionContainerElmts.previewButton.click(function() { self._updatePreview(); });
this._optionContainerElmts.previewButton.html($.i18n._('core-buttons')["update-preview"]);
$('#or-import-worksheet').text($.i18n._('core-index-import')["import-worksheet"]);
$('#or-import-ignore').text($.i18n._('core-index-parser')["ignore-first"]);
$('#or-import-lines').text($.i18n._('core-index-parser')["lines-beg"]);
$('#or-import-parse').text($.i18n._('core-index-parser')["parse-next"]);
$('#or-import-header').text($.i18n._('core-index-parser')["lines-header"]);
$('#or-import-discard').text($.i18n._('core-index-parser')["discard-initial"]);
$('#or-import-rows').text($.i18n._('core-index-parser')["rows-data"]);
$('#or-import-load').text($.i18n._('core-index-parser')["load-at-most"]);
$('#or-import-rows2').text($.i18n._('core-index-parser')["rows-data"]);
$('#or-import-blank').text($.i18n._('core-index-parser')["store-blank"]);
$('#or-import-null').text($.i18n._('core-index-parser')["store-nulls"]);
$('#or-import-source').html($.i18n._('core-index-parser')["store-source"]);
var sheetTable = this._optionContainerElmts.sheetRecordContainer[0];
$.each(this._config.sheetRecords, function(i, v) {

View File

@ -2,52 +2,52 @@
<tr>
<td><div class="grid-layout layout-tighter"><table>
<tr>
<td width="1%">Character&nbsp;encoding</td>
<td width="1%" id="or-import-encoding"></td>
<td><input bind="encodingInput"></input></td>
</tr>
</table></div></td>
<td><div class="grid-layout layout-tighter layout-full"><table>
<tr>
<td style="text-align: right;">&nbsp;</td>
<td width="1%"><button class="button" bind="previewButton">Update&nbsp;Preview</button></td>
<td width="1%"><button class="button" bind="previewButton"></button></td>
</tr>
</table></div></td>
</tr>
<tr>
<td colspan="2"><div class="grid-layout layout-tightest"><table>
<tr><td>Column widths:</td><td><input style="width: 40em;" bind="columnWidthsInput" /></td><td>comma separated numbers</td></tr>
<tr><td>Column names:</td><td><input style="width: 40em;" bind="columnNamesInput" /></td><td>optional, comma separated</td></tr>
<tr><td id="or-import-columnWidth"></td><td><input style="width: 40em;" bind="columnWidthsInput" /></td><td id="or-import-comma"></td></tr>
<tr><td id="or-import-columnNames"></td><td><input style="width: 40em;" bind="columnNamesInput" /></td><td id="or-import-optional"></td></tr>
</table></div></td>
</tr>
<tr>
<td><div class="grid-layout layout-tightest"><table>
<tr><td width="1%"><input type="checkbox" bind="ignoreCheckbox" id="$ignore" /></td>
<td><label for="$ignore">Ignore first</label></td>
<td><label for="$ignore" id="or-import-ignore"></label></td>
<td><input bind="ignoreInput" type="text" class="lightweight" size="2" value="0" />
<label for="$ignore">line(s) at beginning of file</label></td></tr>
<label for="$ignore" id="or-import-lines"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="headerLinesCheckbox" id="$headers" /></td>
<td><label for="$headers">Parse next</label></td>
<td><label for="$headers" id="or-import-parse"></label></td>
<td><input bind="headerLinesInput" type="text" class="lightweight" size="2" value="1" />
<label for="$headers">line(s) as column headers</label></td></tr>
<label for="$headers" id="or-import-header"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="skipCheckbox" id="$skip" /></td>
<td><label for="$skip">Discard initial</label></td>
<td><label for="$skip" id="or-import-discard"></label></td>
<td><input bind="skipInput" type="text" class="lightweight" size="2" value="0" />
<label for="$skip">row(s) of data</label></td></tr>
<label for="$skip" id="or-import-rows"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="limitCheckbox" id="$limit" /></td>
<td><label for="$limit">Load at most</label></td>
<td><label for="$limit" id="or-import-load"></label></td>
<td><input bind="limitInput" type="text" class="lightweight" size="2" value="0" />
<label for="$limit">row(s) of data</label></td></tr>
<label for="$limit" id="or-import-rows2"></label></td></tr>
</table></div></td>
<td><div class="grid-layout layout-tightest"><table>
<tr><td width="1%"><input type="checkbox" bind="guessCellValueTypesCheckbox" id="$guess" /></td>
<td><label for="$guess">Parse cell text into<br/>numbers, dates, ...</label></td></tr>
<td><label for="$guess" id="or-import-parseCell"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="storeBlankRowsCheckbox" id="$store-blank-rows" /></td>
<td colspan="2"><label for="$store-blank-rows">Store blank rows</label></td></tr>
<td colspan="2"><label for="$store-blank-rows" id="or-import-blank"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="storeBlankCellsAsNullsCheckbox" id="$store-blank-cells" /></td>
<td colspan="2"><label for="$store-blank-cells">Store blank cells as nulls</label></td></tr>
<td colspan="2"><label for="$store-blank-cells" id="or-import-null"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="includeFileSourcesCheckbox" id="$include-file-sources" /></td>
<td><label for="$include-file-sources">Store file source<br/>(file names, URLs)<br/>in each row</label></td></tr>
<td><label for="$include-file-sources" id="or-import-source"></label></td></tr>
</table></div></td>
</tr>
</table></div>

View File

@ -121,6 +121,26 @@ Refine.FixedWidthParserUI.prototype._initialize = function() {
this._optionContainerElmts = DOM.bind(this._optionContainer);
this._optionContainerElmts.previewButton.click(function() { self.updatePreview(); });
this._optionContainerElmts.previewButton.html($.i18n._('core-buttons')["update-preview"]);
$('#or-import-encoding').html($.i18n._('core-index-import')["char-encoding"]);
$('#or-import-columnWidth').text($.i18n._('core-index-import')["column-widths"]);
$('#or-import-columnNames').text($.i18n._('core-index-import')["column-names"]);
$('#or-import-comma').text($.i18n._('core-index-import')["comma-separated"]);
$('#or-import-optional').text($.i18n._('core-index-import')["optional-separated"]);
$('#or-import-ignore').text($.i18n._('core-index-parser')["ignore-first"]);
$('#or-import-lines').text($.i18n._('core-index-parser')["lines-beg"]);
$('#or-import-parse').text($.i18n._('core-index-parser')["parse-next"]);
$('#or-import-header').text($.i18n._('core-index-parser')["lines-header"]);
$('#or-import-discard').text($.i18n._('core-index-parser')["discard-initial"]);
$('#or-import-rows').text($.i18n._('core-index-parser')["rows-data"]);
$('#or-import-load').text($.i18n._('core-index-parser')["load-at-most"]);
$('#or-import-rows2').text($.i18n._('core-index-parser')["rows-data"]);
$('#or-import-parseCell').html($.i18n._('core-index-parser')["parse-cell"]);
$('#or-import-blank').text($.i18n._('core-index-parser')["store-blank"]);
$('#or-import-null').text($.i18n._('core-index-parser')["store-nulls"]);
$('#or-import-source').html($.i18n._('core-index-parser')["store-source"]);
this._optionContainerElmts.encodingInput
.attr('value', this._config.encoding || '')
.click(function() {

View File

@ -1,4 +1,2 @@
<div class="json-parser-ui-select-message">
Click on the first JSON { } node corresponding to the first record to load.
</div>
<div class="json-parser-ui-select-message" id="or-import-jsonParser"></div>
<div class="json-parser-ui-select-dom" bind="domContainer"></div>

View File

@ -3,25 +3,25 @@
<td colspan="2"><div class="grid-layout layout-tighter layout-full"><table>
<tr>
<td style="text-align: right;">&nbsp;</td>
<td width="1%"><button class="button" bind="pickRecordElementsButton">Pick Record Nodes</button></td>
<td width="1%"><button class="button" bind="previewButton">Update Preview</button></td>
<td width="1%"><button class="button" bind="pickRecordElementsButton"></button></td>
<td width="1%"><button class="button" bind="previewButton"></button></td>
</tr>
</table></div></td>
</tr>
<tr>
<td><div class="grid-layout layout-tightest"><table>
<tr><td width="1%"><input type="checkbox" bind="limitCheckbox" id="$limit" /></td>
<td><label for="$limit">Load at most</label></td>
<td><label for="$limit" id="or-import-load"></label></td>
<td><input bind="limitInput" type="text" class="lightweight" size="2" value="0" />
<label for="$limit">record(s) of data</label></td></tr>
<label for="$limit" id="or-import-rows"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="storeEmptyStringsCheckbox" id="$store-empty-strings" value=true/></td>
<td colspan="2"><label for="$store-empty-strings">Preserve empty strings</label></td></tr>
<td colspan="2"><label for="$store-empty-strings" id="or-import-preserve"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="trimStringsCheckbox" id="$trim" /></td>
<td><label for="$guess">Trim leading &amp; trailing whitespace from strings</label></td></tr>
<td><label for="$guess" id="or-import-trim"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="guessCellValueTypesCheckbox" id="$guess" /></td>
<td><label for="$guess">Parse cell text into<br/>numbers, dates, ...</label></td></tr>
<td><label for="$guess" id="or-import-parseCell"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="includeFileSourcesCheckbox" id="$include-file-sources" /></td>
<td colspan="2"><label for="$include-file-sources">Store file source (file names, URLs) in each row</label></td></tr>
<td colspan="2"><label for="$include-file-sources" id="or-import-source"></label></td></tr>
</table></div></td>
</tr>
</table></div>

View File

@ -61,7 +61,7 @@ Refine.JsonParserUI.prototype.confirmReadyToCreateProject = function() {
if ((this._config.recordPath) && this._config.recordPath.length > 0) {
return true;
} else {
window.alert('Please specify a record path first.');
window.alert($.i18n._('core-index-import')["warning-record-path"]);
}
};
@ -104,6 +104,16 @@ Refine.JsonParserUI.prototype._initialize = function() {
this._optionContainerElmts = DOM.bind(this._optionContainer);
this._optionContainerElmts.previewButton.click(function() { self._updatePreview(); });
this._optionContainerElmts.pickRecordElementsButton.text($.i18n._('core-index-import')["warning-record-path"]);
this._optionContainerElmts.previewButton.text($.i18n._('core-buttons')["update-preview"]);
$('#or-import-load').text($.i18n._('core-index-parser')["load-at-most"]);
$('#or-import-rows2').text($.i18n._('core-index-parser')["rows-data"]);
$('#or-import-preserve').text($.i18n._('core-index-parser')["preserve-empty"]);
$('#or-import-trim').html($.i18n._('core-index-parser')["trim"]);
$('#or-import-parseCell').html($.i18n._('core-index-parser')["parse-cell"]);
$('#or-import-source').html($.i18n._('core-index-parser')["store-source"]);
$('#or-import-jsonParser').text($.i18n._('core-index-parser')["json-parser"]);
if (this._config.limit > 0) {
this._optionContainerElmts.limitCheckbox.attr("checked", "checked");
this._optionContainerElmts.limitInput[0].value = this._config.limit.toString();

View File

@ -2,44 +2,44 @@
<tr>
<td><div class="grid-layout layout-tighter"><table>
<tr>
<td width="1%">Character&nbsp;encoding</td>
<td width="1%" id="or-import-encoding"></td>
<td><input bind="encodingInput"></input></td>
</tr>
</table></div></td>
<td><div class="grid-layout layout-tighter layout-full"><table>
<tr>
<td style="text-align: right;">&nbsp;</td>
<td width="1%"><button class="button" bind="previewButton">Update&nbsp;Preview</button></td>
<td width="1%"><button class="button" bind="previewButton"></button></td>
</tr>
</table></div></td>
</tr>
<tr>
<td><div class="grid-layout layout-tightest"><table>
<tr><td colspan="2">Parse every <input bind="linesPerRowInput" type="text" class="lightweight" size="2" value="0" />
lines into one row
<tr><td colspan="2"><span id="or-import-parseEvery"></span> <input bind="linesPerRowInput" type="text" class="lightweight" size="2" value="0" />
<span id="or-impor-linesIntoRow"></span>
</td></tr>
<tr><td width="1%"><input type="checkbox" bind="storeBlankRowsCheckbox" id="$store-blank-rows" /></td>
<td colspan="2"><label for="$store-blank-rows">Store blank rows</label></td></tr>
<td colspan="2"><label for="$store-blank-rows" id="or-import-blank"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="storeBlankCellsAsNullsCheckbox" id="$store-blank-cells" /></td>
<td colspan="2"><label for="$store-blank-cells">Store blank cells as nulls</label></td></tr>
<td colspan="2"><label for="$store-blank-cells" id="or-import-null"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="includeFileSourcesCheckbox" id="$include-file-sources" /></td>
<td><label for="$include-file-sources">Store file source<br/>(file names, URLs)<br/>in each row</label></td></tr>
<td><label for="$include-file-sources" id="or-import-source"></label></td></tr>
</table></div></td>
<td><div class="grid-layout layout-tightest"><table>
<tr><td width="1%"><input type="checkbox" bind="ignoreCheckbox" id="$ignore" /></td>
<td><label for="$ignore">Ignore first</label></td>
<td><label for="$ignore" id="or-import-ignore"></label></td>
<td><input bind="ignoreInput" type="text" class="lightweight" size="2" value="0" />
<label for="$ignore">line(s) at beginning of file</label></td></tr>
<label for="$ignore" id="or-import-lines"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="skipCheckbox" id="$skip" /></td>
<td><label for="$skip">Discard initial</label></td>
<td><label for="$skip" id="or-import-discard"></label></td>
<td><input bind="skipInput" type="text" class="lightweight" size="2" value="0" />
<label for="$skip">row(s) of data</label></td></tr>
<label for="$skip" id="or-import-rows"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="limitCheckbox" id="$limit" /></td>
<td><label for="$limit">Load at most</label></td>
<td><label for="$limit" id="or-import-load"></label></td>
<td><input bind="limitInput" type="text" class="lightweight" size="2" value="0" />
<label for="$limit">row(s) of data</label></td></tr>
<label for="$limit" id="or-import-rows2"></label></td></tr>
</table></div></td>
</tr>
</table></div>

View File

@ -110,6 +110,22 @@ Refine.LineBasedParserUI.prototype._initialize = function() {
this._optionContainerElmts = DOM.bind(this._optionContainer);
this._optionContainerElmts.previewButton.click(function() { self._updatePreview(); });
$('#or-import-encoding').html($.i18n._('core-index-import')["char-encoding"]);
this._optionContainerElmts.previewButton.html($.i18n._('core-buttons')["update-preview"]);
$('#or-import-parseEvery').html($.i18n._('core-index-parser')["parse-every"]);
$('#or-impor-linesIntoRow').html($.i18n._('core-index-parser')["lines-into-row"]);
$('#or-import-blank').text($.i18n._('core-index-parser')["store-blank"]);
$('#or-import-null').text($.i18n._('core-index-parser')["store-nulls"]);
$('#or-import-source').html($.i18n._('core-index-parser')["store-source"]);
$('#or-import-ignore').text($.i18n._('core-index-parser')["ignore-first"]);
$('#or-import-lines').text($.i18n._('core-index-parser')["lines-beg"]);
$('#or-import-parse').text($.i18n._('core-index-parser')["parse-next"]);
$('#or-import-header').text($.i18n._('core-index-parser')["lines-header"]);
$('#or-import-discard').text($.i18n._('core-index-parser')["discard-initial"]);
$('#or-import-rows').text($.i18n._('core-index-parser')["rows-data"]);
$('#or-import-load').text($.i18n._('core-index-parser')["load-at-most"]);
$('#or-import-rows2').text($.i18n._('core-index-parser')["rows-data"]);
this._optionContainerElmts.encodingInput
.attr('value', this._config.encoding || '')
.click(function() {

View File

@ -2,14 +2,14 @@
<tr>
<td><div class="grid-layout layout-tighter"><table>
<tr>
<td width="1%">Character&nbsp;encoding</td>
<td width="1%" id="or-import-encoding"></td>
<td><input bind="encodingInput"></input></td>
</tr>
</table></div></td>
<td colspan="2"><div class="grid-layout layout-tighter layout-full"><table>
<tr>
<td style="text-align: right;">&nbsp;</td>
<td width="1%"><button class="button" bind="previewButton">Update&nbsp;Preview</button></td>
<td width="1%"><button class="button" bind="previewButton"></button></td>
</tr>
</table></div></td>
</tr>

View File

@ -75,6 +75,9 @@ Refine.RdfTriplesParserUI.prototype._initialize = function() {
DOM.loadHTML("core", "scripts/index/parser-interfaces/rdf-triples-parser-ui.html"));
this._optionContainerElmts = DOM.bind(this._optionContainer);
this._optionContainerElmts.previewButton.click(function() { self._updatePreview(); });
this._optionContainerElmts.previewButton.html($.i18n._('core-buttons')["update-preview"]);
$('#or-import-encoding').html($.i18n._('core-index-import')["char-encoding"]);
this._optionContainerElmts.encodingInput
.attr('value', this._config.encoding || '')

View File

@ -2,50 +2,50 @@
<tr>
<td><div class="grid-layout layout-tighter"><table>
<tr>
<td width="1%">Character&nbsp;encoding</td>
<td width="1%" id="or-import-encoding"></td>
<td><input bind="encodingInput"></input></td>
</tr>
</table></div></td>
<td colspan="2"><div class="grid-layout layout-tighter layout-full"><table>
<tr>
<td style="text-align: right;">&nbsp;</td>
<td width="1%"><button class="button" bind="previewButton">Update&nbsp;Preview</button></td>
<td width="1%"><button class="button" bind="previewButton"></button></td>
</tr>
</table></div></td>
</tr>
<tr>
<td><div class="grid-layout layout-tightest"><table>
<tr><td colspan="2">Columns are separated by</td></tr>
<tr><td colspan="2" id="or-import-colsep"></td></tr>
<tr><td width="1%"><input type="radio" name="column-separator" value="comma" id="$column-separator-comma" /></td>
<td><label for="$column-separator-comma">commas (CSV)</label></td></tr>
<td><label for="$column-separator-comma" id="or-import-commas"></label></td></tr>
<tr><td width="1%"><input type="radio" name="column-separator" value="tab" id="$column-separator-tab" /></td>
<td><label for="$column-separator-tab">tabs (TSV)</label></td></tr>
<td><label for="$column-separator-tab" id="or-import-tabs"></label></td></tr>
<tr><td width="1%"><input type="radio" name="column-separator" value="custom" id="$column-separator-custom" /></td>
<td><label for="$column-separator-custom">custom</label>
<td><label for="$column-separator-custom" id="or-import-custom"></label>
<input bind="columnSeparatorInput" type="text" class="lightweight" size="5" /></td></tr>
<tr><td colspan="2">Escape special characters with \</td></tr>
<tr><td colspan="2" id="or-import-escape"></td></tr>
</table></div></td>
<td colspan="2"><div class="grid-layout layout-tightest"><table>
<tr><td width="1%"><input type="checkbox" bind="ignoreCheckbox" id="$ignore" /></td>
<td><label for="$ignore">Ignore first</label></td>
<td><label for="$ignore" id="or-import-ignore"></label></td>
<td><input bind="ignoreInput" type="text" class="lightweight" size="2" value="0" />
<label for="$ignore">line(s) at beginning of file</label></td></tr>
<label for="$ignore" id="or-import-lines"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="headerLinesCheckbox" id="$headers" /></td>
<td><label for="$headers">Parse next</label></td>
<td><label for="$headers" id="or-import-parse"></label></td>
<td><input bind="headerLinesInput" type="text" class="lightweight" size="2" value="1" />
<label for="$headers">line(s) as column headers</label></td></tr>
<label for="$headers" id="or-import-header"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="skipCheckbox" id="$skip" /></td>
<td><label for="$skip">Discard initial</label></td>
<td><label for="$skip" id="or-import-discard"></label></td>
<td><input bind="skipInput" type="text" class="lightweight" size="2" value="0" />
<label for="$skip">row(s) of data</label></td></tr>
<label for="$skip" id="or-import-rows"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="limitCheckbox" id="$limit" /></td>
<td><label for="$limit">Load at most</label></td>
<td><label for="$limit" id="or-import-load"></label></td>
<td><input bind="limitInput" type="text" class="lightweight" size="2" value="0" />
<label for="$limit">row(s) of data</label></td></tr>
<label for="$limit" id="or-import-rows2"></label></td></tr>
</table></div></td>
</tr>
<tr>
@ -53,20 +53,20 @@
<td><div class="grid-layout layout-tightest"><table>
<tr><td width="1%"><input type="checkbox" bind="guessCellValueTypesCheckbox" id="$guess" /></td>
<td><label for="$guess">Parse cell text into<br/>numbers, dates, ...</label></td></tr>
<td><label for="$guess" id="or-import-parseCell"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="processQuoteMarksCheckbox" id="$quotes" /></td>
<td><label for="$quotes">Quotation marks are used<br/>to enclose cells containing<br/>column separators</label></td></tr>
<td><label for="$quotes" id="or-import-quote"></label></td></tr>
</table></div></td>
<td><div class="grid-layout layout-tightest"><table>
<tr><td width="1%"><input type="checkbox" bind="storeBlankRowsCheckbox" id="$store-blank-rows" /></td>
<td colspan="2"><label for="$store-blank-rows">Store blank rows</label></td></tr>
<td colspan="2"><label for="$store-blank-rows" id="or-import-blank"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="storeBlankCellsAsNullsCheckbox" id="$store-blank-cells" /></td>
<td colspan="2"><label for="$store-blank-cells">Store blank cells as nulls</label></td></tr>
<td colspan="2"><label for="$store-blank-cells" id="or-import-null"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="includeFileSourcesCheckbox" id="$include-file-sources" /></td>
<td><label for="$include-file-sources">Store file source<br/>(file names, URLs)<br/>in each row</label></td></tr>
<td><label for="$include-file-sources" id="or-import-source"></label></td></tr>
</table></div></td>
</tr>
</table></div>

View File

@ -125,6 +125,28 @@ Refine.SeparatorBasedParserUI.prototype._initialize = function() {
DOM.loadHTML("core", "scripts/index/parser-interfaces/separator-based-parser-ui.html"));
this._optionContainerElmts = DOM.bind(this._optionContainer);
this._optionContainerElmts.previewButton.click(function() { self._updatePreview(); });
this._optionContainerElmts.previewButton.html($.i18n._('core-buttons')["update-preview"]);
$('#or-import-encoding').html($.i18n._('core-index-import')["char-encoding"]);
$('#or-import-colsep').html($.i18n._('core-index-parser')["col-separated-by"]);
$('#or-import-commas').html($.i18n._('core-index-parser')["commas"]);
$('#or-import-tabs').html($.i18n._('core-index-parser')["tabs"]);
$('#or-import-custom').html($.i18n._('core-index-parser')["custom"]);
$('#or-import-escape').html($.i18n._('core-index-parser')["escape"]);
$('#or-import-ignore').text($.i18n._('core-index-parser')["ignore-first"]);
$('#or-import-lines').text($.i18n._('core-index-parser')["lines-beg"]);
$('#or-import-parse').text($.i18n._('core-index-parser')["parse-next"]);
$('#or-import-header').text($.i18n._('core-index-parser')["lines-header"]);
$('#or-import-discard').text($.i18n._('core-index-parser')["discard-initial"]);
$('#or-import-rows').text($.i18n._('core-index-parser')["rows-data"]);
$('#or-import-load').text($.i18n._('core-index-parser')["load-at-most"]);
$('#or-import-rows2').text($.i18n._('core-index-parser')["rows-data"]);
$('#or-import-parseCell').html($.i18n._('core-index-parser')["parse-cell"]);
$('#or-import-quote').html($.i18n._('core-index-parser')["quotation-mark"]);
$('#or-import-blank').text($.i18n._('core-index-parser')["store-blank"]);
$('#or-import-null').text($.i18n._('core-index-parser')["store-nulls"]);
$('#or-import-source').html($.i18n._('core-index-parser')["store-source"]);
this._optionContainerElmts.encodingInput
.attr('value', this._config.encoding || '')

View File

@ -1,4 +1,4 @@
<div class="xml-parser-ui-select-message">
Click on the first XML element corresponding to the first record to load.
<span id="or-import-clickXML"></span>
</div>
<div class="xml-parser-ui-select-dom" bind="domContainer"></div>

View File

@ -3,26 +3,26 @@
<td colspan="2"><div class="grid-layout layout-tighter layout-full"><table>
<tr>
<td style="text-align: right;">&nbsp;</td>
<td width="1%"><button class="button" bind="pickRecordElementsButton">Pick Record Elements</button></td>
<td width="1%"><button class="button" bind="previewButton">Update Preview</button></td>
<td width="1%"><button class="button" bind="pickRecordElementsButton"></button></td>
<td width="1%"><button class="button" bind="previewButton"></button></td>
</tr>
</table></div></td>
</tr>
<tr>
<td><div class="grid-layout layout-tightest"><table>
<tr><td width="1%"><input type="checkbox" bind="limitCheckbox" id="$limit" /></td>
<td><label for="$limit">Load at most</label></td>
<td><label for="$limit" id="or-import-load"></label></td>
<td><input bind="limitInput" type="text" class="lightweight" size="2" value="0" />
<label for="$limit">record(s) of data</label></td></tr>
<label for="$limit" id="or-import-rows"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="storeEmptyStringsCheckbox" id="$store-empty-strings" /></td>
<td colspan="2"><label for="$store-empty-strings">Preserve empty strings</label></td></tr>
<td colspan="2"><label for="$store-empty-strings" id="or-import-preserve"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="trimStringsCheckbox" id="$trim" /></td>
<td><label for="$guess">Trim leading &amp; trailing whitespace from strings</label></td></tr>
<td><label for="$guess" id="or-import-trim"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="guessCellValueTypesCheckbox" id="$guess" /></td>
<td><label for="$guess">Parse cell text into<br/>numbers, dates, ...</label></td></tr>
<td><label for="$guess" id="or-import-parseCell"></label></td></tr>
<tr><td width="1%"><input type="checkbox" bind="includeFileSourcesCheckbox" id="$include-file-sources" /></td>
<td colspan="2"><label for="$include-file-sources">Store file source (file names, URLs) in each row</label></td></tr>
<td colspan="2"><label for="$include-file-sources" id="or-import-store"></label></td></tr>
</table></div></td>
</tr>
</table></div>

View File

@ -61,7 +61,7 @@ Refine.XmlParserUI.prototype.confirmReadyToCreateProject = function() {
if ((this._config.recordPath) && this._config.recordPath.length > 0) {
return true;
} else {
window.alert('Please specify a record path first.');
window.alert($.i18n._('core-index-import')["warning-record-path"]);
}
};
@ -102,6 +102,15 @@ Refine.XmlParserUI.prototype._initialize = function() {
this._optionContainerElmts = DOM.bind(this._optionContainer);
this._optionContainerElmts.previewButton.click(function() { self._updatePreview(); });
this._optionContainerElmts.pickRecordElementsButton.html($.i18n._('core-buttons')["pick-record"]);
this._optionContainerElmts.previewButton.html($.i18n._('core-buttons')["update-preview"]);
$('#or-import-rows').text($.i18n._('core-index-parser')["rows-data"]);
$('#or-import-load').text($.i18n._('core-index-parser')["load-at-most"]);
$('#or-import-preserve').text($.i18n._('core-index-parser')["preserve-empty"]);
$('#or-import-trim').text($.i18n._('core-index-parser')["trim"]);
$('#or-import-parseCell').text($.i18n._('core-index-parser')["parse-cell"]);
$('#or-import-store').text($.i18n._('core-index-parser')["store-source"]);
if (this._config.limit > 0) {
this._optionContainerElmts.limitCheckbox.attr("checked", "checked");
this._optionContainerElmts.limitInput[0].value = this._config.limit.toString();
@ -135,6 +144,8 @@ Refine.XmlParserUI.prototype._showPickRecordElementsUI = function() {
this._dataContainer.unbind().empty().html(
DOM.loadHTML("core", "scripts/index/parser-interfaces/xml-parser-select-ui.html"));
$('#or-import-clickXML').text($.i18n._('core-index-parser')["click-xml"]);
var elmts = DOM.bind(this._dataContainer);
var escapeElmt = $('<span>');

View File

@ -1,11 +1,11 @@
<div class="dialog-frame" style="width: 600px;">
<div class="dialog-border">
<div class="dialog-header" bind="dialogHeader">Select Encoding</div>
<div class="dialog-header" bind="dialogHeader"></div>
<div class="dialog-body" bind="dialogBody">
<div id="select-encodings-tabs" class="refine-tabs">
<ul>
<li><a href="#select-encodings-tabs-common">Common Encodings</a></li>
<li><a href="#select-encodings-tabs-all">All Encodings</a></li>
<li><a href="#select-encodings-tabs-common" id="or-enc-common"></a></li>
<li><a href="#select-encodings-tabs-all" id="or-enc-all"></a></li>
</ul>
<div id="select-encodings-tabs-common">
<div class="select-encoding-dialog-encoding-list" bind="commonList"></div>
@ -16,7 +16,7 @@
</div>
</div>
<div class="dialog-footer" bind="dialogFooter">
<button class="button" bind="cancelButton">Cancel</button>
<button class="button" bind="cancelButton"></button>
</div>
</div>
</div>

View File

@ -44,8 +44,8 @@ function PreferenceUI(tr, key, value) {
var td2 = tr.insertCell(2);
$('<button class="button">').text("Edit").appendTo(td2).click(function() {
var newValue = window.prompt("Change value of preference key " + key, value);
$('<button class="button">').text($.i18n._('core-index')["edit"]).appendTo(td2).click(function() {
var newValue = window.prompt($.i18n._('core-index')["change-value"]+" " + key, value);
if (newValue !== null) {
$(td1).text(newValue);
$.post(
@ -64,8 +64,8 @@ function PreferenceUI(tr, key, value) {
}
});
$('<button class="button">').text("Delete").appendTo(td2).click(function() {
if (window.confirm("Delete preference key " + key + "?")) {
$('<button class="button">').text($.i18n._('core-index')["delete"]).appendTo(td2).click(function() {
if (window.confirm($.i18n._('core-index')["delete-key"]+" " + key + "?")) {
$.post(
"command/core/set-preference",
{
@ -94,12 +94,12 @@ function PreferenceUI(tr, key, value) {
function populatePreferences(prefs) {
var body = $("#body-info").empty();
$('<h1>').text("Preferences").appendTo(body);
$('<h1>').text($.i18n._('core-index')["preferences"]).appendTo(body);
var table = $('<table>')
.addClass("list-table")
.addClass("preferences")
.html('<tr><th>Key</th><th>Value</th><th></th></tr>')
.html('<tr><th>'+$.i18n._('core-index')["key"]+'</th><th>'+$.i18n._('core-index')["value"]+'</th><th></th></tr>')
.appendTo(body)[0];
for (var k in prefs) {
@ -111,10 +111,10 @@ function populatePreferences(prefs) {
var tdLast0 = trLast.insertCell(0);
trLast.insertCell(1);
trLast.insertCell(2);
$('<button class="button">').text("Add Preference").appendTo(tdLast0).click(function() {
var key = window.prompt("Preference key:");
$('<button class="button">').text().appendTo(tdLast0).click(function() {
var key = window.prompt($.i18n._('core-index')["add-pref"]);
if (key) {
var value = window.prompt("Preference key value:");
var value = window.prompt($.i18n._('core-index')["pref-key"]);
if (value !== null) {
var tr = table.insertRow(table.rows.length - 1);
preferenceUIs.push(new PreferenceUI(tr, key, value));

View File

@ -183,7 +183,7 @@ Refine.reinitializeProjectData = function(f, fError) {
};
Refine._renameProject = function() {
var name = window.prompt("New project name:", theProject.metadata.name);
var name = window.prompt($.i18n._('core-index')["new-proj-name"], theProject.metadata.name);
if (name === null) {
return;
}
@ -203,7 +203,7 @@ Refine._renameProject = function() {
theProject.metadata.name = name;
Refine.setTitle();
} else {
alert("Failed to rename project: " + data.message);
alert($.i18n._('core-index')["error-rename"]+" " + data.message);
}
}
});

View File

@ -42,6 +42,11 @@ Encoding.selectEncoding = function(input, onDone) {
$("#select-encodings-tabs").tabs({ selected: 0 });
$("#select-encodings-tabs-all").css("display", "");
elmts.dialogHeader.text($.i18n._('core-util-enc')["select-enc"]);
elmts.cancelButton.text($.i18n._('core-buttons')["cancel"]);
$('#or-enc-common').text($.i18n._('core-util-enc')["common"]);
$('#or-enc-all').text($.i18n._('core-util-enc')["all"]);
var pickEncoding = function(encoding) {
input[0].value = encoding.code;
DialogSystem.dismissUntil(level - 1);
@ -62,7 +67,7 @@ Encoding.selectEncoding = function(input, onDone) {
$(tr.insertCell(1)).text(encoding.aliases.join(', '));
};
var generateEncodingList = function(container, filter) {
var table = $('<table>').html('<tr><th>Encoding</th><th>Aliases</th></tr>').appendTo(container)[0];
var table = $('<table>').html('<tr><th>'+$.i18n._('core-util-enc')["encoding"]+'</th><th>'+$.i18n._('core-util-enc')["aliases"]+'</th></tr>').appendTo(container)[0];
$.each(Refine.encodings, function() {
if (filter === null || this.code in filter) {
renderEncoding(table, this);

View File

@ -0,0 +1,140 @@
{
"core-index": {
"version": "Version",
"new-version": "New version!",
"download": "Download",
"now": "now",
"change-value": "Change value of preference key",
"delete-key": "Delete preference key",
"preferences": "Preferences",
"key": "Key",
"value": "Value",
"add-pref": "Add Preference",
"pref-key": "Preference key value:",
"edit": "Edit",
"delete": "Delete",
"new-proj-name": "New project name:",
"error-rename": "Failed to rename project:"
},
"core-index-create": {
"create-proj": "Create Project",
"starting": "Starting",
"done": "Done.",
"min-remaining": "minutes remaining",
"sec-remaining": "seconds remaining",
"almost-done": "almost done ...",
"memory-usage": "Memory usage:",
"no-details": "No technical details.",
"question": "Create a project by importing data. What kinds of data files can I import?",
"formats": "TSV, CSV, *SV, Excel (.xls and .xlsx), JSON, XML, RDF as XML, and Google Data documents are all supported. Support for other formats can be added with OpenRefine extensions.",
"from": "Get data from"
},
"core-index-import": {
"import-proj": "Import Project",
"locate": "Locate an existing Refine project file (.tar or .tar.gz):",
"file": "Project file:",
"rename": "Re-name project (optional):",
"inspecting": "Inspecting selected files ...",
"warning-name": "Please name the project.",
"errors": "Errors:",
"creating-proj": "Creating project ...",
"import": "Import?",
"name": "Name",
"mime-type": "Mime-type",
"format": "Format",
"size": "Size",
"warning-select": "Please select at least one file.",
"inspecting-files": "Inspecting<br/>selected files ...",
"unknown-err": "Unknown error",
"error": "Error:",
"select-file": "Select Files to Import",
"several-file": "There are several files available. Please select the ones to import.",
"sel-by-extension": "Select by Extension",
"sel-by-regex": "Select by Regex on File Names",
"parsing-options": "Configure Parsing Options",
"project-name": "Project&nbsp;name",
"updating-preview": "Updating preview ...",
"parse-as": "Parse data as",
"this-computer": "This Computer",
"warning-data-file": "You must specify a data file to import.",
"uploading-data": "Uploading data ...",
"web-address": "Web Addresses (URLs)",
"warning-web-address": "You must specify a web address (URL) to import.",
"downloading-data": "Downloading data ...",
"clipboard": "Clipboard",
"warning-clipboard": "You must paste some data to import.",
"uploading-pasted-data": "Uploading pasted data ...",
"locate-files": "Locate one or more files on your computer to upload:",
"enter-url": "Enter one or more web addresses (URLs) pointing to data to download:",
"clipboard-label": "Paste data from clipboard here:",
"import-worksheet": "Worksheets to Import",
"column-widths": "Column widths:",
"column-names": "Column names:",
"comma-separated": "comma separated numbers",
"optional-separated": "optional, comma separated",
"warning-record-path": "Please specify a record path first.",
"pick-nodes": "Pick Record Nodes",
"char-encoding": "Character&nbsp;encoding"
},
"core-index-open": {
"open-proj" : "Open Project",
"name": "Name",
"last-mod": "Last&nbsp;modified",
"del-title": "Delete this project",
"del-body": "Are you sure you want to delete project \"",
"new-title": "New project name:",
"warning-rename": "Failed to rename project:",
"warning-proj-name": "You must specify a project name.",
"warning-data-file": "You must specify a data file to upload or a URL to retrieve.",
"browse": "Browse workspace directory"
},
"core-index-parser":{
"ignore-first": "Ignore first",
"lines-beg": "line(s) at beginning of file",
"parse-next": "Parse next",
"lines-header": "line(s) as column headers",
"discard-initial": "Discard initial",
"rows-data": "row(s) of data",
"load-at-most": "Load at most",
"parse-cell": "Parse cell text into<br/>numbers, dates, ...",
"store-blank": "Store blank rows",
"store-nulls": "Store blank cells as nulls",
"store-source": "Store file source <br/>(file names, URLs)<br/>in each row",
"preserve-empty": "Preserve empty strings",
"trim": "Trim leading &amp; trailing whitespace from strings",
"json-parser": "Click on the first JSON { } node corresponding to the first record to load.",
"parse-every": "Parse every",
"lines-into-row": "lines into one row",
"col-separated-by": "Columns are separated by",
"commas": "commas (CSV)",
"tabs": "tabs (TSV)",
"custom": "custom",
"escape": "Escape special characters with \\",
"quotation-mark": "Quotation marks are used<br/>to enclose cells containing<br/>column separators",
"click-xml": "Click on the first XML element corresponding to the first record to load."
},
"core-util-enc": {
"select-enc": "Select Encoding",
"common": "Common Encodings",
"all": "All Encodings",
"encoding": "Encoding",
"aliases": "Aliases"
},
"core-buttons": {
"cancel": "Cancel",
"ok": "OK",
"import-proj": "Import Project",
"select-all": "Select All",
"unselect-all": "Unselect All",
"select": "Select",
"unselect": "Unselect",
"startover": "&laquo; Start Over",
"conf-pars-opt": "Configure Parsing Options &raquo;",
"reselect-files": "&laquo; Re-select Files",
"create-project": "Create Project &raquo;",
"next": "Next &raquo;",
"add-url": "Add Another URL",
"update-preview": "Update&nbsp;Preview",
"pick-record": "Pick Record Elements"
}
}