summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc22
-rw-r--r--doc/fr/weechat_plugin_api.fr.adoc23
-rw-r--r--doc/it/weechat_plugin_api.it.adoc32
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc31
-rw-r--r--doc/sr/weechat_plugin_api.sr.adoc28
5 files changed, 114 insertions, 22 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 3a2c5cba3..ecd867599 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -894,11 +894,12 @@ This function is not available in scripting API.
==== strlen_screen
-_WeeChat ≥ 0.4.2._
+_WeeChat ≥ 0.4.2, updated in 3.8._
Return number of chars needed on screen to display UTF-8 string.
-Non-printable chars have a width of 1 (this is the difference with the function
-<<_utf8_strlen_screen,utf8_strlen_screen>>).
+
+WeeChat color codes are skipped and don't count in the result (this is the only
+difference with the function <<_utf8_strlen_screen,utf8_strlen_screen>>).
Prototype:
@@ -3639,6 +3640,8 @@ This function is not available in scripting API.
==== utf8_char_size_screen
+_Updated in 3.8._
+
Return number of chars needed on screen to display UTF-8 char.
Prototype:
@@ -3654,7 +3657,18 @@ Arguments:
Return value:
-* number of chars needed on screen to display UTF-8 char
+* number of chars needed on screen to display UTF-8 char:
+** -1: non printable char
+** ≥ 0: printable char
+
+The result is the return value of function `wcwidth` (see `man wcwidth`), with
+exception for the following chars, that have a specific behavior in WeeChat:
+
+* U+0009 (Tabulation): value of option
+ link:weechat_user.en.html#option_weechat.look.tab_width[weechat.look.tab_width ^↗^,window=_blank]
+* U+0001 (1) to U+001F (31), except U+0009 (Tabulation): 1
+* U+00AD (173, soft hyphen): -1
+* U+200B (8203, zero width space): -1
C example:
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc
index 898000318..69f7fad46 100644
--- a/doc/fr/weechat_plugin_api.fr.adoc
+++ b/doc/fr/weechat_plugin_api.fr.adoc
@@ -906,12 +906,13 @@ Cette fonction n'est pas disponible dans l'API script.
==== strlen_screen
-_WeeChat ≥ 0.4.2._
+_WeeChat ≥ 0.4.2, mis à jour dans la 3.8._
Retourner le nombre de caractères nécessaires pour afficher la chaîne UTF-8
sur l'écran.
-Les caractères non affichables ont une longueur de 1 (c'est la différence avec
-la fonction <<_utf8_strlen_screen,utf8_strlen_screen>>).
+
+Les codes couleur de WeeChat sont sautés et ne comptent pas dans le résultat
+(ceci est la seule différence avec la fonction <<_utf8_strlen_screen,utf8_strlen_screen>>).
Prototype :
@@ -3698,6 +3699,8 @@ Cette fonction n'est pas disponible dans l'API script.
==== utf8_char_size_screen
+_Mis à jour dans la 3.8._
+
Retourner le nombre de caractères nécessaires pour afficher le caractère UTF-8
sur l'écran.
@@ -3714,7 +3717,19 @@ Paramètres :
Valeur de retour :
-* nombre de caractères nécessaires pour afficher le caractère UTF-8 sur l'écran
+* nombre de caractères nécessaires pour afficher le caractère UTF-8 sur l'écran :
+** -1 : caractère non affichable
+** ≥ 0 : caractère affichable
+
+Le résultat est la valeur de retour de la fonction `wcwidth` (voir `man wcwidth`),
+avec une exception pour les caractères suivants, qui ont un comportement
+spécifique dans WeeChat :
+
+* U+0009 (Tabulation) : valeur de l'option
+ link:weechat_user.fr.html#option_weechat.look.tab_width[weechat.look.tab_width ^↗^,window=_blank]
+* U+0001 (1) to U+001F (31), sauf U+0009 (Tabulation) : 1
+* U+00AD (173, trait d'union conditionnel) : -1
+* U+200B (8203, espace sans chasse) : -1
Exemple en C :
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 088b728c0..fa054b1a4 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -939,13 +939,15 @@ Questa funzione non è disponibile nelle API per lo scripting.
==== strlen_screen
-_WeeChat ≥ 0.4.2._
+// TRANSLATION MISSING
+_WeeChat ≥ 0.4.2, updated in 3.8._
-Restituisce il numero di caratteri necessari per visualizzare la stringa
-UTF-8 su schermo.
// TRANSLATION MISSING
-Non-printable chars have a width of 1 (this is the difference with the function
-<<_utf8_strlen_screen,utf8_strlen_screen>>).
+Return number of chars needed on screen to display UTF-8 string.
+
+// TRANSLATION MISSING
+WeeChat color codes are skipped and don't count in the result (this is the only
+difference with the function <<_utf8_strlen_screen,utf8_strlen_screen>>).
Prototipo:
@@ -3781,6 +3783,9 @@ Questa funzione non è disponibile nelle API per lo scripting.
==== utf8_char_size_screen
+// TRANSLATION MISSING
+_Updated in 3.8._
+
Restituisce il numero di caratteri necessari per visualizzare il
carattere UTF-8 sullo schermo.
@@ -3798,7 +3803,22 @@ Argomenti:
Valore restituito:
* numero di caratteri necessario per visualizzare il carattere
- UTF-8 su schermo
+ UTF-8 su schermo:
+// TRANSLATION MISSING
+** -1: non printable char
+// TRANSLATION MISSING
+** ≥ 0: printable char
+
+// TRANSLATION MISSING
+The result is the return value of function `wcwidth` (see `man wcwidth`), with
+exception for the following chars, that have a specific behavior in WeeChat:
+
+// TRANSLATION MISSING
+* U+0009 (Tabulation): value of option
+ link:weechat_user.it.html#option_weechat.look.tab_width[weechat.look.tab_width ^↗^,window=_blank]
+* U+0001 (1) to U+001F (31), except U+0009 (Tabulation): 1
+* U+00AD (173, soft hyphen): -1
+* U+200B (8203, zero width space): -1
Esempio in C:
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index 81ce7668a..a5c729fbd 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -907,11 +907,15 @@ const char *pos = weechat_strcasestr ("aBcDeF", "de"); /* result: pointer to "D
==== strlen_screen
-_WeeChat バージョン 0.4.2 以上で利用可。_
+// TRANSLATION MISSING
+_WeeChat ≥ 0.4.2, updated in 3.8._
+
+// TRANSLATION MISSING
+Return number of chars needed on screen to display UTF-8 string.
-UTF-8 文字列を画面上に表示するために必要な画面幅を返す。非表示文字を
-1 文字として数えます (これが
-<<_utf8_strlen_screen,utf8_strlen_screen>> 関数との違いです)。
+// TRANSLATION MISSING
+WeeChat color codes are skipped and don't count in the result (this is the only
+difference with the function <<_utf8_strlen_screen,utf8_strlen_screen>>).
プロトタイプ:
@@ -3705,6 +3709,8 @@ int diff = weechat_utf8_charcasecmp ("aaa", "CCC"); /* == -2 */
==== utf8_char_size_screen
+_WeeChat バージョン 3.8 で更新。_
+
UTF-8 文字を画面上に表示するために必要な画面幅を返す。
プロトタイプ:
@@ -3720,7 +3726,22 @@ int weechat_utf8_char_size_screen (const char *string);
戻り値:
-* UTF-8 文字を画面上に表示するために必要な画面幅
+* UTF-8 文字を画面上に表示するために必要な画面幅:
+// TRANSLATION MISSING
+** -1: non printable char
+// TRANSLATION MISSING
+** ≥ 0: printable char
+
+// TRANSLATION MISSING
+The result is the return value of function `wcwidth` (see `man wcwidth`), with
+exception for the following chars, that have a specific behavior in WeeChat:
+
+// TRANSLATION MISSING
+* U+0009 (Tabulation): value of option
+ link:weechat_user.ja.html#option_weechat.look.tab_width[weechat.look.tab_width ^↗^,window=_blank]
+* U+0001 (1) to U+001F (31), except U+0009 (Tabulation): 1
+* U+00AD (173, soft hyphen): -1
+* U+200B (8203, zero width space): -1
C 言語での使用例:
diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc
index 3739ddcd3..8ae2b157e 100644
--- a/doc/sr/weechat_plugin_api.sr.adoc
+++ b/doc/sr/weechat_plugin_api.sr.adoc
@@ -865,9 +865,14 @@ const char *pos = weechat_strcasestr ("aBcDeF", "de"); /* резултат: п
==== strlen_screen
-_WeeChat ≥ 0.4.2._
+_WeeChat ≥ 0.4.2, ажурирано у верзији 3.8._
-Враћа број карактера на екрану који су потребни за приказивање UTF-8 стринга. Карактери који не могу да се одштампају имају ширину 1 (ово је разлика у односу на функцију <<_utf8_strlen_screen,utf8_strlen_screen>>).
+// TRANSLATION MISSING
+Return number of chars needed on screen to display UTF-8 string.
+
+// TRANSLATION MISSING
+WeeChat color codes are skipped and don't count in the result (this is the only
+difference with the function <<_utf8_strlen_screen,utf8_strlen_screen>>).
Прототип:
@@ -3511,6 +3516,8 @@ int diff = weechat_utf8_charcasecmp ("aaa", "CCC"); /* == -2 */
==== utf8_char_size_screen
+_Ажурирано у верзији 3.8._
+
Враћа број карактера потребних на екрану за испис UTF-8 карактера.
Прототип:
@@ -3526,7 +3533,22 @@ int weechat_utf8_char_size_screen (const char *string);
Повратна вредност:
-* број карактера на екрану потребних за испис UTF-8 карактера
+* број карактера на екрану потребних за испис UTF-8 карактера:
+// TRANSLATION MISSING
+** -1: non printable char
+// TRANSLATION MISSING
+** ≥ 0: printable char
+
+// TRANSLATION MISSING
+The result is the return value of function `wcwidth` (see `man wcwidth`), with
+exception for the following chars, that have a specific behavior in WeeChat:
+
+// TRANSLATION MISSING
+* U+0009 (Tabulation): value of option
+ link:weechat_user.sr.html#option_weechat.look.tab_width[weechat.look.tab_width ^↗^,window=_blank]
+* U+0001 (1) to U+001F (31), except U+0009 (Tabulation): 1
+* U+00AD (173, soft hyphen): -1
+* U+200B (8203, zero width space): -1
C пример: