launcher-host / bread-templates

BREAD Templates with Voyager
MIT License
20 stars 7 forks source link

Translation strings do not work #4

Open gwleuverink opened 6 years ago

gwleuverink commented 6 years ago

Steps to reproduce: 1: Install Voyager v1.1.3 2: Install bread-templates via Voyager hooks 3: Define a bread with bread template json definitions on some fields 4: View the edit, create or view

In BREAD views that use bread-templates the page translation strings do not work. For example I can see voyager.generic.edit Entity in stead of Edit Entity

In the view the bread-templates use /vendor/bread-templates/resources/views/bread/edit-add.blade.php I see the following line used:

{{ __('voyager.generic.'.(isset($dataTypeContent->id) ? 'edit' : 'add')).' '.$dataType->display_name_singular }}

While in Voyager's original /vendor/tcg/voyager/resources/views/bread/edit-add.blade.php they use:

{{ __('voyager::generic.'.(!is_null($dataTypeContent->getKey()) ? 'edit' : 'add')).' '.$dataType->display_name_singular }}

I could propose a PR for just for the translation strings, but when I do a diff of voyager's edit-add.blade.php and the edit-add.blade.php file of this package I see more things in the original file that have changed since.

Furthermore In the browser console I see the following error: schermafbeelding 2018-07-18 om 12 32 44

It seems to me the edit-add.blade.php (and possibly the read.blade.phpalso) view need an update to reflect the most recent Voyager version's template markup.

akazorg commented 6 years ago

hi @gwleuverink, I will check that bug. Thanks for your message!

gwleuverink commented 6 years ago

Thank you @akazorg. That is very much appreciated!

gwleuverink commented 6 years ago

Hi @akazorg, any news?