diff --git a/languages/tinymce-annotate-ca_ES.mo b/languages/tinymce-annotate-ca_ES.mo index d25f84a..b6b4c76 100644 Binary files a/languages/tinymce-annotate-ca_ES.mo and b/languages/tinymce-annotate-ca_ES.mo differ diff --git a/languages/tinymce-annotate-ca_ES.po b/languages/tinymce-annotate-ca_ES.po index a53a7d3..7fc582b 100644 --- a/languages/tinymce-annotate-ca_ES.po +++ b/languages/tinymce-annotate-ca_ES.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: tinymce-annotate\n" "POT-Creation-Date: 2016-03-16 12:53+0100\n" -"PO-Revision-Date: 2016-03-16 13:00+0100\n" +"PO-Revision-Date: 2016-03-17 09:33+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -21,3 +21,21 @@ msgstr "Selecciona el text per a crear l'annotació" msgid "Please select the annotation you want to delete" msgstr "Selecciona l'anotació per a esborrar-la" + +msgid "Delete annotation" +msgstr "Esborra annotació" + +msgid "Create annotation" +msgstr "Crea annotació" + +msgid "Hide annotations" +msgstr "Oculta les annotacions" + +msgid "Annotation settings" +msgstr "Paràmetres de l'annotació" + +msgid "Annotation" +msgstr "Annotació" + +msgid "Background color" +msgstr "Color de fons" diff --git a/languages/tinymce-annotate-es_ES.mo b/languages/tinymce-annotate-es_ES.mo index 89184e4..699fe4e 100644 Binary files a/languages/tinymce-annotate-es_ES.mo and b/languages/tinymce-annotate-es_ES.mo differ diff --git a/languages/tinymce-annotate-es_ES.po b/languages/tinymce-annotate-es_ES.po index cd6c45c..4605d23 100644 --- a/languages/tinymce-annotate-es_ES.po +++ b/languages/tinymce-annotate-es_ES.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: tinymce-annotate\n" "POT-Creation-Date: 2016-03-16 12:53+0100\n" -"PO-Revision-Date: 2016-03-16 13:23+0100\n" +"PO-Revision-Date: 2016-03-17 09:34+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -21,3 +21,21 @@ msgstr "Selecciona el texto para crear la anotación" msgid "Please select the annotation you want to delete" msgstr "Selecciona la anotación que deseas eliminar" + +msgid "Delete annotation" +msgstr "Borrar anotación" + +msgid "Create annotation" +msgstr "Crear anotación" + +msgid "Hide annotations" +msgstr "Ocultar anotaciones" + +msgid "Annotation settings" +msgstr "Parámetros de anotación" + +msgid "Annotation" +msgstr "Anotación" + +msgid "Background color" +msgstr "Color de fondo" diff --git a/plugin.js b/plugin.js index 0e5ec75..4781f50 100644 --- a/plugin.js +++ b/plugin.js @@ -45,7 +45,7 @@ // Create annotation editor.addButton('tma_annotate', { - title: 'Create annotation', + title: TMA.tooltips.annotation_create, image: url + '/img/annotation.png', onclick: function() { annotation = ''; @@ -74,16 +74,16 @@ selectedText = node.innerHTML; } editor.windowManager.open({ - title: 'Annotation options', + title: TMA.tooltips.annotation_settings, body: [{ type: 'textbox', name: 'annotation', - label: 'Annotation', + label: TMA.settings.setting_annotation, value: annotation }, { type: 'colorpicker', name: 'annotationbg', - label: 'Background color', + label: TMA.settings.setting_background, value: color }], @@ -97,20 +97,20 @@ editor.selection.setContent('' + selectedText + ''); } else { - editor.windowManager.alert(TMA.missing_fields); + editor.windowManager.alert(TMA.errors.missing_fields); return false; } } }); } else { - editor.windowManager.alert(TMA.missing_annotation, false); + editor.windowManager.alert(TMA.errors.missing_annotation, false); } } }); // Delete annotation editor.addButton('tma_annotatedelete', { - title: 'Delete annotation', + title: TMA.tooltips.annotation_delete, image: url + '/img/annotation-delete.png', onclick: function() { var selectedText = editor.selection.getContent(); @@ -125,14 +125,14 @@ $(deletionNode).attr("style", ""); editor.dom.remove(replaceNode, deletionNode); } else { - editor.windowManager.alert(TMA.missing_selected); + editor.windowManager.alert(TMA.errors.missing_selected); } } }); // Hide all annotations editor.addButton('tma_annotatehide', { - title: 'Hide all annotations', + title: TMA.tooltips.annotation_hide, image: url + '/img/annotation-hide.png', cmd: 'tma_cmd_hide', onPostRender: tma_toggleHide diff --git a/plugin.php b/plugin.php index cc2e416..e578cc8 100644 --- a/plugin.php +++ b/plugin.php @@ -44,14 +44,28 @@ function tma_annotate() { load_plugin_textdomain('tinymce-annotate', FALSE, dirname(plugin_basename(__FILE__)).'/languages/'); $current_user = wp_get_current_user(); wp_register_script( 'tmajs', plugins_url('/plugin.js', __FILE__)); - wp_localize_script( 'tmajs', 'TMA', array( - 'id' => $current_user->ID, - 'author' => $current_user->display_name, - 'missing_fields' => __('Select the color and the annotation text', 'tinymce-annotate'), - 'missing_annotation' => __('Please select some text for creating an annotation', 'tinymce-annotate'), - 'missing_selected' => __('Please select the annotation you want to delete', 'tinymce-annotate') - ) + wp_localize_script( 'tmajs', 'TMA', + array( + 'id' => $current_user->ID, + 'author' => $current_user->display_name, + 'errors' => array( + 'missing_fields' => __('Select the color and the annotation text', 'tinymce-annotate'), + 'missing_annotation' => __('Please select some text for creating an annotation', 'tinymce-annotate'), + 'missing_selected' => __('Please select the annotation you want to delete', 'tinymce-annotate') + ), + 'tooltips' => array( + 'annotation_settings' => __('Annotation settings', 'tinymce-annotate'), + 'annotation_create' => __('Create annotation', 'tinymce-annotate'), + 'annotation_delete' => __('Delete annotation', 'tinymce-annotate'), + 'annotation_hide' => __('Hide annotations', 'tinymce-annotate') + ), + 'settings' => array( + 'setting_annotation' => __('Annotation', 'tinymce-annotate'), + 'setting_background' => __('Background color', 'tinymce-annotate') + ) + ) ); + wp_enqueue_script( 'tmajs' ); } diff --git a/readme.txt b/readme.txt index 15f48df..f8c1cc7 100644 --- a/readme.txt +++ b/readme.txt @@ -50,11 +50,11 @@ Make sure you have selected at least a character. == Changelog == = 1.1 = -Release date: March 20, 2016. +Release date: March 21, 2016. * Show annotation author. * Select annotation without doing it with the mouse. -* Added I18n. +* Added I18n (English, Spanish and Catalan). = 1.0 = Release date: November 10, 2015.