File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11composer.lock
22vendor
3- .DS_Store
3+ .DS_Store
4+ .idea
Original file line number Diff line number Diff line change @@ -16,13 +16,16 @@ class ReadTimeServiceProvider extends ServiceProvider
1616 */
1717 public function boot ()
1818 {
19+ $ this ->loadTranslationsFrom (__DIR__ .'/../resources/lang/ ' , 'read-time ' );
20+
1921 $ this ->publishes ([
2022 __DIR__ . '/../config/read-time.php ' => config_path ('read-time.php ' )
2123 ], 'read-time-config ' );
2224
2325 $ this ->publishes ([
24- __DIR__ . "/../resources/lang/ " => resource_path ("lang/ " )
26+ __DIR__ . "/../resources/lang/ " => resource_path ("lang/vendor/read-time " )
2527 ], 'read-time-language-files ' );
28+
2629 }
2730
2831 /**
@@ -37,13 +40,15 @@ public function register()
3740 throw new Exception ('Content must be supplied to ReadTime class ' );
3841 }
3942
43+ $ this ->mergeConfigFrom (__DIR__ .'/../config/read-time.php ' , 'read-time ' );
44+
4045 $ content = $ data ['content ' ];
4146 $ omitSeconds = isset ($ data ['omit_seconds ' ]) ? $ data ['omit_seconds ' ] : config ('read-time.omit_seconds ' );
4247 $ timeOnly = isset ($ data ['time_only ' ]) ? $ data ['time_only ' ] : config ('read-time.time_only ' );
4348 $ abbreviated = isset ($ data ['abbreviated ' ]) ? $ data ['abbreviated ' ] : config ('read-time.abbreviate_time_measurements ' );
4449 $ wordsPerMinute = isset ($ data ['words_per_minute ' ]) ? $ data ['words_per_minute ' ] : config ('read-time.words_per_minute ' );
4550 $ ltr = isset ($ data ['ltr ' ]) ? $ data ['ltr ' ] : __ ('read-time.reads_left_to_right ' );
46- $ translation = isset ($ data ['translation ' ]) ? $ data ['translation ' ] : __ ('read-time ' );
51+ $ translation = isset ($ data ['translation ' ]) ? $ data ['translation ' ] : __ ('read-time::read-time ' );
4752
4853 return (new ReadTime ($ content ))
4954 ->omitSeconds ($ omitSeconds )
You can’t perform that action at this time.
0 commit comments