Compare commits

..

2 Commits

Author SHA1 Message Date
Kornel Benko
f784f3fe6f Update sk.po 2024-11-07 14:18:12 +01:00
Kornel Benko
695b2f485c Cmake tests: Add test for possible wrong used constants in our ui-files 2024-11-07 14:16:03 +01:00
3 changed files with 91 additions and 5 deletions

View File

@ -127,3 +127,9 @@ if (LYX_ENABLE_EXPORT_TESTS)
message(STATUS "Number of ignored export tests now ${lyx_ignored_count}")
set(LYX_ignored_count ${lyx_ignored_count} PARENT_SCOPE)
endif()
set(CHECK_QT_CONSTANTS_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/checkQtConstants.pl")
add_test(NAME "check_Qt_ui_Constants"
WORKING_DIRECTORY ${TOP_SRC_DIR}
COMMAND ${PERL_EXECUTABLE} ${CHECK_QT_CONSTANTS_SCRIPT}
)

View File

@ -0,0 +1,64 @@
#! /usr/bin/env perl
# -*- mode: perl; -*-
#
use strict;
use warnings;
BEGIN {
use File::Spec;
my $p = File::Spec->rel2abs(__FILE__);
$p =~ s/[\/\\]?[^\/\\]+$//;
unshift(@INC, "$p");
}
my $no_founds = 0;
sub checkConstants($);
sub collectUiFiles($$);
my @UIFiles = ();
collectUiFiles('.', \@UIFiles);
for my $ui (@UIFiles) {
checkConstants($ui);
}
exit($no_founds);
###########################################
sub checkConstants($) {
my ($ui) = @_;
#print "Checking $ui\n";
if (open(my $FI, '<', $ui)) {
my $lineno = 0;
while (my $l = <$FI>) {
$lineno += 1;
if ($l =~ /\bQ[a-zA-Z]+\:\:[a-zA-Z]+\:\:/) {
print "$ui:$lineno $l";
$no_founds += 1;
}
}
close($FI);
}
}
# Recursive collect UI files
sub collectUiFiles($$) {
my ($dir, $rFiles) = @_;
my @subdirs = ();
if (opendir(my $DI, $dir)) {
while (my $f = readdir($DI)) {
if (-d "$dir/$f") {
next if ($f =~ /^\.(\.)?$/);
push(@subdirs, "$dir/$f");
}
elsif ($f =~ /\.ui$/) {
push(@{$rFiles}, "$dir/$f");
}
}
closedir($DI);
}
for my $d (@subdirs) {
collectUiFiles($d, $rFiles);
}
}

View File

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: LyX-2.5\n"
"Report-Msgid-Bugs-To: lyx-devel@lists.lyx.org\n"
"POT-Creation-Date: 2024-10-24 11:49+0200\n"
"PO-Revision-Date: 2024-10-24 10:00+0000\n"
"POT-Creation-Date: 2024-11-01 18:23+0100\n"
"PO-Revision-Date: 2024-11-01 17:45+0000\n"
"Last-Translator: Kornel Benko <kornel@lyx.org>\n"
"Language-Team: Slovak <kornel@lyx.org>\n"
"Language: sk\n"
@ -3449,9 +3449,9 @@ msgstr "Píš CSS do súboru"
msgid "Format to use for math output."
msgstr "Formát na použitie pre výstup matematiky."
#: src/frontends/qt/ui/OutputUi.ui:204
msgid "MathML"
msgstr "MathML"
#: src/frontends/qt/ui/OutputUi.ui:293
msgid "MathML Core (default)"
msgstr "Základné MathML (štandard)"
#: src/frontends/qt/ui/OutputUi.ui:209 src/frontends/qt/ui/OutputUi.ui:401
msgid "HTML"
@ -3465,6 +3465,10 @@ msgstr "HTML|H"
msgid "Images"
msgstr "Obrázky"
#: src/frontends/qt/ui/OutputUi.ui:313
msgid "MathML 3"
msgstr "MathML 3"
#: src/frontends/qt/ui/OutputUi.ui:219 lib/layouts/aapaper.layout:63
#: lib/layouts/egs.layout:720 lib/languages:147
#: src/frontends/qt/GuiDocument.cpp:1661 src/frontends/qt/GuiErrorList.cpp:50
@ -3516,6 +3520,18 @@ msgstr "Výstup pre tabu&ľku:"
msgid "CALS"
msgstr "CALS"
#: src/frontends/qt/ui/OutputUi.ui:457
msgid "MathML &version:"
msgstr "Ver&zia MathML:"
#: src/frontends/qt/ui/OutputUi.ui:484
msgid "MathML 3 (default)"
msgstr "MathML 3 (štandard)"
#: src/frontends/qt/ui/OutputUi.ui:489
msgid "MathML Core"
msgstr "Základné MathML"
#: src/frontends/qt/ui/OutputUi.ui:419
msgid "&MathML namespace prefix:"
msgstr "M&athML prefix pre oblasť mien:"