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

pkp/pkp-lib#9707 use weblate locales for ui #438

Merged
merged 1 commit into from
Dec 11, 2024
Merged

pkp/pkp-lib#9707 use weblate locales for ui #438

merged 1 commit into from
Dec 11, 2024

Conversation

bozana
Copy link
Contributor

@bozana bozana commented Oct 29, 2024

@bozana
Copy link
Contributor Author

bozana commented Nov 20, 2024

Let me ask @jardakotesovec, if all this all is needed and how -- I could not find where it is used and how... 😅

@jonasraoni
Copy link
Contributor

There's a sample here:

.locale(this.getMomentLocale($.pkp.app.currentLocale))

The application locale should match the moment locales available at:
lib/pkp/lib/weblateLanguages/languages.json

@bozana
Copy link
Contributor Author

bozana commented Nov 21, 2024

Thanks @jonasraoni!
I also find the list of Moment.js locales -- they seam to be in the folder moment/src/locale/.
Do you maybe know if the JS function getMomentLocale always gets our existing UI locales or could it also be a submission locale (which can be any weblate locale)? If it also gets submission locales than a bigger matching from weblate locales to moment.js locales is eventually needed...

@bozana
Copy link
Contributor Author

bozana commented Nov 21, 2024

And what about those missing in Moment.js ?

@bozana
Copy link
Contributor Author

bozana commented Nov 21, 2024

I took a look at the whole list of Moment.js locales and the related Weblate locales and have added also these:
Weblate -> Moment.js
hy -> hy-am
oc -> oc-lnc
pa -> pa-in
tl -> tl-ph
(there is only one option in Moment.js and I took that)
These I could not match because there are several options in Moment.js, so I do not know which one is correct:
en -> ?
gom -> gom-deva, gom-latn
Any suggestion?
Else they can then stay as they are...

@jonasraoni, OK so?

@jardakotesovec
Copy link
Collaborator

@bozana afaik the date formatting does not really work.. Last time I checked I shared the finding here.. hoping to get it early next year - pkp/pkp-lib#9733

@bozana
Copy link
Contributor Author

bozana commented Nov 25, 2024

Thanks @jardakotesovec, I will leave this part of the code as is -- as it would work 😅 -- and then when you address the issue you can see what to do with it all... (it seems we will maybe remove it fully...) :-)

@bozana bozana force-pushed the 9707 branch 5 times, most recently from 77bf8e7 to 3616f8c Compare December 6, 2024 14:53
@bozana bozana merged commit 8395ce0 into pkp:main Dec 11, 2024
4 of 5 checks passed
@bozana bozana deleted the 9707 branch December 11, 2024 13:31
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.

3 participants