Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

International Accessibility: Language settings & RTL text #458

Closed
jaw-sh opened this issue Apr 15, 2015 · 9 comments
Closed

International Accessibility: Language settings & RTL text #458

jaw-sh opened this issue Apr 15, 2015 · 9 comments

Comments

@jaw-sh
Copy link
Contributor

jaw-sh commented Apr 15, 2015

There are a few big issues for International users at the moment.

  1. Board config inadequately addresses language.
  2. Board list uses flags to represent languages.
  3. Arabic and other Right-to-Left languages are hard to read.

As a part of this ticket I will be introducing the following fixes.

  1. Board config will have a checklist for languages. I'll add in the top 20 most spoken languages (and probably all European languages, so we can have Polish) to start us off.
  2. Board list will allow filtering languages. (Part of Board List Rewrite #456)
  3. Posts will be parsed differently.

For number 3, if we have a post like this:

The board owner can technically just put custom CSS into the board to fix, but I agree that 8chan should have a board-level option for enabling a rtl post mode. It would look like this.

مِصْرَ أو رسمياً جُمهورِيةُ مِصرَ العَرَبيةِ، دولة عربية تقع في الركن الشمالي الشرقي من قارة أفريقيا، ولديها امتداد آسيوي، حيث تقع شبه جزيرة سيناء داخل قارة آسيا فهي دولة عابرة للقارات. ويحد جمهورية مصر العربية من الشمال البحر المتوسط بساحل يبلغ طوله 995 كم، ويحدها شرقا البحر الأحمر بساحل يبلغ طوله 1941 كم، ويحدها في الشمال الشرقي منطقة فلسطين (إسرائيل وقطاع غزة) بطول 265 كم، ويحدها من الغرب ليبيا على امتداد خط بطول 1115 كم، كما يحدها جنوبا السودان بطول 1280 كم. تبلغ مساحة جمهورية مصر العربية حوالي 1.002.000 كيلومتر مربع [3] والمساحة المأهولة تبلغ 78990كم2 بنسبة 7.8 % من المساحة الكلية.[4] وتُقسم مصر إدارياً إلى 27 محافظة، وتنقسم كل محافظة إلى تقسيمات إدارية أصغر وهي المراكز أو الأقسام.[5]

The first paragraph will be wrapped in a tag like this:
<p class="ltr"></p>

The second paragraph will be wrapped in a tag like this:
<p class="rtl"></p>

This will allow English and Arabic text to exist in the same post and still be rendered RTL or LTR correctly.

StackOverflow has offered a solution for detecting arabic text. We can extend this to other RTL languages in the future.

http://stackoverflow.com/questions/3541371/php-how-do-i-detect-if-an-input-string-is-arabic

@jaw-sh jaw-sh mentioned this issue Apr 15, 2015
8 tasks
@jaw-sh
Copy link
Contributor Author

jaw-sh commented Apr 16, 2015

  1. Post lines are now converted into <p>aragraphs instead of being split up by <br> tags
  2. Added a RTL language detector.

RTL text

@marlencrabapple
Copy link
Contributor

Will this work well with block spoilers or any other block formatting? Might wanna check that out if you already haven't.

@jaw-sh
Copy link
Contributor Author

jaw-sh commented Apr 17, 2015

@marlencrabapple it does as well as the current setup does. I've compared them and it seems okay.

ctrlcctrlv added a commit that referenced this issue Apr 19, 2015
#456 #458 #460 #461- Board Lists, RTL Arabic, Index page links, Quick reply link
@jaw-sh
Copy link
Contributor Author

jaw-sh commented Apr 19, 2015

Issues with commit 320616:

  • People are saying the margins and padding are off for them.
  • OPs in Arabic float way off to the right.
  • Post numbers preceding a 100% arabic text are left-aligned. Can probably fix this by checking to see if 90% of a post is Arabic and then right-aligning purely symbolic lines.

@ctrlcctrlv
Copy link
Owner

It broke quoting as well in certain cases.
greentext

@justpassingbynow
Copy link

There seems to be an issue with Exodus (the android application) after the recent changes. The app doesn't recognize the line breaks, making all the posts appear as if they're one line. I guess this is because of the change from <br to <p. Can that be fixed? I think the developer has been inactive for a while so we hope it can be fixed through the site itself, as the app is very important to many of us.
A screenshot from one of the users at /egy/: https://media.8ch.net/egy/src/1429461425527.jpg
Thanks in advance.

@jaw-sh
Copy link
Contributor Author

jaw-sh commented Apr 20, 2015

@justpassingbynow can you please link me to your extension's page so I can install it?

@ctrlcctrlv
Copy link
Owner

@wingy needs to fix that, he develops Exodus. It's third party and has nothing to do with us

@ctrlcctrlv
Copy link
Owner

I think we fixed all the problems with this, and someone opened a PR on @wingy Exodus. So either rebuild Exodus or use the APK someone built already (I have no idea if it contains a virus, just found it on /operate/): http://nreboot.com/chan/app-release.apk

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants