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.
When local module is enabled and I add a new language, swtich to that language but have not set a message text for that language in my message_type messages will have an empty text. Wouldn't it make sence to enable the support for "undefined messages". Users could enter undefined messages (or chose a translated text in the message type as undefined) and this message will be shown if the text for the current active language has no text set (returns '').
Comment | File | Size | Author |
---|---|---|---|
#14 | message_field_undefined-lang.2006702-14.patch | 1.36 KB | Devin Carlson |
#5 | message_field_undefined-lang.2006702-5.patch | 500 bytes | paolomainardi |
Comments
Comment #1
amitaibuYou can auto-copy those undefined language to the new language via
admin/config/system/message
Comment #2
manuelBS CreditAttribution: manuelBS commentedI see but if a user adds a new language and has not in mind to change these messages, it would be more user friendly if he will not receive an empty message but a message in a default language. Or am I wrong with that?
Comment #3
amitaibu#1782134: Translatable fields: Not overriding language-none values with empty default-language values
Comment #4
manuelBS CreditAttribution: manuelBS commentedThanks for that, this is the right issue
Comment #5
paolomainardi CreditAttribution: paolomainardi commented@Amitaibu: What's wrong with attached patch ?
Comment #6
paolomainardi CreditAttribution: paolomainardi commentedFrom what i can understand, using my patch you can have for free:
1) A "global" configuration for all untranslated fields
2) Localized fields just when you need to have it
Right now, you are forced to "translate" (using the copy function) for every active language.
Comment #7
amitaibu> Right now, you are forced to "translate" (using the copy function) for every active language.
Since this is just one click of a button, and is more correct (when you enable locale, each message has a language), I think we can keep as is.
Comment #8
paolomainardi CreditAttribution: paolomainardi commented@Amitaibu
I disagree, this is how locale.module works:
Comment #9
manuelBS CreditAttribution: manuelBS commented+1 for the patch, thanks for sharing!
Comment #10
amitaibuRe-opening. I'm not sure about it, but would like to hear others
Comment #11
paolomainardi CreditAttribution: paolomainardi commentedOk, thanks Amitaibu.
Comment #13
paolomainardi CreditAttribution: paolomainardi commentedI don't understand why SimpleTest fails with "message_type_create() undefined function" and so on.
Comment #14
Devin Carlson CreditAttribution: Devin Carlson commentedAn updated patch to use locale_language_list().
Comment #15
helmo CreditAttribution: helmo commentedEven though I had the patch from #14 (included in the commons makefile) I still say empty email messages as #0. The patch from #1782134: Translatable fields: Not overriding language-none values with empty default-language values worked for me.
Comment #16
joelpittetThank you! There seemed to be know way to change the Language None version through the UI!
Comment #17
ayalon CreditAttribution: ayalon commentedIt's a pitty I have to patch this module on every update.
Please be aware, that there are other languages than english and USA is nto alone on the world..
Comment #18
delacosta456 CreditAttribution: delacosta456 commentedhi
Please doest this mean a kind of language neutral ? (like it is for nodes ?)
Comment #19
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commented