Skip to content

Commit

Permalink
Bump typescript from 4.8.3 to 4.8.4 (#107)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/Yelp/detect-secrets: v1.3.0 → v1.4.0](Yelp/detect-secrets@v1.3.0...v1.4.0)
- [github.com/zricethezav/gitleaks: v8.13.0 → v8.15.0](gitleaks/gitleaks@v8.13.0...v8.15.0)
- [github.com/pre-commit/mirrors-eslint: v8.24.0 → v8.25.0](pre-commit/mirrors-eslint@v8.24.0...v8.25.0)

* Bump typescript from 4.8.3 to 4.8.4

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: fabasoad <fabasoad@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and fabasoad authored Oct 21, 2022
1 parent b04c08f commit 91c5be9
Show file tree
Hide file tree
Showing 11 changed files with 641 additions and 622 deletions.
18 changes: 12 additions & 6 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ assignees: fabasoad

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
### Is your feature request related to a problem? Please describe

A clear and concise description of what the problem is. Ex. I'm always
frustrated when [...]

### Describe the solution you'd like

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
### Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've
considered.

### Additional context

**Additional context**
Add any other context or screenshots about the feature request here.
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Closes #{IssueNumber}

Please check if your PR fulfills the following requirements:

- [ ] I have read the [CONTRIBUTING](https://github.com/fabasoad/translation-action/CONTRIBUTING.md) doc.
- [ ] I have read the [CONTRIBUTING](https://github.com/fabasoad/translation-action/CONTRIBUTING.md)
doc.
- [ ] Tests for the changes have been added (for bug fixes / features).
- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features).
- [ ] Build (`yarn run build`) was run locally and any changes were pushed.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Create release
on:
push:
tags:
- 'v*'
- 'v*.*.*'

jobs:
create_release:
Expand Down
1 change: 0 additions & 1 deletion .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
---
default: true
line_length: false
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ repos:
stages: ["push"]
# Security
- repo: https://github.com/Yelp/detect-secrets
rev: v1.3.0
rev: v1.4.0
hooks:
- id: detect-secrets
stages: ["commit", "push"]
- repo: https://github.com/zricethezav/gitleaks
rev: v8.13.0
rev: v8.15.0
hooks:
- id: gitleaks
stages: ["commit", "push"]
Expand All @@ -35,7 +35,7 @@ repos:
stages: ["push"]
# TypeScript
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.24.0
rev: v8.25.0
hooks:
- id: eslint
args: ['--fix']
Expand Down
4 changes: 2 additions & 2 deletions .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ extends: default

rules:
line-length:
max: 150
level: warning
max: 165
level: error
35 changes: 23 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Contributing guidance

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
We love your input! We want to make contributing to this project as easy and
transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

## We Develop with GitHub
## We develop with GitHub

We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
We use GitHub to host code, to track issues and feature requests, as well as
accept pull requests.

## We Use [GitHub Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
## We use GitHub flow, so all code changes happen through pull requests

Pull requests are the best way to propose changes to the codebase (we use [GitHub Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
Pull requests are the best way to propose changes to the codebase (we use
[GitHub flow](https://guides.github.com/introduction/flow/index.html)). We
actively welcome your pull requests:

1. Fork the repo and create your branch from `main`.
2. If you've added code that should be tested, add tests.
Expand All @@ -25,26 +29,33 @@ Pull requests are the best way to propose changes to the codebase (we use [GitHu

## Any contributions you make will be under the MIT Software License

In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
In short, when you submit code changes, your submissions are understood to be
under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers
the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using [GitHub Issues](https://github.com/fabasoad/translation-action/issues)

We use GitHub issues to track public bugs. Report a bug by opening a new issue. It's that easy!
We use GitHub issues to track public bugs. Report a bug by opening a new issue.
It's that easy!

## Create issue using provided GitHub issue templates

This repository has issue templates for bug report and feature request. Please use them to create an issue and fill all required fields.
This repository has issue templates for bug report and feature request. Please
use them to create an issue and fill all required fields.

## Use a Consistent Coding Style
## Use a consistent coding style

Please follow all the rules from [this](https://google.github.io/styleguide/jsguide.html) great guide provided by Google for coding style except of following coding styles:
Please follow all the rules from [this](https://google.github.io/styleguide/jsguide.html)
great guide provided by Google for coding style except of following coding styles:

- File names must be all lowercase and may include dashes (-).

## License

By contributing, you agree that your contributions will be licensed under its MIT License.
By contributing, you agree that your contributions will be licensed under its
MIT License.

## References

This document was adapted from the open-source contribution guidelines provided by [briandk](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62).
This document was adapted from the open-source contribution guidelines provided
by [briandk](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62).
47 changes: 35 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# Translation action

![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/fabasoad/translation-action?include_prereleases) ![Unit Tests](https://github.com/fabasoad/translation-action/workflows/Unit%20Tests/badge.svg) ![Functional Tests](https://github.com/fabasoad/translation-action/workflows/Functional%20Tests/badge.svg) ![Security Tests](https://github.com/fabasoad/translation-action/workflows/Security%20Tests/badge.svg) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/fabasoad/translation-action/main.svg)](https://results.pre-commit.ci/latest/github/fabasoad/translation-action/main) [![Total alerts](https://img.shields.io/lgtm/alerts/g/fabasoad/translation-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/translation-action/alerts/) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/fabasoad/translation-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/translation-action/context:javascript) [![Maintainability](https://api.codeclimate.com/v1/badges/84bb3beceb9503272bc9/maintainability)](https://codeclimate.com/github/fabasoad/translation-action/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/84bb3beceb9503272bc9/test_coverage)](https://codeclimate.com/github/fabasoad/translation-action/test_coverage) [![Known Vulnerabilities](https://snyk.io/test/github/fabasoad/translation-action/badge.svg?targetFile=package.json)](https://snyk.io/test/github/fabasoad/translation-action?targetFile=package.json)

This action translates any text to any language supported by chosen provider. There is a list of providers that can be used for text translation. Please find more details for each provider below.
![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/fabasoad/translation-action?include_prereleases)
![Unit Tests](https://github.com/fabasoad/translation-action/workflows/Unit%20Tests/badge.svg)
![Functional Tests](https://github.com/fabasoad/translation-action/workflows/Functional%20Tests/badge.svg)
![Security Tests](https://github.com/fabasoad/translation-action/workflows/Security%20Tests/badge.svg)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/fabasoad/translation-action/main.svg)](https://results.pre-commit.ci/latest/github/fabasoad/translation-action/main)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/fabasoad/translation-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/translation-action/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/fabasoad/translation-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/translation-action/context:javascript)
[![Maintainability](https://api.codeclimate.com/v1/badges/84bb3beceb9503272bc9/maintainability)](https://codeclimate.com/github/fabasoad/translation-action/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/84bb3beceb9503272bc9/test_coverage)](https://codeclimate.com/github/fabasoad/translation-action/test_coverage)
[![Known Vulnerabilities](https://snyk.io/test/github/fabasoad/translation-action/badge.svg?targetFile=package.json)](https://snyk.io/test/github/fabasoad/translation-action?targetFile=package.json)

This action translates any text to any language supported by chosen provider.
There is a list of providers that can be used for text translation. Please find
more details for each provider below.

## Contents

Expand All @@ -23,7 +34,7 @@ This action translates any text to any language supported by chosen provider. Th
- Identifier is `linguatools`. API Key is not needed for this provider.
- Supported translation directions:

```json
```text
"de-en","de-es","de-nl","de-pl","de-it","de-cs","en-de","es-de","nl-de","pl-de","it-de","cs-de"
```

Expand All @@ -32,15 +43,17 @@ This action translates any text to any language supported by chosen provider. Th
- Identifier is `microsoft`.
- Supported translation directions:

```json
```text
"af","ar","bg","bn","bs","ca","cs","cy","da","de","el","en","es","et","fa","fi","fr","he","hi","hr","ht","hu","id","is","it","ja","ko","lt","lv","ms","mt","mww","nb","nl","pl","pt","ro","ru","sk","sl","sr-Latn","sv","sw","ta","th","tlh-Latn","tr","uk","ur","vi","zh-Hans"
```

- How to get API key:

Please follow the steps described in [this](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/translator-text-how-to-signup) article.
Please follow the steps described in [this](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/translator-text-how-to-signup)
article.

You will also need to provide the region of the key using the `api_additional_parameter`, e.g.:
You will also need to provide the region of the key using the
`api_additional_parameter`, e.g.:

```YAML
with:
Expand All @@ -52,24 +65,31 @@ with:
- Identifier is `mymemory`.
- Supported translation directions:

Language direction should be separated by `|` character. For example, `en|it` (from English to Italian). More details [here](https://mymemory.translated.net/doc/spec.php).
Language direction should be separated by `|` character. For example, `en|it`
(from English to Italian). More details [here](https://mymemory.translated.net/doc/spec.php).

- How to get API key:

API Key is _optional_. Visit [Usage Limit Page](https://mymemory.translated.net/doc/usagelimits.php) to see the usage limit for free accounts. In case you want to use your API KEY, you should go to [Registration Page](https://www.translated.net/top/) and register a new account. Then go to [API Key Generator Page](https://mymemory.translated.net/doc/keygen.php) and generate a new key.
API Key is _optional_. Visit [Usage Limit Page](https://mymemory.translated.net/doc/usagelimits.php)
to see the usage limit for free accounts. In case you want to use your API KEY,
you should go to [Registration Page](https://www.translated.net/top/) and
register a new account. Then go to [API Key Generator Page](https://mymemory.translated.net/doc/keygen.php)
and generate a new key.

### Yandex

- Identifier is `yandex`.
- Supported translation directions:

```json
```text
"az-ru","be-bg","be-cs","be-de","be-en","be-es","be-fr","be-it","be-pl","be-ro","be-ru","be-sr","be-tr","bg-be","bg-ru","bg-uk","ca-en","ca-ru","cs-be","cs-en","cs-ru","cs-uk","da-en","da-ru","de-be","de-en","de-es","de-fr","de-it","de-ru","de-tr","de-uk","el-en","el-ru","en-be","en-ca","en-cs","en-da","en-de","en-el","en-es","en-et","en-fi","en-fr","en-hu","en-it","en-lt","en-lv","en-mk","en-nl","en-no","en-pt","en-ru","en-sk","en-sl","en-sq","en-sv","en-tr","en-uk","es-be","es-de","es-en","es-ru","es-uk","et-en","et-ru","fi-en","fi-ru","fr-be","fr-de","fr-en","fr-ru","fr-uk","hr-ru","hu-en","hu-ru","hy-ru","it-be","it-de","it-en","it-ru","it-uk","lt-en","lt-ru","lv-en","lv-ru","mk-en","mk-ru","nl-en","nl-ru","no-en","no-ru","pl-be","pl-ru","pl-uk","pt-en","pt-ru","ro-be","ro-ru","ro-uk","ru-az","ru-be","ru-bg","ru-ca","ru-cs","ru-da","ru-de","ru-el","ru-en","ru-es","ru-et","ru-fi","ru-fr","ru-hr","ru-hu","ru-hy","ru-it","ru-lt","ru-lv","ru-mk","ru-nl","ru-no","ru-pl","ru-pt","ru-ro","ru-sk","ru-sl","ru-sq","ru-sr","ru-sv","ru-tr","ru-uk","sk-en","sk-ru","sl-en","sl-ru","sq-en","sq-ru","sr-be","sr-ru","sr-uk","sv-en","sv-ru","tr-be","tr-de","tr-en","tr-ru","tr-uk","uk-bg","uk-cs","uk-de","uk-en","uk-es","uk-fr","uk-it","uk-pl","uk-ro","uk-ru","uk-sr","uk-tr"
```

- How to get API key:

Go to the [Developer's page](https://translate.yandex.com/developers) and click on `Login`->`Register` and register a new account. Then go to the [API keys page](https://translate.yandex.com/developers/keys) and copy API key:
Go to the [Developer's page](https://translate.yandex.com/developers) and click
on `Login`->`Register` and register a new account. Then go to the [API keys page](https://translate.yandex.com/developers/keys)
and copy API key:

![Result](https://raw.githubusercontent.com/fabasoad/translation-action/main/screenshots/screenshot-yandex-api-key.png)

Expand All @@ -78,7 +98,8 @@ Go to the [Developer's page](https://translate.yandex.com/developers) and click
- Identifier is `funtranslations`.
- Supported translation directions:

`from` direction is English only at this moment, so `lang` parameter can be found [here](https://funtranslations.com/api/). Example:
`from` direction is English only at this moment, so `lang` parameter can be
found [here](https://funtranslations.com/api/). Example:

```yaml
- uses: fabasoad/translation-action@main
Expand All @@ -90,13 +111,15 @@ Go to the [Developer's page](https://translate.yandex.com/developers) and click

## Inputs

<!-- markdownlint-disable MD013 -->
| Name | Required | Description | Default | Possible values |
|--------------------------|----------|--------------------------------------------------------------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| source | Yes | Can be text or path to the file for translation | | _&lt;Path&gt;_,_&lt;String&gt;_ |
| provider | Yes | Provider identifier | | [linguatools](#linguatools), [microsoft](#microsoft), [mymemory](#mymemory), [yandex](#yandex), [funtranslations](#funtranslations) |
| api_key | No | API key that should be used for chosen [provider](#providers) | | |
| api_additional_parameter | No | Additional parameter for the API. eg the region for Microsoft: `canadacentral` | `null` | _&lt;String&gt;_ |
| lang | Yes | The translation direction. Should be one of the option proposed by chosen [provider](#providers) | | _&lt;String&gt;_ |
<!-- markdownlint-enable MD013 -->

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@
},
"homepage": "https://github.com/fabasoad/translation-action#readme",
"dependencies": {
"@actions/core": "1.9.1",
"@actions/core": "1.10.0",
"typed-rest-client": "1.8.9",
"yandex-translate": "2.1.3"
},
"devDependencies": {
"@types/jest": "29.0.3",
"@typescript-eslint/eslint-plugin": "5.38.1",
"@typescript-eslint/parser": "5.38.1",
"@types/jest": "29.2.0",
"@typescript-eslint/eslint-plugin": "5.40.1",
"@typescript-eslint/parser": "5.40.1",
"@vercel/ncc": "0.34.0",
"dotenv": "16.0.2",
"eslint": "8.24.0",
"dotenv": "16.0.3",
"eslint": "8.25.0",
"eslint-config-google": "0.14.0",
"jest": "29.0.3",
"jest-circus": "29.0.3",
"jest": "29.2.1",
"jest-circus": "29.2.1",
"mocha-param": "2.0.1",
"ts-jest": "29.0.2",
"typescript": "4.8.3"
"ts-jest": "29.0.3",
"typescript": "4.8.4"
}
}
Loading

0 comments on commit 91c5be9

Please sign in to comment.