Translation issue?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
DmS
Posts: 19
Joined: 09 Aug 2021, 08:59

Translation issue?

Post by DmS » 13 Sep 2021, 13:02

I've added a new translation file for swedish for the client side in my extension.
This all works very well. But on the product detail page I get this text above the add to basket button

Code: Select all

Finns i lager stocktype:default
The "Finns i lager" is my translation for stock-high but want to get the right text instead of the "stocktype:default" I'm guessing there is a translation somewhere.

In this case the text stocktype:default comes from the /ext/dinsaluhall/client/html/catalog/stock/body-standard.php
where translate is called at row 69-73, like this

Code: Select all

$stockType = 'stocktype:' . $item->getType();
if( !isset( $typeText[$stockType] ) ) {
	$typeText[$stockType] = $this->translate( 'client/code', $stockType );
}
I can't find the key 'client/code' anywhere in the codebase other than being used as a key in a lot of various templates and cases, tried adding it to my .po file, didn't work.
What am I missing?

Thanx/Dan
_____________
Laravel 8 with Aimeos 2021.07 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

DmS
Posts: 19
Joined: 09 Aug 2021, 08:59

Re: Translation issue?

Post by DmS » 13 Sep 2021, 13:52

Found it.
For others that wonder, these translations are .po files in the i18n/code/ folder
To translate to text, add the text you want, to remove, add a whitespace as translation.
/Dan
_____________
Laravel 8 with Aimeos 2021.07 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

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

Re: Translation issue?

Post by aimeos » 13 Sep 2021, 19:08

If you do in Transifex, it will be fixed for all others too:
https://www.transifex.com/aimeos/public/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

DmS
Posts: 19
Joined: 09 Aug 2021, 08:59

Re: Translation issue?

Post by DmS » 14 Sep 2021, 13:44

Added client .po and client/code .po with swedish translations to transifex
_____________
Laravel 8 with Aimeos 2021.07 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

Post Reply