Skip to content

feat(i18n): allow cookie links translation#324

Open
Cameros-agency wants to merge 6 commits into
dargmuesli:betafrom
Cameros-agency:beta-links-translations
Open

feat(i18n): allow cookie links translation#324
Cameros-agency wants to merge 6 commits into
dargmuesli:betafrom
Cameros-agency:beta-links-translations

Conversation

@Cameros-agency
Copy link
Copy Markdown

I started an issue before making that PR : #322

📚 Description

There is an accessibility issue on the text shown in the privacy links.
Actually, only one language can be setup for those text. My PR is about allowing multiple translations to be setup.

About my changes :
I edited the function methods.ts:resolveTranslatable() to use the fallback string.
I then used the method to translate the texts in CookieControl.vue.

@Cameros-agency Cameros-agency changed the title Beta links translations Allow cookie links translation Apr 22, 2026
@Cameros-agency
Copy link
Copy Markdown
Author

Hi @dargmuesli, up on this PR :)

@dargmuesli dargmuesli requested review from Copilot and dargmuesli May 5, 2026 22:51
@dargmuesli dargmuesli changed the title Allow cookie links translation feat(i18n): allow cookie links translation May 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to make the “privacy/terms” cookie links accessible in multilingual apps by allowing link labels to be configured as Translatable values and resolving the correct label at runtime.

Changes:

  • Extend Cookie.links to accept Translatable (in module option types).
  • Add an optional fallback behavior to resolveTranslatable() and use it when rendering cookie link labels.
  • Update the playground config with translated link-label examples; ignore PhpStorm .idea files.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/types.ts Extends Cookie.links typing to support translated link labels.
src/runtime/methods.ts Adds a useFallback parameter to resolveTranslatable() to attempt a fallback locale.
src/runtime/components/CookieControl.vue Uses resolveTranslatable() to render translated link labels in the modal UI.
playground/nuxt.config.ts Demonstrates translated and missing-translation link-label configurations.
.gitignore Adds .idea to ignored files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/runtime/components/CookieControl.vue Outdated
Comment thread src/runtime/methods.ts Outdated
Comment thread src/runtime/methods.ts Outdated
Comment thread src/types.ts
Cameros-agency and others added 2 commits May 11, 2026 14:35
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Cameros-agency
Copy link
Copy Markdown
Author

Hi, I pushed the requested changes

Copy link
Copy Markdown
Owner

@dargmuesli dargmuesli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your changes! 💚 The merge conflict can be resolved as indicated by the comments on the types file. I think the pipeline should turn green too then.

Comment thread src/types.ts
Comment thread .gitignore
@dargmuesli
Copy link
Copy Markdown
Owner

Hey @Cameros-agency, would you resolve the merge conflict? See #326 for context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants