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

RTL support #673

Closed
mat-mo opened this issue Oct 18, 2014 · 24 comments · Fixed by #2776
Closed

RTL support #673

mat-mo opened this issue Oct 18, 2014 · 24 comments · Fixed by #2776
Labels
help wanted UI 🎨 User Interfaces
Milestone

Comments

@mat-mo
Copy link

mat-mo commented Oct 18, 2014

Hello, thanks for this great application. Can you please add Right-to-left support? It used used for languages written from right to left such as Arabic, Hebrew, Parsi, and more.

@aledeg
Copy link
Member

aledeg commented Oct 18, 2014

How do you imagine that? Just the language display must be rtl or also the layout with the categories on right?

@mat-mo
Copy link
Author

mat-mo commented Oct 19, 2014

I would divide it into two changes, one: the important one, is to display the content correctly, so word don't show on the wrong side of the text. This is mostly a problem with mixed text in RTL and LTR text in the same sentence.

Second: fix the layout, mostly flip the entire interface from left to right when using RTL language in preference. This can be handled later on.

@marienfressinaud
Copy link
Member

It could be great but I think it needs a lot of work and I have not so much time as I thought if I want to release version 1.0 in December :( I will see what I can do but don't expect to see it coming soon… Maybe when extension system will be available it will be easier to add RTL support?

@mat-mo
Copy link
Author

mat-mo commented Oct 20, 2014

It would be great, but don't feel urged. you might want to grab some code and logic from https://github.com/fguillot/miniflux which supports RTL at the moment. Thank you very much for your prompt responses and generous attitude!

@marienfressinaud
Copy link
Member

Ok, thanks for the link, I will see it later. For the moment I have still some big refactoring tasks to finish and important features to add such as the extension system ;)

@aledeg
Copy link
Member

aledeg commented Oct 29, 2014

What would be nice is that you provide a translation for a rtl language. This way we can have some material to work with.
Personally, I don't speak or read a rtl language.

@aledeg
Copy link
Member

aledeg commented Oct 30, 2014

It was tagged as an extension but I think it would better if it was part of the core.
I see three levels of support:

  • i18n (display of text in the actual layout)
  • interface (changing layout to fit rtl)
  • feed display (it will probably need an other option in the feed, or maybe we can rely on the feed language)

@marienfressinaud
Copy link
Member

I think it would better if it was part of the core.

I think so.

We should to consider the dir="rtl" html attribute which works quite fine for me.

  • i18n: need just a new file which has already begun by @mat-mo.
  • interface: considering to create a specific theme?
  • feed display: I think the best is to add
    • A global option "RTL feeds by default"
    • A feed field "rtl". If true, entry are marked as rtl by default.
    • An entry field "rtl" (since a feed can contain both rtl and ltr entries). If an entry is rtl, add dir="rtl" html attribute.

Later we could create a plugin to switch rtl attribute of entries.

@aledeg
Copy link
Member

aledeg commented Oct 30, 2014

For the interface, I was thinking to add a way in the actual themes to flip the content.
Or maybe we can just generate the template in a different order and use the actual themes.

@marienfressinaud
Copy link
Member

It could be a solution yes and based on the global rtl option.

@aledeg
Copy link
Member

aledeg commented Nov 12, 2014

I don't know if the language tag in the RSS feed is mandatory, but I think we should store it in database when we have it. If we don't have it, we should let the user select the language in a drop-down list.
I think we also need to keep track of languages and their scripting direction in a configuration file, or constant file. And we could use this file to populate the drop-down list mentioned earlier.

@marienfressinaud marienfressinaud modified the milestones: 2.0.0, 1.0.0 Dec 9, 2014
@marienfressinaud marienfressinaud removed this from the 2.0.0 milestone Dec 9, 2014
@Alkarex Alkarex added this to the 2.0.0 milestone May 16, 2015
@Alkarex Alkarex added the UI 🎨 User Interfaces label May 24, 2015
@rezad1393
Copy link
Contributor

any progress for this or do I need to open another bug report?

@Alkarex
Copy link
Member

Alkarex commented Nov 12, 2019

@rezad1393 I personally do not have experience with RTL, so help welcome.
In particular, I am not sure how it is supposed to look like, how much the dir attribute can do, and what requires changes in the logic or themes

@Frenzie
Copy link
Member

Frenzie commented Nov 12, 2019

There's no point to opening another bug report, but adding some information could potentially be helpful. I don't know if @marienfressinaud still has his notes & branch around but I wouldn't mind seeing a link to an RTL newsfeed, for example.

I'm thinking the solution described above is too limited; isn't the language set using an attribute like this?

`xml:lang="ar"`

This language should simply be saved and transferred to the feed item. Then the browser will take care of displaying it correctly without us having to maintain any logic.

@mat-mo
Copy link
Author

mat-mo commented Nov 12, 2019

@Frenzie
Copy link
Member

Frenzie commented Nov 12, 2019

Sure, luckily that's 90 % a matter of sticking dir=rtl on the HTML element. Just some slightly off details as you can see.

Would you happen to know any examples of feeds? Because as written above:

the important one, is to display the content correctly, so word don't show on the wrong side of the text. This is mostly a problem with mixed text in RTL and LTR text in the same sentence.

@mat-mo
Copy link
Author

mat-mo commented Nov 12, 2019

You can try with:
https://www.geektime.co.il/feed

@Frenzie
Copy link
Member

Frenzie commented Nov 12, 2019

And it's left bad, right good?

Screenshot_2019-11-12_10-11-02

@mat-mo
Copy link
Author

mat-mo commented Nov 12, 2019

And it's left bad, right good?

Screenshot_2019-11-12_10-11-02

Yes, exactly.

@rezad1393
Copy link
Contributor

rezad1393 commented Nov 12, 2019

quiterss application has this feature that you can use RTL for each feed you specify.
I think this can be simply fixed by the same way in freshrss.
there are not a lot of feeds that have entries that are in rtl and ltr but in separate entries
like having one entry in rtl and then the next item in ltr. usually if the main language is in rtl then all the items are in rtl.

for example in parsi (persian) this is the mixed title that is shown ltr (wrong)
"رشد ۶۴ درصدی درآمدهای فصلی Alibaba از خدمات ابری"

but copy pasting the same title and using right to left in libreoffice will show it correctly like this:
Screenshot_20191112_133607

@Frenzie
Copy link
Member

Frenzie commented Nov 12, 2019

That's taken care of automatically by #2656, except more autos need to be spread around for full effect. A forced override could be a nice later addition but that's nothing I have time for atm. Luckily it shouldn't normally be necessary.

The minor UI hiccups can be fairly easily solved. The ideal would be to use selectors like #nav_entries:dir(rtl). To be compatible with more than just Firefox, adding a class="rtl" attribute to the root element would easily allow for selectors like html.rtl #nav_entries (or perhaps [dir="rtl"] #nav_entries).

The only thing I'm not fully sure of is how to add the dir=RTL & class=rtl to the HTML element. What do you suppose would be the best way to add it to the localization metadata, @Alkarex?

PS Some resources:
https://en.wikipedia.org/wiki/Bidirectional_text#Strong_characters
https://www.w3.org/International/articles/inline-bidi-markup/#dirauto

Frenzie added a commit to Frenzie/FreshRSS that referenced this issue Nov 12, 2019
@Alkarex
Copy link
Member

Alkarex commented Nov 12, 2019

For the record, response in #2658 (comment)

@rezad1393
Copy link
Contributor

I think there is some confusion.
I dont actually need the internationalaztion of the program itself (as in translation and I18n and so on)
I am just trying to get rtl only for some feeds.
that should not be related to the program interface language.

@Frenzie
Copy link
Member

Frenzie commented Nov 13, 2019

Like I said, #2656 already fixed that. There are purposefully two distinct PRs. One for telling specific elements to figure out their direction by themselves (#2656), another for fixing up the UI in RTL (#2658).

@Alkarex Alkarex modified the milestones: Backlog, 1.16.0 Nov 15, 2019
javerous pushed a commit to javerous/FreshRSS that referenced this issue Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted UI 🎨 User Interfaces
Projects
None yet
6 participants