From 939c03d4ba6a64c8a94356cb39b6125b24a6360e Mon Sep 17 00:00:00 2001 From: WaitSpring <98642411+WaitSpringQW@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:18:25 +0800 Subject: [PATCH] refactor(QueryContributors): add anoncontributors (#1653) * refactor(QueryContributors): add anoncontributors --- dist/QueryContributors/QueryContributors.js | 41 ++++++++++--------- .../modules/getContributors.ts | 25 +++++++---- src/QueryContributors/modules/i18n.ts | 5 +++ 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/dist/QueryContributors/QueryContributors.js b/dist/QueryContributors/QueryContributors.js index 34169f515..ce9d08a09 100644 --- a/dist/QueryContributors/QueryContributors.js +++ b/dist/QueryContributors/QueryContributors.js @@ -162,6 +162,11 @@ var getI18nMessages = () => { Period: (0, import_ext_gadget.localize)({ en: ".", zh: "。" + }), + "Other anonymous contributors": (0, import_ext_gadget.localize)({ + en: "other $1 anonymous contributor(s)", + "zh-hans": "其他$1位匿名贡献者", + "zh-hant": "其他$1位匿名貢獻者" }) }; }; @@ -245,26 +250,24 @@ var getContributors = /* @__PURE__ */ function() { var _iterator2 = _createForOfIteratorHelper(data["query"].pages), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { - var _contributors$; const page = _step2.value; - const { - contributors - } = page; - if (!contributors || !contributors.length || !((_contributors$ = contributors[0]) !== null && _contributors$ !== void 0 && _contributors$.name)) { - continue; - } - var _iterator3 = _createForOfIteratorHelper(contributors), _step3; - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) { - const { - name - } = _step3.value; - pclist[pclist.length] = name; + if (page !== null && page !== void 0 && page.contributors) { + var _iterator3 = _createForOfIteratorHelper(page.contributors), _step3; + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) { + const contributor = _step3.value; + if (contributor !== null && contributor !== void 0 && contributor.name) { + pclist[pclist.length] = contributor.name; + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); + } + if (page !== null && page !== void 0 && page.anoncontributors) { + pclist[pclist.length] = getMessage("Other anonymous contributors").replace("$1", "".concat(page.anoncontributors)); } } } catch (err) { @@ -321,4 +324,4 @@ var getContributors = /* @__PURE__ */ function() { /* */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsic3JjL1F1ZXJ5Q29udHJpYnV0b3JzL29wdGlvbnMuanNvbiIsICJzcmMvUXVlcnlDb250cmlidXRvcnMvbW9kdWxlcy9hcHBlbmRFbGVtZW50LnRzeCIsICJzcmMvUXVlcnlDb250cmlidXRvcnMvbW9kdWxlcy9pMThuLnRzIiwgInNyYy9RdWVyeUNvbnRyaWJ1dG9ycy9tb2R1bGVzL2FwaS50cyIsICJzcmMvUXVlcnlDb250cmlidXRvcnMvbW9kdWxlcy9xdWVyeUNvbnRyaWJ1dG9ycy50cyIsICJzcmMvUXVlcnlDb250cmlidXRvcnMvbW9kdWxlcy9nZXRDb250cmlidXRvcnMudHMiLCAic3JjL1F1ZXJ5Q29udHJpYnV0b3JzL1F1ZXJ5Q29udHJpYnV0b3JzLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJ7XG5cdFwibW91bnRQb2ludFNlbGVjdG9yXCI6IFwiI2Zvb3Rlci1pbmZvLC5wYWdlLWluZm9cIixcblx0XCJ2ZXJzaW9uXCI6IFwiMS4wXCJcbn1cbiIsICJpbXBvcnQgKiBhcyBPUFRJT05TIGZyb20gJy4uL29wdGlvbnMuanNvbic7XG5pbXBvcnQgUmVhY3QsIHtSZWFjdEVsZW1lbnR9IGZyb20gJ2V4dC5nYWRnZXQuUmVhY3QnO1xuaW1wb3J0IHtnZXRNZXNzYWdlfSBmcm9tICcuL2kxOG4nO1xuXG5jb25zdCBzYW5pdGl6ZSA9IChzdHJpbmc6IHN0cmluZykgPT5cblx0c3RyaW5nXG5cdFx0LnJlcGxhY2UoLyYvZywgJyZhbXA7Jylc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uIiwgImZvcm1hdCIsICJmb3JtYXR2ZXJzaW9uIiwgInByb3AiLCAicGNleGNsdWRlZ3JvdXAiLCAicGNsaW1pdCIsICJzbWF4YWdlIiwgIm1heGFnZSIsICJyZXNwb25zZSIsICJfeCIsICJfeDIiLCAiYXBwbHkiLCAiYXJndW1lbnRzIiwgImltcG9ydF9leHRfZ2FkZ2V0NCIsICJnZXRDb250cmlidXRvcnMiLCAiX3JlZjIiLCAicGNsaXN0IiwgImRhdGEiLCAiX2RhdGEkcXVlcnkiLCAiX2RhdGEkY29udGludWUiLCAicGFnZXMiLCAiX2l0ZXJhdG9yMiIsICJfY3JlYXRlRm9yT2ZJdGVyYXRvckhlbHBlciIsICJfc3RlcDIiLCAicyIsICJuIiwgImRvbmUiLCAicGFnZSIsICJ2YWx1ZSIsICJjb250cmlidXRvcnMiLCAiX2l0ZXJhdG9yMyIsICJfc3RlcDMiLCAiY29udHJpYnV0b3IiLCAibmFtZSIsICJlcnIiLCAiZSIsICJmIiwgImFub25jb250cmlidXRvcnMiLCAidW5pcXVlQXJyYXkiLCAiX3gzIiwgIndnQWN0aW9uIiwgIndnQXJ0aWNsZUlkIiwgIndnQ3VyUmV2aXNpb25JZCIsICJ3Z1BhZ2VOYW1lIiwgIndnUmV2aXNpb25JZCIsICJxdWVyeUNvbnRyaWJ1dG9zIiwgIl9xdWVyeUNvbnRyaWJ1dG9zIl0KfQo= diff --git a/src/QueryContributors/modules/getContributors.ts b/src/QueryContributors/modules/getContributors.ts index da0a3832e..35fbd9390 100644 --- a/src/QueryContributors/modules/getContributors.ts +++ b/src/QueryContributors/modules/getContributors.ts @@ -1,3 +1,4 @@ +import {getMessage} from './i18n'; import {queryContributors} from './queryContributors'; import {uniqueArray} from 'ext.gadget.Util'; @@ -10,17 +11,23 @@ const getContributors = async (titles: string) => { try { if (data['query']?.pages) { - for (const page of data['query'].pages) { - const {contributors} = page as { - contributors: {userid: number; name: string}[]; - }; - - if (!contributors || !contributors.length || !contributors[0]?.name) { - continue; + for (const page of data['query'].pages as { + anoncontributors: number; + contributors: {userid: number; name: string}[]; + }[]) { + if (page?.contributors) { + for (const contributor of page.contributors) { + if (contributor?.name) { + pclist[pclist.length] = contributor.name; + } + } } - for (const {name} of contributors) { - pclist[pclist.length] = name; + if (page?.anoncontributors) { + pclist[pclist.length] = getMessage('Other anonymous contributors').replace( + '$1', + `${page.anoncontributors}` + ); } } } else { diff --git a/src/QueryContributors/modules/i18n.ts b/src/QueryContributors/modules/i18n.ts index 75d45f0b5..cff3d5157 100644 --- a/src/QueryContributors/modules/i18n.ts +++ b/src/QueryContributors/modules/i18n.ts @@ -16,6 +16,11 @@ const getI18nMessages = () => { en: '.', zh: '。', }), + 'Other anonymous contributors': localize({ + en: 'other $1 anonymous contributor(s)', + 'zh-hans': '其他$1位匿名贡献者', + 'zh-hant': '其他$1位匿名貢獻者', + }), }; };