Skip to content

Commit

Permalink
docs: add sample configuration file (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Sep 14, 2024
1 parent cf0ccf9 commit da36b12
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Set up a workflow in *.github/workflows/crowdin.yml* (or add a job to your exist

Read the [Configuring a workflow](https://help.github.com/en/articles/configuring-a-workflow) article for more details on creating and setting up GitHub workflows.

### Sample workflow

```yaml
name: Crowdin Action

Expand Down Expand Up @@ -79,7 +81,28 @@ jobs:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
```
Enter these secrets in GitHub under the repository settings -> Secrets and variables -> Actions.
Enter the `CROWDIN_PROJECT_ID` and `CROWDIN_PERSONAL_TOKEN` secrets under the Repository settings -> Secrets and variables -> Actions > Repository secrets.

### Sample `crowdin.yml` configuration file

```yaml
"project_id_env": "CROWDIN_PROJECT_ID"
"api_token_env": "CROWDIN_PERSONAL_TOKEN"
"base_path": "."
"preserve_hierarchy": true
"files": [
{
"source": "locales/en.yml",
"translation": "locales/%two_letters_code%.yml"
}
]
```

Replace the `source` and `translation` paths with the actual paths to your source and translation files.

By default, the action will look for the `crowdin.yml` file in the root of the repository. You can specify a different path using the `config` option.

## Supported options

Expand Down

0 comments on commit da36b12

Please sign in to comment.