conedevelopment / i18n

Push your Laravel translations to the front-end and use them easily with JavaScript.
https://pineco.de/using-laravels-localization-js/
MIT License
129 stars 21 forks source link

Fix package translations structure #22

Closed RamyTalal closed 4 years ago

RamyTalal commented 4 years ago

The output of the package translations is incorrect.

iamgergo commented 4 years ago

Can you send exactly that portion of the translations that contain the bad keys, please? I want to experiment a bit before changing the code again.

Thanks!

RamyTalal commented 4 years ago

@iamgergo Do you an email address to where I can send you the full JSON output?

iamgergo commented 4 years ago

No, just the key which gets endcoded badly and some values. If it's not confindential, you could send it here. For example:

"key": {
     "otherkey": "value"
}
RamyTalal commented 4 years ago

Here is a snippet:

"\u0000*\u0000items": {
        "shop::": {
            "articles": {
                "article": "Artikel",
            },
      }
}

I didn't specify \u0000*\u0000items. That happens when you try to serialize the items property of the Laravel Collection. If you remove "\u0000*\u0000items": { ... } the package translations work correctly again.

iamgergo commented 4 years ago

Okay, thanks! I can't reproduce this, but this does not mean that it won't happen again. Soon I'll release the new code.

RamyTalal commented 4 years ago

Thank you! I can email you the complete JSON output if you want? (I can't put it here, it's confidential).

iamgergo commented 4 years ago

I think it's fine, but thank you!