Giter Site home page Giter Site logo

Comments (4)

memic84 avatar memic84 commented on July 30, 2024 1

@BobbieGoede my mistake, for reason a question mark was appended in the route name. Fixed and not a module issue.

from i18n-module.

BobbieGoede avatar BobbieGoede commented on July 30, 2024

It's been a while back since I dived into debugging and figuring out a solution for #2698 but from what I remember the core cause of your issue is the same, I should probably update the issue description.

The module internally uses $router.resolve to retrieve the localized route based on the passed argument. In some cases the resolve function is used more than once with a previous resolved result, unfortunately doing so loses information:

const router = useRouter()
const arg = '/en/blog/my-blog-post%23number1-someid'
const resolved1 = router.resolve(arg)
const resolved2 = router.resolve(resolved1)

console.table({ arg, resolved1: resolved1.fullPath, resolved2: resolved2.fullPath })

Would result in this

key value
arg /en/blog/my-blog-post%23number1-someid
resolved1 /en/blog/my-blog-post%23number1-someid
resolved2 /en/blog/my-blog-post#number1-someid

I have some working concepts that deal with this issue from a while ago but they involve some larger changes to the routing logic, it will take time to test and see which solution makes most sense. So unfortunately I won't have a solution in the short term! Will let you know if I find any workarounds to use instead.

from i18n-module.

memic84 avatar memic84 commented on July 30, 2024

Kind a same issue here, where the output of localePath now containers %3F at the end.

from i18n-module.

BobbieGoede avatar BobbieGoede commented on July 30, 2024

@memic84
What are you passing to localePath?

from i18n-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.