Unofficial RTL Support [Re-opened]

asked 2020-06-21 14:08:43 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2020-06-30 18:37:45 +0300

mad_dev gravatar image

Original Post (Unofficial Arabic Translation) has been archived for clarity Archive Link

The problem with RTL support is that it seems that it was never considered. This makes it's difficult to adopt certain languages. Translating SailfishOS is the easy part, adhering to the design language is not. As the name suggests, rtl languages start from the right, and since some aspects of the UI are anchored to the right, mirroring them would distort the beauty of the experience.

rtls This is a test, do not use.

Right-to-left Support appends a mirroring declaration to certain qml files(defined in FILES.txt).

Example (https://twitter.com/m4d_d3v/status/1276496205799919616?s=20)

It takes a file path, and a line number. This is needed because we don't want to break the UI. The latter example used:

/usr/share/jolla-calendar/pages/EventEditPage.qml:12

Adding the declaration

// RTL SUPPORT
LayoutMirroring.enabled: true
LayoutMirroring.childrenInherit: true
anchors.left: parent.left
// END RTL SUPPORT

to line 13 in /usr/share/jolla-calendar/pages/EventEditPage.qml

Now all we have to do, is find the proper place to add the declarations for all stock apps. I am currently reading through the API documentation to better understand how Silica actually works.

The logic behind using this method was instigated by the daunting prospect of adding a layer on top of the translatined files or passing the executables through some kind of conditional binding to do the changes on the fly.

I'll do some more testing and even refactor the script or rewrite it in an another language if it deems so.

[UPDATE 30/06/2020]

Correction: this statement is wrong The problem with RTL support is that it seems that it was never considered. I have found an instance whilst translating that contradicts the later statement(RTL). I have also noticed that the design language works with RTL languages, YES, there are issues, but as of now(21 files translated), only the following files needed to be appended. Granted, I can't find most of what I have translated...but still.

/usr/share/jolla-calendar/pages/EventEditPage.qml:146
/usr/share/jolla-calendar/pages/EventViewPage.qml:11
/usr/share/jolla-clock/pages/ClockEditDialog.qml:120

I have kept things a bit hectic in the repo, I wanted to document everything even mistakes, but things are getting out of control. If only Arabic would garner enough upvotes here and finally get included in the Pootle, then translating would be much more easier and accessible. Hopefully one RTL language makes it through.

If anyone know someone who knows someone who knows Arabic and is willing to contribute, please share this thread with them or forword them to the project.

Cheers,

[END]

[UPDATE 28/06/2020]

For those interested in translating Arabic ==> Project Page

[END]

Arabic Demos:

edit retag remove flag flag offensive (1) close delete

Comments

if you wanna do this via upvotes of the question or some answer, convert it to an wiki please

pawel ( 2020-06-21 16:40:03 +0300 )edit

Fair point. Done.

mad_dev ( 2020-06-21 18:09:53 +0300 )edit

why the motivation is to be unofficial instead of official with the jolla tool dedicated for translation?

cemoi71 ( 2020-06-23 01:16:22 +0300 )edit
1

@cemoi71 Arabic was suggested here but was never nominated. I do acknowledge that ease of use is imperative and will most likely dictate the number of contributors; I did email jolla just know asking for the steps needed to include arabic in their platform. Until i get a response, github is our way forward.

Update: I got a response back, nomination is the only way.

mad_dev ( 2020-06-23 08:57:12 +0300 )edit
1

I was involved in a project where a user interface was multilingual and supported RTL languages. If you don't consider RTL in the first place, it is really hard to bring seamless support into existing projects. I am not sure how much of the imagery above is mock-ups, but I am impressed and I very much hope you will succeed one day.

Maus ( 2020-06-24 22:57:50 +0300 )edit