Skip to content

Commit b66e936

Browse files
committed
fix stats
1 parent 69b00fe commit b66e936

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,12 @@ Total lines translated ![16,234 (92%)](https://img.shields.io/badge/16,234-92%25
125125

126126
The following languages are supported for the main Laravel framework by the excellent [caouecs/laravel-lang](https://github.com/caouecs/Laravel-lang) package. We would love for our package to make these languages available for Nova as well. If you are able to contribute to any of these or other languages, please read our [contributing guidelines](CONTRIBUTING.md) and raise a PR.
127127

128-
Parity with `caouecs/laravel-lang` ![0/0 (0%)](https://img.shields.io/badge/0%2F0-0%25-lightgray?style=flat-square)
128+
Parity with `caouecs/laravel-lang` ![40/75 (53.3%)](https://img.shields.io/badge/40%2F75-53%25-red?style=flat-square)
129129

130130
| Code | Language | Lines translated |
131131
| --- | --- | --- |
132132
| `sq` | Albanian | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
133+
| `hy` | Armenian | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
133134
| `az` | Azerbaijani | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
134135
| `bn` | Bangla | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
135136
| `be` | Belarusian | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
@@ -145,7 +146,6 @@ Parity with `caouecs/laravel-lang` ![0/0 (0%)](https://img.shields.io/badge/0%2F
145146
| `km` | Khmer | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
146147
| `ko` | Korean | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
147148
| `lv` | Latvian | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
148-
| `hy` | Armenian | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
149149
| `mk` | Macedonian | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
150150
| `ms` | Malay | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
151151
| `mr` | Marathi | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |

contributors.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -464,11 +464,6 @@
464464
"json": true,
465465
"php": true
466466
},
467-
"sq": {
468-
"name": "Albanian",
469-
"complete": 0,
470-
"contributors": []
471-
},
472467
"az": {
473468
"name": "Azerbaijani",
474469
"complete": 0,
@@ -544,13 +539,18 @@
544539
"complete": 0,
545540
"contributors": []
546541
},
542+
"mk": {
543+
"name": "Macedonian",
544+
"complete": 0,
545+
"contributors": []
546+
},
547547
"hy": {
548548
"name": "Armenian",
549549
"complete": null,
550550
"contributors": []
551551
},
552-
"mk": {
553-
"name": "Macedonian",
552+
"sq": {
553+
"name": "Albanian",
554554
"complete": 0,
555555
"contributors": []
556556
},

src/Commands/NovaLangStats.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ public function handle()
155155
return sprintf('| `%s` | %s | %s %s | ![%d (%s%%)](%s) | %s |', str_replace('-', '', $locale), $localeStat['name'], $hasJson, $hasPhp, $localeStat['complete'], $percent, $icon, $contributors);
156156
});
157157

158+
$missing = $missing->sortBy(function($localeStat) {
159+
return $localeStat['name'];
160+
});
161+
158162
$missing->transform(function($localeStat, $locale) use ($sourceCount) {
159163

160164
$icon = $this->getPercentIcon(0, 0);
@@ -353,6 +357,8 @@ protected function directoryCaouecsSource(): string
353357

354358
protected function caouecsMapping(string $caouecs): string
355359
{
360+
$caouecs = str_replace('_', '-', $caouecs);
361+
356362
$mapping = [
357363
'uz-cyrillic' => 'uz-Cyrl',
358364
'uz-latin' => 'uz-Latn',
@@ -362,7 +368,7 @@ protected function caouecsMapping(string $caouecs): string
362368
'me' => 'cnr',
363369
];
364370

365-
return $mapping[$caouecs] ?? $caouecs;
371+
return $mapping[strtolower($caouecs)] ?? $caouecs;
366372
}
367373

368374
protected function getBlame(): array

0 commit comments

Comments
 (0)