Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Update fr.js
Browse files Browse the repository at this point in the history
Normalize ´ (french apostroph) into ' (usual apostroph)
  • Loading branch information
CapitainFlam committed Sep 15, 2022
1 parent 18fdf37 commit 1a0cff5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/lib/cleanup/languages/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ function clean(sentences) {
.replace(/\s+\)/g, ')')
.replace(/\s+\]/g, ']')

// remplacing – (long hyphen) by - (short hyphen)
// normalize – (long hyphen) into - (short hyphen)
.replace(//g, '-')

// no space before or after hyphen
.replace(/\s+-\s+/g, '-')

Expand All @@ -36,6 +35,9 @@ function clean(sentences) {
// Normalize three consecutive dots into unicode elipsis
.replace(/\.{3}/g, '…')

// Normalize ´ (french apostroph) into ' (usual apostroph)
.replace(//g, '\'')

// In fr-FR, those should have a no space before and a normal space after
.replace(/\s+,/g, ',') // before ...
.replace(/\s+\./g, '.')
Expand Down

0 comments on commit 1a0cff5

Please sign in to comment.