Repository navigation
Add Arabic locale and RTL support - #2381
AliElkhedr wants to merge 4 commits into
Conversation
This change adds the Arabic locale bundle and enables right-to-left UI setup across the browser and native app, including RTL-aware document direction, fonts, and back-arrow icons. It also normalizes Arabic search text (diacritics, tatweel, and letter variants) in the native tree so bookmark and tag searches work consistently for Arabic content. Coverage was added for the Arabic normalization behavior in the native storage tests.
|
Thank you for taking the time to implement this! |
|
Here's what claude says: |
|
"Thanks for the thorough review! I've addressed all 8 feedback points: Bumped search backfill to version 2 to re-index pre-existing bookmarks with normalized search text. |
|
Woop woop! Can you drop _locales/ar/messages.json - we have it in develop from Transifex by now. Please use Transifex to fill those translations. Additionally, the search backfill can overwrite fresh search text (NativeTreeQuery.ts:261). It now reads every row, computes search_text in JavaScript, and writes it back later in a separate batch. If a sync saves a renamed bookmark in between, the backfill puts back text built from the old title. The bookmark then can't be found by its new title until it is edited again, because search_backfilled=2 stops any further rebuild. A guard in the UPDATE (only write if search_text still holds the value read) would fix it. Also, percent-encoded URLs are no longer searchable (NativeTreeStore.ts:69). Both the stored search text and the matching now use the decodeURI()'d URL, so a search for a%20b, or for a pasted encoded URL fragment, stops finding the bookmark. |
| v-if="items.length > 1" | ||
| :items="items" | ||
| :style="{...(inItem && { marginLeft: '-1.5em', marginTop: 0, marginBottom: 0, paddingTop: 0, paddingBottom: 0 })}"> | ||
| :style="{...(inItem && { [($vuetify && $vuetify.rtl) ? 'marginRight' : 'marginLeft']: '-1.5em', marginTop: 0, marginBottom: 0, paddingTop: 0, paddingBottom: 0 })}"> |
There was a problem hiding this comment.
Can we use marginInlineStart?
|
|
||
| <style> | ||
| [dir="rtl"] .v-application, | ||
| [lang^="ar"] .v-application { |
There was a problem hiding this comment.
Should we drop ar here? Seems redundant. Alternatively, we should list all rtl langs here, I think :)
…ale, breadcrumb inline margin Index both encoded and decoded bookmark URLs, and avoid overwriting newer search text during backfill. Use text direction for RTL font styling and logical breadcrumb spacing; remove the Arabic locale file.
|
Thanks for the follow-up review! I've addressed all the points in the latest commit:
All tests (233 passing), linting, and type checks continue to pass cleanly. |
This change adds the Arabic locale bundle and enables right-to-left UI setup across the browser and native app, including RTL-aware document direction, fonts, and back-arrow icons. It also normalizes Arabic search text (diacritics, tatweel, and letter variants) in the native tree so bookmark and tag searches work consistently for Arabic content. Coverage was added for the Arabic normalization behavior in the native storage tests.