bread-templates icon indicating copy to clipboard operation
bread-templates copied to clipboard

Translation strings do not work

Open gwleuverink opened this issue 6 years ago • 3 comments

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.

gwleuverink avatar Jul 18 '18 10:07 gwleuverink

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

akazorg avatar Jul 19 '18 01:07 akazorg

Thank you @akazorg. That is very much appreciated!

gwleuverink avatar Jul 19 '18 08:07 gwleuverink

Hi @akazorg, any news?

gwleuverink avatar Aug 22 '18 13:08 gwleuverink