Skip to content

Commit c819424

Browse files
committed
Revert "Supports ever changing lang folder (#170)"
This reverts commit 9e570ee.
1 parent 9e570ee commit c819424

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ The configuration will be published to `config/localization-js.php`.
8080

8181
You may edit this file to define the messages you need in your Javascript code. Just edit the `messages` array in the config file. **Empty messages array will include all the language files in build**.
8282

83-
8483
To make only `pagination.php` and `validation.php` files to be included in build process:
8584

8685
```php
@@ -94,10 +93,6 @@ return [
9493
];
9594
```
9695

97-
### Specifying the path to your language folder
98-
99-
Out of the box, this package points to `/app/lang` in Laravel 4 or the `resources/lang` in Laravel >= 5 but you can specify where yours exists by editing the `lang_path` key in the config file.
100-
10196
### Using [gulp](http://gulpjs.com/) (optional)
10297

10398
Install [`gulp-shell`](https://github.com/sun-zheng-an/gulp-shell) and then run it directly in your `gulpfile.js`:

src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,11 @@ public function register()
7070

7171
$files = $app['files'];
7272

73-
$languagePath = $this->app['config']->get('localization-js')['lang_path'];
74-
if (empty($languagePath)) {
75-
if ($laravelMajorVersion === 4) {
76-
$languagePath = 'app/lang';
77-
$langs = $app['path.base'].'/app/lang';
78-
} elseif ($laravelMajorVersion >= 5) {
79-
$languagePath = 'resources/lang';
80-
}
73+
if ($laravelMajorVersion === 4) {
74+
$langs = $app['path.base'].'/app/lang';
75+
} elseif ($laravelMajorVersion >= 5) {
76+
$langs = $app['path.base'].'/resources/lang';
8177
}
82-
$langs = $app['path.base'].$languagePath;
83-
8478
$messages = $app['config']->get('localization-js.messages');
8579
$generator = new Generators\LangJsGenerator($files, $langs, $messages);
8680

src/config/config.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,4 @@
1919
* The default path to use for the generated javascript.
2020
*/
2121
'path' => public_path('messages.js'),
22-
23-
/*
24-
* The path for your laravel lang folder
25-
*/
26-
'lang_path' => '',
2722
];

0 commit comments

Comments
 (0)