This repository has been archived by the owner on Dec 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: right to left layout #101
Merged
Merged
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
69c8430
Add arabic. Remove unused term.
Pertempto 3c3df1b
Translate terms to arabic.
Pertempto b93d76c
Started working on reversing rows in RTL mode.
Pertempto b417604
Add top-level rtl attribute. Start using tailwindcss-rtl.
Pertempto e7b7971
Fixed a few things that were missed before.
Pertempto 9ea9f81
Added arabic book names.
Pertempto 677325c
Merge branch 'main' into 85-right-to-left-layout
Pertempto 5b3b20b
Merge branch 'main' into 85-right-to-left-layout
arrocke 5eafd6e
Remove _short keys
Pertempto b354101
Improve how we set document.body.dir. Added missing translations.
Pertempto 8059a89
Tried using effect. Doesn't seem to work.
Pertempto cbefafa
Fixed effect.
Pertempto 22ef376
Fix arrow button order.
Pertempto 5f95063
Remove dependency on tailwindcss-rtl.
Pertempto 6ee336a
Fix bugs.
Pertempto 1e67d95
build: use repo owner to generate api url
arrocke c89a0cc
Consolidate tailwind utilities.
Pertempto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,135 +1,69 @@ | ||
{ | ||
"reference_format": "{{bookName}} {{chapterNumber}} {{verseNumber}}", | ||
"gen": "منشأ", | ||
"gen_short": "Gen", | ||
"exo": "خروج", | ||
"exo_short": "Exo", | ||
"lev": "سفر اللاويين", | ||
"lev_short": "Lev", | ||
"num": "أعداد", | ||
"num_short": "Num", | ||
"deu": "سفر التثنية", | ||
"deu_short": "Deut", | ||
"jos": "جوشوا", | ||
"jos_short": "Josh", | ||
"jdg": "القضاة", | ||
"jdg_short": "Judg", | ||
"rut": "روث", | ||
"rut_short": "Rut", | ||
"1sa": "صموئيل الأول 1", | ||
"1sa_short": "1 Sam", | ||
"2sa": "صموئيل الثاني 2", | ||
"2sa_short": "2 Sam", | ||
"1ki": "الملوك الأول 1", | ||
"1ki_short": "1 Kgs", | ||
"2ki": "لملوك الثاني 2", | ||
"2ki_short": "2 Kgs", | ||
"1ch": "أخبار الأيام الأول 1", | ||
"1ch_short": "1 Chr", | ||
"2ch": "أخبار الأيام الثاني 2", | ||
arrocke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"2ch_short": "2 Chr", | ||
"ezr": "عزرا", | ||
"ezr_short": "Ezra", | ||
"neh": "نحميا", | ||
"neh_short": "Neh", | ||
"est": "أستير", | ||
"est_short": "Est", | ||
"job": "أيوب", | ||
"job_short": "Job", | ||
"psa": "مزامير", | ||
"psa_short": "Ps", | ||
"pro": "الأمثال", | ||
"pro_short": "Prov", | ||
"ecc": "سفر الجامعة", | ||
"ecc_short": "Ecc", | ||
"sng": "أغنية الأغاني", | ||
"sng_short": "Song", | ||
"isa": "أشعيا", | ||
"isa_short": "Isa", | ||
"jer": "إرميا", | ||
"jer_short": "Jer", | ||
"lam": "الرثاء", | ||
"lam_short": "Lam", | ||
"ezk": "حزقيال", | ||
"ezk_short": "Ezek", | ||
"dan": "دانيال", | ||
"dan_short": "Dan", | ||
"hos": "هوشيا", | ||
"hos_short": "Hos", | ||
"jol": "جويل", | ||
"jol_short": "Joel", | ||
"amo": "عاموس", | ||
"amo_short": "Amos", | ||
"oba": "أوباديا", | ||
"oba_short": "Obad", | ||
"jon": "يونس", | ||
"jon_short": "Jonah", | ||
"mic": "ميكا", | ||
"mic_short": "Mic", | ||
"nam": "ناحوم", | ||
"nam_short": "Nah", | ||
"hab": "حبقوق", | ||
"hab_short": "Hab", | ||
"zep": "زيفانيا", | ||
"zep_short": "Zeph", | ||
"hag": "هاجاي", | ||
"hag_short": "Hag", | ||
"zec": "زكريا", | ||
"zec_short": "Zech", | ||
"mal": "ملاخي", | ||
"mal_short": "Mal", | ||
"mat": "ماثيو", | ||
"mat_short": "Matt", | ||
"mrk": "علامة", | ||
"mrk_short": "Mark", | ||
"luk": "لوقا", | ||
"luk_short": "Luke", | ||
"jhn": "جون", | ||
"jhn_short": "John", | ||
"act": "أعمال", | ||
"act_short": "Acts", | ||
"rom": "رومان", | ||
"rom_short": "Rom", | ||
"1co": "1 كورنثوس", | ||
"1co_short": "1 Cor", | ||
"2co": "2 كورنثوس", | ||
"2co_short": "2 Cor", | ||
"gal": "غلاطية", | ||
"gal_short": "Gal", | ||
"eph": "أفسس", | ||
"eph_short": "Eph", | ||
"php": "فيلبي", | ||
"php_short": "Phil", | ||
"col": "كولوسي", | ||
"col_short": "Col", | ||
"1th": "1 تسالونيكي", | ||
"1th_short": "1 Thess", | ||
"2th": "2 تسالونيكي", | ||
"2th_short": "2 Thess", | ||
"1ti": "1 تيموثي", | ||
"1ti_short": "1 Tim", | ||
"2ti": "2 تيموثي", | ||
"2ti_short": "2 Tim", | ||
"tit": "تيتوس", | ||
"tit_short": "Titus", | ||
"phm": "فليمون", | ||
"phm_short": "Phm", | ||
"heb": "العبرانيين", | ||
"heb_short": "Heb", | ||
"jas": "جوامع", | ||
"jas_short": "James", | ||
"1pe": "1 بيتر", | ||
"1pe_short": "1 Pet", | ||
"2pe": "2 بيتر", | ||
"2pe_short": "2 Pet", | ||
"1jn": "1 جون", | ||
"1jn_short": "1 John", | ||
"2jn": "2 جون", | ||
"2jn_short": "2 John", | ||
"3jn": "3 جون", | ||
"3jn_short": "3 John", | ||
"jud": "جود", | ||
"jud_short": "Jude", | ||
"rev": "وحي", | ||
"rev_short": "Rev" | ||
"rev": "وحي" | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These locale json files have been updated in the past few PRs. Can you make sure the arabic ones are up to date? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pertempto marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Our tailwind utilities are originally based off of tailwindcss-rtl. | ||
// https://github.com/20lives/tailwindcss-rtl | ||
const plugin = require('tailwindcss/plugin'); | ||
|
||
const paddingUtilities = require('./paddingUtilities'); | ||
const marginUtilities = require('./marginUtilities'); | ||
const insetUtilities = require('./insetUtilities'); | ||
const textAlignUtilities = require('./textAlignUtilities'); | ||
|
||
module.exports = plugin((helpers) => { | ||
const { addUtilities, theme, variants } = helpers; | ||
paddingUtilities(helpers); | ||
marginUtilities(helpers); | ||
insetUtilities(helpers); | ||
addUtilities(textAlignUtilities(helpers), variants('textAlign')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module.exports = ({ matchUtilities, theme }) => { | ||
matchUtilities( | ||
{ | ||
start: (value) => ({ | ||
'[dir="rtl"] &': { | ||
right: value, | ||
}, | ||
'[dir="ltr"] &': { | ||
left: value, | ||
}, | ||
}), | ||
end: (value) => ({ | ||
'[dir="rtl"] &': { | ||
left: value, | ||
}, | ||
'[dir="ltr"] &': { | ||
right: value, | ||
}, | ||
}), | ||
}, | ||
{ | ||
supportsNegativeValues: true, | ||
values: theme('inset'), | ||
} | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = ({ matchUtilities, theme }) => { | ||
matchUtilities( | ||
{ | ||
ms: (value) => ({ | ||
marginInlineStart: value, | ||
}), | ||
me: (value) => ({ | ||
marginInlineEnd: value, | ||
}), | ||
}, | ||
{ | ||
supportsNegativeValues: true, | ||
values: theme('margin'), | ||
} | ||
); | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't even try to translate the
short
versions, I didn't know where to start. We definitely will want an actual Arabic speaker to update all the translations in this file at some point.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the name translations are computer generated. I went back and replaced a few from this list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the short versions for now. In situations where we would use
t('gen', { context: 'short' })
it will fallback to the normal key if the_short
key is missing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done