diff --git a/README.md b/README.md
index 76f6153a..15e2f565 100644
--- a/README.md
+++ b/README.md
@@ -59,8 +59,8 @@ If the `theme` parameter is specified, any color customizations specified will b
| `currStreakLabel` | Current streak label | **hex code** without `#` or **css color** |
| `sideLabels` | Total and longest streak labels | **hex code** without `#` or **css color** |
| `dates` | Date range text color | **hex code** without `#` or **css color** |
-| `date_format` | Date format (Default: `M j[, Y]`) | See note below on [📅 Date Formats](#-date-formats) |
-| `locale` | Locale to use for labels (Default: `en`) | ISO 639-1 code - See [🗪 Locales](#-locales) |
+| `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) |
| `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) |
@@ -83,10 +83,12 @@ To enable a theme, append `&theme=` followed by the theme name to the end of the
### 🗪 Locales
+The following are the locales that have labels translated in Streak Stats. The `locale` query parameter accepts any ISO language or locale code, see [here](https://gist.github.com/DenverCoder1/f61147ba26bfcf7c3bf605af7d3382d5) for a list of valid locales. The locale provided will be used for the date format and number format even if translations are not yet available.
+
-
en
- Englishar
- العربيةbg
- българскиbn
- বাংলাes
- españolfa
- فارسیfr
- françaishe
- עבריתhi
- हिन्दीja
- 日本語ko
- 한국어mr
- मराठीpl
- polskips
- پښتوpt_BR
- português (Brasil)ru
- русскийuk
- українськаyo
- Èdè Yorùbázh_Hans
- 中文(简体)zh_Hant
- 中文(繁體)da
- danskde
- Deutschid
- Indonesiait
- italianokn
- ಕನ್ನಡnl
- Nederlandsta
- தமிழ்tr
- Türkçevi
- Tiếng Việt
+en
- Englishar
- العربيةbg
- българскиbn
- বাংলাda
- danskde
- Deutsches
- españolfa
- فارسیfr
- françaishe
- עבריתhi
- हिन्दीht
- Haitian Creoleid
- Indonesiait
- italianoja
- 日本語kn
- ಕನ್ನಡko
- 한국어mr
- मराठीnl
- Nederlandspl
- polskips
- پښتوpt_BR
- português (Brasil)ru
- русскийuk
- українськаur_PK
- اردو (پاکستان)vi
- Tiếng Việtyo
- Èdè Yorùbázh_Hans
- 中文(简体)zh_Hant
- 中文(繁體)ta
- தமிழ்tr
- Türkçe
@@ -94,6 +96,8 @@ To enable a theme, append `&theme=` followed by the theme name to the end of the
### 📅 Date Formats
+If `date_format` is not provided or is empty, the PHP Intl library is used to determine the date format based on the locale specified in the `locale` query parameter.
+
A custom date format can be specified by passing a string to the `date_format` parameter.
The required format is to use format string characters from [PHP's date function](https://www.php.net/manual/en/datetime.format.php) with brackets around the part representing the year.
@@ -191,6 +195,7 @@ PNG mode is also not supported since Inkscape will not be installed.
9. Scroll to the bottom and click **"Generate token"**
10. Visit the [Vercel dashboard](https://vercel.com/dashboard) and select your project, then click **"Settings"**, then **"Environment Variables"**.
11. Add a new variable with the key `TOKEN` and the value as your token from step 9 and click "Save".
+12. For the environment variable to be available, you will need to redeploy the app. Run `vercel --prod` to deploy to production.

diff --git a/composer.json b/composer.json
index bf460e42..416268a5 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"stats"
],
"license": "MIT",
- "version": "0.26.0",
+ "version": "0.27.0",
"homepage": "https://github.com/DenverCoder1/github-readme-streak-stats",
"autoload": {
"classmap": [
diff --git a/composer.lock b/composer.lock
index e7195848..3093eb6c 100644
--- a/composer.lock
+++ b/composer.lock
@@ -479,30 +479,30 @@
"packages-dev": [
{
"name": "doctrine/instantiator",
- "version": "1.5.0",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
+ "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
- "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
+ "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
"shasum": ""
},
"require": {
- "php": "^7.1 || ^8.0"
+ "php": "^8.1"
},
"require-dev": {
- "doctrine/coding-standard": "^9 || ^11",
+ "doctrine/coding-standard": "^11",
"ext-pdo": "*",
"ext-phar": "*",
- "phpbench/phpbench": "^0.16 || ^1",
- "phpstan/phpstan": "^1.4",
- "phpstan/phpstan-phpunit": "^1",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.30 || ^5.4"
+ "phpbench/phpbench": "^1.2",
+ "phpstan/phpstan": "^1.9.4",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpunit/phpunit": "^9.5.27",
+ "vimeo/psalm": "^5.4"
},
"type": "library",
"autoload": {
@@ -529,7 +529,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
+ "source": "https://github.com/doctrine/instantiator/tree/2.0.0"
},
"funding": [
{
@@ -545,7 +545,7 @@
"type": "tidelift"
}
],
- "time": "2022-12-30T00:15:36+00:00"
+ "time": "2022-12-30T00:23:10+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -608,16 +608,16 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.15.2",
+ "version": "v4.15.3",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc"
+ "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
- "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039",
+ "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039",
"shasum": ""
},
"require": {
@@ -658,9 +658,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3"
},
- "time": "2022-11-12T15:38:23+00:00"
+ "time": "2023-01-16T22:05:37+00:00"
},
{
"name": "phar-io/manifest",
@@ -1093,20 +1093,20 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.5.27",
+ "version": "9.5.28",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38"
+ "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38",
- "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e",
+ "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.3.1",
+ "doctrine/instantiator": "^1.3.1 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
@@ -1175,7 +1175,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28"
},
"funding": [
{
@@ -1191,7 +1191,7 @@
"type": "tidelift"
}
],
- "time": "2022-12-09T07:31:23+00:00"
+ "time": "2023-01-14T12:32:24+00:00"
},
{
"name": "sebastian/cli-parser",
diff --git a/src/demo/css/style.css b/src/demo/css/style.css
index 014312c9..13beac15 100644
--- a/src/demo/css/style.css
+++ b/src/demo/css/style.css
@@ -121,6 +121,7 @@ h2 {
.btn:disabled {
background: var(--blue-transparent);
box-shadow: none;
+ cursor: not-allowed;
}
.parameters {
@@ -199,6 +200,7 @@ input:focus:invalid {
.advanced summary {
padding: 6px;
+ cursor: pointer;
}
.advanced .parameters {
@@ -282,9 +284,10 @@ input:focus:invalid {
.btn.tooltip:after {
content: "";
position: absolute;
- transform: translateY(-27px);
+ transform: translateY(-25px);
border-style: solid;
border-color: #4a4a4afa transparent transparent transparent;
+ border-width: 5px;
pointer-events: none;
opacity: 0;
}
@@ -302,7 +305,7 @@ input:focus:invalid {
content: "You must first input a valid username.";
}
-textarea#exportedPhp {
+textarea#exported-php {
margin-top: 10px;
width: 100%;
resize: vertical;
diff --git a/src/demo/index.php b/src/demo/index.php
index bf9ab95e..3726a478 100644
--- a/src/demo/index.php
+++ b/src/demo/index.php
@@ -102,13 +102,13 @@ function gtag() {
Hide Border
-
+
false
true
-
+
Border Radius
-
+
Locale
@@ -121,7 +121,7 @@ function gtag() {
Date Format
-
+
default
Aug 10, 2016
10 Aug 2016
@@ -146,13 +146,14 @@ function gtag() {
- +
+ +
- Export to PHP
-
+ Export to PHP
+ Clear Options
+
-
+ Open Permalink
@@ -192,4 +193,4 @@ function gtag() {