mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-06 03:59:31 +01:00
applets/wiktionary.pl: show list of languages when entry is not found
Requires latest version of https://github.com/pragma-/WiktionaryParser
This commit is contained in:
parent
9b1687d46c
commit
da75397b51
5
applets/wiktionary.pl
vendored
5
applets/wiktionary.pl
vendored
@ -105,6 +105,11 @@ if ($ENV{DEBUG}) {
|
|||||||
print Dumper($entries), "\n";
|
print Dumper($entries), "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (@$entries && ref $entries->[0] ne 'HASH') {
|
||||||
|
print "No entry for `$term` found in $lang; entries found in ", (join ', ', @$entries), "\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
my @valid_sections = qw/definitions etymology pronunciations participle/;
|
my @valid_sections = qw/definitions etymology pronunciations participle/;
|
||||||
|
|
||||||
if (not grep { $_ eq $section } @valid_sections) {
|
if (not grep { $_ eq $section } @valid_sections) {
|
||||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4758,
|
BUILD_REVISION => 4759,
|
||||||
BUILD_DATE => "2024-06-08",
|
BUILD_DATE => "2024-06-08",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user