A repository for participating in MDN translation.
- Use mdn/content and mdn/translate-content as submodules. (Note:I use my fork repo as submodules, you should use your own fork repo~)
- provide some scripts for translate work
- init_env
- cp_files
- add_l10n
- ...others will todo
Init the .env files for "mdn/content" rpeo.
bash init_envCopy files quickly in root of this project
npm run cp ORIGIN_EN_CONTENT_SOURCE [LANG]Example:
# Will copy all files in `web/api/audio_output_devices_api` to `translated-content/files/zh-cn/web/api/audio_output_devices_api`
npm run cp content/files/en-us/web/api/css_counter_styles
# You can pass the second args to select language.
npm run cp content/files/en-us/web/api/css_counter_styles frAdd origin file git commit hash to translated file.
Note: it will add commit hash again if you run many times!!!
npm run update:l10n TRANSLATED_DOC_DIR_OR_FILEExample:
npm run update:l10n ./translated-content/files/zh-cn/web/api/serviceworkerglobalscope/MIT RoXoM [email protected]