Skip to content

Translation strings do not work #4

@gwleuverink

Description

@gwleuverink

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions