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

Issue fork cookies-3532276

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

kaszarobert created an issue. See original summary.

jfeltkamp’s picture

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.

jfeltkamp’s picture

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

kaszarobert’s picture

Status: Active » Needs review

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'.

anybody’s picture

I guess this is once again the root cause?
#3219293: COOKiES settings translation affects Drupal Core localization translations

Better than fixing the symptoms, it would be to fix the root cause instead, but I'm unsure if it's now possible. And I'm not totally sure if my assumption is correct!