← 返回首页
How to Use GitHub to Translate WAI Resources | Web Accessibility Initiative (WAI) | W3C
W3C homepage Web Accessibility Initiative (WAI) homepage
Strategies, standards, resources to make the Web accessible to people with disabilities
Menu

How to Use GitHub to Translate WAI Resources

Summary

This page guide you through the steps to translate WAI resources using GitHub.

Page Contents

Show all screenshots

Initial step: Declare your intent

In accordance with the WAI Translations process, please always declare your intent and wait for reply from WAI team before starting a translation.

Create the translation file

  1. Near the bottom of each page on the WAI website, there is a "Help improve this page" box.
    The middle button is "Fork & Edit in GitHub". That gets you to the GitHub repository. Show screenshot
  2. From there, you will be asked to “Fork the repository” – that is, creating a copy of the repository so you can make changes without affecting the original one. Show screenshot
  3. On the next screen, select all the original file code and copy it to your clipboard (Ctrl+C or ⌘+C).
  4. Click on the expand icon, next to the editor breadcrumb, to show the repository file tree. Show screenshot
  5. Click on the "+" or "Add file" button to create a new file. Show screenshot
  6. Name the new file according to instructions on Creating a New Translation page. Show screenshot
  7. Paste the original content that you copied in step 2 into the editor (Ctrl+V or ⌘+V).

    🎉 Congrats! You have now created the translation file to work with.

Work on your translation

  1. Edit the content to translate the file, following guidance from Creating a New Translation page.
  2. When you are happy with your work, click on "Commit changes..." to save the changes. Show screenshot
  3. In the appearing "Propose changes" modal window, you can rename your commit message to better reflect what you have changed. Then, click on "Propose changes". Show screenshot

    🎉 Congrats! You have now commited your changes!

Prepare your draft Pull Request

  1. You are now in the "Comparing changes" view, between the "base" repository (the original W3C repository, beginning with w3c) and the "head" repository (your forked repository, beginning with your username).

    Click on "Create pull request", meaning that you propose to apply your changes to the official repository. If the button does not appear, you may need to refresh the page. Show screenshot

  2. Set the title of the Pull request using the following format: [IN-PROGRESS] Language - Resource Title.

    Then, in the "Create pull request" button, select the drop-down arrow and select "Create draft pull request in the drop-down options. Show screenshot

  3. Click on the "Draft pull request" button to confirm the submission of the pull request. Show screenshot

    🎉 Congrats! Your draft pull request is now created!

Preview your changes

  1. After you submit the pull request, it will create a preview so you can check your file and make edits. At first, a notification comment will say "👷 Deploy Preview for wai-repo-name processing." Show screenshot
  2. After a few minutes, the notification comment will change to “✅ Deploy Preview for wai-repo-name ready!”.

    To see your preview, click on the "Deploy Preview" link. Show screenshot

Mark your Pull request as ready for review

  1. When you have done all your checks and edits, click on the "Edit" button at the top of the Pull request view, to change the title prefix "[IN-PROGRESS]" to "[Ready for Review]"

    Then, click on the "Ready for review" button, at the bottom of the Pull request view. Show screenshot

  2. 🎉 Congratulations, your pull request is now ready for review!

    You can see it is marked as "Open" with a green label at the top of the Pull request view. Show screenshot

Help improve this page

Please share your ideas, suggestions, or comments via e-mail to the publicly-archived list wai@w3.org or via GitHub.

Back to Top

Updated: 9 April 2024.

Editors: Rémi Bétin and Shawn Lawton Henry.

Developed as part of the WAI-CooP project, co-funded by the European Commission.