-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
105 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
name: npm-publish | ||
on: | ||
push: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
npm-publish: | ||
name: npm-publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Publish if version has been updated | ||
uses: pascalgn/npm-publish-action@1.3.9 | ||
with: # All of theses inputs are optional | ||
tag_name: "v%s" | ||
tag_message: "v%s" | ||
create_tag: "true" | ||
commit_pattern: "^Release (\\S+)" | ||
workspace: "." | ||
publish_command: "yarn" | ||
publish_args: "--non-interactive" | ||
env: # More info about the environment variables in the README | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings | ||
npm-publish: | ||
name: npm-publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Publish if version has been updated | ||
uses: pascalgn/npm-publish-action@1.3.9 | ||
with: # All of theses inputs are optional | ||
tag_name: "v%s" | ||
tag_message: "v%s" | ||
create_tag: "true" | ||
commit_pattern: "^Release (\\S+)" | ||
workspace: "." | ||
publish_command: "yarn" | ||
publish_args: "--non-interactive" | ||
env: # More info about the environment variables in the README | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
 | ||
|
||
<h1 align="center"> | ||
<img src="https://i.ibb.co/Lk9wGxF/app-store-icon.png" alt="free translate" width="40%"/> | ||
</h1> | ||
|
||
# A free and unlimited translator for Node.js | ||
|
||
> 🈂️ ⠀free text translator for Node.js. | ||
## **Install** | ||
|
||
To install free-translate, you can use NPM: | ||
|
||
```bash | ||
npm install free-translate | ||
``` | ||
|
||
## **Quick examples** | ||
|
||
```js | ||
const { translate } = require("free-translate"); | ||
|
||
(async () => { | ||
const translatedText = await translate("Hello World", { | ||
from: "en", | ||
to: "ar", | ||
}); | ||
|
||
console.log(translatedText); // اهلا بالعالم | ||
})(); | ||
``` | ||
|
||
### **Automatic language recognition** | ||
|
||
If the language informed in the `from` is dynamic, just do not send it and the translator will automatically recognize it: | ||
|
||
```js | ||
const { translate } = require("free-translate"); | ||
|
||
(async () => { | ||
const translatedText = await translate("This is cool!", { to: "ar" }); | ||
|
||
console.log(translatedText); // هذا رائع! | ||
})(); | ||
``` | ||
|
||
### **Multiple texts** | ||
|
||
You can also translate multiple texts at the same time: | ||
|
||
```js | ||
const { translate } = require("free-translate"); | ||
|
||
(async () => { | ||
const translatedText = await translate(["Hello World", "This is cool!"], { | ||
to: "ar", | ||
}); | ||
|
||
console.log(translatedText); // [ 'اهلا بالعالم', 'هذا رائع!' ] | ||
})(); | ||
``` | ||
|
||
--- | ||
|
||
|
||
## Contributing | ||
|
||
- If you want to contribute to the project, you can do it by opening a pull request or opening an issue. | ||
|
||
|
||
--- | ||
## Contact me! | ||
|
||
- E-mail <a href="mailto:el3zahaby@gmail.com" target="_blank">`el3zahaby@gmail.com`</a> | ||
- Instagram <a href="https://www.instagram.com/egyjs/" target="_blank">`@egyjs`</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters