middleman / middleman

Hand-crafted frontend development

Home Page:https://middlemanapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

link_to not generating correct URLs when using i18n and directory_indexes

jetxr opened this issue · comments

commented

Expected behavior and actual behavior

link_to does not generate correctly prefixed i18n URLs when using directory_indexes.

I somehow remember this working before. Has anything changed or was this always the case?

Steps to reproduce the problem (from a clean middleman installation)

Reproduced here: https://github.com/jetxr/mm-i18n-test/blob/main/source/localizable/index.html.erb

  • Followed steps in the docs to add i18n
  • Links with link_to are correctly generated with the locale prefixed when inside the locale's namespaced path
  • Add activate :directory_indexes to config.rb
  • Change link_to to target /page/index.html (or leave it page.html)
  • Links will lead to the root locale's page even when inside locale's namespaced path

Additional information

  • Not sure if this is similar to #1798, #1693

  • Doesn't seem like the tests have directory indexes enabled

  • Ruby version: 3.2.1

  • Middleman version: 4.4.3

  • OS version: macOS 13.3

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.