mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 06:41:18 +00:00
Nicening translation report.
This commit is contained in:
parent
5497269d3b
commit
b80d712ac4
2 changed files with 13 additions and 12 deletions
15
README.md
vendored
15
README.md
vendored
|
@ -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
|
||||
|
||||
|
|
10
ui/translation_report.ts
vendored
10
ui/translation_report.ts
vendored
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue