Comment #5 on issue 9 by trejkaz: Right-to-left override should include the
colon
http://code.google.com/p/pseudolocalization-tool/issues/detail?id=9
I don't know about web sites, because I generally work on real, GUI
applications.
Taking the following test program:
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import java.awt.ComponentOrientation;
import java.awt.FlowLayout;
public class RtlDemo implements Runnable {
public static void main(String[] args) {
SwingUtilities.invokeLater(new RtlDemo());
}
@Override
public void run() {
//String text = "\u202EName\u202C:";
String text = "שם:";
JLabel label = new JLabel(text);
JFrame frame = new JFrame("RTL Test");
frame.setLayout(new FlowLayout());
frame.add(label);
frame.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
frame.pack();
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
frame.setVisible(true);
}
}
This test program does set RIGHT_TO_LEFT orientation for the frame, but I'm
using applyComponentOrientation, which does apply that to all descendants.
When you run this program, the Hebrew example comes out with the colon on
the left. I would call that correct RTL treatment.
Now switch the comments around to put your "pseudolocalised" text into the
label and run the program again. Now the colon is on the right.
Do you still think *my* program has the bug? I hope not.
Attachments:
Screen Shot 2014-08-07 at 8.17.17 pm.png 15.5 KB
Screen Shot 2014-08-07 at 8.17.36 pm.png 15.8 KB