Skip to content

Migration path from vue-i18n to fluent-vue #805

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

Closed
3 tasks done
Flambe opened this issue Feb 9, 2023 · 4 comments · Fixed by #811
Closed
3 tasks done

Migration path from vue-i18n to fluent-vue #805

Flambe opened this issue Feb 9, 2023 · 4 comments · Fixed by #811
Labels
Type: Feature Includes new features

Comments

@Flambe
Copy link
Contributor

Flambe commented Feb 9, 2023

Clear and concise description of the problem

I'm looking to move from vue-i18n to this library. We already use vue-i18n quite extensively throughout our app so it'd be nice to have both libraries installed together to slowly convert everything to fluent.

My problem is that we're using $t from vue-i18n throughout our app which conflicts with the same function from fluent-vue meaning we'd have to spend a lot of time to convert everyone in one go.

Suggested solution

Maybe a way to rename the globals or a flag that that does this for you? It would be fairly easy to find and replace over the app to switch it back once everything was migrated.

Alternative

No response

Additional context

No response

Validations

@Demivan
Copy link
Member

Demivan commented Feb 9, 2023

It would be a nice feature to have. Do you want to contribute? If not, I will fix it on an hour or so, when electricity is back on.

Only need to change the install function. Add a new option with names of component, directive and global functions to it.

@Flambe
Copy link
Contributor Author

Flambe commented Feb 9, 2023

I haven't played around with vue plugins before but I'll give it a go! I am finishing for the day soon though so it's unlikely I'll have anything ready to go before I leave.

Edit: I've had a look through and I haven't got tests sorted yet & I'm not sure of the best way to update the component name in component.ts (if that's required?), but yeah it does look pretty easy!

@Demivan
Copy link
Member

Demivan commented Feb 9, 2023

You don't need to update component name there. It is only used for debugging in devtools.

@Demivan
Copy link
Member

Demivan commented Feb 24, 2023

This feature was released as part of v3.3.0 https://github.com/fluent-vue/fluent-vue/releases/tag/v3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Includes new features
Development

Successfully merging a pull request may close this issue.

2 participants