I ran a Google Pagespeed test on my instance and received the following message:
I can’t explain what’s causing it. Is there an error in the translator?
I ran a Google Pagespeed test on my instance and received the following message:
I can’t explain what’s causing it. Is there an error in the translator?
I think the invalid code comes from Discourse.
Maybe instead of hreflang="<%= locale %>" it should be hreflang="<%= locale.tr('_', '-') %>" to replace the underscore.
I have submitted a Pull Request to fix this in the Discourse repository:
https://github.com/discourse/discourse/pull/39884
This change ensures the hreflang attribute is SEO-compliant while keeping the internal locale parameters functional.
Thank you for your PR, I’ve added specs and merged it.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.