Closed svoop closed 1 year ago
Nice writeup! 👍
I've reproduced this on a site using v1.2 beta4 and pushed it here https://github.com/vvveebs/BT-Locale-Testing
After poking a bit, I think the pattern here is - does the resource have a locale in the filename? If so, the locale is returned as a string.
Still in the guessing stages, but I think the behaviour could originate in the Permalink Processor:
Some resources return the locale as Symbol, others as String:
No biggie, but it's a trap when you're not aware and compare
resource.data.locale
e.g. againstI18n.locale
(Symbol).The two in
_pages
return Symbol, the remaining in subdirs return String. Maybe a coincidence, but sure looks like a pattern.Bridgetown Version: v1.1.0
To Reproduce I can bootstrap an example site if need be.
Current behavior Returns Symbol or String
Expected behavior Returns Symbol
Computing environment (please complete the following information):