Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad3726e

Browse files
authored
fix: fix repoContrib confusion (anuraghazra#2269) (anuraghazra#2274)
This commit prevents confusion about the Contributed to stat. Currently,only the last year's results are shown, but it looks like it is theall-time contribution count (seeanuraghazra#2269). This commit adds a ' (last year)'suffix to prevent this confusion from happening.
1 parent0efb982 commitad3726e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎src/cards/stats-card.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
154154
},
155155
contribs:{
156156
icon:icons.contribs,
157-
label:i18n.t("statcard.contribs"),
157+
label:i18n.t("statcard.contribs")+" (last year)",
158158
value:contributedTo,
159159
id:"contribs",
160160
},
@@ -186,7 +186,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
186186
index,
187187
showIcons:show_icons,
188188
shiftValuePos:
189-
(!include_all_commits ?50 :35)+(isLongLocale ?50 :0),
189+
(!include_all_commits ?79.01 :35)+(isLongLocale ?50 :0),
190190
bold:text_bold,
191191
}),
192192
);

‎tests/renderStatsCard.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ describe("Test renderStatsCard", () => {
344344
document.querySelector(
345345
'g[transform="translate(0, 100)"]>.stagger>.stat.bold',
346346
).textContent,
347-
).toMatchInlineSnapshot(`"参与项目数:"`);
347+
).toMatchInlineSnapshot(`"参与项目数 (last year):"`);
348348
});
349349

350350
it("should render without rounding",()=>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp