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

multiple pages: fix French colon punctuation #5152

Merged
merged 4 commits into from
Jan 30, 2021
Merged

Conversation

bl-ue
Copy link
Contributor

@bl-ue bl-ue commented Jan 16, 2021

Ensures that there is always one space character before colons (0xa0 thin unbreakable space instead of 0x20 normal space) in French pages.

@bl-ue bl-ue added mass changes Changes that affect multiple pages. translation Translate pages from one language to another. labels Jan 16, 2021
@bl-ue bl-ue requested a review from mebeim January 16, 2021 16:14
sbrl
sbrl previously requested changes Jan 16, 2021
Copy link
Member

@sbrl sbrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are just a few of the issues - I think your regex went a bit wrong lol

The last character has been replaced with a space, rather than a space being inserted.

Finally, does that strange space character mean anything in particular in French? Best to check before changing it.

pages.fr/common/7z.md Outdated Show resolved Hide resolved
pages.fr/common/hping.md Outdated Show resolved Hide resolved
pages.fr/common/hping.md Outdated Show resolved Hide resolved
pages.fr/common/hping.md Outdated Show resolved Hide resolved
pages.fr/common/hping.md Outdated Show resolved Hide resolved
pages.fr/common/hping.md Outdated Show resolved Hide resolved
pages.fr/common/nano.md Outdated Show resolved Hide resolved
pages.fr/common/nano.md Outdated Show resolved Hide resolved
@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 16, 2021

@sbrl, you're right!! Funny 😄

Finally, does that strange space character mean anything in particular in French? Best to check before changing it.

I changed it because more pages have a normal space (139 pages) than ones that have the strange one (5), and that space was also in an English page...

@bl-ue bl-ue requested a review from sbrl January 16, 2021 17:54
@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 16, 2021

@sbrl I found a bunch more of that mistake so I just went back to the beginning and re-did it all. Done now ;)

Copy link
Collaborator

@schneiderl schneiderl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've once seen someone explaining this weird space here in tldr but I cannot remember what is the reason for it.

@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 19, 2021

@schneiderl could you be thinking of #3446 (comment)?

@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 19, 2021

😬 I fear that I was wrong about the space...maybe there should be a 0xa0 / 160 char code space before every colon...cc @julienc91 @dgsb

@julienc91
Copy link
Contributor

Indeed, as I said in the comment you reported, French typographic rules require this non-breaking space before some punctuation characters (":", ";", "?" and "!" in particular). Replacing those by a normal space (0x20) would potentially break the layout by putting the punctuation character alone at the beginning of a line.

@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 19, 2021

@julienc91 okay, thank you very much. I didn't know this.

@mebeim mentioned in #3446 (comment) "Indeed a space before and after the colon should be used" —so there should be a non-breaking space after the colon as well as before?

@julienc91
Copy link
Contributor

julienc91 commented Jan 19, 2021

@mebeim A non-breaking space before the colon, and a normal space after.
Basically, this is allowed:

A long line that ends with a colon :
and the sentence continues on the
next one

But this is not:

A long line that ends with a word
: and the next line starts with a 
colon.

@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 19, 2021

Really nice, thank you @julienc91.

Is the space after the : colon required at the end of a sentence that's on its own line? Obviously, in the middle of a sentence there should be, but what about at the end of one of our examples like this—

- Compresser un fichier ou un dossier :

`...`

We wouldn't need to add a space after that, would we?

@julienc91
Copy link
Contributor

julienc91 commented Jan 19, 2021

No space after if you have a line return character right after. Regex style (with 0xa0 and 0x20 being respectively the non breaking space and the normal space):

[^:]+(0xa0):($|(0x20))

@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 19, 2021

Okay, thank you @julienc91. This is very good to know. Now I will proceed.

By the way, it's 0xa0 (160) ' ', not 0x0a (10) '\n' 😉

@bl-ue bl-ue changed the title multiple pages: fix french format multiple pages: fix French colon punctuation Jan 19, 2021
@julienc91
Copy link
Contributor

@bl-ue looks good to me! Also, "ex" is shorthand "example", while "ici" just means "here", so I guess it depends on the context? I didn't see any error in the 3 occurrences I found.

@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 20, 2021

Okay! I was just wondering if perhaps someone who translated those pages missed something :)

Thank you very much @julienc91 for your help! You've been extremely helpful!

@bl-ue bl-ue marked this pull request as draft January 27, 2021 13:59
@bl-ue bl-ue marked this pull request as ready for review January 27, 2021 13:59
Copy link
Member

@sbrl sbrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I assume the regular space was swapped for a non-breaking one right?

@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 27, 2021

Exactly.

@bl-ue
Copy link
Contributor Author

bl-ue commented Jan 30, 2021

Note: Just in case anyone forgets, please squash this PR and do not rebase it. The commit history is a little messy because I was learning the whole way through :)

@sbrl sbrl merged commit 5f1ef5b into master Jan 30, 2021
@sbrl sbrl deleted the bl-ue/fix-french-format branch January 30, 2021 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mass changes Changes that affect multiple pages. translation Translate pages from one language to another.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants