User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1) Gecko/20090624 Firefox/3.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1) Gecko/20090624 Firefox/3.5 In the french version of SUMO, if i activate the interactive translation (Toggle interface translation on), the french strings wich were already translated have been cut at the apostrophe character (i don't know when). For exemple, "Page d'accueil du contributeur" was become "Page d" And "Fermer la traduction de l'interface" was become "Fermer la traduction de l" If i translated them again, the translation is up-to-date, with the complete sentence ("Page d'accueil du contributeur") but if i want to change it, (with interactive transtaltion), the translation window only show me "Page d" I think the ' character cut the sentence Reproducible: Always Steps to Reproduce: 1. Go on the french version of SUMO 2. Log In and Toggle interface translation on 3. Edit a sentence with a ' Actual Results: Page d Expected Results: Page d'accueil du contributeur Maybe run on other SUMO languages
Confirmed. On editing "Fermer la traduction de l" to change it to "Fermer la traduction de l'interface", the string shows up right. But when I edit it again, it appears cut off at the apostrophe in the interactive translator. For more details, see: https://support-stage.mozilla.org/tiki-edit_languages.php?locale=en&interactive_translation_mode=on (set language to French in user prefs).
Created attachment 387345 [details] [diff] [review] patch, v1 Did some escaping.
Sorry for mentioning this just now (I noticed this bug in the fixed list), but the problem would not be there if one uses the curly right-quote character for the apostrophe (’), sometimes referred to as the preferred character for this purpose, instead of the vertical (typewriter) one ('). See e.g. http://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html and http://en.wikipedia.org/wiki/Apostrophe. For Dutch, we only use curly quotes in both the products and sumo, for quotations as well as for apostrophes. It would look nice if other locales did so as well (including en-US), but it’s up to each locale itself to decide, of course.
(In reply to comment #4) I disagree. While the right-single-quote may look nicer, it's not an ASCII character and requires a font that contains the character. Lots of fonts today don't and this can result in missing glyphs. Also, a search indexer doesn't know to index it as an apostrophe so a USER searching for a word with an apostrophe may not find it.
(In reply to comment #5) I don’t intend to disagree with you, but 1) even though the missing glyphs issue may be true, I don’t think Mozilla products nor Sumo suffers from this. The current font used for both do not have a problem with it, at least for en-US, Dutch and probably oter Western locales. 2) I wonder if the apostrophe needs to be an ASCII character in the first place to make it work best for search engines (in general). Like this bug’s issue, lots of engines suffer from ‘weird’ behaviour (try Google f.i.) - note the ' is often used as ‘container character’ for phrases. Regarding Sumo, a search for the word ‘pagina’s’ shows positive results, while one for ‘pagina's’ shows them for ‘pagina’ as well as for ‘s’ only (!) - for French, a search for ‘d'accueil’ shows similar results including ones for ‘d’ only and other words starting with or containing a ‘d’. I.o.w. the ' causes confusion and thus it looks like if, like you said, one searches for a word with an apostrophe, the ' should not be used at all. CMIIW though.
Verified FIXED; as in the screenshot, you can see that "- Librairie l'l PHP GD obligatoire" took, and didn't truncate the following characters.