I am fairly new to LocomotiveCMS and this took me much longer to figure out than it would have been necessary. I am using the translate filter to localise my content.
However, when a translation is missing in the database, the user is confronted with the following exception, instead of a meaningful error message or an inline notice (like Rails does it):
NoMethodError in Locomotive::Public::PagesController#show
undefined method `values' for nil:NilClass
locomotive_cms (2.4.1) lib/locomotive/liquid/filters/translate.rb:19:in `translate'
I am very surprised that apparently nobody has noticed this issue before, which is why I'd like to hear your comments first before working on a patch. However, my strong suggestion is to just go with the Rails approach and show an inline element for missing translations à la <span class="translation-missing">Translation missing for key: 'my_translation_key'</span>
<span class="translation-missing">Translation missing for key: 'my_translation_key'</span>
Looking forward to hear your opinion.
Faced the same issue here ( #893 )
What I think would be useful is handling it in 2 ways:
1.Create translation keys from translations.yml upon deploy from wagon
2. Create additional tab (or just create blank translation keys and mark them appropriately) for missing translation keys found in templates so that they could be filled right away in cms
very annoying behavior indeed. fixed in the master branch.