Skip to content

Conversation

@shermansiu
Copy link
Contributor

Fixes #11569.

Before:
LiChess RTL i18n Before

After:
LiChess RTL i18n After

@shermansiu shermansiu changed the title Fix rtl dates Fix how dates are displayed in RTL languages Aug 25, 2023
Copy link
Collaborator

@ornicar ornicar left a comment

Choose a reason for hiding this comment

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

can it not be done using CSS, like all our current support for RTL?

@shermansiu
Copy link
Contributor Author

can it not be done using CSS, like all our current support for RTL?

Using CSS was the first thing I tried (e.g. direction: rtl), but unfortunately, that didn't work, whether the style was added to the time tag itself or the parent span tag.

Ultimately, the problem is that the generated text mixes LTR (i.e. the Western Arabic numerals) and RTL characters.

@shermansiu
Copy link
Contributor Author

shermansiu commented Aug 26, 2023

I've made the requested changes!

@ornicar ornicar merged commit f5122e8 into lichess-org:master Aug 27, 2023
@shermansiu shermansiu deleted the fix-rtl-dates branch August 27, 2023 13:25
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.

Date formatting directionality

2 participants