mollie / laravel-cashier-mollie

Official Mollie integration for Laravel Cashier
https://www.cashiermollie.com/
MIT License
137 stars 45 forks source link

Translations are sometimes not working #238

Closed voicecode-bv closed 7 months ago

voicecode-bv commented 7 months ago

Hi there,

We're haunted with an issue where the translations are occasionally not being respected.

We support 3 languages, NL, EN and FR.

I can confirm that for each language there's a payment.php file in the correct lang folder and in that file there's a description entry:

'description' => 'Order: number',

Narrowing it down, it seems like this happens when a user swaps a plan.

Screenshot 2024-04-17 at 13 16 05 Screenshot 2024-04-17 at 13 08 04
voicecode-bv commented 7 months ago

I'm sorry, I think we needed to add some configuration on our end. Closing this one.

sandervanhooft commented 7 months ago

Hi @voicecode-bv ,

Thanks for raising this issue.

At first glance it looks like the translation is missing on Subscription.scheduleNewOrderItemAt.

@Naoray can you confirm?

voicecode-bv commented 7 months ago

Hi @sandervanhooft

I think its something on our end. I just read about publishing the /lang/vendor/cashier translations and adding the getLocale() method to the, in my case, User model.

I initially thought putting the translations in /lang/en/payment.php would be sufficient.

I've pushed the translations now so we'll see if that solves the issue.

Naoray commented 6 months ago

Hi @voicecode-bv,

yes, you are right. To override package translations you have to put the translation into lang/vendor/{package}/{locale}.

S. laravel documentation for more details