diff --git a/dist/unix/CMakeLists.txt b/dist/unix/CMakeLists.txt index ad27776c6..19fb16fbb 100644 --- a/dist/unix/CMakeLists.txt +++ b/dist/unix/CMakeLists.txt @@ -18,17 +18,20 @@ if (SYSTEMD) ) endif() -if (GUI) - list(APPEND MAN_FILES ${PROJECT_SOURCE_DIR}/doc/qbittorrent.1) -else() - list(APPEND MAN_FILES ${PROJECT_SOURCE_DIR}/doc/qbittorrent-nox.1) -endif() - -install(FILES ${MAN_FILES} - DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 - COMPONENT doc +set(manPageLanguages + en + ru ) +foreach(manPageLanguage ${manPageLanguages}) + install(FILES ${PROJECT_SOURCE_DIR}/doc/${manPageLanguage}/$,qbittorrent.1,qbittorrent-nox.1> + # English man pages are installed into ${CMAKE_INSTALL_MANDIR}/man1, while man pages + # in other languages are installed into ${CMAKE_INSTALL_MANDIR}/${manPageLanguage}/man1. + DESTINATION ${CMAKE_INSTALL_MANDIR}/$<$>:${manPageLanguage}/>man1 + COMPONENT doc + ) +endforeach() + if (GUI) install(FILES org.qbittorrent.qBittorrent.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/ diff --git a/doc/README.md b/doc/README.md index c3835658d..7b821e8c6 100644 --- a/doc/README.md +++ b/doc/README.md @@ -18,3 +18,9 @@ You'll need to be careful when you copy the output to file as some headers will Careful not to overwrite the existing leading headers or trim off the trailing headers. Remember to commit Markdown files (\*.md) and the generated man pages (\*.1 files) after editing! + +### Translation + +To translate the man pages into a new language, create a new subdirectory here +with the translated files and add it to the `manPageLanguages` list in +[`dist/unix/CMakeLists.txt`](../dist/unix/CMakeLists.txt). diff --git a/doc/qbittorrent-nox.1 b/doc/en/qbittorrent-nox.1 similarity index 100% rename from doc/qbittorrent-nox.1 rename to doc/en/qbittorrent-nox.1 diff --git a/doc/qbittorrent-nox.1.md b/doc/en/qbittorrent-nox.1.md similarity index 100% rename from doc/qbittorrent-nox.1.md rename to doc/en/qbittorrent-nox.1.md diff --git a/doc/qbittorrent.1 b/doc/en/qbittorrent.1 similarity index 100% rename from doc/qbittorrent.1 rename to doc/en/qbittorrent.1 diff --git a/doc/qbittorrent.1.md b/doc/en/qbittorrent.1.md similarity index 100% rename from doc/qbittorrent.1.md rename to doc/en/qbittorrent.1.md diff --git a/doc/ru/qbittorrent-nox.1 b/doc/ru/qbittorrent-nox.1 new file mode 100644 index 000000000..7eccb73c5 --- /dev/null +++ b/doc/ru/qbittorrent-nox.1 @@ -0,0 +1,6 @@ +.TH "QBITTORRENT-NOX" "1" "16 января 2010" "Клиент сети БитТоррент для командной строки" "" +.SH НАЗВАНИЕ +.PP +qBittorrent-nox \[em] клиент сети БитТоррент для командной строки. +.SH АВТОРЫ +Christophe Dumez diff --git a/doc/ru/qbittorrent-nox.1.md b/doc/ru/qbittorrent-nox.1.md new file mode 100644 index 000000000..0122e6de7 --- /dev/null +++ b/doc/ru/qbittorrent-nox.1.md @@ -0,0 +1,6 @@ +% QBITTORRENT-NOX(1) Клиент сети БитТоррент для командной строки +% Christophe Dumez +% 16 января 2010 + +# НАЗВАНИЕ +qBittorrent-nox — клиент сети БитТоррент для командной строки. diff --git a/doc/ru/qbittorrent.1 b/doc/ru/qbittorrent.1 new file mode 100644 index 000000000..413595ac8 --- /dev/null +++ b/doc/ru/qbittorrent.1 @@ -0,0 +1,6 @@ +.TH "QBITTORRENT" "1" "16 января 2010" "Клиент сети БитТоррент" "" +.SH НАЗВАНИЕ +.PP +qBittorrent \[em] клиент сети БитТоррент. +.SH АВТОРЫ +Christophe Dumez diff --git a/doc/ru/qbittorrent.1.md b/doc/ru/qbittorrent.1.md new file mode 100644 index 000000000..f010e5f9b --- /dev/null +++ b/doc/ru/qbittorrent.1.md @@ -0,0 +1,6 @@ +% QBITTORRENT(1) Клиент сети БитТоррент +% Christophe Dumez +% 16 января 2010 + +# НАЗВАНИЕ +qBittorrent — клиент сети БитТоррент.