From: Dessalines Date: Sun, 25 Aug 2019 00:58:55 +0000 (-0700) Subject: Nicening translation report. X-Git-Url: http://these/git/%24%7B%60data:application/static/gitweb.js?a=commitdiff_plain;h=ccb58f6ff28a912af44226f05b90629b36ca86d9;p=lemmy.git Nicening translation report. --- diff --git a/README.md b/README.md index 7b0ebb4e..278a90c6 100644 --- a/README.md +++ b/README.md @@ -167,14 +167,15 @@ If you'd like to add translations, take a look a look at the [english translatio ### Report -lang | missing | percent +lang | done | missing --- | --- | --- -es | cross_posts,cross_post,by,to,transfer_community,transfer_site | 96% -de | cross_posts,cross_post,users,settings,subscribed,expires,nsfw,show_nsfw,crypto,monero,joined,by,to,transfer_community,transfer_site | 91% -zh | cross_posts,cross_post,users,settings,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site | 93% -fr | cross_posts,cross_post,users,settings,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site | 93% -sv | cross_posts,cross_post,settings,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site | 94% -ru | cross_posts,cross_post,monero,by,to,transfer_community,transfer_site | 96% +de | 91% | cross_posts,cross_post,users,settings,subscribed,expires,nsfw,show_nsfw,crypto,monero,joined,by,to,transfer_community,transfer_site +es | 96% | cross_posts,cross_post,by,to,transfer_community,transfer_site +fr | 93% | cross_posts,cross_post,users,settings,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site +ru | 96% | cross_posts,cross_post,monero,by,to,transfer_community,transfer_site +sv | 94% | cross_posts,cross_post,settings,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site +zh | 93% | cross_posts,cross_post,users,settings,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site + ## Credits diff --git a/ui/translation_report.ts b/ui/translation_report.ts index 41d0401e..26994948 100644 --- a/ui/translation_report.ts +++ b/ui/translation_report.ts @@ -7,23 +7,23 @@ import { sv } from './src/translations/sv'; import { ru } from './src/translations/ru'; let files = [ - {t: es, n: 'es'}, {t: de, n: 'de'}, - {t: zh, n: 'zh'}, + {t: es, n: 'es'}, {t: fr, n: 'fr'}, - {t: sv, n: 'sv'}, {t: ru, n: 'ru'}, + {t: sv, n: 'sv'}, + {t: zh, n: 'zh'}, ]; let masterKeys = Object.keys(en.translation); -let report = 'lang | missing | percent\n'; +let report = 'lang | done | missing\n'; report += '--- | --- | ---\n'; for (let file of files) { let keys = Object.keys(file.t.translation); let pct: number = (keys.length / masterKeys.length * 100); let missing = difference(masterKeys, keys); - report += `${file.n} | ${missing} | ${pct.toFixed(0)}%\n`; + report += `${file.n} | ${pct.toFixed(0)}% | ${missing} \n`; } console.log(report);