Skip to content

Commit a0ecebd

Browse files
authored
Reorder command readme (#191)
* readme for reorder command
1 parent 834144a commit a0ecebd

File tree

6 files changed

+427
-407
lines changed

6 files changed

+427
-407
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,24 @@ php artisan nova-lang:missing de,ru
8989
php artisan nova-lang:missing --all
9090
```
9191

92+
#### Reorder Command
93+
94+
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.
95+
96+
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.
97+
98+
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.
99+
100+
* Output reordered translation keys for one or more languages:
101+
```bash
102+
php artisan nova-lang:reorder de,ru
103+
```
104+
105+
* Output reordered translation keys for all languages:
106+
```bash
107+
php artisan nova-lang:reorder --all
108+
```
109+
92110
#### Stats Command
93111

94112
This command is to assist maintainers to update the completeness of each language and list of contributors in this README file.

0 commit comments

Comments
 (0)