Closed Bug 1675789 Opened 4 years ago Closed 4 years ago

Improve readability of bidi pseudolocale

Categories

(Core :: Internationalization, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: dminor, Assigned: dminor)

References

(Blocks 1 open bug)

Details

Attachments

(9 files)

In Bug 1673054, I'm planning to remove the intl.uidirection pref and only support intl.l10n.pseudo = "bidi" in the future. We've had some discussions on element that the current bidi mode is not very readable, especially for people for whom English is not their first language. We should improve the readability of the bidi pseudo-locale before we remove intl.uidirection.

This builds on the work in Bug 1491866 to only transform every other character. It reduces the number of flipped characters. This should improve readability while still allowing for non-localized strings to be identified.

Zibi asked me to also put together a prototype of reversing the strings without changing the characters, so they read right to left. I've started doing so, but have noticed some things that don't look correct. I'm going to test with a RTL locale to see if I've done something wrong, of if I've hit some actual problems with the interfaces I'm testing.

Severity: -- → S3
Priority: -- → P3
Blocks: 1676137
No longer blocks: 1673054

A screenshot of about:preferences in the Arabic locale.

For comparison, here is a screenshot with the bidi pseudolocale set to reverse text strings. To me, this seems more readable than the current approach of using flipped characters.

If you look at the Always check if Nightly is your default browser pref, things seem a bit strange. We're localizing Nightly, but it is not localized in the screenshot from the Arabic locale I just attached. We're missing spaces around the word Nightly, and the parts of the sentence are the wrong order for reading RTL. According to Google Translate, the sentence is in the correct order in Arabic. The flipped character version also messed this up a bit (the A is in the wrong location), so this might just be a limitation of the pseudo-locale approach.

For comparison, this is what the bidi pseudolocale looks like without any modifications on my system.

Attached image Bracked bidi

Discussed with Itiel on #i18n, looks like Comment 6 is the best option, so I'll go ahead with that.

Depends on D96853

This switches to using accented characters without elongation for the bidi
pseudo-locale to improve readability. We received feedback that the
flipped characters were too difficult to read.

Depends on D96854

Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dcd4e0412d54
Update fluent-pseudo to 0.2.3; r=zbraniecki
https://hg.mozilla.org/integration/autoland/rev/0e0fe4161436
Run vendor rust; r=zbraniecki
https://hg.mozilla.org/integration/autoland/rev/96add4c0a255
Do not used flipped characters for bidi pseudo-locale; r=zbraniecki
Backout by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/36d64f1d9d3d
Backed out 3 changesets for test_pseudo.js failures CLOSED TREE

Backed out 3 changesets (bug 1675789) for test_pseudo.js failures.

Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&fromchange=33e2addbf47ef312da1ccdecc4f3f9db22fccd74&searchStr=linux%2C18.04%2Cx64%2Cdebug%2Cxpcshell%2Ctests%2Cwith%2Cnetworking%2Con%2Csocket%2Cprocess%2Ctest-linux1804-64%2Fdebug-xpcshell-spi-nw-e10s%2Cx1&selectedTaskRun=AyggsxpYTr2ZOg5HhMAIRg.0&tochange=36d64f1d9d3dff687e2a5dc8871a5e3cb858a7ff

Backout link: https://hg.mozilla.org/integration/autoland/rev/36d64f1d9d3dff687e2a5dc8871a5e3cb858a7ff

Failure log: https://treeherder.mozilla.org/logviewer?job_id=321647929&repo=autoland&lineNumber=2780

[task 2020-11-13T01:40:55.959Z] 01:40:55     INFO -  TEST-START | intl/l10n/test/test_pseudo.js
[task 2020-11-13T01:40:56.177Z] 01:40:56  WARNING -  TEST-UNEXPECTED-FAIL | intl/l10n/test/test_pseudo.js | xpcshell return code: 0
[task 2020-11-13T01:40:56.177Z] 01:40:56     INFO -  TEST-INFO took 213ms
[task 2020-11-13T01:40:56.178Z] 01:40:56     INFO -  >>>>>>>
[task 2020-11-13T01:40:56.178Z] 01:40:56     INFO -  PID 12947 | Couldn't convert chrome URL: chrome://branding/locale/brand.properties
[task 2020-11-13T01:40:56.178Z] 01:40:56     INFO -  PID 12947 | [12947, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:2949
[task 2020-11-13T01:40:56.178Z] 01:40:56     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2020-11-13T01:40:56.179Z] 01:40:56     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2020-11-13T01:40:56.180Z] 01:40:56     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2020-11-13T01:40:56.181Z] 01:40:56     INFO -  running event loop
[task 2020-11-13T01:40:56.181Z] 01:40:56     INFO -  PID 12947 | [12947, Main Thread] WARNING: Could not get the program name for a cubeb stream.: 'NS_SUCCEEDED(rv)', file /builds/worker/checkouts/gecko/dom/media/CubebUtils.cpp:380
[task 2020-11-13T01:40:56.181Z] 01:40:56     INFO -  intl/l10n/test/test_pseudo.js | Starting test_accented_works
[task 2020-11-13T01:40:56.181Z] 01:40:56     INFO -  (xpcshell/head.js) | test test_accented_works pending (2)
[task 2020-11-13T01:40:56.181Z] 01:40:56     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  TEST-PASS | intl/l10n/test/test_pseudo.js | test_accented_works - [test_accented_works : 59] true == true
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  TEST-PASS | intl/l10n/test/test_pseudo.js | test_accented_works - [test_accented_works : 61] true == true
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  TEST-PASS | intl/l10n/test/test_pseudo.js | test_accented_works - [test_accented_works : 63] "f" == "f"
[task 2020-11-13T01:40:56.182Z] 01:40:56  WARNING -  TEST-UNEXPECTED-FAIL | intl/l10n/test/test_pseudo.js | test_accented_works - [test_accented_works : 72] false == true
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  /builds/worker/workspace/build/tests/xpcshell/tests/intl/l10n/test/test_pseudo.js:test_accented_works:72
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  /builds/worker/workspace/build/tests/xpcshell/head.js:_do_main:239
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  /builds/worker/workspace/build/tests/xpcshell/head.js:_execute_test:568
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  -e:null:1
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  exiting test
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  Unexpected exception NS_ERROR_ABORT:
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  _abort_failed_test@/builds/worker/workspace/build/tests/xpcshell/head.js:824:20
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  do_report_result@/builds/worker/workspace/build/tests/xpcshell/head.js:925:5
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  Assert<@/builds/worker/workspace/build/tests/xpcshell/head.js:73:21
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  proto.report@resource://testing-common/Assert.jsm:233:10
[task 2020-11-13T01:40:56.182Z] 01:40:56     INFO -  proto.ok@resource://testing-common/Assert.jsm:259:10
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  test_accented_works@/builds/worker/workspace/build/tests/xpcshell/tests/intl/l10n/test/test_pseudo.js:72:7
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  _do_main@/builds/worker/workspace/build/tests/xpcshell/head.js:239:6
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  _execute_test@/builds/worker/workspace/build/tests/xpcshell/head.js:568:5
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  @-e:1:1
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  exiting test
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  PID 12947 | [12947, Main Thread] WARNING: Extra shutdown CC: 'i < NORMAL_SHUTDOWN_COLLECTIONS', file /builds/worker/checkouts/gecko/xpcom/base/nsCycleCollector.cpp:3359
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  PID 12947 | [12947, Main Thread] WARNING: OOPDeinit() without successful OOPInit(): file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:3394
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  PID 12947 | [12947, Main Thread] WARNING: NS_ENSURE_TRUE(Preferences::InitStaticMembers()) failed: file /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:4287
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  PID 12947 | [12947, Main Thread] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:202
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  PID 12947 | [12947, Main Thread] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:202
[task 2020-11-13T01:40:56.183Z] 01:40:56     INFO -  <<<<<<<
Flags: needinfo?(dminor)

Looks like my mach try auto run did not pick up these tests.

Flags: needinfo?(dminor)
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/510b2f8cad21
Update fluent-pseudo to 0.2.3; r=zbraniecki
https://hg.mozilla.org/integration/autoland/rev/be21f663170e
Run vendor rust; r=zbraniecki
https://hg.mozilla.org/integration/autoland/rev/cbbbb752784d
Do not used flipped characters for bidi pseudo-locale; r=zbraniecki
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: