6917af41ce1c — Peter Bowman 5 years ago
Avoid using {{audioUS}} with non-US English, add support for {{audioAU}}
1 files changed, 8 insertions(+), 3 deletions(-)

M beaubot/bot/wikt-pronun.pl
M beaubot/bot/wikt-pronun.pl +8 -3
@@ 25,13 25,13 @@ my $api = $bot->getApi;
 my $commonsApi = $bot->getApi( "wikimedia", "commons" );
 $commonsApi->checkAccount;
 
-my @audioTemplates = ( 'audio', 'audioUS', 'audioUK', 'audioCA', 'audioAT' );
-my $reAudioTemplate = qr/audio(?:CA|US|UK|AT)?/i;
+my @audioTemplates = ( 'audio', 'audioUS', 'audioUK', 'audioCA', 'audioAT', 'audioAU' );
+my $reAudioTemplate = qr/audio(?:CA|US|UK|AT|AU)?/i;
 
 my $maxRecordingLength = 10;
 my @groups             = (     #
 	{
-		regex    => qr/^en[ _-](?:us|boston[ _-]us|nz|aus?|br|sa)[ _-]/i,
+		regex    => qr/^en[ _-](?:us|boston[ _-]us)[ _-]/i,
 		language => 'angielski',
 		template => 'audioUS',
 	},

          
@@ 41,6 41,11 @@ my @groups             = (     #
 		template => 'audioCA',
 	},
 	{
+		regex    => qr/^en[ _-]aus?[ _-]/i,
+		language => 'angielski',
+		template => 'audioAU',
+	},
+	{
 		regex    => qr/^en[ _-](?:uk|gb)[ _-]/i,
 		language => 'angielski',
 		template => 'audioUK',