Better handling of language wildcards
English (langcode `en`) no longer needs to be specified alongside the wildcard; `generate.pl` now handles wildcard langcodes properly and will add both the plain URL for English and the wildcard URL to match every other language
This commit is contained in:
parent
635be25f94
commit
4d5e0c7883
|
@ -13,9 +13,12 @@ my @list;
|
||||||
foreach my $wiki ( keys %{$data} ) {
|
foreach my $wiki ( keys %{$data} ) {
|
||||||
foreach my $lang ( @{%{$data}{$wiki}} ) {
|
foreach my $lang ( @{%{$data}{$wiki}} ) {
|
||||||
if ($lang eq 'en') {
|
if ($lang eq 'en') {
|
||||||
push(@list, "*://" . $wiki . ".fandom.com/wiki/*\n")
|
push @list, "*://" . $wiki . ".fandom.com/wiki/*\n"
|
||||||
|
} elsif ($lang eq '*') {
|
||||||
|
push @list, "*://" . $wiki . ".fandom.com/wiki/*\n";
|
||||||
|
push @list, "*://" . $wiki . ".fandom.com/*/wiki/*\n"
|
||||||
} else {
|
} else {
|
||||||
push(@list, "*://" . $wiki . ".fandom.com/" . $lang . "/wiki/*\n")
|
push @list, "*://" . $wiki . ".fandom.com/" . $lang . "/wiki/*\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
list.yml
12
list.yml
|
@ -13,9 +13,9 @@ angrybirds:
|
||||||
animalcrossingpocketcamp:
|
animalcrossingpocketcamp:
|
||||||
[ en ]
|
[ en ]
|
||||||
anime:
|
anime:
|
||||||
[ en, '*' ]
|
[ '*' ]
|
||||||
animanga:
|
animanga:
|
||||||
[ en, '*' ]
|
[ '*' ]
|
||||||
ark:
|
ark:
|
||||||
[ de, en, es, hr, it, ja, ko, nl, pl, pt,
|
[ de, en, es, hr, it, ja, ko, nl, pl, pt,
|
||||||
ru, th, zh ]
|
ru, th, zh ]
|
||||||
|
@ -40,13 +40,13 @@ earthbound:
|
||||||
elderscrolls:
|
elderscrolls:
|
||||||
[ ja ]
|
[ ja ]
|
||||||
emulation:
|
emulation:
|
||||||
[ en, '*']
|
[ '*']
|
||||||
fireemblem:
|
fireemblem:
|
||||||
[ en ]
|
[ en ]
|
||||||
football:
|
football:
|
||||||
[ en ]
|
[ en ]
|
||||||
furry:
|
furry:
|
||||||
[ en, '*' ]
|
[ '*' ]
|
||||||
genshin-impact:
|
genshin-impact:
|
||||||
[ en, ja, zh ]
|
[ en, ja, zh ]
|
||||||
gta:
|
gta:
|
||||||
|
@ -88,7 +88,7 @@ nonbinary:
|
||||||
oldschoolrunescape:
|
oldschoolrunescape:
|
||||||
[ en ]
|
[ en ]
|
||||||
otaku:
|
otaku:
|
||||||
[ en, '*' ]
|
[ '*' ]
|
||||||
pagan:
|
pagan:
|
||||||
[ en ]
|
[ en ]
|
||||||
pikmin:
|
pikmin:
|
||||||
|
@ -98,7 +98,7 @@ podcasts:
|
||||||
pokemon:
|
pokemon:
|
||||||
[ de, en, es, fr, it, ja, ko, zh ]
|
[ de, en, es, fr, it, ja, ko, zh ]
|
||||||
religion:
|
religion:
|
||||||
[ en, '*' ]
|
[ '*' ]
|
||||||
runescape:
|
runescape:
|
||||||
[ en ]
|
[ en ]
|
||||||
sidem:
|
sidem:
|
||||||
|
|
Loading…
Reference in New Issue