diff --git a/README.md b/README.md index ec6f1c9c..dd45b6a9 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ If the `theme` parameter is specified, any color customizations specified will b | `excludeDaysLabel` | Excluded days of the week text color | **hex code** without `#` or **css color** | | `date_format` | Date format pattern or empty for locale format | See note below on [📅 Date Formats](#-date-formats) | | `locale` | Locale for labels and numbers (Default: `en`) | ISO 639-1 code - See [🗪 Locales](#-locales) | +| `short_numbers` | Use short numbers (e.g. 1.5k instead of 1,500) | `true` or `false` | | `type` | Output format (Default: `svg`) | Current options: `svg`, `png` or `json` | | `mode` | Streak mode (Default: `daily`) | `daily` (contribute daily) or `weekly` (contribute once per Sun-Sat week) | | `exclude_days` | List of days of the week to exclude from streaks | Comma-separated list of day abbreviations (Sun, Mon, Tue, Wed, Thu, Fri, Sat) e.g. `Sun,Sat` | @@ -103,7 +104,7 @@ The following are the locales that have labels translated in Streak Stats. The ` -
en - English
English 100%
am - አማርኛ
አማርኛ 100%
ar - العربية
العربية 100%
ca - català
català 100%
ceb - Binisaya
Binisaya 100%
da - dansk
dansk 100%
de - Deutsch
Deutsch 100%
el - Ελληνικά
Ελληνικά 100%
es - español
español 100%
fa - فارسی
فارسی 100%
fil - Filipino
Filipino 100%
fr - français
français 100%
gu - ગુજરાતી
ગુજરાતી 100%
he - עברית
עברית 100%
hi - हिन्दी
हिन्दी 100%
hu - magyar
magyar 100%
id - Indonesia
Indonesia 100%
it - italiano
italiano 100%
ja - 日本語
日本語 100%
jv - Jawa
Jawa 100%
kn - ಕನ್ನಡ
ಕನ್ನಡ 100%
ko - 한국어
한국어 100%
mr - मराठी
मराठी 100%
ms - Melayu
Melayu 100%
my - မြန်မာ
မြန်မာ 100%
ne - नेपाली
नेपाली 100%
nl - Nederlands
Nederlands 100%
no - norsk
norsk 100%
pl - polski
polski 100%
ps - پښتو
پښتو 100%
pt_BR - português (Brasil)
português (Brasil) 100%
ru - русский
русский 100%
sa - संस्कृत भाषा
संस्कृत भाषा 100%
sd_PK - سنڌي (پاڪستان)
سنڌي (پاڪستان) 100%
sr - српски
српски 100%
su - Basa Sunda
Basa Sunda 100%
sw - Kiswahili
Kiswahili 100%
th - ไทย
ไทย 100%
tr - Türkçe
Türkçe 100%
uk - українська
українська 100%
ur_PK - اردو (پاکستان)
اردو (پاکستان) 100%
vi - Tiếng Việt
Tiếng Việt 100%
yo - Èdè Yorùbá
Èdè Yorùbá 100%
zh_Hans - 中文(简体)
中文(简体) 100%
zh_Hant - 中文(繁體)
中文(繁體) 100%
bg - български
български 86%
bn - বাংলা
বাংলা 86%
ht - Haitian Creole
Haitian Creole 86%
hy - հայերեն
հայերեն 86%
rw - Kinyarwanda
Kinyarwanda 86%
sv - svenska
svenska 86%
ta - தமிழ்
தமிழ் 86%
+
en - English
English 100%
am - አማርኛ
አማርኛ 100%
ar - العربية
العربية 100%
bho - भोजपुरी
भोजपुरी 100%
bn - বাংলা
বাংলা 100%
ca - català
català 100%
ceb - Cebuano
Cebuano 100%
da - dansk
dansk 100%
de - Deutsch
Deutsch 100%
el - Ελληνικά
Ελληνικά 100%
es - español
español 100%
fa - فارسی
فارسی 100%
fil - Filipino
Filipino 100%
fr - français
français 100%
gu - ગુજરાતી
ગુજરાતી 100%
he - עברית
עברית 100%
hi - हिन्दी
हिन्दी 100%
hu - magyar
magyar 100%
id - Indonesia
Indonesia 100%
it - italiano
italiano 100%
ja - 日本語
日本語 100%
jv - Jawa
Jawa 100%
kn - ಕನ್ನಡ
ಕನ್ನಡ 100%
ko - 한국어
한국어 100%
mr - मराठी
मराठी 100%
ms - Melayu
Melayu 100%
ms_ID - Melayu (Indonesia)
Melayu (Indonesia) 100%
my - မြန်မာ
မြန်မာ 100%
ne - नेपाली
नेपाली 100%
nl - Nederlands
Nederlands 100%
no - norsk
norsk 100%
pl - polski
polski 100%
ps - پښتو
پښتو 100%
pt - português
português 100%
pt_BR - português (Brasil)
português (Brasil) 100%
ru - русский
русский 100%
sa - संस्कृत भाषा
संस्कृत भाषा 100%
sd_PK - سنڌي (پاڪستان)
سنڌي (پاڪستان) 100%
sr - српски
српски 100%
su - Basa Sunda
Basa Sunda 100%
sw - Kiswahili
Kiswahili 100%
th - ไทย
ไทย 100%
tr - Türkçe
Türkçe 100%
uk - українська
українська 100%
ur_PK - اردو (پاکستان)
اردو (پاکستان) 100%
vi - Tiếng Việt
Tiếng Việt 100%
yo - Èdè Yorùbá
Èdè Yorùbá 100%
zh_Hans - 中文(简体)
中文(简体) 100%
zh_Hant - 中文(繁體)
中文(繁體) 100%
bg - български
български 86%
ht - créole haïtien
créole haïtien 86%
hy - հայերեն
հայերեն 86%
rw - Kinyarwanda
Kinyarwanda 86%
sv - svenska
svenska 86%
ta - தமிழ்
தமிழ் 86%
diff --git a/composer.lock b/composer.lock index 8cf68beb..5fd881a5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "654199887393b4b015ee55d96c95000b", + "content-hash": "ad76467886e64ea7102825318254a227", "packages": [ { "name": "graham-campbell/result-type", @@ -530,16 +530,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.3.1", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", "shasum": "" }, "require": { @@ -582,9 +582,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2024-10-08T18:51:32+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "phar-io/manifest", @@ -706,16 +706,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "11.0.7", + "version": "11.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca" + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7f08030e8811582cc459871d28d6f5a1a4d35ca", - "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/418c59fd080954f8c4aa5631d9502ecda2387118", + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118", "shasum": "" }, "require": { @@ -734,7 +734,7 @@ "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^11.4.1" + "phpunit/phpunit": "^11.5.0" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -772,7 +772,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.8" }, "funding": [ { @@ -780,7 +780,7 @@ "type": "github" } ], - "time": "2024-10-09T06:21:38+00:00" + "time": "2024-12-11T12:34:27+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1029,16 +1029,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.0", + "version": "11.5.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0569902506a6c0878930b87ea79ec3b50ea563f7" + "reference": "e1cb706f019e2547039ca2c839898cd5f557ee5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0569902506a6c0878930b87ea79ec3b50ea563f7", - "reference": "0569902506a6c0878930b87ea79ec3b50ea563f7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e1cb706f019e2547039ca2c839898cd5f557ee5d", + "reference": "e1cb706f019e2547039ca2c839898cd5f557ee5d", "shasum": "" }, "require": { @@ -1052,14 +1052,14 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0.7", + "phpunit/php-code-coverage": "^11.0.8", "phpunit/php-file-iterator": "^5.1.0", "phpunit/php-invoker": "^5.0.1", "phpunit/php-text-template": "^4.0.1", "phpunit/php-timer": "^7.0.1", "sebastian/cli-parser": "^3.0.2", - "sebastian/code-unit": "^3.0.1", - "sebastian/comparator": "^6.2.1", + "sebastian/code-unit": "^3.0.2", + "sebastian/comparator": "^6.3.0", "sebastian/diff": "^6.0.2", "sebastian/environment": "^7.2.0", "sebastian/exporter": "^6.3.0", @@ -1110,7 +1110,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.0" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.7" }, "funding": [ { @@ -1126,7 +1126,7 @@ "type": "tidelift" } ], - "time": "2024-12-06T05:57:38+00:00" + "time": "2025-02-06T16:10:05+00:00" }, { "name": "sebastian/cli-parser", @@ -1187,23 +1187,23 @@ }, { "name": "sebastian/code-unit", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "6bb7d09d6623567178cf54126afa9c2310114268" + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268", - "reference": "6bb7d09d6623567178cf54126afa9c2310114268", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.5" }, "type": "library", "extra": { @@ -1232,7 +1232,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", "security": "https://github.com/sebastianbergmann/code-unit/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2" }, "funding": [ { @@ -1240,7 +1240,7 @@ "type": "github" } ], - "time": "2024-07-03T04:44:28+00:00" + "time": "2024-12-12T09:59:06+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1300,16 +1300,16 @@ }, { "name": "sebastian/comparator", - "version": "6.2.1", + "version": "6.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739" + "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/43d129d6a0f81c78bee378b46688293eb7ea3739", - "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d4e47a769525c4dd38cea90e5dcd435ddbbc7115", + "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115", "shasum": "" }, "require": { @@ -1322,6 +1322,9 @@ "require-dev": { "phpunit/phpunit": "^11.4" }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" + }, "type": "library", "extra": { "branch-alias": { @@ -1365,7 +1368,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/6.2.1" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.0" }, "funding": [ { @@ -1373,7 +1376,7 @@ "type": "github" } ], - "time": "2024-10-31T05:30:08+00:00" + "time": "2025-01-06T10:28:19+00:00" }, { "name": "sebastian/complexity", @@ -2164,5 +2167,5 @@ "ext-intl": "*" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/docs/themes.md b/docs/themes.md index a5b03ffc..ad476960 100644 --- a/docs/themes.md +++ b/docs/themes.md @@ -162,6 +162,11 @@ Note: Theme names provided are case-insensitive and any use of underscores will | `telegram-gradient` | ![image](https://github.com/user-attachments/assets/985c3e04-a5dd-4cba-a66e-d43ad9668af0) | | `microsoft` | ![image](https://github.com/user-attachments/assets/4c2cce9d-90b5-4e38-8422-656c5a78b4d9) | | `microsoft-dark` | ![image](https://github.com/user-attachments/assets/a5918d7d-f568-4012-b06f-d9cfacaece04) | +| `hacker-inverted` | ![image](https://github.com/user-attachments/assets/b64c136a-827b-4177-98f9-28db59bba0ef) | +| `rust-ferris-light` | ![image](https://github.com/user-attachments/assets/2e1d175f-c39d-4e56-be41-d9c277f1e83a) | +| `rust-ferris-dark` | ![image](https://github.com/user-attachments/assets/05e3f9ac-708d-415d-990f-ede3d0a84bab) | +| `cyber-streakglow` | ![image](https://github.com/user-attachments/assets/8c6108e1-f3a1-4653-9f68-08ed6dcfc498) | +| `vitesse` | ![image](https://github.com/user-attachments/assets/baa2fa20-36ea-4158-befc-79c21f102f87) | ### Can't find the theme you like? diff --git a/src/card.php b/src/card.php index 256cb844..b1532e83 100644 --- a/src/card.php +++ b/src/card.php @@ -548,13 +548,6 @@ function generateCard(array $stats, array $params = null): string - - - - {$currentStreak} - - - @@ -579,6 +572,13 @@ function generateCard(array $stats, array $params = null): string + + + + {$currentStreak} + + + diff --git a/src/themes.php b/src/themes.php index 52e6a0d9..e6fc193d 100644 --- a/src/themes.php +++ b/src/themes.php @@ -2004,4 +2004,69 @@ "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 e2315a15..260f89d4 100644 --- a/src/translations.php +++ b/src/translations.php @@ -72,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", @@ -223,7 +233,7 @@ "Week Streak" => "Aksi Mingguan", "Longest Week Streak" => "Aksi Mingguan Terpanjang", "Present" => "Sekarang", - "Excluding {days}" => "Tidak termasuk {days}", + "Excluding {days}" => "Kecuali {days}", ], "it" => [ "Total Contributions" => "Contributi Totali", @@ -266,11 +276,11 @@ "ko" => [ "Total Contributions" => "총 기여 수", "Current Streak" => "현재 연속 기여 수", - "Longest Streak" => "최대 연속 기여 수", - "Week Streak" => "주간 기여 수", - "Longest Week Streak" => "최대 주간 기여 수", + "Longest Streak" => "최장 연속 기여 수", + "Week Streak" => "주간 연속 기여 수", + "Longest Week Streak" => "최장 주간 연속 기여 수", "Present" => "현재", - "Excluding {days}" => "{days} 제외된", + "Excluding {days}" => "{days} 제외하고", ], "mr" => [ "Total Contributions" => "एकूण योगदान", @@ -288,7 +298,16 @@ "Week Streak" => "Tindakan Setiap Minggu", "Longest Week Streak" => "Tindakan Setiap Minggu Terpanjang", "Present" => "Sekarang", - "Excluding {days}" => "Mengecualikan {days}", + "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" => "စုစုပေါင်း ပံ့ပိုးမှုများ", @@ -346,6 +365,15 @@ "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", "Current Streak" => "Sequência Atual", @@ -507,7 +535,7 @@ "Current Streak" => "目前連續貢獻", "Longest Streak" => "最長連續貢獻", "Week Streak" => "周連續貢獻", - "Longest Week Streak" => "最常周連續貢獻", + "Longest Week Streak" => "最長周連續貢獻", "Present" => "至今", "Excluding {days}" => "除外 {days}", "comma_separator" => "、", diff --git a/tests/expected/test_card.svg b/tests/expected/test_card.svg index 39a74a6a..08dfd779 100644 --- a/tests/expected/test_card.svg +++ b/tests/expected/test_card.svg @@ -52,13 +52,6 @@ - - - - 16 - - - @@ -83,6 +76,13 @@ + + + + 16 + + +