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
fix: formatDistance
for Basque (eu)
#3749
base: main
Are you sure you want to change the base?
Conversation
As a reference you can take a look at moment.js, which was updated years ago by me: https://github.com/moment/moment/blob/develop/locale/eu.js For example, "en {result}" was still in Spanish...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't speak the language, but the changes look good to me!
@fturmel snapshot looks good. There is only one thing that it is not perfect, but I don't think it is possible with the current implementation:
But suffix is added after result is calculated, and the 'about' (gutxi gorabehera) is added beforehand to the result, so I guess it needs to stay like this. Thanks! |
Keep this on hold for a moment... I only checked |
Great! Here's the unicode CLDR reference if needed: https://www.unicode.org/cldr/charts/44/summary/eu.html If you change anything else, you can update the snapshot markdown file yourself by running I'm sure it's possible to reshape the formatDistance function to support the "about" form you're describing. How does this look? if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
if (token.startsWith("about")) {
return result.replace("gutxi", "barru gutxi");
}
return result + " barru";
} else {
return "duela " + result;
}
} |
As a reference you can take a look at moment.js, which was updated years ago by me: https://github.com/moment/moment/blob/develop/locale/eu.js
For example, "en {result}" was still in Spanish...