Problem/Motivation

When keeping English as default language, configuration cannot be translated from other languages to English - and previously translated config fails to load.

Steps to reproduce

There are may issues around about configuration translation for mixed language combinations but I haven't been able to find this specific one. So here it is:

* Install the site in English
* Enable any other language, say Spanish, but keep English as default.
* Switch interface to Spanish and create any configuration in Spanish. (You can try a taxonomy vocabulary which gets a language field in the creation form).
* Try to translate that configuration to English.

Expected: Configuration gets translated or otherwise you get some feedback why it is not.

Observed: You can get to the translate/add translation form, the form seems to be sent ok, no feedback, but configuration never gets saved.

Workaround: It only gets saved - and later loaded - when the English language configuration has the "Enable interface translation to English" checked. (Default is unchecked).

Proposed resolution

Ideally, allow configuration translations to be saved to whatever language whatever the "Interface translation to English" is. This has some other implications though so...

At the very least, provide some feedback on the UI about whether translations are possible / saved or not.

Remaining tasks

Patch providing some feedback to the user about what is going on.

Comments

jose reyero created an issue. See original summary.

jose reyero’s picture

This is a first rough version of the patch. It blocks the user from reaching the translation form and prints some warning message.

gábor hojtsy’s picture

Copying my slack message for posterity :)

Yeah I have this situation explained in the docs in config_language_lock (and tests both for with and without "enable interface translation to English"). I've been pondering a bit about this and the situation is that if you want to translate your own custom config to English you likely also want to translate the shipped config to English too which is what that setting enables.

So the name is slightly misleading but I think feature-wise it makes sense :) Maybe needs a better name. "Enable configuration and interface translation to English" or something :)

The shipped config has all the original English values, so it would suddenly get you very far in your translations when you enable that feature :) so if we would allow to translate to English without the "enable English UI translation" feature, then when you do enable it, we need to somehow keep track of which conflicting translations you already entered and need protected :)

This is all due to how shipped config translation is tied to interface translation.