Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store a map for customized paths #984

Closed
rchl opened this issue Dec 6, 2020 · 7 comments
Closed

Store a map for customized paths #984

rchl opened this issue Dec 6, 2020 · 7 comments

Comments

@rchl
Copy link
Collaborator

rchl commented Dec 6, 2020

Is your feature request related to a problem? Please describe.

To solve issues like #641, #710, #735, #1254 and #1177, we would need to create and expose a list of customized paths. The knowledge of which paths are customized would allow short-cutting some cases or handle them in a special way.

Describe the solution you'd like

Internally there should be a list of customized paths in a format that is quick to look up and be as compact as possible, size-wise.

Describe alternatives you've considered

No alternative.

Additional context

This concerns the pages option and custom component options specified through the nuxtI18n option.

@divine
Copy link

divine commented Jul 5, 2021

Hello,

@rchl is using something like flexsearch would be the best solution to store/search paths?

Thanks!

@rchl
Copy link
Collaborator Author

rchl commented Jul 6, 2021

At first sight it doesn't seem to be super fitting as I don't think we'll need full text capabilities like that here. We just need to be able to lookup route.name => route.path and route.path => route.name. At least as far as I remember this issue...

@divine
Copy link

divine commented Jul 6, 2021

At first sight it doesn't seem to be super fitting as I don't think we'll need full text capabilities like that here.

There is a light version as well which is stripped down version (flexsearch.light.js 2.9 kb)

We just need to be able to lookup route.name => route.path and route.path => route.name. At least as far as I remember this issue...

And custom settings for that route as well (in component option).

Thanks!

@rchl
Copy link
Collaborator Author

rchl commented Aug 6, 2021

#1254 concerns dynamic routes. Would need to investigate how would that have to be handled even when having a mapping of sorts.

@divine
Copy link

divine commented Aug 6, 2021

@rchl I'd gladly help but not sure where to start and what needs to be done. Can you give you some ideas?

I will try my best.

Thanks!

@rchl
Copy link
Collaborator Author

rchl commented Aug 7, 2021

I've started working on it on the https://github.com/nuxt-community/i18n-module/commits/fix/no-prefix-rename branch but I remember leaving it in a pretty unfinished state.

I think there is quite a lot left to do but I won't give you any pointers as I don't remember much now. I'm not even sure if the approach I was experimenting with is even good and would solve all the issues...

@BobbieGoede
Copy link
Collaborator

Closing this as v7 is not being actively worked on (critical hotfixes only), if this still applies to v8 and later please open a new issue!

@BobbieGoede BobbieGoede closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants