Skip to content

Commit 55d9274

Browse files
author
Illia Sakovich
committed
wip
1 parent a59e09a commit 55d9274

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

docs/development-commands.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Development commands
3+
section: Contributing
4+
weight: 8900
5+
featherIcon: terminal
6+
---
7+
8+
You must have the `app.debug` config option set to true for these commands to be available:
9+
10+
## Missing Command
11+
12+
This command is to assist contributors to find any untranslated keys for their chosen language.
13+
14+
A stub JSON file will be created at `storage_path('app/nova-lang/missing/{locale}.json')`. You can copy those keys into the `resources/lang/{locale}.json` language file in your own fork of the repository, translate them and create a pull request.
15+
16+
* Output missing translation keys for one or more languages:
17+
```bash
18+
php artisan nova-lang:missing de,ru
19+
```
20+
21+
* Output missing translation keys for all languages:
22+
```bash
23+
php artisan nova-lang:missing --all
24+
```
25+
26+
## Reorder Command
27+
28+
This command is to assist contributors to ensure that the translation keys for their chosen language are in the same order as the `en.json` source file from Laravel Nova.
29+
30+
If you have imported the keys you are translating into a translation string management tool, the original order of the keys may be lost when you reexport the file. This makes the diff difficult to read because it will highlight all keys rather than just those which you have added or updated.
31+
32+
A new JSON file will be created at `storage_path('app/nova-lang/reorder/{locale}.json')`. You can copy the contents of this file to `resources/lang/{locale}.json` in your fork before you raise a PR.
33+
34+
* Output reordered translation keys for one or more languages:
35+
```bash
36+
php artisan nova-lang:reorder de,ru
37+
```
38+
39+
* Output reordered translation keys for all languages:
40+
```bash
41+
php artisan nova-lang:reorder --all
42+
```
43+
44+
## Stats Command
45+
46+
This command is to assist maintainers to update the completeness of each language and list of contributors in this README file.
47+
48+
A `README.excerpt.md` and `contributors.json` file will be created at `storage_path('app/nova-lang')`. You can copy those files into your own fork of the repository and create a pull request.
49+
50+
* Output list of languages, lines translated and contributors:
51+
```bash
52+
php artisan nova-lang:stats
53+
```
54+
55+
Ensure you have created a GitHub personal access token and saved it as a `GITHUB_TOKEN_NOVALANG` env variable in your master Laravel application in order to download the most recent contributions.

0 commit comments

Comments
 (0)