Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

feat: add translations #14

Merged
merged 7 commits into from
Jan 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ jobs:
- prep_env
- run: yarn install --frozen-lockfile
- save_env_cache
website:
<<: *docker_defaults
working_directory: ~/repo
steps:
- prep_env
- run: yarn build
- persist_to_workspace:
root: ./
paths:
- website/build/
deploy_website:
<<: *docker_defaults
working_directory: ~/repo
Expand All @@ -50,24 +40,30 @@ jobs:
- add_ssh_keys:
fingerprints:
- "17:59:4f:3f:42:ec:3c:e0:9f:55:88:c7:4d:b8:30:70"
- run:
name: Install crowdin
command: |
- sudo apt-get install default-jre
- wget https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb
- sudo dpkg -i crowdin.deb
- run:
name: Setup git user and deploy website
command: |
git config --global user.email "circleci-all-contributors-website@users.noreply.github.com"
git config --global user.name "CircleCI All Contributors Website"
- yarn write-translation
- yarn crowdin-upload
- yarn crowdin-download
CUSTOM_COMMIT_MESSAGE="[skip ci]" USE_SSH=true yarn publish-gh-pages

workflows:
version: 2
build_and_deploy:
jobs:
- node_modules
- website:
requires:
- node_modules
- deploy_website:
requires:
- website
- node_modules
filters:
branches:
only:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
website/build
i18n
website/i18n
website/translated_docs
yarn-error.log
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Contributing Docs


## Translations
Locally you need the crowdin CLI tool: `brew install crowdin`
Translations by crowdin: https://crowdin.com/project/all-contributors/settings#files

## Search
Search is by algolia, configuration is at /~https://github.com/algolia/docsearch-configs/blob/master/configs/all-contributors.json
20 changes: 20 additions & 0 deletions crowdin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
project_identifier_env: CROWDIN_DOCUSAURUS_PROJECT_ID
api_key_env: CROWDIN_DOCUSAURUS_API_KEY
base_path: "./"
preserve_hierarchy: true

files:
-
source: '/docs/**/*.md'
translation: '/website/translated_docs/%locale%/**/%original_file_name%'
languages_mapping: &anchor
locale:
'es-ES': 'es-ES'
'fr': 'fr'
'ko': 'ko'
'pt-PT': 'pt-PT'

-
source: '/website/i18n/en.json'
translation: '/website/i18n/%locale%.json'
languages_mapping: *anchor
4 changes: 2 additions & 2 deletions docs/bot/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can configure the all-contributors bot behaviour by updating the `.all-contr
The data used to generate the contributors list will be stored in there, and you
can configure how you want `@all-contributors` to generate the list.

> You are viewing the 🤖Bot Configuration, which is similar to the [CLI Configuration](/docs/cli/configuration)
> You are viewing the 🤖Bot Configuration, which is similar to the [CLI Configuration](../cli/configuration)

These are the keys you can specify:

Expand All @@ -20,7 +20,7 @@ These are the keys you can specify:
| `badgeTemplate` | Define your own lodash template to generate the badge. | |
| `contributorTemplate` | Define your own lodash template to generate the contributor. | |
| `types` | Specify custom symbols or link templates for contribution types. Can override the documented types. | |
| `contributors` | List of contributors for this project, this is updated by [@all-contributors add](/docs/bot/usage#all-contributors-add) | |
| `contributors` | List of contributors for this project, this is updated by [@all-contributors add](usage#all-contributors-add) | |

```json
{
Expand Down
12 changes: 6 additions & 6 deletions docs/bot/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ sidebar_label: Installation
[Install the GitHub App](/~https://github.com/apps/allcontributors/installations/new)

<a href="/~https://github.com/apps/allcontributors/installations/new">
<img alt="App Install Screenshot" src="../assets/app-install.png" width="500px">
<img alt="App Install Screenshot" src="../../assets/app-install.png" width="500px">
</a>


## 2. Configure your repositories
<img alt="Configure Repositories Screenshot" src="../assets/configure-repositories.png" width="500px">
<img alt="Configure Repositories Screenshot" src="../../assets/configure-repositories.png" width="500px">


## 3. Create a `README.md`
Ensure you have a `README.md` file in the root of the project (it can be empty).

If you prefer your contributors table in a place other than the `README.md`; After merging your first bot PR, you can move your contributors table,
see `files` in the [bot configuration](/docs/bot/configuration)
see `files` in the [bot configuration](configuration)

## 4. Update your Contributing documentation
Consider updating your `CONTRIBUTING.md` or similar with steps on how contributors can add themselves. You can even link to the [bot usage documentation](/docs/bot/usage).
Consider updating your `CONTRIBUTING.md` or similar with steps on how contributors can add themselves. You can even link to the [bot usage documentation](usage).



## What's next
- [Using the Bot](/docs/bot/usage)
- [Configuring the Bot](/docs/bot/configuration)
- [Using the Bot](usage)
- [Configuring the Bot](configuration)

12 changes: 6 additions & 6 deletions docs/bot/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ sidebar_label: Overview
🤖 A GitHub bot to automate acknowledging contributors to your open source projects.

## Motivation
Implementing the [All Contributors spec](/docs/specification) by hand is a laborious process.
Implementing the [All Contributors spec](../specification) by hand is a laborious process.

Enter the `@all-contributors bot`! The bot will automatically pull a user's profile, grab the contribution type emoji, update the project README and then open a Pull Request against the project
<a href="/docs/bot/usage">
<img alt="Example usage screenshot" src="../assets/bot-usage.png" width="500px">
<a href="usage">
<img alt="Example usage screenshot" src="../../assets/bot-usage.png" width="500px">
</a>

- [Installing the Bot](/docs/bot/installation)
- [Using the Bot](/docs/bot/usage)
- [Configuring the Bot](/docs/bot/configuration)
- [Installing the Bot](installation)
- [Using the Bot](sage)
- [Configuring the Bot](configuration)



Expand Down
8 changes: 4 additions & 4 deletions docs/bot/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Bot Usage
sidebar_label: Usage
---

> This usage documentation assumes you have already followed the [bot installation steps](/docs/bot/installation).
> This usage documentation assumes you have already followed the [bot installation steps](installation).

## Commands
<AUTOGENERATED_TABLE_OF_CONTENTS>
Expand All @@ -15,16 +15,16 @@ sidebar_label: Usage
```
@all-contributors please add <username> for <contributions>
```
**\<contribution>**: See the [Emoji Key (Contribution Types Reference)](/docs/emoji-key) for a list of valid `contribution` types.
**\<contribution>**: See the [Emoji Key (Contribution Types Reference)](../emoji-key) for a list of valid `contribution` types.

The bot will then create a Pull Request to add the contributor, then reply with the pull request details.

<img alt="Example usage screenshot" src="../assets/bot-usage.png" width="500px">
<img alt="Example usage screenshot" src="../../assets/bot-usage.png" width="500px">

> Your request to the bot doesn't need to be perfect. The bot will use [basic Natural Language Parsing](/~https://github.com/all-contributors/all-contributors-bot/blob/master/src/tasks/processIssueComment/utils/parse-comment/index.js) to determine your intent.
> For example, this will work too:
>
> `Jane you are crushing it in documentation and your infrastructure work has been great too. Let's add jane.doe23 for her contributions. cc @all-contributors`

## What's next
- [Configuring the Bot](/docs/bot/configuration)
- [Configuring the Bot](configuration)
4 changes: 2 additions & 2 deletions docs/cli/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can configure all-contributors by updating the `.all-contributorsrc` JSON fi
The data used to generate the contributors list will be stored in there, and you
can configure how you want `all-contributors-cli` to generate the list.

> You are viewing the CLI Configuration, are you looking for the [Bot Configuration](/docs/bot/configuration)?
> You are viewing the CLI Configuration, are you looking for the [Bot Configuration](../bot/configuration)?

These are the keys you can specify:

Expand All @@ -25,7 +25,7 @@ These are the keys you can specify:
| `badgeTemplate` | Define your own lodash template to generate the badge. | |
| `contributorTemplate` | Define your own lodash template to generate the contributor. | |
| `types` | Specify custom symbols or link templates for contribution types. Can override the documented types. | |
| `contributors` | List of contributors for this project, this is updated by [all-contributors add](/docs/cli/usage#all-contributors-add) | |
| `contributors` | List of contributors for this project, this is updated by [all-contributors add](usage#all-contributors-add) | |
```json
{
"projectName": "all-contributors-cli",
Expand Down
10 changes: 5 additions & 5 deletions docs/cli/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ should be installed as one of your project's `devDependencies`:
yarn add --dev all-contributors-cli # or npm
```

> The CLI is node based, if you don't wish to add a node depdendency use the [@all-contributors bot 🤖](/docs/bot/overview)
> The CLI is node based, if you don't wish to add a node depdendency use the [@all-contributors bot 🤖](../bot/overview)


## 2. Init the Project
Expand All @@ -35,11 +35,11 @@ yarn all-contributors init # npm run
yarn all-contributors add jfmengels doc
yarn all-contributors generate
```
For more on the commands see [CLI usage](/docs/cli/usage)
For more on the commands see [CLI usage](usage)


## 4. Update your Contributing documentation
Consider updating your `CONTRIBUTING.md` or similar with steps on how your contributors can add themselves. You can even link to the [cli usage documentation](/docs/cli/usage).
Consider updating your `CONTRIBUTING.md` or similar with steps on how your contributors can add themselves. You can even link to the [cli usage documentation](usage).


## 5. *Optionally* add shortcut scripts to your `package.json`
Expand All @@ -62,6 +62,6 @@ yarn contributors:add jfmengels doc


## What's next
- [Using the CLI](/docs/cli/usage)
- [Configuring the CLI](/docs/cli/configuration)
- [Using the CLI](usage)
- [Configuring the CLI](configuration)

8 changes: 4 additions & 4 deletions docs/cli/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ sidebar_label: Overview

## The problem

You want to implement the [All Contributors](/docs/specification) spec, but don't
You want to implement the [All Contributors](../specification) spec, but don't
want to maintain the table by hand

## The CLI solution

The all-contributors-cli is a tool to help automate adding contributor acknowledgements for your GitHub or GitLab repository.

- [Installing the CLI](/docs/cli/installation)
- [Using the CLI](/docs/cli/usage)
- [Configuring the CLI](/docs/cli/configuration)
- [Installing the CLI](installation)
- [Using the CLI](usage)
- [Configuring the CLI](configuration)
6 changes: 3 additions & 3 deletions docs/cli/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: CLI Usage
sidebar_label: Usage
---

> This usage documentation assumes you have already followed the [cli installation steps](/docs/cli/installation).
> This usage documentation assumes you have already followed the [cli installation steps](installation).

A quick note: Below we'll just show `all-contributors` to keep things simple, but if you're having any difficulties, then give the `yarn all-contributors` route a try 😺

Expand All @@ -29,7 +29,7 @@ all-contributors add jfmengels code,doc
```

Where `username` is the user's GitHub or Gitlab username, and `contribution` is a
`,`-separated list of contributions. See the [Emoji Key (Contribution Types Reference)](/docs/emoji-key)
`,`-separated list of contributions. See the [Emoji Key (Contribution Types Reference)](../emoji-key)
for a list of valid `contribution` types.

> **GitLab Users**: See the [additional requirements for GitLab users](#gitlab-users)
Expand Down Expand Up @@ -76,4 +76,4 @@ set PRIVATE_TOKEN=your_private_token


## What's next
- [Configuring the CLI](/docs/cli/configuration)
- [Configuring the CLI](configuration)
6 changes: 3 additions & 3 deletions docs/emoji-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: Emoji Key ✨

## Table

> To have a contribution added when using the [Bot](/docs/bot/overview) or [CLI](/docs/cli/overview) use the keyword in the `Type` column. The bot will also use [basic Natural Language Parsing](/~https://github.com/all-contributors/all-contributors-bot/blob/master/src/tasks/processIssueComment/utils/parse-comment/index.js) to determine your contribution intent.
> To have a contribution added when using the [Bot](bot/overview) or [CLI](cli/overview) use the keyword in the `Type` column. The bot will also use [basic Natural Language Parsing](/~https://github.com/all-contributors/all-contributors-bot/blob/master/src/tasks/processIssueComment/utils/parse-comment/index.js) to determine your contribution intent.

Emoji/Type | Represents | Comments
:---: | :---: | :---:
Expand Down Expand Up @@ -40,5 +40,5 @@ Emoji/Type | Represents | Comments
*N/I: These contribution types are currently not supported by tooling.

## What's next
- [Notes for repository maintainers](/docs/repository-maintainers)
- [Automating the process using tools](/docs/tooling)
- [Notes for repository maintainers](repository-maintainers)
- [Automating the process using tools](tooling)
16 changes: 9 additions & 7 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ title: Overview
sidebar_label: Overview
---

> Call for translators! [We're looking for translators](/~https://github.com/all-contributors/all-contributors/issues/143) to help translate this spec for everyone!

<div align="center">
<img src="assets/logo-full-transparent.png" alt="✨ All Contributors ✨" width="800px" />
<img src="../assets/logo-full-transparent.png" alt="✨ All Contributors ✨" width="800px" />
</div>

<a class="github-button" href="/~https://github.com/all-contributors/all-contributors" data-icon="octicon-star" data-count-href="/all-contributors/all-contributors/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub" >Star</a>
Expand All @@ -22,14 +24,14 @@ Everyone should be praised for their contributions (code or not).
## The All Contributors Table
Below is an example of how using the all-contributors spec table can recognize all contributors
<div align="center">
<img src="assets/contributors-table-small.png" alt="All Contributors Table Screenshot" width="800px" />
<img src="../assets/contributors-table-small.png" alt="All Contributors Table Screenshot" width="800px" />
</div>

> You can use [the @all-contributors bot 🤖](/docs/bot/overview) to automate acknowledging contributors to your open source projects
> You can use [the @all-contributors bot 🤖](bot/overview) to automate acknowledging contributors to your open source projects

## What's next
- [The all contributors specification](/docs/specification)
- [Emoji Key (Contribution Types Reference)](/docs/emoji-key)
- [Notes for repository maintainers](/docs/repository-maintainers)
- [Automating the process using tools](/docs/tooling)
- [The all contributors specification](specification)
- [Emoji Key (Contribution Types Reference)](emoji-key)
- [Notes for repository maintainers](repository-maintainers)
- [Automating the process using tools](tooling)

4 changes: 2 additions & 2 deletions docs/repository-maintainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Contributors should be recognised as soon as the contribution is discovered to h
overlooked when the list gets updated at a later date. This can be difficult for contributions that are not the
result of a commit to repository but do your best to minimise the time between the contribution and updating the list.

> **Pro tip:** If your project is configured for [the @all-contributors bot 🤖](/docs/bot/overview)simply write a comment on an issue or pull request to recognise their contribution. For example:
> **Pro tip:** If your project is configured for [the @all-contributors bot 🤖](bot/overview)simply write a comment on an issue or pull request to recognise their contribution. For example:
>
> `@all-contributors please add @tbenning for design` ✨

Expand All @@ -26,4 +26,4 @@ In the end, there are no hard and fast rules for when a contribution has to be a
just do your best to be fair and to ensure all contributors are recognised.

## What's next
- [Automating the process using tools](/docs/tooling)
- [Automating the process using tools](tooling)
12 changes: 6 additions & 6 deletions docs/specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: Specification

An example of how using the all-contributors spec table can recognize all contributors
<div align="center">
<img src="assets/contributors-table-small.png" alt="Contributors Table Screenshot" width="800px" />
<img src="../assets/contributors-table-small.png" alt="Contributors Table Screenshot" width="800px" />
</div>

## Mandatory
Expand All @@ -19,12 +19,12 @@ Open source projects should include the following mandatory items in order to su
- Name
- URL link to a site where more information can be learned about the contributor. This URL may be determined by the contributor at the project's discretion.
- Indication of the Contribution Category in text or icon image format using the defined Contribution Categories and/or Contribution Categories emoji images (see below).
- A link to the Contribution Category in text or emoji format using the defined Contribution Categories and/or [Contribution Categories emoji](/docs/emoji-key).
- A link to the Contribution Category in text or emoji format using the defined Contribution Categories and/or [Contribution Categories emoji](emoji-key).
- The list of contributors can be spread across multiple lines (each technically being its own table) as needed.
- The order of contributors is immaterial to the spec. Order them how you wish.
3. Projects should define contributors as those who contribute to a project in any of the Contribution Categories at any level of contribution. This specification is, by definition, inclusive of all contributions. In cases where projects deviate from the Contribution Categories or require a specific contribution level in order to meet criteria as a project contributor, the project should provide explicit documentation of the definitions that satisfy the project contributor criteria in the CONTRIBUTING document or a similar prominent public document at the top level of the project repository. This specification recommends against exclusion of an individual from the Contributor list based upon perceived level of contribution. Instead, projects should use indicators of effort within a list that remains inclusive of all contributors to the project at any level of effort. If used, these effort indicators are at the discretion of the project and are not currently specified.

> **Pro tip:** You can use [the @all-contributors bot 🤖](/docs/bot/overview) to automate acknowledging contributors to your open source projects ✨
> **Pro tip:** You can use [the @all-contributors bot 🤖](bot/overview) to automate acknowledging contributors to your open source projects ✨

## Optional
Projects should consider the following optional items as part of their commitment to the All Contributors specification:
Expand All @@ -33,7 +33,7 @@ Projects should consider the following optional items as part of their commitmen
3. An optional link from the Contribution Category indicator to the category-specific contribution(s) can be included to provide additional information about the project contribution(s) as detailed in the section below.

## What's next
- [Emoji Key (Contribution Types Reference)](/docs/emoji-key)
- [Notes for repository maintainers](/docs/repository-maintainers)
- [Automating the process using tools](/docs/tooling)
- [Emoji Key (Contribution Types Reference)](emoji-key)
- [Notes for repository maintainers](repository-maintainers)
- [Automating the process using tools](tooling)

Loading