upgrade to Laravel 5.3 in progress authored by Vladimir Schneider's avatar Vladimir Schneider
......@@ -3,7 +3,7 @@
```json
"require": {
"vsch/laravel-translation-manager": "~2.1"
"vsch/laravel-translation-manager": "~2.2"
}
```
......@@ -77,7 +77,6 @@
```php
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
//'UserCan' => Vsch\UserPrivilegeMapper\Facade\Privilege::class,
```
##### Removing dependency on UserPrivilegeMapper from facade alias array
......@@ -85,9 +84,11 @@
**If you are upgrading from version 2.0.x of LTM** you need to remove the dependency to
UserPrivilegeMapper from your application facade alias array, shown commented out above.
4.
##### Publishing and running migrations
4. You need to publish then run the migrations for this package:
You need to publish then run the migrations for this package:
```bash
$ php artisan vendor:publish --provider="Vsch\TranslationManager\ManagerServiceProvider" --tag=migrations
......@@ -108,9 +109,11 @@
translation related tables. See
[[Changing the database name|Configuration#changing-the-database-name]]
5.
##### Publishing the configuration
5. You need to publish the config file for this package. This will add the file
You need to publish the config file for this package. This will add the file
`config/laravel-translation-manager.php`
```bash
......@@ -124,15 +127,40 @@
$ php artisan vendor:publish --provider="Vsch\TranslationManager\ManagerServiceProvider" --tag=public
```
7. By default the web interface of the translation manager is available at
`http://yourdomain.com/translations`. You can change this in the configuration file. The
configuration file has 'web' and 'auth' middleware enabled on translator web interface
routes, 'web' is required 'auth' is optional, you can add any other middleware to the route
that you require.
7. By default the web interface of the translation manager is no longer mapped to a route. To
make it available at `http://yourdomain.com/translations`. Add the following to your
`routes/web.php` file:
```php
\Route::group(['middleware' => 'web', 'prefix' => 'translations'], function () {
Translator::routes();
});
```
Change the middleware and/or the prefix to adjust it to your site's requirements.
If your `config/laravel-translation-manager.php` is of an earlier version you can delete the
route related entries from it. These are no longer used:
```php
/*
|--------------------------------------------------------------------------
| Routes group config
|--------------------------------------------------------------------------
|
| The default group settings for the elFinder routes.
|
*/
'route' => [
'prefix' => 'translations',
'middleware' => ['web', 'auth'],
],
```
8.
##### Setting up user authorization
8. TranslationManager uses Laravel 5.2 abilities for providing authorization for various
TranslationManager uses Laravel 5.2 abilities for providing authorization for various
translation functions. These abilities can be defined in the app's
`AuthServiceProvider::boot` function, see example below.
......@@ -211,9 +239,11 @@
key in the `config/laravel-translation-manager.php` file, it is free to get and use. See:
<https://tech.yandex.com/translate/>
10.
##### Overriding the Web Interface Translations
10. If you want to override the Translation Manager web interface translations or add another
If you want to override the Translation Manager web interface translations or add another
locale you will need to publish the language files to your project by executing:
```bash
......@@ -223,9 +253,11 @@
This will copy the translations to your project and allow you to view/edit them in the
translation manager web interface.
11.
##### Customizing Views
11. If you want to customize views for the Translation Manager web interface you will need to
If you want to customize views for the Translation Manager web interface you will need to
publish the views to your project by executing:
```bash
......@@ -236,16 +268,21 @@
`resources/views/vendor/laravel-translation-manager` directory. See:
[[Modifying the default Views|Configuration#modifying-the-default-views]]
12.
##### Markdown to HTML conversion
12. This option can be used to automatically convert translations for keys with a given suffix
This option can be used to automatically convert translations for keys with a given suffix
to HTML and store the result for a key with the suffix removed. Can be used for translations
that contain HTML. By default this option is disabled. Enabling it would require that you
also install a package that does the HTML conversion. See
[[Markdown to HTML conversion|Configuration#markdown-to-html-conversion]]
13.
##### Enabling Edit In-Place on you pages
13. Allowing edit in-place of your site's pages will require some modification to views to
Allowing edit in-place of your site's pages will require some modification to views to
support this functionality
[[Markdown to HTML conversion|Configuration#markdown-to-html-conversion]]