-
Notifications
You must be signed in to change notification settings - Fork 240
feat: generate and upload crowdin glossary #252
Conversation
cc719df
to
84a921a
Compare
Made a few updates to separate building the glossary from uploading it. Also added some tests to make sure our glossary data is valid. |
Stretch goal: Parse https://github.com/electron/electron/blob/master/docs/glossary.md too |
test/glossary.js
Outdated
]) | ||
}) | ||
|
||
it('does not allow commas in descriptions (for CSV purposes)', () => { |
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.
👍
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.
It looks like both glosssary.json
and glossary.csv
are generated files, so do they need to in the repo? It doesn't seem to add any benefit, and has the cost of having to keep them up-to-date in the repo.
Now includes terms from electron/docs/glossary.md too, like ASAR, DMG, IPC, OSR, Brightray, etc. |
a6df90a
to
18051f0
Compare
Hey @ckerr and @vanessayuenn I dusted this off and got the tests passing. Can you take another look? |
Resolves #82
This PR uses the globals npm module and Electron's structured API data to assemble a list of glossary terms to give translators more context, and help them avoid translating things that should remain untouched.
What's in the glossary?
Array
,Map
,String
, etcBrowserWindow
andMenuItem
MimeTypedBuffer
andMemoryInfo
contents.openDevTools
contents.devToolsWebContents
There's other stuff in both
globals
(likeglobals.browser
) andelectron-api.json
(like instance events) that we can squeeze into the glossary, but this is a start.For those with admin access to Crowdin you can see the glossary entries here: https://crowdin.com/project/electron/settings#glossary
What translators see
Here's what the glossary entries look like in the translation interface:
Caveats
buffer
is emphasized in the GUI even though the entry isBuffer
.Bonus
Whenever this script is run, it updates any existing entries in the glossary, rather than creating duplicate entries. That means we can keep refining and publishing this without worrying about the effect it will have on existing entries.