martinlindhe / laravel-vue-i18n-generator

Generates a vue-i18n compatible include file from your Laravel translations
MIT License
306 stars 207 forks source link

Adding escape character #94

Closed gerpo closed 4 years ago

gerpo commented 4 years ago

Adds an escape character to allow escaping translation strings that contain the Laravel :link keyword.

This should fix #69 and allow to have strings in the translation that contains a colon but should not be treated in the typical Laravel way.

I chose "!" as a default character, because it does not have a special meaning in PHP and the combination of "!:" should be uncommon. But the escape character itself can the escaped. Furthermore, it can be changed in the config.

The impact for most users should be minimal, but since it adds the escape sequence and there is a possibility that someone has "!:foo" in the translations and now expects "!{foo}" I would consider that a breaking change.

martinlindhe commented 4 years ago

Looks good, thanks for this!

martinlindhe commented 4 years ago

Released as https://github.com/martinlindhe/laravel-vue-i18n-generator/releases/tag/0.1.41