Floating numbers in RTL layout

Hello Discourse :slight_smile:
I noticed a small UI bug that happens in my instance and also here as well. Once you move into an RTL language (like Hebrew), the floating numbers will flip. For example 2.8 will become 8.2 (with additional space in between for some reason - 8. 2). Screenshot from this community:

While it should be:

I believe that removing that additional space in between, should fix the problem (it worked for me, while playing with it in the DevTools). Is it possible to get fixed? :slight_smile:

2 Likes

Thanks for reporting that! I’ve moved your topic from the bug category to the ux category because I don’t think it meets our definition of a bug. It is something that should get fixed though.

Have you noticed any other similar issues when an RTL language is chosen?

2 Likes

I started looking at this and realized that the problem is only affecting the Hebrew local, other RTL languages do not have the issue. The problem with the direction of the number is being caused by the additional space. In our Hebrew localization, the separator for floats is set to " .". Removing the space from the separator solves the issue. Is it expected to have a space before the separator when numbers are displayed in Hebrew text?

Just to confirm this is correct, here is what I’m seeing when I remove the space before the separator in the translation file for a topic that has 12.9k views:

2 Likes

There should not be spaces in the number. The example you showed is correct :slight_smile:

1 Like

Translation has been fixed.

The space before the separator has been removed from the translation file. This issue should now be fixed on the latest version of DIscourse.

2 Likes