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

update stringsCache to use language #24

Merged
merged 1 commit into from
Nov 21, 2021

Conversation

kathaypacific
Copy link
Contributor

Hi team! Thank you for the nice library :)

I found a small issue when integrating with this - all translations returned are the same language when calling the getStrings function, and calling getStringsByLocale multiple times with different locales returns translations with the first locale used.

It appears that the stringsCache uses filename as the cache key, however this also means that the cached file is served no matter which language is being requested (even if the cached file is in a different language)

This PR adds languages to the stringsCache to fix this.

Copy link
Collaborator

@yevheniyJ yevheniyJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@yevheniyJ yevheniyJ merged commit df0be20 into crowdin:main Nov 21, 2021
@yevheniyJ
Copy link
Collaborator

It's now available in v0.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants