Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#15085 closed defect (fixed)

about:tor page has text alignment problems for RTL languages

Reported by: arthuredelstein Owned by: arthuredelstein
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Keywords: TorBrowserTeam201503R
Cc: brade, mcs, mrphs, Sherief Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Reported by Sherief:
https://lists.torproject.org/pipermail/tor-qa/attachments/20150225/35ab6fb4/attachment-0002.png

Specifically, the two boxes aren't right-justified properly. And the "Click on the onion..." sentence has its dot at the beginning rather than the end. (Also, is that sentence in English because it is not localized properly?)

Child Tickets

Attachments (3)

about_tor_arabic_15085_fix.png (200.0 KB) - added by arthuredelstein 4 years ago.
about_tor_farsi_15085_fix.png (214.7 KB) - added by arthuredelstein 4 years ago.
bug15085-diffs.txt (3.6 KB) - added by brade 4 years ago.
Updated patch

Download all attachments as: .zip

Change History (16)

comment:1 Changed 4 years ago by mcs

Cc: brade mcs added

comment:2 Changed 4 years ago by arthuredelstein

Owner: changed from tbb-team to arthuredelstein
Status: newassigned

comment:3 Changed 4 years ago by arthuredelstein

In answer to my question, the aboutTor.outOfDate2.label still needs to be localized for Arabic.

Changed 4 years ago by arthuredelstein

Changed 4 years ago by arthuredelstein

comment:4 Changed 4 years ago by arthuredelstein

Cc: mrphs Sherief added
Keywords: TorBrowserTeam201503R added
Status: assignedneeds_review

Here's my patch:
https://github.com/arthuredelstein/torbutton/commit/a72597317e43b6fac8b8851f948f147a2f17788e

Here are the resulting about:tor pages (in Arabic and Farsi). I don't speak Arabic or Farsi, so any further formatting suggestions will be much appreciated!


Last edited 4 years ago by arthuredelstein (previous) (diff)

comment:5 Changed 4 years ago by mrphs

The Farsi version looks good to me. Thanks arthuredelstein.

comment:6 in reply to:  4 ; Changed 4 years ago by brade

Replying to arthuredelstein:

Here's my patch:
https://github.com/arthuredelstein/torbutton/commit/a72597317e43b6fac8b8851f948f147a2f17788e

Why were the parentheses removed from 501(c)(3)? It seems like they should be there as that is how to correctly specify 501(c)(3).

For my own understanding, is it better to have CSS rules for both LTR and RTL? I always thought it was better (faster layout) to have a general rule for one and then a more specific rule for the other. If we are going to have two specific rules, we should get rid of the general rule for #middle ul.

comment:7 in reply to:  6 Changed 4 years ago by arthuredelstein

Replying to brade:

Replying to arthuredelstein:

Here's my patch:
https://github.com/arthuredelstein/torbutton/commit/a72597317e43b6fac8b8851f948f147a2f17788e

Thanks for the quick review!

Why were the parentheses removed from 501(c)(3)? It seems like they should be there as that is how to correctly specify 501(c)(3).

I was having trouble getting the parentheses to look right, but I've now got it working.

For my own understanding, is it better to have CSS rules for both LTR and RTL? I always thought it was better (faster layout) to have a general rule for one and then a more specific rule for the other. If we are going to have two specific rules, we should get rid of the general rule for #middle ul.

Good point -- fixed. Here's the new version of the patch:
https://github.com/arthuredelstein/torbutton/commit/6e3618eb69f7665664dfe536abff3eea676ec422

comment:8 Changed 4 years ago by brade

Adding span tags in the localizable text is not good. In my experience, translators won't understand the markup and won't preserve it correctly when editing.

Mark and I did some experimentation and found that adding ‎ entity after the "(3)" will fix the problem. There is still a chance translators will change it but I think it is safer than embedding span tags.

comment:9 in reply to:  8 ; Changed 4 years ago by arthuredelstein

Replying to brade:

Adding span tags in the localizable text is not good. In my experience, translators won't understand the markup and won't preserve it correctly when editing.

Mark and I did some experimentation and found that adding ‎ entity after the "(3)" will fix the problem. There is still a chance translators will change it but I think it is safer than embedding span tags.

I wasn't able to get ‎ to work for the Farsi version. Perhaps you could give it a try? In any case, maybe it's best to add comments next to our changes to warn the translators.

comment:10 in reply to:  9 ; Changed 4 years ago by brade

Replying to arthuredelstein:

I wasn't able to get ‎ to work for the Farsi version. Perhaps you could give it a try? In any case, maybe it's best to add comments next to our changes to warn the translators.

It looks like it works better to use entities that act more like an enclosing span. I will attach a patch that seems to work. If you agree, please check it in.

As for adding comments for translators, translators are working in a web-based system that doesn't display comments or even the entity names. I don't know of a good way to communicate information to translators who use transifex. :-(

Changed 4 years ago by brade

Attachment: bug15085-diffs.txt added

Updated patch

comment:11 in reply to:  10 Changed 4 years ago by arthuredelstein

Replying to brade:

Replying to arthuredelstein:

I wasn't able to get ‎ to work for the Farsi version. Perhaps you could give it a try? In any case, maybe it's best to add comments next to our changes to warn the translators.

It looks like it works better to use entities that act more like an enclosing span. I will attach a patch that seems to work. If you agree, please check it in.

Aha, good solution! Thanks a lot for your help. Unfortunately I haven't yet gotten set up to check things in, but I can confirm after testing in the Farsi Tor Browser that it looks correct.

As for adding comments for translators, translators are working in a web-based system that doesn't display comments or even the entity names. I don't know of a good way to communicate information to translators who use transifex. :-(

I was afraid of that. Hopefully the unicode escapes look scary enough that they leave them alone. ;)

comment:12 Changed 4 years ago by brade

Resolution: fixed
Status: needs_reviewclosed

I committed this fix. Unfortunately, something seems to be wrong with our server-side git infrastructure at the moment, so the commit is not showing up on gitweb or when pulled via the read-only (http) URL. Anyway, I trust that problem will be fixed soon. The commit hash is 31b174a2ca518663d756bcb7aff92be119eefb58.

comment:13 in reply to:  10 Changed 4 years ago by mrphs

Replying to brade:

As for adding comments for translators, translators are working in a web-based system that doesn't display comments or even the entity names. I don't know of a good way to communicate information to translators who use transifex. :-(

There's indeed an option in transifex for developers to add comment for translators. Poul should know how that option works.

Note: See TracTickets for help on using tickets.