diff --git a/.gitignore b/.gitignore index 6f0b913..b5cf006 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ phpunit.xml .DS_Store Thumbs.db .php_cs.cache +.php-cs-fixer.cache diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache deleted file mode 100644 index d13c047..0000000 --- a/.php-cs-fixer.cache +++ /dev/null @@ -1 +0,0 @@ -{"php":"8.1.4","version":"3.8.0:v3.8.0#cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":true,"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"blank_line_after_opening_tag":true,"concat_space":{"spacing":"none"},"no_multiline_whitespace_around_double_arrow":true,"no_empty_statement":true,"no_extra_blank_lines":true,"include":true,"no_alias_functions":true,"no_trailing_comma_in_list_call":true,"lowercase_cast":true,"trailing_comma_in_multiline":true,"no_leading_namespace_whitespace":true,"no_blank_lines_after_class_opening":true,"no_blank_lines_after_phpdoc":true,"object_operator_without_whitespace":true,"phpdoc_indent":true,"phpdoc_no_access":true,"phpdoc_scalar":true,"phpdoc_trim":true,"phpdoc_no_alias_tag":true,"phpdoc_var_without_name":true,"no_leading_import_slash":true,"blank_line_before_statement":true,"self_accessor":true,"array_syntax":{"syntax":"short"},"echo_tag_syntax":true,"no_trailing_comma_in_singleline_array":true,"single_blank_line_before_namespace":true,"single_quote":true,"no_singleline_whitespace_before_semicolons":true,"cast_spaces":true,"standardize_not_equals":true,"ternary_operator_spaces":true,"trim_array_spaces":true,"unary_operator_spaces":true,"no_unused_imports":true,"no_whitespace_in_blank_line":true},"hashes":{"config\/translation-loader.php":63842791,"resources\/lang\/fr\/translation.php":2175316855,"resources\/lang\/en\/translation.php":3645978281,"tests\/TranslationManagers\/DummyManager.php":1417159981,"tests\/TransTest.php":2801491842,"tests\/LanguageLineTest.php":4178284993,"tests\/TranslationLoaders\/DbTest.php":1301632235,"tests\/DummyLoader.php":1094577283,"tests\/DummyManagerTest.php":1596518446,"tests\/TranslationManagerTest.php":3164044908,"tests\/fixtures\/lang\/nl\/file.php":4049037874,"tests\/fixtures\/lang\/en\/file.php":324099922,"tests\/TestCase.php":2292272368,"src\/TranslationLoaders\/Db.php":942088056,"src\/TranslationLoaders\/TranslationLoader.php":4041154661,"src\/TranslationLoaderManager.php":1029231811,"src\/TranslationServiceProvider.php":3823907741,"src\/Exceptions\/InvalidConfiguration.php":1884439772,"src\/LanguageLine.php":1960334875,"src\/Console\/ResetTranslations.php":2512133231,"src\/Console\/SyncTranslations.php":2592104771}} \ No newline at end of file diff --git a/README.md b/README.md index 5d1e987..73680c1 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This package is an adaptation of [spatie/laravel-translation-loader](https://git composer require novius/laravel-translation-loader:dev-master ``` -In `config/app.php` (Laravel) or `bootstrap/app.php` (Lumen) you should replace Laravel's translation service provider +In `config/app.php` (Laravel) you should replace Laravel's translation service provider ```php Illuminate\Translation\TranslationServiceProvider::class, @@ -58,9 +58,6 @@ Optionally you could publish the config file using this command. php artisan vendor:publish --provider="Novius\TranslationLoader\TranslationServiceProvider" --tag="config" ``` - -> **Note:** publishing assets doesn't work out of the box in Lumen. Instead you have to copy the files from the repo. - ## Commands ```bash diff --git a/src/Console/SyncTranslations.php b/src/Console/SyncTranslations.php index 651168b..84f2efc 100644 --- a/src/Console/SyncTranslations.php +++ b/src/Console/SyncTranslations.php @@ -45,7 +45,7 @@ public function handle() $this->dbTranslationsKeys = $this->getDatabaseLanguageLineKeys(); $languageLines = collect(); - foreach ($this->filesystem->allFiles(resource_path('lang')) as $file) { + foreach ($this->filesystem->allFiles(lang_path()) as $file) { if (!in_array($file->getExtension(), $this->availableFileExtensions)) { continue; }