Skip to content

Add support for binding SSR props in Vue 3 directive #869

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

Merged
merged 2 commits into from
Apr 4, 2024
Merged

Add support for binding SSR props in Vue 3 directive #869

merged 2 commits into from
Apr 4, 2024

Conversation

Demivan
Copy link
Member

@Demivan Demivan commented Apr 4, 2024

Description

Bind localized element attributes on server side when using v-t directive.

Linked Issues

Needed for #695

Additional context

It only binds attributes, not the text content. This is a limitation of Vue 3, and binding text content will need to be done in the directive transform.

It does not use element type to check whether an attribute is localizable. This is a limitation of Vue 3. To combat potential issues, I have added a runtime warning when translation contains non-localizable attributes.

Copy link

github-actions bot commented Apr 4, 2024

Export Size

fluent-vue

Name Size Diff
createFluentVue 2.48 KB +104 B (+4.26%) 🔺
Unchanged

fluent-vue

Name Size Diff
useFluent 897 B -

@Demivan Demivan merged commit bcdd82a into main Apr 4, 2024
15 checks passed
@Demivan Demivan deleted the ssr branch April 4, 2024 15:18
@Demivan Demivan added the Type: Feature Includes new features label Apr 4, 2024
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 this pull request may close these issues.

1 participant