Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quotes handled incorrectly in Virtaal #477

Closed
leuce opened this issue Aug 12, 2008 · 11 comments
Closed

Quotes handled incorrectly in Virtaal #477

leuce opened this issue Aug 12, 2008 · 11 comments

Comments

@leuce
Copy link

leuce commented Aug 12, 2008

When translating a PO file in Virtaal that has smart quotes in it, Virtaal displays it as straight quotes. If the user types ordinary straight quotes, the resultant PO file contains escaped straight quotes, not smart quotes. If the user copies the quotes from the source box, the resultant PO file does contain smart quotes correctly.

However, since the user cannot see in VirTaal which quotes are opening quotes and which ones are closing quotes, he might accidently copy an opening quote to the position of a closing quote, and this shows up in the resultant PO file.

Attached:
- original myfile.po (the original file)
- from virtaal 1 myfile.po (from VirTaal, when typed straight quotes)
- from virtaal 1 myfile.po (from VirTaal, when copied from source box)
- quotething.jpg (screenshot of original myfile.po in VirTaal)

@leuce
Copy link
Author

leuce commented Aug 12, 2008

Created [attachment 204](http://bugs.locamotion.org/attachment.cgi?id=204)

original myfile.po in VirTaal (Windows XP Pro)

@leuce
Copy link
Author

leuce commented Aug 12, 2008

Created [attachment 205](http://bugs.locamotion.org/attachment.cgi?id=205)

original myfile.po

@leuce
Copy link
Author

leuce commented Aug 12, 2008

Created [attachment 206](http://bugs.locamotion.org/attachment.cgi?id=206)

from virtaal 1 myfile.po

@leuce
Copy link
Author

leuce commented Aug 12, 2008

Created [attachment 207](http://bugs.locamotion.org/attachment.cgi?id=207)

from virtaal 2 myfile.po

@dwaynebailey
Copy link
Member

My feeling is that this is best solved with a few ideas:

1) We ship with a highly readable latin font e.g. DMCustomMono2 (see http://www.pgdp.net/wiki/Installing_DPCustomMono)

2) Use automcomplete

3) Introduce custom quotes to our quotes checks, only picks up the errors later rather then early

@friedelwolff
Copy link
Member

On my system the default Sans font is DejaVu Sans, and the difference between straight and smart quotes is clear from a point size of 10. In my current setup, that means that I also can’t distinguish between the two. We could make things bigger, or look at better fonts – so I’m blocking bug #479.

On my system the differences are visible using Liberation Sans or DejaVu Mono at font size of 9 points. I am using Linux, currently with hinting on and TrueType support. With hinting disabled, the difference is visible at font size 9.

I guess the default on Windows is Arial and probably at size 9 – no idea about hinting and whether it would make a difference.

On OSX, some fonts seem to work at size 9, like Monaco. Arial and several others are quite blurred, even at size 10. I wasn’t able to influence this with the anti-aliasing settings.

@leuce
Copy link
Author

leuce commented Aug 12, 2008

The monospace font “Courier New” is present by default on all Windows systems since Windows 95. It displays smart quotes correctly. Courier new also distinguishes well between the four characters I1l|. Because it is a monospace font, leading, trailing and double spaces are easy to see (although people who are not used to looking out for this might still make the mistake).

@friedelwolff
Copy link
Member

My Linux system doesn’t have Courier, but possible alternatives include “Liberation Mono”, “Nimbus Mono L” and “DejaVu Sans Mono”, all of which copes perfectly at 9 points. I guess we should construct a file with a wide variety of source strings (spacing, letter confusion, quote marks confusion, etc.) and make some screen shots for people to evaluate.

@friedelwolff
Copy link
Member

DPCustomMono2 is quite ugly – I wonder how long people will be able to stand looking at that. We can probably learn a lot from it, but I don’t see it serving our purpose better than a Courier type font. I’m also not sure that DPCustomMono2 has the best coverage, hinting, etc. that is available. In things like the punctuation spacing, I think Courier might even be better.

@friedelwolff
Copy link
Member

Please confirm whether this is still a problem with Virtaal 0.2-rc1. I specify the font to be “mono” which hopefully selects a slightly better font. We’ll need to test this more and on more systems. I did see one Windows XP system where 1l and 0O were identical. Please mention software (like office suites) on the system that might have installed extra fonts.

@friedelwolff
Copy link
Member

To the best of my knowledge this has been fixed by specifying “monospace” as the default font. Feel free to reopen if anything is still amiss. We should still try to look at packaging fonts as tracked in bug #479. I’m closing as fixed.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants