Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translating the cookie list view (GER) / changing the template not possible #86

Closed
kriemhildt opened this issue Jan 27, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@kriemhildt
Copy link

Hello there,
I'm currently trying to translate the table that shows the cookie list.
First, I set the template path in the constants:

plugin.tx_cookieconsent.view.partialRootPath = EXT:myext/Resources/Private/Partials/dp_cookieconsent/
plugin.tx_cookieconsent.view.templateRootPath = EXT:myext/Resources/Private/Templates/dp_cookieconsent/
plugin.tx_cookieconsent.view.layoutRootPath = EXT:myext/Resources/Private/Layouts/dp_cookieconsent/

It might be that the general problem is already existent at this point. But I can't find it. Nevertheless this is how I went on:

Because there currently is no german translation for the thead table rows I then went into the template and changed the translation key to the path of my extension and the language files within.

 <f:translate key="LLL:EXT:myext/Resources/Private/Language/de.locallang.xlf:cookie.name"/>

I created the corresponding language file in my extension and added the missing items. Like this:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" date="2015-09-19T09:11:39Z" product-name="theme_t3kit">
		<header/>
		<body>
            <trans-unit id="cookie.name">
                <source>Cookies</source>
                <target>Cookies</target>
            </trans-unit>
            <trans-unit id="cookie.category">
                <source>Category</source>
                <target>Kategorie</target> // this for example is not shown in the FE
            </trans-unit>
...

As I said, maybe the problem started way before altering the template file, because I can't make any changes to the template.

image

But I know for sure that clearing the cache isn't the problem.

Any help would be much appreciated :)

@asche76
Copy link

asche76 commented Jan 27, 2022

would use the ext translate_locallang. with this ext u can easy translate all labels:

image

image

image

@kriemhildt
Copy link
Author

@asche76 thanks for the tip! I can see the benefits of this approach. But I was hoping to achieve this without an additional extension.

@asche76
Copy link

asche76 commented Jan 28, 2022

problem with this method is, after dp_cookie ext update the new labels are reverted to the default ones. i thought the translation locallang ext would have saved the changes as some kind of overlay or abstraction somewhere -.-

@DirkPersky DirkPersky self-assigned this Jan 28, 2022
DirkPersky added a commit that referenced this issue Jan 28, 2022
@DirkPersky
Copy link
Owner

fixed in next release

@DirkPersky DirkPersky added the enhancement New feature or request label Jan 28, 2022
DirkPersky added a commit that referenced this issue Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants