Mark Hebrew locale as RTL
This commit is contained in:
1 parent
65e810ec79
commit
0b31d3a274
2 files changed
+2
-9
No files matched your search
@@ -20,17 +20,10 @@ describe('getTextDirection', () => {
|
||||
test('returns rtl for right-to-left languages', () => {
|
||||
expect(getTextDirection('ar-SA')).toBe('rtl');
|
||||
expect(getTextDirection('fa-IR')).toBe('rtl');
|
||||
expect(getTextDirection('he-IL')).toBe('rtl');
|
||||
expect(getTextDirection('ur-PK')).toBe('rtl');
|
||||
});
|
||||
|
||||
// NOTE: Hebrew (he-IL) is a right-to-left language but is NOT marked with
|
||||
// `dir: 'rtl'` in `languages`, so getTextDirection returns 'ltr'. This asserts
|
||||
// the current (suspected buggy) behavior. If the source is fixed to add
|
||||
// `dir: 'rtl'` for he-IL, update this expectation to 'rtl'.
|
||||
test('does not mark Hebrew as rtl (suspected source bug)', () => {
|
||||
expect(getTextDirection('he-IL')).toBe('ltr');
|
||||
});
|
||||
|
||||
test('returns ltr for left-to-right languages', () => {
|
||||
expect(getTextDirection('en-US')).toBe('ltr');
|
||||
expect(getTextDirection('fr-FR')).toBe('ltr');
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ export const languages = {
|
||||
'fo-FO': { label: 'Føroyskt' },
|
||||
'fr-FR': { label: 'Français', dateLocale: fr },
|
||||
'ga-ES': { label: 'Galacian (Spain)', dateLocale: es },
|
||||
'he-IL': { label: 'עברית', dateLocale: he },
|
||||
'he-IL': { label: 'עברית', dateLocale: he, dir: 'rtl' },
|
||||
'hi-IN': { label: 'हिन्दी', dateLocale: hi },
|
||||
'hr-HR': { label: 'Hrvatski', dateLocale: hr },
|
||||
'hu-HU': { label: 'Hungarian', dateLocale: hu },
|
||||
|
||||
Reference in new issue
Block a user