Difference between revisions of "Non Breaking Spaces Before Punctuation In French (espaces insécables)"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Scope)
m (Behavior and special cases)
Line 105: Line 105:
  
 
* '''General behavior:''' the insertion of a non breaking space is directly triggered by the input of one the mentioned punctuation marks.<br>Thus it works like the insertion of custom quotes in a French language or like the replacement "Automatic *bold* and _underline_".
 
* '''General behavior:''' the insertion of a non breaking space is directly triggered by the input of one the mentioned punctuation marks.<br>Thus it works like the insertion of custom quotes in a French language or like the replacement "Automatic *bold* and _underline_".
* '''Special cases:''' there are cases where those punctuation marks are not used in a context of a punctuation but as simple sign.<br>Such a typical context applies to URLs. In this case the replacement first applies until the "<code>:/</code>" is found. At this point, the non breaking space inserted before "<code>:</code>" is removed and the further insertion of non breaking spaces is disabled for the whole string.<br>Examples ("<code>_</code>" stands for "non breaking space"):
+
* '''Special cases:''' there are cases where those punctuation marks are not used in a context of a punctuation but as simple sign.<br>Such a typical context applies to URLs.
** typing "<code>http:</code>" becomes "<code>http_:</code>"
+
** '''URLs:''' In this case the replacement first applies until the "<code>:/</code>" is found. At this point, the non breaking space inserted before "<code>:</code>" is removed and the further insertion of non breaking spaces is disabled for the whole string.<br>Examples ("<code>_</code>" stands for "non breaking space"):
** typing one "<code>/</code>" after "<code>http_:</code>" removes the non breaking space, so we have: "<code>http:/</code>"
+
*** typing "<code>http:</code>" becomes "<code>http_:</code>"
** none of any further punctuation mark inserted in this string will trigger the replacement, so that we get:
+
*** typing one "<code>/</code>" after "<code>http_:</code>" removes the non breaking space, so we have: "<code>http:/</code>"
*** "<code><nowiki>http://www.mysite.com:8080/index.php?test=1</nowiki></code>"<br>and '''NOT''':
+
*** none of any further punctuation mark inserted in this string will trigger the replacement, so that we get:
*** "<code>http_://www.mysite.com_:8080/index.php_?test=1</code>"
+
**** "<code><nowiki>http://www.mysite.com:8080/index.php?test=1</nowiki></code>"<br>and '''NOT''':
 +
**** "<code>http_://www.mysite.com_:8080/index.php_?test=1</code>"
 +
** '''Repetition:''' the insertion of a non breaking space does not occur when such punctuation marks are repeated one after each other.<br>Examples:
 +
*** "<code>word_???</code>"
 +
*** "<code>word_?!!</code>"
  
 
=== General francophone usages ===
 
=== General francophone usages ===

Revision as of 13:46, 25 January 2010

This specification is still in discussion.
Please read the Brain-Storming section on the discussion page page.

You can also follow the discussion in French on dev@fr.openoffice.org.


Insecable logo70.png

Abstract

In French language, some punctuation signs like ; : ! ? need to have a (non breaking) space between them and the word placed before them.
The current specification describes the automatic insertion of the those spaces over the AutoCorrect Options.


References

Reference Document Check Location (URL)
Prerequisites PASSED
Product Requirement, RFE, Issue ID (required) AVAILABLE 17169
Accessibility Check (required) PASSED
Test case specification (required) [available/not available] <PLEASE ENTER LOCATION HERE>
IDL Specification [available/not available] <PLEASE ENTER LOCATION HERE>
Software Specification Rules n/a n/a
Other, e.g. references to related specs, Product Concept Document http://unicode.org/udhr/n/notes_fra.html

Contacts

Role Name E-Mail Address
Developer Cédric Bosdonnat cedricbosdo@openoffice.org
Quality Assurance Éric Savary es@openoffice.org
Documentation Uwe Fischer ufi@openoffice.org
User Experience Cédric Bosdonnat
Éric Savary
cedricbosdo@openoffice.org
es@openoffice.org

Acronyms and Abbreviations

Acronym / Abbreviation Definition
<WYSIWYG> <What You See Is What You Get>

Detailed Specification

Scope

It is about the automatic insertion or replacement (1) of certain spaces (2) before some punctuation characters (3) in French (4).

  1. Automatic insertion or replacement
    This addresses automatic insertions like defined under "Tools - AutoCorrect - Options" while typing and replacements afterward using "Format - AutoCorrect - Apply".
    This will not consist in expanding the list of possible replacements as defined under "Tools - AutoCorrect - Replace"
  2. Certain spaces
    The French typography uses 3 main spaces before the punctuation signs (See: http://unicode.org/udhr/n/notes_fra.html)
    - SPACE: U+0020
    - NARROW NO-BREAK SPACE: U+202F
    - NO-BREAK SPACE: U+00A0.
    The current implementation retains only the SPACE and the NO-BREAK SPACE (See section "Exclusion of the NARROW NO-BREAK SPACE (U+202F)" on the discussion page).
  3. Some punctuation characters
    We focused on four frequently used punctuation signs: ":", ";", "?" and "!".
    Other signs have already received AutoCorrect mechanisms (simple and double quotes).
  4. In French
    The typographic rules are not unified across the francophone countries
    Other rules apply in Canada (fr_CA).

Behavior and special cases

  • General behavior: the insertion of a non breaking space is directly triggered by the input of one the mentioned punctuation marks.
    Thus it works like the insertion of custom quotes in a French language or like the replacement "Automatic *bold* and _underline_".
  • Special cases: there are cases where those punctuation marks are not used in a context of a punctuation but as simple sign.
    Such a typical context applies to URLs.
    • URLs: In this case the replacement first applies until the ":/" is found. At this point, the non breaking space inserted before ":" is removed and the further insertion of non breaking spaces is disabled for the whole string.
      Examples ("_" stands for "non breaking space"):
      • typing "http:" becomes "http_:"
      • typing one "/" after "http_:" removes the non breaking space, so we have: "http:/"
      • none of any further punctuation mark inserted in this string will trigger the replacement, so that we get:
        • "http://www.mysite.com:8080/index.php?test=1"
          and NOT:
        • "http_://www.mysite.com_:8080/index.php_?test=1"
    • Repetition: the insertion of a non breaking space does not occur when such punctuation marks are repeated one after each other.
      Examples:
      • "word_???"
      • "word_?!!"

General francophone usages

(These usages correspond to the fr_FR, fr_BE and fr_CH locales)

The rule

The following table shows the space-character-space rules as officially defined in France (See: http://unicode.org/udhr/n/notes_fra.html)

before punctuation sign after
U+202F NARROW NO-BREAK SPACE
;
U+0020 SPACE
U+202F NARROW NO-BREAK SPACE
!
U+0020 SPACE
U+202F NARROW NO-BREAK SPACE
?
U+0020 SPACE
U+00A0 NO-BREAK SPACE
:
U+0020 SPACE


The Implementation

The following table shows the space-character-space implementation with regard to section Exclusion of the NARROW NO-BREAK SPACE (U+202F)

before punctuation sign after
U+00A0 NO-BREAK SPACE
;
U+0020 SPACE
U+00A0 NO-BREAK SPACE
!
U+0020 SPACE
U+00A0 NO-BREAK SPACE
?
U+0020 SPACE
U+00A0 NO-BREAK SPACE
:
U+0020 SPACE


Special Cases

  • non breaking space manually added:
    In case the user already added a space between the word and the punctuation sign such as 'word<nb space>:', there is no replacement.
  • space manually added:
    In case the user already added a space between the word and the punctuation sign such as 'word<space>:', the space will be replaced by a non breaking space.
  • tab manually added:
    In case the user already added a tab between the word and the punctuation sign such as 'word<tab>:', there is no replacement..
    It is then assume that the user doesn't want to use the normal typographical rules but wishes to format his text as a plain text table.

Usages effective in Canada (Québec)

(These usages correspond to the fr_CA locale)

The Rule and Implementation

The following table shows the space-character-space implementation as defined in http://www.olf.gouv.qc.ca/RESSOURCES/ti/espacements_20030605.pdf

before punctuation sign after
no space
;
U+0020 SPACE
no space
!
U+0020 SPACE
no space
?
U+0020 SPACE
U+00A0 NO-BREAK SPACE
:
U+0020 SPACE

Special Cases

  • non breaking space manually added before ";" "!" "?":
    In case the user already added a non breaking space between the word and the punctuation sign such as 'word<nb space>?', this space will be suppressed.
    Before ":" the rule defined for fr_FR applies (no replacement).
  • space manually added before ";" "!" "?":
    In case the user already added a space between the word and the punctuation sign such as 'word<space>?', this space will be suppressed.
    Before ":" the rule defined for fr_FR applies (replacement with a non breaking space).
  • tab manually added: See the rule defined for fr_FR applies (no replacement).

UI

Option under " Tools - AutoCorrect Options - Localized Options"

Insecable UI.png

1. The check box group

Property State Comment
Visible: When the language is set to "French" in the upper list box. CAUTION: this condition will NOT be implemented for OOo 3.3
Until implementation, this element will be always visible.

2. [M] CheckBox

Property State Comment
Visible: Always CAUTION: Writer only! Other applications don't have this check box.
Enabled: Always
Disabled: Never
Tristate: None
Checked: Yes
CheckBox Label: Add non breaking space before specific punctuation marks in French text This is the wording for OOo 3.3. The final version will be:
Add non breaking space before specific punctuation marks
Same label for both [M] and [T] check boxes.

3. [T] CheckBox

Property State Comment
Visible: Always
Enabled: Always
Disabled: Never
Tristate: None
Checked: Yes
CheckBox Label: Add non breaking space before specific punctuation marks in French text This is the wording for OOo 3.3. The final version will be:
Add non breaking space before specific punctuation marks
Same label for both [M] and [T] check boxes.


Help | User Interface Element Templates | Example Spec

Accessibility

Accessibility is the responsibility of the I-Team, beginning with UX, DEV and QA, to ensure that the following requirements are fulfilled:

  1. Is the feature fully keyboard accessible?
    (Ex: "I can go everywhere and use every function using the keyboard only"

    Does not apply
  2. Have I specified visual alternatives for the case that the specified feature includes audio as output?
    Does not apply
  3. Are text alternatives for all icons and graphics available?
    Does not apply
  4. Don't provide important information in colors alone
    (Ex: marking important information hard coded in red)

    Does not apply
  5. Does the specified feature respect system settings for font, size, and color for all windows and user interface elements?
    Does not apply
  6. Have I ensured that flash rates do not exceed 2 hertz for blinking text, objects, or other elements? In any case, try to avoid flashing UI elements
    Does not apply
  7. Ensure that assistive technology (AT) (like ZoomText or Orca) is able to read everything.
    Does not apply

QUESTIONS?

If you need help while designing, implementing or testing the accessibility of the UI, ask/visit:

  1. The accessibility check list at the OpenOffice.org Wiki
  2. accessibility@ui.openoffice.org (The accessibility mailing lists, preferred)
  3. For specific implementation details, architecture: mt@openoffice.org (Malte Timmermann)
  4. For specific UX and testing questions: es@openoffice.org (Éric Savary)

Documentation

Context:
Help called on "Tools - AutoCorrect Options - Localized Options"

Content:
"Inserts a non breaking space before ";", "!", "?" ":" when the character language is set to French (France, Belgium, Switzerland) and before ":" only when the character language is set to French (Canada)"

Migration

Does not apply.

Configuration

Remember the option "Tools - AutoCorrect - Options - French punctuation" when updating.

Configuration Group Setting Type Default Comment
Common.xcs AutoCorrect AddNonBreakingSpace Boolean True
Writer.xcs AutoFunction/Format/Option AddNonBreakingSpace Boolean True

File Format

Does not apply.

Open Issues

<State a bulleted list of issues Issue here>

Personal tools