-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 language vs. locale #14784
Fix language vs. locale #14784
Conversation
While it sounds error prone I think this could actually work. I'm wondering if we're the first that have this problem or if there is a known workaround we could follow. |
0734cb5
to
aef375c
Compare
I implemented hat solution and it seems to work quite well. |
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.
Code looks good and change makes sense otherwise
core/js/js.js
Outdated
]); | ||
return moment.localeData()._abbr; | ||
} | ||
localeData.parentLocale = getBestParentLocale(); |
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 would just inline this function call
aef375c
to
a221011
Compare
🙈 |
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 17483: failureTESTS=jsunitShow full log
|
Passes locally. Maybe someone from @nextcloud/javascript can help? |
a221011
to
eda0059
Compare
Rebased, lets see if time fixed it. |
Conflicts again :/ |
eda0059
to
8cf9e04
Compare
rebased |
Still failing 🤷♂️ |
Signed-off-by: Joas Schilling <coding@schilljs.com> Fix moment.js usage of language and locale Signed-off-by: Joas Schilling <coding@schilljs.com>
8cf9e04
to
304408a
Compare
@rullzer This looks kind of stale but keeps getting reported everywhere. Can this please be considered still for 18? |
Status? |
See first post |
I read it, what about it? |
Well i proposed an idea and now we need to say yes or no to this hack |
I'm in too! |
I'm going to close this due to lack of activity. |
This is still a problem in NC 22.2.0. Is there a chance for progress on this issue? |
I checked, and indeed moment JS does not allow to differenciate between language and locale. My "idea" would be, to get the localeData of OC.getLocale(), then set moment.locale() to OC.getLanguage() and then overwrite weekstart, ispm, format, ... with the localeData of getLocale, or the other way around.
Opinions @ChristophWurst @rullzer @MorrisJobke
fixes #15457