GENL / matice

Use your Laravel translations in JavaScript.
MIT License
98 stars 14 forks source link

Blade directive markup #7

Closed IamXytric closed 3 years ago

IamXytric commented 3 years ago

Expected behavior

<!-- Matice Laravel Translations generated -->
<script>
  const Matice = {
    locale: "en",
    fallbackLocale: "en",
    translations: { ... }
  }
</script>

Current behavior

<!-- Matice Laravel Translations generated -->
<div id="matice-translations">
  <script type="text/javascript">
    const Matice = {
      locale: "en",
      fallbackLocale: "en",
      translations: { ... }
    }
  </script>
</div>

Reasoning

Versions

GENL commented 3 years ago

Hi! Now possible with the release 1.1.3 . Moved the id in the script tag directly.