@@ -28,6 +28,38 @@ php artisan vendor:publish --tag="translation-linter-config"
2828
2929You should read through the config, which serves as additional documentation and make changes as needed.
3030
31+ ## Missing Command
32+ This reads through all your code and finds all your language function usage.
33+ Then attempts to find matches in your language files and will output any
34+ keys in your code that do not exist as a language key.
35+
36+ ``` sh
37+ $ php artisan translation:missing
38+
39+ ERROR 3 missing translations found.
40+
41+ +--------+--------------------------------+---------------------+
42+ | Locale | Key | File |
43+ +--------+--------------------------------+---------------------+
44+ | en | Missing PHP Class | app/ExampleJson.php |
45+ | en | Only Missing English PHP Class | app/ExampleJson.php |
46+ | de | Missing PHP Class | app/ExampleJson.php |
47+ +--------+--------------------------------+---------------------+
48+ ```
49+
50+ You can generate a baseline file which will be used to ignore specific keys with the
51+ ` --generate-baseline ` or ` -b ` command options:
52+
53+ ``` sh
54+ $ php artisan translation:missing --generate-baseline
55+
56+ INFO Baseline file written with 49 translation keys.
57+
58+ $ php artisan translation:missing
59+
60+ INFO No missing translations found!
61+ ```
62+
3163## Unused Command
3264This reads through all your code and finds all your language function usage.
3365Then attempts to find matches in your language files and will output any
@@ -65,20 +97,6 @@ $ php artisan translation:unused
6597 INFO No unused translations found!
6698```
6799
68- ## Roadmap
69- - [x] Supports JSON and PHP translation files
70- - You can enable / disable file types in the config
71- - You can add your own custom file readers
72- - [x] Supports multiple locales
73- - [x] Supports parsing many code types
74- - Default: php, js and vue
75- - You can add more file extensions in the config
76- - [x] [ Unused Command] ( #unused-command )
77- - [ ] Missing Command - _ coming soon_
78- - [ ] Orphaned Command - _ coming soon_
79- - [ ] Lint Command - _ coming soon_
80- - This would run all of the other commands in a single command.
81-
82100## Testing
83101
84102``` bash
0 commit comments