VisualEditor/Typing/Right-to-left
Appearance
Introduction
[edit]This is an acceptance test procedure for typing in a right-to-left language in the VisualEditor.
The basic typing test is done using Hebrew, because Hebrew characters should be easier to discern than of the other alphabets. Special features of complex RTL scripts will be checked in other tests.
Basic assumptions
[edit]- Visual Editor is completely installed and configured (Parsoid etc.)
- LocalSettings.php:
$wgLanguageCode = "he";
- The computer has a physical US QWERTY keyboard.
- The computer has an English (US) keyboard enabled in software.
- The computer has a Hebrew keyboard enabled. (TODO: Which one? Specify for Mac, Desktop Linux, Windows.)
- The computer has a Hebrew font installed.
- The user interface of the wiki is Hebrew (change using preferences or ULS)
N.B.: The words "right" and "left" in this document refer to sides. "Right" doesn't mean "correct" and "left" doesn't mean "not taken".
Basic typing
[edit]- Start a new article that doesn't exist.
- Start editing it using the Visual Editor.
- Check: The cursor is at the top right corner.
- Type
a
.- Check: The letter
ืฉ
appears on the screen in the top right corner. - Check: The cursor is immediately to the left of the letter.
- Check: The letter
- Type
k
.- Check: The letters
ืฉื
appear on the screen in the top right corner. - Check: The cursor is immediately to the left of the letters.
- Check: The letters
- Type
?
- Check: The letters
ืฉื?
appear on the screen in the top right corner. From right to left:ืฉ
, thenื
, then?
. - Check: The cursor is immediately to the left of the question mark.
- Check: The letters
- Press Enter.
- Check: The first line didn't change.
- The cursor is at the right end of the second line.
- Switch the keyboard layout to English
- Type in English:
Hey!
- Check: The text appears as
Hey!
at the right side of the second line. The exclamation mark must appear on the left end, next to the letterH
. - Check: The cursor is at the left of the line, next to the exclamation mark.
- Check: The text appears as
Paragraph direction
[edit]This feature is not implemented yet. Reference bug: Bug 41010 - There's no way to specify the directionality of a paragraph.
- Press the toolbar button for changing the paragraph direction to left-to-right.
- Check: The first line hasn't changed - it's still
ืฉื?
, at the right side of the line. - Check: The second line now has the text
Hey!
at the left side of the line, with the exclamation mark on the right side of the word, next to the lettery
.
- Check: The first line hasn't changed - it's still
- Select the whole text (probably something like Ctrl+A)
- Press the toolbar button for changing the paragraph direction to right-to-left.
- Check: The first line says
ืฉื?
aligned to the right. - Check: The second line says
Hey!
aligned to the right, with the exclamation mark at the left end.
- Check: The first line says
- Press the keyboard shortcut for changing the paragraph direction to left-to-right.
- Check: The first line says
ืฉื?
aligned to the left, with the question mark at the right end. - Check: The second line says
Hey!
aligned to the left, with the exclamation mark at the right end.
- Check: The first line says
- Press the keyboard shortcut for changing the paragraph direction to right-to-left.
- Check: The first line says
ืฉื?
aligned to the right, with the question mark at the left end. - Check: The second line says
Hey!
aligned to the right, with the exclamation mark at the left end.
- Check: The first line says
Keyboard shortcuts for movement and selection
[edit]- While the whole text is selected, change the keyboard layout to Hebrew and type
dwui su
.- Check: All the previous text was deleted and replaced by new text.
- Check: The first line says
ื'ืื ืื
, aligned to the right and the cursor is at the left end of the line.
- Press the right arrow on the keyboard (โ).
- Check: The cursor moved one character to the right and is between the letters of the two-letter word.
- Press the Home button (probably Ctrl+โ on a Mac).
- Check: The cursor is at the right end of the line.
- Press the left arrow on the keyboard (โ).
- Check: The cursor moved one letter to the left and is between the first letter from the right and the apostrophe.
- Hold Shift and press โ three times.
- Check: The words
ื'ืื ืื
appear in the first line, aligned to the right. - Check: The letters
'ืื
are selected.
- Check: The words
- Type
rvo
.- Check: The words
ืืจืื ืื
appear in the first line, aligned to the right. - Check: No text is selected.
- Check: The cursor is on the right side of the space between two words.
- Check: The words
- Hold Shift and press โ three times.
- Check: The text
ืืจืื ืื
appear in the first line, aligned to the right. - Check: The letters
ืจืื
are selected.
- Check: The text
- Type
trh
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: No text is selected.
- Check: The cursor is on the right side of the space between two words.
- Check: The words
- Press Shift-Control-โ (Probably Shift-Command-โ on a Mac).
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: The first word from the right is selected.
- Check: The words
- Press the End key. (Probably Control-โ on a Mac)
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: No text is selected.
- Check: The cursor is on the left end of the first line.
- Check: The words
- Press Ctrl+โ.
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: The cursor is on the left side of the space between the two words.
- Check: The words
- Press Ctrl+โ.
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: The cursor is in the right end of the first line.
- Check: The words
- Press Ctrl+โ.
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: The cursor is in the right side of the space between the two words.
- Check: The words
- Press Ctrl+โ.
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: The cursor is in the left end of the first line.
- Check: The words
- Press Ctrl+โ.
- Press Ctrl+โง Shift+โ.
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: The two letter word
ืื
is selected.
- Check: The words
- Press the End key.
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: The cursor is in the left end of the first line.
- Check: The words
- Press Shift-Home
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: Both words are selected.
- Check: The words
- Press the Home key.
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: The cursor is in the right end of the first line.
- Check: The words
- Press Shift-End
- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: Both words are selected.
- Check: The words
- Press the End key.
- Press Enter twice.
- Type
akuo/
.- Check: The words
ืืืจื ืื
appear in the first line, aligned to the right. - Check: The second line is empty.
- Check: The word
ืฉืืื.
appears in the third line, aligned to the right, and the period is at the left end of the line. - Check: The cursor is at the left end of the third line.
- Check: The words
- Press Ctrl+Home.
- Check: The cursor is at the right end of the first line.
- Press Ctrl+End.
- Check: The cursor is at the left end of the third line.
- Press Ctrl+โง Shift+Home.
- Check: The whole text is selected.
- Press End.
- Check: The cursor is at the left end of the first line.
- Press Ctrl+โง Shift+End.
- Check: The first line is not selected.
- Check: The second and the third line are selected.
- Press the Home key.
- Check: No lines are selected.
- Check: The cursor is at the right end of the third line.
- Press the Delete key (Mac: fn-delete).
- Check: Nothing is selected.
- Check: The third line says
ืืื
. - Check: The cursor is at the right end of the third line.
- Press the End key.
- Press the Backspace key ("delete" on Macs) twice.
- Check: The cursor is at the left end of the third line.
- Check: The third line says
ืื
.
Inline direction
[edit]- Press Ctrl+Home.
- Press End.
- Type one space.
- Switch the keyboard layout to English.
- Type
(Gary Doe;
- Type one space.
- Switch to the Hebrew keyboard
- Type
12 cnth 1977
- Check: The first line says:
ืืืจื ืื (Gary Doe; 12 ืืืื 1977)
. The number12
is to the right of the wordsGary Doe;
. (This is intentionally incorrect display.)
- Check: The first line says:
- Select the words
Gary Doe
(with any punctuation marks). - Use the language setting button to set the language of the selected text to English.
- Check: The first line says:
ืืืจื ืื (Gary Doe; 12 ืืืื 1977)
. The semicolon appears to the left of the wordsGary Doe
, and the number12
appears to the left of the semicolon.
- Check: The first line says:
More shortcuts
[edit]- Press Ctrl+End.
- Press Enter twice.
- Type
tj, a,hho akua
. - Press Ctrl-Backspace
- Check: The words
ืืืช ืฉืชืืื
appear in the fifth line.
- Check: The words
- Press the undo button (probably Ctrl+Z).
- Check: The words
ืืืช ืฉืชืืื ืฉืืืฉ
appear in the fifth line.
- Check: The words
- Press Ctrl+โ twice.
- Press Ctrl+Delete.
- Check: The words
ืืืช ืฉืืืฉ
appear in the fifth line.
- Check: The words
Clusters in Arabic
[edit]Assumption: An Arabic keyboard layout is installed.
- Start in an empty editing window.
- Check: The cursor is at the top right corner.
- Type
sghl!
.- Check: The word
ุณูุงู !
appears in the first line. - Check: The exclamation mark is at the left end of the first line.
- Check: The cursor is to the left of the exclamation mark.
- Check: The word
- Press the right arrow (โ) four times.
- Check: The cursor is between
ุณโ
andโูุง
.
- Check: The cursor is between
- Hold down Shift and press the left arrow โ twice.
- Check:
โูุง
is selected.
- Check:
- Press Ctrl+End.
- Press Enter twice.
- Type
sQgQhl?
.- Check: The word
ุณูููุงู ุ
appears in the first line. - Check: The inverted question mark is at the left end of the first line.
- Check: The cursor is to the left of the inverted question mark.
- Check: The word
- Press the Home key.
- Hold down Shift and press the left arrow (โ) four times.
- Check: The word
ุณูููุงู
is selected.
- Check: The word