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.
The var settings.no_empty_message is used in autocomplete_deluxe.js but not defined in settings forms, so it's always 'undefined' and fired the default value.
this.no_empty_message = typeof settings.no_empty_message == 'undefined' ? 'No terms could be found. Please type in order to add a new term.' : settings.no_empty_message;
Comment | File | Size | Author |
---|---|---|---|
#7 | no-empty-message-with-t-3025375-6.patch | 3.31 KB | oriol_e9g |
Comments
Comment #2
oriol_e9gComment #3
oriol_e9gOh! I'm touching code that's out of scope, minimizing changes.
Comment #4
oriol_e9gComment #5
oriol_e9gIf you apply tthe solution in #3025308: Drupal.t cannot translate strings passed through vars we need to translate the string in php side. If you prefer other solution for message translations you can apply patch in #2.
Comment #6
oriol_e9gFixing missing semicolon in previos patches. Attach two patches with t function and without t function.
Comment #7
oriol_e9g#3025308: Drupal.t cannot translate strings passed through vars is commited, reupload the correct patch.
Comment #8
edwardchiapetThank you, @oriol_e9g!
I have tested the patch and confirmed that it adds the empty message to the widget settings.
Will merge into 8.x-1.x-dev.
Comment #10
edwardchiapet