summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rwxr-xr-xdata/gendoc/gendoc.pl72
-rw-r--r--translations/messages/kvirc/ru.po26
3 files changed, 77 insertions, 26 deletions
diff --git a/Makefile.am b/Makefile.am
index 40e3178f..db354d3d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -61,10 +61,7 @@ messages:
docs:
$(mkinstalldirs) $(DESTDIR)$(helpdir)
- perl data/gendoc/gendoc.pl -v $(VERSION) $(DESTDIR)$(helpdir) \
- data/doctemplates/*.template \
- `find ./ -name "*.cpp" -print` \
- `find ./ -name "*.h" -print`
+ perl data/gendoc/gendoc.pl -v $(VERSION) $(DESTDIR)$(helpdir) data/doctemplates .
###############################################################################
# Rule for developer documentation
diff --git a/data/gendoc/gendoc.pl b/data/gendoc/gendoc.pl
index 14b0aeb8..2046597c 100755
--- a/data/gendoc/gendoc.pl
+++ b/data/gendoc/gendoc.pl
@@ -59,10 +59,12 @@ sub usage
{
print "\n";
print "Usage:\n";
- print " gendoc.pl [-v <kvirc_version>] <target_dir> <file1> <file2> ...\n";
+ print " gendoc.pl [-v <kvirc_version>] <target_dir> <template_dir> <source_dir> [<build_dir>]\n";
print "Parameters:\n";
print " <target_dir> : directory where the doc files should be written\n";
- print " <file1> <file2> ...: a list of files from which to extract docs\n";
+ print " <template_dir> : directory where the template files will be read from\n";
+ print " <source_dir> : directory where the source .h/.cpp files will be read from\n";
+ print " <build_dir> : optional directory where the built .h/.cpp files will be read from\n";
print "Options:\n";
print " -v forces the specified version to be displayed in the\n";
print " generated documents\n";
@@ -94,19 +96,71 @@ while($cont)
$g_directory = $ARGV[$i];
$i++;
+$g_template_dir = $ARGV[$i];
+$i++;
+$g_source_dir = $ARGV[$i];
+$i++;
+$g_build_dir = $ARGV[$i];
+$i++;
-if($g_directory eq "")
+if($g_directory eq "" or $g_template_dir eq "" or $g_source_dir eq "")
{
usage();
- die "Missing target directory";
+ die "At least one required directory has not been specified";
}
-$j = 0;
-while($ARGV[$i] ne "")
+#################################################################################################
+# FILE TO PROCESS
+#################################################################################################
+
+
+use File::Find;
+use Cwd 'realpath';
+
+my @g_filesToProcess;
+
+find(
+ sub
+ {
+ return unless -f $_; # only regular files
+ return unless /\.template$/; # only template files
+ push @g_filesToProcess, $File::Find::dir . '/' . $_;
+ },
+ $g_template_dir
+);
+
+find(
+ sub
+ {
+ return unless -f $_; # only regular files
+ return unless /\.(cpp|h)$/; # only .cpp or .h files
+ push @g_filesToProcess, $File::Find::dir . '/' . $_;
+ },
+ $g_source_dir
+);
+
+if($g_build_dir ne "")
{
- $g_filesToProcess[$j] = $ARGV[$i];
- $j++;
- $i++;
+ $l_source_dir = realpath($g_source_dir);
+ $l_build_dir = realpath($g_build_dir);
+
+ # Normalize trailing slash (except for root)
+ $l_source_dir =~ s{/$}{} unless $l_source_dir eq '/';
+ $l_build_dir =~ s{/$}{} unless $l_build_dir eq '/';
+
+ if ($l_build_dir ne $l_source_dir && index($l_build_dir, "$l_source_dir/") != 0)
+ {
+ # Search build dir only if it is not a subfolder of the source dir
+ find(
+ sub
+ {
+ return unless -f $_; # only regular files
+ return unless /\.(cpp|h)$/; # only .cpp or .h files
+ push @g_filesToProcess, $File::Find::dir . '/' . $_;
+ },
+ $g_build_dir
+ );
+ }
}
diff --git a/translations/messages/kvirc/ru.po b/translations/messages/kvirc/ru.po
index fb411701..647e4995 100644
--- a/translations/messages/kvirc/ru.po
+++ b/translations/messages/kvirc/ru.po
@@ -15,7 +15,7 @@ msgstr ""
"Project-Id-Version: kvirc_ru\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-03 18:20+0000\n"
-"PO-Revision-Date: 2026-01-11 02:51+0000\n"
+"PO-Revision-Date: 2026-02-18 18:51+0000\n"
"Last-Translator: Andrei Stepanov <adem4ik@gmail.com>\n"
"Language-Team: Russian <https://mirror.git.trinitydesktop.org/weblate/"
"projects/applications/kvirc/ru/>\n"
@@ -23,8 +23,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
+"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.18.2\n"
"10<=4 && (n%100<10 || n%100>=20) ? 1: 2);\n"
@@ -1808,7 +1808,7 @@ msgstr "Действие обратной совместимости для tool
#: src/kvirc/kernel/kvi_iconmanager.cpp:362
msgid "Icon Table"
-msgstr "Таблица Иконок"
+msgstr "Таблица значков"
#: src/kvirc/kernel/kvi_ircconnection.cpp:158
msgid "Failed to set the encoding to %Q: mapping not available."
@@ -3650,7 +3650,7 @@ msgstr "Кнопка окна '%Q' не найдена"
#: src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp:475
#: src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp:440
msgid "Can't find the icon '%Q'"
-msgstr "Не найдена иконка '%Q"
+msgstr "Не найден значок «%Q»"
#: src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp:532
#: src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp:540
@@ -4811,11 +4811,11 @@ msgstr "Битое условие в установке меню: принима
#: src/kvirc/kvs/kvi_kvs_popupmenu.cpp:220
msgid "Broken icon parameter: ignoring"
-msgstr "Битый аргумент иконки: проигнорировано"
+msgstr "Битый аргумент значка: игнорируется"
#: src/kvirc/kvs/kvi_kvs_popupmenu.cpp:228
msgid "Can't find the icon \"%Q\": ignoring"
-msgstr "Не могу найти иконку \"%Q\": проигнорировано"
+msgstr "Не удаётся найти значок «%Q»: игнорируется"
#: src/kvirc/kvs/kvi_kvs_popupmenu.cpp:244
msgid "Broken text parameter: assuming empty string"
@@ -6631,7 +6631,7 @@ msgstr "Выбрать всё"
#: src/kvirc/ui/kvi_input.cpp:837
msgid "Insert Icon"
-msgstr "Вставить иконку"
+msgstr "Вставить значок"
#: src/kvirc/ui/kvi_input.cpp:1847
msgid "%d matches: %Q"
@@ -7083,11 +7083,11 @@ msgstr "&Справка"
#: src/kvirc/ui/kvi_menubar.cpp:113
msgid "&Help Browser (Panel)"
-msgstr "Броузер &помощи (панель)"
+msgstr "Браузер &справки (панель)"
#: src/kvirc/ui/kvi_menubar.cpp:115
msgid "Help Browser (&Window)"
-msgstr "Броузер помощи (&окно)"
+msgstr "Браузер справки (&окно)"
#: src/kvirc/ui/kvi_menubar.cpp:118
msgid "&Tip of the Day"
@@ -7173,7 +7173,7 @@ msgstr "&Другой..."
#: src/kvirc/ui/kvi_menubar.cpp:299
msgid "Show &Icon Table"
-msgstr "Показать таблицу &иконок"
+msgstr "Показать таблицу &значков"
#: src/kvirc/ui/kvi_menubar.cpp:302
msgid "Open &Terminal"
@@ -7481,7 +7481,7 @@ msgstr "Плоский"
#: src/kvirc/ui/kvi_toolbar.cpp:91
msgid "Icon Size"
-msgstr "Размер иконок"
+msgstr "Размер значков"
#: src/kvirc/ui/kvi_toolbar.cpp:93
msgid "Small (22x22)"
@@ -8716,7 +8716,7 @@ msgstr "Пропущена закрывающая кавычка"
#: src/modules/help/helpwindow.cpp:292
msgid "Help Browser"
-msgstr "Броузер помощи"
+msgstr "Браузер справки"
#: src/modules/help/index.cpp:471
msgid "Untitled"