docs: translate user documentation to French

Make the user-facing documentation readable for the French-speaking team.
Anchors, roles and cross-references are unchanged so existing links keep
resolving.
This commit is contained in:
BlackAngelTV committed 2026-11-05 10:27:08 +01:00
1 parent 5c50bc4898
commit 5871baa33a
12 files changed
+1064 -925

No files matched your search

+60 -55
View File
@@ -1,36 +1,38 @@
Mark text on screen
Marquer du texte à l'écran
---------------------
kitty has the ability to mark text on the screen based on regular expressions.
This can be useful to highlight words or phrases when browsing output from long
running programs or similar. Lets start with a few examples:
kitty peut marquer du texte à l'écran à partir d'expressions régulières. C'est
utile pour mettre en évidence des mots ou des phrases lors de la lecture de la
sortie de programmes longs. Commençons par quelques exemples :
Examples
Exemples
----------
Suppose we want to be able to highlight the word :code:`ERROR` in the current
window. Add the following to :file:`kitty.conf`::
Supposons que nous voulions pouvoir mettre en évidence le mot :code:`ERROR`
dans la fenêtre courante. Ajoutez ce qui suit à :file:`kitty.conf` ::
map f1 toggle_marker text 1 ERROR
Now when you press :kbd:`F1`, all instances of the word :code:`ERROR` will be
highlighted. To turn off the highlighting, press :kbd:`F1` again.
If you want to make it case-insensitive, use::
Désormais, quand vous appuyez sur :kbd:`F1`, toutes les occurrences du mot
:code:`ERROR` sont mises en évidence. Pour désactiver la mise en évidence,
appuyez à nouveau sur :kbd:`F1`. Si vous voulez la rendre insensible à la
casse, utilisez ::
map f1 toggle_marker itext 1 ERROR
To make it match only complete words, use::
Pour qu'elle ne corresponde qu'à des mots complets, utilisez ::
map f1 toggle_marker regex 1 \\bERROR\\b
Suppose you want to highlight both :code:`ERROR` and :code:`WARNING`, case
insensitively::
Supposons que vous vouliez mettre en évidence à la fois :code:`ERROR` et
:code:`WARNING`, sans tenir compte de la casse ::
map f1 toggle_marker iregex 1 \\bERROR\\b 2 \\bWARNING\\b
kitty supports up to 3 mark groups (the numbers in the commands above). You
can control the colors used for these groups in :file:`kitty.conf` with::
kitty prend en charge jusqu'à 3 groupes de marques (les nombres dans les
commandes ci-dessus). Vous pouvez contrôler les couleurs utilisées pour ces
groupes dans :file:`kitty.conf` avec ::
mark1_foreground red
mark1_background gray
@@ -39,89 +41,92 @@ can control the colors used for these groups in :file:`kitty.conf` with::
.. note::
For performance reasons, matching is done per line only, and only when that
line is altered in any way. So you cannot match text that stretches across
multiple lines.
Pour des raisons de performance, la correspondance se fait ligne par ligne
uniquement, et seulement lorsqu'une ligne est modifiée d'une manière ou
d'une autre. Vous ne pouvez donc pas faire correspondre du texte réparti sur
plusieurs lignes.
Creating markers dynamically
Créer des marqueurs dynamiquement
---------------------------------
If you want to create markers dynamically rather than pre-defining them in
:file:`kitty.conf`, you can do so as follows::
Si vous voulez créer des marqueurs dynamiquement plutôt que de les prédéfinir
dans :file:`kitty.conf`, vous pouvez le faire ainsi ::
map f1 create_marker
map f2 remove_marker
Then pressing :kbd:`F1` will allow you to enter the marker definition and set it
and pressing :kbd:`F2` will remove the marker. :ac:`create_marker` accepts the
same syntax as :ac:`toggle_marker` above. Note that while creating markers, the
prompt has history so you can easily re-use previous marker expressions.
Appuyer sur :kbd:`F1` vous permettra alors de saisir la définition du marqueur
et de la définir, et appuyer sur :kbd:`F2` supprimera le marqueur.
:ac:`create_marker` accepte la même syntaxe que :ac:`toggle_marker` ci-dessus.
Notez que lors de la création de marqueurs, l'invite dispose d'un historique,
vous pouvez donc facilement réutiliser des expressions de marqueur précédentes.
You can also use the facilities for :doc:`remote-control` to dynamically add or
remove markers.
Vous pouvez aussi utiliser les facilités de :doc:`contrôle à distance
<remote-control>` pour ajouter ou supprimer des marqueurs dynamiquement.
Scrolling to marks
Défiler jusqu'aux marques
--------------------
kitty has a :ac:`scroll_to_mark` action to scroll to the next line that contains
a mark. You can use it by mapping it to some shortcut in :file:`kitty.conf`::
kitty dispose d'une action :ac:`scroll_to_mark` pour défiler jusqu'à la ligne
suivante contenant une marque. Vous pouvez l'utiliser en l'associant à un
raccourci dans :file:`kitty.conf` ::
map ctrl+p scroll_to_mark prev
map ctrl+n scroll_to_mark next
Then pressing :kbd:`Ctrl+P` will scroll to the first line in the scrollback
buffer above the current top line that contains a mark. Pressing :kbd:`Ctrl+N`
will scroll to show the first line below the current last line that contains
a mark. If you wish to jump to a mark of a specific type, you can add that to
the mapping::
Appuyer sur :kbd:`Ctrl+P` défilera alors jusqu'à la première ligne du tampon
d'historique, au-dessus de la ligne du haut actuelle, contenant une marque.
Appuyer sur :kbd:`Ctrl+N` défilera pour afficher la première ligne en dessous de
la ligne du bas actuelle contenant une marque. Si vous souhaitez sauter à une
marque d'un type particulier, vous pouvez l'ajouter à l'association ::
map ctrl+1 scroll_to_mark prev 1
Which will scroll only to marks of type 1.
Ce qui ne défilera que vers les marques de type 1.
The full syntax for creating marks
La syntaxe complète pour créer des marques
-------------------------------------
The syntax of the :ac:`toggle_marker` action is::
La syntaxe de l'action :ac:`toggle_marker` est ::
toggle_marker <marker-type> <specification>
Here :code:`marker-type` is one of:
Ici :code:`marker-type` vaut l'un des suivants :
* :code:`text` - Simple substring matching
* :code:`itext` - Case-insensitive substring matching
* :code:`regex` - A Python regular expression
* :code:`iregex` - A case-insensitive Python regular expression
* :code:`function` - An arbitrary function defined in a Python file, see :ref:`marker_funcs`.
* :code:`text` - Correspondance simple de sous-chaîne
* :code:`itext` - Correspondance de sous-chaîne insensible à la casse
* :code:`regex` - Une expression régulière Python
* :code:`iregex` - Une expression régulière Python insensible à la casse
* :code:`function` - Une fonction arbitraire définie dans un fichier Python, voir :ref:`marker_funcs`.
.. _marker_funcs:
Arbitrary marker functions
Fonctions de marqueur arbitraires
-----------------------------
You can create your own marker functions. Create a Python file named
:file:`mymarker.py` and in it create a :code:`marker` function. This function
receives the text of the line as input and must yield three numbers,
the starting character position, the ending character position and the mark
group (1-3). For example:
Vous pouvez créer vos propres fonctions de marqueur. Créez un fichier Python
nommé :file:`mymarker.py` et, à l'intérieur, une fonction :code:`marker`. Cette
fonction reçoit le texte de la ligne en entrée et doit produire trois nombres :
la position du caractère de début, la position du caractère de fin et le groupe
de marque (1-3). Par exemple :
.. code-block::
.. code-block:: python
def marker(text):
# Function to highlight the letter X
# Fonction pour mettre en évidence la lettre X
for i, ch in enumerate(text):
if ch.lower() == 'x':
yield i, i, 3
Save this file somewhere and in :file:`kitty.conf`, use::
Enregistrez ce fichier quelque part et, dans :file:`kitty.conf`, utilisez ::
map f1 toggle_marker function /path/to/mymarker.py
If you save the file in the :ref:`kitty config directory <confloc>`, you can
use::
Si vous enregistrez le fichier dans le :ref:`dossier de configuration de kitty
<confloc>`, vous pouvez utiliser ::
map f1 toggle_marker function mymarker.py