From 465456841381b58788a03e6d96fbfeeb8d3fe620 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 2 Jun 2013 23:00:26 +0200 Subject: [PATCH] irc: add option irc.look.nick_color_hash: hash algorithm to find nick color (patch #8062) --- AUTHORS | 1 + ChangeLog | 4 ++- po/cs.po | 41 ++++++++++++++++++------------- po/de.po | 26 ++++++++++++-------- po/es.po | 32 ++++++++++++++---------- po/fr.po | 47 +++++++++++++++++++++--------------- po/hu.po | 22 +++++++++++------ po/it.po | 32 ++++++++++++++---------- po/ja.po | 30 ++++++++++++++--------- po/pl.po | 43 +++++++++++++++++++-------------- po/pt_BR.po | 40 +++++++++++++++++------------- po/ru.po | 22 +++++++++++------ po/weechat.pot | 22 +++++++++++------ src/plugins/irc/irc-config.c | 17 ++++++++++--- src/plugins/irc/irc-config.h | 7 ++++++ src/plugins/irc/irc-nick.c | 26 ++++++++++++++++---- 16 files changed, 259 insertions(+), 153 deletions(-) diff --git a/AUTHORS b/AUTHORS index af59dcce3..f39aecc94 100644 --- a/AUTHORS +++ b/AUTHORS @@ -21,6 +21,7 @@ Alphabetically: * Ailin Nemui (Nei) * Aleksey V Zapparov * Andrew Potter +* Antoine Pietri (seirl) * Arvydas Sidorenko * Benoit Papillault (benoit) * Dmitry Kobylin diff --git a/ChangeLog b/ChangeLog index 6248b1422..20f794b97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.4.2-dev, 2013-05-30 +v0.4.2-dev, 2013-06-02 This document lists all changes for each version. @@ -21,6 +21,8 @@ Version 0.4.2 (under dev!) "layout_window" * core: fix line alignment when option weechat.look.buffer_time_format is set to empty string +* irc: add option irc.look.nick_color_hash: hash algorithm to find nick color + (patch #8062) * irc: fix multiple nicks in command /query (separated by commas): open one buffer per nick * relay: fix binding to an IP address (bug #39119) diff --git a/po/cs.po b/po/cs.po index eb32b94b7..f9239125c 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-05-30 07:59+0200\n" +"POT-Creation-Date: 2013-06-02 10:52+0200\n" "PO-Revision-Date: 2013-05-20 16:54+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -361,17 +361,17 @@ msgid "color" msgstr "barva" msgid "" -"a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)" -"green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal " -"color number or an alias; attributes are allowed before color (for text " -"color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" for " -"underline" +"a WeeChat color name (default, black, (dark)gray, white, (light)red, " +"(light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a " +"terminal color number or an alias; attributes are allowed before color (for " +"text color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" " +"for underline" msgstr "" -"jméno WeeChat barvy (default, black, (dark)gray, white, (light)red, (light)" -"green, brown, yellow, (light)blue, (light)magenta, (light)cyan), číslo barvy " -"terminálu nebo alias; před barvou jsou povoleny atributy (pouze pro barvu " -"textu, ne pro barvu pozadí): \"*\" pro tučné, \"!\" pro obrácené, \"_\" pro " -"podtržené" +"jméno WeeChat barvy (default, black, (dark)gray, white, (light)red, " +"(light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), " +"číslo barvy terminálu nebo alias; před barvou jsou povoleny atributy (pouze " +"pro barvu textu, ne pro barvu pozadí): \"*\" pro tučné, \"!\" pro obrácené, " +"\"_\" pro podtržené" #. TRANSLATORS: please do not translate "(null)" msgid "undefined value allowed (null)" @@ -2128,10 +2128,11 @@ msgid "" "scroll_unread [-window ] || swap [-window ] [up|down|left|" "right] || zoom[-window ]" msgstr "" -"list || -1|+1|b#|up|down|left|right || splith|splitv [] || resize [+/-]" -" || balance || merge [all] || page_up|page_down || refresh || scroll|" -"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" -"scroll_next_highlight || swap [up|down|left|right] || zoom" +"list || -1|+1|b#|up|down|left|right || splith|splitv [] || resize " +"[+/-] || balance || merge [all] || page_up|page_down || refresh || " +"scroll|scroll_up|scroll_down|scroll_top|scroll_bottom|" +"scroll_previous_highlight|scroll_next_highlight || swap [up|down|left|right] " +"|| zoom" #, fuzzy msgid "" @@ -2539,8 +2540,8 @@ msgid "" "regular expression used to check if a message has highlight or not, at least " "one match in string must be surrounded by word chars (alphanumeric, \"-\", " "\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at " -"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)" -"FlashCode|flashy\"" +"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-" +"i)FlashCode|flashy\"" msgstr "" "regulární výraz pro zkontrolování zda má zpráva být zvýrazněna nebo ne, " "alespoň jedno nalezení v řetězci musí být obklopeno znaky slov " @@ -5977,6 +5978,12 @@ msgstr "" "barvy nebude použit pro tyto přezdívky (formát je: \"přezdívka1:barva1;" "přezdívka2:barva2\")" +msgid "" +"hash algorithm used to find the color for a nick: djb2 = variant of djb2 " +"(position of letters matters: anagrams of a nick have different color), sum " +"= sum of letters" +msgstr "" + msgid "" "chars used to stop in nick when computing color with letters of nick (at " "least one char outside this list must be in string before stopping) " diff --git a/po/de.po b/po/de.po index 10677fdba..14b844661 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-05-30 07:59+0200\n" +"POT-Creation-Date: 2013-06-02 10:52+0200\n" "PO-Revision-Date: 2013-05-20 16:54+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -380,11 +380,11 @@ msgid "color" msgstr "Farbe" msgid "" -"a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)" -"green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal " -"color number or an alias; attributes are allowed before color (for text " -"color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" for " -"underline" +"a WeeChat color name (default, black, (dark)gray, white, (light)red, " +"(light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a " +"terminal color number or an alias; attributes are allowed before color (for " +"text color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" " +"for underline" msgstr "" "ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, " "(light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine " @@ -2864,8 +2864,8 @@ msgid "" "regular expression used to check if a message has highlight or not, at least " "one match in string must be surrounded by word chars (alphanumeric, \"-\", " "\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at " -"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)" -"FlashCode|flashy\"" +"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-" +"i)FlashCode|flashy\"" msgstr "" "Suchmuster (regulärer Ausdruck) welches genutzt werden soll, um zu " "überprüfen ob eine Nachricht ein Highlight enthält oder nicht. Mindestens " @@ -5143,8 +5143,8 @@ msgstr "" "werden)\n" " - Hostname/Port oder IP/Port (damit wird lediglich ein " "TEMPORÄRER Server erstellt), Port 6667 wird standardmäßig verwendet\n" -" - URL mit folgendem Format: irc[6][s]://[nickname[:password]@]" -"irc.example.org[:port][/#channel1][,#channel2[...]]\n" +" - URL mit folgendem Format: irc[6][s]://[nickname[:" +"password]@]irc.example.org[:port][/#channel1][,#channel2[...]]\n" " option: legt Option für den Server fest (die Boolean-Optionen können " "weggelassen werden)\n" " nooption: deaktiviert eine Boolean Option (Beispiel: -nossl)\n" @@ -6560,6 +6560,12 @@ msgstr "" "möglich die Nicks, in dieser Option, ausschließlich in Kleinschrift zu " "schreiben." +msgid "" +"hash algorithm used to find the color for a nick: djb2 = variant of djb2 " +"(position of letters matters: anagrams of a nick have different color), sum " +"= sum of letters" +msgstr "" + msgid "" "chars used to stop in nick when computing color with letters of nick (at " "least one char outside this list must be in string before stopping) " diff --git a/po/es.po b/po/es.po index bd2daa819..4da2d99df 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-05-30 07:59+0200\n" +"POT-Creation-Date: 2013-06-02 10:52+0200\n" "PO-Revision-Date: 2013-05-20 16:54+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -369,17 +369,17 @@ msgid "color" msgstr "color" msgid "" -"a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)" -"green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal " -"color number or an alias; attributes are allowed before color (for text " -"color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" for " -"underline" +"a WeeChat color name (default, black, (dark)gray, white, (light)red, " +"(light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a " +"terminal color number or an alias; attributes are allowed before color (for " +"text color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" " +"for underline" msgstr "" -"un nombre de color de WeeChat (default, black, (dark)gray, white, (light)" -"red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), " -"un número de color de la terminal o un alias; atributos delante del color " -"están permitidos (solamente para color de texto , no de fondo): \"*\" para " -"negrita, \"!\" para revertir, \"_\" para subrayado." +"un nombre de color de WeeChat (default, black, (dark)gray, white, " +"(light)red, (light)green, brown, yellow, (light)blue, (light)magenta, " +"(light)cyan), un número de color de la terminal o un alias; atributos " +"delante del color están permitidos (solamente para color de texto , no de " +"fondo): \"*\" para negrita, \"!\" para revertir, \"_\" para subrayado." #. TRANSLATORS: please do not translate "(null)" msgid "undefined value allowed (null)" @@ -2689,8 +2689,8 @@ msgid "" "regular expression used to check if a message has highlight or not, at least " "one match in string must be surrounded by word chars (alphanumeric, \"-\", " "\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at " -"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)" -"FlashCode|flashy\"" +"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-" +"i)FlashCode|flashy\"" msgstr "" "expresión regular usada para ver si un mensaje tiene un resalte o no, al " "menos una coincidencia en el texto debe estar rodeado por letras " @@ -6202,6 +6202,12 @@ msgstr "" "color1;apodo2:color2\"); búsquedas de apodos son exactamente igual que en " "minúsculas, así que es posible usar minúsculas para apodos con esta opción" +msgid "" +"hash algorithm used to find the color for a nick: djb2 = variant of djb2 " +"(position of letters matters: anagrams of a nick have different color), sum " +"= sum of letters" +msgstr "" + msgid "" "chars used to stop in nick when computing color with letters of nick (at " "least one char outside this list must be in string before stopping) " diff --git a/po/fr.po b/po/fr.po index 6ff59c9ba..3a4ebadb5 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-05-30 07:59+0200\n" -"PO-Revision-Date: 2013-05-29 20:42+0200\n" +"POT-Creation-Date: 2013-06-02 10:52+0200\n" +"PO-Revision-Date: 2013-06-02 10:52+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -368,11 +368,11 @@ msgid "color" msgstr "couleur" msgid "" -"a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)" -"green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal " -"color number or an alias; attributes are allowed before color (for text " -"color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" for " -"underline" +"a WeeChat color name (default, black, (dark)gray, white, (light)red, " +"(light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a " +"terminal color number or an alias; attributes are allowed before color (for " +"text color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" " +"for underline" msgstr "" "un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, " "(light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un " @@ -989,9 +989,9 @@ msgid "" "|| get || |" msgstr "" "list || clear [||-merged|-all] || move|merge || swap " -"| [|] || unmerge [|-all] || close [" -"[-]|] || notify || localvar || set || " -"get || |" +"| [|] || unmerge [|-all] || close " +"[[-]|] || notify || localvar || set " +" || get || |" msgid "" " list: list buffers (without argument, this list is displayed)\n" @@ -2777,15 +2777,15 @@ msgid "" "regular expression used to check if a message has highlight or not, at least " "one match in string must be surrounded by word chars (alphanumeric, \"-\", " "\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at " -"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)" -"FlashCode|flashy\"" +"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-" +"i)FlashCode|flashy\"" msgstr "" "expression régulière utilisée pour vérifier si un message a un \"highlight\" " "ou non, au moins une correspondance dans la chaîne doit être entourée de " "caractères de mot (alpha-numérique, \"-\", \"_\" ou \"|\"), l'expression " "régulière est insensible à la casse (utilisez \"(?-i)\" au début pour la " -"rendre sensible à la casse), exemples: \"flashcode|flashy\", \"(?-i)" -"FlashCode|flashy\"" +"rendre sensible à la casse), exemples: \"flashcode|flashy\", \"(?-" +"i)FlashCode|flashy\"" msgid "" "comma separated list of tags to highlight (case insensitive comparison, " @@ -2947,8 +2947,8 @@ msgstr "" "activer le mode du terminal \"bracketed paste\" (pas supporté par tous les " "terminaux/multiplexeurs): dans ce mode, le texte collé est entouré avec des " "séquences de contrôle de sorte que WeeChat puisse différencier le texte " -"collé du texte tapé (\"ESC[200~\", suivi par le texte collé, suivi par \"ESC" -"[201~\")" +"collé du texte tapé (\"ESC[200~\", suivi par le texte collé, suivi par " +"\"ESC[201~\")" msgid "" "force end of bracketed paste after this delay (in seconds) if the control " @@ -5725,9 +5725,9 @@ msgid "" "