I think the invalid code comes from Discourse.
Maybe instead of hreflang="<%= locale %>" it should be hreflang="<%= locale.tr('_', '-') %>" to replace the underscore.
I think the invalid code comes from Discourse.
Maybe instead of hreflang="<%= locale %>" it should be hreflang="<%= locale.tr('_', '-') %>" to replace the underscore.