We have moved to GitHub Issues
Created by Sebastiaan Janssen 20 Feb 2018, 08:53:24 Updated by Sebastiaan Janssen 27 Jun 2018, 06:33:09Tags: Up For Grabs
Currently when a translation doesn't exist in the language the backoffice user is logged in as, we ultimately look in the
en.xml file to get the translation there. If it doesn't exists in
en.xml, we only show the translation key. However, since in most cases there's a perfectly valid default value in the html view itself, we should fall back to that to make it less ugly and to be less dependent on the
en.xml file being updated. A lot of times people forget to update that file when upgrading so we could make it a bit less confusing by just showing the hardcoded default.
@sebastiaan is this with regard to the localize element directive only? Can't see how it could be made to work for the attribute localization, since there's no fallback in the markup.
I can push up a PR for the element directive, to fall back to the view value if one exists, otherwise displaying the translation key as a last resort (it's a bit cleaner than using the returned value as it omits the brackets).
I don't think it would be foolproof, but provided the directive has a value in the markup, would work fine.
@NathanWoulfe I've actually changed my mind since creating this, it's actually very helpful to see the translation key when you're developing and it's also a nudge to upgraders that they forgot files. I think it's fine to leave it for now, thanks for looking into it!
Type: Feature (request)
Backwards Compatible: True
Due in version: