mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix to reduce the rate to prenent 503 error
This commit is contained in:
@@ -424,6 +424,9 @@ sub translate
|
||||
# Replace language code to match what translator expects
|
||||
$target =~ s/_/-/;
|
||||
|
||||
# Prevent service unavailable error
|
||||
sleep 1;
|
||||
|
||||
my $tr;
|
||||
my $rsp = "https://translation.googleapis.com/language/translate/v2?q=@{[urlize($value)]}";
|
||||
my $rsh = { 'Authorization' => "Bearer \"@{[trim($token)]}\"",
|
||||
|
||||
Reference in New Issue
Block a user