Skip to content

Conversation

@liberaldev
Copy link
Contributor

@liberaldev liberaldev commented Dec 24, 2025

This pull request introduces improved support for language codes and fonts in the site, especially focusing on better handling of language attributes and locale formatting. It adds a new test suite for the HTML language plugin, updates the language selector to use more accurate HTML language tags, and ensures consistent font application for elements with a language attribute. It has the nature of reinforcing #3718.

Language attribute improvements:

  • Updated the language selector in _includes/language_selector.html to use more accurate lang attributes and proper HTML semantics, improving accessibility and internationalization.
  • Added a CSS rule in stylesheets/tailwind.css to apply the default font to [lang] elements, fixing a font application issue that occurred when selecting CJK languages (Chinese, Japanese, Korean) and other languages. CJK languages are excluded as they already have dedicated font rules for their specialized typography requirements.

Testing and build process:

  • Added a new Rake test task for the HTML language plugin in Rakefile and included it in the main test task, ensuring the plugin is tested as part of the CI process. [1] [2]
  • Introduced a comprehensive test file test/test_plugin_html_lang.rb to verify the behavior of the to_html_lang filter, including its integration with Liquid templates. This test code was generated using RubyMine's Junie. This facilitates maintenance.

@liberaldev liberaldev requested a review from a team as a code owner December 24, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant