forked from mirrored/github-readme-stats
Card Translations: update Italian
This commit is contained in:
@@ -38,7 +38,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
en: "Template",
|
||||
es: "Modelo",
|
||||
fr: "Modèle",
|
||||
it: "Modella",
|
||||
it: "Template",
|
||||
ja: "テンプレート",
|
||||
kr: "주형",
|
||||
"pt-br": "Modelo",
|
||||
@@ -156,18 +156,17 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
`);
|
||||
|
||||
return card.render(`
|
||||
${
|
||||
isTemplate
|
||||
? getBadgeSVG(translations.template[lang] || "Template")
|
||||
: isArchived
|
||||
${isTemplate
|
||||
? getBadgeSVG(translations.template[lang] || "Template")
|
||||
: isArchived
|
||||
? getBadgeSVG(translations.archived[lang] || "Archived")
|
||||
: ""
|
||||
}
|
||||
|
||||
<text class="description" x="25" y="-5">
|
||||
${multiLineDescription
|
||||
.map((line) => `<tspan dy="1.2em" x="25">${encodeHTML(line)}</tspan>`)
|
||||
.join("")}
|
||||
.map((line) => `<tspan dy="1.2em" x="25">${encodeHTML(line)}</tspan>`)
|
||||
.join("")}
|
||||
</text>
|
||||
|
||||
<g transform="translate(0, ${height - 75})">
|
||||
|
||||
@@ -110,7 +110,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
en: "Total Commits",
|
||||
es: "Compromisos totales",
|
||||
fr: "Total des engagements",
|
||||
it: "Impegni totali",
|
||||
it: "Commit totali",
|
||||
ja: "総コミット",
|
||||
kr: "총 커밋",
|
||||
"pt-br": "Total de compromissos",
|
||||
@@ -132,7 +132,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
en: "Total Issues",
|
||||
es: "Problemas totales",
|
||||
fr: "Nombre total de problèmes",
|
||||
it: "Problemi totali",
|
||||
it: "Segnalazioni totali",
|
||||
ja: "総問題",
|
||||
kr: "총 문제",
|
||||
"pt-br": "Total de problemas",
|
||||
@@ -160,9 +160,8 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
},
|
||||
commits: {
|
||||
icon: icons.commits,
|
||||
label: `${translations.commits[lang] || "Total Commits"}${
|
||||
include_all_commits ? "" : ` (${new Date().getFullYear()})`
|
||||
}`,
|
||||
label: `${translations.commits[lang] || "Total Commits"}${include_all_commits ? "" : ` (${new Date().getFullYear()})`
|
||||
}`,
|
||||
value: totalCommits,
|
||||
id: "commits",
|
||||
},
|
||||
@@ -259,10 +258,10 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
|
||||
<svg x="0" y="0">
|
||||
${FlexLayout({
|
||||
items: statItems,
|
||||
gap: lheight,
|
||||
direction: "column",
|
||||
}).join("")}
|
||||
items: statItems,
|
||||
gap: lheight,
|
||||
direction: "column",
|
||||
}).join("")}
|
||||
</svg>
|
||||
`);
|
||||
};
|
||||
|
||||
@@ -11,13 +11,13 @@ const createProgressTextNode = ({ width, color, name, progress }) => {
|
||||
<text data-testid="lang-name" x="2" y="15" class="lang-name">${name}</text>
|
||||
<text x="${progressTextX}" y="34" class="lang-name">${progress}%</text>
|
||||
${createProgressNode({
|
||||
x: 0,
|
||||
y: 25,
|
||||
color,
|
||||
width: progressWidth,
|
||||
progress,
|
||||
progressBarBackgroundColor: "#ddd",
|
||||
})}
|
||||
x: 0,
|
||||
y: 25,
|
||||
color,
|
||||
width: progressWidth,
|
||||
progress,
|
||||
progressBarBackgroundColor: "#ddd",
|
||||
})}
|
||||
`;
|
||||
};
|
||||
|
||||
@@ -70,7 +70,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
||||
theme,
|
||||
layout,
|
||||
custom_title,
|
||||
lang= "en",
|
||||
lang = "en",
|
||||
} = options;
|
||||
|
||||
let langs = Object.values(topLangs);
|
||||
@@ -83,7 +83,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
||||
en: "Most Used Languages",
|
||||
es: "Idiomas más usados",
|
||||
fr: "Langues les plus utilisées",
|
||||
it: "Lingue più utilizzate",
|
||||
it: "Linguaggi più utilizzati",
|
||||
ja: "最もよく使われる言語",
|
||||
kr: "가장 많이 사용되는 언어",
|
||||
"pt-br": "Línguas Mais Usadas",
|
||||
@@ -158,9 +158,8 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
||||
|
||||
finalLayout = `
|
||||
<mask id="rect-mask">
|
||||
<rect x="0" y="0" width="${
|
||||
width - 50
|
||||
}" height="8" fill="white" rx="5" />
|
||||
<rect x="0" y="0" width="${width - 50
|
||||
}" height="8" fill="white" rx="5" />
|
||||
</mask>
|
||||
${compactProgressBar}
|
||||
${createLanguageTextNode({
|
||||
|
||||
+27
-27
@@ -24,14 +24,14 @@ const createTextNode = ({
|
||||
const cardProgress = hideProgress
|
||||
? null
|
||||
: createProgressNode({
|
||||
x: 110,
|
||||
y: 4,
|
||||
progress: percent,
|
||||
color: progressBarColor,
|
||||
width: 220,
|
||||
name: label,
|
||||
progressBarBackgroundColor,
|
||||
});
|
||||
x: 110,
|
||||
y: 4,
|
||||
progress: percent,
|
||||
color: progressBarColor,
|
||||
width: 220,
|
||||
name: label,
|
||||
progressBarBackgroundColor,
|
||||
});
|
||||
|
||||
return `
|
||||
<g class="stagger" style="animation-delay: ${staggerDelay}ms" transform="translate(25, 0)">
|
||||
@@ -81,7 +81,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
en: "No coding activity this week",
|
||||
es: "No hay actividad de codificación esta semana",
|
||||
fr: "Aucune activité de codage cette semaine",
|
||||
it: "Nessuna attività di codifica questa settimana",
|
||||
it: "Nessuna attività in questa settimana",
|
||||
ja: "今週のコーディング活動はありません",
|
||||
kr: "이번 주 코딩 활동 없음",
|
||||
"pt-br": "Nenhuma atividade de codificação esta semana",
|
||||
@@ -101,18 +101,18 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
|
||||
const statItems = languages
|
||||
? languages
|
||||
.filter((language) => language.hours || language.minutes)
|
||||
.map((language) => {
|
||||
return createTextNode({
|
||||
id: language.name,
|
||||
label: language.name,
|
||||
value: language.text,
|
||||
percent: language.percent,
|
||||
progressBarColor: titleColor,
|
||||
progressBarBackgroundColor: textColor,
|
||||
hideProgress: hide_progress,
|
||||
});
|
||||
})
|
||||
.filter((language) => language.hours || language.minutes)
|
||||
.map((language) => {
|
||||
return createTextNode({
|
||||
id: language.name,
|
||||
label: language.name,
|
||||
value: language.text,
|
||||
percent: language.percent,
|
||||
progressBarColor: titleColor,
|
||||
progressBarBackgroundColor: textColor,
|
||||
hideProgress: hide_progress,
|
||||
});
|
||||
})
|
||||
: [];
|
||||
|
||||
// Calculate the card height depending on how many items there are
|
||||
@@ -150,12 +150,12 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
return card.render(`
|
||||
<svg x="0" y="0" width="100%">
|
||||
${FlexLayout({
|
||||
items: statItems.length
|
||||
? statItems
|
||||
: [noCodingActivityNode({ color: textColor, text: translations.noCodingActivity[lang] || "No coding activity this week" })],
|
||||
gap: lheight,
|
||||
direction: "column",
|
||||
}).join("")}
|
||||
items: statItems.length
|
||||
? statItems
|
||||
: [noCodingActivityNode({ color: textColor, text: translations.noCodingActivity[lang] || "No coding activity this week" })],
|
||||
gap: lheight,
|
||||
direction: "column",
|
||||
}).join("")}
|
||||
</svg>
|
||||
`);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user