retextjs / ideas

Share ideas for new utilities and tools built with @retextjs
https://unifiedjs.com
3 stars 0 forks source link

Future of Retext i18n #4

Closed robinmetral closed 5 years ago

robinmetral commented 5 years ago

What are the plans for internationalizing Retext?

I've seen there's already been some work on Dutch, unfortunately I'm interested in French :slightly_smiling_face: :fr:

An awesome and probably-not-so-hard first step could be making retext-smartypants extensions for other languages. For example French uses « these quote marks ».

How can I help?

wooorm commented 5 years ago

It's not too hard to support another latin-script, as retext-english and retext-dutch can be used as reference implementations and they're not too big.

And retext-smartypants already let's you customise quotes, right?

robinmetral commented 5 years ago

Well as far as I've seen the quotes options don't go as far as the french « ».

Or do you think we could add more customisation options to retext-smartypants?

wooorm commented 5 years ago

Ah sorry, I was thinking of retext-quotes! That supports guillemets, but warns about them instead of changing them.

What is actually your goal? Why the interest in French quotes?

robinmetral commented 5 years ago

My interest is actually in using Remark on French-language websites, but following the locale's typographic rules :slightly_smiling_face:

For English remark-smartypants is taking care of this, and I'd love to see alternatives for other languages/locales!

wooorm commented 5 years ago

My interest is actually in using Remark on French-language websites, but following the locale's typographic rules 🙂

Alright, well I’d appreciate an issue/PR on retext-smartypants to discuss that. And I’d also love something like parse-english but for French, but I’m not French enough to pull that off! 🍷🧀🥖

For English remark-smartypants is taking care of this, and I'd love to see alternatives for other languages/locales!

Yep, same! 👍

robinmetral commented 5 years ago

Sounds great! I'd be happy to help :slightly_smiling_face:

Logistically do you think this can happen within retext-smartypants? Or should I fork and translate it?

wooorm commented 5 years ago

If the change is just the "straight" quotes to «french» quotes, that could go in retext-smartypants!

robinmetral commented 5 years ago

Well, there's the whole question of spacing in French typography. For instance, we put a thin non-breaking-space before a semicolon.

Then these rules differ based on locale. For example in France there's a nonbreaking space in front of a colon, where in French-speaking Switzerland it's a thin nonbreaking space. There's a whole French Wikipedia article about these differences!

If I wanted to make a retext plugin with all the correct typographic rules for French based on locale, how should I proceed?

In the meantime the « french » quotes could indeed go in retext-smartypants as another option :slightly_smiling_face: I'll try to make a PR for this.

wooorm commented 5 years ago

In the meantime the « french » quotes could indeed go in retext-smartypants as another option 🙂 I'll try to make a PR for this.

👍

If I wanted to make a retext plugin with all the correct typographic rules for French based on locale, how should I proceed?

Re all the spaces and other things: sounds more like a different plugin. I’d suggest doing something like retext-smartypants, but for many more things. Or maybe several small plugins (in a monorepo?). retext-typography-french-semicolon-spaces, retext-typography-french-quotes, etc... And then publish a preset as retext-typography-french for all the small plugins? 🤷‍♂️

robinmetral commented 5 years ago

Thanks for the quick reply, sounds great!

I'm not sure I'm personally up to the task for the monorepo, but I'll start with the PR to retext-smartypants and see where it gets me :slightly_smiling_face: