aimeos / aimeos-typo3

TYPO3 e-commerce extension for ultra fast online shops, scalable marketplaces, complex B2B applications and #gigacommerce
https://aimeos.org/TYPO3
GNU General Public License v3.0
274 stars 738 forks source link

Renaming "Supplier" via page.tsConfig has no impact #199

Closed rowild closed 1 year ago

rowild commented 1 year ago

According to this post: https://aimeos.org/help/viewtopic.php?f=15&t=5173&p=20221 the renaming of menu items of Aimeos should work via a page typoscript like this:

https://aimeos.org/help/viewtopic.php?f=15&t=5173&p=20221

module.tx_aimeos.settings.i18n.en.0 {
  domain = admin
  string = supplier
  trans {
    0 = Event Location
    1 = Event Locations
  }
}

module.tx_aimeos.settings.i18n.de.0 {
  domain = admin
  string = supplier
  trans {
    0 = Veranstaltungsort
    1 = Veranstaltungsorte
  }
}

However, this does not work at all.

Tested with: TYPO3 10.4.36, 11.5.25 php8.1 aimeos 21.10.7, aimeos 22.10.5, Aimeos Distribution

The TS was inserted in "Page Properties > Resources > Page TsConfig", but also used in a theme extension where, in "ext_localconf.php" these lines

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

ExtensionManagementUtility::addPageTSConfig(
  "@import 'EXT:theme/Configuration/TSconfig/page.tsconfig'"
);

included this script from "EXT:theme/Configuration/TSconfig/page.tsconfig":

module.tx_aimeos.settings.i18n.en.0 {
  domain = admin
  string = supplier
  trans {
    0 = Event Location
    1 = Event Locations
  }
}

module.tx_aimeos.settings.i18n.de.0 {
  domain = admin
  string = supplier
  trans {
    0 = Veranstaltungsort
    1 = Veranstaltungsorte
  }
}
aimeos commented 1 year ago

Guess, these settings will be only used if you open the admin backend with a page selected in the page tree. The translation option that is always working is adding a Gettext .po files in the ./i18n/admin/ directory with your translations and compile it into a MO file: https://aimeos.org/docs/latest/developer/translations/#gettext

rowild commented 1 year ago

I tried to have a site active, but that does not make any difference - still not working. Which ./i18n/admin folder are you talking about? Where would that one be? vendor/aimeos/ai-admin-jqadm/i18n? There is no admin folder and there aren't any newly created files... (neither in any other aimeos-related folders)

Screenshot 2023-03-08 at 08 54 59

aimeos commented 1 year ago

Please read https://aimeos.org/docs/master/developer/translations/#replace-translations

rowild commented 1 year ago

"Copy the existing .po file (e.g. de.po) to the same directory as in the core extensions, e.g. from "./vendor/aimeos/ai-client-html/i18n/de.po" to "./packages/myextname/i18n/client/de.po"

This is not at all the "same directory" [structure]!?!?!?

How does that translate to "ai-admin-jqadm" in a TYPO3 extension? (I use a sitepackage ext that was generated by the "Aimeos extensions generator"; and it seems the structure changed a lot between 2020 and 2022...)

I tried: ./packages/theme/Resources/Private/Extensions/aimeos/ai-admin-jqadm/i18n/

It contains the files de de.po en en.po

But it does not work.

There is also a "theme" folder that was created by the Aimeos ext generator and mirrors some aimeos sturcture. Within "theme" there is also a "i18n" folder. Putting the translation files there does not work either.

Screenshot 2023-03-08 at 10 35 40

aimeos commented 1 year ago

Sorry, there was an error in the documentation. Now it's fixed.

rowild commented 1 year ago

I don't see any changes...

aimeos commented 1 year ago

copy "./vendor/aimeos/ai-client-html/i18n/de.po" to "./packages/myextname/i18n/de.po"

Maybe you have to force reload the page.

rowild commented 1 year ago

I did, of course! Are you addressing the TYPO3 ext structure in your example? I need to change terms in "ai-admin-jqadm". So I copy the en and de files to my typo3 ext to the location the docu recommends. If the example is really the way to go, how would I add de and en files from another aimeos extenstion like "ai-client-html" without overwriting the already existing de and en files in my ext???