Note: The stats above are just examples and not from your GitHub profile.
-
-
diff --git a/src/demo/js/script.js b/src/demo/js/script.js
index d164d463..8239318a 100644
--- a/src/demo/js/script.js
+++ b/src/demo/js/script.js
@@ -15,9 +15,11 @@ const preview = {
type: "svg",
exclude_days: "",
card_width: "495",
+ card_height: "195",
hide_total_contributions: "false",
hide_current_streak: "false",
hide_longest_streak: "false",
+ short_numbers: "false",
},
/**
@@ -43,22 +45,32 @@ const preview = {
if (params.type !== "json") {
const repoLink = "https://git.io/streak-stats";
const md = `[](${repoLink})`;
+ const html = `
`;
document.querySelector(".output img").src = demoImageURL;
document.querySelector(".md code").innerText = md;
+ document.querySelector(".html code").innerText = html;
+ document.querySelector(".copy-md").parentElement.style.display = "block";
+ document.querySelector(".copy-html").parentElement.style.display = "block";
document.querySelector(".output img").style.display = "block";
document.querySelector(".output .json").style.display = "none";
+ document.querySelector(".copy-json").parentElement.style.display = "none";
} else {
- document.querySelector(".output img").style.display = "none";
- document.querySelector(".output .json").style.display = "block";
fetch(demoImageURL)
.then((response) => response.json())
.then((data) => (document.querySelector(".output .json pre").innerText = JSON.stringify(data, null, 2)))
.catch(console.error);
- document.querySelector(".md code").innerText = imageURL;
+ document.querySelector(".json code").innerText = imageURL;
+ document.querySelector(".copy-md").parentElement.style.display = "none";
+ document.querySelector(".copy-html").parentElement.style.display = "none";
+ document.querySelector(".output img").style.display = "none";
+ document.querySelector(".output .json").style.display = "block";
+ document.querySelector(".copy-json").parentElement.style.display = "block";
}
// disable copy button if username is invalid
- const copyButton = document.querySelector(".copy-button");
- copyButton.disabled = Boolean(document.querySelector("#user:invalid") || !document.querySelector("#user").value);
+ const copyButtons = document.querySelectorAll(".copy-button");
+ copyButtons.forEach((button) => {
+ button.disabled = Boolean(document.querySelector("#user:invalid") || !document.querySelector("#user").value);
+ });
// disable clear button if no added advanced options
const clearButton = document.querySelector("#clear-button");
clearButton.disabled = !document.querySelectorAll(".minus").length;
@@ -213,6 +225,7 @@ const preview = {
const option = Array.prototype.find.call(selectElement.options, (o) => o.value === property);
selectElement.disabled = false;
option.disabled = false;
+ selectElement.value = option.value;
// update and exit
this.update();
},
@@ -379,7 +392,13 @@ const clipboard = {
copy(el) {
// create input box to copy from
const input = document.createElement("input");
- input.value = document.querySelector(".md code").innerText;
+ if (el.classList.contains("copy-md")) {
+ input.value = document.querySelector(".md code").innerText;
+ } else if (el.classList.contains("copy-html")) {
+ input.value = document.querySelector(".html code").innerText;
+ } else if (el.classList.contains("copy-json")) {
+ input.value = document.querySelector(".json code").innerText;
+ }
document.body.appendChild(input);
// select all
input.select();
diff --git a/src/index.php b/src/index.php
index 41cc4e0b..610543ad 100644
--- a/src/index.php
+++ b/src/index.php
@@ -19,10 +19,11 @@
renderOutput($message, 500);
}
-// set cache to refresh once per hour
-header("Expires: " . gmdate("D, d M Y H:i:s", time() + 3600) . " GMT");
+// set cache to refresh once per three horus
+$cacheMinutes = 3 * 60 * 60;
+header("Expires: " . gmdate("D, d M Y H:i:s", time() + $cacheMinutes) . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
-header("Cache-Control: public, max-age=3600");
+header("Cache-Control: public, max-age=$cacheMinutes");
// redirect to demo site if user is not given
if (!isset($_REQUEST["user"])) {
diff --git a/src/themes.php b/src/themes.php
index 8a4a9e9f..e6fc193d 100644
--- a/src/themes.php
+++ b/src/themes.php
@@ -1575,4 +1575,498 @@
"dates" => "#BAC2DE",
"excludeDaysLabel" => "#BAC2DE",
],
+ "burnt-neon" => [
+ "background" => "#0D1117",
+ "border" => "#98989A",
+ "stroke" => "#98989A",
+ "ring" => "#FE25B1",
+ "fire" => "#622B53",
+ "currStreakNum" => "#FF6906",
+ "sideNums" => "#01FED1",
+ "currStreakLabel" => "#01FED1",
+ "sideLabels" => "#FF6906",
+ "dates" => "#C6AB07",
+ "excludeDaysLabel" => "#A5BC0B",
+ ],
+ "humoris" => [
+ "background" => "#DFAF77",
+ "border" => "#E8E6E4",
+ "stroke" => "#191919",
+ "ring" => "#683C2C",
+ "fire" => "#191419",
+ "currStreakNum" => "#191419",
+ "sideNums" => "#191419",
+ "currStreakLabel" => "#393C3C",
+ "sideLabels" => "#393C3C",
+ "dates" => "#444444",
+ "excludeDaysLabel" => "#444444",
+ ],
+ "shadow-red" => [
+ "background" => "#FFFFFF00",
+ "border" => "#4F0000",
+ "stroke" => "#4F0000",
+ "ring" => "#4F0000",
+ "fire" => "#9A0000",
+ "currStreakNum" => "#B94242",
+ "sideNums" => "#747474",
+ "currStreakLabel" => "#9A0000",
+ "sideLabels" => "#9A0000",
+ "dates" => "#747474",
+ "excludeDaysLabel" => "#B94242",
+ ],
+ "shadow-green" => [
+ "background" => "#FFFFFF00",
+ "border" => "#003D00",
+ "stroke" => "#003D00",
+ "ring" => "#003D00",
+ "fire" => "#007A00",
+ "currStreakNum" => "#4DB942",
+ "sideNums" => "#747474",
+ "currStreakLabel" => "#007A00",
+ "sideLabels" => "#007A00",
+ "dates" => "#747474",
+ "excludeDaysLabel" => "#4DB942",
+ ],
+ "shadow-blue" => [
+ "background" => "#FFFFFF00",
+ "border" => "#004490",
+ "stroke" => "#004450",
+ "ring" => "#004450",
+ "fire" => "#00779A",
+ "currStreakNum" => "#3E6BFF",
+ "sideNums" => "#747474",
+ "currStreakLabel" => "#00779A",
+ "sideLabels" => "#00779A",
+ "dates" => "#747474",
+ "excludeDaysLabel" => "#3E6BFF",
+ ],
+ "shadow-orange" => [
+ "background" => "#FFFFFF00",
+ "border" => "#834400",
+ "stroke" => "#834400",
+ "ring" => "#834400",
+ "fire" => "#BB5502",
+ "currStreakNum" => "#EC861A",
+ "sideNums" => "#747474",
+ "currStreakLabel" => "#BB5502",
+ "sideLabels" => "#BB5502",
+ "dates" => "#747474",
+ "excludeDaysLabel" => "#EC861A",
+ ],
+ "shadow-purple" => [
+ "background" => "#FFFFFF00",
+ "border" => "#570182",
+ "stroke" => "#570182",
+ "ring" => "#570182",
+ "fire" => "#6F42C1",
+ "currStreakNum" => "#CA59FF",
+ "sideNums" => "#747474",
+ "currStreakLabel" => "#6F42C1",
+ "sideLabels" => "#6F42C1",
+ "dates" => "#747474",
+ "excludeDaysLabel" => "#CA59FF",
+ ],
+ "shadow-brown" => [
+ "background" => "#FFFFFF00",
+ "border" => "#31312D",
+ "stroke" => "#31312D",
+ "ring" => "#31312D",
+ "fire" => "#7D6642",
+ "currStreakNum" => "#BB9863",
+ "sideNums" => "#747474",
+ "currStreakLabel" => "#7D6642",
+ "sideLabels" => "#7D6642",
+ "dates" => "#747474",
+ "excludeDaysLabel" => "#BB9863",
+ ],
+ "github-dark-dimmed" => [
+ "background" => "#24292F",
+ "border" => "#373E47",
+ "stroke" => "#539BF5",
+ "ring" => "#539BF5",
+ "currStreakNum" => "#ADBAC7",
+ "fire" => "#539BF5",
+ "sideNums" => "#ADBAC7",
+ "currStreakLabel" => "#539BF5",
+ "sideLabels" => "#539BF5",
+ "dates" => "#ADBAC7",
+ "excludeDaysLabel" => "#78818A",
+ ],
+ "blue-navy" => [
+ "background" => "#000000",
+ "border" => "#FFFFFF",
+ "stroke" => "#82AAFF",
+ "ring" => "#82AAFF",
+ "currStreakNum" => "#82AAFF",
+ "fire" => "#82AAFF",
+ "sideNums" => "#82AAFF",
+ "currStreakLabel" => "#82AAFF",
+ "sideLabels" => "#82AAFF",
+ "dates" => "#82AAFF",
+ "excludeDaysLabel" => "#82AAFF",
+ ],
+ "calm-pink" => [
+ "background" => "#2B2D40",
+ "border" => "#E1BC29",
+ "stroke" => "#E07A5F",
+ "ring" => "#E07A5F",
+ "currStreakNum" => "#EBCFB2",
+ "fire" => "#E07A5F",
+ "sideNums" => "#EBCFB2",
+ "currStreakLabel" => "#E07A5F",
+ "sideLabels" => "#E07A5F",
+ "dates" => "#E1BC29",
+ "excludeDaysLabel" => "#EBCFB2",
+ ],
+ "whatsapp-light" => [
+ "background" => "#FFFFFF",
+ "border" => "#E4E2E2",
+ "stroke" => "#008069",
+ "ring" => "#008069",
+ "fire" => "#121B22",
+ "currStreakNum" => "#16D351",
+ "sideNums" => "#16D351",
+ "currStreakLabel" => "#121B22",
+ "sideLabels" => "#121B22",
+ "dates" => "#73828A",
+ "excludeDaysLabel" => "#73828A",
+ ],
+ "whatsapp-dark" => [
+ "background" => "#121B22",
+ "border" => "#1B2832",
+ "stroke" => "#273741",
+ "ring" => "#273741",
+ "fire" => "#E3E7EA",
+ "currStreakNum" => "#00A884",
+ "sideNums" => "#00A884",
+ "currStreakLabel" => "#E3E7EA",
+ "sideLabels" => "#E3E7EA",
+ "dates" => "#888D90",
+ "excludeDaysLabel" => "#888D90",
+ ],
+ "carbonfox" => [
+ "background" => "#161616",
+ "border" => "#282828",
+ "stroke" => "#EE5396",
+ "ring" => "#25BE6AC8",
+ "fire" => "#25BE6A",
+ "currStreakNum" => "#78A9FF",
+ "sideNums" => "#33B1FF",
+ "currStreakLabel" => "#DFDFE0",
+ "sideLabels" => "#DFDFE0",
+ "dates" => "#08BDBA",
+ "excludeDaysLabel" => "#EE5396",
+ ],
+ "dawnfox" => [
+ "background" => "#FAF4ED",
+ "border" => "#E5E9F0",
+ "stroke" => "#B4637A",
+ "ring" => "#618774C8",
+ "fire" => "#618774",
+ "currStreakNum" => "#286983",
+ "sideNums" => "#56949F",
+ "currStreakLabel" => "#575279",
+ "sideLabels" => "#575279",
+ "dates" => "#EA9D34",
+ "excludeDaysLabel" => "#B4637A",
+ ],
+ "dayfox" => [
+ "background" => "#F6F2EE",
+ "border" => "#F2E9E1",
+ "stroke" => "#A5222F",
+ "ring" => "#396847C8",
+ "fire" => "#396847",
+ "currStreakNum" => "#2848A9",
+ "sideNums" => "#287980",
+ "currStreakLabel" => "#352C24",
+ "sideLabels" => "#352C24",
+ "dates" => "#AC5402",
+ "excludeDaysLabel" => "#A5222F",
+ ],
+ "duskfox" => [
+ "background" => "#232136",
+ "border" => "#393552",
+ "stroke" => "#EB6F92",
+ "ring" => "#A3BE8CC8",
+ "fire" => "#A3BE8C",
+ "currStreakNum" => "#569FBA",
+ "sideNums" => "#9CCFD8",
+ "currStreakLabel" => "#E0DEF4",
+ "sideLabels" => "#E0DEF4",
+ "dates" => "#F6C177",
+ "excludeDaysLabel" => "#EB6F92",
+ ],
+ "nightfox" => [
+ "background" => "#192330",
+ "border" => "#393B44",
+ "stroke" => "#C94F6D",
+ "ring" => "#6C9581C8",
+ "fire" => "#81B29A",
+ "currStreakNum" => "#719CD6",
+ "sideNums" => "#63CDCF",
+ "currStreakLabel" => "#DFDFE0",
+ "sideLabels" => "#DFDFE0",
+ "dates" => "#DBC074",
+ "excludeDaysLabel" => "#C94F6D",
+ ],
+ "nordfox" => [
+ "background" => "#2E3440",
+ "border" => "#3B4252",
+ "stroke" => "#BF616A",
+ "ring" => "#A3BE8CC8",
+ "fire" => "#A3BE8C",
+ "currStreakNum" => "#81A1C1",
+ "sideNums" => "#88C0D0",
+ "currStreakLabel" => "#E5E9F0",
+ "sideLabels" => "#E5E9F0",
+ "dates" => "#EBCB8B",
+ "excludeDaysLabel" => "#BF616A",
+ ],
+ "terafox" => [
+ "background" => "#152528",
+ "border" => "#2F3239",
+ "stroke" => "#E85C51",
+ "ring" => "#7AA4A1C8",
+ "fire" => "#7AA4A1",
+ "currStreakNum" => "#5A93AA",
+ "sideNums" => "#A1CDD8",
+ "currStreakLabel" => "#EBEBEB",
+ "sideLabels" => "#EBEBEB",
+ "dates" => "#FDA47F",
+ "excludeDaysLabel" => "#E85C51",
+ ],
+ "iceberg" => [
+ "background" => "#1E2132",
+ "border" => "#33374C",
+ "stroke" => "#33374C",
+ "ring" => "#84A0C6",
+ "fire" => "#84A0C6",
+ "currStreakNum" => "#D2D4DE",
+ "sideNums" => "#327698",
+ "currStreakLabel" => "#D2D4DE",
+ "sideLabels" => "#D2D4DE",
+ "dates" => "#327698",
+ "excludeDaysLabel" => "#84A0C6",
+ ],
+ "whatsapp-light2" => [
+ "background" => "#FFFFFF",
+ "border" => "#D8FDD2",
+ "stroke" => "#D8FDD2",
+ "ring" => "#767B7D",
+ "fire" => "#767B7D",
+ "currStreakNum" => "#1DAB61",
+ "sideNums" => "#1DAB61",
+ "currStreakLabel" => "#131A20",
+ "sideLabels" => "#131A20",
+ "dates" => "#767B7D",
+ "excludeDaysLabel" => "#E5A732",
+ ],
+ "whatsapp-dark2" => [
+ "background" => "#0B141B",
+ "border" => "#103629",
+ "stroke" => "#103629",
+ "ring" => "#858A8D",
+ "fire" => "#858A8D",
+ "currStreakNum" => "#21C063",
+ "sideNums" => "#21C063",
+ "currStreakLabel" => "#F7F8FA",
+ "sideLabels" => "#F7F8FA",
+ "dates" => "#858A8D",
+ "excludeDaysLabel" => "#FFD179",
+ ],
+ "travelers-theme" => [
+ "background" => "#150E1F",
+ "border" => "#E4E2E2",
+ "stroke" => "#F28157",
+ "ring" => "#F28157",
+ "fire" => "#F28157",
+ "currStreakNum" => "#F2F2F2",
+ "sideNums" => "#F28157",
+ "currStreakLabel" => "#F2F2F2",
+ "sideLabels" => "#F2F2F2",
+ "dates" => "#F2F2F2",
+ "excludeDaysLabel" => "#464646",
+ ],
+ "youtube-dark" => [
+ "background" => "#0F0F0F",
+ "border" => "#272727",
+ "stroke" => "#272727",
+ "ring" => "#FFFFFF",
+ "fire" => "#FFFFFF",
+ "currStreakNum" => "#FF0000",
+ "sideNums" => "#FF0000",
+ "currStreakLabel" => "#FFFFFF",
+ "sideLabels" => "#FFFFFF",
+ "dates" => "#BCBCBC",
+ "excludeDaysLabel" => "#FFFFFF",
+ ],
+ "meta-light" => [
+ "background" => "#FFFFFF",
+ "border" => "#1C2B33",
+ "stroke" => "#1C2B33",
+ "ring" => "#0081FB",
+ "fire" => "#006EE9",
+ "currStreakNum" => "#1C2B33",
+ "sideNums" => "#1C2B33",
+ "currStreakLabel" => "#1C2B33",
+ "sideLabels" => "#1C2B33",
+ "dates" => "#1C2B33",
+ "excludeDaysLabel" => "#1C2B33",
+ ],
+ "meta-dark" => [
+ "background" => "#1C2B33",
+ "border" => "#FFFFFF",
+ "stroke" => "#FFFFFF",
+ "ring" => "#0081FB",
+ "fire" => "#006EE9",
+ "currStreakNum" => "#FFFFFF",
+ "sideNums" => "#FFFFFF",
+ "currStreakLabel" => "#FFFFFF",
+ "sideLabels" => "#FFFFFF",
+ "dates" => "#FFFFFF",
+ "excludeDaysLabel" => "#FFFFFF",
+ ],
+ "dark-minimalist" => [
+ "background" => "#211F27",
+ "border" => "#B9B9C0",
+ "stroke" => "#B9B9C0",
+ "ring" => "#D484F4",
+ "fire" => "#D484F4",
+ "currStreakNum" => "#89B4FA",
+ "sideNums" => "#E5E5E5",
+ "currStreakLabel" => "#89B4FA",
+ "sideLabels" => "#E5E5E5",
+ "dates" => "#D0D1D3",
+ "excludeDaysLabel" => "#D0D1D3",
+ ],
+ "telegram" => [
+ "background" => "#FFFFFF",
+ "border" => "#333333",
+ "stroke" => "#333333",
+ "ring" => "#0088CC",
+ "fire" => "#179CDE",
+ "currStreakNum" => "#179CDE",
+ "sideNums" => "#0088CC",
+ "currStreakLabel" => "#179CDE",
+ "sideLabels" => "#0088CC",
+ "dates" => "#0088CC",
+ "excludeDaysLabel" => "#0088CC",
+ ],
+ "taiga" => [
+ "background" => "#031B1B",
+ "border" => "#062E2F",
+ "stroke" => "#062E2F",
+ "ring" => "#1F8F92",
+ "fire" => "#1FBABE",
+ "currStreakNum" => "#1FBABE",
+ "sideNums" => "#1F8F92",
+ "currStreakLabel" => "#1F8F92",
+ "sideLabels" => "#1FBABE",
+ "dates" => "#1F8F92",
+ "excludeDaysLabel" => "#1F8F92",
+ ],
+ "telegram-gradient" => [
+ "background" => "45,0088CC,179CDE",
+ "border" => "#FFFFFF",
+ "stroke" => "#FFFFFF",
+ "ring" => "#FFFFFF",
+ "fire" => "#FFFFFF",
+ "currStreakNum" => "#FFFFFF",
+ "sideNums" => "#FFFFFF",
+ "currStreakLabel" => "#FFFFFF",
+ "sideLabels" => "#FFFFFF",
+ "dates" => "#FFFFFF",
+ "excludeDaysLabel" => "#FFFFFF",
+ ],
+ "microsoft" => [
+ "background" => "#FFFFFF",
+ "border" => "#737373",
+ "stroke" => "#737373",
+ "ring" => "#7FBA00",
+ "fire" => "#F25022",
+ "currStreakNum" => "#00A4EF",
+ "sideNums" => "#FFB900",
+ "currStreakLabel" => "#00A4EF",
+ "sideLabels" => "#FFB900",
+ "dates" => "#7FBA00",
+ "excludeDaysLabel" => "#7FBA00",
+ ],
+ "microsoft-dark" => [
+ "background" => "#000000",
+ "border" => "#737373",
+ "stroke" => "#737373",
+ "ring" => "#7FBA00",
+ "fire" => "#F25022",
+ "currStreakNum" => "#00A4EF",
+ "sideNums" => "#FFB900",
+ "currStreakLabel" => "#00A4EF",
+ "sideLabels" => "#FFB900",
+ "dates" => "#7FBA00",
+ "excludeDaysLabel" => "#7FBA00",
+ ],
+ "hacker-inverted" => [
+ "background" => "#20C20E",
+ "border" => "#000000",
+ "stroke" => "#000000",
+ "ring" => "#000000",
+ "fire" => "#000000",
+ "currStreakNum" => "#000000",
+ "sideNums" => "#000000",
+ "currStreakLabel" => "#000000",
+ "sideLabels" => "#000000",
+ "dates" => "#000000",
+ "excludeDaysLabel" => "#000000",
+ ],
+ "rust-ferris-dark" => [
+ "background" => "#000000",
+ "border" => "#FFFFFF",
+ "stroke" => "#F66200",
+ "ring" => "#F49600",
+ "fire" => "#F66200",
+ "currStreakNum" => "#F49600",
+ "sideNums" => "#CC3A00",
+ "currStreakLabel" => "#F49600",
+ "sideLabels" => "#CC3A00",
+ "dates" => "#F66200",
+ "excludeDaysLabel" => "#F66200",
+ ],
+ "rust-ferris-light" => [
+ "background" => "#FFFFFF",
+ "border" => "#000000",
+ "stroke" => "#F66200",
+ "ring" => "#F49600",
+ "fire" => "#F66200",
+ "currStreakNum" => "#F49600",
+ "sideNums" => "#CC3A00",
+ "currStreakLabel" => "#F49600",
+ "sideLabels" => "#CC3A00",
+ "dates" => "#F66200",
+ "excludeDaysLabel" => "#F66200",
+ ],
+ "cyber-streakglow" => [
+ "background" => "42,E20FEB,0D00EB",
+ "border" => "#00EBE1",
+ "stroke" => "#0FEB00",
+ "ring" => "#5AEB59",
+ "fire" => "#DDEB00",
+ "currStreakNum" => "#EBEBEB",
+ "sideNums" => "#D6EBC0",
+ "currStreakLabel" => "#46EB00",
+ "sideLabels" => "#64E8EB",
+ "dates" => "#EBEBEB",
+ "excludeDaysLabel" => "#A7EB3F",
+ ],
+ "vitesse" => [
+ "background" => "#000000",
+ "border" => "#4D9375",
+ "stroke" => "#5D99A9",
+ "ring" => "#4D9375",
+ "fire" => "#CB7676",
+ "currStreakNum" => "#B8A965",
+ "sideNums" => "#4D9375",
+ "currStreakLabel" => "#80A665",
+ "sideLabels" => "#80A665",
+ "dates" => "#BD976A",
+ "excludeDaysLabel" => "#758575DD",
+ ],
];
diff --git a/src/translations.php b/src/translations.php
index e43377bd..260f89d4 100644
--- a/src/translations.php
+++ b/src/translations.php
@@ -22,6 +22,10 @@
* ------------------------------
* To enable right-to-left language support, add `"rtl" => true` to the locale array (see "he" for an example).
*
+ * Comma Separator
+ * ---------------
+ * To change the comma separator in the enumeration of excluded days, add `"comma_separator" => ", "` to the locale array with the desired separator as the value.
+ *
* Aliases
* -------
* To add an alias for a locale, add the alias as a key to the locale array with the locale it should redirect to as the value.
@@ -37,7 +41,7 @@
"Week Streak" => "Week Streak",
"Longest Week Streak" => "Longest Week Streak",
"Present" => "Present",
- "Excluding" => "Excluding",
+ "Excluding {days}" => "Excluding {days}",
],
// Locales below are sorted alphabetically
"am" => [
@@ -47,7 +51,7 @@
"Week Streak" => "የሳምንት ድግግሞሽ",
"Longest Week Streak" => "በጣም ረጅሙ የሳምንት ድግግሞሽ",
"Present" => "ያሁኑ",
- "Excluding" => "ሳይጨምር",
+ "Excluding {days}" => "ሳይጨምር {days}",
],
"ar" => [
"rtl" => true,
@@ -57,6 +61,8 @@
"Week Streak" => "السلسلة المتتالية الأُسبوعية",
"Longest Week Streak" => "أُطول سلسلة متتالية أُسبوعية",
"Present" => "الحاضر",
+ "Excluding {days}" => "باستثناء {days}",
+ "comma_separator" => "، ",
],
"bg" => [
"Total Contributions" => "Общ принос",
@@ -66,13 +72,23 @@
"Longest Week Streak" => "Най-дълга седмична серия",
"Present" => "Сега",
],
+ "bho" => [
+ "Total Contributions" => "कुल योगदान",
+ "Current Streak" => "चालू रोजाना योगदान",
+ "Longest Streak" => "सबसे लंबा रोजाना योगदान",
+ "Week Streak" => "सप्ताहिक योगदान",
+ "Longest Week Streak" => "सबसे लंबा सप्ताहिक योगदान",
+ "Present" => "आज ले",
+ "Excluding {days}" => "{days} के छोड़के",
+ ],
"bn" => [
"Total Contributions" => "মোট অবদান",
- "Current Streak" => "কারেন্ট স্ট্রীক",
+ "Current Streak" => "বর্তমান স্ট্রিক",
"Longest Streak" => "দীর্ঘতম স্ট্রিক",
- "Week Streak" => "সপ্তাহ স্ট্রীক",
+ "Week Streak" => "সপ্তাহ স্ট্রিক",
"Longest Week Streak" => "দীর্ঘতম সপ্তাহ স্ট্রিক",
"Present" => "বর্তমান",
+ "Excluding {days}" => "{days} বাদে",
],
"ca" => [
"Total Contributions" => "Aportacions totals",
@@ -81,7 +97,16 @@
"Week Streak" => "Ratxa setmanal",
"Longest Week Streak" => "Ratxa setmanal més llarga",
"Present" => "Actual",
- "Excluding" => "Excloent",
+ "Excluding {days}" => "Excloent {days}",
+ ],
+ "ceb" => [
+ "Total Contributions" => "Kinatibuk-ang Kontribusyon",
+ "Current Streak" => "Kasamtangan nga Streak",
+ "Longest Streak" => "Pinakataas nga Streak",
+ "Week Streak" => "Sinemana nga Streak",
+ "Longest Week Streak" => "Pinakataas nga Semana nga Streak",
+ "Present" => "Karon",
+ "Excluding {days}" => "Wala'y Labot {days}",
],
"da" => [
"Total Contributions" => "Samlet antal bidrag",
@@ -90,7 +115,7 @@
"Week Streak" => "Ugentlige bidrag i træk",
"Longest Week Streak" => "Flest ugentlige bidrag i træk",
"Present" => "Nuværende",
- "Excluding" => "Ekskluderer",
+ "Excluding {days}" => "Ekskluderer {days}",
],
"de" => [
"Total Contributions" => "Gesamte Beiträge",
@@ -99,7 +124,7 @@
"Week Streak" => "Wochenserie",
"Longest Week Streak" => "Längste Wochenserie",
"Present" => "Heute",
- "Excluding" => "Ausgenommen",
+ "Excluding {days}" => "Ausgenommen {days}",
],
"el" => [
"Total Contributions" => "Συνολικές Συνεισφορές",
@@ -108,7 +133,7 @@
"Week Streak" => "Εβδομαδιαία Σειρά",
"Longest Week Streak" => "Μεγαλύτερη Εβδομαδιαία Σειρά",
"Present" => "Σήμερα",
- "Excluding" => "Εξαιρούνται",
+ "Excluding {days}" => "Εξαιρούνται {days}",
],
"es" => [
"Total Contributions" => "Contribuciones Totales",
@@ -117,7 +142,7 @@
"Week Streak" => "Racha Semanal",
"Longest Week Streak" => "Racha Semanal Más Larga",
"Present" => "Presente",
- "Excluding" => "Excluyendo",
+ "Excluding {days}" => "Excluyendo {days}",
],
"fa" => [
"rtl" => true,
@@ -127,6 +152,17 @@
"Week Streak" => "پیرفت هفته",
"Longest Week Streak" => "طولانی ترین پیرفت هفته",
"Present" => "اکنون",
+ "Excluding {days}" => "{days} مستثنی کردن",
+ "comma_separator" => "، ",
+ ],
+ "fil" => [
+ "Total Contributions" => "Kabuuang Kontribusyon",
+ "Current Streak" => "Kasalukuyang Streak",
+ "Longest Streak" => "Pinakamahabang Streak",
+ "Week Streak" => "Linggong Streak",
+ "Longest Week Streak" => "Pinakamahabang Linggong Streak",
+ "Present" => "Kasalukuyan",
+ "Excluding {days}" => "Hindi Kasama {days}",
],
"fr" => [
"Total Contributions" => "Contributions totales",
@@ -135,7 +171,16 @@
"Week Streak" => "Séquence de la semaine",
"Longest Week Streak" => "Plus longue séquence hebdomadaire",
"Present" => "Aujourd'hui",
- "Excluding" => "À l'exclusion de",
+ "Excluding {days}" => "À l'exclusion de {days}",
+ ],
+ "gu" => [
+ "Total Contributions" => "કુલ યોગદાન",
+ "Current Streak" => "સતત દૈનિક યોગદાન",
+ "Longest Streak" => "સૌથી લાંબુ દૈનિક યોગદાન",
+ "Week Streak" => "અઠવાડીક યોગદાન",
+ "Longest Week Streak" => "સૌથી લાંબુ અઠવાડીક યોગદાન",
+ "Present" => "અત્યાર સુધી",
+ "Excluding {days}" => "સિવાય {days}",
],
"he" => [
"rtl" => true,
@@ -145,7 +190,7 @@
"Week Streak" => "רצף שבועי",
"Longest Week Streak" => "רצף שבועי הכי ארוך",
"Present" => "היום",
- "Excluding" => "לא כולל",
+ "Excluding {days}" => "לא כולל {days}",
],
"hi" => [
"Total Contributions" => "कुल योगदान",
@@ -154,6 +199,7 @@
"Week Streak" => "सप्ताहिक योगदान",
"Longest Week Streak" => "दीर्घ साप्ताहिक योगदान",
"Present" => "आज तक",
+ "Excluding {days}" => "के सिवा {days}",
],
"ht" => [
"Total Contributions" => "kontribisyon total",
@@ -170,7 +216,7 @@
"Week Streak" => "Heti sorozat",
"Longest Week Streak" => "Leghosszabb heti sorozat",
"Present" => "Jelen",
- "Excluding" => "Kivéve",
+ "Excluding {days}" => "Kivéve {days}",
],
"hy" => [
"Total Contributions" => "Ընդհանուր\nներդրումը",
@@ -187,7 +233,7 @@
"Week Streak" => "Aksi Mingguan",
"Longest Week Streak" => "Aksi Mingguan Terpanjang",
"Present" => "Sekarang",
- "Excluding" => "Tidak termasuk",
+ "Excluding {days}" => "Kecuali {days}",
],
"it" => [
"Total Contributions" => "Contributi Totali",
@@ -196,7 +242,7 @@
"Week Streak" => "Serie Settimanale",
"Longest Week Streak" => "Serie Settimanale più Lunga",
"Present" => "Presente",
- "Excluding" => "Escludendo",
+ "Excluding {days}" => "Escludendo {days}",
],
"ja" => [
"date_format" => "[Y.]n.j",
@@ -206,6 +252,17 @@
"Week Streak" => "週間ストリーク",
"Longest Week Streak" => "最長の週間ストリーク",
"Present" => "今",
+ "Excluding {days}" => "{days}を除く",
+ "comma_separator" => "・",
+ ],
+ "jv" => [
+ "Total Contributions" => "Total Kontribusi",
+ "Current Streak" => "Tumindak Saiki",
+ "Longest Streak" => "Tumindak Paling Dawa",
+ "Week Streak" => "Tumindak Saben Minggu",
+ "Longest Week Streak" => "Tumindak Saben Minggu Paling Dawa",
+ "Present" => "Saiki",
+ "Excluding {days}" => "Ora kelebu {days}",
],
"kn" => [
"Total Contributions" => "ಒಟ್ಟು ಕೊಡುಗೆ",
@@ -214,16 +271,16 @@
"Week Streak" => "ವಾರದ ಸ್ಟ್ರೀಕ್",
"Longest Week Streak" => "ಅತ್ಯಧಿಕ ವಾರದ ಸ್ಟ್ರೀಕ್",
"Present" => "ಪ್ರಸ್ತುತ",
- "Excluding" => "ಹೊರತುಪಡಿಸಿ",
+ "Excluding {days}" => "ಹೊರತುಪಡಿಸಿ {days}",
],
"ko" => [
"Total Contributions" => "총 기여 수",
"Current Streak" => "현재 연속 기여 수",
- "Longest Streak" => "최대 연속 기여 수",
- "Week Streak" => "주간 기여 수",
- "Longest Week Streak" => "최대 주간 기여 수",
+ "Longest Streak" => "최장 연속 기여 수",
+ "Week Streak" => "주간 연속 기여 수",
+ "Longest Week Streak" => "최장 주간 연속 기여 수",
"Present" => "현재",
- "Excluding" => "제외된 날",
+ "Excluding {days}" => "{days} 제외하고",
],
"mr" => [
"Total Contributions" => "एकूण योगदान",
@@ -232,6 +289,34 @@
"Week Streak" => "साप्ताहिक सातत्यता",
"Longest Week Streak" => "दीर्घकालीन साप्ताहिक सातत्यता",
"Present" => "आज पर्यंत",
+ "Excluding {days}" => "वगळून {days}",
+ ],
+ "ms" => [
+ "Total Contributions" => "Jumlah Sumbangan",
+ "Current Streak" => "Tindakan Semasa",
+ "Longest Streak" => "Tindakan Terpanjang",
+ "Week Streak" => "Tindakan Setiap Minggu",
+ "Longest Week Streak" => "Tindakan Setiap Minggu Terpanjang",
+ "Present" => "Sekarang",
+ "Excluding {days}" => "Kecuali {days}",
+ ],
+ "ms_ID" => [
+ "Total Contributions" => "Total Kontribusi",
+ "Current Streak" => "Rangkaian Saat Ini",
+ "Longest Streak" => "Rangkaian Terpanjang",
+ "Week Streak" => "Rangkaian Mingguan",
+ "Longest Week Streak" => "Rangkaian Mingguan Terpanjang",
+ "Present" => "Sekarang",
+ "Excluding {days}" => "Tidak termasuk {days}",
+ ],
+ "my" => [
+ "Total Contributions" => "စုစုပေါင်း ပံ့ပိုးမှုများ",
+ "Current Streak" => "ယနေ့ထိ မပျက်မကွက် ပံ့ပိုးမှုရက်ပေါင်း",
+ "Longest Streak" => "အကြာဆုံးမပျက်မကွက် ပံ့ပိုးမှုရက်ပေါင်း",
+ "Week Streak" => "အပတ်စဉ် ပံ့ပိုးမှု",
+ "Longest Week Streak" => "အကြာဆုံးမပျက်မကွက် ပံ့ပိုးမှုအပတ်ပေါင်း",
+ "Present" => "လက်ရှိ",
+ "Excluding {days}" => "{days} မှလွဲ၍",
],
"ne" => [
"Total Contributions" => "कुल योगदान",
@@ -240,7 +325,7 @@
"Week Streak" => "सप्ताहिक योगदान",
"Longest Week Streak" => "सबैभन्दा लामो साप्ताहिक योगदान",
"Present" => "आज सम्म",
- "Excluding" => "बाहेक",
+ "Excluding {days}" => "बाहेक {days}",
],
"nl" => [
"Total Contributions" => "Totale Bijdrage",
@@ -249,7 +334,16 @@
"Week Streak" => "Week Serie",
"Longest Week Streak" => "Langste Week Serie",
"Present" => "Vandaag",
- "Excluding" => "Exclusief",
+ "Excluding {days}" => "Exclusief {days}",
+ ],
+ "no" => [
+ "Total Contributions" => "Totalt Antall Bidrag",
+ "Current Streak" => "Nåværende\nBidragsrekke",
+ "Longest Streak" => "Lengste Bidragsrekke",
+ "Week Streak" => "Ukentlig\nBidragsrekke",
+ "Longest Week Streak" => "Lengste Ukentlige\nBidragsrekke",
+ "Present" => "I dag",
+ "Excluding {days}" => "Ekskluderer {days}",
],
"pl" => [
"Total Contributions" => "Suma Kontrybucji",
@@ -258,6 +352,7 @@
"Week Streak" => "Seria Tygodni",
"Longest Week Streak" => "Najdłuższa Seria Tygodni",
"Present" => "Dziś",
+ "Excluding {days}" => "Wykluczono {days}",
],
"ps" => [
"rtl" => true,
@@ -267,6 +362,17 @@
"Week Streak" => "د اونۍ پرمختګ",
"Longest Week Streak" => "د اونۍ تر ټولو اوږد پرمختګ",
"Present" => "اوس",
+ "comma_separator" => "، ",
+ "Excluding {days}" => "پرته {days}",
+ ],
+ "pt" => [
+ "Total Contributions" => "Contribuições Totais",
+ "Current Streak" => "Sequência Atual",
+ "Longest Streak" => "Maior Sequência",
+ "Week Streak" => "Sequência da Semana",
+ "Longest Week Streak" => "Maior Sequência da Semana",
+ "Present" => "Presente",
+ "Excluding {days}" => "Excluindo {days}",
],
"pt_BR" => [
"Total Contributions" => "Total de Contribuições",
@@ -275,7 +381,7 @@
"Week Streak" => "Sequência Semanal",
"Longest Week Streak" => "Maior Sequência Semanal",
"Present" => "Presente",
- "Excluding" => "Exceto",
+ "Excluding {days}" => "Exceto {days}",
],
"ru" => [
"Total Contributions" => "Общий вклад",
@@ -284,6 +390,7 @@
"Week Streak" => "Текущая серия недель",
"Longest Week Streak" => "Самая длинная серия недель",
"Present" => "Сейчас",
+ "Excluding {days}" => "Не включая {days}",
],
"rw" => [
"Total Contributions" => "Imisanzu yose",
@@ -300,6 +407,18 @@
"Week Streak" => "निरन्तरसप्ताहाः",
"Longest Week Streak" => "दीर्घतमाः निरन्तरसप्ताहाः",
"Present" => "वर्तमान",
+ "Excluding {days}" => "बहिष्करणम् {days}",
+ ],
+ "sd_PK" => [
+ "rtl" => true,
+ "Total Contributions" => "کل حصہ داری",
+ "Current Streak" => "موجوده سلسلو",
+ "Longest Streak" => "تمام پري جو سلسلو",
+ "Week Streak" => "ھفتي جو سلسلو",
+ "Longest Week Streak" => "تمام پري جو ھفتيوار سلسلو",
+ "Present" => "موجوده",
+ "Excluding {days}" => "نڪتل {days}",
+ "comma_separator" => "، ",
],
"sr" => [
"Total Contributions" => "Укупно додавања",
@@ -308,7 +427,16 @@
"Week Streak" => "Недељна серија",
"Longest Week Streak" => "Најдужа недељена серија",
"Present" => "Данас",
- "Excluding" => "Искључујући",
+ "Excluding {days}" => "Искључујући {days}",
+ ],
+ "su" => [
+ "Total Contributions" => "Total Kontribusi",
+ "Current Streak" => "Aksi Ayeuna",
+ "Longest Streak" => "Aksi Pangpanjangna",
+ "Week Streak" => "Aksi Unggal Minggon",
+ "Longest Week Streak" => "Aksi Unggal Minggon Pangpanjangna",
+ "Present" => "Ayeuna",
+ "Excluding {days}" => "Teu Kaasup {days}",
],
"sv" => [
"Total Contributions" => "Totalt antal uppladningar",
@@ -325,6 +453,7 @@
"Week Streak" => "Mfululizo wa wiki",
"Longest Week Streak" => "Mfululizo mrefu zaidi wa wiki",
"Present" => "Sasa",
+ "Excluding {days}" => "Ukiondoa {days}",
],
"ta" => [
"Total Contributions" => "மொத்த\nபங்களிப்புகள்",
@@ -334,6 +463,15 @@
"Longest Week Streak" => "நீண்ட வார\nபங்களிப்புகள்",
"Present" => "இன்றுவரை",
],
+ "th" => [
+ "Total Contributions" => "คอนทริบิ้วต์ทั้งหมด",
+ "Current Streak" => "สตรีคปัจจุบัน",
+ "Longest Streak" => "สตรีคที่ยาวนานที่สุด",
+ "Week Streak" => "สตรีคประจำสัปดาห์",
+ "Longest Week Streak" => "สตรีคประจำสัปดาห์\nที่ยาวนานที่สุด",
+ "Present" => "ปัจจุบัน",
+ "Excluding {days}" => "ยกเว้น {days}",
+ ],
"tr" => [
"Total Contributions" => "Toplam Katkı",
"Current Streak" => "Güncel Seri",
@@ -341,7 +479,7 @@
"Week Streak" => "Haftalık Seri",
"Longest Week Streak" => "En Uzun Haftalık Seri",
"Present" => "Şu an",
- "Excluding" => "Hariç",
+ "Excluding {days}" => "Hariç {days}",
],
"uk" => [
"Total Contributions" => "Загальний вклад",
@@ -350,7 +488,7 @@
"Week Streak" => "Діяльність за тиждень",
"Longest Week Streak" => "Найбільша к-сть тижнів",
"Present" => "Наразі",
- "Excluding" => "Виключаючи",
+ "Excluding {days}" => "Виключаючи {days}",
],
"ur_PK" => [
"rtl" => true,
@@ -360,7 +498,8 @@
"Week Streak" => "ہفتہ وار تسلسل",
"Longest Week Streak" => "طویل ترین ہفتہ وار تسلسل",
"Present" => "حاظر",
- "Excluding" => "خارج",
+ "Excluding {days}" => "خارج {days}",
+ "comma_separator" => "، ",
],
"vi" => [
"Total Contributions" => "Tổng số đóng góp",
@@ -369,7 +508,7 @@
"Week Streak" => "Chuỗi tuần",
"Longest Week Streak" => "Chuỗi tuần lớn nhất",
"Present" => "Hiện tại",
- "Excluding" => "Ngoại trừ",
+ "Excluding {days}" => "Ngoại trừ {days}",
],
"yo" => [
"Total Contributions" => "Lapapọ ilowosi",
@@ -378,7 +517,7 @@
"Week Streak" => "ṣiṣan ọsẹ",
"Longest Week Streak" => "gunjulo ọsẹ ṣiṣan",
"Present" => "lọwọlọwọ",
- "Excluding" => "Yato si",
+ "Excluding {days}" => "Yato si {days}",
],
"zh" => "zh_Hans",
"zh_Hans" => [
@@ -388,15 +527,17 @@
"Week Streak" => "周连续贡献",
"Longest Week Streak" => "最长周连续贡献",
"Present" => "至今",
- "Excluding" => "除外",
+ "Excluding {days}" => "除外 {days}",
+ "comma_separator" => "、",
],
"zh_Hant" => [
"Total Contributions" => "合計貢獻",
"Current Streak" => "目前連續貢獻",
"Longest Streak" => "最長連續貢獻",
"Week Streak" => "周連續貢獻",
- "Longest Week Streak" => "最常周連續貢獻",
+ "Longest Week Streak" => "最長周連續貢獻",
"Present" => "至今",
- "Excluding" => "除外",
+ "Excluding {days}" => "除外 {days}",
+ "comma_separator" => "、",
],
];
diff --git a/tests/RenderTest.php b/tests/RenderTest.php
index 358b4af0..a551736a 100644
--- a/tests/RenderTest.php
+++ b/tests/RenderTest.php
@@ -49,6 +49,11 @@ public function testCardRender(): void
$render = generateCard($this->testStats, $this->testParams);
$expected = file_get_contents("tests/expected/test_card.svg");
$this->assertEquals($expected, $render);
+
+ // Test short_numbers parameter
+ $this->testParams["short_numbers"] = "true";
+ $render = generateCard($this->testStats, $this->testParams);
+ $this->assertStringContainsString("2K", $render);
}
/**
@@ -233,6 +238,22 @@ public function testCardWidth(): void
$this->assertStringContainsString("
assertStringContainsString("", $render);
+ $this->assertStringContainsString("assertStringContainsString("assertStringContainsString("", $render);
+ $this->assertStringContainsString("", $render);
+ $this->assertStringContainsString("", $render);
+ }
+
/**
* Test first and third columns swapped when direction is rtl
*/
@@ -242,11 +263,11 @@ public function testFirstAndThirdColumnsSwappedWhenDirectionIsRtl(): void
$render = generateOutput($this->testStats, $this->testParams)["body"];
$renderCollapsedSpaces = preg_replace("/(\s)\s*/", '$1', $render);
$this->assertStringContainsString(
- "\n",
+ "\n",
$renderCollapsedSpaces
);
$this->assertStringContainsString(
- "\n",
+ "\n",
$renderCollapsedSpaces
);
}
diff --git a/tests/TranslationsTest.php b/tests/TranslationsTest.php
index f662c2ce..d8937b18 100644
--- a/tests/TranslationsTest.php
+++ b/tests/TranslationsTest.php
@@ -25,7 +25,8 @@ public function testAllPhrasesValid(): void
"Week Streak",
"Longest Week Streak",
"Present",
- "Excluding",
+ "Excluding {days}",
+ "comma_separator",
];
foreach ($locales as $locale) {
// if it is a string, assert that the alias exists in the translations file
diff --git a/tests/expected/test_card.svg b/tests/expected/test_card.svg
index ca488f05..08dfd779 100644
--- a/tests/expected/test_card.svg
+++ b/tests/expected/test_card.svg
@@ -31,43 +31,36 @@
-
+
2,048
-
+
Total Contributions
-
+
Aug 10, 2016 - Present
-
-
-
- 16
-
-
-
-
+
Current Streak
-
+
Mar 28, 2019 - Apr 12, 2019
@@ -83,24 +76,31 @@
+
+
+
+ 16
+
+
+
-
+
86
-
+
Longest Streak
-
+
Dec 19, 2016 - Mar 14, 2016
diff --git a/tests/expected/test_error_card.svg b/tests/expected/test_error_card.svg
index 23c28d2b..243faa50 100644
--- a/tests/expected/test_error_card.svg
+++ b/tests/expected/test_error_card.svg
@@ -16,7 +16,7 @@
-
+
An unknown error occurred