From aaff08bbc6ab152de5a060e0fd2d9bb0a484a216 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 14 Aug 2017 18:26:05 -0400 Subject: [PATCH 1/4] Add support code for localization of man pages --- CMake/Manpage.cmake | 80 ++++++++++++------ sway/CMakeLists.txt | 13 ++- sway/{ => man}/sway-bar.5.txt | 0 sway/{ => man}/sway-input.5.txt | 0 sway/{ => man}/sway-security.7.txt | 0 sway/man/sway.1.ja.txt | 127 +++++++++++++++++++++++++++++ sway/{ => man}/sway.1.txt | 2 +- sway/{ => man}/sway.5.txt | 0 swaygrab/CMakeLists.txt | 4 +- swaygrab/{ => man}/swaygrab.1.txt | 0 swaylock/CMakeLists.txt | 4 +- swaylock/{ => man}/swaylock.1.txt | 0 swaymsg/CMakeLists.txt | 4 +- swaymsg/{ => man}/swaymsg.1.txt | 0 14 files changed, 193 insertions(+), 41 deletions(-) rename sway/{ => man}/sway-bar.5.txt (100%) rename sway/{ => man}/sway-input.5.txt (100%) rename sway/{ => man}/sway-security.7.txt (100%) create mode 100644 sway/man/sway.1.ja.txt rename sway/{ => man}/sway.1.txt (98%) rename sway/{ => man}/sway.5.txt (100%) rename swaygrab/{ => man}/swaygrab.1.txt (100%) rename swaylock/{ => man}/swaylock.1.txt (100%) rename swaymsg/{ => man}/swaymsg.1.txt (100%) diff --git a/CMake/Manpage.cmake b/CMake/Manpage.cmake index cc04d710fb..4035c7d1e8 100644 --- a/CMake/Manpage.cmake +++ b/CMake/Manpage.cmake @@ -2,32 +2,64 @@ find_package(A2X) if (A2X_FOUND) add_custom_target(man ALL) +endif() - function(add_manpage name section) - add_custom_command( - OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} - COMMAND ${A2X_COMMAND} - --no-xmllint - --doctype manpage - --format manpage - -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt - COMMENT Generating manpage for ${name}.${section} - ) +function(add_manpage name section locale) + if (NOT A2X_FOUND) + return() + endif() - add_custom_target(man-${name}.${section} - DEPENDS - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} + if (${locale} STREQUAL "en") + set( + input + ${CMAKE_CURRENT_SOURCE_DIR}/man/${name}.${section}.txt ) - add_dependencies(man - man-${name}.${section} + set( + output + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} ) - - install( - FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} - DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section} - COMPONENT documentation + set( + destination + ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section} ) - endfunction() -endif() + else() + set( + input + ${CMAKE_CURRENT_SOURCE_DIR}/man/${name}.${section}.${locale}.txt + ) + set( + output + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}.${locale} + ) + set( + destination + ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/${locale}/man${section} + ) + endif() + + add_custom_command( + OUTPUT ${output} + COMMAND ${A2X_COMMAND} + --no-xmllint + --doctype manpage + --format manpage + -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} + ${input} + DEPENDS ${input} + COMMENT Generating manpage for ${name}.${section}.${locale} + ) + + add_custom_target(man-${name}.${section}.${locale} + DEPENDS ${output} + ) + add_dependencies(man + man-${name}.${section}.${locale} + ) + + install( + FILES ${output} + DESTINATION ${destination} + COMPONENT documentation + RENAME ${name}.${section} + ) +endfunction() diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt index 61c22b8470..047d17c0f4 100644 --- a/sway/CMakeLists.txt +++ b/sway/CMakeLists.txt @@ -97,10 +97,9 @@ if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) add_config(10-freebsd security.d/10-freebsd sway/security.d) endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) -if (A2X_FOUND) - add_manpage(sway 1) - add_manpage(sway 5) - add_manpage(sway-input 5) - add_manpage(sway-bar 5) - add_manpage(sway-security 7) -endif() +add_manpage(sway 1 en) +add_manpage(sway 1 ja) +add_manpage(sway 5 en) +add_manpage(sway-input 5 en) +add_manpage(sway-bar 5 en) +add_manpage(sway-security 7 en) diff --git a/sway/sway-bar.5.txt b/sway/man/sway-bar.5.txt similarity index 100% rename from sway/sway-bar.5.txt rename to sway/man/sway-bar.5.txt diff --git a/sway/sway-input.5.txt b/sway/man/sway-input.5.txt similarity index 100% rename from sway/sway-input.5.txt rename to sway/man/sway-input.5.txt diff --git a/sway/sway-security.7.txt b/sway/man/sway-security.7.txt similarity index 100% rename from sway/sway-security.7.txt rename to sway/man/sway-security.7.txt diff --git a/sway/man/sway.1.ja.txt b/sway/man/sway.1.ja.txt new file mode 100644 index 0000000000..89ef50f872 --- /dev/null +++ b/sway/man/sway.1.ja.txt @@ -0,0 +1,127 @@ +///// +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: +///// +:quotes.~: + +sway (1) +======== + +名前 +---- +sway - SirCmpwnのWaylandのcompositor + +書式 +---- +'sway' [options] [command] + +Options +------- + +*-h, --help*:: + Show help message and quit. + +*-c, \--config* :: + Specifies a config file. + +*-C, \--validate*:: + Check the validity of the config file, then exit. + +*-d, --debug*:: + Enables full logging, including debug information. + +*-v, \--version*:: + Show the version number and quit. + +*-V, --verbose*:: + Enables more verbose logging. + +*--get-socketpath*:: + Gets the IPC socket path and prints it, then exits. + +Description +----------- + +sway was created to fill the need of an i3-like window manager for Wayland. The +upstream i3 developers have no intention of porting i3 to Wayland, and projects +proposed by others ended up as vaporware. Many thanks to the i3 folks for +providing such a great piece of software, so good that your users would rather +write an entirely new window manager from scratch that behaved _exactly_ like i3 +rather than switch to something else. + +Launch sway directly from a tty or via your favorite Wayland-compatible login +manager. + +Commands +-------- + +If sway is currently running, you may run _sway [command]_ to send _command_ to +the running instance of sway. The same commands you would use in the config file +are valid here (see **sway**(5)). For compatibility reasons, you may also issue +commands with **swaymsg**(1) or **i3-msg**(1) (or even with **i3**(1), probably). + +Configuration +------------- + +If _-c_ is not specified, sway will look in several locations for your config +file. The suggested location for your config file is ~/.config/sway/config. +~/.sway/config will also work, and the rest of the usual XDG config locations +are supported. If no sway config is found, sway will attempt to load an i3 +config from all the config locations i3 supports. Sway looks for a config file in +a fallback directory as a last resort, which is /etc/sway/ by default. A standard +configuration file is installed at this location. If still nothing is found, +you will receive an error. + +To write your own config, it's suggested that you copy the default config file to +the location of your choosing and start there. + +For information on the config file format, see **sway**(5). + +Environment +----------- + +The following environment variables have an effect on sway: + +*SWAY_CURSOR_THEME*:: + Specifies the name of the cursor theme to use. + +*SWAY_CURSOR_SIZE*:: + Specifies the size of the cursor to use. + +*SWAYSOCK*:: + Specifies the path to the sway IPC socket. + +*WLC_DRM_DEVICE*:: + Specifies the device to use in DRM mode. + +*WLC_SHM*:: + Set 1 to force EGL clients to use shared memory. + +*WLC_OUTPUTS*:: + Number of fake outputs to use when running in X11 mode. + +*WLC_XWAYLAND*:: + Set to 0 to disable Xwayland support. + +*WLC_LIBINPUT*:: + Set to 1 to force libinput (even in X11 mode). + +*WLC_REPEAT_DELAY*:: + Configures the keyboard repeat delay. + +*WLC_REPEAT_RATE*:: + Configures the keyboard repeat rate. + +*XKB_DEFAULT_RULES*, *XKB_DEFAULT_MODEL*, *XKB_DEFAULT_LAYOUT*, *XKB_DEFAULT_VARIANT*, *XKB_DEFAULT_OPTIONS*:: + Configures the xkb keyboard settings. See xkeyboard-config(7). + +Authors +------- + +Maintained by Drew DeVault , who is assisted by other open +source contributors. For more information about sway development, see +. + +See Also +-------- + +**sway**(5) **swaymsg**(1) **swaygrab**(1) **sway-input**(5) **sway-bar**(5) diff --git a/sway/sway.1.txt b/sway/man/sway.1.txt similarity index 98% rename from sway/sway.1.txt rename to sway/man/sway.1.txt index bc827bd589..ee1938f439 100644 --- a/sway/sway.1.txt +++ b/sway/man/sway.1.txt @@ -1,5 +1,5 @@ ///// -vim:set ts=4 sw=4 tw=82 noet: +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: ///// :quotes.~: diff --git a/sway/sway.5.txt b/sway/man/sway.5.txt similarity index 100% rename from sway/sway.5.txt rename to sway/man/sway.5.txt diff --git a/swaygrab/CMakeLists.txt b/swaygrab/CMakeLists.txt index 42806caedf..f9e334616e 100644 --- a/swaygrab/CMakeLists.txt +++ b/swaygrab/CMakeLists.txt @@ -23,6 +23,4 @@ install( COMPONENT runtime ) -if (A2X_FOUND) - add_manpage(swaygrab 1) -endif() +add_manpage(swaygrab 1 en) diff --git a/swaygrab/swaygrab.1.txt b/swaygrab/man/swaygrab.1.txt similarity index 100% rename from swaygrab/swaygrab.1.txt rename to swaygrab/man/swaygrab.1.txt diff --git a/swaylock/CMakeLists.txt b/swaylock/CMakeLists.txt index 90b54a7270..849165c897 100644 --- a/swaylock/CMakeLists.txt +++ b/swaylock/CMakeLists.txt @@ -46,6 +46,4 @@ install( COMPONENT data ) -if (A2X_FOUND) - add_manpage(swaylock 1) -endif() +add_manpage(swaylock 1 en) diff --git a/swaylock/swaylock.1.txt b/swaylock/man/swaylock.1.txt similarity index 100% rename from swaylock/swaylock.1.txt rename to swaylock/man/swaylock.1.txt diff --git a/swaymsg/CMakeLists.txt b/swaymsg/CMakeLists.txt index b428a409fd..0c69c9ad5a 100644 --- a/swaymsg/CMakeLists.txt +++ b/swaymsg/CMakeLists.txt @@ -18,6 +18,4 @@ install( COMPONENT runtime ) -if (A2X_FOUND) - add_manpage(swaymsg 1) -endif() +add_manpage(swaymsg 1 en) diff --git a/swaymsg/swaymsg.1.txt b/swaymsg/man/swaymsg.1.txt similarity index 100% rename from swaymsg/swaymsg.1.txt rename to swaymsg/man/swaymsg.1.txt From 99c8a8d961944bee0c2ac40826723f3885f93fa1 Mon Sep 17 00:00:00 2001 From: Abdelhakim Qbaich Date: Mon, 14 Aug 2017 19:56:15 -0400 Subject: [PATCH 2/4] Add all add_manpage() in CMakeLists for french --- sway/CMakeLists.txt | 5 +++++ swaygrab/CMakeLists.txt | 1 + swaylock/CMakeLists.txt | 1 + swaymsg/CMakeLists.txt | 1 + 4 files changed, 8 insertions(+) diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt index 047d17c0f4..08e6fad6a3 100644 --- a/sway/CMakeLists.txt +++ b/sway/CMakeLists.txt @@ -99,7 +99,12 @@ endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) add_manpage(sway 1 en) add_manpage(sway 1 ja) +add_manpage(sway 1 fr) add_manpage(sway 5 en) +add_manpage(sway 5 fr) add_manpage(sway-input 5 en) +add_manpage(sway-input 5 fr) add_manpage(sway-bar 5 en) +add_manpage(sway-bar 5 fr) add_manpage(sway-security 7 en) +add_manpage(sway-security 7 fr) diff --git a/swaygrab/CMakeLists.txt b/swaygrab/CMakeLists.txt index f9e334616e..fe932e8f69 100644 --- a/swaygrab/CMakeLists.txt +++ b/swaygrab/CMakeLists.txt @@ -24,3 +24,4 @@ install( ) add_manpage(swaygrab 1 en) +add_manpage(swaygrab 1 fr) diff --git a/swaylock/CMakeLists.txt b/swaylock/CMakeLists.txt index 849165c897..3a4c5f45f3 100644 --- a/swaylock/CMakeLists.txt +++ b/swaylock/CMakeLists.txt @@ -47,3 +47,4 @@ install( ) add_manpage(swaylock 1 en) +add_manpage(swaylock 1 fr) diff --git a/swaymsg/CMakeLists.txt b/swaymsg/CMakeLists.txt index 0c69c9ad5a..54aea4c8a4 100644 --- a/swaymsg/CMakeLists.txt +++ b/swaymsg/CMakeLists.txt @@ -19,3 +19,4 @@ install( ) add_manpage(swaymsg 1 en) +add_manpage(swaymsg 1 fr) From 484ee5e45da51628a0011c09c425d058e5719424 Mon Sep 17 00:00:00 2001 From: Abdelhakim Qbaich Date: Mon, 14 Aug 2017 19:59:16 -0400 Subject: [PATCH 3/4] Add missing filetype declarations for vim in manpages --- sway/man/sway-bar.5.txt | 2 +- sway/man/sway-input.5.txt | 2 +- sway/man/sway-security.7.txt | 2 +- sway/man/sway.5.txt | 2 +- swaygrab/man/swaygrab.1.txt | 2 +- swaylock/man/swaylock.1.txt | 2 +- swaymsg/man/swaymsg.1.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sway/man/sway-bar.5.txt b/sway/man/sway-bar.5.txt index 294876624d..fb6440eae3 100644 --- a/sway/man/sway-bar.5.txt +++ b/sway/man/sway-bar.5.txt @@ -1,5 +1,5 @@ ///// -vim:set ts=4 sw=4 tw=82 noet: +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: ///// sway-bar (5) ============ diff --git a/sway/man/sway-input.5.txt b/sway/man/sway-input.5.txt index f44a3179a2..0593a8126f 100644 --- a/sway/man/sway-input.5.txt +++ b/sway/man/sway-input.5.txt @@ -1,5 +1,5 @@ ///// -vim:set ts=4 sw=4 tw=82 noet: +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: ///// sway-input (5) ============== diff --git a/sway/man/sway-security.7.txt b/sway/man/sway-security.7.txt index ec6df1f300..d94a4a4f53 100644 --- a/sway/man/sway-security.7.txt +++ b/sway/man/sway-security.7.txt @@ -1,5 +1,5 @@ ///// -vim:set ts=4 sw=4 tw=82 noet: +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: ///// sway-security (7) ================= diff --git a/sway/man/sway.5.txt b/sway/man/sway.5.txt index 131780e26a..e8a869e4ee 100644 --- a/sway/man/sway.5.txt +++ b/sway/man/sway.5.txt @@ -1,5 +1,5 @@ ///// -vim:set ts=4 sw=4 tw=82 noet: +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: ///// sway (5) ======== diff --git a/swaygrab/man/swaygrab.1.txt b/swaygrab/man/swaygrab.1.txt index 1da56db87e..537378ca90 100644 --- a/swaygrab/man/swaygrab.1.txt +++ b/swaygrab/man/swaygrab.1.txt @@ -1,5 +1,5 @@ ///// -vim:set ts=4 sw=4 tw=82 noet: +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: ///// :quotes.~: diff --git a/swaylock/man/swaylock.1.txt b/swaylock/man/swaylock.1.txt index 4c46279457..9dba9af7ee 100644 --- a/swaylock/man/swaylock.1.txt +++ b/swaylock/man/swaylock.1.txt @@ -1,5 +1,5 @@ ///// -vim:set ts=4 sw=4 tw=82 noet: +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: ///// :quotes.~: diff --git a/swaymsg/man/swaymsg.1.txt b/swaymsg/man/swaymsg.1.txt index 1f03bee367..4efd22b2fd 100644 --- a/swaymsg/man/swaymsg.1.txt +++ b/swaymsg/man/swaymsg.1.txt @@ -1,5 +1,5 @@ ///// -vim:set ts=4 sw=4 tw=82 noet: +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: ///// :quotes.~: From a7936ec71a5070cdfdc1cae9a0e92c42d0e1d69b Mon Sep 17 00:00:00 2001 From: Abdelhakim Qbaich Date: Mon, 14 Aug 2017 21:23:20 -0400 Subject: [PATCH 4/4] =?UTF-8?q?Translation=20of=20man=20pages=20to=20Frenc?= =?UTF-8?q?h=20/=20Traduction=20de=20pages=20man=20en=20fran=C3=A7ais?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swaylock/man/swaylock.1.fr.txt | 111 +++++++++++++++++++++++++++++++++ swaymsg/man/swaymsg.1.fr.txt | 79 +++++++++++++++++++++++ 2 files changed, 190 insertions(+) create mode 100644 swaylock/man/swaylock.1.fr.txt create mode 100644 swaymsg/man/swaymsg.1.fr.txt diff --git a/swaylock/man/swaylock.1.fr.txt b/swaylock/man/swaylock.1.fr.txt new file mode 100644 index 0000000000..732099bc35 --- /dev/null +++ b/swaylock/man/swaylock.1.fr.txt @@ -0,0 +1,111 @@ +///// +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: +///// +:quotes.~: + +swaylock (1) +============ + +Nom +--- +swaylock - Écran de verrouillage pour sway. + +Synopsis +-------- +'swaylock' [options] + +Verrouiller la session actuelle de sway. + +Options +------- + +*-h, --help*:: + Affiche le message d'aide et quitte. + +*-c, \--color* :: + Turn l'écran into la couleur donnée. Si -i est utilisé, cela définit + l'arrière-plan de l'image à la couleur donnée. Blanc (ffffff) par défaut, ou + transparent (00000000) si une image est utilisée. + +*-i, \--image* [:]:: + Affiche l'image donnée, facultativement uniquement sur la sortie donnée. + Utilisez -c pour définir une couleur d'arrière-plan. + +*--scaling*:: + Mode de mise à l'échelle pour les images : stretch, fill, fit, center, or tile. + +*-t, --tiling*:: + Semblable à --scaling=tile. + +*-u, --no-unlock-indicator*:: + Désactive l'indicateur de déverrouillage. + +*-v, \--version*:: + Affiche le numéro de version et quitte. + +*--socket *:: + Utilise le chemin de socket spécifié. Sinon, swaymsg demandera à sway où se + trouve le socket (d'abord la valeur de $SWAYSOCK, puis de $I3SOCK). + +Apparence +--------- + +*--bshlcolor* :: + Définit the color of backspace highlight segments. + +*--font* :: + Définit the font of the text inside the indicator. + +*--insidecolor* :: + Définit the color of the inside of the indicator when typing or idle. + +*--insidevercolor* :: + Définit the color of the inside of the indicator when verifying. + +*--insidewrongcolor* :: + Définit the color of the inside of the indicator when invalid. + +*--keyhlcolor* :: + Définit the color of keypress highlight segments. + +*--linecolor* :: + Définit the color of the lines that separate the inside and outside of the + indicator. + +*-s, \--line-uses-inside*:: + Use the color of the inside of the indicator for the line separating the + inside and outside of the indicator. + +*-r, \--line-uses-ring*:: + Use the outer ring's color for the line separating the inside and outside of + the indicator. + +*--ringcolor* :: + Définit the color of the outside of the indicator when typing or idle. + +*--ringvercolor* :: + Définit the color of the outside of the indicator when verifying. + +*--ringwrongcolor* :: + Définit the color of the outside of the indicator when invalid. + +*--separatorcolor* :: + Définit the color of the lines that seperate highlight segments. + +*--textcolor* :: + Définit the color of the text inside the indicator. + +*--indicator-radius* :: + Définit the radius of the indicator to _radius_ pixels. The default value is + 50. + +*--indicator-thickness* :: + Définit the thickness of the indicator to _thickness_ pixels. The default value + is 10. + +Auteurs +------- + +Maintenu par Drew DeVault , assisté par d'autres contributeurs +open source. Pour plus d'information sur le développement de sway, voir +. diff --git a/swaymsg/man/swaymsg.1.fr.txt b/swaymsg/man/swaymsg.1.fr.txt new file mode 100644 index 0000000000..d4eae880bd --- /dev/null +++ b/swaymsg/man/swaymsg.1.fr.txt @@ -0,0 +1,79 @@ +///// +vim:set ts=4 sw=4 tw=82 noet ft=asciidoc: +///// +:quotes.~: + +swaymsg (1) +=========== + +Nom +--- +swaymsg - Envoyer des messages à une instance en exécution sur le socket IPC. + +Synopsis +-------- +'swaymsg' [options] [message] + +Options +------- + +*-h, --help*:: + Affiche le message d'aide et quitte. + +*-q, \--quiet*:: + Envoie le message IPC, mais n'affiche pas la réponse de sway. + +*-r, \--raw*:: + Utilise la sortie brute (raw) malgré l'utilisation d'un tty. + +*-s, --socket* :: + Utilise le chemin de socket spécifié. Sinon, swaymsg demandera à sway où se + trouve le socket (d'abord la valeur de $SWAYSOCK, puis de $I3SOCK). + +*-t, \--type* :: + Spécifie le type du message IPC. Voir ci-dessous. + +*-v, \--version*:: + Affiche la version (de swaymsg) et quitte. + +Types de message IPC +-------------------- + +*command*:: + Le message est une commande sway (les mêmes commandes que vous pouvez lier aux keybindings + dans votre fichier de configuration de sway). Ce sera exécuté immédiatement. + +*get_workspaces*:: + Obtient une liste d'espaces de travail encodée en JSON et leur statut. + +*get_inputs*:: + Obtient une liste des entrées actuelles encodée en JSON. + +*get_outputs*:: + Obtient une liste des sorties actuelles encodée en JSON. + +*get_tree*:: + Obtient un arbre de layout encodé en JSON de tous les fenêtres ouvertes, + conteneurs, sorties, espaces de travail, etc. + +*get_marks*:: + Obtient une liste de maques encodée en JSON. + +*get_bar_config*:: + Obtient une configuration pour swaybar encodée en JSON. + +*get_version*:: + Obtient des informations sur la version de l'instance de sway + en cours d'exécution, encodée en JSON. + +Auteurs +------- + +Maintenu par Drew DeVault , assisté par d'autres contributeurs +open source. Pour plus d'information sur le développement de sway, voir +. + +Voir aussi +---------- + +**sway**(5)