Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#2955 by franzrudolf
07 Jul 2016, 15:22
I have a massive problem understanding the translation practice. I have tried to change German translations by TS several times bit it just doesn't work.
For example: We don't have a privacy policy in our shop. Therefore I tried to remove the relating part of the
confirmation in checkout (last step) by changing the German translation. I have put the following TS in the setup my TS-file:

plugin.tx_aimeos.settings.i18n.de.0 {
domain = client/html/code
string = I accept the <a href=\"%1$s\" target=\"_blank\" title=\"terms and conditions\" alt=\"terms and conditions\">terms and conditions</a> and <a href=\"%2$s\" target=\"_blank\" title=\"privacy policy\" alt=\"privacy policy\">privacy policy</a>
trans = "Ich akzeptiere die <a href=\"%1$s\" target=\"_blank\" title=\"AGBs\" alt=\"AGBs\">AGBs</a>
}

Like several attempts before it doesn't work.
It doesn't even work if I change the respective entry in the respective de.po-file (.../typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/client/html/i18n/de.po)

Can anybody give a hint what's wrong?

Many thanks in advance
#2958 by aimeos
07 Jul 2016, 22:20
franzrudolf wrote:plugin.tx_aimeos.settings.i18n.de.0 {
domain = client/html/code
string = I accept the <a href=\"%1$s\" target=\"_blank\" title=\"terms and conditions\" alt=\"terms and conditions\">terms and conditions</a> and <a href=\"%2$s\" target=\"_blank\" title=\"privacy policy\" alt=\"privacy policy\">privacy policy</a>
trans = "Ich akzeptiere die <a href=\"%1$s\" target=\"_blank\" title=\"AGBs\" alt=\"AGBs\">AGBs</a>
}


If you are using version 16.x, the domain is "client" only. The domain corresponds with the path in the i18n directories, e.g. "client/i18n" -> client, "client/i18n/code" -> client/code

franzrudolf wrote:It doesn't even work if I change the respective entry in the respective de.po-file (.../typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/client/html/i18n/de.po)


The .po files are not used directly. Gettext requires binary files (typically .mo - machine objects, in our case "de.po" -> "de") that are generated from the .po files when we update the translations.
#2960 by franzrudolf
08 Jul 2016, 06:30
Thank you for your help.

I have tried it with a single word (address -> Adresse) and it works fine with the domain client/html
But I really don't find out how I can translate a whole sentence that takes more than one line in the .po-file. For example:

Code: Select all#, php-format
msgid ""
"I accept the <a href=\"%1$s\" target=\"_blank\" title=\"terms and "
"conditions\" alt=\"terms and conditions\">terms and conditions</a> and <a "
"href=\"%2$s\" target=\"_blank\" title=\"privacy policy\" alt=\"privacy "
"policy\">privacy policy</a>"
msgstr "Ich akzeptiere die <a href=\"%1$s\" target=\"_blank\" title=\"AGBs\" alt=\"AGBs\">AGBs</a> und die <a href=\"%2$s\" target=\"_blank\" title=\"Datenschutzrichtlinien\" alt=\"Datenschutzrichtlinien\">Datenschutzrichtlinien</a>"


This TS does not work:

Code: Select allplugin.tx_aimeos.settings.i18n.de.0 {
  domain = client/html
  string (
""
"I accept the <a href=\"%1$s\" target=\"_blank\" title=\"terms and "
"conditions\" alt=\"terms and conditions\">terms and conditions</a> and <a "
"href=\"%2$s\" target=\"_blank\" title=\"privacy policy\" alt=\"privacy "
"policy\">privacy policy</a>"
)
  trans = test
}


And this doesn't work either:

Code: Select allplugin.tx_aimeos.settings.i18n.de.0 {
  domain = client/html
  string = I accept the <a href=\"%1$s\" target=\"_blank\" title=\"terms and conditions\" alt=\"terms and conditions\">terms and conditions</a> and <a href=\"%2$s\" target=\"_blank\" title=\"privacy policy\" alt=\"privacy policy\">privacy policy</a>
  trans = test
}


Can you tell me what is the correct syntax, please?
#2961 by franzrudolf
08 Jul 2016, 06:53
Now I have found out the correct syntax:

Code: Select allplugin.tx_aimeos.settings.i18n.de.0 {
  domain = client/html
  string = I accept the <a href="%1$s" target="_blank" title="terms and conditions" alt="terms and conditions">terms and conditions</a> and <a href="%2$s" target="_blank" title="privacy policy" alt="privacy policy">privacy policy</a>
  trans = test2
}
}


Thank you anyway
#3142 by velo
02 Aug 2016, 07:32
Thank you very much.
I escaped the slashes. But it perfectly makes sense to not escape them.

I see, the community is growing and helping each other. :)

Greetings
[pb]