Skip to content

Commit e94e21e

Browse files
committed
move out dev commands
1 parent e4a1a11 commit e94e21e

File tree

2 files changed

+76
-65
lines changed

2 files changed

+76
-65
lines changed

README.md

Lines changed: 2 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -65,72 +65,9 @@ The language codes chosen for the files in this repository may not match the pre
6565

6666
* There is also an `‑‑underscore` or `‑U` switch to publish locales with an underscore separator instead of a hyphen. This can be used in combination with aliases.
6767

68-
### Development Commands (debug mode only)
68+
### Development Commands
6969

70-
You must have the `app.debug` config option set to true for these commands to be available:
71-
72-
#### Missing Command
73-
74-
This command is to assist contributors to find any untranslated keys for their chosen language.
75-
76-
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.
77-
78-
* Output missing translation keys for one or more languages:
79-
```bash
80-
php artisan nova-lang:missing de,ru
81-
```
82-
83-
* Output missing translation keys for all languages:
84-
```bash
85-
php artisan nova-lang:missing --all
86-
```
87-
88-
#### Reorder Command
89-
90-
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.
91-
92-
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.
93-
94-
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.
95-
96-
* Output reordered translation keys for one or more languages:
97-
```bash
98-
php artisan nova-lang:reorder de,ru
99-
```
100-
101-
* Output reordered translation keys for all languages:
102-
```bash
103-
php artisan nova-lang:reorder --all
104-
```
105-
106-
#### Country Names Command
107-
108-
This command is to assist contributors to download the country names automatically from the [Unicode Common Locale Data Repository](http://cldr.unicode.org/translation/displaynames/country-names) (CLDR). We use the CLDR as the definitive source for country names, as described in the contribution guidelines.
109-
110-
A new JSON file will be created at `storage_path('app/nova-lang/countries/{locale}.json')`. You can merge the keys from this file into `resources/lang/{locale}.json` in your fork before you raise a PR.
111-
112-
* Output country names for one or more languages:
113-
```bash
114-
php artisan nova-lang:country de,ru
115-
```
116-
117-
* Output country names for all languages:
118-
```bash
119-
php artisan nova-lang:country --all
120-
```
121-
122-
#### Stats Command
123-
124-
This command is to assist maintainers to update the completeness of each language and list of contributors in this README file.
125-
126-
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.
127-
128-
* Output list of languages, lines translated and contributors:
129-
```bash
130-
php artisan nova-lang:stats
131-
```
132-
133-
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.
70+
Documentation of development commands for contributors is available at [Development Commands](development-commands.md).
13471

13572
## Available Languages
13673

development-commands.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<p align="center"><img alt="Laravel Nova Lang" src="https://coderello.com/images/packages/laravel-nova-lang.png" width="450"></p>
2+
3+
<p align="center">Language files for <b>Laravel Nova</b> translated into 40+ languages.</p>
4+
5+
This is not an official Laravel package, but is built from community contributions. If you are able to help by submitting a new language, reviewing an existing language, or adding missing keys, please read our [contributing guidelines](CONTRIBUTING.md) and raise a PR.
6+
7+
<hr>
8+
9+
### Development Commands (debug mode only)
10+
11+
You must have the `app.debug` config option set to true for these commands to be available:
12+
13+
#### Missing Command
14+
15+
This command is to assist contributors to find any untranslated keys for their chosen language.
16+
17+
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.
18+
19+
* Output missing translation keys for one or more languages:
20+
```bash
21+
php artisan nova-lang:missing de,ru
22+
```
23+
24+
* Output missing translation keys for all languages:
25+
```bash
26+
php artisan nova-lang:missing --all
27+
```
28+
29+
#### Reorder Command
30+
31+
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.
32+
33+
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.
34+
35+
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.
36+
37+
* Output reordered translation keys for one or more languages:
38+
```bash
39+
php artisan nova-lang:reorder de,ru
40+
```
41+
42+
* Output reordered translation keys for all languages:
43+
```bash
44+
php artisan nova-lang:reorder --all
45+
```
46+
47+
#### Country Names Command
48+
49+
This command is to assist contributors to download the country names automatically from the [Unicode Common Locale Data Repository](http://cldr.unicode.org/translation/displaynames/country-names) (CLDR). We use the CLDR as the definitive source for country names, as described in the contribution guidelines.
50+
51+
A new JSON file will be created at `storage_path('app/nova-lang/countries/{locale}.json')`. You can merge the keys from this file into `resources/lang/{locale}.json` in your fork before you raise a PR.
52+
53+
* Output country names for one or more languages:
54+
```bash
55+
php artisan nova-lang:country de,ru
56+
```
57+
58+
* Output country names for all languages:
59+
```bash
60+
php artisan nova-lang:country --all
61+
```
62+
63+
#### Stats Command
64+
65+
This command is to assist maintainers to update the completeness of each language and list of contributors in this README file.
66+
67+
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.
68+
69+
* Output list of languages, lines translated and contributors:
70+
```bash
71+
php artisan nova-lang:stats
72+
```
73+
74+
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)