Skip to content

Fix stale translations on locale change #836

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
Sep 6, 2023
Merged

Fix stale translations on locale change #836

merged 2 commits into from
Sep 6, 2023

Conversation

Demivan
Copy link
Member

@Demivan Demivan commented Sep 6, 2023

Description

When a component is unmounted, computed are not being recalculated, so the cached bundles list becomes stale.

This PR add cache clear on component unmount.

Linked Issues

https://github.com/orgs/fluent-vue/discussions/834

@Demivan Demivan added the Type: Bug Something isn't working label Sep 6, 2023
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Export Size

fluent-vue

Name Size Diff
useFluent 897 B +10 B (+1.13%) 🔺
createFluentVue 2.38 KB +3 B (+0.12%) 🔺

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #836 (e6035ae) into main (ff92080) will decrease coverage by 0.97%.
The diff coverage is 77.77%.

❗ Current head e6035ae differs from pull request most recent head c860aa7. Consider uploading reports for the commit c860aa7 to get more accurate results

@@            Coverage Diff             @@
##             main     #836      +/-   ##
==========================================
- Coverage   99.48%   98.52%   -0.97%     
==========================================
  Files          12       12              
  Lines         196      203       +7     
  Branches       38       41       +3     
==========================================
+ Hits          195      200       +5     
- Misses          0        1       +1     
- Partials        1        2       +1     
Flag Coverage Δ
vue-2 91.62% <77.77%> (-0.73%) ⬇️
vue-3 90.64% <77.77%> (-0.69%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/getContext.ts 93.33% <75.00%> (-6.67%) ⬇️
src/composition.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Demivan Demivan merged commit 202cfa3 into main Sep 6, 2023
@Demivan Demivan deleted the fix-stale-data branch September 6, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Development

Successfully merging this pull request may close these issues.

1 participant