From b1b9f9c24322db6890477efaf6f0ac8cfb1aad3b Mon Sep 17 00:00:00 2001 From: thewaiter Date: Mon, 3 Oct 2016 23:00:05 +0200 Subject: [PATCH 01/10] xclip version --- src/common.h | 2 ++ src/e_mod_config.c | 9 +++++--- src/e_mod_main.c | 55 ++++++++++++++++++++++++++++++++++++++++------ src/x_clipboard.c | 8 +++++-- xclip.txt | 1 + 5 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 xclip.txt diff --git a/src/common.h b/src/common.h index 7577e1d..6261133 100644 --- a/src/common.h +++ b/src/common.h @@ -66,6 +66,8 @@ struct _Mod_Inst Ecore_X_Window win; /* Timer callback function to reguest Clipboard events */ Ecore_Timer *check_timer; + Ecore_Timer *delay_timer; + /* Callback function to handle clipboard events */ Eina_List *handle; /* Stores Clipboard History */ diff --git a/src/e_mod_config.c b/src/e_mod_config.c index 3e1904f..25a034e 100644 --- a/src/e_mod_config.c +++ b/src/e_mod_config.c @@ -195,8 +195,11 @@ config_clipboard_module(E_Container *con, const char *params __UNUSED__) E_Config_Dialog *cfd; E_Config_Dialog_View *v; - if(e_config_dialog_find("E", "settings/clipboard")) return NULL; + if(e_config_dialog_find("Clipboard", "extensions/clipboard")) return NULL; + v = E_NEW(E_Config_Dialog_View, 1); + if (!v) return NULL; + v->create_cfdata = _create_data; v->free_cfdata = _free_data; v->basic.create_widgets = _basic_create_widgets; @@ -204,8 +207,8 @@ config_clipboard_module(E_Container *con, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; cfd = e_config_dialog_new(con, "Clipboard Settings", - "E", "preferences/clipboard", - "preferences-engine", 0, v, NULL); + "Clipboard", "extensions/clipboard", + 0, 0, v, NULL); clip_cfg->config_dialog = cfd; return cfd; } diff --git a/src/e_mod_main.c b/src/e_mod_main.c index f0a5a16..85a5fb0 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -471,9 +471,33 @@ _cb_event_owner(Instance *instance __UNUSED__, int type __UNUSED__, Ecore_X_Even { EINA_SAFETY_ON_NULL_RETURN_VAL(event, ECORE_CALLBACK_DONE); /* If we lost owner of clipboard */ - if (event->reason) - /* Reset clipboard and gain ownership of it */ - _cb_menu_item(eina_list_data_get(clip_inst->items)); + //~ if (event->reason) + //~ /* Reset clipboard and gain ownership of it */ + //~ _cb_menu_item(eina_list_data_get(clip_inst->items)); + + return ECORE_CALLBACK_DONE; +} + +static Eina_Bool +_cb_refresh_item(void *data) +{ + clipboard.set(clip_inst->win, data, strlen(data) + 1); + //~ Ecore_Exe *exe; + //~ char buf[PATH_MAX]; + //~ Eina_Strbuf *mybuffer; + //~ mybuffer = eina_strbuf_new(); + //~ eina_strbuf_append(mybuffer, data); + //~ eina_strbuf_replace_all(mybuffer, "'", "\\'"); + //~ //e_util_dialog_internal("mybuffer",eina_strbuf_string_get(mybuffer)); + //~ // eina_strbuf_insert(mybuffer, "printf \'", 0); + //~ // eina_strbuf_insert(mybuffer, "\' | xclip -selection clipboard", eina_strbuf_length_get(mybuffer)); + //~ + //~ // strcpy(buf,eina_strbuf_string_get(mybuffer)); + //~ snprintf(buf, sizeof(buf), "printf \'%s\' | xclip -selection clipboard", eina_strbuf_string_get(mybuffer)); + //~ // snprintf(buf, sizeof(buf), "%s", eina_strbuf_string_get(mybuffer)); + //~ // e_util_dialog_internal("buf",buf); + //~ exe = ecore_exe_run(buf, NULL); + //~ if (exe) ecore_exe_free(exe); return ECORE_CALLBACK_DONE; } @@ -482,10 +506,27 @@ _cb_event_owner(Instance *instance __UNUSED__, int type __UNUSED__, Ecore_X_Even void _x_clipboard_update(const char *text) { + + Ecore_Exe *exe; + char buf[PATH_MAX]; + EINA_SAFETY_ON_NULL_RETURN(clip_inst); EINA_SAFETY_ON_NULL_RETURN(text); - clipboard.set(clip_inst->win, text, strlen(text) + 1); + //~ clipboard.set(clip_inst->win, text, strlen(text) + 1); + +/* temporary solution for pasting content to the GTK environment + * xclip need to install as dependency of course + * + * - */ + //~ snprintf(buf, sizeof(buf), "xclip -selection clipboard -o > xclip.txt"); + //~ exe = ecore_exe_run(buf, NULL); + //~ if (exe) ecore_exe_free(exe); + + clip_inst->delay_timer = ecore_timer_add(0.2, _cb_refresh_item, text); + + + } static void @@ -518,6 +559,8 @@ _clip_add_item(Clip_Data *cd) /* saving list to the file */ clip_save(clip_inst->items); + clip_inst->delay_timer = ecore_timer_add(1.0, _cb_refresh_item, cd->content); + } static Eina_List * @@ -593,10 +636,8 @@ _cb_dialog_delete(void *data __UNUSED__) static Eina_Bool _cb_clipboard_request(void *data __UNUSED__) { - ecore_x_fixes_selection_notification_request(ECORE_X_ATOM_SELECTION_CLIPBOARD); clipboard.request(clip_inst->win, ECORE_X_SELECTION_TARGET_UTF8_STRING); - return EINA_TRUE; } static void @@ -668,7 +709,7 @@ e_modapi_init (E_Module *m) /* Display this Modules config info in the main Config Panel * Under Preferences catogory */ - e_configure_registry_item_add("preferences/clipboard", 10, + e_configure_registry_item_add("extensions/clipboard", 10, "Clipboard Settings", NULL, "edit-paste", config_clipboard_module); diff --git a/src/x_clipboard.c b/src/x_clipboard.c index fe83b68..01dd639 100644 --- a/src/x_clipboard.c +++ b/src/x_clipboard.c @@ -171,8 +171,9 @@ _get_text_clipboard(Ecore_X_Event_Selection_Notify *event) if ((text_data->data.content == ECORE_X_SELECTION_CONTENT_TEXT) && (text_data->text)) - return text_data; + return text_data; } + return NULL; } @@ -180,7 +181,9 @@ Ecore_X_Selection_Data_Text * _get_text_primary(Ecore_X_Event_Selection_Notify *event) { Ecore_X_Selection_Data_Text *text_data; - +Ecore_Exe *exe; + + char buf[PATH_MAX]; if ((event->selection == ECORE_X_SELECTION_PRIMARY) && (strcmp(event->target, ECORE_X_SELECTION_TARGET_UTF8_STRING) == 0)) { @@ -190,6 +193,7 @@ _get_text_primary(Ecore_X_Event_Selection_Notify *event) (text_data->text)) return text_data; } + return NULL; } diff --git a/xclip.txt b/xclip.txt new file mode 100644 index 0000000..4ff5fd9 --- /dev/null +++ b/xclip.txt @@ -0,0 +1 @@ +Eina_List *it; \ No newline at end of file From f57d544aedb6221177455201574d4b01186e8734 Mon Sep 17 00:00:00 2001 From: thewaiter Date: Mon, 3 Oct 2016 23:02:40 +0200 Subject: [PATCH 02/10] xclip version #2 --- src/e_mod_main.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 85a5fb0..bc79c70 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -481,23 +481,23 @@ _cb_event_owner(Instance *instance __UNUSED__, int type __UNUSED__, Ecore_X_Even static Eina_Bool _cb_refresh_item(void *data) { - clipboard.set(clip_inst->win, data, strlen(data) + 1); - //~ Ecore_Exe *exe; - //~ char buf[PATH_MAX]; - //~ Eina_Strbuf *mybuffer; - //~ mybuffer = eina_strbuf_new(); - //~ eina_strbuf_append(mybuffer, data); - //~ eina_strbuf_replace_all(mybuffer, "'", "\\'"); - //~ //e_util_dialog_internal("mybuffer",eina_strbuf_string_get(mybuffer)); - //~ // eina_strbuf_insert(mybuffer, "printf \'", 0); - //~ // eina_strbuf_insert(mybuffer, "\' | xclip -selection clipboard", eina_strbuf_length_get(mybuffer)); - //~ - //~ // strcpy(buf,eina_strbuf_string_get(mybuffer)); - //~ snprintf(buf, sizeof(buf), "printf \'%s\' | xclip -selection clipboard", eina_strbuf_string_get(mybuffer)); - //~ // snprintf(buf, sizeof(buf), "%s", eina_strbuf_string_get(mybuffer)); - //~ // e_util_dialog_internal("buf",buf); - //~ exe = ecore_exe_run(buf, NULL); - //~ if (exe) ecore_exe_free(exe); + //~ clipboard.set(clip_inst->win, data, strlen(data) + 1); + Ecore_Exe *exe; + char buf[PATH_MAX]; + Eina_Strbuf *mybuffer; + mybuffer = eina_strbuf_new(); + eina_strbuf_append(mybuffer, data); + eina_strbuf_replace_all(mybuffer, "'", "\\'"); + //e_util_dialog_internal("mybuffer",eina_strbuf_string_get(mybuffer)); + // eina_strbuf_insert(mybuffer, "printf \'", 0); + // eina_strbuf_insert(mybuffer, "\' | xclip -selection clipboard", eina_strbuf_length_get(mybuffer)); + + // strcpy(buf,eina_strbuf_string_get(mybuffer)); + snprintf(buf, sizeof(buf), "printf \'%s\' | xclip -selection clipboard", eina_strbuf_string_get(mybuffer)); + // snprintf(buf, sizeof(buf), "%s", eina_strbuf_string_get(mybuffer)); + // e_util_dialog_internal("buf",buf); + exe = ecore_exe_run(buf, NULL); + if (exe) ecore_exe_free(exe); return ECORE_CALLBACK_DONE; } From 272500a07899699001bbb2e4dc06f8ebd23990ca Mon Sep 17 00:00:00 2001 From: thewaiter Date: Mon, 3 Oct 2016 23:35:59 +0200 Subject: [PATCH 03/10] memory leak prevention --- src/e_mod_main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/e_mod_main.c b/src/e_mod_main.c index bc79c70..069d5fa 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -499,6 +499,7 @@ _cb_refresh_item(void *data) exe = ecore_exe_run(buf, NULL); if (exe) ecore_exe_free(exe); + eina_strbuf_free(mybuffer); return ECORE_CALLBACK_DONE; } @@ -506,10 +507,6 @@ _cb_refresh_item(void *data) void _x_clipboard_update(const char *text) { - - Ecore_Exe *exe; - char buf[PATH_MAX]; - EINA_SAFETY_ON_NULL_RETURN(clip_inst); EINA_SAFETY_ON_NULL_RETURN(text); @@ -524,9 +521,6 @@ _x_clipboard_update(const char *text) //~ if (exe) ecore_exe_free(exe); clip_inst->delay_timer = ecore_timer_add(0.2, _cb_refresh_item, text); - - - } static void From 3159f5aea6a4d1bd8565d3c0f108c474c3156723 Mon Sep 17 00:00:00 2001 From: thewaiter Date: Tue, 4 Oct 2016 11:16:21 +0200 Subject: [PATCH 04/10] Double and single quotes replacing --- src/e_mod_main.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 069d5fa..7b63868 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -479,23 +479,17 @@ _cb_event_owner(Instance *instance __UNUSED__, int type __UNUSED__, Ecore_X_Even } static Eina_Bool -_cb_refresh_item(void *data) +_cb_xclip_item(void *data) { - //~ clipboard.set(clip_inst->win, data, strlen(data) + 1); Ecore_Exe *exe; char buf[PATH_MAX]; Eina_Strbuf *mybuffer; mybuffer = eina_strbuf_new(); eina_strbuf_append(mybuffer, data); - eina_strbuf_replace_all(mybuffer, "'", "\\'"); - //e_util_dialog_internal("mybuffer",eina_strbuf_string_get(mybuffer)); - // eina_strbuf_insert(mybuffer, "printf \'", 0); - // eina_strbuf_insert(mybuffer, "\' | xclip -selection clipboard", eina_strbuf_length_get(mybuffer)); + eina_strbuf_replace_all(mybuffer, "\"", "\\\\\""); + eina_strbuf_replace_all(mybuffer, "\'", "\\\\\'"); - // strcpy(buf,eina_strbuf_string_get(mybuffer)); snprintf(buf, sizeof(buf), "printf \'%s\' | xclip -selection clipboard", eina_strbuf_string_get(mybuffer)); - // snprintf(buf, sizeof(buf), "%s", eina_strbuf_string_get(mybuffer)); - // e_util_dialog_internal("buf",buf); exe = ecore_exe_run(buf, NULL); if (exe) ecore_exe_free(exe); @@ -512,15 +506,7 @@ _x_clipboard_update(const char *text) //~ clipboard.set(clip_inst->win, text, strlen(text) + 1); -/* temporary solution for pasting content to the GTK environment - * xclip need to install as dependency of course - * - * - */ - //~ snprintf(buf, sizeof(buf), "xclip -selection clipboard -o > xclip.txt"); - //~ exe = ecore_exe_run(buf, NULL); - //~ if (exe) ecore_exe_free(exe); - - clip_inst->delay_timer = ecore_timer_add(0.2, _cb_refresh_item, text); + clip_inst->delay_timer = ecore_timer_add(0.2, _cb_xclip_item, text); } static void @@ -553,7 +539,7 @@ _clip_add_item(Clip_Data *cd) /* saving list to the file */ clip_save(clip_inst->items); - clip_inst->delay_timer = ecore_timer_add(1.0, _cb_refresh_item, cd->content); + clip_inst->delay_timer = ecore_timer_add(1.0, _cb_xclip_item, cd->content); } From 8e49031efb7152141b34bb7e9927d0b12f6fb930 Mon Sep 17 00:00:00 2001 From: thewaiter Date: Wed, 5 Oct 2016 23:35:26 +0200 Subject: [PATCH 05/10] history items ascii fix; xclip trick with file --- src/e_mod_main.c | 42 +++++++++++++++++++++++++++--------------- src/utility.c | 10 ++++++++-- xclip.txt | 1 - 3 files changed, 35 insertions(+), 18 deletions(-) delete mode 100644 xclip.txt diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 7b63868..3f1c67a 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -424,6 +424,7 @@ _menu_fill(Instance *inst, Eina_Bool mouse_event) return dir; } + static Eina_Bool _cb_event_selection(Instance *instance, int type __UNUSED__, Ecore_X_Event_Selection_Notify * event) { @@ -460,6 +461,7 @@ _cb_event_selection(Instance *instance, int type __UNUSED__, Ecore_X_Event_Selec goto error; } _clip_add_item(cd); + } } error: @@ -471,29 +473,36 @@ _cb_event_owner(Instance *instance __UNUSED__, int type __UNUSED__, Ecore_X_Even { EINA_SAFETY_ON_NULL_RETURN_VAL(event, ECORE_CALLBACK_DONE); /* If we lost owner of clipboard */ - //~ if (event->reason) + if (event->reason) //~ /* Reset clipboard and gain ownership of it */ - //~ _cb_menu_item(eina_list_data_get(clip_inst->items)); + _cb_menu_item(eina_list_data_get(clip_inst->items)); return ECORE_CALLBACK_DONE; } static Eina_Bool -_cb_xclip_item(void *data) +_cb_xclip_apply_data(void *data) { Ecore_Exe *exe; char buf[PATH_MAX]; - Eina_Strbuf *mybuffer; - mybuffer = eina_strbuf_new(); - eina_strbuf_append(mybuffer, data); - eina_strbuf_replace_all(mybuffer, "\"", "\\\\\""); - eina_strbuf_replace_all(mybuffer, "\'", "\\\\\'"); - snprintf(buf, sizeof(buf), "printf \'%s\' | xclip -selection clipboard", eina_strbuf_string_get(mybuffer)); + snprintf(buf, sizeof(buf), "cat ~/.xclip_clip.txt | xclip -selection clipboard"); + exe = ecore_exe_run(buf, NULL); if (exe) ecore_exe_free(exe); + return ECORE_CALLBACK_DONE; +} + +static Eina_Bool +_cb_xclip_save_data(void *data) +{ + Ecore_Exe *exe; + char buf[PATH_MAX]; + + snprintf(buf, sizeof(buf), "xclip -selection clipboard -o > ~/.xclip_clip.txt"); - eina_strbuf_free(mybuffer); + exe = ecore_exe_run(buf, NULL); + if (exe) ecore_exe_free(exe); return ECORE_CALLBACK_DONE; } @@ -504,9 +513,14 @@ _x_clipboard_update(const char *text) EINA_SAFETY_ON_NULL_RETURN(clip_inst); EINA_SAFETY_ON_NULL_RETURN(text); - //~ clipboard.set(clip_inst->win, text, strlen(text) + 1); - - clip_inst->delay_timer = ecore_timer_add(0.2, _cb_xclip_item, text); + clipboard.set(clip_inst->win, text, strlen(text) + 1); + + /* calling xclip callback */ + /* temporary solution for pasting content to the GTK environment + * xclip needs to be installed as dependency + * */ + clip_inst->delay_timer = ecore_timer_add(0.2, _cb_xclip_save_data, NULL); + clip_inst->delay_timer = ecore_timer_add(1.0, _cb_xclip_apply_data, NULL); } static void @@ -539,8 +553,6 @@ _clip_add_item(Clip_Data *cd) /* saving list to the file */ clip_save(clip_inst->items); - clip_inst->delay_timer = ecore_timer_add(1.0, _cb_xclip_item, cd->content); - } static Eina_List * diff --git a/src/utility.c b/src/utility.c index d717e5a..1b13a80 100644 --- a/src/utility.c +++ b/src/utility.c @@ -40,6 +40,7 @@ set_clip_content(char **content, char* text, int mode) { Eina_Bool ret = EINA_TRUE; char *temp, *trim; + char buf[50]; /* Sanity check */ if (!text) { WRN("ERROR: Text is NULL\n"); @@ -96,6 +97,7 @@ set_clip_name(char **name, char * text, int mode, int n) /* to be continued latter */ if (name) *name = _sanitize_ln(text, n, mode); + //~ *name = text; else { ERR("Error: Clip name pointer is Null!!"); return EINA_FALSE; @@ -123,12 +125,12 @@ _sanitize_ln(char *text, const unsigned int n, const int mode) if (mode) text = strip_whitespace(text, TRIM_SPACES); - + while (1) { chr = *text; if (chr == 0) break; - if (chr < 32) { + if ((chr < 32) && (chr >0)) { /* is it a tab */ if (chr == 9){ // default tab @@ -143,13 +145,17 @@ _sanitize_ln(char *text, const unsigned int n, const int mode) } } else { + /* assume char is ok and add to temp buffer */ *temp++ = *text++; + i++; } if (i == n) break; } *temp = 0; + + return ret; } diff --git a/xclip.txt b/xclip.txt deleted file mode 100644 index 4ff5fd9..0000000 --- a/xclip.txt +++ /dev/null @@ -1 +0,0 @@ -Eina_List *it; \ No newline at end of file From 7d75edeb8c752e76176395a5b87ee281d6418d18 Mon Sep 17 00:00:00 2001 From: thewaiter Date: Fri, 11 Nov 2016 21:00:08 +0100 Subject: [PATCH 06/10] Spanish translation added --- po/LINGUAS | 2 +- po/es.po | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++ po/sk.po | 16 ++++---- 3 files changed, 116 insertions(+), 9 deletions(-) create mode 100644 po/es.po diff --git a/po/LINGUAS b/po/LINGUAS index deaa1b9..470afde 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1 +1 @@ -sk +es sk diff --git a/po/es.po b/po/es.po new file mode 100644 index 0000000..d5a8e09 --- /dev/null +++ b/po/es.po @@ -0,0 +1,107 @@ +msgid "" +msgstr "" +"Project-Id-Version: clipboard\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2016-11-11 20:58+0100\n" +"PO-Revision-Date: 2016-11-11 20:18+0100\n" +"Last-Translator: Astroboy \n" +"Language-Team: spanish\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: src/e_mod_config.c:130 +msgid "Clipboards" +msgstr "Portapapeles" + +#: src/e_mod_config.c:131 +msgid " Use Copy (Ctrl-C)" +msgstr " Use Copiar (Ctrl-C)" + +#: src/e_mod_config.c:134 +msgid " Use Primary (Selection)" +msgstr " Use Primario (Selección)" + +#: src/e_mod_config.c:137 +msgid " Synchronize Clipboards" +msgstr " Sincronizar Portapapeles" + +#: src/e_mod_config.c:146 +msgid "History" +msgstr "Historia" + +#: src/e_mod_config.c:147 +msgid " Save History" +msgstr " Guardar Historia" + +#: src/e_mod_config.c:150 +msgid " Reverse Order" +msgstr " Orden Inverso" + +#: src/e_mod_config.c:153 +msgid " Confirm before Clearing" +msgstr " Confirmar antes de borrar" + +#: src/e_mod_config.c:156 +msgid " Items in History" +msgstr " Elementos en la Historia" + +#: src/e_mod_config.c:164 +msgid "Labels" +msgstr "Etiquetas" + +#: src/e_mod_config.c:165 src/e_mod_config.c:177 +msgid " Ignore Whitespace" +msgstr " Ignorar espacios en blanco" + +#: src/e_mod_config.c:168 +msgid " Label Length" +msgstr " Largo de la Etiqueta" + +#: src/e_mod_config.c:176 +msgid "Content" +msgstr "Contenido" + +#: src/e_mod_config.c:180 +msgid " Trim Whitespace" +msgstr " Eliminar Espacios en Blanco" + +#: src/e_mod_config.c:183 +msgid " Trim Newlines" +msgstr " Eliminar Nuevas Líneas" + +#: src/e_mod_main.c:274 src/e_mod_main.c:382 +msgid "Settings" +msgstr "Configuración" + +#: src/e_mod_main.c:361 +msgid "Empty" +msgstr "Vacío" + +#: src/e_mod_main.c:369 +msgid "Clear" +msgstr "Limpiar" + +#: src/e_mod_main.c:603 +msgid "Confirm History Deletion" +msgstr "Confirmar Borrado del Historial" + +#: src/e_mod_main.c:605 +msgid "" +"You wish to delete the clipboards history.

Are you sure you want to " +"delete it?" +msgstr "" +"Desea borrar el historial del portapapeles.

¿Está segur@ de hacerlo? " + +#: src/e_mod_main.c:608 +msgid "Delete" +msgstr "Borrarlo" + +#: src/e_mod_main.c:608 +msgid "Keep" +msgstr "Mantenerlo" diff --git a/po/sk.po b/po/sk.po index 62f933e..256cff2 100644 --- a/po/sk.po +++ b/po/sk.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: clipboard\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2016-07-18 19:16-0400\n" +"POT-Creation-Date: 2016-11-11 20:58+0100\n" "PO-Revision-Date: 2016-07-18 20:18+0100\n" "Last-Translator: Stefan Uram \n" "Language-Team: slovak\n" @@ -75,32 +75,32 @@ msgstr " Zruš neviditeľné znaky" msgid " Trim Newlines" msgstr " Zruš znak konca riadku" -#: src/e_mod_main.c:273 src/e_mod_main.c:381 +#: src/e_mod_main.c:274 src/e_mod_main.c:382 msgid "Settings" msgstr "Nastavenia" -#: src/e_mod_main.c:360 +#: src/e_mod_main.c:361 msgid "Empty" msgstr "Prázdne" -#: src/e_mod_main.c:368 +#: src/e_mod_main.c:369 msgid "Clear" msgstr "Vymaž" -#: src/e_mod_main.c:558 +#: src/e_mod_main.c:603 msgid "Confirm History Deletion" msgstr "Potvrď vymazanie histórie" -#: src/e_mod_main.c:560 +#: src/e_mod_main.c:605 msgid "" "You wish to delete the clipboards history.

Are you sure you want to " "delete it?" msgstr "Praješ si vymazať históriu.

Si si istý, že ju chceš vymazať?" -#: src/e_mod_main.c:563 +#: src/e_mod_main.c:608 msgid "Delete" msgstr "Vymaž" -#: src/e_mod_main.c:563 +#: src/e_mod_main.c:608 msgid "Keep" msgstr "Zrušiť" From 4a6af4034a41ef11349ab4cad4acbd2f7f9de9c6 Mon Sep 17 00:00:00 2001 From: thewaiter Date: Wed, 16 Nov 2016 20:57:57 +0100 Subject: [PATCH 07/10] More gettext stuff added --- module.desktop.in | 3 ++- src/e_mod_config.c | 2 +- src/e_mod_main.c | 6 +++--- src/e_mod_main.h | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/module.desktop.in b/module.desktop.in index 2fbfba0..7b4f91a 100644 --- a/module.desktop.in +++ b/module.desktop.in @@ -9,7 +9,7 @@ Name[cs]= Name[de]= Name[el]= Name[eo]= -Name[es]= +Name[es]=Administrador del portapapeles Name[fr]= Name[gl]= Name[hu]= @@ -22,6 +22,7 @@ Name[sk]=Správca schránky Name[sr]= Name[tr]= Comment=Clipboard manager gadget for the Moksha/E desktop +Comment[es]=Administrador del portapapeles para el escritorio Moksha/E Comment[sk]=Správca schránky pre desktop typu Moksha/E Icon=e-module-clipboard X-Enlightenment-ModuleType=utils diff --git a/src/e_mod_config.c b/src/e_mod_config.c index 25a034e..10e2e17 100644 --- a/src/e_mod_config.c +++ b/src/e_mod_config.c @@ -206,7 +206,7 @@ config_clipboard_module(E_Container *con, const char *params __UNUSED__) v->basic.apply_cfdata = _basic_apply_data; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(con, "Clipboard Settings", + cfd = e_config_dialog_new(con, D_("Clipboard Settings"), "Clipboard", "extensions/clipboard", 0, 0, v, NULL); clip_cfg->config_dialog = cfd; diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 3f1c67a..446a85c 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -759,9 +759,9 @@ e_modapi_init (E_Module *m) act = e_action_add("clipboard"); if (act) { act->func.go = (void *) _cb_action_switch; - e_action_predef_name_set("Clipboard", ACT_FLOAT, "clipboard", "float", NULL, 0); - e_action_predef_name_set("Clipboard", ACT_CONFIG, "clipboard", "settings", NULL, 0); - e_action_predef_name_set("Clipboard", ACT_CLEAR, "clipboard", "clear", NULL, 0); + e_action_predef_name_set(D_("Clipboard"), ACT_FLOAT, "clipboard", "float", NULL, 0); + e_action_predef_name_set(D_("Clipboard"), ACT_CONFIG, "clipboard", "settings", NULL, 0); + e_action_predef_name_set(D_("Clipboard"), ACT_CLEAR, "clipboard", "clear", NULL, 0); } /* Create a global clip_inst for our module diff --git a/src/e_mod_main.h b/src/e_mod_main.h index f2954ee..ccfa8c6 100644 --- a/src/e_mod_main.h +++ b/src/e_mod_main.h @@ -16,9 +16,9 @@ #endif /* Key Board Bindings action names */ -#define ACT_FLOAT "Show History" -#define ACT_CONFIG "Show Settings" -#define ACT_CLEAR "Clear History" +#define ACT_FLOAT D_("Show History") +#define ACT_CONFIG D_("Show Settings") +#define ACT_CLEAR D_("Clear History") /* Macros used for config file versioning */ /* You can increment the EPOCH value if the old configuration is not From 4ae399b1c5ea6f99d4400846d49b5c3c0844c486 Mon Sep 17 00:00:00 2001 From: thewaiter Date: Wed, 16 Nov 2016 21:19:17 +0100 Subject: [PATCH 08/10] slovak and spanish translations update --- po/es.po | 22 +++++++++++++++++++++- po/sk.po | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/po/es.po b/po/es.po index d5a8e09..b78d2d0 100644 --- a/po/es.po +++ b/po/es.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: clipboard\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2016-11-11 20:58+0100\n" +"POT-Creation-Date: 2016-11-16 21:16+0100\n" "PO-Revision-Date: 2016-11-11 20:18+0100\n" "Last-Translator: Astroboy \n" "Language-Team: spanish\n" @@ -75,6 +75,10 @@ msgstr " Eliminar Espacios en Blanco" msgid " Trim Newlines" msgstr " Eliminar Nuevas Líneas" +#: src/e_mod_config.c:209 +msgid "Clipboard Settings" +msgstr "Configuración del Portapapeles" + #: src/e_mod_main.c:274 src/e_mod_main.c:382 msgid "Settings" msgstr "Configuración" @@ -105,3 +109,19 @@ msgstr "Borrarlo" #: src/e_mod_main.c:608 msgid "Keep" msgstr "Mantenerlo" + +#: src/e_mod_main.c:762 src/e_mod_main.c:763 src/e_mod_main.c:764 +msgid "Clipboard" +msgstr "Portapapeles" + +#: src/e_mod_main.h:19 +msgid "Show History" +msgstr "Historia" + +#: src/e_mod_main.h:20 +msgid "Show Settings" +msgstr "Configuración" + +#: src/e_mod_main.h:21 +msgid "Clear History" +msgstr "Historia" diff --git a/po/sk.po b/po/sk.po index 256cff2..41594ad 100644 --- a/po/sk.po +++ b/po/sk.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: clipboard\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2016-11-11 20:58+0100\n" +"POT-Creation-Date: 2016-11-16 21:16+0100\n" "PO-Revision-Date: 2016-07-18 20:18+0100\n" "Last-Translator: Stefan Uram \n" "Language-Team: slovak\n" @@ -75,6 +75,10 @@ msgstr " Zruš neviditeľné znaky" msgid " Trim Newlines" msgstr " Zruš znak konca riadku" +#: src/e_mod_config.c:209 +msgid "Clipboard Settings" +msgstr "Nastavenia Správcu schránky" + #: src/e_mod_main.c:274 src/e_mod_main.c:382 msgid "Settings" msgstr "Nastavenia" @@ -104,3 +108,19 @@ msgstr "Vymaž" #: src/e_mod_main.c:608 msgid "Keep" msgstr "Zrušiť" + +#: src/e_mod_main.c:762 src/e_mod_main.c:763 src/e_mod_main.c:764 +msgid "Clipboard" +msgstr "Správca schránky" + +#: src/e_mod_main.h:19 +msgid "Show History" +msgstr "Zobraziť históriu" + +#: src/e_mod_main.h:20 +msgid "Show Settings" +msgstr "Zobraziť nastavenia" + +#: src/e_mod_main.h:21 +msgid "Clear History" +msgstr "Vymazať históriu" From a1b7c2c18e5da10e287c0c4ca8fee4d510628b31 Mon Sep 17 00:00:00 2001 From: thewaiter Date: Mon, 21 Nov 2016 20:34:12 +0100 Subject: [PATCH 09/10] Japanese translation added --- module.desktop.in | 3 +- po/LINGUAS | 2 +- po/ja.po | 129 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 po/ja.po diff --git a/module.desktop.in b/module.desktop.in index 7b4f91a..c367d61 100644 --- a/module.desktop.in +++ b/module.desktop.in @@ -14,7 +14,7 @@ Name[fr]= Name[gl]= Name[hu]= Name[it]= -Name[ja]= +Name[ja]=クリップボード Name[ko]= Name[pt]= Name[ru]= @@ -23,6 +23,7 @@ Name[sr]= Name[tr]= Comment=Clipboard manager gadget for the Moksha/E desktop Comment[es]=Administrador del portapapeles para el escritorio Moksha/E +Comment[ja]=Moksha/e デスクトップのクリップボード管理ガジェット Comment[sk]=Správca schránky pre desktop typu Moksha/E Icon=e-module-clipboard X-Enlightenment-ModuleType=utils diff --git a/po/LINGUAS b/po/LINGUAS index 470afde..0b32015 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1 +1 @@ -es sk +es sk ja diff --git a/po/ja.po b/po/ja.po new file mode 100644 index 0000000..095c5b6 --- /dev/null +++ b/po/ja.po @@ -0,0 +1,129 @@ +msgid "" +msgstr "" +"Project-Id-Version: clipboard\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2016-11-16 21:00+0100\n" +"PO-Revision-Date: 2016-11-21 17:42+0900\n" +"Last-Translator: BALLOON a.k.a. Fu-sen. (Keiichi SHIGA) \n" +"Language-Team: japanese\n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.7.1\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop\n" +"X-Poedit-Basepath: .\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Poedit-SearchPath-0: .\n" + +#: src/e_mod_config.c:130 +msgid "Clipboards" +msgstr "クリップボード" + +#: src/e_mod_config.c:131 +msgid " Use Copy (Ctrl-C)" +msgstr " コピー (Ctrl-C) を使用" + +#: src/e_mod_config.c:134 +msgid " Use Primary (Selection)" +msgstr "プライマリ (セレクション) を使用" + +#: src/e_mod_config.c:137 +msgid " Synchronize Clipboards" +msgstr "クリップボードを同期する" + +#: src/e_mod_config.c:146 +msgid "History" +msgstr "履歴" + +#: src/e_mod_config.c:147 +msgid " Save History" +msgstr "履歴を保存" + +#: src/e_mod_config.c:150 +msgid " Reverse Order" +msgstr "並びを逆にする" + +#: src/e_mod_config.c:153 +msgid " Confirm before Clearing" +msgstr "削除前に確認する" + +#: src/e_mod_config.c:156 +msgid " Items in History" +msgstr "履歴項目" + +#: src/e_mod_config.c:164 +msgid "Labels" +msgstr "ラベル" + +#: src/e_mod_config.c:165 src/e_mod_config.c:177 +msgid " Ignore Whitespace" +msgstr "空白を無視" + +#: src/e_mod_config.c:168 +msgid " Label Length" +msgstr "ラベルの長さ" + +#: src/e_mod_config.c:176 +msgid "Content" +msgstr "内容" + +#: src/e_mod_config.c:180 +msgid " Trim Whitespace" +msgstr "空白を削除" + +#: src/e_mod_config.c:183 +msgid " Trim Newlines" +msgstr "改行を削除" + +#: src/e_mod_config.c:206 +msgid "Clipboard Settings" +msgstr "クリップボード設定" + +#: src/e_mod_main.c:274 src/e_mod_main.c:382 +msgid "Settings" +msgstr "設定" + +#: src/e_mod_main.c:361 +msgid "Empty" +msgstr "空" + +#: src/e_mod_main.c:369 +msgid "Clear" +msgstr "削除" + +#: src/e_mod_main.c:568 +msgid "Confirm History Deletion" +msgstr "履歴削除の確認" + +#: src/e_mod_main.c:570 +msgid "" +"You wish to delete the clipboards history.

Are you sure you want to " +"delete it?" +msgstr "" +"クリップボードの履歴を削除しようとしています。

削除を行ってよろしいで" +"すか?" + +#: src/e_mod_main.c:573 +msgid "Delete" +msgstr "削除" + +#: src/e_mod_main.c:573 +msgid "Keep" +msgstr "保持" + +#: src/e_mod_main.c:729 src/e_mod_main.c:730 src/e_mod_main.c:731 +msgid "Clipboard" +msgstr "クリップボード" + +#: src/e_mod_main.h:19 +msgid "Show History" +msgstr "履歴を表示" + +#: src/e_mod_main.h:20 +msgid "Show Settings" +msgstr "設定を表示" + +#: src/e_mod_main.h:21 +msgid "Clear History" +msgstr "履歴の削除" From 6dabf5f2b59c7ff11c115d28ebfc6a22c1d5a254 Mon Sep 17 00:00:00 2001 From: thewaiter Date: Mon, 12 Dec 2016 21:18:03 +0100 Subject: [PATCH 10/10] Slovenian translation added --- po/LINGUAS | 2 +- po/sl.po | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 po/sl.po diff --git a/po/LINGUAS b/po/LINGUAS index 0b32015..d77f22f 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1 +1 @@ -es sk ja +es sk ja sl diff --git a/po/sl.po b/po/sl.po new file mode 100644 index 0000000..f69033a --- /dev/null +++ b/po/sl.po @@ -0,0 +1,129 @@ +msgid "" +msgstr "" +"Project-Id-Version: clipboard\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2016-11-16 21:00+0100\n" +"PO-Revision-Date: 2016-11-19 15:51+0100\n" +"Last-Translator: Renato Rener \n" +"Language-Team: slovenian \n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-SearchPath-0: .\n" + +#: src/e_mod_config.c:130 +msgid "Clipboards" +msgstr "Odložišča" + +#: src/e_mod_config.c:131 +msgid " Use Copy (Ctrl-C)" +msgstr "Uporabi kopiranje (Ctrl-C)" + +#: src/e_mod_config.c:134 +msgid " Use Primary (Selection)" +msgstr "Uporabi prvinsko (Izbor)" + +#: src/e_mod_config.c:137 +msgid " Synchronize Clipboards" +msgstr "Uskladi odložišča" + +#: src/e_mod_config.c:146 +msgid "History" +msgstr "Zgodovina" + +#: src/e_mod_config.c:147 +msgid " Save History" +msgstr "Shrani zgodovino" + +#: src/e_mod_config.c:150 +msgid " Reverse Order" +msgstr "Zamenjan vrstni red" + +#: src/e_mod_config.c:153 +msgid " Confirm before Clearing" +msgstr "Potrdi pred očiščenjem" + +#: src/e_mod_config.c:156 +msgid " Items in History" +msgstr "Predmeti zgodovine" + +#: src/e_mod_config.c:164 +msgid "Labels" +msgstr "Nalepke" + +#: src/e_mod_config.c:165 src/e_mod_config.c:177 +msgid " Ignore Whitespace" +msgstr "Ignoriraj prazno mesto" + +#: src/e_mod_config.c:168 +msgid " Label Length" +msgstr "Dolžina nalepke" + +#: src/e_mod_config.c:176 +msgid "Content" +msgstr "Vsebina" + +#: src/e_mod_config.c:180 +msgid " Trim Whitespace" +msgstr "Odstrani prazna mesta" + +#: src/e_mod_config.c:183 +msgid " Trim Newlines" +msgstr "Odstrani nove vrstice" + +#: src/e_mod_config.c:206 +msgid "Clipboard Settings" +msgstr "Nastavitve odložišča" + +#: src/e_mod_main.c:274 src/e_mod_main.c:382 +msgid "Settings" +msgstr "Nastavitve" + +#: src/e_mod_main.c:361 +msgid "Empty" +msgstr "Sprazni" + +#: src/e_mod_main.c:369 +msgid "Clear" +msgstr "Počisti" + +#: src/e_mod_main.c:568 +msgid "Confirm History Deletion" +msgstr "Potrdite brisanje zgodovine" + +#: src/e_mod_main.c:570 +msgid "" +"You wish to delete the clipboards history.

Are you sure you want to " +"delete it?" +msgstr "" +"Izbrisati hočete zgodovino odložišča.

Ali ste prepričani, da jo " +"hočete izbrisati?" + +#: src/e_mod_main.c:573 +msgid "Delete" +msgstr "Izbriši" + +#: src/e_mod_main.c:573 +msgid "Keep" +msgstr "Ohrani" + +#: src/e_mod_main.c:729 src/e_mod_main.c:730 src/e_mod_main.c:731 +msgid "Clipboard" +msgstr "Odložišče" + +#: src/e_mod_main.h:19 +msgid "Show History" +msgstr "Prikaži zgodovino" + +#: src/e_mod_main.h:20 +msgid "Show Settings" +msgstr "Prikaži nastavitve" + +#: src/e_mod_main.h:21 +msgid "Clear History" +msgstr "Počisti zgodovino"