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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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...) :-)

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