Skip to content

Commit

Permalink
support translatable feedbacks
Browse files Browse the repository at this point in the history
Laravel Kustomer now supports translations in v1.0 !
  • Loading branch information
mydnic committed Nov 23, 2018
1 parent bdf1864 commit d9f6946
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 39,302 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [Demo](#demo)
- [Installation & Configuration](#installation--configuration)
- [Configuration](#configuration)
- [Translations](#translations)
- [Display the component](#display-the-component)
- [Updating Kustomer](#updating-kustomer)
- [Include Kustomer assets with your own assets](#include-kustomer-assets-with-your-own-assets)
Expand Down Expand Up @@ -64,6 +65,12 @@ You can update the configuration of the component as you wish by editing `config

I encourrage you to carefully read this config file.

### Translations

All the texts that you can see in the components are translatable. After publishing the assets, you will find the texts in *resources/lang/vendor/en/kustomer.php*

The feedbacks labels are stored in this file as well, and the `feedbacks` array must match the one from you config file.

### Display the component

In your `public/` directory you'll find compiled css and js files that needs to be included into your html layout.
Expand Down
11 changes: 3 additions & 8 deletions config/kustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,24 @@
| Each keys (eg. "like", "dislike", etc.) will be the feedback "type"
| and will be save into your database under the "type" column.
| This allows you to filter through feedback types.
|
| Only Icons of the feedbacks are defined here. For the texts themselves,
| you need to update the translation file in *lang/vendor/en/kustomer.php*
|
*/

'feedbacks' => [
'like' => [
'title' => 'I like something',
'icon' => '/vendor/kustomer/assets/like.svg',
'label' => 'What did you like ?',
],
'dislike' => [
'title' => 'I don\'t like something',
'icon' => '/vendor/kustomer/assets/dislike.svg',
'label' => 'What did you dislike ?',
],
'suggestion' => [
'title' => 'I have a suggestion',
'icon' => '/vendor/kustomer/assets/idea.svg',
'label' => 'What is your suggestion ?',
],
// 'bug' => [
// 'title' => 'I found a bug',
// 'icon' => '/vendor/kustomer/assets/bug.svg',
// 'label' => 'Please explain what happened',
// ],
],

Expand Down
330 changes: 1 addition & 329 deletions public/css/kustomer.css

Large diffs are not rendered by default.

Loading

0 comments on commit d9f6946

Please sign in to comment.