From d0585691c610b681ed4eb2fe4c01a848a09a4a65 Mon Sep 17 00:00:00 2001 From: Luca Patera Date: Sat, 29 Aug 2020 20:56:58 +0200 Subject: [PATCH] Updated readme + changelog --- CHANGELOG.md | 5 +++++ README.md | 23 ++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaf2845..f988b6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v1.5 - 2020-08-29 +### Added +- Added **--include** option to `larex:export` command +- Added **--exclude** option to `larex:export` command + ## v1.4 - 2020-08-28 ### Added - Added `larex:insert` command diff --git a/README.md b/README.md index d33ad87..569f46c 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ This step *can be skipped* if package auto-discovery is enabled. * key (the array key) * en (the language code) * other language codes... - + 2. Open the *project-root/resources/lang/localization.csv* file and edit it as you see fit. 3. Finally, you can use `php artisan larex:export` to translate your entries from the csv file to the laravel php files. @@ -52,19 +52,23 @@ This step *can be skipped* if package auto-discovery is enabled. * Be careful when using the `php artisan larex:export` command! It will overwrite all files named with the group names inside the CSV. * Be careful when using the **dot notation**! Only the **last** entry will override the value. * You can use `php artisan larex:insert` to add new items via CLI too! +* You can use `php artisan larex:export --include=en,it` to export only _"en"_ and _"it"_ columns. +* You can use `php artisan larex:export --exclude=it` to export only _"en"_ column. ### Example 1. Run `php artisan larex:init` command 2. Edit the *project-root/resources/lang/localization.csv* file - - | group | key | en | it | - |---|---|---|---| - | app | hello | Hello | Ciao | - | app | list.developers | Developers | Sviluppatori | - | app | list.teachers | Teachers | Insegnanti | + | group | key | en | it | + | ----- | --------------- | ---------- | ------------ | + | app | hello | Hello | Ciao | + | app | list.developers | Developers | Sviluppatori | + | app | list.teachers | Teachers | Insegnanti | + 3. Run `php artisan larex:export` command + 4. You'll get the following files: + ```php //project-root/resources/lang/en/app.php @@ -77,7 +81,9 @@ This step *can be skipped* if package auto-discovery is enabled. 'teachers' => 'Teachers', ] ]; + ``` + ```php //project-root/resources/lang/it/app.php