From 7778fe5ea7433b4e8745bc6ab9bdf3742b1ff6df Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 19 Sep 2013 01:53:44 -0400 Subject: [PATCH 01/32] Back the test verbosity down a bit now that we have things working --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 6b5119ff6..546dffc72 100644 --- a/build.xml +++ b/build.xml @@ -173,7 +173,7 @@ - From 2c0cb0d65700d48a68dbeec18103e1c4e71fbbe6 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 19 Sep 2013 02:09:25 -0400 Subject: [PATCH 02/32] Test for issue #796 (failing until fixed) --- .../operations/cell/TransposeTests.java | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java diff --git a/main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java b/main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java new file mode 100644 index 000000000..874718d45 --- /dev/null +++ b/main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java @@ -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 exceptions = new ArrayList(); + 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); + } + +} From b4e5e9698ee5fb61c93f1dd28c3096281691d9a5 Mon Sep 17 00:00:00 2001 From: Pablo Moyano Date: Sat, 1 Feb 2014 01:57:38 -0800 Subject: [PATCH 03/32] Proposed fix for #847 --- .../module/scripts/dialogs/freebase-loading-dialog.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/freebase/module/scripts/dialogs/freebase-loading-dialog.html b/extensions/freebase/module/scripts/dialogs/freebase-loading-dialog.html index c478b4441..ab37a234e 100644 --- a/extensions/freebase/module/scripts/dialogs/freebase-loading-dialog.html +++ b/extensions/freebase/module/scripts/dialogs/freebase-loading-dialog.html @@ -3,7 +3,7 @@
@@ -64,4 +64,4 @@
-
\ No newline at end of file + From a0d4eb0058e8c3929d4224e848dd4b2f0db9e8d5 Mon Sep 17 00:00:00 2001 From: Frank Wennerdahl Date: Wed, 5 Feb 2014 12:21:02 +0100 Subject: [PATCH 04/32] Job id duplicate fix Changed how job id's are created to avoid the same id to be assigned to two concurrent jobs. --- .../refine/importing/ImportingManager.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/main/src/com/google/refine/importing/ImportingManager.java b/main/src/com/google/refine/importing/ImportingManager.java index 2111a1af6..a14018ae8 100644 --- a/main/src/com/google/refine/importing/ImportingManager.java +++ b/main/src/com/google/refine/importing/ImportingManager.java @@ -86,7 +86,10 @@ public class ImportingManager { static private RefineServlet servlet; static private File importDir; + final static private Map jobs = Collections.synchronizedMap(new HashMap()); + 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 formatToRecord = new HashMap(); @@ -187,7 +190,18 @@ 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); From aae3d5e88463202728e0c1c387d5840ce9d08db0 Mon Sep 17 00:00:00 2001 From: Pablo Moyano Date: Wed, 12 Feb 2014 01:00:17 -0800 Subject: [PATCH 05/32] proposed fix for #480 --- .../core/scripts/index/parser-interfaces/json-parser-ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/webapp/modules/core/scripts/index/parser-interfaces/json-parser-ui.js b/main/webapp/modules/core/scripts/index/parser-interfaces/json-parser-ui.js index ebc5a16f4..465ec147c 100644 --- a/main/webapp/modules/core/scripts/index/parser-interfaces/json-parser-ui.js +++ b/main/webapp/modules/core/scripts/index/parser-interfaces/json-parser-ui.js @@ -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 = $('
').addClass('node').addClass('indented').appendTo(elmts.domContainer); + this._config.defaultRecordPath=[ANONYMOUS_NODE_NAME]; renderNode(this._config.dom, rootNode, [ANONYMOUS_NODE_NAME]); }; From 0c475890ed641301ba066011fb2816dd4d33f6b6 Mon Sep 17 00:00:00 2001 From: Pablo Moyano Date: Wed, 12 Feb 2014 01:11:31 -0800 Subject: [PATCH 06/32] applying changes to xml parser too --- .../core/scripts/index/parser-interfaces/xml-parser-ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/webapp/modules/core/scripts/index/parser-interfaces/xml-parser-ui.js b/main/webapp/modules/core/scripts/index/parser-interfaces/xml-parser-ui.js index ebe6696fb..6fce35b24 100644 --- a/main/webapp/modules/core/scripts/index/parser-interfaces/xml-parser-ui.js +++ b/main/webapp/modules/core/scripts/index/parser-interfaces/xml-parser-ui.js @@ -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, []); } }; From 8c02a134296d1785e829d92bcd4630e6b81ab2a1 Mon Sep 17 00:00:00 2001 From: Frank Wennerdahl Date: Wed, 19 Feb 2014 16:02:45 +0100 Subject: [PATCH 07/32] Initialized ImportingJob.lastTouched Prevents the CleaningTimerTask from disposing newly created ImportingJobs which have not yet been touched. --- main/src/com/google/refine/importing/ImportingJob.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/src/com/google/refine/importing/ImportingJob.java b/main/src/com/google/refine/importing/ImportingJob.java index 5d470e405..0ebd55390 100644 --- a/main/src/com/google/refine/importing/ImportingJob.java +++ b/main/src/com/google/refine/importing/ImportingJob.java @@ -76,6 +76,8 @@ public class ImportingJob implements Jsonizable { JSONUtilities.safePut(cfg, "hasData", false); this.config = cfg; + lastTouched = System.currentTimeMillis(); + dir.mkdirs(); } From 672e9bf62c6a8b101a4f36b07618eb8172733a8c Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Sat, 5 Apr 2014 12:36:40 -0400 Subject: [PATCH 08/32] Synchronize access to processes list - fixes #862 --- main/src/com/google/refine/process/ProcessManager.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main/src/com/google/refine/process/ProcessManager.java b/main/src/com/google/refine/process/ProcessManager.java index 2abb37c84..94cf150ed 100644 --- a/main/src/com/google/refine/process/ProcessManager.java +++ b/main/src/com/google/refine/process/ProcessManager.java @@ -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 _processes = new LinkedList(); + protected List _processes = Collections.synchronizedList(new LinkedList()); protected List _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(); From 35445d90993eec2817aaa148341ce9a2529dc4bc Mon Sep 17 00:00:00 2001 From: plhyc1216 Date: Mon, 21 Apr 2014 22:20:12 +0800 Subject: [PATCH 09/32] =?UTF-8?q?=E7=AE=80=E4=BD=93=E6=B1=89=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将操作语言译为简体中文 --- .../modules/core/langs/translation-zh.json | 669 ++++++++++++++++++ 1 file changed, 669 insertions(+) create mode 100644 main/webapp/modules/core/langs/translation-zh.json diff --git a/main/webapp/modules/core/langs/translation-zh.json b/main/webapp/modules/core/langs/translation-zh.json new file mode 100644 index 000000000..15157ce0e --- /dev/null +++ b/main/webapp/modules/core/langs/translation-zh.json @@ -0,0 +1,669 @@ +{ + "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": "正在检查
选中的文件们 ...", + "unknown-err": "位置的错误", + "error": "错误:", + "select-file": "选择要导入的文件", + "several-file": "有多个可用文件. 请选择要导入的文件.", + "sel-by-extension": "按扩展名选择", + "sel-by-regex": "选择名称符合正则的文件", + "parsing-options": "配置解析选项", + "project-name": "项目 名称", + "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": "Please specify a record path first.", + "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": "将单元格中的
文本解析

数字,日期,...", + "store-blank": "保留空白行", + "store-nulls": "将空白单元格作为nulls保留", + "store-source": "在每一行
(文件名称, URLs)
保留文件信息", + "preserve-empty": "保留空字符串", + "trim": "移除字符串首尾的空白", + "json-parser": "点击的第一个JSON { } 节点 对应于第一个要加载的数据记录.", + "parse-every": "将数据中的每", + "lines-into-row": "行解析为表格中的一行", + "col-separated-by": "数据中列的分隔方式", + "commas": "逗号 (CSV)", + "tabs": "制表符 (TSV)", + "custom": "自定义", + "escape": "特殊字符使用\\进行转义", + "quotation-mark": "引号被用来
封装那些
包含列分隔符
的单元格内容", + "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": "Average Length of Choices", + "choice-var-length": "Length Variance of Choices", + "found": "found", + "filtered-from": "filtered from ", + "from-total": " total", + "cluster-descr": "This feature helps you find groups of different cell values that might be alternative representations of the same thing. For example, the two strings \"New York\" and \"new york\" are very likely to refer to the same concept and just have capitalization differences, and \"Gödel\" and \"Godel\" probably refer to the same person.", + "find-more": "Find out more ...", + "method": "Method ", + "key-collision": "key collision", + "nearest-neighbor": "nearest neighbor", + "keying-function": "Keying Function ", + "fingerprint": "fingerprint", + "ngram": "ngram-fingerprint", + "metaphone": "metaphone3", + "phonetic": "cologne-phonetic", + "distance-fun": "Distance Function ", + "leven": "levenshtein", + "ppm" : "PPM", + "ngram-size": "Ngram Size ", + "ngram-radius": "Radius ", + "block-chars": "Block Chars ", + "reorder-column": "Re-order / Remove Columns", + "drag-column": "Drag columns to re-order", + "drop-column": "Drop columns here to remove", + "template-export": "Templating Export", + "template-prefix": "Prefix", + "template-rowt": "Row Template", + "template-rows": "Row Separator", + "template-suffix": "Suffix", + "idling": "Idling...", + "updating": "Updating...", + "scatterplot-matrix": "Scatterplot Matrix", + "focusing-on": "focusing on", + "processing": "Processing...", + "error-getColumnInfo": "Error calling 'get-columns-info'", + "no-column-dataset": "There are no columns in this dataset", + "linear-plot": "Linear Plot", + "logarithmic-plot": "Logarithmic Plot", + "rotated-counter-clock": "Rotated 45° Counter-Clockwise", + "no-rotation": "No rotation", + "rotated-clock": "Rotated 45° Clockwise", + "small-dot": "Small Dot Size", + "regular-dot": "Regular Dot Size", + "big-dot": "Big Dot Size", + "cell-fields": "The current cell. It has a few fields: 'value' and 'recon'.", + "cell-value": "The current cell's value. This is a shortcut for 'cell.value'.", + "row-fields": "The current row. It has 5 fields: 'flagged', 'starred', 'index', 'cells', and 'record'.", + "cells-of-row": "The cells of the current row. This is a shortcut for 'row.cells'. A particular cell can be retrieved with 'cells.' if the is a single word, or with 'cells[\"\"] otherwise.", + "row-index": "The current row's index. This is a shortcut for 'row.index'.", + "returns": "returns", + "from": "From", + "expression": "Expression", + "reuse": "Reuse", + "remove": "Remove", + "error": "Error", + "no-syntax-err": "No syntax error", + "internal-err": "Internal error", + "language": "Language", + "preview": "Preview", + "history": "History", + "starred": "Starred", + "help": "Help", + "opt-code-applied": "Option code successfully applied.", + "error-apply-code": "Error applying option code", + "custom-tab-exp": "Custom Tabular Exporter", + "content": "Content", + "download": "Download", + "upload": "Upload", + "opt-code": "Option Code", + "sel-and-ord": "Select and Order Columns to Export", + "opt-for": "Options for", + "for-recon-cell": "For reconciled cells, output", + "match-ent-name": "Matched entity's name", + "cell-content": "Cell's content", + "match-ent-id": "Matched entity's ID", + "link-match": "Link to matched entity's page", + "out-not-unmatch": "Output nothing for unmatched cells", + "date-format": "For date/time values, use format", + "date-iso": "ISO 8601, e.g., 2011-08-24T18:36:10+08:00", + "short-format": "Short locale format", + "medium-format": "Medium locale format", + "long-format": "Long locale format", + "full-format": "Full locale format", + "custom": "自定义", + "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": "The following JSON text encodes the options you have set in the other tabs. You can copy it out and save it for later, and paste it back in and click Apply to re-use the same options." + }, + "core-facets": { + "remove-facet": "移除这个归类", + "reset": "重置", + "invert": "反转", + "change": "修改", + "click-to-edit": "点击编辑表达式", + "sort-by": "排序,按照", + "name": "名称", + "count": "数量", + "cluster": "簇", + "current-exp": "当前表达式", + "facet-choices": "Facet Choices as Tab Separated Values", + "loading": "载入中...", + "too-many-choices": "choices total, too many to display", + "set-choice-count": "Set choice count limit", + "edit": "edit", + "facet-by-count": "Facet by choice counts", + "edit-based-col": "Edit Facet's Expression based on Column", + "edit-facet-exp": "Edit Facet's Expression", + "set-max-choices": "Set the maximum number of choices shown in each text facet (too many will slow down the application)", + "case-sensitive": "case sensitive", + "regular-exp": "regular expression", + "time": "Time", + "non-time": "Non-Time", + "blank": "Blank", + "error": "Error", + "unknown-error": "Unknown error", + "linear-plot": "Linear Plot", + "linear-plot-abbr": "lin", + "logar-plot": "Logarithmic Plot", + "logar-plot-abbr": "log", + "rotated-counter-clock": "Rotated 45° Counter-Clockwise", + "no-rotation": "No rotation", + "rotated-clock": "Rotated 45° Clockwise", + "small-dot": "Small Dot Size", + "regular-dot": "Regular Dot Size", + "big-dot": "Big Dot Size", + "export-plot": "export plot", + "numeric": "Numeric" + }, + "core-project": { + "open": "Open", + "permalink": "Permalink", + "export": "Export", + "help": "Help", + "starting": "Starting up", + "facet-filter": "Facet / Filter", + "undo-redo": "Undo / Redo", + "extensions": "Extensions", + "proj-name": "Click to rename project", + "use-facets": "Using facets and filters", + "use-to-select": "Use facets and filters to select subsets of your data to act on. Choose facet and filter methods from the menus at the top of each data column.", + "not-sure": "Not sure how to get started?", + "watch-cast": "Watch these screencasts", + "refreshing-facet": "Refreshing facets...", + "update-facets": "Update all facets", + "clear-selection": "Clear selection in all facets", + "remove-all": "Remove all facets", + "export-project": "Export project", + "tab-value": "Tab-separated value", + "comma-sep": "Comma-separated value", + "html-table": "HTML table", + "excel": "Excel", + "odf": "ODF spreadsheet", + "triple-loader": "Triple loader", + "mqlwrite": "MQLWrite", + "custom-tabular": "Custom tabular exporter...", + "templating": "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": "The JSON you pasted is invalid", + "undo-history": "Infinite undo history", + "mistakes": "Don't worry about making mistakes. Every change you make will be shown here, and you can undo your changes anytime.", + "learn-more": "Learn more »", + "apply": "Apply…", + "extract": "Extract…", + "filter": "Filter:", + "extract-history": "Extract Operation History", + "extract-save": "Extract and save parts of your operation history as JSON that you can apply to this or other projects in the future.", + "apply-operation": "Apply Operation History", + "paste-json": "Paste an extracted JSON history of operations to perform:", + "complete": "complete", + "other-processes": "other pending processes", + "other-process": "other pending process", + "cancel-all": "Cancel All", + "cancel": "Cancel", + "canceling": "Canceling...", + "last-op-er": "The last operation encountered some errors", + "continue-remaining": "Continue with the remaining operations", + "undo": "撤销" + }, + "core-recon": { + "access": "Access", + "service-api": "Service API", + "cell-type": "Reconcile each cell to an entity of one of these types", + "col-detail": "Also use relevant details from other columns", + "against-type": "Reconcile against type", + "no-type": "Reconcile against no particular type", + "auto-match": "Auto-match candidates with high confidence", + "warning-type-sugg": "Sorry, we can't suggest any type for your data. Please specify a type yourself below.", + "column": "Column", + "include": "Include", + "as-property": "As Property", + "contact-service": "Contacting reconciliation service", + "error-contact": "Error contacting recon service", + "fb-recon": "Freebase Query-based Reconciliation", + "recon-col": "Reconcile column", + "pick-service": "Pick a Service or Extension on Left", + "add-recon-srv": "Add Namespaced Reconciliation Service", + "namespace": "Namespace", + "ent-type": "Type of Entities (optional)", + "add-std-srv": "Add Standard Reconciliation Service", + "enter-url": "Enter the service's URL", + "specify-ns": "Please specify a namespace.", + "cell-contains": "Each 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": "the Wikipedia English namespace", + "this-ns": "this namespace:", + "max-candidates" : "Maximum number of candidates to return" + + }, + "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": "Edit this cell", + "choose-match": "Choose new match", + "match-all-cells": "Match this topic to this and all identical cells", + "match-this-cell": "Match this topic to this cell", + "create-topic-cells": "Create a new topic for this and all identical cells", + "create-topic-cell": "Create a new topic for this cell", + "create-topic": "Create new topic", + "search-match": "Search for match", + "not-valid-number": "Not a valid number.", + "not-valid-date": "Not a valid date.", + "match-this": "Match this cell only", + "match-other": "Match other cells with same content", + "search-for": "Search for", + "match-cell": "Match this Cell", + "match-identical": "Match All Identical Cells", + "matched": "matched", + "new": "new", + "to-be-recon": "to be reconciled", + "facet": "Facet", + "edit-cells": "Edit cells", + "edit-column": "Edit column", + "transpose": "Transpose", + "sort": "Sort", + "collapse-expand": "Collapse/expand columns to make viewing the data more convenient", + "collapse-this": "Collapse this column", + "collapse-other": "Collapse all other columns", + "collapse-left": "Collapse all columns to left", + "collapse-right": "Collapse all columns to right", + "reconcile": "Reconcile", + "match-fb": "Match this column's cells to topics on Freebase", + "reverse": "Reverse", + "remove-sort": "Remove sort", + "sort-by": "Sort by", + "sort-cell": "Sort cell values as", + "pos-blank": "Position blanks and errors", + "text": "text", + "case-sensitive": "case-sensitive", + "numbers": "numbers", + "dates": "dates", + "booleans": "booleans", + "drag-drop": "Drag and drop to re-order", + "forward": "forward", + "sort-by-col": "sort by this column alone", + "smallest-first": "smallest first", + "largest-first": "largest first", + "earliest-first": "earliest first", + "latest-first": "latest first", + "false-true": "false then true", + "true-fasle": "true then false", + "valid-values": "Valid values", + "blanks": "Blanks", + "errors": "Errors", + "search-fb-topic": "Search Freebase for a topic to match all filtered cells:", + "copy-recon-judg": "Copy recon judgments from column", + "copy-to-col": "Copy to Columns", + "copy-opt": "Copying Options", + "apply-to-cell": "Apply to judged cells", + "what-to-copy": "What to copy:", + "new-recon": "new recon judgments", + "match-recon": "match recon judgments", + "warning-other-col": "Please select some other column to copy to.", + "warning-sel-judg": "Please select at least one kind of judgment to copy.", + "start-recon": "Start reconciling", + "recon-text-fb": "Reconcile text in this column with topics on Freebase", + "facets": "Facets", + "by-judg": "By judgment", + "best-score": "Best candidate's score", + "best-cand-score": "best candidate's score", + "best-type-match": "Best candidate's type match", + "best-cand-type-match": "best candidate's types match?", + "best-name": "Best candidate's name match", + "best-cand-name": "best candidate's name match?", + "best-edit-dist": "Best candidate's name edit distance", + "best-cand-edit-dist": "best candidate's name edit distance", + "best-word-sim": "Best candidate's name word similarity", + "best-cand-word-sim": "best candidate's name word similarity", + "best-type": "Best candidate's types", + "qa-facets": "QA facets", + "qa-results": "QA results", + "qa-results2": "QA Results", + "judg-actions": "Judgment actions", + "judg-actions2": "Judgment Actions", + "judg-hist": "Judgment history entries", + "hist-entries": "History Entries", + "actions": "Actions", + "best-cand": "Match each cell to its best candidate", + "best-cand2": "Match each cell to its best candidate in this column for all current filtered rows", + "new-topic": "Create a new topic for each cell", + "new-topic2": "Mark to create one new topic for each cell in this column for all current filtered rows", + "one-topic": "Create one new topic for similar cells", + "one-topic2": "Mark to create one new topic for each group of similar cells in this column for all current filtered rows", + "filtered-cell": "Match all filtered cells to...", + "filtered-cell2": "Search for a topic to match all filtered cells to", + "discard-judg": "Discard reconciliation judgments", + "discard-judg2": "Discard reconciliation judgments in this column for all current filtered rows", + "clear-recon": "Clear reconciliation data", + "clear-recon2": "Clear reconciliation data in this column for all current filtered rows", + "copy-recon": "Copy reconciliation data...", + "copy-recon2": "Copy this column's reconciliation data to other columns", + "custom-facet": "Custom Facet on column", + "custom-numeric-label": "Custom Numeric Facet on column", + "custom-numeric": "Custom Numeric Facet", + "text-facet": "Text facet", + "numeric-facet": "Numeric facet", + "timeline-facet": "Timeline facet", + "scatterplot-facet": "Scatterplot facet", + "custom-text-facet": "Custom text facet", + "custom-facets": "Customized facets", + "word-facet": "Word facet", + "duplicates-facet": "Duplicates facet", + "numeric-log-facet": "Numeric log facet", + "bounded-log-facet": "1-bounded numeric log facet", + "text-length-facet": "Text length facet", + "log-length-facet": "Log of text length facet", + "unicode-facet": "Unicode char-code facet", + "facet-error": "Facet by error", + "facet-blank": "Facet by blank", + "text-filter": "Text filter", + "add-col-col": "Add column based on column", + "new-col-name": "New column name", + "on-error": "On error", + "set-blank": "set to blank", + "store-err": "store error", + "copy-val": "copy value from original column", + "warning-col-name": "You must enter a column name.", + "add-col-fetch": "Add column by fetching URLs based on column", + "throttle-delay": "Throttle delay", + "milli": "milliseconds", + "url-fetch": "Formulate the URLs to fetch:", + "enter-col-name": "Enter new column name", + "split-col": "Split column", + "several-col": "into several columns", + "how-split": "How to Split Column", + "by-sep": "by separator", + "separator": "Separator", + "reg-exp": "regular expression", + "split-into": "Split into", + "col-at-most": "columns at most (leave blank for no limit)", + "field-len": "by field lengths", + "list-int": "List of integers separated by commas, e.g., 5, 7, 15", + "after-split": "After Splitting", + "guess-cell": "Guess cell type", + "remove-col": "Remove this column", + "specify-sep": "Please specify a separator.", + "warning-no-length": "No field length is specified.", + "warning-format": "The given field lengths are not properly formatted.", + "split-into-col": "Split into several columns", + "add-based-col": "Add column based on this column", + "add-by-urls": "Add column by fetching URLs", + "rename-col": "Rename this column", + "move-to-beg": "Move column to beginning", + "move-to-end": "Move column to end", + "move-to-left": "Move column left", + "move-to-right": "Move column right", + "show-as": "Show as", + "first": "first", + "previous": "previous", + "next": "next", + "last": "last", + "all": "All", + "facet-star": "Facet by star", + "starred-rows": "Starred Rows", + "facet-flag": "Facet by flag", + "flagged-rows": "Flagged Rows", + "edit-rows": "Edit rows", + "star-rows": "Star rows", + "unstar-rows": "Unstar rows", + "flag-rows": "Flag rows", + "unflag-rows": "Unflag rows", + "remove-matching": "Remove all matching rows", + "edit-col": "Edit columns", + "reorder-remove": "Re-order / remove columns", + "view": "View", + "collapse-all": "Collapse all columns", + "expand-all": "Expand all columns", + "reorder-perma": "Reorder rows permanently", + "by": "By", + "custom-text-trans": "Custom text transform on column", + "keep-or": "keep original", + "re-trans": "Re-transform up to", + "times-chang": "times until no change", + "enter-separator": "Enter separator to use between values", + "what-separator": "What separator currently separates the values?", + "transform": "Transform", + "common-transform": "Common transforms", + "trim-all": "Trim leading and trailing whitespace", + "collapse-white": "Collapse consecutive whitespace", + "unescape-html": "Unescape HTML entities", + "titlecase": "To titlecase", + "uppercase": "To uppercase", + "lowercase": "To lowercase", + "to-number": "To number", + "to-date": "To date", + "to-text": "To text", + "blank-out": "Blank out cells", + "fill-down": "Fill down", + "blank-down": "Blank down", + "split-cells": "Split multi-valued cells", + "join-cells": "Join multi-valued cells", + "cluster-edit": "Cluster and edit", + "transp-cell": "Transpose Cells Across Columns into Rows", + "from-col": "From Column", + "to-col": "To Column", + "transp-into": "Transpose into", + "two-new-col": "Two new columns", + "key-col": "Key Column", + "contain-names": "(containing original columns' names)", + "val-col": "Value Column", + "contain-val": "(containing original cells' values)", + "one-col": "One column", + "prepend-name": "prepend the original column's name to each cell", + "follow-by": "followed by", + "before-val": "before the cell's value", + "ignore-blank": "Ignore blank cells", + "fill-other": "Fill down in other columns", + "spec-new-name": "Please specify the new key column's name.", + "spec-new-val": "Please specify the new value column's name.", + "spec-col-name": "Please specify the new column's name.", + "spec-separator": "Please specify the separator between original column names and cell values.", + "how-many-rows": "How many rows to transpose?", + "expect-two": "Expected an integer at least 2.", + "columnize": "Columnize by Key/Value Columns", + "note-col": "Note Column (optional)", + "sel-col-val": "Please select one key column and one value column that are different from one another.", + "cannot-same": "If specified, the note column cannot be the same as the key column or the value column.", + "transp-cell-row": "Transpose cells across columns into rows", + "transp-cell-col": "Transpose cells in rows into columns", + "columnize-col": "Columnize by key/value columns", + "data-type": "数据类型:", + "number": "数字", + "boolean": "布尔", + "date": "日期", + "ctrl-enter": "Ctrl-Enter", + "rows": "行", + "records": "数据记录", + "show": "显示" + }, + "core-buttons": { + "cancel": "取消", + "ok": "  确定  ", + "import-proj": "导入项目", + "select-all": "全选", + "unselect-all": "全不选", + "deselect-all": "全不选", + "select": "选择", + "unselect": "反选", + "startover": "« 重新开始", + "conf-pars-opt": "配置解析选项 »", + "reselect-files": "« 重新选择文件", + "create-project": "新建项目 »", + "next": "下一步 »", + "add-url": "添加另一个URL", + "update-preview": "更新预览", + "pick-record": "选择数据元素", + "merge-cluster": "合并选中 & 重新簇集", + "merge-close": "合并选中 & 关闭", + "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": "应用到所有相同单元格" + } +} From d5213a893b38df94c839b268ab24749a9fa944f3 Mon Sep 17 00:00:00 2001 From: plhyc1216 Date: Tue, 22 Apr 2014 16:32:50 +0800 Subject: [PATCH 10/32] =?UTF-8?q?=E5=86=8D=E6=9B=B4=E6=96=B0=E4=B8=80?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 汉化再更新一点 --- .../modules/core/langs/translation-zh.json | 242 +++++++++--------- 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/main/webapp/modules/core/langs/translation-zh.json b/main/webapp/modules/core/langs/translation-zh.json index 15157ce0e..4a43191d0 100644 --- a/main/webapp/modules/core/langs/translation-zh.json +++ b/main/webapp/modules/core/langs/translation-zh.json @@ -79,7 +79,7 @@ "column-names": "列名:", "comma-separated": "逗号分隔的数字们", "optional-separated": "可选,以逗号分隔", - "warning-record-path": "Please specify a record path first.", + "warning-record-path": "请首先指定一个记录路径.", "pick-nodes": "摘选记录节点", "char-encoding": "字符编码" }, @@ -141,26 +141,26 @@ "try-another-method": "请尝试上面的其他操作或者修改操作的参数", "clustering": "簇集中... ", "warning-check-boxes": "必须选中某些 `编辑?` 列的复选框来应用你的编辑 ", - "choices-in-cluster": "# 簇中的选择", + "choices-in-cluster": "# 簇中的可选择数", "rows-in-cluster": "# 簇中的行数", - "choice-avg-length": "Average Length of Choices", - "choice-var-length": "Length Variance of Choices", - "found": "found", - "filtered-from": "filtered from ", - "from-total": " total", + "choice-avg-length": "选择的平均长度", + "choice-var-length": "选择的长度变化", + "found": "被发现", + "filtered-from": "筛选自", + "from-total": " 个中", "cluster-descr": "This feature helps you find groups of different cell values that might be alternative representations of the same thing. For example, the two strings \"New York\" and \"new york\" are very likely to refer to the same concept and just have capitalization differences, and \"Gödel\" and \"Godel\" probably refer to the same person.", - "find-more": "Find out more ...", - "method": "Method ", - "key-collision": "key collision", - "nearest-neighbor": "nearest neighbor", - "keying-function": "Keying Function ", - "fingerprint": "fingerprint", - "ngram": "ngram-fingerprint", - "metaphone": "metaphone3", - "phonetic": "cologne-phonetic", - "distance-fun": "Distance Function ", - "leven": "levenshtein", - "ppm" : "PPM", + "find-more": "查看更多信息 ...", + "method": "方法 ", + "key-collision": "关键词碰接", + "nearest-neighbor": "就近原则", + "keying-function": "关键词算法", + "fingerprint": "指纹分类算法", + "ngram": "ngram-指纹分类算法", + "metaphone": "metaphone3算法", + "phonetic": "cologne-phonetic算法", + "distance-fun": "距离算法", + "leven": "levenshtein算法", + "ppm" : "PPM算法", "ngram-size": "Ngram Size ", "ngram-radius": "Radius ", "block-chars": "Block Chars ", @@ -194,17 +194,17 @@ "row-index": "The current row's index. This is a shortcut for 'row.index'.", "returns": "returns", "from": "From", - "expression": "Expression", - "reuse": "Reuse", - "remove": "Remove", - "error": "Error", - "no-syntax-err": "No syntax error", - "internal-err": "Internal error", - "language": "Language", - "preview": "Preview", - "history": "History", - "starred": "Starred", - "help": "Help", + "expression": "表达式", + "reuse": "重用", + "remove": "移除", + "error": "错误", + "no-syntax-err": "没有语法错误", + "internal-err": "内部异常", + "language": "语言", + "preview": "预览", + "history": "历史", + "starred": "星标", + "help": "帮助", "opt-code-applied": "Option code successfully applied.", "error-apply-code": "Error applying option code", "custom-tab-exp": "Custom Tabular Exporter", @@ -286,16 +286,16 @@ "numeric": "Numeric" }, "core-project": { - "open": "Open", - "permalink": "Permalink", - "export": "Export", - "help": "Help", - "starting": "Starting up", - "facet-filter": "Facet / Filter", - "undo-redo": "Undo / Redo", - "extensions": "Extensions", - "proj-name": "Click to rename project", - "use-facets": "Using facets and filters", + "open": "打开", + "permalink": "永久地址", + "export": "导出", + "help": "帮助", + "starting": "启动", + "facet-filter": "归类 / 过滤器", + "undo-redo": "撤销 / 重做", + "extensions": "扩展", + "proj-name": "单击以重命名", + "use-facets": "使用归类和过滤器", "use-to-select": "Use facets and filters to select subsets of your data to act on. Choose facet and filter methods from the menus at the top of each data column.", "not-sure": "Not sure how to get started?", "watch-cast": "Watch these screencasts", @@ -336,34 +336,34 @@ "undo": "撤销" }, "core-recon": { - "access": "Access", - "service-api": "Service API", - "cell-type": "Reconcile each cell to an entity of one of these types", - "col-detail": "Also use relevant details from other columns", - "against-type": "Reconcile against type", - "no-type": "Reconcile against no particular type", - "auto-match": "Auto-match candidates with high confidence", - "warning-type-sugg": "Sorry, we can't suggest any type for your data. Please specify a type yourself below.", - "column": "Column", - "include": "Include", - "as-property": "As Property", - "contact-service": "Contacting reconciliation service", - "error-contact": "Error contacting recon service", - "fb-recon": "Freebase Query-based Reconciliation", - "recon-col": "Reconcile column", - "pick-service": "Pick a Service or Extension on Left", - "add-recon-srv": "Add Namespaced Reconciliation Service", - "namespace": "Namespace", - "ent-type": "Type of Entities (optional)", - "add-std-srv": "Add Standard Reconciliation Service", - "enter-url": "Enter the service's URL", - "specify-ns": "Please specify a namespace.", - "cell-contains": "Each cell contains:", + "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": "the Wikipedia English namespace", - "this-ns": "this namespace:", + "fb-en-ns": "英文维基命名空间", + "this-ns": "该命名空间:", "max-candidates" : "Maximum number of candidates to return" }, @@ -386,62 +386,62 @@ "invalid-date": "日期字符串格式错误" }, "core-views": { - "edit-cell": "Edit this cell", - "choose-match": "Choose new match", + "edit-cell": "编辑这个单元格", + "choose-match": "选择新的匹配", "match-all-cells": "Match this topic to this and all identical cells", "match-this-cell": "Match this topic to this cell", - "create-topic-cells": "Create a new topic for this and all identical cells", - "create-topic-cell": "Create a new topic for this cell", - "create-topic": "Create new topic", - "search-match": "Search for match", - "not-valid-number": "Not a valid number.", - "not-valid-date": "Not a valid date.", - "match-this": "Match this cell only", - "match-other": "Match other cells with same content", - "search-for": "Search for", - "match-cell": "Match this Cell", - "match-identical": "Match All Identical Cells", - "matched": "matched", - "new": "new", + "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": "Facet", - "edit-cells": "Edit cells", - "edit-column": "Edit column", - "transpose": "Transpose", - "sort": "Sort", - "collapse-expand": "Collapse/expand columns to make viewing the data more convenient", - "collapse-this": "Collapse this column", - "collapse-other": "Collapse all other columns", - "collapse-left": "Collapse all columns to left", - "collapse-right": "Collapse all columns to right", - "reconcile": "Reconcile", + "facet": "归类", + "edit-cells": "编辑单元格", + "edit-column": "编辑列", + "transpose": "变换", + "sort": "排序", + "collapse-expand": "收起/展开列以更舒适的查看数据", + "collapse-this": "收起该列", + "collapse-other": "收起所有其他列", + "collapse-left": "收起左侧列", + "collapse-right": "收起右侧列", + "reconcile": "搭配", "match-fb": "Match this column's cells to topics on Freebase", - "reverse": "Reverse", - "remove-sort": "Remove sort", - "sort-by": "Sort by", - "sort-cell": "Sort cell values as", - "pos-blank": "Position blanks and errors", - "text": "text", - "case-sensitive": "case-sensitive", - "numbers": "numbers", - "dates": "dates", - "booleans": "booleans", - "drag-drop": "Drag and drop to re-order", + "reverse": "反转", + "remove-sort": "不排序", + "sort-by": "排序,按照", + "sort-cell": "排序,将单元格数据作为", + "pos-blank": "空白及错误处", + "text": "文本", + "case-sensitive": "大小写敏感", + "numbers": "数字", + "dates": "日期", + "booleans": "布尔", + "drag-drop": "拖拽以重新排序", "forward": "forward", - "sort-by-col": "sort by this column alone", - "smallest-first": "smallest first", - "largest-first": "largest first", - "earliest-first": "earliest first", - "latest-first": "latest first", - "false-true": "false then true", - "true-fasle": "true then false", - "valid-values": "Valid values", - "blanks": "Blanks", - "errors": "Errors", - "search-fb-topic": "Search Freebase for a topic to match all filtered cells:", - "copy-recon-judg": "Copy recon judgments from column", - "copy-to-col": "Copy to Columns", - "copy-opt": "Copying Options", + "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", @@ -599,7 +599,7 @@ "prepend-name": "prepend the original column's name to each cell", "follow-by": "followed by", "before-val": "before the cell's value", - "ignore-blank": "Ignore blank cells", + "ignore-blank": "忽略空白单元格", "fill-other": "Fill down in other columns", "spec-new-name": "Please specify the new key column's name.", "spec-new-val": "Please specify the new value column's name.", @@ -620,7 +620,7 @@ "date": "日期", "ctrl-enter": "Ctrl-Enter", "rows": "行", - "records": "数据记录", + "records": "记录", "show": "显示" }, "core-buttons": { @@ -639,7 +639,7 @@ "next": "下一步 »", "add-url": "添加另一个URL", "update-preview": "更新预览", - "pick-record": "选择数据元素", + "pick-record": "选择记录", "merge-cluster": "合并选中 & 重新簇集", "merge-close": "合并选中 & 关闭", "close": "关闭", @@ -657,9 +657,9 @@ "perform-op": "执行这些操作", "add-std-svc": "添加标准服务", "add-named-svc": "添加命名空间服务", - "start-recon": "开始调和", + "start-recon": "开始搭配", "add-service": "添加服务", - "dont-reconcile": "不要调和单元格", + "dont-reconcile": "不搭配单元格", "new-topic": "新主题", "match": "匹配", "copy": "复制", From 0f2a032fb57a513fcdeb1e59c0a679d28c7df8be Mon Sep 17 00:00:00 2001 From: plhyc1216 Date: Tue, 22 Apr 2014 22:01:23 +0800 Subject: [PATCH 11/32] =?UTF-8?q?again=E6=9B=B4=E6=96=B0=E4=B8=80=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 再翻译一点 --- .../modules/core/langs/translation-zh.json | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/main/webapp/modules/core/langs/translation-zh.json b/main/webapp/modules/core/langs/translation-zh.json index 4a43191d0..b07edf9bc 100644 --- a/main/webapp/modules/core/langs/translation-zh.json +++ b/main/webapp/modules/core/langs/translation-zh.json @@ -161,20 +161,20 @@ "distance-fun": "距离算法", "leven": "levenshtein算法", "ppm" : "PPM算法", - "ngram-size": "Ngram Size ", - "ngram-radius": "Radius ", - "block-chars": "Block Chars ", + "ngram-size": "Ngram 大小 ", + "ngram-radius": "半径(距离)", + "block-chars": "块字符数", "reorder-column": "Re-order / Remove Columns", - "drag-column": "Drag columns to re-order", - "drop-column": "Drop columns here to remove", - "template-export": "Templating Export", - "template-prefix": "Prefix", - "template-rowt": "Row Template", - "template-rows": "Row Separator", - "template-suffix": "Suffix", - "idling": "Idling...", - "updating": "Updating...", - "scatterplot-matrix": "Scatterplot Matrix", + "drag-column": "拖动列来重排序", + "drop-column": "将列丢到这里来移除", + "template-export": "导出模板", + "template-prefix": "前缀", + "template-rowt": "行模板", + "template-rows": "行分隔符", + "template-suffix": "后缀", + "idling": "空闲中...", + "updating": "正在更新...", + "scatterplot-matrix": "散点图矩阵", "focusing-on": "focusing on", "processing": "Processing...", "error-getColumnInfo": "Error calling 'get-columns-info'", From e9a9c8e2b05c4d6017d6ee389cf9e5d3e41c0897 Mon Sep 17 00:00:00 2001 From: plhyc1216 Date: Wed, 23 Apr 2014 11:23:38 +0800 Subject: [PATCH 12/32] =?UTF-8?q?=E5=8F=88=E6=9B=B4=E6=96=B0=E4=B8=80?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 又翻译一点 --- .../modules/core/langs/translation-zh.json | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/main/webapp/modules/core/langs/translation-zh.json b/main/webapp/modules/core/langs/translation-zh.json index b07edf9bc..59c72e538 100644 --- a/main/webapp/modules/core/langs/translation-zh.json +++ b/main/webapp/modules/core/langs/translation-zh.json @@ -164,7 +164,7 @@ "ngram-size": "Ngram 大小 ", "ngram-radius": "半径(距离)", "block-chars": "块字符数", - "reorder-column": "Re-order / Remove Columns", + "reorder-column": "重排 / 移除列", "drag-column": "拖动列来重排序", "drop-column": "将列丢到这里来移除", "template-export": "导出模板", @@ -176,22 +176,22 @@ "updating": "正在更新...", "scatterplot-matrix": "散点图矩阵", "focusing-on": "focusing on", - "processing": "Processing...", - "error-getColumnInfo": "Error calling 'get-columns-info'", - "no-column-dataset": "There are no columns in this dataset", - "linear-plot": "Linear Plot", - "logarithmic-plot": "Logarithmic Plot", - "rotated-counter-clock": "Rotated 45° Counter-Clockwise", - "no-rotation": "No rotation", - "rotated-clock": "Rotated 45° Clockwise", - "small-dot": "Small Dot Size", - "regular-dot": "Regular Dot Size", - "big-dot": "Big Dot Size", - "cell-fields": "The current cell. It has a few fields: 'value' and 'recon'.", - "cell-value": "The current cell's value. This is a shortcut for 'cell.value'.", - "row-fields": "The current row. It has 5 fields: 'flagged', 'starred', 'index', 'cells', and 'record'.", - "cells-of-row": "The cells of the current row. This is a shortcut for 'row.cells'. A particular cell can be retrieved with 'cells.' if the is a single word, or with 'cells[\"\"] otherwise.", - "row-index": "The current row's index. This is a shortcut for 'row.index'.", + "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的简写. 如果是一个字的话,那么可以通过'cells.'来使用它,否则需要使用cells[']", + "row-index": "当前行的索引. 它是'row.index'的简写.", "returns": "returns", "from": "From", "expression": "表达式", @@ -205,27 +205,27 @@ "history": "历史", "starred": "星标", "help": "帮助", - "opt-code-applied": "Option code successfully applied.", - "error-apply-code": "Error applying option code", - "custom-tab-exp": "Custom Tabular Exporter", - "content": "Content", - "download": "Download", - "upload": "Upload", - "opt-code": "Option Code", - "sel-and-ord": "Select and Order Columns to Export", - "opt-for": "Options for", - "for-recon-cell": "For reconciled cells, output", - "match-ent-name": "Matched entity's name", - "cell-content": "Cell's content", - "match-ent-id": "Matched entity's ID", - "link-match": "Link to matched entity's page", - "out-not-unmatch": "Output nothing for unmatched cells", - "date-format": "For date/time values, use format", - "date-iso": "ISO 8601, e.g., 2011-08-24T18:36:10+08:00", - "short-format": "Short locale format", - "medium-format": "Medium locale format", - "long-format": "Long locale format", - "full-format": "Full locale format", + "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": "略过时间", @@ -243,7 +243,7 @@ "char-enc": "字符编码", "line-sep": "行分隔符", "upload-to": "上传至", - "json-text": "The following JSON text encodes the options you have set in the other tabs. You can copy it out and save it for later, and paste it back in and click Apply to re-use the same options." + "json-text": "你在其他选项卡中所设置的配置项会被编码为下面的JSON文本,你可以将他复制出来然后存储以备将来可以将其粘贴来重用这些配置项." }, "core-facets": { "remove-facet": "移除这个归类", @@ -388,8 +388,8 @@ "core-views": { "edit-cell": "编辑这个单元格", "choose-match": "选择新的匹配", - "match-all-cells": "Match this topic to this and all identical cells", - "match-this-cell": "Match this topic to this cell", + "match-all-cells": "", + "match-this-cell": "搭配这个主题和此单元格", "create-topic-cells": "为该单元格及与其相同的单元格创建主题", "create-topic-cell": "为这个单元格创建新主题", "create-topic": "创建新主题", @@ -415,7 +415,7 @@ "collapse-left": "收起左侧列", "collapse-right": "收起右侧列", "reconcile": "搭配", - "match-fb": "Match this column's cells to topics on Freebase", + "match-fb": "将此列的单元格与Freebase中的主题搭配", "reverse": "反转", "remove-sort": "不排序", "sort-by": "排序,按照", From 65c13c969876d97e7004bb4fccff3744a0172e5d Mon Sep 17 00:00:00 2001 From: plhyc1216 Date: Wed, 23 Apr 2014 15:47:06 +0800 Subject: [PATCH 13/32] =?UTF-8?q?=E9=99=A4freebase=E4=B9=8B=E5=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 出freebase那块的翻译更新 --- .../modules/core/langs/translation-zh.json | 386 +++++++++--------- 1 file changed, 193 insertions(+), 193 deletions(-) diff --git a/main/webapp/modules/core/langs/translation-zh.json b/main/webapp/modules/core/langs/translation-zh.json index 59c72e538..8ef9299c8 100644 --- a/main/webapp/modules/core/langs/translation-zh.json +++ b/main/webapp/modules/core/langs/translation-zh.json @@ -185,8 +185,8 @@ "no-rotation": "不旋转", "rotated-clock": "顺时针旋转45°", "small-dot": "小网点尺寸", - "regular-dot": "正常点尺寸", - "big-dot": "大点尺寸", + "regular-dot": "正常网点尺寸", + "big-dot": "大网点尺寸", "cell-fields": "当前的单元格. 它包含如下字段:'value'和'recon'。", "cell-value": "当前单元格的值. 它是cell.value的简写.", "row-fields": "当前的行. 它包含以下5个字段: 'flagged', 'starred', 'index', 'cells'和'record'.", @@ -254,36 +254,36 @@ "sort-by": "排序,按照", "name": "名称", "count": "数量", - "cluster": "簇", + "cluster": "簇集", "current-exp": "当前表达式", - "facet-choices": "Facet Choices as Tab Separated Values", + "facet-choices": "将归类信息作为用tab分隔的值", "loading": "载入中...", - "too-many-choices": "choices total, too many to display", - "set-choice-count": "Set choice count limit", - "edit": "edit", - "facet-by-count": "Facet by choice counts", - "edit-based-col": "Edit Facet's Expression based on Column", - "edit-facet-exp": "Edit Facet's Expression", - "set-max-choices": "Set the maximum number of choices shown in each text facet (too many will slow down the application)", - "case-sensitive": "case sensitive", - "regular-exp": "regular expression", - "time": "Time", - "non-time": "Non-Time", - "blank": "Blank", - "error": "Error", - "unknown-error": "Unknown error", - "linear-plot": "Linear Plot", + "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": "Logarithmic Plot", + "logar-plot": "对数模型图", "logar-plot-abbr": "log", - "rotated-counter-clock": "Rotated 45° Counter-Clockwise", - "no-rotation": "No rotation", - "rotated-clock": "Rotated 45° Clockwise", - "small-dot": "Small Dot Size", - "regular-dot": "Regular Dot Size", - "big-dot": "Big Dot Size", - "export-plot": "export plot", - "numeric": "Numeric" + "rotated-counter-clock": "逆时针旋转45°", + "no-rotation": "不旋转", + "rotated-clock": "顺时针旋转45°", + "small-dot": "小网点尺寸", + "regular-dot": "正常网点尺寸", + "big-dot": "大网点尺寸", + "export-plot": "导出网点", + "numeric": "数值型" }, "core-project": { "open": "打开", @@ -296,43 +296,43 @@ "extensions": "扩展", "proj-name": "单击以重命名", "use-facets": "使用归类和过滤器", - "use-to-select": "Use facets and filters to select subsets of your data to act on. Choose facet and filter methods from the menus at the top of each data column.", - "not-sure": "Not sure how to get started?", - "watch-cast": "Watch these screencasts", - "refreshing-facet": "Refreshing facets...", - "update-facets": "Update all facets", - "clear-selection": "Clear selection in all facets", - "remove-all": "Remove all facets", - "export-project": "Export project", - "tab-value": "Tab-separated value", - "comma-sep": "Comma-separated value", - "html-table": "HTML table", + "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 spreadsheet", + "odf": "ODF 电子表格", "triple-loader": "Triple loader", "mqlwrite": "MQLWrite", - "custom-tabular": "Custom tabular exporter...", - "templating": "Templating...", + "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": "The JSON you pasted is invalid", - "undo-history": "Infinite undo history", - "mistakes": "Don't worry about making mistakes. Every change you make will be shown here, and you can undo your changes anytime.", - "learn-more": "Learn more »", - "apply": "Apply…", - "extract": "Extract…", - "filter": "Filter:", - "extract-history": "Extract Operation History", - "extract-save": "Extract and save parts of your operation history as JSON that you can apply to this or other projects in the future.", - "apply-operation": "Apply Operation History", - "paste-json": "Paste an extracted JSON history of operations to perform:", - "complete": "complete", - "other-processes": "other pending processes", - "other-process": "other pending process", - "cancel-all": "Cancel All", - "cancel": "Cancel", - "canceling": "Canceling...", - "last-op-er": "The last operation encountered some errors", - "continue-remaining": "Continue with the remaining operations", + "json-invalid": "贴入的JSON不正确", + "undo-history": "无尽的撤销历史", + "mistakes": "不要怕出错。你所做的所有更爱都会展示此,并且你可以随时撤销这些更改.", + "learn-more": "了解更多 »", + "apply": "应用…", + "extract": "提取…", + "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": { @@ -364,7 +364,7 @@ "fb-key": "a Freebase key in", "fb-en-ns": "英文维基命名空间", "this-ns": "该命名空间:", - "max-candidates" : "Maximum number of candidates to return" + "max-candidates" : "最大候选服务返回数量" }, "core-util-enc": { @@ -419,15 +419,15 @@ "reverse": "反转", "remove-sort": "不排序", "sort-by": "排序,按照", - "sort-cell": "排序,将单元格数据作为", - "pos-blank": "空白及错误处", + "sort-cell": "排序,依据", + "pos-blank": "空白错误等排序方式", "text": "文本", "case-sensitive": "大小写敏感", "numbers": "数字", "dates": "日期", "booleans": "布尔", "drag-drop": "拖拽以重新排序", - "forward": "forward", + "forward": "前进", "sort-by-col": "仅按此列排序", "smallest-first": "从小到大", "largest-first": "从大到小", @@ -448,9 +448,9 @@ "match-recon": "match recon judgments", "warning-other-col": "Please select some other column to copy to.", "warning-sel-judg": "Please select at least one kind of judgment to copy.", - "start-recon": "Start reconciling", + "start-recon": "开始搭配数据", "recon-text-fb": "Reconcile text in this column with topics on Freebase", - "facets": "Facets", + "facets": "归类", "by-judg": "By judgment", "best-score": "Best candidate's score", "best-cand-score": "best candidate's score", @@ -485,135 +485,135 @@ "clear-recon2": "Clear reconciliation data in this column for all current filtered rows", "copy-recon": "Copy reconciliation data...", "copy-recon2": "Copy this column's reconciliation data to other columns", - "custom-facet": "Custom Facet on column", - "custom-numeric-label": "Custom Numeric Facet on column", - "custom-numeric": "Custom Numeric Facet", - "text-facet": "Text facet", - "numeric-facet": "Numeric facet", - "timeline-facet": "Timeline facet", - "scatterplot-facet": "Scatterplot facet", - "custom-text-facet": "Custom text facet", - "custom-facets": "Customized facets", - "word-facet": "Word facet", - "duplicates-facet": "Duplicates facet", - "numeric-log-facet": "Numeric log facet", - "bounded-log-facet": "1-bounded numeric log facet", - "text-length-facet": "Text length facet", - "log-length-facet": "Log of text length facet", - "unicode-facet": "Unicode char-code facet", - "facet-error": "Facet by error", - "facet-blank": "Facet by blank", - "text-filter": "Text filter", - "add-col-col": "Add column based on column", - "new-col-name": "New column name", - "on-error": "On error", - "set-blank": "set to blank", - "store-err": "store error", - "copy-val": "copy value from original column", - "warning-col-name": "You must enter a column name.", - "add-col-fetch": "Add column by fetching URLs based on column", - "throttle-delay": "Throttle delay", - "milli": "milliseconds", - "url-fetch": "Formulate the URLs to fetch:", - "enter-col-name": "Enter new column name", - "split-col": "Split column", - "several-col": "into several columns", - "how-split": "How to Split Column", - "by-sep": "by separator", - "separator": "Separator", - "reg-exp": "regular expression", - "split-into": "Split into", - "col-at-most": "columns at most (leave blank for no limit)", - "field-len": "by field lengths", - "list-int": "List of integers separated by commas, e.g., 5, 7, 15", - "after-split": "After Splitting", - "guess-cell": "Guess cell type", - "remove-col": "Remove this column", - "specify-sep": "Please specify a separator.", + "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": "Split into several columns", - "add-based-col": "Add column based on this column", - "add-by-urls": "Add column by fetching URLs", - "rename-col": "Rename this column", - "move-to-beg": "Move column to beginning", - "move-to-end": "Move column to end", - "move-to-left": "Move column left", - "move-to-right": "Move column right", - "show-as": "Show as", - "first": "first", - "previous": "previous", - "next": "next", - "last": "last", - "all": "All", - "facet-star": "Facet by star", - "starred-rows": "Starred Rows", - "facet-flag": "Facet by flag", - "flagged-rows": "Flagged Rows", - "edit-rows": "Edit rows", - "star-rows": "Star rows", - "unstar-rows": "Unstar rows", - "flag-rows": "Flag rows", - "unflag-rows": "Unflag rows", - "remove-matching": "Remove all matching rows", - "edit-col": "Edit columns", - "reorder-remove": "Re-order / remove columns", - "view": "View", - "collapse-all": "Collapse all columns", - "expand-all": "Expand all columns", - "reorder-perma": "Reorder rows permanently", - "by": "By", - "custom-text-trans": "Custom text transform on column", - "keep-or": "keep original", - "re-trans": "Re-transform up to", - "times-chang": "times until no change", - "enter-separator": "Enter separator to use between values", - "what-separator": "What separator currently separates the values?", - "transform": "Transform", - "common-transform": "Common transforms", - "trim-all": "Trim leading and trailing whitespace", - "collapse-white": "Collapse consecutive whitespace", - "unescape-html": "Unescape HTML entities", - "titlecase": "To titlecase", - "uppercase": "To uppercase", - "lowercase": "To lowercase", - "to-number": "To number", - "to-date": "To date", - "to-text": "To text", - "blank-out": "Blank out cells", - "fill-down": "Fill down", - "blank-down": "Blank down", - "split-cells": "Split multi-valued cells", - "join-cells": "Join multi-valued cells", - "cluster-edit": "Cluster and edit", - "transp-cell": "Transpose Cells Across Columns into Rows", - "from-col": "From Column", - "to-col": "To Column", - "transp-into": "Transpose into", - "two-new-col": "Two new columns", - "key-col": "Key Column", - "contain-names": "(containing original columns' names)", - "val-col": "Value Column", - "contain-val": "(containing original cells' values)", - "one-col": "One column", - "prepend-name": "prepend the original column's name to each cell", - "follow-by": "followed by", - "before-val": "before the cell's value", + "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": "Fill down in other columns", - "spec-new-name": "Please specify the new key column's name.", - "spec-new-val": "Please specify the new value column's name.", - "spec-col-name": "Please specify the new column's name.", - "spec-separator": "Please specify the separator between original column names and cell values.", - "how-many-rows": "How many rows to transpose?", - "expect-two": "Expected an integer at least 2.", - "columnize": "Columnize by Key/Value Columns", - "note-col": "Note Column (optional)", - "sel-col-val": "Please select one key column and one value column that are different from one another.", - "cannot-same": "If specified, the note column cannot be the same as the key column or the value column.", - "transp-cell-row": "Transpose cells across columns into rows", - "transp-cell-col": "Transpose cells in rows into columns", - "columnize-col": "Columnize by key/value columns", + "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": "布尔", From a8ccdd07392d7d239b8bb64c0989a02ebda70fe3 Mon Sep 17 00:00:00 2001 From: Frank Wennerdahl Date: Fri, 16 May 2014 14:37:24 +0200 Subject: [PATCH 14/32] Added system property refine.max_form_content_size To allow configuring the maximum allowed form content size in Jetty. --- server/src/com/google/refine/Refine.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/com/google/refine/Refine.java b/server/src/com/google/refine/Refine.java index 99500ee9c..a5aa349b9 100644 --- a/server/src/com/google/refine/Refine.java +++ b/server/src/com/google/refine/Refine.java @@ -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); From 2624e2a65c81f78ec5c09852c8b592b49c1a0cff Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Mon, 26 May 2014 18:12:14 -0400 Subject: [PATCH 15/32] Improve error messages - fixes #878 --- .../expr/functions/strings/Phonetic.java | 52 ++++++++++++------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/main/src/com/google/refine/expr/functions/strings/Phonetic.java b/main/src/com/google/refine/expr/functions/strings/Phonetic.java index 8587a5e7a..004e647f5 100644 --- a/main/src/com/google/refine/expr/functions/strings/Phonetic.java +++ b/main/src/com/google/refine/expr/functions/strings/Phonetic.java @@ -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 From c1685a05c98cafbae13a26f27b58cb07820cf2ad Mon Sep 17 00:00:00 2001 From: zsxwing Date: Fri, 30 May 2014 11:18:01 +0800 Subject: [PATCH 16/32] Remove vi's swp file --- server/src/com/google/refine/.Refine.java.swp | Bin 32768 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 server/src/com/google/refine/.Refine.java.swp diff --git a/server/src/com/google/refine/.Refine.java.swp b/server/src/com/google/refine/.Refine.java.swp deleted file mode 100644 index ff46c78451c0518fdb553e8629a6c0ca81dd0e9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI53y@@2dEc*inSe;Jg-sG-bG9+sp7l)6K7>}RB&6Ay-rW}SQg_d;6a>qi?mIKR z+ugU-w|jR6EP+XELLgZK% zLgJ9$cOLhi+uidJC{9&s?$&?$KF;~hIp2AGuX}g>_{GYSI$b&yaJ)DO{^)aGtp2N8 zUL5?xJA$Cs?Zi7_Hzy{OxdHd@_ic7@ZbIZdMewWvRv^c%B{xHD@q&)Re*P3cN_E!?X@htCcZ#z<>RlLGWR)15SdcUK9jh z0v`k$Us;a2J>Y-wU3=Nb>987r~E!9*DvBfdcp z*y|B*(dl2&XRSs!XvJN3H|h>c;d(qAl)7OjDom?F7JN~dy8VE}qwxBmG#@wOa6azz z;%?NH%TAA?)?4k?U}q_AYT_GVJBgsH_9Sd-+zvNN!z8LT`cc$fqM~QRzEp6~A8HaA zjoDc>h}vyMz)75Jt3j-;Mo~`)}qR9dDKzZOST47e?>b+8eiAS&TRLW9h|m_3TQm z3RQ}t!n{_uSR3>q^19cnu)mp1!IXY{JyGTDM%0s0qu!h+L$prV zc2sEIW@IYD&z;I#p9>pmCeV|nbUj*!Z>3Ao`dqI!Pe(-C3?th_f6AKV z!fLv#B%Q+Vg}B|^ll*!sF4f}3)o1|iZY1M=59+3?_ee0A2z+mBMY7lk%c5&hJL9DU z!flt5>rCO&J+fj}*bveZ#-6gC?*4G{lXHD`iF|=2&3uM+W7zM@!e4K7qP1=-l9^}cTI~qvspmJsKFZUQ zJ(vE6<8!)c(uByL0GchMsmhXLoX|p)Tph$cx|Z>EHQbE+)xs>;JY#taR?eyVg-T7; zR?gKg%~i|Os(i7$tSaZ!+``35t-PRgin3Z=snsfHD~px-{c@|eHh)1a%q`8GFPDO1 zWqE#aZK1M!UM-i;FILW%m*>lBrK(oy7s}O3keO0*)k;kgRF>7;^8M=49Awt&j`~`y z9FTUUs);XF=1fV`>e7X>(2#8NE6erj+5q=cc9P)#}Q* zO1*ZwoS$8z6)U#pkZ`IVK0niN$lS1(rP%apqazod20o=(Xr71UPC^Od

8%R|MG;G_~`>g@fQX!CcT1g_JcfewaoV6}H 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 Date: Fri, 30 May 2014 11:45:28 +0800 Subject: [PATCH 17/32] Put ISO8601_FORMAT into ThreadLocal to fix the concurrency issue --- .../com/google/refine/util/ParsingUtilities.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/main/src/com/google/refine/util/ParsingUtilities.java b/main/src/com/google/refine/util/ParsingUtilities.java index 1843c12ee..1be4535d6 100644 --- a/main/src/com/google/refine/util/ParsingUtilities.java +++ b/main/src/com/google/refine/util/ParsingUtilities.java @@ -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 ISO8601_FORMAT = new ThreadLocal() { + + @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; } From 0d74d1a577d947de9172c275459bddf6f94054c8 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 29 May 2014 23:56:50 -0400 Subject: [PATCH 18/32] Add vim log (.swp) files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e13dc11a2..8195696c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *~ \#*# +.*.swp *.DS_Store *.class .com.apple.timemachine.supported From 27aa228507933a51cddc94f46f09fa53f790b5ad Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 19 Sep 2013 01:53:44 -0400 Subject: [PATCH 19/32] Back the test verbosity down a bit now that we have things working --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 6b5119ff6..546dffc72 100644 --- a/build.xml +++ b/build.xml @@ -173,7 +173,7 @@ - From e3cdd160d0fd32ac88ba21fce008fb2806054a69 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 19 Sep 2013 02:09:25 -0400 Subject: [PATCH 20/32] Test for issue #796 (failing until fixed) --- .../operations/cell/TransposeTests.java | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java diff --git a/main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java b/main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java new file mode 100644 index 000000000..874718d45 --- /dev/null +++ b/main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java @@ -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 exceptions = new ArrayList(); + 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); + } + +} From 5799c3d92bcfc598fd2b5a5bf19ed12ca7c3ef67 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Sat, 5 Apr 2014 12:36:40 -0400 Subject: [PATCH 21/32] Synchronize access to processes list - fixes #862 --- main/src/com/google/refine/process/ProcessManager.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main/src/com/google/refine/process/ProcessManager.java b/main/src/com/google/refine/process/ProcessManager.java index 2abb37c84..94cf150ed 100644 --- a/main/src/com/google/refine/process/ProcessManager.java +++ b/main/src/com/google/refine/process/ProcessManager.java @@ -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 _processes = new LinkedList(); + protected List _processes = Collections.synchronizedList(new LinkedList()); protected List _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(); From d106d61b252e2cd001f003a65c9c7a37184619cd Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Mon, 26 May 2014 18:12:14 -0400 Subject: [PATCH 22/32] Improve error messages - fixes #878 --- .../expr/functions/strings/Phonetic.java | 52 ++++++++++++------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/main/src/com/google/refine/expr/functions/strings/Phonetic.java b/main/src/com/google/refine/expr/functions/strings/Phonetic.java index 8587a5e7a..004e647f5 100644 --- a/main/src/com/google/refine/expr/functions/strings/Phonetic.java +++ b/main/src/com/google/refine/expr/functions/strings/Phonetic.java @@ -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 From af2ea28199f7aa9610d1605932a03df78b379a7b Mon Sep 17 00:00:00 2001 From: bountysource-support Date: Mon, 16 Jun 2014 12:12:55 -0700 Subject: [PATCH 23/32] Add Bountysource badge to README Because you have some open bounties, we thought you might want to display this badge in your README! --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50fe6f8af..f76cce343 100644 --- a/README.md +++ b/README.md @@ -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 From 07b787f535d6f5a058212c7b2a85ceeb0559247a Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 3 Jul 2014 09:03:13 -0400 Subject: [PATCH 24/32] Remove obsolete Chrome Frame support - fixes #889 --- .../webapp/modules/core/MOD-INF/controller.js | 6 ---- .../modules/core/externals/CFInstall.min.js | 10 ------ .../modules/core/scripts/chrome-frame.js | 36 ------------------- 3 files changed, 52 deletions(-) delete mode 100644 main/webapp/modules/core/externals/CFInstall.min.js delete mode 100644 main/webapp/modules/core/scripts/chrome-frame.js diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js index a0f96cb89..8c437fb9b 100644 --- a/main/webapp/modules/core/MOD-INF/controller.js +++ b/main/webapp/modules/core/MOD-INF/controller.js @@ -312,9 +312,6 @@ function init() { "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", @@ -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", diff --git a/main/webapp/modules/core/externals/CFInstall.min.js b/main/webapp/modules/core/externals/CFInstall.min.js deleted file mode 100644 index b4b9b4cf5..000000000 --- a/main/webapp/modules/core/externals/CFInstall.min.js +++ /dev/null @@ -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='

'; -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); diff --git a/main/webapp/modules/core/scripts/chrome-frame.js b/main/webapp/modules/core/scripts/chrome-frame.js deleted file mode 100644 index aa2768d04..000000000 --- a/main/webapp/modules/core/scripts/chrome-frame.js +++ /dev/null @@ -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' }); -}); \ No newline at end of file From 7f1ee08e5fcd33024cbc38bfc6c154699737fdbd Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 3 Jul 2014 09:05:39 -0400 Subject: [PATCH 25/32] Handle unsupported navigator.language on IE --- main/webapp/modules/core/scripts/index.js | 3 +-- main/webapp/modules/core/scripts/preferences.js | 3 +-- main/webapp/modules/core/scripts/project.js | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/main/webapp/modules/core/scripts/index.js b/main/webapp/modules/core/scripts/index.js index 69880d0d9..b557cdea4 100644 --- a/main/webapp/modules/core/scripts/index.js +++ b/main/webapp/modules/core/scripts/index.js @@ -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?", diff --git a/main/webapp/modules/core/scripts/preferences.js b/main/webapp/modules/core/scripts/preferences.js index 014dc46dd..20c963cbd 100644 --- a/main/webapp/modules/core/scripts/preferences.js +++ b/main/webapp/modules/core/scripts/preferences.js @@ -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?", diff --git a/main/webapp/modules/core/scripts/project.js b/main/webapp/modules/core/scripts/project.js index 657a39991..3f81b8778 100644 --- a/main/webapp/modules/core/scripts/project.js +++ b/main/webapp/modules/core/scripts/project.js @@ -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?", From 0582a06e7e2a70b5731853bd5af96f017f961111 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 3 Jul 2014 09:23:14 -0400 Subject: [PATCH 26/32] Remove more Chrome Frame references. Set IE to edge mode. --- main/webapp/modules/core/about.html | 2 +- main/webapp/modules/core/error.vt | 2 +- main/webapp/modules/core/index.vt | 2 +- main/webapp/modules/core/preferences.vt | 2 +- main/webapp/modules/core/project.vt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main/webapp/modules/core/about.html b/main/webapp/modules/core/about.html index 6aa134412..79c17f4bc 100644 --- a/main/webapp/modules/core/about.html +++ b/main/webapp/modules/core/about.html @@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + About - OpenRefine diff --git a/main/webapp/modules/core/error.vt b/main/webapp/modules/core/error.vt index 60ccff2b1..74f33a7d3 100644 --- a/main/webapp/modules/core/error.vt +++ b/main/webapp/modules/core/error.vt @@ -35,7 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + Error - OpenRefine diff --git a/main/webapp/modules/core/index.vt b/main/webapp/modules/core/index.vt index 2b9d537dc..a334ba1c1 100644 --- a/main/webapp/modules/core/index.vt +++ b/main/webapp/modules/core/index.vt @@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + OpenRefine diff --git a/main/webapp/modules/core/preferences.vt b/main/webapp/modules/core/preferences.vt index c4711058b..62c7dd56d 100644 --- a/main/webapp/modules/core/preferences.vt +++ b/main/webapp/modules/core/preferences.vt @@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + Preferences - OpenRefine diff --git a/main/webapp/modules/core/project.vt b/main/webapp/modules/core/project.vt index 071379c68..553641c60 100644 --- a/main/webapp/modules/core/project.vt +++ b/main/webapp/modules/core/project.vt @@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + OpenRefine From 8149ea39691c76dd74e4f0d885bb83ed41da207a Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 3 Jul 2014 09:27:16 -0400 Subject: [PATCH 27/32] Upgrade to jQuery 1.11.1 --- .../webapp/modules/core/MOD-INF/controller.js | 6 +- main/webapp/modules/core/about.html | 2 +- .../modules/core/externals/jquery-1.11.1.js | 10308 ++++++++++++++++ 3 files changed, 10312 insertions(+), 4 deletions(-) create mode 100644 main/webapp/modules/core/externals/jquery-1.11.1.js diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js index 8c437fb9b..141529de9 100644 --- a/main/webapp/modules/core/MOD-INF/controller.js +++ b/main/webapp/modules/core/MOD-INF/controller.js @@ -306,7 +306,7 @@ 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", @@ -378,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", @@ -483,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", diff --git a/main/webapp/modules/core/about.html b/main/webapp/modules/core/about.html index 79c17f4bc..8a95e2c1c 100644 --- a/main/webapp/modules/core/about.html +++ b/main/webapp/modules/core/about.html @@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } - +