mirror of
https://github.com/System-End/github-readme-stats.git
synced 2026-04-20 00:35:23 +00:00
This commit prevents confusion about the Contributed to stat. Currently, only the last year's results are shown, but it looks like it is the all-time contribution count (see #2269). This commit adds a ' (last year)' suffix to prevent this confusion from happening.
This commit is contained in:
parent
0efb982c2a
commit
ad3726ee49
2 changed files with 3 additions and 3 deletions
|
|
@ -154,7 +154,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
|||
},
|
||||
contribs: {
|
||||
icon: icons.contribs,
|
||||
label: i18n.t("statcard.contribs"),
|
||||
label: i18n.t("statcard.contribs") + " (last year)",
|
||||
value: contributedTo,
|
||||
id: "contribs",
|
||||
},
|
||||
|
|
@ -186,7 +186,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
|||
index,
|
||||
showIcons: show_icons,
|
||||
shiftValuePos:
|
||||
(!include_all_commits ? 50 : 35) + (isLongLocale ? 50 : 0),
|
||||
(!include_all_commits ? 79.01 : 35) + (isLongLocale ? 50 : 0),
|
||||
bold: text_bold,
|
||||
}),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ describe("Test renderStatsCard", () => {
|
|||
document.querySelector(
|
||||
'g[transform="translate(0, 100)"]>.stagger>.stat.bold',
|
||||
).textContent,
|
||||
).toMatchInlineSnapshot(`"参与项目数:"`);
|
||||
).toMatchInlineSnapshot(`"参与项目数 (last year):"`);
|
||||
});
|
||||
|
||||
it("should render without rounding", () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue