Page MenuHomePhabricator

Typing quote or apostrophe in the section editor produces directional variants
Open, NormalPublic

Description

How many times were you able to reproduce it?

Always

Steps to reproduce

  1. Navigate to the article section editor interface (navigate to an article, tap an edit pencil)
  2. While editing, tap the ' or " key on the keyboard

Expected results

' or " are inserted

Actual results

One of the directional variants , , , or are inserted

Environments observed

App version: 6.2.0 1581
OS versions: iOS 12
Device model: X

Notes

The enwiki style guide forbids directional quotes and apostrophes: https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style#Quotation_marks

Event Timeline

Mhurd created this task.Feb 20 2019, 12:11 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 20 2019, 12:11 AM
JoeWalsh renamed this task from Typing quote and apostrophe on new editor keyboard produces slanty 'smart' variants to Typing quote or apostrophe in the section editor produces directional variants.Feb 20 2019, 11:36 AM
JoeWalsh updated the task description. (Show Details)
JoeWalsh triaged this task as Normal priority.
JoeWalsh moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App-Backlog board.
JoeWalsh claimed this task.
JoeWalsh removed JoeWalsh as the assignee of this task.Feb 20 2019, 11:44 AM
JoeWalsh added a subscriber: JoeWalsh.

This attempted fix broke autocomplete in other unexpected ways - for example if you typed "I'm it would replace it with "“I'm. I'm not sure if there's a less invasive way to have CodeMirror replace the directional quotes and apostrophes - extraKeys didn't work either. Another option for a fix would be replacing directional quotes and apostrophes in the wikitext before uploading it.

Mhurd added a comment.Feb 20 2019, 5:57 PM

Ya we'd have to replace it in the wikitext sent to the edit preview API too...

JMinor added a subscriber: JMinor.

This issue also exists for mobile web on iOS, and I would guess on Android as well, given our limited control over keyboard behaviors.

I like the idea of potentially making the quotes "dumb" at submit time. Toni suggested perhaps via a confirmation dialog ("looks like you're quotes were smart we made them dumb, is that okay?"

It would also be good to understand if this affects other latin character languages, so we know if we should do this in all languages or just english. For example, what do we do about guillemets which inherintly have a direction and are used in French and other langs?

Until we have more clarity I'm moving this to Needs Acceptance Criteria

JMinor added a subscriber: Johan.Feb 20 2019, 7:57 PM

@Johan thoughts on ways to decide what to do here? See description for context. Basically the default keyboard behavior contradicts the style guide in english, and this is likely an issue across mobile, and potentially in other latin script languages. Do we let people do it anyway and hope a bot/user fixes it? Prevent it entirely? Ask the users? Is this an issue in any other languages?

Johan added a comment.EditedFeb 20 2019, 8:43 PM

Uh, so this is not going to be easy.

https://de.wikipedia.org/wiki/Wikipedia:Typografie#Anf%C3%BChrungszeichen for example states that in German the "dumb" quotes may only be used when the wikitext or HTML demand it and it isn't seen in the article. In all article text, curly quote marks are to be used.

Als Anführungszeichen sind in der deutschsprachigen Wikipedia ausschließlich typographische Anführungszeichen zu verwenden, einzugeben wie unten erklärt. Die Anführungszeichen des Schreibmaschinensatzes (") – erzeugt durch Umschalt + 2 bzw. Shift + 2 – sind im Artikeltext nicht zu verwenden. Diese Zeichen sind ausschließlich an solchen Stellen zu verwenden, wo dies für HTML- bzw. MediaWiki-konformen Quellcode zwingend notwendig ist, z. B. bei Einzelnachweisen (z. B. <ref name="NN">) oder bei Tabellenformatierungen (z. B. {| class="wikitable"). Sie sind dann nur im Quellcode und nicht im dargestellten Artikeltext sichtbar.

Als Anführungszeichen im Artikeltext sollen also in erster Linie „ und “ verwendet werden; für geschachtelte Anführungszeichen ‚ und ‘.

https://jakubmarian.com/map-of-quotation-marks-in-european-languages/ is a good illustration of the problem of trying to standardise anything around quotation marks. Taking guillemets as an example: just in the main Scandinavian countries they vary between «Norwegian», »Swedish» and »Danish«.

The Swedish style guide, explicitly states that you're free to use dumb quotation marks, curly quotation marks or guillemets:
https://sv.wikipedia.org/wiki/Wikipedia:Skrivregler#Citationstecken

I'd strongly recommend against doing this for all languages.

Johan added a comment.Feb 20 2019, 8:54 PM

There might be other languages where the same thing would be helpful, but in that case we should probably implement it on a per-language basis.

For clarity, is this the problem?

  • iOS, and therefore the iOS mobile app for editing Wikipedia, automatically converts straight ("dumb") quotation marks into curly ("smart") quotation marks.
  • This automatic conversion makes typing wikitext for formatting (e.g., italics) difficult.
  • In article text, the use of curly quotes is mandatory at dewiki and prohibited at enwiki.

Right?

@Whatamidoing-WMF

We're less concerned about users typing wikitext for formatting since there is a dedicated toolbar that applies formatting to text. Typing bold and italic syntax with the iOS keyboard is cumbersome regardless of whether or not there are smart quotes since it auto-switches back to the default keyboard after typing an apostrophe. This behavior is useful for writing prose with apostrophes, so we'd like to keep it.

The other two items you mention are a good summary of the issue - the keyboard inserts curly quotes and apostrophes and there are differing rules around their use on different wikis.

cmadeo added a subscriber: cmadeo.Feb 26 2019, 7:39 PM