Unofficial RTL Support

*This is a continuation to the original thread on TJC

Arabic - Current Status

  • 32 components/packages/files have been translated.
  • I have encountered a persistent issue with “Field Placeholders, Icons on Fields, and LTR on the mirrored layout.”


Note the overlapping position of the placeholder and the cancel icon – Media app. It takes care of itself when text is entered

  • I am currently working on Settings. I will push a test package to openrepos with almost half of settings translated. The reason being that for each qml file, mirroring must be applied at a certain line. I’ve opted for Incrementally appending the mirroring declaration, rather than doing it after I finish it.

…I am not allowed to upload more than one image…hence the tweets.

6 Likes

Greate News…

Jolla just added community arabic to the pootle. https://translate.sailfishos.org/ar/

3 Likes

A few notes on rtls.sh

It’s main function is to simply append the mirroring declaration at a given line. However, during yesterday’s testing and for some reason(not willing to investigate), one file was not appended. I have since added logging to it.

Append::o::2020-07-20 01:32:59+03:00 test.qml 0365b0755860c0c7dcb0b02ef4ddc3f35306aa2b
Append::a::2020-07-20 01:32:59+03:00 test.qml 1ca53a711ee774ec2b37fcc89541eb5816393b32
Delete::a::2020-07-20 01:34:44+03:00 test.qml 1ca53a711ee774ec2b37fcc89541eb5816393b32
Delete::o::2020-07-20 01:34:44+03:00 test.qml 0365b0755860c0c7dcb0b02ef4ddc3f35306aa2b

Where Append and Delete are the operations. o and a are the states, original and appended respectively. A condition could be added to match the checksums to make sure that the file was reverted to its original state, until then -c argument and visually checking is fine.

I have also added the ability to pass FILES.txt and RTLSTRING as arguments, since the search bar issue(issue #47) would probably require a different declaration.

1 Like

First public build from Pootle is live on openrepos. FILES updated Always run -d before -rtl in rtls.sh-also updated

Nothing new other than more issues…

Back in the 70’s there was a computer scientist–I think–who eloquently described system designers. He stated something to the effect of the following: There 2 types of designers. The first, if presented with multiple problems will solve them one at a time. The second will refute the notion that the problems are in fact the real problems and infer that there is a deeper issue which instigated the problems at hand. If anyone knows the real quote or his name please share.

I say this because I was at a crossroads. I used to translate a component then fix whatever needs fixing, then move to the next one. I am now inclined to finalize the entrity of the remaining translations, then tackle mirroring and address the issues later. This way we can have the core ready for implementation rather than having parts of it implemented.

I will try my best to document issues I encounter on the repo page and would very much appreciate current users who are using the latest build to contribute by means of reporting issues.

1 Like

Update–Hamza wasl & qat’a issue.

This is here for documentation.

The arabic glottal stop Hamza(ء) and its relationship with Alif(ا-أ-إ) is complicated. There are two types of Hamza when Alif is at the beginning of the word:

  • Hamzat Alwasal (A hamza which attaches, as in not emphasized when spoken and disregarded when written in modern arabic – ا)
  • Hamzat Alqat’ (A hamza which breaks the rhythm of speech, as in emphasis is on it when preceded by a preposition(for example) and is written as أ - إ)

There are rules for when to assign Hamzat Alwasl and Hamzat Alqat’:

Hamzat Alqat’

  • All nouns except the the 10 nouns(10 particular nouns)
  • All prepositions except the definite article ال
  • The preterite verb of the form 3 and its infinitive
  • The preterite and the imperative verb of the form 4 and its infinitive

Hamzat Alwasal

  • The 10 nouns
  • The definite article ال
  • The imperative verb of the form 3
  • The preterite and imperative verb of the form 5 and its infinitive
  • The preterite and imperative verb of the form 6 and its infinitive

The problem was-and this is completely my fault–that I used a simplified version of the rule(adding a preposition before the word to determine if it should be a Wasal or a Qata’). The simplified rule state that if the glottal stop appears in speech after preceding it with a preposition, then it’s a Qata’; if it doesn’t then it’s a Wasal. The rule has failed me.

@reaamak brought this to my attention around a week ago, I have since been scouring the pootle for inconsistencies and mistakes retaining the Hamza.

If any arabic speaker finds a mistake, please report it here or on github.

2 Likes

There seems to be an issue with how QML string/numeric vars are represented. This is a clarification in the hopes that it might assist other translators.

This assumes that translation is done via the Pootle. I emphasize this point because I can’t recall facing this issue whilst on linguist.

This affects %1, %2, ..... etc(String Type Variable) and %n(numbers)

Take this for example: https://translate.sailfishos.org/ar/eventsview-extensions/translate/lipstick-jolla-home-twitter.ts#unit=584570

%1 Retweeted --> قام 1% بإعادة التغريد


From https://github.com/Logic-gate/unofficial-jolla-language-pack-ar/blob/3b04d5db7ae5392b6cd17221aa0f9310e44bd6ac/source/ar_SA/unofficial-jolla-language-pack-ar/eventsview-extensions/lipstick-jolla-home-twitter.ts#L21

Note that the string type was not correctly converted.

Now compare it with https://github.com/Logic-gate/unofficial-jolla-language-pack-ar/blob/68808dbf6855bd5ff6932895923ea9791f082373/source/ar_SA/unofficial-jolla-language-pack-ar/eventsview-extensions/lipstick-jolla-home-twitter.ts#L21

%1 Retweeted --> قام %1 بإعادة التغريد
Which does correctly display the string.

As for the reason behind this oddity, I suspect that lrelease compiles files based on char codes(if rtl range; read from right) or somethings to that effect based on lang-code. I would very much appreciate any feedback from @sledges or @nthn on this matter.

There are anomalies to this rule. Take this for example https://translate.sailfishos.org/ar/jolla-calendar/translate/sailfish-components-calendar-qt5.ts#unit=584712
It is best to leave strings with only vars in them alone. They will fallback and be displayed correctly.