Skip to content

[๐Ÿ“– Docs]: ๐Ÿ—ฃ๏ธ Help us translate the WebdriverIO website ๐ŸŒย #10261

@christian-bromann

Description

@christian-bromann

Pre-check

  • I know I can edit the docs but prefer to file this issue

Describe the improvement

Unclear documentation

Description of the improvement / report

The WebdriverIO i18n support is ready, and it's time for the website to be translated!

This issue is here to organize the translation effort.

Translation process

  • go to translate.webdriver.io and verify that your language is enabled, if not, post a comment in this issue which language you would like to provide translations for
  • Sign-up on Crowdin and join the webdriver-io project
  • Get familiar with the Crowdin translation UI, as you will need to use it to translate JSON and Markdown files
  • Translate the content

If you have trouble contributing translations, join our Discord channel and post in ๐ŸŒ i18n channel.

Existing language

The current translation progress looks as following:

Screenshot 2023-04-24 at 22 39 41

Released to production are:

  • ๐Ÿ‡ฌ๐Ÿ‡ง English (original)
  • ๐Ÿ‡ฉ๐Ÿ‡ช German
  • ๐Ÿ‡ช๐Ÿ‡ธ Spanish
  • ๐Ÿ‡ฎ๐Ÿ‡ณ Hindi
  • ๐Ÿ‡บ๐Ÿ‡ฆ Ukraine
  • ๐Ÿ‡ซ๐Ÿ‡ท French

If your language already exists in the folder above, please edit the files with completed or more accurate translations.

New language

If your language does not exist, you will need to create it from scratch.

You have 2 options:

  • Automated: run CLI: cd ./website && npx @docusaurus/theme-translations update <newLanguage> (more info here)
  • Manual: just copy the english files into a new translation directory via: cp -r ./website/i18n/en ./website/i18n/<NEW_LOCALE> and copy over the english originals via cp ./website/docs ./website/18n/<NEW_LOCALE>/docusaurus-plugin-content-docs/current

Use appropriate pluralization

Note: some languages have complex plural rules. Make sure the pluralized labels (containing a |) contain as many variants as your locale has plural rules.

  • English, 2 plural forms: "One post|{count} posts"
  • Slavic languages, 4 plural forms: "One post|Few posts|Many posts|{count} posts"

Run this code in your browser to obtain the plural forms of any locale/language:

function getLocalePluralForms(locale) {
  const AllPluralForms = ['zero','one','two','few','many','other']
  const pluralCategories = new Intl.PluralRules(locale).resolvedOptions().pluralCategories;
  pluralCategories.sort((c1,c2) => AllPluralForms.indexOf(c1) > AllPluralForms.indexOf(c2) ? 1 : -1);
  return pluralCategories;
}

const myLocale = "fr"; // Change this variable!
console.log("Plural forms for this locale are =>>> ",getLocalePluralForms(myLocale)); 

Note: the order of plural forms in the translation string matters.

Files to translate on Crowdin

Please translate in priority:

  • The website/i18n/en files (layout/homepage JSON files)
  • The website/community md files
  • The website/docs md files
  • The Intro / API / Getting Started / Guides is more important compared to Advanced Guides / Migration

Please be careful for:

  • Admonitions: :::tip (and other admonition keys) should not be translated, but :::tip myTitle should be translated as :::tip myTranslatedTitle

Please do not translate for now:

  • Versioned docs
  • Frontmatter such as id, slug, URLs...
  • Code blocks
  • JSX syntax in MDX docs

Preview your translation work

Unfortunately, it is not possible for you to test the translated site locally (the Crowdin auth system is not very flexible). We are currently working on providing better previews.

Production

We ask for a minimal amount of translations to be reached:

  • website/i18n/en > 100%
  • website/community > 60%
  • website/docs > 40%

Once a locale has enough translations, and the preview looks good on the i18n staging environment, we'll add it to our production site.


Thanks for your help ๐Ÿ˜ƒ

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Docs ๐Ÿ“–good first picka reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions