Problem/Motivation

The schema configuration API for the privacy policy link is currently using a type 'label':

    popup_link:
      type: label
      label: 'Privacy policy link'

'label' is a translatable string but doesn't offer url validation.

See https://git.drupalcode.org/project/eu-cookie-compliance/-/blob/8.x-1.x/c...

Proposed resolution

We should use uri instead.

Remaining tasks

Note: Drupal core has a bug that doesn't allow the uri to be translated in the UI.

CommentFileSizeAuthor
#9 3185140-9.patch1.03 KBvacho
#8 3185140-8.patch928 bytesvacho
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Issue fork cookiebot-3185140

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mpp created an issue. See original summary.

mpp’s picture

Project: Cookiebot - Cookie consent, Cookie monitoring and Cookie control » EU Cookie Compliance (GDPR Compliance)

mpp’s picture

svenryen’s picture

Status: Active » Needs review

Thanks for the patch. I will take a look later.

svenryen’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hi!

I applied your patch, but I can't see the link being translatable in Drupal 8. Is translations of urls a new option for Drupal 9?

vacho’s picture

StatusFileSize
new928 bytes

Creating a patch for #4 mr

vacho’s picture

StatusFileSize
new1.03 KB

This patch fixed adds a path format to the default value.

@svenryen for D8 and D9 yes we can set a key as translatable or not. https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-...

Also to get this patch working well unfortunately we need to apply this another core patch too

https://www.drupal.org/project/drupal/issues/2866303#comment-14195658

neslee canil pinto’s picture

Tested #9 and seems to be a valid patch which can be approved and merged into the module, but the thing is we are depending for core patch also, so until its merged to core we cant move forward with committing for the time being

svenryen’s picture

Status: Postponed (maintainer needs more info) » Needs review
svenryen’s picture

Status: Needs review » Needs work

The core issue still hasn't been merged, so I'll move this one to "Needs work".

svenryen’s picture

Category: Bug report » Task

svenryen’s picture

Status: Needs work » Fixed

I'm closing this since we now have translatable settings (per language) in 2.0.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.