Skip to content

Commit

Permalink
chore(README.md): update README.md with new input requirements and re…
Browse files Browse the repository at this point in the history
…move unused input

chore(action.yml): update action.yml with new input requirements and remove unused input
  • Loading branch information
lyqht committed Aug 5, 2023
1 parent 73fb2c1 commit e4678a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ Since DeepL API does not officially support markdown tag handling yet, this gith
| `deepl_api_key` | API Key for DeepL API | yes |
| `target_languages` | Target languages to translate to. Refer to [DeepL docs for language codes](https://www.deepl.com/docs-api/translate-text). You can also input `all` for all target languages that DeepL supports. | yes |
| `input_file_path` | Path of the file you want to translate. Accepts `.html, .xml, .md, .txt, .json` | yes |
| `output_file_name_pattern` | Output file name pattern. e.g: `public/locales/{language}/common.json` where language is replaced by the target language code | no |
| `output_file_name_prefix` | Used if `output_file_name_pattern` is not given. Prefix of the output file name, including folder name. e.g. `locales/`. If not given, default value is `translated_` | no |
| `no_translate_start_tag` | Start tag to ignore when translating in the case of HTML-like files such as `.html, .xml, .md` | no |
| `no_translate_end_tag` | End tag to ignore when translating in the case of HTML-like files such as `.html, .xml, .md`. | no |
| `output_file_name_pattern` | Output file name pattern. e.g: `public/locales/{language}/common.json` where language is replaced by the target language code | yes |
| `no_translate_start_tag` | Start tag to ignore when translating in the case of HTML-like files such as `.html, .xml, .md, .txt` | no |
| `no_translate_end_tag` | End tag to ignore when translating in the case of HTML-like files such as `.html, .xml, .md, .txt`. | no |

## Example usage

Expand All @@ -45,7 +44,7 @@ jobs:
with:
target_languages: zh,ja
input_file_path: docs/simple/original.md
output_file_name_prefix: docs/simple/
output_file_name_pattern: docs/simple/{language}.md
deepl_api_key: ${{ secrets.DEEPL_API_KEY }}
```
Expand All @@ -65,11 +64,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: DeepL Translate Github Action
uses: lyqht/deepl-translate-github-action@v2.0.0
uses: lyqht/deepl-translate-github-action@v2.1.0
with:
target_languages: fr,ja
input_file_path: locales/en.json
output_file_name_prefix: locales/
output_file_name_pattern: locales/{language}.json
deepl_api_key: ${{ secrets.DEEPL_API_KEY }}
```

Expand Down
6 changes: 1 addition & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ inputs:
required: true
output_file_name_pattern:
description: "Pattern of the output file name, including the folder name"
required: false
output_file_name_prefix:
description: "Prefix of the output file name, including the folder name"
required: false
default: translated_
required: true
deepl_api_key:
description: "API Key for DeepL API"
required: true
Expand Down

0 comments on commit e4678a8

Please sign in to comment.