From 99c2b813bcafc96a7df822c1a30d3719dee52c70 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 11 Jul 2012 23:04:30 -0300 Subject: [PATCH] - Add more resources... --- mindplot/src/main/javascript/Designer.js | 2 +- mindplot/src/main/javascript/Messages.js | 20 ++++++++++++++----- .../src/main/resources/messages_en.properties | 4 ++-- .../src/main/resources/messages_es.properties | 8 ++++++-- .../main/resources/messages_zh_CN.properties | 3 --- .../main/resources/messages_zh_TW.properties | 2 -- .../WEB-INF/classes/messages_en.properties | 3 +++ .../WEB-INF/classes/messages_es.properties | 2 ++ 8 files changed, 29 insertions(+), 15 deletions(-) diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js index c9772417..fd7a5fad 100644 --- a/mindplot/src/main/javascript/Designer.js +++ b/mindplot/src/main/javascript/Designer.js @@ -515,7 +515,7 @@ mindplot.Designer = new Class({ var nodes = this.getModel().filterSelectedTopics(); if (nodes.length <= 0) { // This could not happen ... - $notify("Could not create relationship. Parent relationship topic must be selected first."); + $notify($msg('RELATIONSHIP_COULD_NOT_BE_CREATED')); return; } diff --git a/mindplot/src/main/javascript/Messages.js b/mindplot/src/main/javascript/Messages.js index a5a2b05b..04a274f1 100644 --- a/mindplot/src/main/javascript/Messages.js +++ b/mindplot/src/main/javascript/Messages.js @@ -35,7 +35,9 @@ $msg = function (key) { if (!mindplot.Messages.__bundle) { mindplot.Messages.init('en'); } - return mindplot.Messages.__bundle[key]; + + var msg = mindplot.Messages.__bundle[key]; + return msg ? msg : key; }; mindplot.Messages.BUNDLES = { @@ -86,12 +88,13 @@ mindplot.Messages.BUNDLES = { CENTRAL_TOPIC:'Central Topic', ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE:'Children can not be collapsed. One topic must be selected.', SHORTCUTS:'Keyboard Shortcuts', - - // @Todo: pending ... ENTITIES_COULD_NOT_BE_DELETED:'Could not delete topic or relation. At least one map entity must be selected.', CENTRAL_TOPIC_CAN_NOT_BE_DELETED:'Central topic can not be deleted.', SELECTION_COPIED_TO_CLIPBOARD:'Topics copied to the clipboard', - CLIPBOARD_IS_EMPTY:'Nothing to copy. Clipboard is empty' + CLIPBOARD_IS_EMPTY:'Nothing to copy. Clipboard is empty', + AT_LEAST_ONE_TOPIC_MUST_BE_SELECTED:'At least one topic must be selected.', + RELATIONSHIP_COULD_NOT_BE_CREATED:'Relationship could not be created. A parent relationship topic must be selected first.' + }, 'es':{ DISCARD_CHANGES:'Descartar Cambios', @@ -138,7 +141,14 @@ mindplot.Messages.BUNDLES = { ISOLATED_TOPIC:'Tópico Aislado', CENTRAL_TOPIC:'Tópico Central', ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE:'Tópicos hijos no pueden ser colapsados. Solo un topic debe ser seleccionado.', - SHORTCUTS:'Accesos directos' + SHORTCUTS:'Accesos directos', + ENTITIES_COULD_NOT_BE_DELETED:'El tópico o la relación no pudo ser borrada. Debe selecionar al menos una.', + CENTRAL_TOPIC_CAN_NOT_BE_DELETED:'El tópico central no puede ser borrado.', + SELECTION_COPIED_TO_CLIPBOARD:'Tópicos copiados al clipboard', + CLIPBOARD_IS_EMPTY:'Nada que copiar. Clipboard está vacio.', + AT_LEAST_ONE_TOPIC_MUST_BE_SELECTED:'Al menos un tópico debe ser seleccionado.', + RELATIONSHIP_COULD_NOT_BE_CREATED:'La relación no pudo ser creada. Una relación padre debe ser seleccionada primero.' + }, zh_cn:{ ZOOM_IN:'放大', diff --git a/mindplot/src/main/resources/messages_en.properties b/mindplot/src/main/resources/messages_en.properties index 5fc52c18..c93f211f 100644 --- a/mindplot/src/main/resources/messages_en.properties +++ b/mindplot/src/main/resources/messages_en.properties @@ -48,5 +48,5 @@ ENTITIES_COULD_NOT_BE_DELETED=Could not delete topic or relation. At least one m AT_LEAST_ONE_TOPIC_MUST_BE_SELECTED=At least one topic must be selected. CLIPBOARD_IS_EMPTY=Nothing to copy. Clipboard is empty. CENTRAL_TOPIC_CAN_NOT_BE_DELETED=Central topic can not be deleted. -MULTIPLE_LINES=Add multiple text lines. -COPY_AND_PASTE_TOPICS=Copy and Paste Topics \ No newline at end of file +RELATIONSHIP_COULD_NOT_BE_CREATED=Relationship could not be created. A parent relationship topic must be selected first. +SELECTION_COPIED_TO_CLIPBOARD=Topics copied to the clipboard \ No newline at end of file diff --git a/mindplot/src/main/resources/messages_es.properties b/mindplot/src/main/resources/messages_es.properties index 2bb6a9fa..8c4c8e17 100644 --- a/mindplot/src/main/resources/messages_es.properties +++ b/mindplot/src/main/resources/messages_es.properties @@ -44,5 +44,9 @@ ISOLATED_TOPIC=Tópico Aislado CENTRAL_TOPIC=Tópico Central ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE=Tópicos hijos no pueden ser colapsados. Solo un topic debe ser seleccionado. SHORTCUTS=Accesos directos -MULTIPLE_LINES=Add multilines text node -COPY_AND_PASTE_TOPICS=Copy Topics +ENTITIES_COULD_NOT_BE_DELETED=El tópico o la relación no pudo ser borrada. Debe selecionar al menos una. +AT_LEAST_ONE_TOPIC_MUST_BE_SELECTED=Al menos un tópico debe ser seleccionado. +CLIPBOARD_IS_EMPTY=Nada que copiar. Clipboard está vacio. +CENTRAL_TOPIC_CAN_NOT_BE_DELETED=El tópico central no puede ser borrado. +RELATIONSHIP_COULD_NOT_BE_CREATED=La relación no pudo ser creada. Una relación padre debe ser seleccionada primero. +SELECTION_COPIED_TO_CLIPBOARD=Tópicos copiados al clipboard diff --git a/mindplot/src/main/resources/messages_zh_CN.properties b/mindplot/src/main/resources/messages_zh_CN.properties index 3cc433de..802931cf 100644 --- a/mindplot/src/main/resources/messages_zh_CN.properties +++ b/mindplot/src/main/resources/messages_zh_CN.properties @@ -30,7 +30,6 @@ DISCARD_CHANGES=清除改变 FONT_COLOR=文本颜色 SAVING=保存中…… SAVE_COMPLETE=完成保存 - ZOOM_IN_ERROR=缩放过多。 ZOOM_ERROR=不能再缩放。 ONLY_ONE_TOPIC_MUST_BE_SELECTED=不能创建节点。仅能选择一个节点。 @@ -43,5 +42,3 @@ SUB_TOPIC=子节点 ISOLATED_TOPIC=独立节点 CENTRAL_TOPIC=中心节点 SHORTCUTS=快捷键 -MULTIPLE_LINES=Add multilines text node -COPY_AND_PASTE_TOPICS=Copy Topics diff --git a/mindplot/src/main/resources/messages_zh_TW.properties b/mindplot/src/main/resources/messages_zh_TW.properties index 8d5533c6..39fb991f 100644 --- a/mindplot/src/main/resources/messages_zh_TW.properties +++ b/mindplot/src/main/resources/messages_zh_TW.properties @@ -43,5 +43,3 @@ SUB_TOPIC=子節點 ISOLATED_TOPIC=獨立節點 CENTRAL_TOPIC=中心節點 SHORTCUTS=快捷鍵 -MULTIPLE_LINES=Add multilines text node -COPY_AND_PASTE_TOPICS=Copy Topics diff --git a/wise-webapp/src/main/webapp/WEB-INF/classes/messages_en.properties b/wise-webapp/src/main/webapp/WEB-INF/classes/messages_en.properties index 458bfbf1..92ea6eae 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/classes/messages_en.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/classes/messages_en.properties @@ -206,4 +206,7 @@ DESELECT_ALL_TOPIC=Deselect All Topic SHORTCUTS=Shortcuts COLLAPSE_CHILDREN=Collapse Children KEYBOARD_SHORTCUTS_MSG=Keyboard shortcuts can help you save time by allowing you to never take your hands off the keyboard to use the mouse. +COPY_AND_PASTE_TOPICS=Copy and Page Topics +MULTIPLE_LINES=Add multiple text lines + diff --git a/wise-webapp/src/main/webapp/WEB-INF/classes/messages_es.properties b/wise-webapp/src/main/webapp/WEB-INF/classes/messages_es.properties index 886c1f0e..4af11b56 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/classes/messages_es.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/classes/messages_es.properties @@ -207,4 +207,6 @@ SHORTCUTS=Shortcuts COLLAPSE_CHILDREN=Colapsar Hijos KEYBOARD_SHORTCUTS_MSG=Los accesos directos pueden ayudarte a salvar tiempo permitiendote no sacar las manos del teclado para usar el mouse. NAME=Nombre +COPY_AND_PASTE_TOPICS=Copiar y Pegar Tópicos +MULTIPLE_LINES=Agregar multiples lineas de texto