Problem/Motivation
If you install your site with predefined polish language, then go to admin/config/regional/language/add page to add another language from the list of available languages, you encounter form validation errors for fields which doesn't exists in form (are hidden).
It happens because polish translations for both "add language" and "add custom language" buttons are the same, so both "value" and "name" are identical. That might be a case also for other languages.
Proposed resolutions
Fix Form API to use "english" value for "op" instead of translated one.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#4 | 2351667-add-lang-4.patch | 1022 bytes | Maouna |
Comments
Comment #1
zaporylieD8MI added for context.
Comment #2
zaporylieComment #3
Maouna CreditAttribution: Maouna at bio.logis Genetic Information Management GmbH commentedComment #4
Maouna CreditAttribution: Maouna at bio.logis Genetic Information Management GmbH commentedI reproduced the bug and agree with the proposed solution. Here is a patch doing that.
In the LanguageAddForm we have two buttons, which are only distinguishable due to their different values. The problem is that this requires their values being different in all translation. Via adding a different name to each of them, we do not have to rely on that assumption anymore.
From my point of view this does not require a test, but if somebody sees that different, I can work on that, too.
Comment #5
Maouna CreditAttribution: Maouna at bio.logis Genetic Information Management GmbH commentedComment #6
Gábor HojtsyFix looks simple. Tested. It certainly works for this form. It certainly does not fix it generally. I guess we can do it for this one for now and see if we need to generalize it when it comes up again. We had this behavior for years, and such bugs did not appear before.
Comment #7
alexpottMakes sense and fixes a bug and I agree that a test would be overboard. Committed a182684 and pushed to 8.0.x. Thanks!
Comment #9
Gábor HojtsyThanks Maouna, zaporylie for making it possible to have multiple languages ;)