-
Notifications
You must be signed in to change notification settings - Fork 148
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
feat: initial work on i18n #66
Conversation
e5a9a75
to
35da028
Compare
@@ -12,6 +12,10 @@ module.exports = { | |||
favicon: 'img/favicon.ico', | |||
organizationName: 'electron', | |||
projectName: 'electron', | |||
i18n: { | |||
defaultLocale: 'en', | |||
locales: ['en', 'es-ES'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing the Spanish one for now although all the translations are pulled and organized.
We could keep this in sync automatically with Crowdin somehow (during the prebuild step probably?)
@@ -99,7 +107,7 @@ module.exports = { | |||
], | |||
}, | |||
], | |||
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, | |||
copyright: `Copyright © OpenJS Foundation and Electron contributors.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the year because the generated JSON had it hardcoded somehow instead of doing interpolation and thus it will be kept out of date.
@@ -4,38 +4,6 @@ const fs = require('fs').promises; | |||
const path = require('path'); | |||
const globby = require('globby'); | |||
|
|||
/** The keywords that need to be escaped so MDX does not complain */ | |||
const keywords = new Set([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't being used at the end so I delete it.
@@ -0,0 +1,136 @@ | |||
//@ts-check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be mostly the previous contents of download-docs.js
.
@@ -0,0 +1,82 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was docs-reorg.json
that I renamed to match reorg-docs.js
.
if (build.status === 'finished') { | ||
break; | ||
} else { | ||
console.log(`Crowdin status: Waiting ${interval} seconds (retry ${i}/${counter})`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my tests I've got builds done at around 3.5 minutes (interval 7). We could increate the counter a bit more if we want to be extra cautious.
GITHUB_TOKEN= | ||
CROWDIN_TOKEN= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add this tokens to Heroku
This should be ready for an initial round of feedback. This will touch docusaurus and CDN configurations. And we might want to consider the scenario for versioned docs as well. |
Closing in favor of #112 |
No description provided.