General translation problem

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
franzrudolf
Posts: 38
Joined: 23 Nov 2015, 14:10

General translation problem

Post 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

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

Re: General translation problem

Post 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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

franzrudolf
Posts: 38
Joined: 23 Nov 2015, 14:10

Re: General translation problem

Post 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 all

plugin.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 all

plugin.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?

franzrudolf
Posts: 38
Joined: 23 Nov 2015, 14:10

Re: General translation problem

Post by franzrudolf » 08 Jul 2016, 06:53

Now I have found out the correct syntax:

Code: Select all

plugin.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

velo
Posts: 44
Joined: 20 Jun 2016, 06:58

Re: General translation problem

Post 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]

Post Reply