mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
feat(website): add translation progress (#2113)
* feat(website): add translation progress * feat(website): add French and Portuguese to language list Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
co-authored by
Lea Anthony
parent
91de3ab0c5
commit
51a12131a4
+257
-244
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,7 @@
|
||||
"crowdin:sync": "docusaurus write-translations && crowdin upload && crowdin download"
|
||||
},
|
||||
"dependencies": {
|
||||
"@crowdin/crowdin-api-client": "^1.19.2",
|
||||
"@docusaurus/core": "^2.1.0",
|
||||
"@docusaurus/preset-classic": "^2.1.0",
|
||||
"@docusaurus/theme-search-algolia": "^2.1.0",
|
||||
|
||||
Generated
+2999
-2753
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
const crowdin = require("@crowdin/crowdin-api-client");
|
||||
|
||||
// initialization of crowdin client
|
||||
const { translationStatusApi } = new crowdin.default({
|
||||
token: process.env.CROWDIN_PERSONAL_TOKEN,
|
||||
});
|
||||
|
||||
async function getTranslationProgress() {
|
||||
let translationProgress = {};
|
||||
|
||||
await translationStatusApi.getProjectProgress(531392).then((res) => {
|
||||
for (const item of res.data) {
|
||||
translationProgress[item.data.languageId] = item.data.approvalProgress;
|
||||
}
|
||||
});
|
||||
|
||||
return translationProgress;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getTranslationProgress,
|
||||
};
|
||||
Reference in New Issue
Block a user