Merge pull request #10 from OpenRefine/master

Merge master
This commit is contained in:
Fabio 2014-07-04 11:34:09 +02:00
commit 4dd3282728
28 changed files with 11271 additions and 111 deletions

2
.gitignore vendored
View File

@ -1,5 +1,6 @@
*~
\#*#
.*.swp
*.DS_Store
*.class
.com.apple.timemachine.supported
@ -23,3 +24,4 @@ broker/core/data/
broker/core/test-output/
tmp/
/test-output
/bin

View File

@ -1,6 +1,6 @@
#OpenRefine
[![Build Status](https://travis-ci.org/OpenRefine/OpenRefine.png?branch=master)](https://travis-ci.org/OpenRefine/OpenRefine)
[![Build Status](https://travis-ci.org/OpenRefine/OpenRefine.png?branch=master)](https://travis-ci.org/OpenRefine/OpenRefine) [![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=32795)](https://www.bountysource.com/trackers/32795-open-refine?utm_source=32795&utm_medium=shield&utm_campaign=TRACKER_BADGE)
OpenRefine is a power tool that allows you to load data, understand it,
clean it up, reconcile it to master database, and augment it with data coming from

View File

@ -173,7 +173,7 @@
<taskdef resource="testngtasks" classpath="${server.tests.lib.dir}/testng-6.8.jar"/>
<mkdir dir="${build.dir}/server_tests"/>
<target name="server_test" depends="build_tests">
<testng verbose="5" haltOnFailure="true" workingdir="${build.dir}/server_tests"
<testng verbose="2" haltOnFailure="true" workingdir="${build.dir}/server_tests"
listener="org.testng.reporters.DotTestListener" excludedgroups="broken"
classpathref="tests.class.path">
<xmlfileset file="${server.tests.dir}/conf/tests.xml"/>

View File

@ -3,7 +3,7 @@
<div class="dialog-body" bind="dialogBody">
<div bind="unalignedCase" style="display: none;" class="freebase-loading-tripleloader-message">
<h2 bind="no_triples_dataset"></h2>
<p bind="warning_aligned"><button class="button" bind="alignButton"></button></p>
<p bind="warning_aligned"></p><button class="button" bind="alignButton"></button>
</div>
<div bind="functionalCase" style="display: none;">
<div class="refine-tabs" bind="functionalTabs">
@ -64,4 +64,4 @@
<button class="button button-primary button-disabled" bind="loadButton" id="freebase-loading-load" disabled></button>
</td>
</tr></table></div></div>
</div>
</div>

View File

@ -58,31 +58,45 @@ public class Phonetic implements Function {
@Override
public Object call(Properties bindings, Object[] args) {
if (args.length == 2) {
String str;
if (args.length > 0 && args[0] != null) {
Object o1 = args[0];
str = (o1 instanceof String) ? (String) o1 : o1.toString();
} else {
return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects at least one argument");
}
String encoding = "metaphone3";
if (args.length > 1) {
Object o2 = args[1];
if (o1 != null && o2 != null && o2 instanceof String) {
String str = (o1 instanceof String) ? (String) o1 : o1.toString();
String encoding = ((String) o2).toLowerCase();
if (encoding == null) {
encoding = "metaphone3";
}
if ("doublemetaphone".equalsIgnoreCase(encoding)) {
return metaphone2.key(str);
} else if ("metaphone3".equalsIgnoreCase(encoding)) {
return metaphone3.key(str);
} else if ("metaphone".equalsIgnoreCase(encoding)) {
return metaphone.key(str);
} else if ("soundex".equalsIgnoreCase(encoding)) {
return soundex.key(str);
} else if ("cologne".equalsIgnoreCase(encoding)) {
return cologne.key(str);
if (o2 != null) {
if (o2 instanceof String) {
encoding = ((String) o2).toLowerCase();
} else {
return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " doesn't know how to handle the '" + encoding + "' encoding.");
return new EvalError(ControlFunctionRegistry.getFunctionName(this)
+ " expects a string for the second argument");
}
}
}
return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects 3 strings");
if (args.length < 3) {
if ("doublemetaphone".equalsIgnoreCase(encoding)) {
return metaphone2.key(str);
} else if ("metaphone3".equalsIgnoreCase(encoding)) {
return metaphone3.key(str);
} else if ("metaphone".equalsIgnoreCase(encoding)) {
return metaphone.key(str);
} else if ("soundex".equalsIgnoreCase(encoding)) {
return soundex.key(str);
} else if ("cologne".equalsIgnoreCase(encoding)) {
return cologne.key(str);
} else {
return new EvalError(ControlFunctionRegistry.getFunctionName(this)
+ " doesn't know how to handle the '"
+ encoding + "' encoding.");
}
} else {
return new EvalError(ControlFunctionRegistry.getFunctionName(this)
+ " expects one or two string arguments");
}
}
@Override

View File

@ -76,6 +76,8 @@ public class ImportingJob implements Jsonizable {
JSONUtilities.safePut(cfg, "hasData", false);
this.config = cfg;
lastTouched = System.currentTimeMillis();
dir.mkdirs();
}

View File

@ -86,7 +86,10 @@ public class ImportingManager {
static private RefineServlet servlet;
static private File importDir;
final static private Map<Long, ImportingJob> jobs = Collections.synchronizedMap(new HashMap<Long, ImportingJob>());
static private long jobIdCounter = 0;
final static private Object jobIdLock = new Object();
// Mapping from format to label, e.g., "text" to "Text files", "text/xml" to "XML files"
final static public Map<String, Format> formatToRecord = new HashMap<String, Format>();
@ -187,7 +190,19 @@ public class ImportingManager {
}
static public ImportingJob createJob() {
long id = System.currentTimeMillis() + (long) (Math.random() * 1000000);
long id;
synchronized(jobIdLock) {
++jobIdCounter;
// Avoid negative job id's when the counter wraps around.
if (jobIdCounter < 0) {
jobIdCounter = 1;
}
id = jobIdCounter;
}
File jobDir = new File(getImportDir(), Long.toString(id));
ImportingJob job = new ImportingJob(id, jobDir);

View File

@ -33,6 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package com.google.refine.process;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
@ -45,7 +46,7 @@ import com.google.refine.history.HistoryEntry;
import com.google.refine.history.HistoryProcess;
public class ProcessManager implements Jsonizable {
protected List<Process> _processes = new LinkedList<Process>();
protected List<Process> _processes = Collections.synchronizedList(new LinkedList<Process>());
protected List<Exception> _latestExceptions = null;
public ProcessManager() {
@ -58,8 +59,10 @@ public class ProcessManager implements Jsonizable {
writer.object();
writer.key("processes"); writer.array();
for (Process p : _processes) {
p.write(writer, options);
synchronized (_processes) {
for (Process p : _processes) {
p.write(writer, options);
}
}
writer.endArray();

View File

@ -54,7 +54,14 @@ import org.json.JSONTokener;
public class ParsingUtilities {
static final public SimpleDateFormat ISO8601_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
static final private ThreadLocal<SimpleDateFormat> ISO8601_FORMAT = new ThreadLocal<SimpleDateFormat>() {
@Override
protected SimpleDateFormat initialValue() {
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
}
};
static public Properties parseUrlParameters(HttpServletRequest request) {
Properties options = new Properties();
@ -167,7 +174,7 @@ public class ParsingUtilities {
* @return string with ISO 8601 formatted date & time
*/
static public String dateToString(Date d) {
return ISO8601_FORMAT.format(d);
return ISO8601_FORMAT.get().format(d);
}
/**
@ -178,7 +185,7 @@ public class ParsingUtilities {
*/
static public Date stringToDate(String s) {
try {
return ISO8601_FORMAT.parse(s);
return ISO8601_FORMAT.get().parse(s);
} catch (ParseException e) {
return null;
}

View File

@ -0,0 +1,169 @@
/*
Copyright 2010, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.google.refine.operations.cell;
import static org.mockito.Mockito.mock;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import org.json.JSONObject;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import com.google.refine.ProjectManager;
import com.google.refine.ProjectMetadata;
import com.google.refine.RefineServlet;
import com.google.refine.history.HistoryEntry;
import com.google.refine.importers.SeparatorBasedImporter;
import com.google.refine.importing.ImportingJob;
import com.google.refine.importing.ImportingManager;
import com.google.refine.model.AbstractOperation;
import com.google.refine.model.Project;
import com.google.refine.process.Process;
import com.google.refine.tests.ProjectManagerStub;
import com.google.refine.tests.RefineServletStub;
import com.google.refine.tests.RefineTest;
public class TransposeTests extends RefineTest {
@Override
@BeforeTest
public void init() {
logger = LoggerFactory.getLogger(this.getClass());
}
// dependencies
RefineServlet servlet;
Project project;
ProjectMetadata metadata;
ImportingJob job;
JSONObject options;
SeparatorBasedImporter importer;
@BeforeMethod
public void SetUp() {
servlet = new RefineServletStub();
ProjectManager.singleton = new ProjectManagerStub();
ImportingManager.initialize(servlet);
project = new Project();
metadata = new ProjectMetadata();
job = ImportingManager.createJob();
options = mock(JSONObject.class);
importer = new SeparatorBasedImporter();
}
@AfterMethod
public void TearDown() {
ImportingManager.disposeJob(job.id);
ProjectManager.singleton.deleteProject(project.id);
job = null;
metadata = null;
project = null;
options = null;
importer = null;
}
@Test
public void keyValueComumnize() throws Exception {
String input = "ID;Cat;Val\n"
+ "1;a;1\n"
+ "1;b;3\n"
+ "2;b;4\n"
+ "2;c;5\n"
+ "3;a;2\n"
+ "3;b;5\n"
+ "3;d;3\n";
prepareOptions(";", -1, 0, 0, 1, false, false);
List<Exception> exceptions = new ArrayList<Exception>();
importer.parseOneFile(project, metadata, job, "filesource", new StringReader(input), -1, options, exceptions);
project.update();
ProjectManager.singleton.registerProject(project, metadata);
AbstractOperation op = new KeyValueColumnizeOperation(
"Cat", "Val", null);
Process process = op.createProcess(project, new Properties());
HistoryEntry historyEntry = process.performImmediate();
// Expected output
// ID;a;b;c;d
// 1;1;3;;
// 2;;4;5;
// 3;2;5;;3
Assert.assertEquals(project.columnModel.columns.size(), 5);
Assert.assertEquals(project.columnModel.columns.get(0).getName(), "ID");
Assert.assertEquals(project.columnModel.columns.get(1).getName(), "a");
Assert.assertEquals(project.columnModel.columns.get(2).getName(), "b");
Assert.assertEquals(project.columnModel.columns.get(3).getName(), "c");
Assert.assertEquals(project.columnModel.columns.get(4).getName(), "d");
Assert.assertEquals(project.rows.size(), 3);
Assert.assertEquals(project.rows.get(0).cells.size(), 5);
Assert.assertEquals(project.rows.get(1).cells.size(), 5);
Assert.assertEquals(project.rows.get(2).cells.size(), 5);
Assert.assertEquals(project.rows.get(0).cells.get(0).value, "data1");
Assert.assertEquals(project.rows.get(0).cells.get(1).value, "data2");
Assert.assertEquals(project.rows.get(0).cells.get(2).value, "data3");
}
private void prepareOptions(
String sep, int limit, int skip, int ignoreLines,
int headerLines, boolean guessValueType, boolean ignoreQuotes) {
whenGetStringOption("separator", options, sep);
whenGetIntegerOption("limit", options, limit);
whenGetIntegerOption("skipDataLines", options, skip);
whenGetIntegerOption("ignoreLines", options, ignoreLines);
whenGetIntegerOption("headerLines", options, headerLines);
whenGetBooleanOption("guessCellValueTypes", options, guessValueType);
whenGetBooleanOption("processQuotes", options, !ignoreQuotes);
whenGetBooleanOption("storeBlankCellsAsNulls", options, true);
}
}

View File

@ -306,15 +306,12 @@ function init() {
module,
[
"externals/jquery-1.9.1.js",
"externals/jquery-1.11.1.js",
"externals/jquery-migrate-1.2.1.js",
"externals/jquery.cookie.js",
"externals/jquery-ui/jquery-ui-1.10.3.custom.js",
"externals/date.js",
"externals/jquery.i18n.js",
"externals/CFInstall.min.js",
"scripts/chrome-frame.js",
"scripts/util/misc.js",
"scripts/util/url.js",
@ -381,7 +378,7 @@ function init() {
"project/scripts",
module,
[
"externals/jquery-1.9.1.js",
"externals/jquery-1.11.1.js",
"externals/jquery-migrate-1.2.1.js",
"externals/jquery.cookie.js",
"externals/suggest/suggest-4_3.js",
@ -391,9 +388,6 @@ function init() {
"externals/jquery.i18n.js",
"externals/underscore-min.js",
"externals/CFInstall.min.js",
"scripts/chrome-frame.js",
"scripts/project.js",
"scripts/util/misc.js",
@ -489,7 +483,7 @@ function init() {
"preferences/scripts",
module,
[
"externals/jquery-1.9.1.js",
"externals/jquery-1.11.1.js",
"externals/jquery-migrate-1.2.1.js",
"externals/jquery.cookie.js",
"externals/suggest/suggest-4_3.js",

View File

@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>About - OpenRefine</title>
<link rel="icon" type="image/png" href="images/favicon.png">
<link rel="stylesheet" href="/styles/common.less" />
@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
</style>
<script type="text/javascript" src="scripts/version.js"></script>
<script type="text/javascript" src="externals/jquery-1.9.1.js"></script>
<script type="text/javascript" src="externals/jquery-1.11.1.js"></script>
<script>
$(function() {
if (OpenRefineVersion && OpenRefineVersion.version) {

View File

@ -35,7 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=8;IE=9;chrome=1;">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Error - OpenRefine</title>
<link rel="icon" type="image/png" href="images/favicon.png">
<link rel="stylesheet" href="styles/common.less" />

View File

@ -1,10 +0,0 @@
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function(e){if(!e.CFInstall){var f=function(a,b){return typeof a=="string"?(b||document).getElementById(a):a},h=function(){if(e.CFInstall._force)return e.CFInstall._forceValue;if(navigator.userAgent.toLowerCase().indexOf("chromeframe")>=0)return true;if(typeof window.ActiveXObject!="undefined")try{var a=new ActiveXObject("ChromeTab.ChromeFrame");if(a){a.registerBhoIfNeeded();return true}}catch(b){}return false},i=function(a){try{var b=document.createElement("style");b.setAttribute("type","text/css");
if(b.styleSheet)b.styleSheet.cssText=a;else b.appendChild(document.createTextNode(a));var c=document.getElementsByTagName("head")[0];c.insertBefore(b,c.firstChild)}catch(g){}},j=false,k=false,l=function(){if(!k){i(".chromeFrameOverlayContent { display: none; }.chromeFrameOverlayUnderlay { display: none; }");document.cookie="disableGCFCheck=1;path=/;max-age=31536000000";k=true}},m=function(a){var b=document.createElement("iframe");b.setAttribute("frameborder","0");b.setAttribute("border","0");var c=
f(a.node);b.id=a.id||(c?c.id||getUid(c):"");b.style.cssText=" "+(a.cssText||"");b.className=a.className||"";b.src=a.src||"about:blank";c&&c.parentNode.replaceChild(b,c);return b},n=function(a){a.className="chromeFrameInstallDefaultStyle "+(a.className||"");a=m(a);a.parentNode||document.body.insertBefore(a,document.body.firstChild)},o=function(a){if(!f("chromeFrameOverlayContent")){var b=document.createElement("span");b.innerHTML='<div class="chromeFrameOverlayUnderlay"></div><table class="chromeFrameOverlayContent"id="chromeFrameOverlayContent"cellpadding="0" cellspacing="0"><tr class="chromeFrameOverlayCloseBar"><td><button id="chromeFrameCloseButton">close</button></td></tr><tr><td id="chromeFrameIframeHolder"></td></tr></table>';
for(var c=document.body;b.firstChild;)c.insertBefore(b.lastChild,c.firstChild);a=m(a);f("chromeFrameIframeHolder").appendChild(a);f("chromeFrameCloseButton").onclick=l}},d={};d.check=function(a){a=a||{};var b=navigator.userAgent,c=/MSIE (\S+); Windows NT/,g=false;if(c.test(b)){if(parseFloat(c.exec(b)[1])<6&&b.indexOf("SV1")<0)g=true}else g=true;if(!g){if(!j){i('.chromeFrameInstallDefaultStyle {width: 800px;height: 600px;position: absolute;left: 50%;top: 50%;margin-left: -400px;margin-top: -300px;}.chromeFrameOverlayContent {position: absolute;margin-left: -400px;margin-top: -300px;left: 50%;top: 50%;border: 1px solid #93B4D9;background-color: white;z-index: 2001;}.chromeFrameOverlayContent iframe {width: 800px;height: 600px;border: none;}.chromeFrameOverlayCloseBar {height: 1em;text-align: right;background-color: #CADEF4;}.chromeFrameOverlayUnderlay {position: absolute;width: 100%;height: 100%;background-color: white;opacity: 0.5;-moz-opacity: 0.5;-webkit-opacity: 0.5;-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter: alpha(opacity=50);z-index: 2000;}');
j=true}document.cookie.indexOf("disableGCFCheck=1")>=0&&l();b=(document.location.protocol=="https:"?"https:":"http:")+"//www.google.com/chromeframe";if(!h()){a.onmissing&&a.onmissing();a.src=a.url||b;b=a.mode||"inline";if(!(a.preventPrompt||0))if(b=="inline")n(a);else b=="overlay"?o(a):window.open(a.src);if(!a.preventInstallDetection)var p=setInterval(function(){if(h()){a.oninstall&&a.oninstall();clearInterval(p);window.location=a.destination||window.location}},2E3)}}};d._force=false;d._forceValue=
false;d.isAvailable=h;e.CFInstall=d}})(this.ChromeFrameInstallScope||this);

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=8;IE=9;chrome=1;">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>OpenRefine</title>
<link rel="icon" type="image/png" href="images/favicon.png">
<script type="text/javascript" src="wirings.js"></script>

View File

@ -0,0 +1,670 @@
{
"name" : "简体中文",
"core-index": {
"slogan": "凌乱数据处理利器",
"help": "帮助",
"about": "关于",
"version": "版本",
"new-version": "新版本!",
"download": "下载",
"now": "现在",
"change-value": "修改配置项的值",
"delete-key": "删除这个配置项",
"preferences": "首选项",
"key": "键",
"value": "值",
"add-pref": "添加配置项",
"pref-key": "该配置项的值:",
"edit": "编辑",
"delete": "删除",
"new-proj-name": "项目新名称:",
"error-rename": "重命名项目失败:",
"no-proj": "没有已存在的项目.选择左侧的 '新建项目' 来创建一个新项目",
"try-these": "如果你暂时没有合适的数据,可以试试这些",
"sample-data": "示例数据集"
},
"core-index-create": {
"create-proj": "新建项目",
"starting": "启动中",
"done": "完成.",
"min-remaining": "分",
"sec-remaining": "秒 剩余",
"almost-done": "即将完成 ...",
"memory-usage": "内存占用:",
"no-details": "暂无更多技术细节.",
"question": "创建项目需要导入数据,那么可接受的数据格式是?",
"formats": "完美支持TSV, CSV, *SV, Excel (.xls and .xlsx), JSON, XML, RDF as XML, and Google Data documents这些格式. 此外的其他格式可以通过添加refine扩展来支持",
"from": "数据来源于"
},
"core-index-import": {
"import-proj": "导入项目",
"locate": "选择已存在的Refine项目文件 (.tar or .tar.gz):",
"file": "项目文件:",
"rename": "重命名项目 (可选):",
"inspecting": "正在检查所选的文件 ...",
"warning-name": "项目名称不能缺省.",
"errors": "错误:",
"creating-proj": "创建项目中 ...",
"import": "确认导入?",
"name": "名称",
"mime-type": "Mime-type",
"format": "格式",
"size": "大小",
"warning-select": "至少需要选择一个文件.",
"inspecting-files": "正在检查<br/>选中的文件们 ...",
"unknown-err": "位置的错误",
"error": "错误:",
"select-file": "选择要导入的文件",
"several-file": "有多个可用文件. 请选择要导入的文件.",
"sel-by-extension": "按扩展名选择",
"sel-by-regex": "选择名称符合正则的文件",
"parsing-options": "配置解析选项",
"project-name": "项目&nbsp;名称",
"updating-preview": "正在刷新预览 ...",
"parse-as": "数据解析格式",
"this-computer": "这台电脑",
"warning-data-file": "必须指定一个要导入的数据文件.",
"uploading-data": "上传数据中 ...",
"web-address": "网址 (URLs)",
"warning-web-address": "必须指定导入的数据来源网址.",
"downloading-data": "正在下载数据 ...",
"clipboard": "剪贴板",
"warning-clipboard": "粘贴数据不能为空.",
"uploading-pasted-data": "正在上传粘贴数据...",
"locate-files": "选择本机上要上传的一个或多个文件:",
"enter-url": "键入一个或多个要下载的数据来源网址URLS:",
"clipboard-label": "粘贴数据到这里:",
"import-worksheet": "导入的工作表",
"column-widths": "列宽:",
"column-names": "列名:",
"comma-separated": "逗号分隔的数字们",
"optional-separated": "可选,以逗号分隔",
"warning-record-path": "请首先指定一个记录路径.",
"pick-nodes": "摘选记录节点",
"char-encoding": "字符编码"
},
"core-index-open": {
"open-proj" : "打开项目",
"name": "项目名称",
"rename": "重命名",
"last-mod": "上次修改时间",
"del-title": "删除这个项目",
"del-body": "确认要删除项目\"",
"new-title": "项目新名称:",
"warning-rename": "重命名项目失败:",
"warning-proj-name": "项目名称不能为空.",
"warning-data-file": "必须指定一个要上传的数据文件或用于检索数据的URL.",
"browse": "查看工作空间目录"
},
"core-index-lang": {
"lang-settings": "语言设定",
"label": "选择首选语言",
"send-req": "修改语言",
"page-reload": "将会刷新页面来应用这些更改."
},
"core-index-parser":{
"ignore-first": "忽略文件首部的前",
"lines-beg": "行",
"parse-next": "将其次的下",
"lines-header": "line(s) 作为列头",
"discard-initial": "抛弃表格中的前",
"rows-data": "行",
"load-at-most": "最多加载",
"parse-cell": "将单元格中的<br/>文本解析<br/>为<br/>数字,日期,...",
"store-blank": "保留空白行",
"store-nulls": "将空白单元格作为nulls保留",
"store-source": "在每一行<br/>(文件名称, URLs)<br/>保留文件信息",
"preserve-empty": "保留空字符串",
"trim": "移除字符串首尾的空白",
"json-parser": "点击的第一个JSON { } 节点 对应于第一个要加载的数据记录.",
"parse-every": "将数据中的每",
"lines-into-row": "行解析为表格中的一行",
"col-separated-by": "数据中列的分隔方式",
"commas": "逗号 (CSV)",
"tabs": "制表符 (TSV)",
"custom": "自定义",
"escape": "特殊字符使用\\进行转义",
"quotation-mark": "引号被用来<br/>封装那些<br/>包含列分隔符<br/>的单元格内容",
"click-xml": "点击的第一个XML元素对应于第一个要加载的数据记录."
},
"core-dialogs": {
"cluster-edit": "簇集 & 编辑列",
"cluster-size": "簇大小",
"row-count": "行数",
"cluster-values": "簇中值",
"merge": "是否合并?",
"new-cell-val": "新的格子值",
"use-this-val": "使用这个值",
"browse-only-these": "仅查看这些值",
"browse-this-cluster": "查看这个簇",
"no-cluster-found": "选中的操作并没有生成簇",
"try-another-method": "请尝试上面的其他操作或者修改操作的参数",
"clustering": "簇集中... ",
"warning-check-boxes": "必须选中某些 `编辑?` 列的复选框来应用你的编辑 ",
"choices-in-cluster": "# 簇中的可选择数",
"rows-in-cluster": "# 簇中的行数",
"choice-avg-length": "选择的平均长度",
"choice-var-length": "选择的长度变化",
"found": "被发现",
"filtered-from": "筛选自<b>",
"from-total": "</b> 个中",
"cluster-descr": "This feature helps you find groups of different cell values that might be alternative representations of the same thing. For example, the two strings \"New York\" and \"new york\" are very likely to refer to the same concept and just have capitalization differences, and \"Gödel\" and \"Godel\" probably refer to the same person.",
"find-more": "查看更多信息 ...",
"method": "方法&nbsp;",
"key-collision": "关键词碰接",
"nearest-neighbor": "就近原则",
"keying-function": "关键词算法",
"fingerprint": "指纹分类算法",
"ngram": "ngram-指纹分类算法",
"metaphone": "metaphone3算法",
"phonetic": "cologne-phonetic算法",
"distance-fun": "距离算法",
"leven": "levenshtein算法",
"ppm" : "PPM算法",
"ngram-size": "Ngram&nbsp;大小&nbsp;",
"ngram-radius": "半径(距离)",
"block-chars": "块字符数",
"reorder-column": "重排 / 移除列",
"drag-column": "拖动列来重排序",
"drop-column": "将列丢到这里来移除",
"template-export": "导出模板",
"template-prefix": "前缀",
"template-rowt": "行模板",
"template-rows": "行分隔符",
"template-suffix": "后缀",
"idling": "空闲中...",
"updating": "正在更新...",
"scatterplot-matrix": "散点图矩阵",
"focusing-on": "focusing on",
"processing": "处理中...",
"error-getColumnInfo": "调用'get-columns-info'时发生异常",
"no-column-dataset": "此数据集中不包含列",
"linear-plot": "线性图",
"logarithmic-plot": "对数模型图",
"rotated-counter-clock": "逆时针旋转45°",
"no-rotation": "不旋转",
"rotated-clock": "顺时针旋转45°",
"small-dot": "小网点尺寸",
"regular-dot": "正常网点尺寸",
"big-dot": "大网点尺寸",
"cell-fields": "当前的单元格. 它包含如下字段:'value'和'recon'。",
"cell-value": "当前单元格的值. 它是cell.value的简写.",
"row-fields": "当前的行. 它包含以下5个字段: 'flagged', 'starred', 'index', 'cells'和'record'.",
"cells-of-row": "当前行中的单元格们. 它是row.cells的简写. 如果<column name>是一个字的话,那么可以通过'cells.<column name>'来使用它否则需要使用cells['<column name'>]",
"row-index": "当前行的索引. 它是'row.index'的简写.",
"returns": "returns",
"from": "From",
"expression": "表达式",
"reuse": "重用",
"remove": "移除",
"error": "错误",
"no-syntax-err": "没有语法错误",
"internal-err": "内部异常",
"language": "语言",
"preview": "预览",
"history": "历史",
"starred": "星标",
"help": "帮助",
"opt-code-applied": "成功应用配置项代码.",
"error-apply-code": "应用配置项代码时发生异常",
"custom-tab-exp": "自定义表格导出器",
"content": "内容",
"download": "下载",
"upload": "上传",
"opt-code": "配置项代码",
"sel-and-ord": "选择并排列表格用以导出",
"opt-for": "配置",
"for-recon-cell": "将搭配后的单元格输出",
"match-ent-name": "相匹配的实体名称",
"cell-content": "单元格内容",
"match-ent-id": "相匹配的实体ID",
"link-match": "链接值匹配的实体",
"out-not-unmatch": "不输出不匹配的单元格",
"date-format": "对于日期/时间类型,使用该格式",
"date-iso": "ISO 8601, 如, 2011-08-24T18:36:10+08:00",
"short-format": "本地化短格式",
"medium-format": "本地化普通格式",
"long-format": "本地化长格式",
"full-format": "本地化完整格式",
"custom": "自定义",
"local-time": "使用本地时区",
"omit-time": "略过时间",
"out-col-header": "输出列头",
"out-empty-row": "输出空白行 (如所有单元格为null的行)",
"ignore-facets": "忽略所有归类、筛选,导出所有行",
"line-based": "基于行的文本格式",
"other-format": "其他格式",
"tsv": "Tab分隔值 (TSV)",
"csv": "逗号分隔值 (CSV)",
"custom-separator": "自定义分隔符",
"excel": "Excel (.xls)",
"excel-xml": "Excel in XML (.xlsx)",
"html-table": "HTML 表格",
"char-enc": "字符编码",
"line-sep": "行分隔符",
"upload-to": "上传至",
"json-text": "你在其他选项卡中所设置的配置项会被编码为下面的JSON文本你可以将他复制出来然后存储以备将来可以将其粘贴来重用这些配置项."
},
"core-facets": {
"remove-facet": "移除这个归类",
"reset": "重置",
"invert": "反转",
"change": "修改",
"click-to-edit": "点击编辑表达式",
"sort-by": "排序,按照",
"name": "名称",
"count": "数量",
"cluster": "簇集",
"current-exp": "当前表达式",
"facet-choices": "将归类信息作为用tab分隔的值",
"loading": "载入中...",
"too-many-choices": "个归类, 过多难以展现",
"set-choice-count": "限制归类数量",
"edit": "编辑",
"facet-by-count": "按归类中量来归类",
"edit-based-col": "编辑归类的表达式来作用于列",
"edit-facet-exp": "编辑归类的表达式",
"set-max-choices": "设置各个文本归类中要显示的归类最大数量(太多的归类会导致程序运行缓慢)",
"case-sensitive": "大小写敏感",
"regular-exp": "正则表达式",
"time": "时间",
"non-time": "非时间",
"blank": "空白",
"error": "错误",
"unknown-error": "未知错误",
"linear-plot": "线性图",
"linear-plot-abbr": "lin",
"logar-plot": "对数模型图",
"logar-plot-abbr": "log",
"rotated-counter-clock": "逆时针旋转45°",
"no-rotation": "不旋转",
"rotated-clock": "顺时针旋转45°",
"small-dot": "小网点尺寸",
"regular-dot": "正常网点尺寸",
"big-dot": "大网点尺寸",
"export-plot": "导出网点",
"numeric": "数值型"
},
"core-project": {
"open": "打开",
"permalink": "永久地址",
"export": "导出",
"help": "帮助",
"starting": "启动",
"facet-filter": "归类 / 过滤器",
"undo-redo": "撤销 / 重做",
"extensions": "扩展",
"proj-name": "单击以重命名",
"use-facets": "使用归类和过滤器",
"use-to-select": "使用归类和筛选器来选择要操作的数据子集。可以在每个数据列头来选择归类或筛选方式.",
"not-sure": "不知从何下手?",
"watch-cast": "可以观看这些演示",
"refreshing-facet": "正在刷新归类...",
"update-facets": "更新所有归类",
"clear-selection": "清空所有归类中的选择",
"remove-all": "移除所有归类",
"export-project": "导出项目",
"tab-value": "以tab分隔的值",
"comma-sep": "以逗号分隔的值",
"html-table": "HTML表格",
"excel": "Excel",
"odf": "ODF 电子表格",
"triple-loader": "Triple loader",
"mqlwrite": "MQLWrite",
"custom-tabular": "自定义表格导出器...",
"templating": "正在生成模板...",
"warning-align": "You haven't done any schema alignment yet,\n so there is no triple to export.\n\n Use the Freebase > Edit Schema Alignment Skeleton...\n command to align your data with Freebase schemas first.",
"json-invalid": "贴入的JSON不正确",
"undo-history": "无尽的撤销历史",
"mistakes": "不要怕出错。你所做的所有更爱都会展示此,并且你可以随时撤销这些更改.",
"learn-more": "了解更多 &raquo;",
"apply": "应用&hellip;",
"extract": "提取&hellip;",
"filter": "过滤器:",
"extract-history": "提取历史操作记录",
"extract-save": "将你的历史操作提取并保存为JSON格式以便将来可以应用于此或其他项目.",
"apply-operation": "应用这些历史操作",
"paste-json": "将之前提取出的JSON格式的历史操作记录粘贴于此执行:",
"complete": "完成",
"other-processes": "其他进程正在进行中",
"other-process": "其他进程正在进行中",
"cancel-all": "全部取消",
"cancel": "取消",
"canceling": "正在取消...",
"last-op-er": "之前的操作发生异常",
"continue-remaining": "继续剩下的操作",
"undo": "撤销"
},
"core-recon": {
"access": "访问",
"service-api": "服务API",
"cell-type": "将各个单元格搭配到下列类型的一个实例上",
"col-detail": "同时使用其他列中的相关信息",
"against-type": "使用后面的类型",
"no-type": "不指定,任意匹配",
"auto-match": "自动匹配高质量的候选类型",
"warning-type-sugg": "抱歉未能为你的数据找到相应的类型请指定Sorry, we can't suggest any type for your data. Please specify a type yourself below.",
"column": "列",
"include": "包含在内",
"as-property": "作为属性",
"contact-service": "正在访问搭配服务",
"error-contact": "在访问搭配服务时出现异常",
"fb-recon": "基于query的Freebase搭配",
"recon-col": "搭配列",
"pick-service": "在左侧选择一个服务或扩展",
"add-recon-srv": "添加具命名空间的搭配服务",
"namespace": "命名空间",
"ent-type": "实体类型 (可选)",
"add-std-srv": "添加标准搭配服务",
"enter-url": "键入一个服务的URL",
"specify-ns": "请指定一个命名空间.",
"cell-contains": "各个包含以下内容的单元格:",
"fb-id": "a Freebase ID, e.g., /en/solar_system",
"fb-guid": "a Freebase GUID, e.g., #9202a8c04000641f80000000000354ae",
"fb-key": "a Freebase key in",
"fb-en-ns": "英文维基命名空间",
"this-ns": "该命名空间:",
"max-candidates" : "最大候选服务返回数量",
"service-title": "Services"
},
"core-util-enc": {
"select-enc": "选择编码",
"common": "常用编码",
"all": "所有编码",
"encoding": "编码名称",
"aliases": "编码别名",
"today": "今天",
"yesterday": "昨天",
"days-ago": "天前",
"week-ago": "1周前",
"weeks-ago": "周前",
"month-ago": "1个月前",
"months-ago": "个月前",
"year-ago": "1年前",
"years-ago": "年前",
"working": "工作副本",
"invalid-date": "日期字符串格式错误"
},
"core-views": {
"edit-cell": "编辑这个单元格",
"choose-match": "选择新的匹配",
"match-all-cells": "",
"match-this-cell": "搭配这个主题和此单元格",
"create-topic-cells": "为该单元格及与其相同的单元格创建主题",
"create-topic-cell": "为这个单元格创建新主题",
"create-topic": "创建新主题",
"search-match": "检索以匹配",
"not-valid-number": "非法的数值.",
"not-valid-date": "非法的日期值.",
"match-this": "只匹配这个单元格",
"match-other": "匹配其他具有相同内容的单元格",
"search-for": "搜索",
"match-cell": "匹配这个单元格",
"match-identical": "匹配所有相同单元格",
"matched": "已匹配",
"new": "新",
"to-be-recon": "to be reconciled",
"facet": "归类",
"edit-cells": "编辑单元格",
"edit-column": "编辑列",
"transpose": "变换",
"sort": "排序",
"collapse-expand": "收起/展开列以更舒适的查看数据",
"collapse-this": "收起该列",
"collapse-other": "收起所有其他列",
"collapse-left": "收起左侧列",
"collapse-right": "收起右侧列",
"reconcile": "搭配",
"match-fb": "将此列的单元格与Freebase中的主题搭配",
"reverse": "反转",
"remove-sort": "不排序",
"sort-by": "排序,按照",
"sort-cell": "排序,依据",
"pos-blank": "空白错误等排序方式",
"text": "文本",
"case-sensitive": "大小写敏感",
"numbers": "数字",
"dates": "日期",
"booleans": "布尔",
"drag-drop": "拖拽以重新排序",
"forward": "前进",
"sort-by-col": "仅按此列排序",
"smallest-first": "从小到大",
"largest-first": "从大到小",
"earliest-first": "从早到晚",
"latest-first": "从晚到早",
"false-true": "先假后真",
"true-fasle": "先真后假",
"valid-values": "合法值",
"blanks": "空白",
"errors": "错误",
"search-fb-topic": "在Freebase中寻找与筛选后的单元格相匹配的主题:",
"copy-recon-judg": "复制预判,从列",
"copy-to-col": "复制到列",
"copy-opt": "复制选项",
"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": "开始搭配数据",
"recon-text-fb": "Reconcile text in this column with topics on Freebase",
"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-numeric-label": "自定义数值归类于列",
"custom-numeric": "自定义数值归类",
"text-facet": "文本归类",
"numeric-facet": "数值归类",
"timeline-facet": "时间线归类",
"scatterplot-facet": "散点图归类",
"custom-text-facet": "自定义文本归类",
"custom-facets": "自定义归类",
"word-facet": "按字归类",
"duplicates-facet": "复数归类",
"numeric-log-facet": "数字对数归类",
"bounded-log-facet": "约为1的数字对数归类",
"text-length-facet": "文本长度归类",
"log-length-facet": "文本长度的对数值归类",
"unicode-facet": "Unicode字符归类",
"facet-error": "按错误归类",
"facet-blank": "按空白归类",
"text-filter": "文本过滤器",
"add-col-col": "基于当前列新建",
"new-col-name": "新列名称",
"on-error": "发生异常时",
"set-blank": "设为空",
"store-err": "存储异常",
"copy-val": "拷贝原始列的值",
"warning-col-name": "必须输入一个列名称",
"add-col-fetch": "根据此列通过抓取URL新建列",
"throttle-delay": "超时停止",
"milli": "毫秒",
"url-fetch": "要抓取的URL方程式:",
"enter-col-name": "输入新列的名字",
"split-col": "将列",
"several-col": "分割为多列",
"how-split": "如何分割列",
"by-sep": "用分隔符",
"separator": "分隔符",
"reg-exp": "正则表达式",
"split-into": "分割为",
"col-at-most": "列 (留空表示无限制)",
"field-len": "按字段长度",
"list-int": "用逗号分隔的整数们, 如., 5, 7, 15",
"after-split": "分割之后",
"guess-cell": "猜测单元类型",
"remove-col": "移除该列",
"specify-sep": "请制定一个分隔符.",
"warning-no-length": "No field length is specified.",
"warning-format": "The given field lengths are not properly formatted.",
"split-into-col": "分割此列",
"add-based-col": "由此列派生新列",
"add-by-urls": "添加远程数据为新列",
"rename-col": "重命名列",
"move-to-beg": "列移至开始",
"move-to-end": "列移至末尾",
"move-to-left": "左移列",
"move-to-right": "右移列",
"show-as": "展示方式",
"first": "首页",
"previous": "上页",
"next": "下页",
"last": "末页",
"all": "全部",
"facet-star": "按星标归类",
"starred-rows": "加了星标的行",
"facet-flag": "按标记归类",
"flagged-rows": "标记过的行",
"edit-rows": "编辑行",
"star-rows": "加星标",
"unstar-rows": "去星标",
"flag-rows": "加标记",
"unflag-rows": "去标记",
"remove-matching": "移除所有匹配的行",
"edit-col": "编辑列",
"reorder-remove": "重排 / 移除列",
"view": "视图",
"collapse-all": "收起所有列",
"expand-all": "展开所有列",
"reorder-perma": "固定行顺序",
"by": "根据",
"custom-text-trans": "自定义文本转换于列",
"keep-or": "保持原始值",
"re-trans": "重新执行转换",
"times-chang": "次直到无更改",
"enter-separator": "输入要在值间使用的分隔符",
"what-separator": "现在值间用哪种分隔符?",
"transform": "转换",
"common-transform": "常用转换",
"trim-all": "移除首尾空白",
"collapse-white": "收起连续空白",
"unescape-html": "反转义HTML字符",
"titlecase": "首字母大写",
"uppercase": "全大写",
"lowercase": "全小写",
"to-number": "数字化",
"to-date": "日期化",
"to-text": "文本化",
"blank-out": "清空单元格",
"fill-down": "向下填充",
"blank-down": "相同空白填充",
"split-cells": "分离多值单元格",
"join-cells": "合并多值单元格",
"cluster-edit": "簇集并编辑",
"transp-cell": "将不同列中的单元格转换成行",
"from-col": "来源列",
"to-col": "目的列",
"transp-into": "转换成",
"two-new-col": "两个新列",
"key-col": "键列",
"contain-names": "(包含原始列的名字)",
"val-col": "值列",
"contain-val": "(包含原始单元格的值)",
"one-col": "一个列",
"prepend-name": "将原始列的名称前缀给各个单元格",
"follow-by": "添加",
"before-val": "在单元格值的前面",
"ignore-blank": "忽略空白单元格",
"fill-other": "向下填充其他单元格",
"spec-new-name": "请为键列指定名称.",
"spec-new-val": "请为值列指定名称.",
"spec-col-name": "请指定新列的名称.",
"spec-separator": "请指定原始列与单元值之间的分隔符.",
"how-many-rows": "需要转换多少行?",
"expect-two": "请输入不小于2的证书.",
"columnize": "取键/值列组合成列",
"note-col": "注释列 (可选)",
"sel-col-val": "请选择一对互异键值列",
"cannot-same": "一旦指定注释列,那么注释列不能是所选的键/值列",
"transp-cell-row": "将不同列中的单元格转换成行",
"transp-cell-col": "将行中的单元格转换成列",
"columnize-col": "取键/值列组合成列",
"data-type": "数据类型:",
"number": "数字",
"boolean": "布尔",
"date": "日期",
"ctrl-enter": "Ctrl-Enter",
"rows": "行",
"records": "记录",
"show": "显示"
},
"core-buttons": {
"cancel": "取消",
"ok": "&nbsp;&nbsp;确定&nbsp;&nbsp;",
"import-proj": "导入项目",
"select-all": "全选",
"unselect-all": "全不选",
"deselect-all": "全不选",
"select": "选择",
"unselect": "反选",
"startover": "&laquo; 重新开始",
"conf-pars-opt": "配置解析选项 &raquo;",
"reselect-files": "&laquo; 重新选择文件",
"create-project": "新建项目 &raquo;",
"next": "下一步 &raquo;",
"add-url": "添加另一个URL",
"update-preview": "更新预览",
"pick-record": "选择记录",
"merge-cluster": "合并选中 &amp; 重新簇集",
"merge-close": "合并选中 &amp; 关闭",
"close": "关闭",
"reset-template": "重置模板",
"export": "导出",
"preview": "预览",
"download": "下载",
"upload": "上传",
"apply": "应用",
"enter": "Enter",
"esc": "Esc",
"refresh": "刷新",
"reset-all": "全部重置",
"remove-all": "全部移除",
"perform-op": "执行这些操作",
"add-std-svc": "添加标准服务",
"add-named-svc": "添加命名空间服务",
"start-recon": "开始搭配",
"add-service": "添加服务",
"dont-reconcile": "不搭配单元格",
"new-topic": "新主题",
"match": "匹配",
"copy": "复制",
"transpose": "转换",
"apply-to-all": "应用到所有相同单元格"
}
}

View File

@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=8;IE=9;chrome=1;">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Preferences - OpenRefine</title>
<link rel="icon" type="image/png" href="images/favicon.png">
<script type="text/javascript" src="wirings.js"></script>

View File

@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=8;IE=9;chrome=1;">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>OpenRefine</title>
<script type="text/javascript">var theProject = { id : $projectID };</script>
<script type="text/javascript" src="wirings.js"></script>

View File

@ -1,36 +0,0 @@
/*
Copyright 2011, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$(function() {
CFInstall.check({ mode: 'overlay' });
});

View File

@ -313,7 +313,21 @@ ListFacet.prototype._update = function(resetScroll) {
}
}
// FIXME: this is very slow for large numbers of choices (e.g. 18 seconds for 13K choices)
this._elmts.bodyInnerDiv.empty();
// None of the following alternatives are significantly faster
// this._elmts.bodyInnerDiv.innerHtml = '';
// this._elmts.bodyInnerDiv.detach();
// this._elmts.bodyInnerDiv.children().remove();
// this._elmts.bodyInnerDiv.appendTo('.facet-body');
// this._elmts.bodyInnerDiv.remove();
// this._elmts.bodyInnerDiv.html('<div class="facet-body-inner" bind="bodyInnerDiv"></div>');
// this._elmts.bodyInnerDiv.appendTo('.facet-body');
//this._elmts.statusDiv.show();
this._elmts.controlsDiv.show();
@ -409,7 +423,9 @@ ListFacet.prototype._update = function(resetScroll) {
var wireEvents = function() {
var bodyInnerDiv = self._elmts.bodyInnerDiv;
bodyInnerDiv.find('.facet-choice-label').click(function() {
bodyInnerDiv.off(); // remove all old handlers
bodyInnerDiv.on('click', '.facet-choice-label', function(e) {
e.preventDefault();
var choice = findChoice($(this));
if (choice.s) {
if (selectionCount > 1) {
@ -423,28 +439,28 @@ ListFacet.prototype._update = function(resetScroll) {
select(choice);
}
});
bodyInnerDiv.find('.facet-choice-edit').click(function() {
bodyInnerDiv.on('click', '.facet-choice-edit', function(e) {
e.preventDefault();
var choice = findChoice($(this));
self._editChoice(choice, $(this).closest('.facet-choice'));
});
bodyInnerDiv.find('.facet-choice').mouseenter(function() {
$(this).find('.facet-choice-edit').css("visibility", "visible");
var choice = getChoice($(this));
if (!choice.s) {
$(this).find('.facet-choice-toggle').css("visibility", "visible");
bodyInnerDiv.on('mouseenter mouseleave', '.facet-choice', function(e) {
e.preventDefault();
var visibility = 'visible';
if (e.type == 'mouseleave') {
visibility = 'hidden';
}
}).mouseleave(function() {
$(this).find('.facet-choice-edit').css("visibility", "hidden");
$(this).find('.facet-choice-edit').css("visibility", visibility);
var choice = getChoice($(this));
if (!choice.s) {
$(this).find('.facet-choice-toggle').css("visibility", "hidden");
$(this).find('.facet-choice-toggle').css("visibility", visibility);
}
});
bodyInnerDiv.find('.facet-choice-toggle').click(function() {
bodyInnerDiv.on('click', '.facet-choice-toggle', function(e) {
e.preventDefault();
var choice = findChoice($(this));
if (choice.s) {
deselect(choice);
@ -454,7 +470,7 @@ ListFacet.prototype._update = function(resetScroll) {
});
};
window.setTimeout(wireEvents, 100);
};
}; // end _update()
ListFacet.prototype._renderBodyControls = function() {
var self = this;

View File

@ -37,8 +37,7 @@ var Refine = {
actionAreas: []
};
var lang = navigator.language.split("-")[0]
|| navigator.userLanguage.split("-")[0];
var lang = (navigator.language|| navigator.userLanguage).split("-")[0];
var dictionary = "";
$.ajax({
url : "/command/core/load-language?",

View File

@ -66,6 +66,9 @@ Refine.JsonParserUI.prototype.confirmReadyToCreateProject = function() {
};
Refine.JsonParserUI.prototype.getOptions = function() {
if(!this._config.recordPath){
this._setRecordPath(this._config.defaultRecordPath);
}
var options = {
recordPath: this._config.recordPath
};
@ -236,6 +239,7 @@ Refine.JsonParserUI.prototype._showPickRecordNodesUI = function() {
}
};
rootNode = $('<div>').addClass('node').addClass('indented').appendTo(elmts.domContainer);
this._config.defaultRecordPath=[ANONYMOUS_NODE_NAME];
renderNode(this._config.dom, rootNode, [ANONYMOUS_NODE_NAME]);
};

View File

@ -66,6 +66,9 @@ Refine.XmlParserUI.prototype.confirmReadyToCreateProject = function() {
};
Refine.XmlParserUI.prototype.getOptions = function() {
if(!this._config.recordPath){
this._setRecordPath(this._config.defaultRecordPath);
}
var options = {
recordPath: this._config.recordPath
};
@ -229,6 +232,7 @@ Refine.XmlParserUI.prototype._showPickRecordElementsUI = function() {
}
};
if (this._config.dom) {
this._config.defaultRecordPath=[];
renderNode(this._config.dom, elmts.domContainer, []);
}
};

View File

@ -33,8 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
var preferenceUIs = [];
var lang = navigator.language.split("-")[0]
|| navigator.userLanguage.split("-")[0];
var lang = (navigator.language|| navigator.userLanguage).split("-")[0];
var dictionary = "";
$.ajax({
url : "/command/core/load-language?",

View File

@ -34,8 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
var theProject;
var ui = {};
var lang = navigator.language.split("-")[0]
|| navigator.userLanguage.split("-")[0];
var lang = (navigator.language|| navigator.userLanguage).split("-")[0];
var dictionary = "";
$.ajax({
url : "/command/core/load-language?",

View File

@ -182,10 +182,11 @@ class RefineServer extends Server {
}
final String contextPath = Configurations.get("refine.context_path","/");
final int maxFormContentSize = Configurations.getInteger("refine.max_form_content_size", 1048576);
logger.info("Initializing context: '" + contextPath + "' from '" + webapp.getAbsolutePath() + "'");
WebAppContext context = new WebAppContext(webapp.getAbsolutePath(), contextPath);
context.setMaxFormContentSize(1048576);
context.setMaxFormContentSize(maxFormContentSize);
this.setHandler(context);
this.setStopAtShutdown(true);