mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-02 04:53:17 +00:00
locales: Change translate API to handle rate limit
Also add catch block to log possible errors.
This commit is contained in:
committed by
Akash Nimare
parent
77a1fc0bd3
commit
d99cc0d49c
@@ -1,4 +1,4 @@
|
||||
const translate = require('google-translate-api');
|
||||
const translate = require('@vitalets/google-translate-api');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
@@ -26,5 +26,7 @@ for (let locale in supportedLocales) {
|
||||
|
||||
writeJSON(localeFile, translationJSON);
|
||||
console.log(`create: ${localeFile}`);
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user