diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..80a8704e1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,64 @@ +This document present how you can contribute to the OpenRefine project. + +## Documentation, Questions or Problem + +Our issue list is only for reporting specific bugs and requesting specific features. If you just don't know how to do something using OpenRefine, or want to discuss some ideas, please +- try the [documentation wiki](https://github.com/OpenRefine/OpenRefine/wiki/Documentation-For-Users) +- ask on the [OpenRefine mailing list](https://groups.google.com/forum/?fromgroups#!forum/openrefine). + +If you really want to file a bug or request a feature, go to this [issue list](https://github.com/OpenRefine/OpenRefine/issues). Please use the search function first to make sure a similar issue doesn't already exist. + +### Guidelines for Reporting a Bug + +When reporting a bug please provide the following information to help reproduce the bug: +- Version of OpenRefine used (Google Refine 2.6, OpenRefine2.6, an other distribution?) +- Operating Systems and version +- Browser + version used - Please note that OpenRefine doesn't support Internet Explorer +- Steps followed to create the issues +- If you are allowed, it is awesome if you can join the data generating the issue +- Current Results +- Expected Results + + +## Promote OpenRefine + +You don't need to be coder to contribute to OpenRefine. Did you wrote a tutorial or article about OpenRefine on your blog or site? Are you organizing a workshop or presentation OpenRefine in your city? Let us know via our [user discussion list](https://groups.google.com/forum/?fromgroups#!forum/openrefine) or twitter account ([@OpenRefine](http://twitter.com/OpenRefine)). We will share the news via our monthly update and via our twitter handle. + + +## Contributing code + +You can contribute code in three different way: +- fix minor bug +- develop an OpenRefine extension +- start your own distribution. + +All developers including new distributions and plugin developers are invited to leverage existing OpenRefine project managements tools to avoid the dispersion of the community in different communication channels. +- the [wiki](https://github.com/OpenRefine/OpenRefine/wiki) for shared documentation between distribution both user and [documentation for developer](https://github.com/OpenRefine/OpenRefine/wiki/Documentation-For-Developers) +- the [developer mailing list](https://groups.google.com/forum/?fromgroups#!forum/openrefine-dev) for technical questions, new feature development and anything code related. We invite you to share you idea first via the developer mailing list. Someone may be able to point out to existing development saving your hours of research and development. +- [OpenRefine github issue tracker](https://github.com/OpenRefine/OpenRefine/issues) for new feature and bug reports common with OpenRefine. + +### How to submit minor changes and bug fix + +If you make trivial changes, you can send them directly via a pull request. **Please make your changes in a new git branch and send your patch**, including appropriate test cases. + +We want to keep the quality of the trunk at a very high level, since this is ultimately where the Stable Releases are built from after bugs are fixed. Please take the time to test your changes (including travis-ci) before sending a pull request. + +OpenRefine is volunteer supported. Pull Request are reviewed and merged by [Tom Morris (@tfmorris)](https://github.com/tfmorris). All Pull Request will be answered, however it may take some time to get back to you. Thank you in advance for your patience. + +If you don't where to start and are looking for a bug to fix, please see our [issue list](https://github.com/OpenRefine/OpenRefine/issues). + +### New functionalities via plugin + +OpenRefine support a plugin architecture to extend its functionality. You can find more information on how to write extension on [our wiki](https://github.com/OpenRefine/OpenRefine/wiki/Write-An-Extension). Giuliano Tortoreto wrote a separate documentation detailling how to build extension for OpenRefine. A [LaTeX](https://github.com/OpenRefine/OpenRefineExtensionDoc) and [PDF version](https://github.com/OpenRefine/OpenRefineExtensionDoc/blob/master/main.pdf) are available. + +If you want to list your extension on the download page, please edit [this file](https://github.com/OpenRefine/openrefine.github.com/blob/master/download.md). + +### New distribution + +OpenRefine is already available in many different distribution (see the [download page](http://openrefine.org/download.html)). New distribution often package OpenRefine for a specific usage or port it. We are fine with new fork ([see discussion](https://groups.google.com/forum/#!msg/openrefine/pasNnMDJ3p8/LrZz_GiFCwAJ)) but we invite you to engage with the community to share your roadmap and progress. + +Github offer a powerful system to work between different repository and we encourage you to leverage it: +- You can cross reference issues and pull request between Github repository using `user/repository#number` ([see more here](https://github.com/blog/967-github-secrets#cross-repository-issue-references)) +- If you want to merge a Pull Request that is pending for review to you own repository check the pull request locally ([see more here](https://help.github.com/articles/checking-out-pull-requests-locally/)). + +Don't forget to contribute to the upstream (main OpenRefine) repository so your changes can be reviewed and merge and to keep other developers aware of your progress. If you want to list your distribution on the download page, please edit [this file](https://github.com/OpenRefine/openrefine.github.com/blob/master/download.md). diff --git a/main/src/com/google/refine/browsing/facets/TextSearchFacet.java b/main/src/com/google/refine/browsing/facets/TextSearchFacet.java index a7ac90622..cde2e173b 100644 --- a/main/src/com/google/refine/browsing/facets/TextSearchFacet.java +++ b/main/src/com/google/refine/browsing/facets/TextSearchFacet.java @@ -104,7 +104,7 @@ public class TextSearchFacet implements Facet { _query, _caseSensitive ? 0 : Pattern.CASE_INSENSITIVE); } catch (java.util.regex.PatternSyntaxException e) { - e.printStackTrace(); + throw new JSONException(e); } } else if (!_caseSensitive) { _query = _query.toLowerCase(); diff --git a/main/src/com/google/refine/commands/importing/GetImportingConfigurationCommand.java b/main/src/com/google/refine/commands/importing/GetImportingConfigurationCommand.java index 19a7b40ec..e07e5a774 100644 --- a/main/src/com/google/refine/commands/importing/GetImportingConfigurationCommand.java +++ b/main/src/com/google/refine/commands/importing/GetImportingConfigurationCommand.java @@ -53,6 +53,7 @@ public class GetImportingConfigurationCommand extends Command { throws ServletException, IOException { Writer w = response.getWriter(); + response.setContentType("application/json"); JSONWriter writer = new JSONWriter(w); try { writer.object(); diff --git a/main/src/com/google/refine/importing/ImportingUtilities.java b/main/src/com/google/refine/importing/ImportingUtilities.java index 922141c35..8e7438fe6 100644 --- a/main/src/com/google/refine/importing/ImportingUtilities.java +++ b/main/src/com/google/refine/importing/ImportingUtilities.java @@ -313,7 +313,7 @@ public class ImportingUtilities { } JSONUtilities.safePut(fileRecord, "declaredEncoding", encoding); String contentType = null; - if (entity.getContentType().getValue() != null) { + if (entity.getContentType() != null) { contentType = entity.getContentType().getValue(); } JSONUtilities.safePut(fileRecord, "declaredMimeType", contentType); diff --git a/main/src/com/google/refine/model/ColumnModel.java b/main/src/com/google/refine/model/ColumnModel.java index 5f3df65a0..f310d3807 100644 --- a/main/src/com/google/refine/model/ColumnModel.java +++ b/main/src/com/google/refine/model/ColumnModel.java @@ -81,14 +81,6 @@ public class ColumnModel implements Jsonizable { return ++_maxCellIndex; } - synchronized public void removeCellIndex(int index) { - if (index > _maxCellIndex - 1) - return; - - columns.remove(index); - _maxCellIndex--; - } - synchronized public void setKeyColumnIndex(int keyColumnIndex) { // TODO: check validity of new cell index, e.g., it's not in any group this._keyColumnIndex = keyColumnIndex; diff --git a/main/src/com/google/refine/operations/cell/KeyValueColumnizeOperation.java b/main/src/com/google/refine/operations/cell/KeyValueColumnizeOperation.java index 16a7c6e14..7ca3380cf 100644 --- a/main/src/com/google/refine/operations/cell/KeyValueColumnizeOperation.java +++ b/main/src/com/google/refine/operations/cell/KeyValueColumnizeOperation.java @@ -251,16 +251,10 @@ public class KeyValueColumnizeOperation extends AbstractOperation { allColumns.addAll(newColumns); allColumns.addAll(newNoteColumns); - // clean up the reused column model and row model - int smallIndex = Math.min(keyColumnIndex, valueColumnIndex); - int bigIndex = Math.max(keyColumnIndex, valueColumnIndex); - - project.columnModel.removeCellIndex(bigIndex); - project.columnModel.removeCellIndex(smallIndex); - - for (Row row : newRows) { - row.cells.remove(bigIndex); - row.cells.remove(smallIndex); + // clean up the empty rows + for (int i = newRows.size() - 1;i>=0;i--) { + if (newRows.get(i).isEmpty()) + newRows.remove(i); } return new HistoryEntry( 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 index 5354a7f45..b4d9cb766 100644 --- a/main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java +++ b/main/tests/server/src/com/google/refine/operations/cell/TransposeTests.java @@ -126,13 +126,11 @@ public class TransposeTests extends RefineTest { HistoryEntry historyEntry = process.performImmediate(); - // Expected output - -// ID;a;b;c;d -// 1;1;3;; -// 2;;4;5; -// 3;2;5;;3 - + // Expected output from the GUI. + // 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"); @@ -141,14 +139,23 @@ public class TransposeTests extends RefineTest { Assert.assertEquals(project.columnModel.columns.get(4).getName(), "d"); Assert.assertEquals(project.rows.size(), 3); - // the last 2 cells are not added as expected, the size is 5-2 - Assert.assertEquals(project.rows.get(0).cells.size(), 5 - 2); - Assert.assertEquals(project.rows.get(1).cells.size(), 5 - 1); - Assert.assertEquals(project.rows.get(2).cells.size(), 5); - + // The actual row data structure has to leave the columns model untouched for redo/undo purpose. + // So we have 2 empty columns(column 1,2) on the row level. + // 1;1;3;; Assert.assertEquals(project.rows.get(0).cells.get(0).value, "1"); - Assert.assertEquals(project.rows.get(0).cells.get(1).value, "1"); - Assert.assertEquals(project.rows.get(0).cells.get(2).value, "3"); + Assert.assertEquals(project.rows.get(0).cells.get(3).value, "1"); + Assert.assertEquals(project.rows.get(0).cells.get(4).value, "3"); + + // 2;;4;5; + Assert.assertEquals(project.rows.get(1).cells.get(0).value, "2"); + Assert.assertEquals(project.rows.get(1).cells.get(4).value, "4"); + Assert.assertEquals(project.rows.get(1).cells.get(5).value, "5"); + + // 3;2;5;;3 + Assert.assertEquals(project.rows.get(2).cells.get(0).value, "3"); + Assert.assertEquals(project.rows.get(2).cells.get(3).value, "2"); + Assert.assertEquals(project.rows.get(2).cells.get(4).value, "5"); + Assert.assertEquals(project.rows.get(2).cells.get(6).value, "3"); } diff --git a/main/webapp/modules/core/about.html b/main/webapp/modules/core/about.html index 8a95e2c1c..283b83c3b 100644 --- a/main/webapp/modules/core/about.html +++ b/main/webapp/modules/core/about.html @@ -69,7 +69,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OpenRefine is a power tool for working with messy data. Use it to improve data consistency,
- link it to data registries like Freebase, augment it with data from other sources, transform it
+ link it to data registries like Wikidata, augment it with data from other sources, transform it
into different formats for other tools to consume, and contribute it to back to the original
sources. OpenRefine is not a web service but a desktop app that runs on your own computer,
so you can process sensitive data with privacy.
diff --git a/main/webapp/modules/core/langs/translation-default.json b/main/webapp/modules/core/langs/translation-default.json
index cb6a7cf35..6e0e42bb2 100644
--- a/main/webapp/modules/core/langs/translation-default.json
+++ b/main/webapp/modules/core/langs/translation-default.json
@@ -350,21 +350,11 @@
"as-property": "As Property",
"contact-service": "Contacting reconciliation service",
"error-contact": "Error contacting recon service",
- "fb-recon": "Freebase Query-based Reconciliation",
+ "wd-recon-lang": "en",
"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",
"service-title": "Services"
},
@@ -659,7 +649,6 @@
"remove-all": "Remove All",
"perform-op": "Perform Operations",
"add-std-svc": "Add Standard Service",
- "add-named-svc": "Add Namespaced Service",
"start-recon": "Start Reconciling",
"add-service": "Add Service",
"dont-reconcile": "Don't Reconcile Cell",
diff --git a/main/webapp/modules/core/langs/translation-en.json b/main/webapp/modules/core/langs/translation-en.json
index ccd67afa2..011202728 100644
--- a/main/webapp/modules/core/langs/translation-en.json
+++ b/main/webapp/modules/core/langs/translation-en.json
@@ -350,21 +350,11 @@
"as-property": "As Property",
"contact-service": "Contacting reconciliation service",
"error-contact": "Error contacting recon service",
- "fb-recon": "Freebase Query-based Reconciliation",
+ "wd-recon-lang": "en",
"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",
"service-title": "Services"
},
@@ -659,7 +649,6 @@
"remove-all": "Remove All",
"perform-op": "Perform Operations",
"add-std-svc": "Add Standard Service",
- "add-named-svc": "Add Namespaced Service",
"start-recon": "Start Reconciling",
"add-service": "Add Service",
"dont-reconcile": "Don't Reconcile Cell",
diff --git a/main/webapp/modules/core/langs/translation-es.json b/main/webapp/modules/core/langs/translation-es.json
index 395d2bdbf..c899bd5e0 100644
--- a/main/webapp/modules/core/langs/translation-es.json
+++ b/main/webapp/modules/core/langs/translation-es.json
@@ -350,21 +350,11 @@
"as-property": "Como propiedad",
"contact-service": "Contactando al servicio",
"error-contact": "Error contactando al servicio",
- "fb-recon": "Freebase basado en consulta",
+ "wd-recon-lang": "es",
"recon-col": "Cotejar columna",
"pick-service": "Seleccione un servicio o extensión a la izquierda",
- "add-recon-srv": "Agregar servicio namespace",
- "namespace": "Espacio de nombres",
- "ent-type": "Clase de la entidad (opcional)",
- "add-std-srv": "Agregar servicio estándar",
"enter-url": "Ingrese la uRL del servicio",
- "specify-ns": "Por favor especifique un namespace.",
"cell-contains": "Cada celda contiene:",
- "fb-id": "un ID de Freebase, p. ej., /en/solar_system",
- "fb-guid": "un GUID de Freebase GUID, p. ej., #9202a8c04000641f80000000000354ae",
- "fb-key": "una llave de Freebase en",
- "fb-en-ns": "El namespace de Wikipedia en Inglés",
- "this-ns": "este namespace:",
"max-candidates" : "Máximo número de candidatos a devolver",
"service-title": "Servicios"
},
@@ -658,7 +648,6 @@
"remove-all": "Remover todos",
"perform-op": "Ejecutar Operaciones",
"add-std-svc": "Agregar servicio estándar",
- "add-named-svc": "Agregar servicio con espacio de nombres",
"start-recon": "Cotejar",
"add-service": "Agragar servicio",
"dont-reconcile": "No reconciliar celdas",
diff --git a/main/webapp/modules/core/langs/translation-fr.json b/main/webapp/modules/core/langs/translation-fr.json
index da332f41c..973df0d87 100644
--- a/main/webapp/modules/core/langs/translation-fr.json
+++ b/main/webapp/modules/core/langs/translation-fr.json
@@ -350,21 +350,11 @@
"as-property": "Comme propriété",
"contact-service": "Connexion au service de réconciliation",
"error-contact": "Erreur lors de la connexion au service de réconciliation",
- "fb-recon": "Réconciliation basée sur des requêtes Freebase",
+ "wd-recon-lang": "fr",
"recon-col": "Réconcilier la colonne",
"pick-service": "Choisir un service ou une extension à gauche",
- "add-recon-srv": "Ajouter un service de réconciliation avec un espace de noms",
- "namespace": "Espace de noms",
- "ent-type": "Type des entités (facultatif)",
- "add-std-srv": "Ajouter un service de réconciliation standard",
"enter-url": "Indiquer l’URL du service",
- "specify-ns": "Merci d’indiquer un espace de nom.",
"cell-contains": "Chaque cellule contient :",
- "fb-id": "un ID Freebase, par exemple /en/solar_system",
- "fb-guid": "un GUID Freebase, par exemple #9202a8c04000641f80000000000354ae",
- "fb-key": "une clé Freebase",
- "fb-en-ns": "l’espace de noms Wikipedia English",
- "this-ns": "cet espace de noms :",
"max-candidates" : "Nombre maximal de candidats renvoyés",
"service-title": "Services"
},
@@ -658,7 +648,6 @@
"remove-all": "Tout supprimer",
"perform-op": "Lancer les opérations",
"add-std-svc": "Ajouter un service standard",
- "add-named-svc": "Ajouter un service avec un espace de noms",
"start-recon": "Démarrer la réconciliation",
"add-service": "Ajouter un service",
"dont-reconcile": "Ne pas réconcilier la cellule",
diff --git a/main/webapp/modules/core/langs/translation-it.json b/main/webapp/modules/core/langs/translation-it.json
index 8a49215cd..1027e8351 100644
--- a/main/webapp/modules/core/langs/translation-it.json
+++ b/main/webapp/modules/core/langs/translation-it.json
@@ -350,21 +350,11 @@
"as-property": "Come Proprietà",
"contact-service": "Contattando il servizio di riconciliazione",
"error-contact": "Errore durante il contatto del servizio di riconciliazione",
- "fb-recon": "Riconciliazione Freebase basata su query",
+ "wd-recon-lang": "it",
"recon-col": "Riconcilia la colonna",
"pick-service": "Seleziona un Servizio o Estensione sulla Sinistra",
- "add-recon-srv": "Aggiungi un servizio di riconciliazione con Namespace",
- "namespace": "Namespace",
- "ent-type": "Tipo di entità (opzionale)",
- "add-std-srv": "Aggiungi un Servizio di Riconciliazione Standard",
"enter-url": "Inserisci l'URL del servizio",
- "specify-ns": "Specifica uno Namespace.",
"cell-contains": "Ogni cella contiene:",
- "fb-id": "un Freebase ID, es: /en/solar_system",
- "fb-guid": "un Freebase GUID, es: #9202a8c04000641f80000000000354ae",
- "fb-key": "Una chiave Freebase nel",
- "fb-en-ns": "namespace di Wikipedia inglese",
- "this-ns": "questo namespace:",
"max-candidates" : "Maximum number of candidates to return [TODO - translate]",
"service-title": "Servizi"
},
@@ -658,7 +648,6 @@
"remove-all": "Rimuovi tutti",
"perform-op": "Esegui le operazioni",
"add-std-svc": "Aggiungi un servizio standard",
- "add-named-svc": "Aggiungi un servizio con namespace",
"start-recon": "Inizia la riconciliazione",
"add-service": "Aggiungi servizio",
"dont-reconcile": "Non riconciliare la cella",
diff --git a/main/webapp/modules/core/langs/translation-jp.json b/main/webapp/modules/core/langs/translation-jp.json
new file mode 100644
index 000000000..ed39db29d
--- /dev/null
+++ b/main/webapp/modules/core/langs/translation-jp.json
@@ -0,0 +1,660 @@
+{
+ "name" : "日本語",
+ "core-index": {
+ "slogan": "汚いデータを処理するためのパワーツール",
+ "help": "ヘルプ",
+ "about": "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, と Google Data documents がサポートされています。他の形式のサポートはOpenRefineのエクステンションにより追加できます。",
+ "from": "データを取得する"
+ },
+ "core-index-import": {
+ "import-proj": "プロジェクトをインポートする",
+ "locate": "プロジェクトファイルを選択する (.tar or .tar.gz):",
+ "file": "プロジェクト名:",
+ "rename": "プロジェクト名を変更 (任意):",
+ "inspecting": "選択したファイルを検査中 ...",
+ "warning-name": "プロジェクト名をつけてください。",
+ "errors": "エラー:",
+ "creating-proj": "プロジェクト作成中 ...",
+ "import": "インポートしますか?",
+ "name": "名前",
+ "mime-type": "Mime-type",
+ "format": "フォーマット",
+ "size": "サイズ",
+ "warning-select": "1つ以上のファイルを選択してください。",
+ "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": "コンピューター上の1つ以上のファイルを選択する:",
+ "enter-url": "データをダウンロードするためにURLを入力してください:",
+ "clipboard-label": "クリップボードからここにデータを貼り付けてください:",
+ "import-worksheet": "インポートするワークシート",
+ "column-widths": "カラム幅:",
+ "column-names": "カラム名:",
+ "comma-separated": "カンマ区切り数値",
+ "optional-separated": "オプション, カンマ区切り",
+ "warning-record-path": "レコードの最初のパスを指定してください。",
+ "pick-nodes": "レコードノードを選択",
+ "char-encoding": "文字エンコーディング"
+ },
+ "core-index-open": {
+ "open-proj" : "プロジェクトを開く",
+ "name": "名前",
+ "rename": "リネーム",
+ "last-mod": "最終更新日時",
+ "del-title": "プロジェクトを削除",
+ "del-body": "プロジェクトを削除してもよろしいですか \"",
+ "new-title": "新しいプロジェクト名:",
+ "warning-rename": "プロジェクトのリネームに失敗しました:",
+ "warning-proj-name": "プロジェクト名を指定してください。",
+ "warning-data-file": "データかURLを指定してください。",
+ "browse": "作業ディレクトリを閲覧"
+ },
+ "core-index-lang": {
+ "lang-settings": "言語設定",
+ "label": "言語を選択する",
+ "send-req": "変更",
+ "page-reload": "変更を適用するためにページを再読み込みしてください。"
+ },
+ "core-index-parser":{
+ "ignore-first": "先頭を無視",
+ "lines-beg": "開始行",
+ "parse-next": "次をパース",
+ "lines-header": "カラムのヘッダーとして",
+ "discard-initial": "イニシャルを削除",
+ "rows-data": "行",
+ "load-at-most": "最大読み込み行",
+ "parse-cell": "セルのテキストをパース
数字, 日付, ...",
+ "store-blank": "空白行を保存",
+ "store-nulls": "nullとして空白セルを保存",
+ "store-source": "各行に
ファイルソース
(ファイルネーム, URLs)を保存",
+ "preserve-empty": "空文字を保存",
+ "trim": "文字列の先頭と文末の空白を削除",
+ "json-parser": "ロードする最初のレコードに対応した最初のJSON { } ノードをクリック",
+ "parse-every": "すべてをパース",
+ "lines-into-row": "行を1行に",
+ "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": "選択結果の平均長",
+ "choice-var-length": "選択結果の長さ分散",
+ "found": "結果",
+ "filtered-from": "フィルター ",
+ "from-total": " の中",
+ "cluster-descr": "この機能は別の表現形式かもしれない異なったセル値のグループを探すのに役立ちます。たとえば、\"New York\" と \"new york\" は非常に似た概念ですが表記の違いがあります。また、 \"Gödel\" と \"Godel\" は多分同じ人を示します。",
+ "find-more": "詳細はこちら ...",
+ "method": "メソッド ",
+ "key-collision": "キー衝突法",
+ "nearest-neighbor": "最近傍法",
+ "keying-function": "Keying Function ",
+ "fingerprint": "fingerprint",
+ "ngram": "ngram-fingerprint",
+ "metaphone": "metaphone3",
+ "phonetic": "cologne-phonetic",
+ "distance-fun": "Distance Function ",
+ "leven": "レーベンシュタイン距離法",
+ "ppm" : "PPM",
+ "ngram-size": "Ngram Size ",
+ "ngram-radius": "Radius ",
+ "block-chars": "Block Chars ",
+ "reorder-column": "カラムを並べ替え/削除",
+ "drag-column": "ドラッグして並べ替え",
+ "drop-column": "ここにドラッグし削除",
+ "template-export": "テンプレートの出力",
+ "template-prefix": "接頭辞",
+ "template-rowt": "行テンプレート",
+ "template-rows": "行区切り",
+ "template-suffix": "接尾辞",
+ "idling": "アイドリング中...",
+ "updating": "アップデート中...",
+ "scatterplot-matrix": "散布図行列",
+ "focusing-on": "focusing on",
+ "processing": "処理中...",
+ "error-getColumnInfo": "'get-columns-info'エラー",
+ "no-column-dataset": "データセットにカラムがありません",
+ "linear-plot": "Linear Plot",
+ "logarithmic-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": "現在の行: 'flagged', 'starred', 'index', 'cells','record'の5つのフィールドを持つ",
+ "cells-of-row": "現在の行のセル: 'row.cells'がショートカットである。特定のセルはもしカラム名が単語であれば'cells.
+
+
@@ -54,7 +54,7 @@
-
+
diff --git a/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js b/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js
index 4bf3b9d4f..381032c54 100644
--- a/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js
+++ b/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js
@@ -23,8 +23,8 @@ 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
+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.
@@ -37,9 +37,9 @@ function ClusteringDialog(columnName, expression) {
this._method = "binning";
this._function = "fingerprint";
this._params = {};
-
+
this._facets = [];
-
+
this._createDialog();
this._cluster();
}
@@ -50,7 +50,7 @@ ClusteringDialog.prototype._createDialog = function() {
this._elmts = DOM.bind(dialog);
this._elmts.dialogHeader.text($.i18n._('core-dialogs')["cluster-edit"]+' "' + this._columnName + '"');
-
+
this._elmts.or_dialog_descr.html($.i18n._('core-dialogs')["cluster-descr"]);
this._elmts.or_dialog_findMore.html($.i18n._('core-dialogs')["find-more"]);
this._elmts.or_dialog_method.html($.i18n._('core-dialogs')["method"]);
@@ -66,14 +66,14 @@ ClusteringDialog.prototype._createDialog = function() {
this._elmts.or_dialog_ppm.html($.i18n._('core-dialogs')["ppm"]);
this._elmts.or_dialog_ngramSize.html($.i18n._('core-dialogs')["ngram-size"]);
this._elmts.or_dialog_radius.html($.i18n._('core-dialogs')["ngram-radius"]);
- this._elmts.or_dialog_blockChars.html($.i18n._('core-dialogs')["block-chars"]);
+ this._elmts.or_dialog_blockChars.html($.i18n._('core-dialogs')["block-chars"]);
this._elmts.selectAllButton.html($.i18n._('core-buttons')["select-all"]);
this._elmts.deselectAllButton.html($.i18n._('core-buttons')["unselect-all"]);
this._elmts.exportClusterButton.html($.i18n._('core-buttons')["export-cluster"]);
this._elmts.applyReClusterButton.html($.i18n._('core-buttons')["merge-cluster"]);
this._elmts.applyCloseButton.html($.i18n._('core-buttons')["merge-close"]);
this._elmts.closeButton.html($.i18n._('core-buttons')["close"]);
-
+
this._elmts.methodSelector.change(function() {
var selection = $(this).find("option:selected").text();
if (selection == $.i18n._('core-dialogs')["key-collision"]) {
@@ -88,56 +88,56 @@ ClusteringDialog.prototype._createDialog = function() {
self._elmts.distanceFunctionSelector.change();
}
});
-
+
var changer = function() {
- self._function = $(this).find("option:selected").text();
+ self._function = $(this).find("option:selected").val();
$(".function-params").hide();
$("#" + self._function + "-params").show();
params_changer();
};
-
+
this._elmts.keyingFunctionSelector.change(changer);
this._elmts.distanceFunctionSelector.change(changer);
-
+
var params_changer = function() {
self._params = {};
$(".dialog-body input.param:visible").each(function() {
var e = $(this);
var name = e.attr('name');
var datatype = e.attr('datatype') || 'string';
- var value = e.val();
+ var value = e.val();
if (datatype == 'int') {
value = parseInt(value,10);
} else if (datatype == 'float') {
value = parseFloat(value);
- }
+ }
self._params[name] = value;
});
self._cluster();
};
-
+
this._elmts.ngramSize.change(params_changer);
this._elmts.radius.change(params_changer);
this._elmts.ngramBlock.change(params_changer);
-
+
this._elmts.selectAllButton.click(function() { self._selectAll(); });
this._elmts.deselectAllButton.click(function() { self._deselectAll(); });
this._elmts.exportClusterButton.click(function() { self._onExportCluster(); });
this._elmts.applyReClusterButton.click(function() { self._onApplyReCluster(); });
this._elmts.applyCloseButton.click(function() { self._onApplyClose(); });
this._elmts.closeButton.click(function() { self._dismiss(); });
-
+
this._level = DialogSystem.showDialog(dialog);
};
ClusteringDialog.prototype._renderTable = function(clusters) {
var self = this;
-
+
var container = this._elmts.tableContainer;
-
+
if (clusters.length > 0) {
var table = $(' ').addClass("clustering-dialog-entry-table")[0];
-
+
var trHead = table.insertRow(table.rows.length);
trHead.className = "header";
$(trHead.insertCell(0)).text($.i18n._('core-dialogs')["cluster-size"]);
@@ -149,9 +149,9 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
var renderCluster = function(cluster) {
var tr = table.insertRow(table.rows.length);
tr.className = table.rows.length % 2 === 0 ? "odd" : "even";
-
+
$(tr.insertCell(0)).text(cluster.choices.length);
-
+
$(tr.insertCell(1)).text(cluster.rowCount);
var facet = {
@@ -167,7 +167,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
"s":[
]
};
-
+
var ul = $('
');
var choices = cluster.choices;
var rowCount = 0;
@@ -175,7 +175,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
var parent = $(this).closest("tr");
var value = $(this).text();
cluster.value = value;
-
+
parent.find("input[type='text']").val(value);
var checkbox = parent.find("input[type='checkbox']");
checkbox.prop('checked', true).change();
@@ -195,7 +195,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
};
li.appendTo(ul);
}
-
+
var params = [
"project=" + encodeURIComponent(theProject.id),
"ui=" + encodeURIComponent(JSON.stringify({
@@ -205,7 +205,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
var url = "project?" + params.join("&");
var div = $('').addClass("clustering-dialog-value-focus");
-
+
var browseLink = $(''+$.i18n._('core-dialogs')["browse-this-cluster"]+'')
.addClass("clustering-dialog-browse-focus")
.attr("href",url)
@@ -217,7 +217,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
.mouseleave(function() { browseLink.css("visibility", "hidden"); })
.append(ul)
.append(div);
-
+
var editCheck = $('')
.change(function() {
cluster.edit = this.checked;
@@ -226,26 +226,26 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
if (cluster.edit) {
editCheck.attr("checked", "true");
}
-
+
var input = $('')
.attr("value", cluster.value)
.bind("keyup change input",function() {
cluster.value = this.value;
}).appendTo(tr.insertCell(4));
};
-
+
for (var i = 0; i < clusters.length; i++) {
renderCluster(clusters[i]);
}
-
+
container.empty().append(table);
-
+
this._elmts.resultSummary.html(
(clusters.length === this._clusters.length) ?
("" + this._clusters.length + " cluster" + ((this._clusters.length != 1) ? "s" : "") + " "+$.i18n._('core-dialogs')["found"]) :
("" + clusters.length + " cluster" + ((clusters.length != 1) ? "s" : "") + " "+$.i18n._('core-dialogs')["filtered-from"]+ this._clusters.length +$.i18n._('core-dialogs')["from-total"] )
);
-
+
} else {
container.html(
'
' +
'
' +
'' +
- ' ' +
''+$.i18n._('core-facets')["case-sensitive"]+' ' +
- ''+$.i18n._('core-facets')["regular-exp"]+' ' +
+ '' +
+ ' ' +
'
-
@@ -31,4 +30,4 @@
-
\ No newline at end of file
+
diff --git a/main/webapp/modules/core/scripts/reconciliation/recon-dialog.js b/main/webapp/modules/core/scripts/reconciliation/recon-dialog.js
index 56df3e1c2..462b16c44 100644
--- a/main/webapp/modules/core/scripts/reconciliation/recon-dialog.js
+++ b/main/webapp/modules/core/scripts/reconciliation/recon-dialog.js
@@ -49,12 +49,10 @@ ReconDialog.prototype._createDialog = function() {
this._elmts.servicePanelMessage.html($.i18n._('core-recon')["pick-service"]);
this._elmts.serviceListTitle.html($.i18n._('core-recon')["service-title"]);
this._elmts.addStandardServiceButton.html($.i18n._('core-buttons')["add-std-svc"]+"...");
- this._elmts.addNamespacedServiceButton.html($.i18n._('core-buttons')["add-named-svc"]+"...");
this._elmts.reconcileButton.html($.i18n._('core-buttons')["start-recon"]);
this._elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
this._elmts.addStandardServiceButton.click(function() { self._onAddStandardService(); });
- this._elmts.addNamespacedServiceButton.click(function() { self._onAddNamespacedService(); });
this._elmts.reconcileButton.click(function() { self._onOK(); });
this._elmts.cancelButton.click(function() { self._dismiss(); });
@@ -227,46 +225,4 @@ ReconDialog.prototype._onAddStandardService = function() {
elmts.input.focus().select();
};
-ReconDialog.prototype._onAddNamespacedService = function() {
- var self = this;
- var dialog = $(DOM.loadHTML("core", "scripts/reconciliation/add-namespaced-service-dialog.html"));
- var elmts = DOM.bind(dialog);
- elmts.dialogHeader.html($.i18n._('core-recon')["add-recon-srv"]);
- elmts.or_recon_namespace.html($.i18n._('core-recon')["namespace"]+":");
- elmts.or_recon_entType.html($.i18n._('core-recon')["ent-type"]+":");
- elmts.addButton.html($.i18n._('core-buttons')["add-service"]);
- elmts.cancelButton.html($.i18n._('core-buttons')["cancel"]);
-
- var level = DialogSystem.showDialog(dialog);
- var dismiss = function() {
- DialogSystem.dismissUntil(level - 1);
- };
-
- elmts.namespaceInput
- .suggest({ filter : '(all type:/type/namespace)' })
- .bind("fb-select", function(e, data) {
- elmts.typeInput.focus();
- });
-
- elmts.typeInput.suggestT({ filter : '(all type:/type/type)' });
-
- elmts.cancelButton.click(dismiss);
- elmts.addButton.click(function() {
- var namespaceData = elmts.namespaceInput.data("data.suggest");
- var typeData = elmts.typeInput.data("data.suggest");
- if (namespaceData) {
- var url = "http://reconcile.freebaseapps.com/namespace_reconcile?namespace="
- + encodeURIComponent(namespaceData.id);
- if (typeData) {
- url += "&type=" + typeData.id;
- }
-
- ReconciliationManager.registerStandardService(url, function(index) {
- self._refresh(index);
- });
- }
- dismiss();
- });
- elmts.namespaceInput.focus().data("suggest").textchange();
-};
\ No newline at end of file
diff --git a/main/webapp/modules/core/scripts/reconciliation/recon-manager.js b/main/webapp/modules/core/scripts/reconciliation/recon-manager.js
index ea9f14abd..b3ed02c7b 100644
--- a/main/webapp/modules/core/scripts/reconciliation/recon-manager.js
+++ b/main/webapp/modules/core/scripts/reconciliation/recon-manager.js
@@ -37,18 +37,6 @@ var ReconciliationManager = {
_urlMap : {}
};
-ReconciliationManager.isFreebaseId = function(s) {
- return s == "http://rdf.freebase.com/ns/type.object.id";
-};
-
-ReconciliationManager.isFreebaseMid = function(s) {
- return s == "http://rdf.freebase.com/ns/type.object.mid";
-};
-
-ReconciliationManager.isFreebaseIdOrMid = function(s) {
- return ReconciliationManager.isFreebaseMid(s) || ReconciliationManager.isFreebaseId(s);
-};
-
ReconciliationManager._rebuildMap = function() {
var map = {};
$.each(ReconciliationManager.getAllServices(), function(i, service) {
@@ -140,10 +128,7 @@ ReconciliationManager.save = function(f) {
};
(function() {
- ReconciliationManager.customServices.push({
- "name" : $.i18n._('core-recon')["fb-recon"],
- "ui" : { "handler" : "ReconFreebaseQueryPanel" }
- });
+ var lang = $.i18n._('core-recon')["wd-recon-lang"];
$.ajax({
async: false,
@@ -151,15 +136,13 @@ ReconciliationManager.save = function(f) {
name: "reconciliation.standardServices"
}),
success: function(data) {
- if (data.value && data.value != "null") {
+ if (data.value && data.value != "null" && data.value != "[]") {
ReconciliationManager.standardServices = JSON.parse(data.value);
ReconciliationManager._rebuildMap();
} else {
- // FIXME: Standard recon service needs to be replaced
-// ReconciliationManager.registerStandardService(
-// "http://reconcile.freebaseapps.com/reconcile"
-// "http://standard-reconcile.freebaseapps.com/reconcile"
-// );
+ ReconciliationManager.registerStandardService(
+ "https://tools.wmflabs.org/openrefine-wikidata/"+lang+"/api"
+ );
}
},
dataType: "json"
diff --git a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js
index 60c4ff704..6a555aa68 100644
--- a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js
+++ b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js
@@ -222,8 +222,6 @@ ReconStandardServicePanel.prototype._wireEvents = function() {
suggestOptions.key = null;
suggestOptions.query_param_name = "prefix";
input.suggestT(suggestOptions);
- } else if (this._isInFreebaseSchemaSpace()) {
- input.suggestT({ filter : '(all type:/type/type)' });
}
input.bind("fb-select", function(e, data) {
@@ -251,22 +249,9 @@ ReconStandardServicePanel.prototype._rewirePropertySuggests = function(type) {
suggestOptions.ac_param = { schema: typeof type == "string" ? type : type.id };
}
inputs.suggestP(suggestOptions);
- } else if (this._isInFreebaseSchemaSpace()) {
- var namespace = (type) ? (typeof type == "string" ? type : type.id) : "/common/topic"
- inputs.suggestP({
- filter : '(should (any namespace:/type/object namespace:' + namespace + '))'
- });
}
};
-ReconStandardServicePanel.prototype._isInFreebaseIdentifierSpace = function() {
- return ReconciliationManager.isFreebaseIdOrMid(this._service.identifierSpace);
-};
-
-ReconStandardServicePanel.prototype._isInFreebaseSchemaSpace = function() {
- return ReconciliationManager.isFreebaseId(this._service.schemaSpace);
-};
-
ReconStandardServicePanel.prototype.start = function() {
var self = this;
diff --git a/main/webapp/modules/core/scripts/util/custom-suggest.js b/main/webapp/modules/core/scripts/util/custom-suggest.js
index 472813294..f9b917d08 100644
--- a/main/webapp/modules/core/scripts/util/custom-suggest.js
+++ b/main/webapp/modules/core/scripts/util/custom-suggest.js
@@ -33,16 +33,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
var CustomSuggest = {};
-// Default API key for Refine to use for freebase suggest widget
-//CustomSuggest.setFreebaseAPIKey("AIzaSyBBTAtJ31v_jlg_ImbQuBNnAaAyrHzRyW8"); // Google key
-CustomSuggest.FREEBASE_API_KEY = "AIzaSyBAZ_EjMPKlOzyyZXv6JKXPPwJFISVji3M"; // OpenRefine default key
-
-CustomSuggest.setFreebaseAPIKey = function(freebaseAPIKey) {
- $.suggest.suggest.defaults.key = freebaseAPIKey;
- $.suggest.suggestT.defaults.key = freebaseAPIKey;
- $.suggest.suggestP.defaults.key = freebaseAPIKey;
-};
-
(function() {
/*
@@ -168,18 +158,4 @@ CustomSuggest.setFreebaseAPIKey = function(freebaseAPIKey) {
}
);
- // Use Freebase API Key
- $.ajax("command/core/get-preference",
- {
- async: false,
- data: {name: "freebase.api.key"},
- success: function(data) {
- if (data.value && data.value != "null") {
- CustomSuggest.setFreebaseAPIKey(data.value);
- } else {
- CustomSuggest.setFreebaseAPIKey(CustomSuggest.FREEBASE_API_KEY);
- }
- }
- }
- );
-})();
\ No newline at end of file
+})();
diff --git a/main/webapp/modules/core/scripts/views/data-table/cell-ui.js b/main/webapp/modules/core/scripts/views/data-table/cell-ui.js
index 2c24cf04d..b1793a208 100644
--- a/main/webapp/modules/core/scripts/views/data-table/cell-ui.js
+++ b/main/webapp/modules/core/scripts/views/data-table/cell-ui.js
@@ -106,8 +106,6 @@ DataTableCellUI.prototype._render = function() {
if (service && (service.view) && (service.view.url)) {
a.attr("href", encodeURI(service.view.url.replace("{{id}}", match.id)));
- } else if (ReconciliationManager.isFreebaseIdOrMid(r.identifierSpace)) {
- a.attr("href", "http://www.freebase.com/view" + match.id);
}
$(' ').appendTo(divContent);
@@ -150,17 +148,13 @@ DataTableCellUI.prototype._render = function() {
if ((service) && (service.view) && (service.view.url)) {
a.attr("href", encodeURI(service.view.url.replace("{{id}}", candidate.id)));
- } else if (ReconciliationManager.isFreebaseIdOrMid(r.identifierSpace)) {
- a.attr("href", "http://www.freebase.com/view" + candidate.id);
}
var preview = null;
- if ((service) && (service.preview)
- && service.preview.url.indexOf("http://www.freebase.com/widget/topic") < 0) {
+ if ((service) && (service.preview)) {
preview = service.preview;
- } else if (ReconciliationManager.isFreebaseIdOrMid(r.identifierSpace)) {
- preview = DataTableCellUI.internalPreview;
}
+
if (preview) {
a.click(function(evt) {
if (!evt.metaKey && !evt.ctrlKey) {
@@ -207,8 +201,6 @@ DataTableCellUI.prototype._render = function() {
if ((service) && (service.suggest) && (service.suggest.entity)) {
suggestOptions = service.suggest.entity;
addSuggest = true;
- } else if (ReconciliationManager.isFreebaseIdOrMid(r.identifierSpace)) {
- addSuggest = true;
}
var extraChoices = $('