OFFLINE-GmbH / oc-gdpr-plugin

October CMS plugin to make websites GDPR and ePrivacy compliant
https://octobercms.com/plugin/offline-gdpr
MIT License
36 stars 20 forks source link

Translation in partials #5

Closed damsfx closed 6 years ago

damsfx commented 6 years ago

Hi,

The new Cookie Manager component use different partials and specially a dedicated one for the submit button.
That's great for translation but ...

Why not use the "trans" filter for the default view !?

{{ 'offline.gdpr::lang.common.enabled' | trans }}

// give the word : Enabled (en), Aktiviert (de), Activé (fr)

It takes advantage of the provided translation's files, don't need specific partial for specific language (if lang file is present in the plugin).

ex:

<button type="submit" class="gdpr-cookie-manager__submit-button">
    {{ 'offline.gdpr::lang.common.save_settings' | trans }}
</button>
tobias-kuendig commented 6 years ago

Good point! Fixed in 09bed29a24bd36408ad890427c0b84e953836334