Comments (4)
@BobbieGoede my mistake, for reason a question mark was appended in the route name. Fixed and not a module issue.
from i18n-module.
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.
Kind a same issue here, where the output of localePath now containers %3F
at the end.
from i18n-module.
@memic84
What are you passing to localePath
?
from i18n-module.
Related Issues (20)
- getRouteBaseName error in Nuxt 3.11 HOT 2
- Maximum call stack size exceeded when use [email protected] HOT 6
- <i18n-n scope="global"> throws warning [intlify] Not found parent scope. use the global scope HOT 7
- Module fetches wrong link when using server routes HOT 1
- Support per-component translations using `experimental.autoImportTranslationFunctions` HOT 1
- Content and i18n - Document not found for non-default locales HOT 2
- lazy:true doesn't work correctly HOT 1
- Make the language cookie value extendable HOT 1
- `useLocaleHead` ignores nuxt app.baseURL setting
- nuxt/i18n + sidease/nuxt-auth wipes out all types from the config file HOT 4
- i18n-t Bug HOT 2
- After reloading the page the language is set to default locale HOT 5
- The switchLocalePath method cannot get the incoming language address HOT 7
- nuxt/i18n custom route paths doesn't work HOT 6
- Repro projects no longer work HOT 1
- Generated canonical links do not point to main language, but to current language HOT 4
- Failed to switch page url with language switcher HOT 1
- Incorrect translations flash when using different domains with `swr` route rules
- Cannot use dynamic locale file HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i18n-module.