Skip to content

Dynamic optional catch-all segments not working #917

Description

@itsberkelium

Description

I have folders such as /items/[[...slug]]/page.tsx.

I also have the route added to navigation.ts as

"/items/[...slug]": {
    tr: "/ilanlar/[...slug]",
    en: "/items/[...slug]",
  },

However, when I visit /tr/ilanlar, the app shows a 404 page while /tr/ilanlar/test, /en/items/test, and /en/items renders perfectly.

I also tried the following with no luck.

"/items/[[...slug]]": {
    tr: "/ilanlar/[[...slug]]",
    en: "/items/[[...slug]]",
  },

Mandatory reproduction URL

https://codesandbox.io/p/github/itsberkelium/next-intl-bug-repro-app-router/main

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Go to /en/items url
  3. Should work fine
  4. Go to /tr/ilanlar url
  5. See error: 404

Expected behaviour

It should render without slug for both locales.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions