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

Add Messageformat date/time localization support #97

Merged
merged 3 commits into from
Dec 1, 2021
Merged

Conversation

n1k0sv
Copy link

@n1k0sv n1k0sv commented Dec 1, 2021

@transifex/native
We were using a single MessageFormat class instance for the entire runtime, defaulting to English locale. This has an issue when trying to use an ICU phrase with dates, e.g. Date is {d, date, long}.

This PR fixes the issue by creating a MessageFormat instance per locale. Now, dates are properly localized internally by the MessageFormat library.

@transifex/cli
Minor improvement to avoid showing the key when it is the same as source in verbose mode txjs-cli push -v

@n1k0sv n1k0sv requested a review from codegaze December 1, 2021 10:24
@n1k0sv n1k0sv merged commit 85a7c6f into master Dec 1, 2021
@n1k0sv n1k0sv deleted the date-localization branch December 1, 2021 13:21
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.

2 participants