Changing button label for the save cookie settings messes up every Save button's translation on all forms

Created on 25 June 2025, 9 days ago

Problem/Motivation

If we enter "Save settings" to the "Button label for the save button (Default: "Save")" field /admin/config/system/cookies/texts, then after saving, every node form, config form and all over the UI where there's a Save button, their text changes to that. And it is weird to show a "Save settings" button on an article form where we do not save any setting technically etc.

This is even a bigger problem on multi-language sites as if someone translates "Save settings" on the COOKiES form to "Save cookie settings", then translators and site admins will not be aware that we will display that translation as the button label on every form where there's a Save button originally.

My proposal would be changing that default from 'Save' to 'Save settings', or use String context for translatabl cookie strings wherever possible.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡ΈπŸ‡°Slovakia kaszarobert

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @kaszarobert
  • πŸ‡©πŸ‡ͺGermany jfeltkamp Hamburg

    Yes, this issue keeps cropping up. Are you familiar with the Translation API and could you submit a change request for context-sensitive translations (only for generally recurring translations, like "Save")? That would be great. I'll review it as soon as possible.

  • πŸ‡©πŸ‡ͺGermany jfeltkamp Hamburg
  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    As I looked into the module I saw that all the text comes from translated config and as far as I know, context cannot be used for config translated strings. So with the existing functionality the only choice would be modifying the default value of the label in config/install/cookies.texts.yml. That way this label's value will modify the translation of 'Save settings' instead of the generally used 'Save'.

  • Pipeline finished with Success
    9 days ago
    Total: 409s
    #531030
  • Pipeline finished with Success
    9 days ago
    Total: 485s
    #531040
Production build 0.71.5 2024