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

split english language files to frontend and backend #51

Closed CptMeatball closed 4 years ago

CptMeatball commented 5 years ago

Still a work in progress.

This PR splits the current language file into two seperate file. One for the frontend (lang/xx/frontend.php) and one for the backend (lang/xx/lang.php). This prevents the need of translating the entire file when only front-end translations are needed. It hopefully makes it easier for other contributors to add their own language.

What needs to be done:

How it works

On the frontend the current language strings are replaced with updated strings that point to the new frontend language file.

e.g.

// Old syntax
{{ 'offline.gdpr::lang.commons.links' | trans }}
// New syntax
{{ 'offline.gdpr::frontend.commons.links' | trans }}

(PR for issue #50 )

CptMeatball commented 5 years ago

@tobias-kuendig Can you check if I've covered all language strings in the components? Two pair of eyes see more than one.

tobias-kuendig commented 5 years ago

Looking great so far! I guess the cookie_manager.description string is only used in the backend so this can be removed.