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 UTC in the contest page #76

Merged
merged 3 commits into from
Nov 26, 2024
Merged

Conversation

AS1100K
Copy link
Contributor

@AS1100K AS1100K commented Nov 19, 2024

BUG: T331225

Copy link
Member

@samwilson samwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

The "UTC" part needs to be able to be localised (because it is different in different languages), so each of these datetimes should be rewritten to use a message e.g. {{ msg( msg('datetime-formatted', [contest.start_date]) ) }} where the datetime-formatted message would be $1 (UTC).

Note also that #71 and #72 have also tackled this, so there might be things in those that are of use to you.

@AS1100K
Copy link
Contributor Author

AS1100K commented Nov 20, 2024

Thanks for the review.

I committed the changes for localization. I went with {{ msg('datetime-formatted', [msg('start-date-label'), contest.start_date]) }} where datetime-formatted is $1 $2 UTC and $1 is msg('start-date-label') or msg('end-date-label'). Well both approach works here, yours and mine. IDK why I went with my but when testing things I went with this one and that's what I committed. If you want them in {{ msg( msg('datetime-formatted', [contest.start_date]) ) }}, I will be happy to do the same.

For the languages:
I was familiar with some languages like Punjabi, Nepali, and English. For other languages I used the help of google translator for the languages that has field times-are-utc for referencing that the translations are in proper style.

@AS1100K AS1100K requested a review from samwilson November 20, 2024 06:38
@samwilson
Copy link
Member

Sorry, I totally didn't mean to add two msg() calls in that example! Sorry for the confusion.

It's best not to include messages as parameters to other messages (known as patchwork messages), so I'd recommend just adding this new message on its own.

For the other languages, that's great that you did the research etc., but there's no need to add them in as they'll be done by TranslateWiki.net. The translators ask us to leave them out; see https://www.mediawiki.org/wiki/Help:System_message#Changing_existing_messages

@AS1100K
Copy link
Contributor Author

AS1100K commented Nov 20, 2024

Thank you for the review and guidance!

I've updated the implementation to use start-date-formatted and end-date-formatted message as discussed, ensuring that each message is self-contained and avoids patchwork messaging. The other language files remain unchanged, in line with the workflow for Translatewiki.net

On a related note, I wasn't aware that translations are exclusively handled by TranslateWiki.net until this discussion. It might be helpful if this information is documented in the CONTRIBUTING.md file or somewhere similar for contributors who may not know. If it’s already documented and I missed it, I apologize!

Please let me know if there are any further changes needed.

@samwilson samwilson merged commit 8306fe4 into wikisource:master Nov 26, 2024
5 checks passed
@samwilson
Copy link
Member

Thanks!

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