email delivery/payment translations

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
WGSF
Posts: 22
Joined: 04 Apr 2023, 11:12

email delivery/payment translations

Post by WGSF » 05 Aug 2023, 17:47

Laravel 10+, aimeos 2022.10, php 8.2

Hello,

-Payment and Delivery Emails sent with language other than 'en' (in that case 'fr'), contains 'defaut' instead of the price. (coming from summary-text.php I think). Is it a default with ai-client-html/.../i15n/fr.po ?

- Payment and Delivery mail title 'Your order' remains in 'en', should be translated in 'fr'.

- Bcc mails are not sent. Is there a way to override ai-controller-jobs/src/Controller/Jobs/Order/Email/Delivery/Standard.php. ?

Thank you

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: email delivery/payment translations

Post by aimeos » 07 Aug 2023, 11:28

WGSF wrote: 05 Aug 2023, 17:47 -Payment and Delivery Emails sent with language other than 'en' (in that case 'fr'), contains 'defaut' instead of the price. (coming from summary-text.php I think). Is it a default with ai-client-html/.../i15n/fr.po ?
The translation was wrong and that will be fixed with the next minor release of ai-controller-jobs package.
WGSF wrote: 05 Aug 2023, 17:47 - Payment and Delivery mail title 'Your order' remains in 'en', should be translated in 'fr'.
Is only the title not translated or also the e-mail content? Because the subject should be translated here:
https://github.com/aimeos/ai-controller ... d.php#L472

WGSF wrote: 05 Aug 2023, 17:47 - Bcc mails are not sent. Is there a way to override ai-controller-jobs/src/Controller/Jobs/Order/Email/Delivery/Standard.php. ?
How did you configure the BCC e-mail? It's "resource/email/bcc-email":
https://github.com/aimeos/ai-controller ... l.php#L100
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

WGSF
Posts: 22
Joined: 04 Apr 2023, 11:12

Re: email delivery/payment translations

Post by WGSF » 07 Aug 2023, 12:25

Hello,
Is only the title not translated or also the e-mail content? Because the subject should be translated here:
https://github.com/aimeos/ai-controller ... d.php#L472
Only the title. I agree it should be translated there but it doesn't translate...
How did you configure the BCC e-mail? It's "resource/email/bcc-email":
https://github.com/aimeos/ai-controller ... l.php#L100
Yes That works !
I was using : $msg->bcc( $config->get( 'controller/jobs/order/email/delivery/bcc-email', [] ) ); in Standard.php file.

Thank you and by the way congratulations to Aimeos team. It works well and I enjoy working with.

WGSF
Posts: 22
Joined: 04 Apr 2023, 11:12

Re: email delivery/payment translations

Post by WGSF » 07 Aug 2023, 13:02

Is only the title not translated or also the e-mail content? Because the subject should be translated here:
https://github.com/aimeos/ai-controller ... d.php#L472
and also ai-controller-jobs/templates/order/email/payment/html.php ??

Code: Select all

!doctype html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><title> <?= $enc->html( sprintf( $this->translate( 'controller/jobs', 'Your order %1$s' ), $

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: email delivery/payment translations

Post by aimeos » 08 Aug 2023, 09:10

WGSF wrote: 07 Aug 2023, 12:25 Only the title. I agree it should be translated there but it doesn't translate...
We've fixed the problem in aimeos/aimeos-laravel:2023.07..x-dev. Can you please install that version and check?

Code: Select all

composer req aimeos/aimeos-laravel:2023.07.x-dev
How did you configure the BCC e-mail? It's "resource/email/bcc-email":
Thank you and by the way congratulations to Aimeos team. It works well and I enjoy working with.
Thanks a lot! :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: email delivery/payment translations

Post by aimeos » 08 Aug 2023, 10:15

Tested again and it also worked before any changes. The language must only be enabled in the Locale > Language panel.

For translation in e-mails, the language selected during the checkout process and stored in the address of the order is used (not necessarily the same as used in the frontend if a different language in chosen during checkout).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

WGSF
Posts: 22
Joined: 04 Apr 2023, 11:12

Re: email delivery/payment translations

Post by WGSF » 08 Aug 2023, 17:51

We've fixed the problem in aimeos/aimeos-laravel:2023.07..x-dev. Can you please install that version and check?
OK, I'll try that soon.
Thanks again.

WGSF
Posts: 22
Joined: 04 Apr 2023, 11:12

Re: email delivery/payment translations

Post by WGSF » 27 Aug 2023, 13:30

We've fixed the problem in aimeos/aimeos-laravel:2023.07..x-dev. Can you please install that version and check?
Tried :
composer require aimeos/aimeos-laravel:2023.07..x-dev
./composer.json has been updated
Running composer update aimeos/aimeos-laravel
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires aimeos/aimeos-laravel 2023.07..x-dev, found aimeos/aimeos-laravel[dev-master, 1.0.0, ..., 1.2.x-dev, 2016.01.1, ..., 2016.10.x-dev, 2017.01.1, ..., 2017.10.x-dev, 2018.01.1, ..., 2018.10.x-dev, 2019.01.1, ..., 2019.10.x-dev, 2020.01.1, ..., 2020.10.x-dev, 2021.01.x-dev, ..., 2021.10.x-dev, 2022.01.x-dev, ..., 2022.10.x-dev, 2023.01.x-dev, ..., 2023.07.x-dev] but it does not match the constraint.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Same with -W option

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: email delivery/payment translations

Post by aimeos » 27 Aug 2023, 16:37

Can you share you composer.json file?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

WGSF
Posts: 22
Joined: 04 Apr 2023, 11:12

Re: email delivery/payment translations

Post by WGSF » 27 Aug 2023, 17:16

Yes

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"repositories": [{
"type": "composer",
"url": "https://packages.aimeos.org/aimeoscom"
}, {
"type": "path",
"url": "packages/*"
}],
"require": {
"php": "^8.1",
"aimeos-extensions/essaiextension1": "dev-main",
"aimeos/ai-client-html": "2022.10.x-dev",
"aimeos/ai-controller-jobs": "2022.10.x-dev",
"aimeos/aimeos-laravel": "~2022.10",
"guzzlehttp/guzzle": "^7.2",
"laravel/breeze": "^1.20",
"laravel/framework": "^10.0",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"symfony/http-client": "^6.3",
"symfony/mailgun-mailer": "^6.3"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.0",
"spatie/laravel-ignition": "^2.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force",
"@php artisan migrate",
"@php artisan vendor:publish --tag=public --force",
"\\Aimeos\\Shop\\Composer::join"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}

Thanks

Post Reply