Skip to content

Instantly share code, notes, and snippets.

@minorua
Created December 1, 2017 04:08
Show Gist options
  • Save minorua/fe1ff7c04d13ada48ade8a2e2892d156 to your computer and use it in GitHub Desktop.
Save minorua/fe1ff7c04d13ada48ade8a2e2892d156 to your computer and use it in GitHub Desktop.
[QGIS-tr] 翻訳集計スクリプト (年別翻訳者別)
// 翻訳集計スクリプト (年別翻訳者別)
// 1. 翻訳者情報付き翻訳データを取得(ブラウザで表示)
// https://www.transifex.com/api/2/project/QGIS/resource/qgis-application/translation/ja/strings/?details&last_update&user
// 2. ブラウザのコンソールで次のスクリプトを実行
var aggr = {};
JSON.parse(document.body.innerText).forEach(function (msg) {
var year = msg.last_update.substr(0, 4);
aggr[year] = aggr[year] || {total: 0};
aggr[year][msg.user] = (aggr[year][msg.user] || 0) + 1;
aggr[year].total++;
});
console.log(aggr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment