Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The feature to configure placeholder texts in the Views UI was added in #2917594: Add support for HTML5 placeholder in views exposed filters. However, these placeholders are not translatable because the config schema was set to "string" (not translatable) instead of "label" (translatable).
Proposed resolution
Fix the config schema to make placeholders translatable.
Remaining tasks
Review, possibly test.
Do we need to add an update hook that transfers the default language placeholders into any existing views translations?
> No we don't
Comment | File | Size | Author |
---|---|---|---|
#11 | drupal-translatable_placeholders-3023452-11.patch | 1.5 KB | abhishek_v |
#5 | 3023452-5.patch | 1.51 KB | Lendude |
#5 | interdiff-3023452-2-5.txt | 492 bytes | Lendude |
#2 | drupal-translatable_placeholders-3023452-2.patch | 943 bytes | ckaotik |
Comments
Comment #2
ckaotikPlease review the attached patch.
Comment #3
LendudeComment #4
LendudeSorry that was submitted a little too quickly :)
I just manually tested this and it works fine.
We don't need an upgrade path to add the translation to any existing translations, but we do need one to trigger a cache clear to make this work
Comment #5
Lendudehere we go.
Comment #6
ckaotikAwesome, thank you! Guess I just learned how to do a cache rebuild during updates :D
Comment #7
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #8
Gábor HojtsyComment #10
Gábor HojtsyThanks, committed to 8.7.x, does not apply to 8.6.x unfortunately.
Comment #11
abhishek_v CreditAttribution: abhishek_v at Google Summer of Code commentedI modified the placeholder datatype to label in version 8.6.x and added the cache function provided in ckaotik's patch. This seemed to make the placeholder text translatable. Please review the patch.
Comment #12
alexpottThe 8.6.x branch is now closed for bugfixes. This will be released as bugfix in 8.7.0. Thanks @abhishek_v for your contribution unfortunately there was not time to get this in.
Comment #13
alexpott