diff options
49 files changed, 1196 insertions, 869 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index 84032abf9..42a543ec8 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -21,6 +21,13 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] [[1.5_features]] === New features +* core: fix nick coloring when stop chars and a forced color are used: first + remove chars then look for forced color +* core: move nick coloring from irc plugin to core, move options + "irc.look.nick_color_force", "irc.look.nick_color_hash" and + "irc.look.nick_color_stop_chars" to core, add info "nick_color" and + "nick_color_name", deprecate info "irc_nick_color" and "irc_color_name" + (issue #262) * core: move irc bar item "away" to core, move options "irc.look.item_away_message" and "irc.color.item_away" to core (issue #692) * api: add pointer in callbacks used in scripting API (issue #406) diff --git a/ReleaseNotes.asciidoc b/ReleaseNotes.asciidoc index d0baa6abc..8ee49248a 100644 --- a/ReleaseNotes.asciidoc +++ b/ReleaseNotes.asciidoc @@ -20,6 +20,27 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog] [[1.5]] == Version 1.5 (under dev) +[[1.5_nick_coloring]] +=== Nick coloring moved to core + +The nick coloring feature has been moved from irc plugin to core. + +Two options have been moved from irc plugin (irc.conf) to core (weechat.conf), +and you must set new value if you customized them: + +* 'irc.look.nick_color_force' moved to 'weechat.look.nick_color_force' +* 'irc.look.nick_color_hash' moved to 'weechat.look.nick_color_hash' +* 'irc.look.nick_color_stop_chars' moved to 'weechat.look.nick_color_stop_chars' + +The following info names (used by API function "info_get") are renamed as well: + +* 'irc_nick_color' renamed to 'nick_color' +* 'irc_nick_color_name' renamed to 'nick_color_name' + +[NOTE] +The old info 'irc_nick_color' and 'irc_nick_color_name' are kept for +compatibility (especially scripts) and will be removed in an upcoming release. + [[1.5_callbacks_pointer]] === Pointer in callbacks diff --git a/doc/de/autogen/plugin_api/infos.asciidoc b/doc/de/autogen/plugin_api/infos.asciidoc index a0b7d2a39..291f6db20 100644 --- a/doc/de/autogen/plugin_api/infos.asciidoc +++ b/doc/de/autogen/plugin_api/infos.asciidoc @@ -18,9 +18,9 @@ | irc | irc_nick | aktuellen Nicknamen für den Server erhalten | Servername -| irc | irc_nick_color | zeigt Farbecode des Nick | Nickname +| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | Nickname -| irc | irc_nick_color_name | zeigt Farbnamen des Nick | Nickname +| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | Nickname | irc | irc_nick_from_host | Nicknamen des IRC-Hosts erhalten | IRC host (in der Form `:nick!name@server.com`) @@ -54,6 +54,10 @@ | weechat | locale | Lokalisation welche für die übersetzten Nachrichten verwendet werden soll | - +| weechat | nick_color | zeigt Farbecode des Nick | Nickname + +| weechat | nick_color_name | zeigt Farbnamen des Nick | Nickname + | weechat | term_height | Höhe des Terminals | - | weechat | term_width | Breite des Terminals | - diff --git a/doc/de/autogen/user/irc_options.asciidoc b/doc/de/autogen/user/irc_options.asciidoc index 1b109e138..d36d4b75c 100644 --- a/doc/de/autogen/user/irc_options.asciidoc +++ b/doc/de/autogen/user/irc_options.asciidoc @@ -232,21 +232,6 @@ ** Typ: integer ** Werte: none, next, near_server (Standardwert: `none`) -* [[option_irc.look.nick_color_force]] *irc.look.nick_color_force* -** Beschreibung: `erzwingt für einen Nick eine spezielle Farbe. Die standardmäßig, mittels Streuwertfunktion aus dem Nicknamen, generierte Farbe findet für diese Nicks keine Anwendung (Format:"Nick1:Farbe1;Nick2:Farbe2"). Zuerst wird beim Namen des Nick nach Groß- und Kleinschreibung unterschieden. Sollte der Nick nicht gefunden werden findet keine Unterscheidung mehr statt. Somit ist es möglich die Nicks, für diese Einstellung, ausschließlich in Kleinschrift aufzuführen` -** Typ: Zeichenkette -** Werte: beliebige Zeichenkette (Standardwert: `""`) - -* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash* -** Beschreibung: `Gibt an welcher Hash-Algorithmus zur Farbauswahl für Nicks genutzt werden soll: djb2 = Variante des djb2 (Position der Buchstaben innerhalb des Nicks werden berücksichtigt: Anagramme eines Nick erhalten eine andere Farbe), sum = hier ist nur die Anzahl der Buchstaben maßgeblich` -** Typ: integer -** Werte: djb2, sum (Standardwert: `sum`) - -* [[option_irc.look.nick_color_stop_chars]] *irc.look.nick_color_stop_chars* -** Beschreibung: `Zeichen die genutzt werden sollen damit bei der Generierung der Farbe für einen Nicknamen abgebrochen wird. Es muss mindestens ein Zeichen im Nicknamen enthalten sein der nicht in dieser Liste aufgeführt wird, damit eine Farbe für den Nicknamen erstellt werden kann (Beispiel: Der Nickname lautet "|nick|abwesend" wobei das Zeichen "|" ignoriert werden soll. Die Farbe für den Nicknamen wird nun für "|nick" anstelle von "|nick|abwesend" erstellt)` -** Typ: Zeichenkette -** Werte: beliebige Zeichenkette (Standardwert: `"_|["`) - * [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart* ** Beschreibung: `intelligente Vervollständigung für Nicks (es wird zuerst mit den letzten Rednern vervollständigt): speakers = alle Redner (einschließlich Highlights), speakers_highlight = nur Redner die eine Highlight Nachricht geschrieben haben` ** Typ: integer diff --git a/doc/de/autogen/user/weechat_options.asciidoc b/doc/de/autogen/user/weechat_options.asciidoc index bddb9e239..c0e51e59e 100644 --- a/doc/de/autogen/user/weechat_options.asciidoc +++ b/doc/de/autogen/user/weechat_options.asciidoc @@ -742,6 +742,21 @@ ** Typ: integer ** Werte: 1 .. 10000 (Standardwert: `100`) +* [[option_weechat.look.nick_color_force]] *weechat.look.nick_color_force* +** Beschreibung: `erzwingt für einen Nick eine spezielle Farbe. Die standardmäßig, mittels Streuwertfunktion aus dem Nicknamen, generierte Farbe findet für diese Nicks keine Anwendung (Format:"Nick1:Farbe1;Nick2:Farbe2"). Zuerst wird beim Namen des Nick nach Groß- und Kleinschreibung unterschieden. Sollte der Nick nicht gefunden werden findet keine Unterscheidung mehr statt. Somit ist es möglich die Nicks, für diese Einstellung, ausschließlich in Kleinschrift aufzuführen` +** Typ: Zeichenkette +** Werte: beliebige Zeichenkette (Standardwert: `""`) + +* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash* +** Beschreibung: `Gibt an welcher Hash-Algorithmus zur Farbauswahl für Nicks genutzt werden soll: djb2 = Variante des djb2 (Position der Buchstaben innerhalb des Nicks werden berücksichtigt: Anagramme eines Nick erhalten eine andere Farbe), sum = hier ist nur die Anzahl der Buchstaben maßgeblich` +** Typ: integer +** Werte: djb2, sum (Standardwert: `sum`) + +* [[option_weechat.look.nick_color_stop_chars]] *weechat.look.nick_color_stop_chars* +** Beschreibung: `Zeichen die genutzt werden sollen damit bei der Generierung der Farbe für einen Nicknamen abgebrochen wird. Es muss mindestens ein Zeichen im Nicknamen enthalten sein der nicht in dieser Liste aufgeführt wird, damit eine Farbe für den Nicknamen erstellt werden kann (Beispiel: Der Nickname lautet "|nick|abwesend" wobei das Zeichen "|" ignoriert werden soll. Die Farbe für den Nicknamen wird nun für "|nick" anstelle von "|nick|abwesend" erstellt)` +** Typ: Zeichenkette +** Werte: beliebige Zeichenkette (Standardwert: `"_|["`) + * [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix* ** Beschreibung: `Text, der vor dem Nick dargestellt werden soll, Beispiel: "<"` ** Typ: Zeichenkette diff --git a/doc/en/autogen/plugin_api/infos.asciidoc b/doc/en/autogen/plugin_api/infos.asciidoc index 049300d33..d41a9f046 100644 --- a/doc/en/autogen/plugin_api/infos.asciidoc +++ b/doc/en/autogen/plugin_api/infos.asciidoc @@ -18,9 +18,9 @@ | irc | irc_nick | get current nick on a server | server name -| irc | irc_nick_color | get nick color code | nickname +| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | nickname -| irc | irc_nick_color_name | get nick color name | nickname +| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | nickname | irc | irc_nick_from_host | get nick from IRC host | IRC host (like `:nick!name@server.com`) @@ -54,6 +54,10 @@ | weechat | locale | locale used for translating messages | - +| weechat | nick_color | get nick color code | nickname + +| weechat | nick_color_name | get nick color name | nickname + | weechat | term_height | height of terminal | - | weechat | term_width | width of terminal | - diff --git a/doc/en/autogen/user/irc_options.asciidoc b/doc/en/autogen/user/irc_options.asciidoc index 50a58028f..908f8b04c 100644 --- a/doc/en/autogen/user/irc_options.asciidoc +++ b/doc/en/autogen/user/irc_options.asciidoc @@ -232,21 +232,6 @@ ** type: integer ** values: none, next, near_server (default value: `none`) -* [[option_irc.look.nick_color_force]] *irc.look.nick_color_force* -** description: `force color for some nicks: hash computed with nickname to find color will not be used for these nicks (format is: "nick1:color1;nick2:color2"); look up for nicks is with exact case then lower case, so it's possible to use only lower case for nicks in this option` -** type: string -** values: any string (default value: `""`) - -* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash* -** description: `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` -** type: integer -** values: djb2, sum (default value: `sum`) - -* [[option_irc.look.nick_color_stop_chars]] *irc.look.nick_color_stop_chars* -** description: `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) (example: nick "|nick|away" with "|" in chars will return color of nick "|nick")` -** type: string -** values: any string (default value: `"_|["`) - * [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart* ** description: `smart completion for nicks (completes first with last speakers): speakers = all speakers (including highlights), speakers_highlights = only speakers with highlight` ** type: integer diff --git a/doc/en/autogen/user/weechat_options.asciidoc b/doc/en/autogen/user/weechat_options.asciidoc index 6911594b3..031287de9 100644 --- a/doc/en/autogen/user/weechat_options.asciidoc +++ b/doc/en/autogen/user/weechat_options.asciidoc @@ -742,6 +742,21 @@ ** type: integer ** values: 1 .. 10000 (default value: `100`) +* [[option_weechat.look.nick_color_force]] *weechat.look.nick_color_force* +** description: `force color for some nicks: hash computed with nickname to find color will not be used for these nicks (format is: "nick1:color1;nick2:color2"); look up for nicks is with exact case then lower case, so it's possible to use only lower case for nicks in this option` +** type: string +** values: any string (default value: `""`) + +* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash* +** description: `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` +** type: integer +** values: djb2, sum (default value: `sum`) + +* [[option_weechat.look.nick_color_stop_chars]] *weechat.look.nick_color_stop_chars* +** description: `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) (example: nick "|nick|away" with "|" in chars will return color of nick "|nick")` +** type: string +** values: any string (default value: `"_|["`) + * [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix* ** description: `text to display before nick in prefix of message, example: "<"` ** type: string diff --git a/doc/en/weechat_dev.en.asciidoc b/doc/en/weechat_dev.en.asciidoc index 45e832d2e..4627be564 100644 --- a/doc/en/weechat_dev.en.asciidoc +++ b/doc/en/weechat_dev.en.asciidoc @@ -150,6 +150,7 @@ WeeChat "core" is located in following directories: | gui-layout.c | Layout | gui-line.c | Lines in buffers | gui-mouse.c | Mouse +| gui-nick.c | Nick functions | gui-nicklist.c | Nicklist in buffers | gui-window.c | Windows | curses/ | Curses interface diff --git a/doc/fr/autogen/plugin_api/infos.asciidoc b/doc/fr/autogen/plugin_api/infos.asciidoc index fe366f7d9..d01d79a0e 100644 --- a/doc/fr/autogen/plugin_api/infos.asciidoc +++ b/doc/fr/autogen/plugin_api/infos.asciidoc @@ -18,9 +18,9 @@ | irc | irc_nick | retourne le pseudo utilisé actuellement sur un serveur | nom de serveur -| irc | irc_nick_color | retourne le code couleur du pseudo | pseudo +| irc | irc_nick_color | retourne le code couleur du pseudo (*obsolète* depuis la version 1.5, remplacé par "nick_color") | pseudo -| irc | irc_nick_color_name | retourne le nom de la couleur du pseudo | pseudo +| irc | irc_nick_color_name | retourne le nom de la couleur du pseudo (*obsolète* depuis la version 1.5, remplacé par "nick_color_name") | pseudo | irc | irc_nick_from_host | retourne le pseudo à partir d'un host IRC | host IRC (comme `:pseudo!nom@serveur.com`) @@ -54,6 +54,10 @@ | weechat | locale | locale utilisée pour la traduction des messages | - +| weechat | nick_color | retourne le code couleur du pseudo | pseudo + +| weechat | nick_color_name | retourne le nom de la couleur du pseudo | pseudo + | weechat | term_height | hauteur du terminal | - | weechat | term_width | largeur du terminal | - diff --git a/doc/fr/autogen/user/irc_options.asciidoc b/doc/fr/autogen/user/irc_options.asciidoc index 9854a5a7a..f768d9d71 100644 --- a/doc/fr/autogen/user/irc_options.asciidoc +++ b/doc/fr/autogen/user/irc_options.asciidoc @@ -232,21 +232,6 @@ ** type: entier ** valeurs: none, next, near_server (valeur par défaut: `none`) -* [[option_irc.look.nick_color_force]] *irc.look.nick_color_force* -** description: `force la couleur pour certains pseudos : le hash calculé avec le pseudo pour trouver la couleur ne sera pas utilisé pour ces pseudos (le format est : "pseudo1:couleur1;pseudo2:couleur2") ; la recherche de pseudos s'effectue avec la casse exacte puis en minuscules, donc il est possible d'utiliser uniquement des minuscules pour les pseudos dans cette option` -** type: chaîne -** valeurs: toute chaîne (valeur par défaut: `""`) - -* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash* -** description: `algorithme de hash utilisé pour trouver la couleur du pseudo : djb2 = variante de djb2 (la position des lettres compte : les anagrammes d'un pseudo ont une couleur différente), sum = somme des lettres` -** type: entier -** valeurs: djb2, sum (valeur par défaut: `sum`) - -* [[option_irc.look.nick_color_stop_chars]] *irc.look.nick_color_stop_chars* -** description: `caractères utilisés pour l'arrêt dans le pseudo lors du calcul de la couleur avec les lettres du pseudo (au moins un caractère en dehors de cette liste doit être dans la chaîne avant de s'arrêter) (exemple : le pseudo "|nick|away" avec "|" dans les caractères retournera la couleur du pseudo "|nick")` -** type: chaîne -** valeurs: toute chaîne (valeur par défaut: `"_|["`) - * [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart* ** description: `complétion intelligente pour les pseudos (complète d'abord avec les personnes qui ont parlé récemment) : speakers = tous ceux qui ont parlé (incluant les highlights), speakers_highlights = seulement ceux qui ont parlé avec un highlight` ** type: entier diff --git a/doc/fr/autogen/user/weechat_options.asciidoc b/doc/fr/autogen/user/weechat_options.asciidoc index bcbafca33..456c4424d 100644 --- a/doc/fr/autogen/user/weechat_options.asciidoc +++ b/doc/fr/autogen/user/weechat_options.asciidoc @@ -742,6 +742,21 @@ ** type: entier ** valeurs: 1 .. 10000 (valeur par défaut: `100`) +* [[option_weechat.look.nick_color_force]] *weechat.look.nick_color_force* +** description: `force la couleur pour certains pseudos : le hash calculé avec le pseudo pour trouver la couleur ne sera pas utilisé pour ces pseudos (le format est : "pseudo1:couleur1;pseudo2:couleur2") ; la recherche de pseudos s'effectue avec la casse exacte puis en minuscules, donc il est possible d'utiliser uniquement des minuscules pour les pseudos dans cette option` +** type: chaîne +** valeurs: toute chaîne (valeur par défaut: `""`) + +* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash* +** description: `algorithme de hash utilisé pour trouver la couleur du pseudo : djb2 = variante de djb2 (la position des lettres compte : les anagrammes d'un pseudo ont une couleur différente), sum = somme des lettres` +** type: entier +** valeurs: djb2, sum (valeur par défaut: `sum`) + +* [[option_weechat.look.nick_color_stop_chars]] *weechat.look.nick_color_stop_chars* +** description: `caractères utilisés pour l'arrêt dans le pseudo lors du calcul de la couleur avec les lettres du pseudo (au moins un caractère en dehors de cette liste doit être dans la chaîne avant de s'arrêter) (exemple : le pseudo "|nick|away" avec "|" dans les caractères retournera la couleur du pseudo "|nick")` +** type: chaîne +** valeurs: toute chaîne (valeur par défaut: `"_|["`) + * [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix* ** description: `texte à afficher avant le pseudo dans le préfixe, exemple : "<"` ** type: chaîne diff --git a/doc/fr/weechat_dev.fr.asciidoc b/doc/fr/weechat_dev.fr.asciidoc index fa4486ddc..ba399471a 100644 --- a/doc/fr/weechat_dev.fr.asciidoc +++ b/doc/fr/weechat_dev.fr.asciidoc @@ -151,6 +151,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants : | gui-layout.c | Dispositions ("layouts") | gui-line.c | Lignes dans les tampons | gui-mouse.c | Souris +| gui-nick.c | Fonctions pour les pseudos | gui-nicklist.c | Liste de pseudos dans les tampons | gui-window.c | Fenêtres | curses/ | Interface Curses diff --git a/doc/it/autogen/plugin_api/infos.asciidoc b/doc/it/autogen/plugin_api/infos.asciidoc index b6fd05930..dcb2c139b 100644 --- a/doc/it/autogen/plugin_api/infos.asciidoc +++ b/doc/it/autogen/plugin_api/infos.asciidoc @@ -18,9 +18,9 @@ | irc | irc_nick | ottiene nick corrente su un server | nome server -| irc | irc_nick_color | ottiene il codice del colore del nick | nick +| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | nick -| irc | irc_nick_color_name | ottiene il nome del colore del nick | nick +| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | nick | irc | irc_nick_from_host | ottiene nick dall'host IRC | host IRC (come `:nick!nome@server.com`) @@ -54,6 +54,10 @@ | weechat | locale | locale usato per la traduzione dei messaggi | - +| weechat | nick_color | ottiene il codice del colore del nick | nick + +| weechat | nick_color_name | ottiene il nome del colore del nick | nick + | weechat | term_height | height of terminal | - | weechat | term_width | width of terminal | - diff --git a/doc/it/autogen/user/irc_options.asciidoc b/doc/it/autogen/user/irc_options.asciidoc index e251abdeb..6b719165b 100644 --- a/doc/it/autogen/user/irc_options.asciidoc +++ b/doc/it/autogen/user/irc_options.asciidoc @@ -232,21 +232,6 @@ ** tipo: intero ** valori: none, next, near_server (valore predefinito: `none`) -* [[option_irc.look.nick_color_force]] *irc.look.nick_color_force* -** descrizione: `force color for some nicks: hash computed with nickname to find color will not be used for these nicks (format is: "nick1:color1;nick2:color2"); look up for nicks is with exact case then lower case, so it's possible to use only lower case for nicks in this option` -** tipo: stringa -** valori: qualsiasi stringa (valore predefinito: `""`) - -* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash* -** descrizione: `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` -** tipo: intero -** valori: djb2, sum (valore predefinito: `sum`) - -* [[option_irc.look.nick_color_stop_chars]] *irc.look.nick_color_stop_chars* -** descrizione: `caratteri usati per interrompere il calcolo del colore con le lettere del nick (almeno un carattere al di fuori di questa lista deve essere nella lista prima di interromperlo) (esempio: nick "|nick|away" con "|" nei caratteri restituisce il colore del nick "|nick")` -** tipo: stringa -** valori: qualsiasi stringa (valore predefinito: `"_|["`) - * [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart* ** descrizione: `completamento intelligente per i nick (completa il primo con gli ultimi a parlare sul canale): speakers = tutti i nick (notifiche comprese), speakers_highlight = solo i nick con le notifiche` ** tipo: intero diff --git a/doc/it/autogen/user/weechat_options.asciidoc b/doc/it/autogen/user/weechat_options.asciidoc index 4960753f2..44d532e63 100644 --- a/doc/it/autogen/user/weechat_options.asciidoc +++ b/doc/it/autogen/user/weechat_options.asciidoc @@ -742,6 +742,21 @@ ** tipo: intero ** valori: 1 .. 10000 (valore predefinito: `100`) +* [[option_weechat.look.nick_color_force]] *weechat.look.nick_color_force* +** descrizione: `force color for some nicks: hash computed with nickname to find color will not be used for these nicks (format is: "nick1:color1;nick2:color2"); look up for nicks is with exact case then lower case, so it's possible to use only lower case for nicks in this option` +** tipo: stringa +** valori: qualsiasi stringa (valore predefinito: `""`) + +* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash* +** descrizione: `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` +** tipo: intero +** valori: djb2, sum (valore predefinito: `sum`) + +* [[option_weechat.look.nick_color_stop_chars]] *weechat.look.nick_color_stop_chars* +** descrizione: `caratteri usati per interrompere il calcolo del colore con le lettere del nick (almeno un carattere al di fuori di questa lista deve essere nella lista prima di interromperlo) (esempio: nick "|nick|away" con "|" nei caratteri restituisce il colore del nick "|nick")` +** tipo: stringa +** valori: qualsiasi stringa (valore predefinito: `"_|["`) + * [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix* ** descrizione: `testo da visualizzare prima del nick nel prefisso del messaggio, esempio: "<"` ** tipo: stringa diff --git a/doc/ja/autogen/plugin_api/infos.asciidoc b/doc/ja/autogen/plugin_api/infos.asciidoc index 3dae625b6..87f81ed52 100644 --- a/doc/ja/autogen/plugin_api/infos.asciidoc +++ b/doc/ja/autogen/plugin_api/infos.asciidoc @@ -18,9 +18,9 @@ | irc | irc_nick | あるサーバの現在のニックネームを取得 | サーバ名 -| irc | irc_nick_color | ニックネームの色コードを取得 | ニックネーム +| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | ニックネーム -| irc | irc_nick_color_name | ニックネームの色名を取得 | ニックネーム +| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | ニックネーム | irc | irc_nick_from_host | IRC ホストからニックネームを取得 | IRC ホスト (例: `:nick!name@server.com`) @@ -54,6 +54,10 @@ | weechat | locale | 翻訳メッセージに利用するロケール | - +| weechat | nick_color | ニックネームの色コードを取得 | ニックネーム + +| weechat | nick_color_name | ニックネームの色名を取得 | ニックネーム + | weechat | term_height | 端末の高さ | - | weechat | term_width | 端末の幅 | - diff --git a/doc/ja/autogen/user/irc_options.asciidoc b/doc/ja/autogen/user/irc_options.asciidoc index a76c02603..e5482759f 100644 --- a/doc/ja/autogen/user/irc_options.asciidoc +++ b/doc/ja/autogen/user/irc_options.asciidoc @@ -232,21 +232,6 @@ ** タイプ: 整数 ** 値: none, next, near_server (デフォルト値: `none`) -* [[option_irc.look.nick_color_force]] *irc.look.nick_color_force* -** 説明: `一部のニックネームでニックネーム色を強制する: ニックネームから計算されるハッシュを元にした色を利用しない (書式: "nick1:color1;nick2:color2"); ニックネームの検索はまず大文字小文字が区別された状態で行われ、そのあとに小文字で行われます。このため、このオプションのニックネーム部分を小文字だけで書く事もできます` -** タイプ: 文字列 -** 値: 未制約文字列 (デフォルト値: `""`) - -* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash* -** 説明: `ニックネームに対する色を見つけるハッシュアルゴリズム: djb2 = djb2 (文字の位置が重要: ニックネームに同じ色が使われにくくなる) の亜種、sum = 文字の総和` -** タイプ: 整数 -** 値: djb2, sum (デフォルト値: `sum`) - -* [[option_irc.look.nick_color_stop_chars]] *irc.look.nick_color_stop_chars* -** 説明: `ニックネーム内の色計算に使用する部分を制限する文字 (このリストに含まれない文字が、このリストの文字の前に少なくとも一つ以上含まれなければいけない) (例: "|" を設定した場合、"|nick|away" はニックネーム "|nick" と同じ色になる)` -** タイプ: 文字列 -** 値: 未制約文字列 (デフォルト値: `"_|["`) - * [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart* ** 説明: `ニックネームのスマート補完 (発言日時の新しいものから順にニックネームを補完): speakers = すべてのニックネーム (ハイライトされたニックネームを含む)、speakers_highlights = ハイライトされたニックネームのみ` ** タイプ: 整数 diff --git a/doc/ja/autogen/user/weechat_options.asciidoc b/doc/ja/autogen/user/weechat_options.asciidoc index 785dbfd0d..aeba64201 100644 --- a/doc/ja/autogen/user/weechat_options.asciidoc +++ b/doc/ja/autogen/user/weechat_options.asciidoc @@ -742,6 +742,21 @@ ** タイプ: 整数 ** 値: 1 .. 10000 (デフォルト値: `100`) +* [[option_weechat.look.nick_color_force]] *weechat.look.nick_color_force* +** 説明: `一部のニックネームでニックネーム色を強制する: ニックネームから計算されるハッシュを元にした色を利用しない (書式: "nick1:color1;nick2:color2"); ニックネームの検索はまず大文字小文字が区別された状態で行われ、そのあとに小文字で行われます。このため、このオプションのニックネーム部分を小文字だけで書く事もできます` +** タイプ: 文字列 +** 値: 未制約文字列 (デフォルト値: `""`) + +* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash* +** 説明: `ニックネームに対する色を見つけるハッシュアルゴリズム: djb2 = djb2 (文字の位置が重要: ニックネームに同じ色が使われにくくなる) の亜種、sum = 文字の総和` +** タイプ: 整数 +** 値: djb2, sum (デフォルト値: `sum`) + +* [[option_weechat.look.nick_color_stop_chars]] *weechat.look.nick_color_stop_chars* +** 説明: `ニックネーム内の色計算に使用する部分を制限する文字 (このリストに含まれない文字が、このリストの文字の前に少なくとも一つ以上含まれなければいけない) (例: "|" を設定した場合、"|nick|away" はニックネーム "|nick" と同じ色になる)` +** タイプ: 文字列 +** 値: 未制約文字列 (デフォルト値: `"_|["`) + * [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix* ** 説明: `メッセージプレフィックス中のニックネームの前に表示するテキスト、例: "<"` ** タイプ: 文字列 diff --git a/doc/ja/weechat_dev.ja.asciidoc b/doc/ja/weechat_dev.ja.asciidoc index 301e9fe70..05e0a54b8 100644 --- a/doc/ja/weechat_dev.ja.asciidoc +++ b/doc/ja/weechat_dev.ja.asciidoc @@ -155,6 +155,8 @@ WeeChat "core" は以下のディレクトリに配置されています: | gui-layout.c | レイアウト | gui-line.c | バッファ中の行 | gui-mouse.c | マウス +// TRANSLATION MISSING +| gui-nick.c | Nick functions | gui-nicklist.c | バッファのニックネームリスト | gui-window.c | ウィンドウ | curses/ | curses インターフェイス diff --git a/doc/pl/autogen/plugin_api/infos.asciidoc b/doc/pl/autogen/plugin_api/infos.asciidoc index c5d7b06a5..877a47b7b 100644 --- a/doc/pl/autogen/plugin_api/infos.asciidoc +++ b/doc/pl/autogen/plugin_api/infos.asciidoc @@ -18,9 +18,9 @@ | irc | irc_nick | pobiera aktualny nick z serwera | nazwa serwera -| irc | irc_nick_color | pobiera kod koloru nicka | nazwa użytkownika +| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | nazwa użytkownika -| irc | irc_nick_color_name | pobiera nazwę koloru nicka | nazwa użytkownika +| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | nazwa użytkownika | irc | irc_nick_from_host | pobiera nick z hosta IRC | host IRC (jak `:nick!nazwa@serwer.com`) @@ -54,6 +54,10 @@ | weechat | locale | zestaw znaków użyty do tłumaczenia wiadomości | - +| weechat | nick_color | pobiera kod koloru nicka | nazwa użytkownika + +| weechat | nick_color_name | pobiera nazwę koloru nicka | nazwa użytkownika + | weechat | term_height | wysokość terminala | - | weechat | term_width | szerokość terminala | - diff --git a/doc/pl/autogen/user/irc_options.asciidoc b/doc/pl/autogen/user/irc_options.asciidoc index 0982f71db..ef6055983 100644 --- a/doc/pl/autogen/user/irc_options.asciidoc +++ b/doc/pl/autogen/user/irc_options.asciidoc @@ -232,21 +232,6 @@ ** typ: liczba ** wartości: none, next, near_server (domyślna wartość: `none`) -* [[option_irc.look.nick_color_force]] *irc.look.nick_color_force* -** opis: `wymusza kolory dla niektórych nicków: hash połączony z nickiem w celu znalezienia koloru nie zostanie użyty dla tych nicków (format: "nick1:kolor1;nick2:kolor2"); wyszukiwanie nicków odbywa się na zasadzie dopasowania porównania dokładnego, następnie z małych liter, jest więc możliwe używanie tylko małych liter w tej opcji` -** typ: ciąg -** wartości: dowolny ciąg (domyślna wartość: `""`) - -* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash* -** opis: `algorytm haszujący używany do znalezienia koloru dla nicka: djb2 = odmiana djb2 (pozycja liter ma znaczenie: anagramy nicka mają różne kolory), sum = suma liter` -** typ: liczba -** wartości: djb2, sum (domyślna wartość: `sum`) - -* [[option_irc.look.nick_color_stop_chars]] *irc.look.nick_color_stop_chars* -** opis: `znaki używane do zatrzymania odczytywania koloru nicka (przynajmniej jeden znak poza tą listą musi się znajdować przed zatrzymaniem) (przykład: nick "|nick|away" ze znakami "|" zwróci kolor nicka "|nick")` -** typ: ciąg -** wartości: dowolny ciąg (domyślna wartość: `"_|["`) - * [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart* ** opis: `inteligentne dopełnianie nicków (dopełnia najpierw ostatnimi rozmówcami): speakers = wszyscy rozmówcy (włączając podświetlenia), speakers_highlights = tylko rozmówcy z podświetleniem` ** typ: liczba diff --git a/doc/pl/autogen/user/weechat_options.asciidoc b/doc/pl/autogen/user/weechat_options.asciidoc index 6b49e6b35..53cb35573 100644 --- a/doc/pl/autogen/user/weechat_options.asciidoc +++ b/doc/pl/autogen/user/weechat_options.asciidoc @@ -742,6 +742,21 @@ ** typ: liczba ** wartości: 1 .. 10000 (domyślna wartość: `100`) +* [[option_weechat.look.nick_color_force]] *weechat.look.nick_color_force* +** opis: `wymusza kolory dla niektórych nicków: hash połączony z nickiem w celu znalezienia koloru nie zostanie użyty dla tych nicków (format: "nick1:kolor1;nick2:kolor2"); wyszukiwanie nicków odbywa się na zasadzie dopasowania porównania dokładnego, następnie z małych liter, jest więc możliwe używanie tylko małych liter w tej opcji` +** typ: ciąg +** wartości: dowolny ciąg (domyślna wartość: `""`) + +* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash* +** opis: `algorytm haszujący używany do znalezienia koloru dla nicka: djb2 = odmiana djb2 (pozycja liter ma znaczenie: anagramy nicka mają różne kolory), sum = suma liter` +** typ: liczba +** wartości: djb2, sum (domyślna wartość: `sum`) + +* [[option_weechat.look.nick_color_stop_chars]] *weechat.look.nick_color_stop_chars* +** opis: `znaki używane do zatrzymania odczytywania koloru nicka (przynajmniej jeden znak poza tą listą musi się znajdować przed zatrzymaniem) (przykład: nick "|nick|away" ze znakami "|" zwróci kolor nicka "|nick")` +** typ: ciąg +** wartości: dowolny ciąg (domyślna wartość: `"_|["`) + * [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix* ** opis: `teks wyświetlany przed nickiem w prefiksie wiadomości, przykład: "<"` ** typ: ciąg diff --git a/po/POTFILES.in b/po/POTFILES.in index 237b3c201..6a88ff299 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -91,6 +91,8 @@ ./src/gui/gui-main.h ./src/gui/gui-mouse.c ./src/gui/gui-mouse.h +./src/gui/gui-nick.c +./src/gui/gui-nick.h ./src/gui/gui-nicklist.c ./src/gui/gui-nicklist.h ./src/gui/gui-window.c @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-01-17 08:52+0100\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3239,6 +3239,33 @@ msgstr "" "dobu před zpracovánim události" #, fuzzy +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" +"vynutit barvu u některých přezdívek: hash spočítaný z přezdívky pro nalezení " +"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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" +"znaky zastavující výpočet barvy přezdívky ze znaků přezdívky (alespoň jeden " +"mimo tento list musí být v řetězci před zastavením) (example: přezdívka \"|" +"nick|away\" s \"|\" ve znacích vrátí barvu přezdívky \"|nick\")" + +#, fuzzy msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "text pro zobrazení před přezdívkou v okně rozhovoru" @@ -7317,33 +7344,6 @@ msgstr "" "pozice (měl by být poslední buffer), next = aktuální buffer + 1, near_server " "= za posledním kanálem/pv serveru)" -#, fuzzy -msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" -"vynutit barvu u některých přezdívek: hash spočítaný z přezdívky pro nalezení " -"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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" -"znaky zastavující výpočet barvy přezdívky ze znaků přezdívky (alespoň jeden " -"mimo tento list musí být v řetězci před zastavením) (example: přezdívka \"|" -"nick|away\" s \"|\" ve znacích vrátí barvu přezdívky \"|nick\")" - msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " @@ -7707,11 +7707,15 @@ msgstr "získat přezdívku od IRC hosta" msgid "IRC host (like `:nick!name@server.com`)" msgstr "IRC host (jako `:nick!name@server.com`)" -msgid "get nick color code" -msgstr "získat kód barvy přezdívky" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -msgid "get nick color name" -msgstr "získat jméno barvy přezdívky" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" msgid "get buffer pointer for an IRC server/channel/nick" msgstr "získat ukazatel bufferu pro IRC server/kanál/přezdívku" @@ -8926,6 +8930,12 @@ msgstr "RGB barva konvertována do barev terminálu (0-255)" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "rgb,limit (limit je volitelný a nastaven na výchozí hodnotu 256)" +msgid "get nick color code" +msgstr "získat kód barvy přezdívky" + +msgid "get nick color name" +msgstr "získat jméno barvy přezdívky" + msgid "list of bars" msgstr "seznam polí" @@ -9262,10 +9272,6 @@ msgstr "ukazatel skriptu (volitelný)" msgid "script name (wildcard \"*\" is allowed) (optional)" msgstr "jméno serveru (zástupný znak \"*\" je povolen) (volitelný)" -#, fuzzy -msgid "callback of a script" -msgstr "Skript" - #, fuzzy, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -11318,3 +11324,7 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)" + +#, fuzzy +#~ msgid "callback of a script" +#~ msgstr "Skript" @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-03-17 20:42+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <>\n" @@ -3828,6 +3828,44 @@ msgstr "" "Verzögerung (in Millisekunden) um eine Mauseingabe zu fangen: WeeChat wartet " "zuerst diese Verzögerung ab bevor das Kommando verarbeitet wird" +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" +"erzwingt für einen Nick eine spezielle Farbe. Die standardmäßig, mittels " +"Streuwertfunktion aus dem Nicknamen, generierte Farbe findet für diese Nicks " +"keine Anwendung (Format:\"Nick1:Farbe1;Nick2:Farbe2\"). Zuerst wird beim " +"Namen des Nick nach Groß- und Kleinschreibung unterschieden. Sollte der Nick " +"nicht gefunden werden findet keine Unterscheidung mehr statt. Somit ist es " +"möglich die Nicks, für diese Einstellung, ausschließlich in Kleinschrift " +"aufzuführen" + +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 "" +"Gibt an welcher Hash-Algorithmus zur Farbauswahl für Nicks genutzt werden " +"soll: djb2 = Variante des djb2 (Position der Buchstaben innerhalb des Nicks " +"werden berücksichtigt: Anagramme eines Nick erhalten eine andere Farbe), sum " +"= hier ist nur die Anzahl der Buchstaben maßgeblich" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" +"Zeichen die genutzt werden sollen damit bei der Generierung der Farbe für " +"einen Nicknamen abgebrochen wird. Es muss mindestens ein Zeichen im " +"Nicknamen enthalten sein der nicht in dieser Liste aufgeführt wird, damit " +"eine Farbe für den Nicknamen erstellt werden kann (Beispiel: Der Nickname " +"lautet \"|nick|abwesend\" wobei das Zeichen \"|\" ignoriert werden soll. Die " +"Farbe für den Nicknamen wird nun für \"|nick\" anstelle von \"|nick|abwesend" +"\" erstellt)" + msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "Text, der vor dem Nick dargestellt werden soll, Beispiel: \"<\"" @@ -8487,44 +8525,6 @@ msgstr "" "des jeweiligen Servers)" msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" -"erzwingt für einen Nick eine spezielle Farbe. Die standardmäßig, mittels " -"Streuwertfunktion aus dem Nicknamen, generierte Farbe findet für diese Nicks " -"keine Anwendung (Format:\"Nick1:Farbe1;Nick2:Farbe2\"). Zuerst wird beim " -"Namen des Nick nach Groß- und Kleinschreibung unterschieden. Sollte der Nick " -"nicht gefunden werden findet keine Unterscheidung mehr statt. Somit ist es " -"möglich die Nicks, für diese Einstellung, ausschließlich in Kleinschrift " -"aufzuführen" - -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 "" -"Gibt an welcher Hash-Algorithmus zur Farbauswahl für Nicks genutzt werden " -"soll: djb2 = Variante des djb2 (Position der Buchstaben innerhalb des Nicks " -"werden berücksichtigt: Anagramme eines Nick erhalten eine andere Farbe), sum " -"= hier ist nur die Anzahl der Buchstaben maßgeblich" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" -"Zeichen die genutzt werden sollen damit bei der Generierung der Farbe für " -"einen Nicknamen abgebrochen wird. Es muss mindestens ein Zeichen im " -"Nicknamen enthalten sein der nicht in dieser Liste aufgeführt wird, damit " -"eine Farbe für den Nicknamen erstellt werden kann (Beispiel: Der Nickname " -"lautet \"|nick|abwesend\" wobei das Zeichen \"|\" ignoriert werden soll. Die " -"Farbe für den Nicknamen wird nun für \"|nick\" anstelle von \"|nick|abwesend" -"\" erstellt)" - -msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " "with highlight" @@ -8973,11 +8973,15 @@ msgstr "Nicknamen des IRC-Hosts erhalten" msgid "IRC host (like `:nick!name@server.com`)" msgstr "IRC host (in der Form `:nick!name@server.com`)" -msgid "get nick color code" -msgstr "zeigt Farbecode des Nick" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -msgid "get nick color name" -msgstr "zeigt Farbnamen des Nick" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" msgid "get buffer pointer for an IRC server/channel/nick" msgstr "holt Buffer Pointer für einen IRC Server/Channel/Nick" @@ -10238,6 +10242,12 @@ msgstr "RGB Farbe wurde umgewandelt in Terminalfarbe (0-255)" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "RGB,limit (Obergrenze ist optional und ist Standardmäßig 256)" +msgid "get nick color code" +msgstr "zeigt Farbecode des Nick" + +msgid "get nick color name" +msgstr "zeigt Farbnamen des Nick" + msgid "list of bars" msgstr "Auflistung der Bars" @@ -10569,9 +10579,6 @@ msgstr "Skript Pointer (optional)" msgid "script name (wildcard \"*\" is allowed) (optional)" msgstr "Name des Skriptes (Platzhalter \"*\" kann verwendet werden) (optional)" -msgid "callback of a script" -msgstr "Callback eines Skripts" - #, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -12870,3 +12877,6 @@ msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "" "%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)" + +#~ msgid "callback of a script" +#~ msgstr "Callback eines Skripts" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-01-17 08:52+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3392,6 +3392,35 @@ msgstr "" "este retraso antes de procesar un evento" #, fuzzy +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" +"fuerza color para algunos apodos: hash calculado con el apodo para encontrar " +"el color no se utilizará para los siguientes apodos (el formato es: \"apodo1:" +"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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" +"caracteres para usar como delimitador cuando se computa el color de un apodo " +"(al menos un carácter fuera de esta lista debe estar en el apodo) (ejemplo: " +"el apodo \"|apodo|ausente\" con \"|\" en esta opción retornaría el color del " +"apodo \"|apodo\")" + +#, fuzzy msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "texto a mostrar antes del apodo en la ventana de charla" @@ -7591,35 +7620,6 @@ msgstr "" "posición predeterminada (último buffer), next = buffer actual + 1, " "near_server = después del último canal/privado del server)" -#, fuzzy -msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" -"fuerza color para algunos apodos: hash calculado con el apodo para encontrar " -"el color no se utilizará para los siguientes apodos (el formato es: \"apodo1:" -"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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" -"caracteres para usar como delimitador cuando se computa el color de un apodo " -"(al menos un carácter fuera de esta lista debe estar en el apodo) (ejemplo: " -"el apodo \"|apodo|ausente\" con \"|\" en esta opción retornaría el color del " -"apodo \"|apodo\")" - msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " @@ -8000,11 +8000,15 @@ msgstr "devuelve apodo de un host IRC" msgid "IRC host (like `:nick!name@server.com`)" msgstr "IRC host (como `:apodo!nombre@servidor.com`)" -msgid "get nick color code" -msgstr "obtiene el código del color del apodo" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -msgid "get nick color name" -msgstr "obtiene el nombre del color del apodo" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" msgid "get buffer pointer for an IRC server/channel/nick" msgstr "devuelve el puntero del buffer de un servidor/canal/apodo IRC" @@ -9233,6 +9237,12 @@ msgstr "" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "" +msgid "get nick color code" +msgstr "obtiene el código del color del apodo" + +msgid "get nick color name" +msgstr "obtiene el nombre del color del apodo" + msgid "list of bars" msgstr "lista de barras" @@ -9582,10 +9592,6 @@ msgstr "" "nombre del script (puede empezar o terminar con \"*\" como comodín) " "(opcional)" -#, fuzzy -msgid "callback of a script" -msgstr "lista de scripts" - #, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -11581,3 +11587,7 @@ msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: no es posible conectarse al transmisor" + +#, fuzzy +#~ msgid "callback of a script" +#~ msgstr "lista de scripts" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" -"PO-Revision-Date: 2016-03-17 20:59+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" +"PO-Revision-Date: 2016-04-05 07:40+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -3727,6 +3727,39 @@ msgstr "" "délai (en millisecondes) pour capturer un évènement de la souris : WeeChat " "attendra ce délai avant de traiter l'évènement" +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" +"force la couleur pour certains pseudos : le hash calculé avec le pseudo pour " +"trouver la couleur ne sera pas utilisé pour ces pseudos (le format est : " +"\"pseudo1:couleur1;pseudo2:couleur2\") ; la recherche de pseudos s'effectue " +"avec la casse exacte puis en minuscules, donc il est possible d'utiliser " +"uniquement des minuscules pour les pseudos dans cette option" + +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 "" +"algorithme de hash utilisé pour trouver la couleur du pseudo : djb2 = " +"variante de djb2 (la position des lettres compte : les anagrammes d'un " +"pseudo ont une couleur différente), sum = somme des lettres" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" +"caractères utilisés pour l'arrêt dans le pseudo lors du calcul de la couleur " +"avec les lettres du pseudo (au moins un caractère en dehors de cette liste " +"doit être dans la chaîne avant de s'arrêter) (exemple : le pseudo \"|nick|" +"away\" avec \"|\" dans les caractères retournera la couleur du pseudo \"|nick" +"\")" + msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "texte à afficher avant le pseudo dans le préfixe, exemple : \"<\"" @@ -8295,39 +8328,6 @@ msgstr "" "+ 1, near_server = après le dernier canal/privé du serveur)" msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" -"force la couleur pour certains pseudos : le hash calculé avec le pseudo pour " -"trouver la couleur ne sera pas utilisé pour ces pseudos (le format est : " -"\"pseudo1:couleur1;pseudo2:couleur2\") ; la recherche de pseudos s'effectue " -"avec la casse exacte puis en minuscules, donc il est possible d'utiliser " -"uniquement des minuscules pour les pseudos dans cette option" - -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 "" -"algorithme de hash utilisé pour trouver la couleur du pseudo : djb2 = " -"variante de djb2 (la position des lettres compte : les anagrammes d'un " -"pseudo ont une couleur différente), sum = somme des lettres" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" -"caractères utilisés pour l'arrêt dans le pseudo lors du calcul de la couleur " -"avec les lettres du pseudo (au moins un caractère en dehors de cette liste " -"doit être dans la chaîne avant de s'arrêter) (exemple : le pseudo \"|nick|" -"away\" avec \"|\" dans les caractères retournera la couleur du pseudo \"|nick" -"\")" - -msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " "with highlight" @@ -8750,11 +8750,19 @@ msgstr "retourne le pseudo à partir d'un host IRC" msgid "IRC host (like `:nick!name@server.com`)" msgstr "host IRC (comme `:pseudo!nom@serveur.com`)" -msgid "get nick color code" -msgstr "retourne le code couleur du pseudo" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" +"retourne le code couleur du pseudo (*obsolète* depuis la version 1.5, " +"remplacé par \"nick_color\")" -msgid "get nick color name" -msgstr "retourne le nom de la couleur du pseudo" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" +"retourne le nom de la couleur du pseudo (*obsolète* depuis la version 1.5, " +"remplacé par \"nick_color_name\")" msgid "get buffer pointer for an IRC server/channel/nick" msgstr "retourne le pointeur vers le tampon pour un serveur/canal/pseudo IRC" @@ -9989,6 +9997,12 @@ msgstr "couleur RGB convertie en couleur du terminal (0-255)" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "rgb,limite (la limite est optionnelle et vaut 256 par défaut)" +msgid "get nick color code" +msgstr "retourne le code couleur du pseudo" + +msgid "get nick color name" +msgstr "retourne le nom de la couleur du pseudo" + msgid "list of bars" msgstr "liste des barres" @@ -10316,9 +10330,6 @@ msgstr "pointeur vers le script (optionnel)" msgid "script name (wildcard \"*\" is allowed) (optional)" msgstr "nom de script (le caractère joker \"*\" est autorisé) (optionnel)" -msgid "callback of a script" -msgstr "callback d'un script" - #, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -12604,6 +12615,9 @@ msgstr "%s%s : délai d'attente dépassé pour \"%s\" avec %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s : impossible de se connecter : erreur inattendue (%d)" +#~ msgid "callback of a script" +#~ msgstr "callback d'un script" + #~ msgid "" #~ "cause SASL authentication failure when SASL is requested but unavailable " #~ "on the server" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-01-17 08:52+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2819,6 +2819,26 @@ msgid "" "before processing event" msgstr "" +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" + #, fuzzy msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "a név előtt megjelenítendő szöveg a beszédablakban" @@ -6759,26 +6779,6 @@ msgid "" msgstr "" msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" - -msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " "with highlight" @@ -7120,13 +7120,15 @@ msgstr "név vagy gép letiltása" msgid "IRC host (like `:nick!name@server.com`)" msgstr "" -#, fuzzy -msgid "get nick color code" -msgstr "üzenetek színe" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -#, fuzzy -msgid "get nick color name" -msgstr "üzenetek színe" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" #, fuzzy msgid "get buffer pointer for an IRC server/channel/nick" @@ -8299,6 +8301,14 @@ msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "" #, fuzzy +msgid "get nick color code" +msgstr "üzenetek színe" + +#, fuzzy +msgid "get nick color name" +msgstr "üzenetek színe" + +#, fuzzy msgid "list of bars" msgstr "Aliaszok listája:\n" @@ -8647,10 +8657,6 @@ msgstr "" msgid "script name (wildcard \"*\" is allowed) (optional)" msgstr "" -#, fuzzy -msgid "callback of a script" -msgstr "Aliaszok listája:\n" - #, fuzzy, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -10627,3 +10633,7 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s DCC: nem sikerült kapcsolódni a küldőhöz\n" + +#, fuzzy +#~ msgid "callback of a script" +#~ msgstr "Aliaszok listája:\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-01-17 08:52+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3487,6 +3487,30 @@ msgstr "" "ritardo (in millisecondi) per catturare un evento del mouse: WeeChat attende " "questo ritardo prima di analizzare l'evento" +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" +"caratteri usati per interrompere il calcolo del colore con le lettere del " +"nick (almeno un carattere al di fuori di questa lista deve essere nella " +"lista prima di interromperlo) (esempio: nick \"|nick|away\" con \"|\" nei " +"caratteri restituisce il colore del nick \"|nick\")" + msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "" "testo da visualizzare prima del nick nel prefisso del messaggio, esempio: \"<" @@ -7758,30 +7782,6 @@ msgstr "" "corrente + 1, near_server = dopo l'ultimo canale/privato del server)" msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" -"caratteri usati per interrompere il calcolo del colore con le lettere del " -"nick (almeno un carattere al di fuori di questa lista deve essere nella " -"lista prima di interromperlo) (esempio: nick \"|nick|away\" con \"|\" nei " -"caratteri restituisce il colore del nick \"|nick\")" - -msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " "with highlight" @@ -8170,11 +8170,15 @@ msgstr "ottiene nick dall'host IRC" msgid "IRC host (like `:nick!name@server.com`)" msgstr "host IRC (come `:nick!nome@server.com`)" -msgid "get nick color code" -msgstr "ottiene il codice del colore del nick" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -msgid "get nick color name" -msgstr "ottiene il nome del colore del nick" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" msgid "get buffer pointer for an IRC server/channel/nick" msgstr "ottiene puntatore al buffer per un server/canale/nick IRC" @@ -9395,6 +9399,12 @@ msgstr "" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "" +msgid "get nick color code" +msgstr "ottiene il codice del colore del nick" + +msgid "get nick color name" +msgstr "ottiene il nome del colore del nick" + msgid "list of bars" msgstr "elenco delle barre" @@ -9743,9 +9753,6 @@ msgstr "" "nome script (può iniziare o terminare con \"*\" come carattere jolly) " "(opzionale)" -msgid "callback of a script" -msgstr "callback di uno script" - #, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -11766,3 +11773,6 @@ msgstr "%s%s: timeout per \"%s\" con %s" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: impossibile connettersi al mittente" + +#~ msgid "callback of a script" +#~ msgstr "callback di uno script" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-03-29 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n" @@ -3598,6 +3598,36 @@ msgstr "" "マウスイベントを横取りするための遅延 (ミリ秒): WeeChat はイベント処理前にこの" "遅延時間だけ待つ" +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" +"一部のニックネームでニックネーム色を強制する: ニックネームから計算されるハッ" +"シュを元にした色を利用しない (書式: \"nick1:color1;nick2:color2\"); ニック" +"ネームの検索はまず大文字小文字が区別された状態で行われ、そのあとに小文字で行" +"われます。このため、このオプションのニックネーム部分を小文字だけで書く事もで" +"きます" + +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 "" +"ニックネームに対する色を見つけるハッシュアルゴリズム: djb2 = djb2 (文字の位置" +"が重要: ニックネームに同じ色が使われにくくなる) の亜種、sum = 文字の総和" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" +"ニックネーム内の色計算に使用する部分を制限する文字 (このリストに含まれない文" +"字が、このリストの文字の前に少なくとも一つ以上含まれなければいけない) (例: " +"\"|\" を設定した場合、\"|nick|away\" はニックネーム \"|nick\" と同じ色になる)" + msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "" "メッセージプレフィックス中のニックネームの前に表示するテキスト、例: \"<\"" @@ -7954,36 +7984,6 @@ msgstr "" "バの一番後ろのチャンネル/プライベートバッファ)" msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" -"一部のニックネームでニックネーム色を強制する: ニックネームから計算されるハッ" -"シュを元にした色を利用しない (書式: \"nick1:color1;nick2:color2\"); ニック" -"ネームの検索はまず大文字小文字が区別された状態で行われ、そのあとに小文字で行" -"われます。このため、このオプションのニックネーム部分を小文字だけで書く事もで" -"きます" - -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 "" -"ニックネームに対する色を見つけるハッシュアルゴリズム: djb2 = djb2 (文字の位置" -"が重要: ニックネームに同じ色が使われにくくなる) の亜種、sum = 文字の総和" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" -"ニックネーム内の色計算に使用する部分を制限する文字 (このリストに含まれない文" -"字が、このリストの文字の前に少なくとも一つ以上含まれなければいけない) (例: " -"\"|\" を設定した場合、\"|nick|away\" はニックネーム \"|nick\" と同じ色になる)" - -msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " "with highlight" @@ -8388,11 +8388,15 @@ msgstr "IRC ホストからニックネームを取得" msgid "IRC host (like `:nick!name@server.com`)" msgstr "IRC ホスト (例: `:nick!name@server.com`)" -msgid "get nick color code" -msgstr "ニックネームの色コードを取得" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -msgid "get nick color name" -msgstr "ニックネームの色名を取得" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" msgid "get buffer pointer for an IRC server/channel/nick" msgstr "ある IRC サーバ/チャンネル/ニックネームのバッファポインタを取得" @@ -9602,6 +9606,12 @@ msgstr "端末色コード (0-255) に変換されたRGB 色コード" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "rgb,limit (limit は任意でデフォルトでは 256 に設定)" +msgid "get nick color code" +msgstr "ニックネームの色コードを取得" + +msgid "get nick color name" +msgstr "ニックネームの色名を取得" + msgid "list of bars" msgstr "バーのリスト" @@ -9918,9 +9928,6 @@ msgstr "スクリプトポインタ (任意)" msgid "script name (wildcard \"*\" is allowed) (optional)" msgstr "スクリプト名 (ワイルドカード \"*\" を使うことができます) (任意)" -msgid "callback of a script" -msgstr "スクリプトのコールバック" - #, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -12113,3 +12120,6 @@ msgstr "%s%s: \"%s\" のタイムアウト %s" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: 接続できません: 未定義のエラー (%d)" + +#~ msgid "callback of a script" +#~ msgstr "スクリプトのコールバック" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-03-17 20:43+0100\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3684,6 +3684,37 @@ msgstr "" "odstęp (w milisekundach) przechwytywania zdarzeń myszy: WeeChat zawsze " "poczeka ten czas przed obsługą zdarzenia" +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" +"wymusza kolory dla niektórych nicków: hash połączony z nickiem w celu " +"znalezienia koloru nie zostanie użyty dla tych nicków (format: \"nick1:" +"kolor1;nick2:kolor2\"); wyszukiwanie nicków odbywa się na zasadzie " +"dopasowania porównania dokładnego, następnie z małych liter, jest więc " +"możliwe używanie tylko małych liter w tej opcji" + +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 "" +"algorytm haszujący używany do znalezienia koloru dla nicka: djb2 = odmiana " +"djb2 (pozycja liter ma znaczenie: anagramy nicka mają różne kolory), sum = " +"suma liter" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" +"znaki używane do zatrzymania odczytywania koloru nicka (przynajmniej jeden " +"znak poza tą listą musi się znajdować przed zatrzymaniem) (przykład: nick \"|" +"nick|away\" ze znakami \"|\" zwróci kolor nicka \"|nick\")" + msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "teks wyświetlany przed nickiem w prefiksie wiadomości, przykład: \"<\"" @@ -8126,37 +8157,6 @@ msgstr "" "near_server = po ostatnim kanale/pv serwera)" msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" -"wymusza kolory dla niektórych nicków: hash połączony z nickiem w celu " -"znalezienia koloru nie zostanie użyty dla tych nicków (format: \"nick1:" -"kolor1;nick2:kolor2\"); wyszukiwanie nicków odbywa się na zasadzie " -"dopasowania porównania dokładnego, następnie z małych liter, jest więc " -"możliwe używanie tylko małych liter w tej opcji" - -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 "" -"algorytm haszujący używany do znalezienia koloru dla nicka: djb2 = odmiana " -"djb2 (pozycja liter ma znaczenie: anagramy nicka mają różne kolory), sum = " -"suma liter" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" -"znaki używane do zatrzymania odczytywania koloru nicka (przynajmniej jeden " -"znak poza tą listą musi się znajdować przed zatrzymaniem) (przykład: nick \"|" -"nick|away\" ze znakami \"|\" zwróci kolor nicka \"|nick\")" - -msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " "with highlight" @@ -8568,11 +8568,15 @@ msgstr "pobiera nick z hosta IRC" msgid "IRC host (like `:nick!name@server.com`)" msgstr "host IRC (jak `:nick!nazwa@serwer.com`)" -msgid "get nick color code" -msgstr "pobiera kod koloru nicka" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -msgid "get nick color name" -msgstr "pobiera nazwę koloru nicka" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" msgid "get buffer pointer for an IRC server/channel/nick" msgstr "pobiera wskaźnik dla serwera/kanału/nicku IRC" @@ -9788,6 +9792,12 @@ msgstr "kolor RGB skonwertowany na kolor terminala (0-255)" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "rgb,limit (limit jest opcjonalny i ustawiony domyślnie na 256)" +msgid "get nick color code" +msgstr "pobiera kod koloru nicka" + +msgid "get nick color name" +msgstr "pobiera nazwę koloru nicka" + msgid "list of bars" msgstr "lista pasków" @@ -10108,9 +10118,6 @@ msgstr "wskaźnik skryptu (opcjonalne)" msgid "script name (wildcard \"*\" is allowed) (optional)" msgstr "nazwa skryptu (wildcard \"*\" jest dozwolony) (opcjonalne)" -msgid "callback of a script" -msgstr "callback skryptu" - #, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -12340,3 +12347,6 @@ msgstr "%s%s: przekroczono czas na \"%s\" z %s" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: nie można połączyć: niespodziewany błąd (%d)" + +#~ msgid "callback of a script" +#~ msgstr "callback skryptu" diff --git a/po/pt_BR.po b/po/pt_BR.po index 2db2cc1a0..b37ba864d 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-01-17 08:52+0100\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3409,6 +3409,34 @@ msgid "" "before processing event" msgstr "" +#, fuzzy +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" +"forçar cor para alguns apelidos: hash computado com apelido para encontar " +"cor não será utilizado para estes apelidos (formato: \"apelido1:cor1;" +"apelido2:cor2\")" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" +"caracteres utilizados para parar no apelido quando estiver computando cor " +"com letras do apelido (no mínimo um caractere fora desta lista deve estar na " +"string antes de parar) (exemplo: apelido \"|apelido|ausente\" with \"|\" nos " +"caracteres retornarão cor do apelido \"|apelido\")" + msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "" "texto a ser exibido antes do apelido no prefixo da mensagem, exemplo: \"<\"" @@ -7173,34 +7201,6 @@ msgid "" "channel/pv of server)" msgstr "" -#, fuzzy -msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" -"forçar cor para alguns apelidos: hash computado com apelido para encontar " -"cor não será utilizado para estes apelidos (formato: \"apelido1:cor1;" -"apelido2:cor2\")" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" -"caracteres utilizados para parar no apelido quando estiver computando cor " -"com letras do apelido (no mínimo um caractere fora desta lista deve estar na " -"string antes de parar) (exemplo: apelido \"|apelido|ausente\" with \"|\" nos " -"caracteres retornarão cor do apelido \"|apelido\")" - msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " @@ -7536,11 +7536,15 @@ msgstr "obter apelido de host IRC" msgid "IRC host (like `:nick!name@server.com`)" msgstr "host IRC (exemplo: `:apelido!nome@servidor.com`)" -msgid "get nick color code" -msgstr "obter código de cor do apelido" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -msgid "get nick color name" -msgstr "obter nome da cor do apelido" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" msgid "get buffer pointer for an IRC server/channel/nick" msgstr "obter pointeiro do buffer para um servidor/canal/apelido IRC" @@ -8734,6 +8738,12 @@ msgstr "" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "" +msgid "get nick color code" +msgstr "obter código de cor do apelido" + +msgid "get nick color name" +msgstr "obter nome da cor do apelido" + msgid "list of bars" msgstr "lista de barras" @@ -9082,10 +9092,6 @@ msgstr "" "nome do script (pode começar ou terminar com \"*\" como um coringa) " "(opcional)" -#, fuzzy -msgid "callback of a script" -msgstr "callback do script" - #, fuzzy, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -11065,3 +11071,7 @@ msgstr "%s%s: tempo esgotado para \"%s\" com %s" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: não foi possível conectar ao remetente" + +#, fuzzy +#~ msgid "callback of a script" +#~ msgstr "callback do script" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-01-17 08:52+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2851,6 +2851,26 @@ msgid "" "before processing event" msgstr "" +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" + #, fuzzy msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "текст, который отображать до ника в окне чата" @@ -6787,26 +6807,6 @@ msgid "" msgstr "" msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" - -msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " "with highlight" @@ -7153,13 +7153,15 @@ msgstr "банит ник или хост" msgid "IRC host (like `:nick!name@server.com`)" msgstr "" -#, fuzzy -msgid "get nick color code" -msgstr "цвет чата" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -#, fuzzy -msgid "get nick color name" -msgstr "цвет чата" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" #, fuzzy msgid "get buffer pointer for an IRC server/channel/nick" @@ -8332,6 +8334,14 @@ msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "" #, fuzzy +msgid "get nick color code" +msgstr "цвет чата" + +#, fuzzy +msgid "get nick color name" +msgstr "цвет чата" + +#, fuzzy msgid "list of bars" msgstr "Список сокращений:\n" @@ -8679,10 +8689,6 @@ msgstr "" msgid "script name (wildcard \"*\" is allowed) (optional)" msgstr "" -#, fuzzy -msgid "callback of a script" -msgstr "Список сокращений:\n" - #, fuzzy, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -10655,3 +10661,7 @@ msgstr "%s нет аргумента для параметра \"%s\"\n" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s DCC: не могу соединиться с отправителем\n" + +#, fuzzy +#~ msgid "callback of a script" +#~ msgstr "Список сокращений:\n" diff --git a/po/srcfiles.cmake b/po/srcfiles.cmake index c11daa7cc..4442cbea8 100644 --- a/po/srcfiles.cmake +++ b/po/srcfiles.cmake @@ -92,6 +92,8 @@ SET(WEECHAT_SOURCES ./src/gui/gui-main.h ./src/gui/gui-mouse.c ./src/gui/gui-mouse.h +./src/gui/gui-nick.c +./src/gui/gui-nick.h ./src/gui/gui-nicklist.c ./src/gui/gui-nicklist.h ./src/gui/gui-window.c @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2016-01-05 07:51+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2561,6 +2561,26 @@ msgid "" "before processing event" msgstr "" +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" + msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "" @@ -6078,26 +6098,6 @@ msgid "" msgstr "" msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" - -msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " "with highlight" @@ -6410,11 +6410,15 @@ msgstr "" msgid "IRC host (like `:nick!name@server.com`)" msgstr "" -msgid "get nick color code" -msgstr "rumuz renk kodu al" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" +msgstr "" -msgid "get nick color name" -msgstr "rumuz renk ismi al" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" +msgstr "" msgid "get buffer pointer for an IRC server/channel/nick" msgstr "" @@ -7523,6 +7527,12 @@ msgstr "" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "" +msgid "get nick color code" +msgstr "rumuz renk kodu al" + +msgid "get nick color name" +msgstr "rumuz renk ismi al" + msgid "list of bars" msgstr "" @@ -7812,10 +7822,6 @@ msgstr "" msgid "script name (wildcard \"*\" is allowed) (optional)" msgstr "" -#, fuzzy -msgid "callback of a script" -msgstr "betiklerin listesi" - #, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" @@ -9654,3 +9660,7 @@ msgstr "" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "" + +#, fuzzy +#~ msgid "callback of a script" +#~ msgstr "betiklerin listesi" diff --git a/po/weechat.pot b/po/weechat.pot index a628a3a05..f74bcf7dc 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-03-17 20:41+0100\n" +"POT-Creation-Date: 2016-04-04 14:36+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2556,6 +2556,26 @@ msgid "" "before processing event" msgstr "" +msgid "" +"force color for some nicks: hash computed with nickname to find color will " +"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " +"up for nicks is with exact case then lower case, so it's possible to use " +"only lower case for nicks in this option" +msgstr "" + +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) " +"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " +"\"|nick\")" +msgstr "" + msgid "text to display before nick in prefix of message, example: \"<\"" msgstr "" @@ -6000,26 +6020,6 @@ msgid "" msgstr "" msgid "" -"force color for some nicks: hash computed with nickname to find color will " -"not be used for these nicks (format is: \"nick1:color1;nick2:color2\"); look " -"up for nicks is with exact case then lower case, so it's possible to use " -"only lower case for nicks in this option" -msgstr "" - -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) " -"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick " -"\"|nick\")" -msgstr "" - -msgid "" "smart completion for nicks (completes first with last speakers): speakers = " "all speakers (including highlights), speakers_highlights = only speakers " "with highlight" @@ -6330,10 +6330,14 @@ msgstr "" msgid "IRC host (like `:nick!name@server.com`)" msgstr "" -msgid "get nick color code" +msgid "" +"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color" +"\")" msgstr "" -msgid "get nick color name" +msgid "" +"get nick color name (*deprecated* since version 1.5, replaced by " +"\"nick_color_name\")" msgstr "" msgid "get buffer pointer for an IRC server/channel/nick" @@ -7447,6 +7451,12 @@ msgstr "" msgid "rgb,limit (limit is optional and is set to 256 by default)" msgstr "" +msgid "get nick color code" +msgstr "" + +msgid "get nick color name" +msgstr "" + msgid "list of bars" msgstr "" @@ -7736,9 +7746,6 @@ msgstr "" msgid "script name (wildcard \"*\" is allowed) (optional)" msgstr "" -msgid "callback of a script" -msgstr "" - #, c-format msgid "" "%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 798bfea7a..e17743090 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -37,6 +37,7 @@ #include "weechat.h" #include "wee-config.h" +#include "wee-hashtable.h" #include "wee-hook.h" #include "wee-log.h" #include "wee-network.h" @@ -148,6 +149,9 @@ struct t_config_option *config_look_key_bind_safe; struct t_config_option *config_look_key_grab_delay; struct t_config_option *config_look_mouse; struct t_config_option *config_look_mouse_timer_delay; +struct t_config_option *config_look_nick_color_force; +struct t_config_option *config_look_nick_color_hash; +struct t_config_option *config_look_nick_color_stop_chars; struct t_config_option *config_look_nick_prefix; struct t_config_option *config_look_nick_suffix; struct t_config_option *config_look_paste_auto_add_newline; @@ -307,6 +311,9 @@ struct t_config_look_word_char_item *config_word_chars_highlight = NULL; int config_word_chars_highlight_count = 0; struct t_config_look_word_char_item *config_word_chars_input = NULL; int config_word_chars_input_count = 0; +char **config_nick_colors = NULL; +int config_num_nick_colors = 0; +struct t_hashtable *config_hashtable_nick_color_force = NULL; /* @@ -660,6 +667,74 @@ config_compute_prefix_max_length_all_buffers () } /* + * Sets nick colors using option "weechat.color.chat_nick_colors". + */ + +void +config_set_nick_colors () +{ + if (config_nick_colors) + { + string_free_split (config_nick_colors); + config_nick_colors = NULL; + config_num_nick_colors = 0; + } + + config_nick_colors = string_split ( + CONFIG_STRING(config_color_chat_nick_colors), + ",", 0, 0, + &config_num_nick_colors); +} + +/* + * Callback for changes on option "weechat.look.nick_color_force". + */ + +void +config_change_look_nick_color_force (const void *pointer, void *data, + struct t_config_option *option) +{ + char **items, *pos; + int num_items, i; + + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) option; + + if (!config_hashtable_nick_color_force) + { + config_hashtable_nick_color_force = hashtable_new ( + 32, + WEECHAT_HASHTABLE_STRING, + WEECHAT_HASHTABLE_STRING, + NULL, NULL); + } + else + { + hashtable_remove_all (config_hashtable_nick_color_force); + } + + items = string_split (CONFIG_STRING(config_look_nick_color_force), + ";", 0, 0, &num_items); + if (items) + { + for (i = 0; i < num_items; i++) + { + pos = strchr (items[i], ':'); + if (pos) + { + pos[0] = '\0'; + hashtable_set (config_hashtable_nick_color_force, + items[i], + pos + 1); + } + } + string_free_split (items); + } +} + +/* * Callback for changes on options "weechat.look.nick_prefix" and * "weechat.look.nick_suffix". */ @@ -1047,6 +1122,7 @@ config_change_nick_colors (const void *pointer, void *data, (void) data; (void) option; + config_set_nick_colors (); gui_color_buffer_display (); } @@ -1208,6 +1284,8 @@ config_weechat_init_after_read () /* apply filters on all buffers */ gui_filter_all_buffers (); + + config_change_look_nick_color_force (NULL, NULL, NULL); } /* @@ -2926,6 +3004,37 @@ config_weechat_init_options () "wait this delay before processing event"), NULL, 1, 10000, "100", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + config_look_nick_color_force = config_file_new_option ( + weechat_config_file, ptr_section, + "nick_color_force", "string", + N_("force color for some nicks: hash computed with nickname " + "to find color will not be used for these nicks (format is: " + "\"nick1:color1;nick2:color2\"); look up for nicks is with " + "exact case then lower case, so it's possible to use only lower " + "case for nicks in this option"), + NULL, 0, 0, "", NULL, 0, + NULL, NULL, NULL, + &config_change_look_nick_color_force, NULL, NULL, + NULL, NULL, NULL); + config_look_nick_color_hash = config_file_new_option ( + weechat_config_file, ptr_section, + "nick_color_hash", "integer", + N_("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"), + "djb2|sum", 0, 0, "sum", NULL, 0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + config_look_nick_color_stop_chars = config_file_new_option ( + weechat_config_file, ptr_section, + "nick_color_stop_chars", "string", + N_("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) (example: nick \"|nick|away\" with \"|\" in chars will " + "return color of nick \"|nick\")"), + NULL, 0, 0, "_|[", NULL, 0, + NULL, NULL, NULL, + NULL, NULL, NULL, + NULL, NULL, NULL); config_look_nick_prefix = config_file_new_option ( weechat_config_file, ptr_section, "nick_prefix", "string", @@ -4387,4 +4496,17 @@ config_weechat_free () config_word_chars_input = NULL; config_word_chars_input_count = 0; } + + if (config_nick_colors) + { + string_free_split (config_nick_colors); + config_nick_colors = NULL; + config_num_nick_colors = 0; + } + + if (config_hashtable_nick_color_force) + { + hashtable_free (config_hashtable_nick_color_force); + config_hashtable_nick_color_force = NULL; + } } diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 9681b03cb..e4c4a3d33 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -53,6 +53,12 @@ enum t_config_look_buffer_search_where CONFIG_LOOK_BUFFER_SEARCH_PREFIX_MESSAGE, }; +enum t_config_look_nick_color_hash +{ + CONFIG_LOOK_NICK_COLOR_HASH_DJB2 = 0, + CONFIG_LOOK_NICK_COLOR_HASH_SUM, +}; + enum t_config_look_prefix_align { CONFIG_LOOK_PREFIX_ALIGN_NONE = 0, @@ -193,6 +199,9 @@ extern struct t_config_option *config_look_key_bind_safe; extern struct t_config_option *config_look_key_grab_delay; extern struct t_config_option *config_look_mouse; extern struct t_config_option *config_look_mouse_timer_delay; +extern struct t_config_option *config_look_nick_color_force; +extern struct t_config_option *config_look_nick_color_hash; +extern struct t_config_option *config_look_nick_color_stop_chars; extern struct t_config_option *config_look_nick_prefix; extern struct t_config_option *config_look_nick_suffix; extern struct t_config_option *config_look_paste_auto_add_newline; @@ -338,7 +347,11 @@ extern struct t_config_look_word_char_item *config_word_chars_highlight; extern int config_word_chars_highlight_count; extern struct t_config_look_word_char_item *config_word_chars_input; extern int config_word_chars_input_count; +extern char **config_nick_colors; +extern int config_num_nick_colors; +extern struct t_hashtable *config_hashtable_nick_color_force; +extern void config_set_nick_colors (); extern struct t_config_option *config_weechat_debug_get (const char *plugin_name); extern int config_weechat_debug_set (const char *plugin_name, const char *value); diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 6a4d89156..26da7e7f0 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -36,11 +36,13 @@ gui-layout.c gui-layout.h gui-line.c gui-line.h gui-main.h gui-mouse.c gui-mouse.h +gui-nick.c gui-nick.h gui-nicklist.c gui-nicklist.h gui-window.c gui-window.h) include_directories(${CMAKE_BINARY_DIR}) add_library(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC}) +list(APPEND STATIC_LIBS weechat_gui_common) if(ENABLE_NCURSES) subdirs(curses) diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 6ecaca6f8..528a7a66f 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -56,6 +56,8 @@ lib_weechat_gui_common_a_SOURCES = gui-bar.c \ gui-main.h \ gui-mouse.c \ gui-mouse.h \ + gui-nick.c \ + gui-nick.h \ gui-nicklist.c \ gui-nicklist.h \ gui-window.c \ diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt index 81af7bd34..8fadce2d2 100644 --- a/src/gui/curses/CMakeLists.txt +++ b/src/gui/curses/CMakeLists.txt @@ -81,7 +81,7 @@ add_executable(${EXECUTABLE} ${WEECHAT_CURSES_MAIN_SRC}) add_dependencies(${EXECUTABLE} weechat_gui_curses) -# Due to circular references, we must link two times with libweechat_core.a +# Due to circular references, we must link two times with libweechat_core.a and libweechat_gui_common.a target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_curses ${EXTRA_LIBS} ${STATIC_LIBS}) # Create a symbolic link weechat-curses -> weechat diff --git a/src/gui/gui-nick.c b/src/gui/gui-nick.c new file mode 100644 index 000000000..899ee444f --- /dev/null +++ b/src/gui/gui-nick.c @@ -0,0 +1,259 @@ +/* + * gui-nick.c - nick functions (used by all GUI) + * + * Copyright (C) 2003-2016 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <stdlib.h> +#include <string.h> + +#include "../core/weechat.h" +#include "../core/wee-config.h" +#include "../core/wee-hashtable.h" +#include "../core/wee-string.h" +#include "../core/wee-utf8.h" +#include "gui-nick.h" +#include "gui-color.h" + + +/* + * Hashes a nickname to find color. + * + * Returns a number which is the index of color in the nicks colors of option + * "weechat.color.chat_nick_colors". + */ + +int +gui_nick_hash_color (const char *nickname) +{ + unsigned long color; + const char *ptr_nick; + + if (!nickname || !nickname[0]) + return 0; + + if (!config_nick_colors) + config_set_nick_colors (); + + if (config_num_nick_colors == 0) + return 0; + + ptr_nick = nickname; + color = 0; + + switch (CONFIG_INTEGER(config_look_nick_color_hash)) + { + case CONFIG_LOOK_NICK_COLOR_HASH_DJB2: + /* variant of djb2 hash */ + color = 5381; + while (ptr_nick && ptr_nick[0]) + { + color ^= (color << 5) + (color >> 2) + utf8_char_int (ptr_nick); + ptr_nick = utf8_next_char (ptr_nick); + } + break; + case CONFIG_LOOK_NICK_COLOR_HASH_SUM: + /* sum of letters */ + color = 0; + while (ptr_nick && ptr_nick[0]) + { + color += utf8_char_int (ptr_nick); + ptr_nick = utf8_next_char (ptr_nick); + } + break; + } + + return (color % config_num_nick_colors); +} + +/* + * Gets forced color for a nick. + * + * Returns the name of color (for example: "green"), NULL if no color is forced + * for nick. + */ + +const char * +gui_nick_get_forced_color (const char *nickname) +{ + const char *forced_color; + char *nick_lower; + + if (!nickname || !nickname[0]) + return NULL; + + forced_color = hashtable_get (config_hashtable_nick_color_force, nickname); + if (forced_color) + return forced_color; + + nick_lower = strdup (nickname); + if (nick_lower) + { + string_tolower (nick_lower); + forced_color = hashtable_get (config_hashtable_nick_color_force, + nick_lower); + free (nick_lower); + } + + return forced_color; +} + +/* + * Duplicates a nick and stops at first char in list (using option + * weechat.look.nick_color_stop_chars). + * + * Note: result must be freed after use. + */ + +char * +gui_nick_strdup_for_color (const char *nickname) +{ + int char_size, other_char_seen; + char *result, *pos, utf_char[16]; + + if (!nickname) + return NULL; + + result = malloc (strlen (nickname) + 1); + pos = result; + other_char_seen = 0; + while (nickname[0]) + { + char_size = utf8_char_size (nickname); + memcpy (utf_char, nickname, char_size); + utf_char[char_size] = '\0'; + + if (strstr (CONFIG_STRING(config_look_nick_color_stop_chars), + utf_char)) + { + if (other_char_seen) + { + pos[0] = '\0'; + return result; + } + } + else + { + other_char_seen = 1; + } + memcpy (pos, utf_char, char_size); + pos += char_size; + + nickname += char_size; + } + pos[0] = '\0'; + return result; +} + +/* + * Finds a color code for a nick (according to nick letters). + * + * Returns a WeeChat color code (that can be used for display). + */ + +const char * +gui_nick_find_color (const char *nickname) +{ + int color; + char *nickname2; + const char *forced_color, *str_color; + + if (!nickname || !nickname[0]) + return gui_color_get_custom ("default"); + + if (!config_nick_colors) + config_set_nick_colors (); + + if (config_num_nick_colors == 0) + return gui_color_get_custom ("default"); + + nickname2 = gui_nick_strdup_for_color (nickname); + + /* look if color is forced */ + forced_color = gui_nick_get_forced_color ( + (nickname2) ? nickname2 : nickname); + if (forced_color) + { + forced_color = gui_color_get_custom (forced_color); + if (forced_color && forced_color[0]) + { + if (nickname2) + free (nickname2); + return forced_color; + } + } + + /* hash nickname to get color */ + color = gui_nick_hash_color ((nickname2) ? nickname2 : nickname); + + if (nickname2) + free (nickname2); + + /* return color */ + str_color = gui_color_get_custom (config_nick_colors[color]); + return (str_color[0]) ? str_color : gui_color_get_custom ("default"); +} + +/* + * Finds a color name for a nick (according to nick letters). + * + * Returns the name of a color (for example: "green"). + */ + +const char * +gui_nick_find_color_name (const char *nickname) +{ + int color; + char *nickname2; + const char *forced_color; + static char *default_color = "default"; + + if (!nickname || !nickname[0]) + return default_color; + + if (!config_nick_colors) + config_set_nick_colors (); + + if (config_num_nick_colors == 0) + return default_color; + + nickname2 = gui_nick_strdup_for_color (nickname); + + /* look if color is forced */ + forced_color = gui_nick_get_forced_color ( + (nickname2) ? nickname2 : nickname); + if (forced_color) + { + if (nickname2) + free (nickname2); + return forced_color; + } + + /* hash nickname to get color */ + color = gui_nick_hash_color ((nickname2) ? nickname2 : nickname); + + if (nickname2) + free (nickname2); + + /* return color name */ + return config_nick_colors[color]; +} diff --git a/src/gui/gui-nick.h b/src/gui/gui-nick.h new file mode 100644 index 000000000..7c6bf896f --- /dev/null +++ b/src/gui/gui-nick.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2003-2016 Sébastien Helleu <flashcode@flashtux.org> + * + * This file is part of WeeChat, the extensible chat client. + * + * WeeChat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * WeeChat is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WeeChat. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef WEECHAT_GUI_NICK_H +#define WEECHAT_GUI_NICK_H 1 + +extern const char *gui_nick_find_color (const char *nickname); +extern const char *gui_nick_find_color_name (const char *nickname); + +#endif /* WEECHAT_GUI_NICK_H */ diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 5365bfe9e..a488936b0 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -83,9 +83,6 @@ struct t_config_option *irc_config_look_join_auto_add_chantype; struct t_config_option *irc_config_look_msgbuffer_fallback; struct t_config_option *irc_config_look_new_channel_position; struct t_config_option *irc_config_look_new_pv_position; -struct t_config_option *irc_config_look_nick_color_force; -struct t_config_option *irc_config_look_nick_color_hash; -struct t_config_option *irc_config_look_nick_color_stop_chars; struct t_config_option *irc_config_look_nick_completion_smart; struct t_config_option *irc_config_look_nick_mode; struct t_config_option *irc_config_look_nick_mode_empty; @@ -150,11 +147,9 @@ struct t_config_option *irc_config_network_whois_double_nick; struct t_config_option *irc_config_server_default[IRC_SERVER_NUM_OPTIONS]; -struct t_hook *irc_config_hook_config_nick_colors = NULL; -char **irc_config_nick_colors = NULL; -int irc_config_num_nick_colors = 0; +struct t_hook *irc_config_hook_config_nick_color_options = NULL; +struct t_hook *irc_config_hook_config_chat_nick_colors = NULL; struct t_hashtable *irc_config_hashtable_display_join_message = NULL; -struct t_hashtable *irc_config_hashtable_nick_color_force = NULL; struct t_hashtable *irc_config_hashtable_nick_prefixes = NULL; struct t_hashtable *irc_config_hashtable_color_mirc_remap = NULL; char **irc_config_nicks_hide_password = NULL; @@ -234,28 +229,6 @@ irc_config_compute_nick_colors () } /* - * Sets nick colors using option "weechat.color.chat_nick_colors". - */ - -void -irc_config_set_nick_colors () -{ - if (irc_config_nick_colors) - { - weechat_string_free_split (irc_config_nick_colors); - irc_config_nick_colors = NULL; - irc_config_num_nick_colors = 0; - } - - irc_config_nick_colors = - weechat_string_split ( - weechat_config_string ( - weechat_config_get ("weechat.color.chat_nick_colors")), - ",", 0, 0, - &irc_config_num_nick_colors); -} - -/* * Checks if channel modes arguments must be displayed or hidden * (according to option irc.look.item_channel_modes_hide_args). * @@ -295,7 +268,7 @@ irc_config_display_channel_modes_arguments (const char *modes) } /* - * Callback for changes on option "weechat.color.chat_nick_colors". + * Callback for changes on options changing nick colors. */ int @@ -308,7 +281,6 @@ irc_config_change_nick_colors_cb (const void *pointer, void *data, (void) option; (void) value; - irc_config_set_nick_colors (); irc_config_compute_nick_colors (); return WEECHAT_RC_OK; @@ -566,71 +538,6 @@ irc_config_change_look_highlight_tags_restrict (const void *pointer, void *data, } /* - * Callback for changes on option "irc.look.nick_color_force". - */ - -void -irc_config_change_look_nick_color_force (const void *pointer, void *data, - struct t_config_option *option) -{ - char **items, *pos; - int num_items, i; - - /* make C compiler happy */ - (void) pointer; - (void) data; - (void) option; - - if (!irc_config_hashtable_nick_color_force) - { - irc_config_hashtable_nick_color_force = weechat_hashtable_new ( - 32, - WEECHAT_HASHTABLE_STRING, - WEECHAT_HASHTABLE_STRING, - NULL, NULL); - } - else - weechat_hashtable_remove_all (irc_config_hashtable_nick_color_force); - - items = weechat_string_split ( - weechat_config_string (irc_config_look_nick_color_force), - ";", 0, 0, &num_items); - if (items) - { - for (i = 0; i < num_items; i++) - { - pos = strchr (items[i], ':'); - if (pos) - { - pos[0] = '\0'; - weechat_hashtable_set (irc_config_hashtable_nick_color_force, - items[i], - pos + 1); - } - } - weechat_string_free_split (items); - } - - irc_config_compute_nick_colors (); -} - -/* - * Callback for changes on options that change nick colors. - */ - -void -irc_config_change_look_nick_colors (const void *pointer, void *data, - struct t_config_option *option) -{ - /* make C compiler happy */ - (void) pointer; - (void) data; - (void) option; - - irc_config_compute_nick_colors (); -} - -/* * Callback for changes on option "irc.look.item_display_server". */ @@ -2530,11 +2437,6 @@ irc_config_init () WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, NULL, NULL); - irc_config_hashtable_nick_color_force = weechat_hashtable_new ( - 32, - WEECHAT_HASHTABLE_STRING, - WEECHAT_HASHTABLE_STRING, - NULL, NULL); irc_config_hashtable_nick_prefixes = weechat_hashtable_new ( 32, WEECHAT_HASHTABLE_STRING, @@ -2821,39 +2723,6 @@ irc_config_init () "of server)"), "none|next|near_server", 0, 0, "none", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - irc_config_look_nick_color_force = weechat_config_new_option ( - irc_config_file, ptr_section, - "nick_color_force", "string", - N_("force color for some nicks: hash computed with nickname " - "to find color will not be used for these nicks (format is: " - "\"nick1:color1;nick2:color2\"); look up for nicks is with " - "exact case then lower case, so it's possible to use only lower " - "case for nicks in this option"), - NULL, 0, 0, "", NULL, 0, - NULL, NULL, NULL, - &irc_config_change_look_nick_color_force, NULL, NULL, - NULL, NULL, NULL); - irc_config_look_nick_color_hash = weechat_config_new_option ( - irc_config_file, ptr_section, - "nick_color_hash", "integer", - N_("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"), - "djb2|sum", 0, 0, "sum", NULL, 0, - NULL, NULL, NULL, - &irc_config_change_look_nick_colors, NULL, NULL, - NULL, NULL, NULL); - irc_config_look_nick_color_stop_chars = weechat_config_new_option ( - irc_config_file, ptr_section, - "nick_color_stop_chars", "string", - N_("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) (example: nick \"|nick|away\" with \"|\" in chars will " - "return color of nick \"|nick\")"), - NULL, 0, 0, "_|[", NULL, 0, - NULL, NULL, NULL, - &irc_config_change_look_nick_colors, NULL, NULL, - NULL, NULL, NULL); irc_config_look_nick_completion_smart = weechat_config_new_option ( irc_config_file, ptr_section, "nick_completion_smart", "integer", @@ -3396,7 +3265,10 @@ irc_config_init () } irc_config_section_server = ptr_section; - irc_config_hook_config_nick_colors = weechat_hook_config ( + irc_config_hook_config_nick_color_options = weechat_hook_config ( + "weechat.look.nick_color_*", + &irc_config_change_nick_colors_cb, NULL, NULL); + irc_config_hook_config_chat_nick_colors = weechat_hook_config ( "weechat.color.chat_nick_colors", &irc_config_change_nick_colors_cb, NULL, NULL); @@ -3420,7 +3292,6 @@ irc_config_read () { irc_notify_new_for_all_servers (); irc_config_change_look_display_join_message (NULL, NULL, NULL); - irc_config_change_look_nick_color_force (NULL, NULL, NULL); irc_config_change_look_nicks_hide_password (NULL, NULL, NULL); irc_config_change_color_nick_prefixes (NULL, NULL, NULL); irc_config_change_color_mirc_remap (NULL, NULL, NULL); @@ -3452,16 +3323,16 @@ irc_config_free () { weechat_config_free (irc_config_file); - if (irc_config_hook_config_nick_colors) + if (irc_config_hook_config_nick_color_options) { - weechat_unhook (irc_config_hook_config_nick_colors); - irc_config_hook_config_nick_colors = NULL; + weechat_unhook (irc_config_hook_config_nick_color_options); + irc_config_hook_config_nick_color_options = NULL; } - if (irc_config_nick_colors) + + if (irc_config_hook_config_chat_nick_colors) { - weechat_string_free_split (irc_config_nick_colors); - irc_config_nick_colors = NULL; - irc_config_num_nick_colors = 0; + weechat_unhook (irc_config_hook_config_chat_nick_colors); + irc_config_hook_config_chat_nick_colors = NULL; } if (irc_config_nicks_hide_password) @@ -3477,12 +3348,6 @@ irc_config_free () irc_config_hashtable_display_join_message = NULL; } - if (irc_config_hashtable_nick_color_force) - { - weechat_hashtable_free (irc_config_hashtable_nick_color_force); - irc_config_hashtable_nick_color_force = NULL; - } - if (irc_config_hashtable_nick_prefixes) { weechat_hashtable_free (irc_config_hashtable_nick_prefixes); diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index dc75af49e..ca1f5b531 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -62,12 +62,6 @@ enum t_irc_config_look_notice_as_pv IRC_CONFIG_LOOK_NOTICE_AS_PV_ALWAYS, }; -enum t_irc_config_look_nick_color_hash -{ - IRC_CONFIG_LOOK_NICK_COLOR_HASH_DJB2 = 0, - IRC_CONFIG_LOOK_NICK_COLOR_HASH_SUM, -}; - enum t_irc_config_look_nick_mode { IRC_CONFIG_LOOK_NICK_MODE_NONE = 0, @@ -128,9 +122,6 @@ extern struct t_config_option *irc_config_look_join_auto_add_chantype; extern struct t_config_option *irc_config_look_msgbuffer_fallback; extern struct t_config_option *irc_config_look_new_channel_position; extern struct t_config_option *irc_config_look_new_pv_position; -extern struct t_config_option *irc_config_look_nick_color_force; -extern struct t_config_option *irc_config_look_nick_color_hash; -extern struct t_config_option *irc_config_look_nick_color_stop_chars; extern struct t_config_option *irc_config_look_nick_completion_smart; extern struct t_config_option *irc_config_look_nick_mode; extern struct t_config_option *irc_config_look_nick_mode_empty; @@ -189,17 +180,12 @@ extern struct t_config_option *irc_config_network_whois_double_nick; extern struct t_config_option *irc_config_server_default[]; -extern char **irc_config_nick_colors; -extern int irc_config_num_nick_colors; - extern struct t_hashtable *irc_config_hashtable_display_join_message; -extern struct t_hashtable *irc_config_hashtable_nick_color_force; extern struct t_hashtable *irc_config_hashtable_nick_prefixes; extern struct t_hashtable *irc_config_hashtable_color_mirc_remap; extern char **irc_config_nicks_hide_password; extern int irc_config_num_nicks_hide_password; -extern void irc_config_set_nick_colors (); extern int irc_config_display_channel_modes_arguments (const char *modes); extern int irc_config_server_check_value_cb (const void *pointer, void *data, struct t_config_option *option, diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c index 7133b21a1..d4f75439d 100644 --- a/src/plugins/irc/irc-info.c +++ b/src/plugins/irc/irc-info.c @@ -847,12 +847,14 @@ irc_info_init () &irc_info_info_irc_nick_from_host_cb, NULL, NULL); weechat_hook_info ( "irc_nick_color", - N_("get nick color code"), + N_("get nick color code " + "(*deprecated* since version 1.5, replaced by \"nick_color\")"), N_("nickname"), &irc_info_info_irc_nick_color_cb, NULL, NULL); weechat_hook_info ( "irc_nick_color_name", - N_("get nick color name"), + N_("get nick color name " + "(*deprecated* since version 1.5, replaced by \"nick_color_name\")"), N_("nickname"), &irc_info_info_irc_nick_color_name_cb, NULL, NULL); weechat_hook_info ( diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c index 308181c76..6f01f48d8 100644 --- a/src/plugins/irc/irc-nick.c +++ b/src/plugins/irc/irc-nick.c @@ -93,130 +93,6 @@ irc_nick_is_nick (const char *string) } /* - * Duplicates a nick and stops at first char in list (using option - * irc.look.nick_color_stop_chars). - * - * Note: result must be freed after use. - */ - -char * -irc_nick_strdup_for_color (const char *nickname) -{ - int char_size, other_char_seen; - char *result, *pos, utf_char[16]; - - result = malloc (strlen (nickname) + 1); - pos = result; - other_char_seen = 0; - while (nickname[0]) - { - char_size = weechat_utf8_char_size (nickname); - memcpy (utf_char, nickname, char_size); - utf_char[char_size] = '\0'; - - if (strstr (weechat_config_string (irc_config_look_nick_color_stop_chars), - utf_char)) - { - if (other_char_seen) - { - pos[0] = '\0'; - return result; - } - } - else - { - other_char_seen = 1; - } - memcpy (pos, utf_char, char_size); - pos += char_size; - - nickname += char_size; - } - pos[0] = '\0'; - return result; -} - -/* - * Hashes a nickname to find color. - * - * Returns a number which is the index of color in the nicks colors of option - * "weechat.color.chat_nick_colors". - */ - -int -irc_nick_hash_color (const char *nickname) -{ - unsigned long color; - const char *ptr_nick; - - if (!irc_config_nick_colors) - irc_config_set_nick_colors (); - - if (irc_config_num_nick_colors == 0) - return 0; - - ptr_nick = nickname; - color = 0; - - switch (weechat_config_integer (irc_config_look_nick_color_hash)) - { - case IRC_CONFIG_LOOK_NICK_COLOR_HASH_DJB2: - /* variant of djb2 hash */ - color = 5381; - while (ptr_nick && ptr_nick[0]) - { - color ^= (color << 5) + (color >> 2) + weechat_utf8_char_int (ptr_nick); - ptr_nick = weechat_utf8_next_char (ptr_nick); - } - break; - case IRC_CONFIG_LOOK_NICK_COLOR_HASH_SUM: - /* sum of letters */ - color = 0; - while (ptr_nick && ptr_nick[0]) - { - color += weechat_utf8_char_int (ptr_nick); - ptr_nick = weechat_utf8_next_char (ptr_nick); - } - break; - } - - return (color % irc_config_num_nick_colors); -} - -/* - * Gets forced color for a nick. - * - * Returns the name of color (for example: "green"), NULL if no color is forced - * for nick. - */ - -const char * -irc_nick_get_forced_color (const char *nickname) -{ - const char *forced_color; - char *nick_lower; - - if (!nickname) - return NULL; - - forced_color = weechat_hashtable_get (irc_config_hashtable_nick_color_force, - nickname); - if (forced_color) - return forced_color; - - nick_lower = strdup (nickname); - if (nick_lower) - { - weechat_string_tolower (nick_lower); - forced_color = weechat_hashtable_get (irc_config_hashtable_nick_color_force, - nick_lower); - free (nick_lower); - } - - return forced_color; -} - -/* * Finds a color code for a nick (according to nick letters). * * Returns a WeeChat color code (that can be used for display). @@ -225,34 +101,7 @@ irc_nick_get_forced_color (const char *nickname) const char * irc_nick_find_color (const char *nickname) { - int color; - char *nickname2; - const char *forced_color, *str_color; - - if (!irc_config_nick_colors) - irc_config_set_nick_colors (); - - if (irc_config_num_nick_colors == 0) - return weechat_color ("default"); - - /* look if color is forced */ - forced_color = irc_nick_get_forced_color (nickname); - if (forced_color) - { - forced_color = weechat_color (forced_color); - if (forced_color && forced_color[0]) - return forced_color; - } - - /* hash nickname to get color */ - nickname2 = irc_nick_strdup_for_color (nickname); - color = irc_nick_hash_color ((nickname2) ? nickname2 : nickname); - if (nickname2) - free (nickname2); - - /* return color */ - str_color = weechat_color (irc_config_nick_colors[color]); - return (str_color[0]) ? str_color : weechat_color("default"); + return weechat_info_get ("nick_color", nickname); } /* @@ -264,30 +113,7 @@ irc_nick_find_color (const char *nickname) const char * irc_nick_find_color_name (const char *nickname) { - int color; - char *nickname2; - const char *forced_color; - static char *default_color = "default"; - - if (!irc_config_nick_colors) - irc_config_set_nick_colors (); - - if (irc_config_num_nick_colors == 0) - return default_color; - - /* look if color is forced */ - forced_color = irc_nick_get_forced_color (nickname); - if (forced_color) - return forced_color; - - /* hash nickname to get color */ - nickname2 = irc_nick_strdup_for_color (nickname); - color = irc_nick_hash_color ((nickname2) ? nickname2 : nickname); - if (nickname2) - free (nickname2); - - /* return color name */ - return irc_config_nick_colors[color]; + return weechat_info_get ("nick_color_name", nickname); } /* diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index 4be88b077..cc4e4b0a9 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -59,6 +59,7 @@ #include "../gui/gui-key.h" #include "../gui/gui-layout.h" #include "../gui/gui-line.h" +#include "../gui/gui-nick.h" #include "../gui/gui-nicklist.h" #include "../gui/gui-window.h" #include "plugin.h" @@ -786,6 +787,40 @@ plugin_api_info_color_rgb2term_cb (const void *pointer, void *data, } /* + * Returns nick color code for a nickname. + */ + +const char * +plugin_api_info_nick_color_cb (const void *pointer, void *data, + const char *info_name, + const char *arguments) +{ + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) info_name; + + return gui_nick_find_color (arguments); +} + +/* + * Returns nick color name for a nickname. + */ + +const char * +plugin_api_info_nick_color_name_cb (const void *pointer, void *data, + const char *info_name, + const char *arguments) +{ + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) info_name; + + return gui_nick_find_color_name (arguments); +} + +/* * Returns WeeChat infolist "bar". * * Note: result must be freed after use with function weechat_infolist_free(). @@ -1855,6 +1890,14 @@ plugin_api_init () N_("RGB color converted to terminal color (0-255)"), N_("rgb,limit (limit is optional and is set to 256 by default)"), &plugin_api_info_color_rgb2term_cb, NULL, NULL); + hook_info (NULL, "nick_color", + N_("get nick color code"), + N_("nickname"), + &plugin_api_info_nick_color_cb, NULL, NULL); + hook_info (NULL, "nick_color_name", + N_("get nick color name"), + N_("nickname"), + &plugin_api_info_nick_color_name_cb, NULL, NULL); /* WeeChat core infolist hooks */ hook_infolist (NULL, "bar", |