File tree Expand file tree Collapse file tree 4 files changed +26
-2
lines changed
Potsky/LaravelLocalizationHelpers/Commands Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,23 @@ else
131131fi
132132```
133133
134+ ##### Simulate all operations (do not write anything) with a dry run
134135
136+ ```
137+ php artisan localization:missing -r
138+ ```
139+
140+ ##### Open all must-edit files at the end of the process
141+
142+ ```
143+ php artisan localization:missing -e
144+ ```
145+
146+ You can edit the editor path in your configuration file. By default, editor is * Sublime Text* on * Mac OS X* :
147+
148+ ```
149+ 'editor_command_line' => '/Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl'
150+ ```
135151
136152### Command ` localization:find `
137153
Original file line number Diff line number Diff line change 1111 "license" : " GPL-3.0+" ,
1212 "require" : {
1313 "php" : " >=5.3.0" ,
14- "illuminate/support" : " ~ 4.1"
14+ "illuminate/support" : " >= 4.1"
1515 },
1616 "autoload" : {
1717 "classmap" : [
Original file line number Diff line number Diff line change @@ -316,18 +316,24 @@ public function fire()
316316 }
317317
318318 $ this ->line ( 'Save files: ' );
319+ $ open_files = '' ;
319320 foreach ($ job as $ file_lang_path => $ file_content ) {
320321 if ( ! $ this ->option ( 'dry-run ' ) ) {
321322 file_put_contents ( $ file_lang_path , $ file_content );
322323 }
323324 $ this ->line ( " <info> " . $ this ->get_short_path ( $ file_lang_path ) );
324325 if ( $ this ->option ('editor ' ) ) {
325- exec ( $ this -> editor . ' ' . $ file_lang_path );
326+ $ open_files .= ' ' . escapeshellarg ( $ file_lang_path );
326327 }
327328 }
328329 $ this ->line ( '' );
329330
330331 $ this ->info ( 'Process done! ' );
332+
333+ if ( $ this ->option ('editor ' ) ) {
334+ exec ( $ this ->editor . $ open_files );
335+ }
336+
331337 } else {
332338 $ this ->line ( '' );
333339 $ this ->comment ( 'Process aborted. No file have been changed. ' );
Original file line number Diff line number Diff line change 5353 'Lang::Get ' => array (
5454 '@Lang::Get\(\s*( \'.* \')\s*(,.*)*\)@U ' ,
5555 '@Lang::Get\(\s*(".*")\s*(,.*)*\)@U ' ,
56+ '@Lang::get\(\s*( \'.* \')\s*(,.*)*\)@U ' ,
57+ '@Lang::get\(\s*(".*")\s*(,.*)*\)@U ' ,
5658 ),
5759 'trans_choice ' => array (
5860 '@trans_choice\(\s*( \'.* \')\s*,.*\)@U ' ,
You can’t perform that action at this time.
0 commit comments