Skip to content

Commit 7221d3f

Browse files
committed
stats for latest contribs
1 parent 7e403fd commit 7221d3f

File tree

4 files changed

+60
-41
lines changed

4 files changed

+60
-41
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,13 @@ Ensure you have created a GitHub personal access token and saved it as a `GITHUB
137137
Note: There is no need to update the count of translated strings and add your username below, as this is done by script when your PR is merged.
138138

139139
Total languages ![42](https://img.shields.io/badge/42-gray?style=flat-square)
140-
Total lines translated ![16,196 (94.5%)](https://img.shields.io/badge/16,196-94%25-yellow?style=flat-square)
140+
Total lines translated ![16,209 (94.6%)](https://img.shields.io/badge/16,209-94%25-yellow?style=flat-square)
141141

142142
| Code | Language | Translated files | Lines translated | Thanks to |
143143
| --- | --- | --- | --- | --- |
144144
| `en` | English | [`php`](resources/lang/en) [`json`](resources/lang/en.json) | ![408 (100%)](https://img.shields.io/badge/408-100%25-brightgreen?style=flat-square) | [taylorotwell](https://github.com/taylorotwell), [bonzai](https://github.com/bonzai), [davidhemphill](https://github.com/davidhemphill), [jbrooksuk](https://github.com/jbrooksuk), [themsaid](https://github.com/themsaid), [kitbs](https://github.com/kitbs), [dillingham](https://github.com/dillingham) |
145+
| `ar` | Arabic | [`php`](resources/lang/ar) [`json`](resources/lang/ar.json) | ![408 (100%)](https://img.shields.io/badge/408-100%25-brightgreen?style=flat-square) | [saleem-hadad](https://github.com/saleem-hadad), [danyelkeddah](https://github.com/danyelkeddah), [omarfathy13](https://github.com/omarfathy13), [CaddyDz](https://github.com/CaddyDz), [i3asm](https://github.com/i3asm), [Arryan](https://github.com/Arryan) |
146+
| `cs` | Czech | [`php`](resources/lang/cs) [`json`](resources/lang/cs.json) | ![408 (100%)](https://img.shields.io/badge/408-100%25-brightgreen?style=flat-square) | [walaskir](https://github.com/walaskir), [theimerj](https://github.com/theimerj), [genesiscz](https://github.com/genesiscz), [walaski](https://github.com/walaski) |
145147
| `nl` | Dutch | [`php`](resources/lang/nl) [`json`](resources/lang/nl.json) | ![408 (100%)](https://img.shields.io/badge/408-100%25-brightgreen?style=flat-square) | [DannyvdSluijs](https://github.com/DannyvdSluijs), [happyDemon](https://github.com/happyDemon), [steefmin](https://github.com/steefmin), [jschram](https://github.com/jschram), [sebastiaanspeck](https://github.com/sebastiaanspeck), [preliot](https://github.com/preliot), [webovatenl](https://github.com/webovatenl), [daniel-de-wit](https://github.com/daniel-de-wit) |
146148
| `fr` | French | [`php`](resources/lang/fr) [`json`](resources/lang/fr.json) | ![408 (100%)](https://img.shields.io/badge/408-100%25-brightgreen?style=flat-square) | [MarceauKa](https://github.com/MarceauKa), [Yannik-Slym](https://github.com/Yannik-Slym), [InfinityWebMe](https://github.com/InfinityWebMe), [kitbs](https://github.com/kitbs), [shaffe-fr](https://github.com/shaffe-fr), [Arryan](https://github.com/Arryan), [voidgraphics](https://github.com/voidgraphics), [KillianH](https://github.com/KillianH) |
147149
| `de` | German | [`php`](resources/lang/de) [`json`](resources/lang/de.json) | ![408 (100%)](https://img.shields.io/badge/408-100%25-brightgreen?style=flat-square) | [pille1842](https://github.com/pille1842), [shieraki](https://github.com/shieraki), [kitbs](https://github.com/kitbs), [tobiasthaden](https://github.com/tobiasthaden), [dakira](https://github.com/dakira) |
@@ -152,7 +154,6 @@ Total lines translated ![16,196 (94.5%)](https://img.shields.io/badge/16,196-94%
152154
| `ru` | Russian | [`php`](resources/lang/ru) [`json`](resources/lang/ru.json) | ![407 (99.8%)](https://img.shields.io/badge/407-99%25-green?style=flat-square) | [hivokas](https://github.com/hivokas), [sanasol](https://github.com/sanasol), [den1n](https://github.com/den1n), [deadem](https://github.com/deadem), [soulshockers](https://github.com/soulshockers), [estim](https://github.com/estim) |
153155
| `pt‑BR` | Brazilian Portuguese | [`php`](resources/lang/pt-BR) [`json`](resources/lang/pt-BR.json) | ![406 (99.5%)](https://img.shields.io/badge/406-99%25-green?style=flat-square) | [henryavila](https://github.com/henryavila), [pedrofurtado](https://github.com/pedrofurtado), [eduardokum](https://github.com/eduardokum), [saulo-silva](https://github.com/saulo-silva), [chbbc](https://github.com/chbbc), [IgorDePaula](https://github.com/IgorDePaula), [emtudo](https://github.com/emtudo) |
154156
| `ca` | Catalan | [`php`](resources/lang/ca) [`json`](resources/lang/ca.json) | ![406 (99.5%)](https://img.shields.io/badge/406-99%25-green?style=flat-square) | [joebordes](https://github.com/joebordes), [gerardnll](https://github.com/gerardnll) |
155-
| `cs` | Czech | [`php`](resources/lang/cs) [`json`](resources/lang/cs.json) | ![405 (99.3%)](https://img.shields.io/badge/405-99%25-green?style=flat-square) | [walaskir](https://github.com/walaskir), [theimerj](https://github.com/theimerj), [walaski](https://github.com/walaski) |
156157
| `nb` | Norwegian Bokmål | [`php`](resources/lang/nb) [`json`](resources/lang/nb.json) | ![405 (99.3%)](https://img.shields.io/badge/405-99%25-green?style=flat-square) | [einar-johan](https://github.com/einar-johan) |
157158
| `ro` | Romanian | [`php`](resources/lang/ro) [`json`](resources/lang/ro.json) | ![405 (99.3%)](https://img.shields.io/badge/405-99%25-green?style=flat-square) | [BTeodorWork](https://github.com/BTeodorWork), [dtix](https://github.com/dtix), [alexgiuvara](https://github.com/alexgiuvara) |
158159
| `sv` | Swedish | [`php`](resources/lang/sv) [`json`](resources/lang/sv.json) | ![405 (99.3%)](https://img.shields.io/badge/405-99%25-green?style=flat-square) | [tanjemark](https://github.com/tanjemark), [slackernrrd](https://github.com/slackernrrd) |
@@ -164,12 +165,11 @@ Total lines translated ![16,196 (94.5%)](https://img.shields.io/badge/16,196-94%
164165
| `ja` | Japanese | [`php`](resources/lang/ja) [`json`](resources/lang/ja.json) | ![400 (98%)](https://img.shields.io/badge/400-98%25-green?style=flat-square) | [Tsumagari](https://github.com/Tsumagari), [storyn26383](https://github.com/storyn26383) |
165166
| `fa` | Farsi | [`php`](resources/lang/fa) [`json`](resources/lang/fa.json) | ![399 (97.8%)](https://img.shields.io/badge/399-97%25-green?style=flat-square) | [alirezamirsepassi](https://github.com/alirezamirsepassi), [mziraki](https://github.com/mziraki), [zareismail](https://github.com/zareismail) |
166167
| `tk` | Turkmen | [`php`](resources/lang/tk) [`json`](resources/lang/tk.json) | ![399 (97.8%)](https://img.shields.io/badge/399-97%25-green?style=flat-square) | [kakajansh](https://github.com/kakajansh) |
167-
| `ar` | Arabic | [`php`](resources/lang/ar) [`json`](resources/lang/ar.json) | ![398 (97.5%)](https://img.shields.io/badge/398-97%25-green?style=flat-square) | [saleem-hadad](https://github.com/saleem-hadad), [danyelkeddah](https://github.com/danyelkeddah), [omarfathy13](https://github.com/omarfathy13), [Arryan](https://github.com/Arryan) |
168168
| `pl` | Polish | [`php`](resources/lang/pl) [`json`](resources/lang/pl.json) | ![397 (97.3%)](https://img.shields.io/badge/397-97%25-green?style=flat-square) | [pzmarzly](https://github.com/pzmarzly), [Strus](https://github.com/Strus), [marekfilip](https://github.com/marekfilip), [mslepko](https://github.com/mslepko), [wiktor-k](https://github.com/wiktor-k) |
169169
| `zh‑CN` | Chinese (Simplified) | [`php`](resources/lang/zh-CN) [`json`](resources/lang/zh-CN.json) | ![393 (96.3%)](https://img.shields.io/badge/393-96%25-green?style=flat-square) | [jcc](https://github.com/jcc), [zacksleo](https://github.com/zacksleo), [masterwto](https://github.com/masterwto) |
170170
| `zh‑TW` | Chinese (Traditional) | [`php`](resources/lang/zh-TW) [`json`](resources/lang/zh-TW.json) | ![393 (96.3%)](https://img.shields.io/badge/393-96%25-green?style=flat-square) | [CasperLaiTW](https://github.com/CasperLaiTW), [zacksleo](https://github.com/zacksleo), [storyn26383](https://github.com/storyn26383) |
171171
| `pt` | Portuguese | [`php`](resources/lang/pt) [`json`](resources/lang/pt.json) | ![377 (92.4%)](https://img.shields.io/badge/377-92%25-yellow?style=flat-square) | [Pedrocssg](https://github.com/Pedrocssg) |
172-
| `da` | Danish | [`php`](resources/lang/da) [`json`](resources/lang/da.json) | ![356 (87.3%)](https://img.shields.io/badge/356-87%25-orange?style=flat-square) | [olivernybroe](https://github.com/olivernybroe), [rugaard](https://github.com/rugaard) |
172+
| `da` | Danish | [`php`](resources/lang/da) [`json`](resources/lang/da.json) | ![356 (87.3%)](https://img.shields.io/badge/356-87%25-orange?style=flat-square) | [olivernybroe](https://github.com/olivernybroe), [rugaard](https://github.com/rugaard), [peterchrjoergensen](https://github.com/peterchrjoergensen) |
173173
| `eu` | Basque | [`php`](resources/lang/eu) [`json`](resources/lang/eu.json) | ![354 (86.8%)](https://img.shields.io/badge/354-86%25-orange?style=flat-square) | [JonPaternain](https://github.com/JonPaternain) |
174174
| `hr` | Croatian | [`php`](resources/lang/hr) [`json`](resources/lang/hr.json) | ![352 (86.3%)](https://img.shields.io/badge/352-86%25-orange?style=flat-square) | [defart](https://github.com/defart), [walaski](https://github.com/walaski) |
175175
| `fil` | Filipino | [`php`](resources/lang/fil) [`json`](resources/lang/fil.json) | ![352 (86.3%)](https://img.shields.io/badge/352-86%25-orange?style=flat-square) | [granaderos](https://github.com/granaderos) |
@@ -188,7 +188,7 @@ Total lines translated ![16,196 (94.5%)](https://img.shields.io/badge/16,196-94%
188188

189189
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.
190190

191-
Parity with `caouecs/laravel-lang` ![39/74 (52.7%)](https://img.shields.io/badge/39%2F74-52%25-red?style=flat-square)
191+
Parity with `caouecs/laravel-lang` ![40/75 (53.3%)](https://img.shields.io/badge/40%2F75-53%25-red?style=flat-square)
192192

193193
| Code | Language | Lines translated |
194194
| --- | --- | --- |
@@ -201,6 +201,7 @@ Parity with `caouecs/laravel-lang` ![39/74 (52.7%)](https://img.shields.io/badge
201201
| `gl` | Galician | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
202202
| `de‑CH` | German (Switzerland) | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
203203
| `el` | Greek | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
204+
| `hy` | Armenian | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
204205
| `he` | Hebrew | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
205206
| `is` | Icelandic | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
206207
| `kn` | Kannada | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
@@ -225,5 +226,4 @@ Parity with `caouecs/laravel-lang` ![39/74 (52.7%)](https://img.shields.io/badge
225226
| `ug` | Uyghur | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
226227
| `uz‑Cyrl` | Uzbek (Cyrillic) | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
227228
| `vi` | Vietnamese | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
228-
| `cy` | Welsh | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
229-
| `hy` | Armenian | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |
229+
| `cy` | Welsh | ![0 (0%)](https://img.shields.io/badge/0-0%25-lightgray?style=flat-square) |

contributors.json

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,32 @@
1414
"json": true,
1515
"php": true
1616
},
17+
"ar": {
18+
"name": "Arabic",
19+
"complete": 408,
20+
"contributors": {
21+
"saleem-hadad": 56,
22+
"danyelkeddah": 50,
23+
"omarfathy13": 26,
24+
"CaddyDz": 12,
25+
"i3asm": 10,
26+
"Arryan": 3
27+
},
28+
"json": true,
29+
"php": true
30+
},
31+
"cs": {
32+
"name": "Czech",
33+
"complete": 408,
34+
"contributors": {
35+
"walaskir": 362,
36+
"theimerj": 56,
37+
"genesiscz": 12,
38+
"walaski": 1
39+
},
40+
"json": true,
41+
"php": true
42+
},
1743
"nl": {
1844
"name": "Dutch",
1945
"complete": 408,
@@ -150,17 +176,6 @@
150176
"json": true,
151177
"php": true
152178
},
153-
"cs": {
154-
"name": "Czech",
155-
"complete": 405,
156-
"contributors": {
157-
"walaskir": 362,
158-
"theimerj": 56,
159-
"walaski": 1
160-
},
161-
"json": true,
162-
"php": true
163-
},
164179
"nb": {
165180
"name": "Norwegian Bokmål",
166181
"complete": 405,
@@ -272,18 +287,6 @@
272287
"json": true,
273288
"php": true
274289
},
275-
"ar": {
276-
"name": "Arabic",
277-
"complete": 398,
278-
"contributors": {
279-
"saleem-hadad": 56,
280-
"danyelkeddah": 50,
281-
"omarfathy13": 26,
282-
"Arryan": 3
283-
},
284-
"json": true,
285-
"php": true
286-
},
287290
"pl": {
288291
"name": "Polish",
289292
"complete": 397,
@@ -333,7 +336,8 @@
333336
"complete": 356,
334337
"contributors": {
335338
"olivernybroe": 364,
336-
"rugaard": 8
339+
"rugaard": 8,
340+
"peterchrjoergensen": 3
337341
},
338342
"json": true,
339343
"php": true
@@ -501,6 +505,11 @@
501505
"complete": 0,
502506
"contributors": []
503507
},
508+
"hy": {
509+
"name": "Armenian",
510+
"complete": null,
511+
"contributors": []
512+
},
504513
"he": {
505514
"name": "Hebrew",
506515
"complete": 0,
@@ -625,10 +634,5 @@
625634
"name": "Welsh",
626635
"complete": 0,
627636
"contributors": []
628-
},
629-
"hy": {
630-
"name": "Armenian",
631-
"complete": null,
632-
"contributors": []
633637
}
634638
}

docs/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ This is not an official Laravel package, but is built from community contributio
1212
### Available Languages
1313

1414
Total languages **42**
15-
Total lines translated **16,196 (94.5%)**
15+
Total lines translated **16,209 (94.6%)**
1616

1717
* `en` English · **408 (100%)**
18+
* `ar` Arabic · **408 (100%)**
19+
* `cs` Czech · **408 (100%)**
1820
* `nl` Dutch · **408 (100%)**
1921
* `fr` French · **408 (100%)**
2022
* `de` German · **408 (100%)**
@@ -25,7 +27,6 @@ Total lines translated **16,196 (94.5%)**
2527
* `ru` Russian · **407 (99.8%)**
2628
* `pt‑BR` Brazilian Portuguese · **406 (99.5%)**
2729
* `ca` Catalan · **406 (99.5%)**
28-
* `cs` Czech · **405 (99.3%)**
2930
* `nb` Norwegian Bokmål · **405 (99.3%)**
3031
* `ro` Romanian · **405 (99.3%)**
3132
* `sv` Swedish · **405 (99.3%)**
@@ -37,7 +38,6 @@ Total lines translated **16,196 (94.5%)**
3738
* `ja` Japanese · **400 (98%)**
3839
* `fa` Farsi · **399 (97.8%)**
3940
* `tk` Turkmen · **399 (97.8%)**
40-
* `ar` Arabic · **398 (97.5%)**
4141
* `pl` Polish · **397 (97.3%)**
4242
* `zh‑CN` Chinese (Simplified) · **393 (96.3%)**
4343
* `zh‑TW` Chinese (Traditional) · **393 (96.3%)**

src/Commands/NovaLangStats.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,13 @@ protected function getCaouecsLocales(): Collection
304304
protected function getJsonKeys(string $path): array
305305
{
306306
if ($this->filesystem->exists($path)) {
307-
return array_diff(array_keys(json_decode($this->filesystem->get($path), true)), static::IGNORED_KEYS);
307+
$json = json_decode($this->filesystem->get($path), true);
308+
309+
if (!is_array($json)) {
310+
throw new \Exception('Invalid JSON file: '.$path);
311+
}
312+
313+
return array_diff(array_keys($json), static::IGNORED_KEYS);
308314
}
309315

310316
return [];
@@ -315,7 +321,14 @@ protected function getPhpKeys(string $path): array
315321
return collect($this->filesystem->glob($path.'/*.php'))
316322
->map(function (string $path) {
317323
$file = basename($this->filesystem->basename($path), '.php');
318-
$keys = collect(array_keys($this->filesystem->getRequire($path)))
324+
325+
$php = $this->filesystem->getRequire($path);
326+
327+
if (!is_array($php)) {
328+
throw new \Exception('Invalid JSON file: ' . $path);
329+
}
330+
331+
$keys = collect(array_keys($php))
319332
->map(function ($key) use ($file) {
320333
return "$file.$key";
321334
});
@@ -343,6 +356,8 @@ protected function caouecsMapping(string $caouecs): string
343356
$mapping = [
344357
'uz-cyrillic' => 'uz-Cyrl',
345358
'uz-latin' => 'uz-Latn',
359+
'sr-cyrillic' => 'sr',
360+
'sr-latin' => 'sr-Latn',
346361
'sr' => 'sr-Latn',
347362
'me' => 'cnr',
348363
];

0 commit comments

Comments
 (0)