Skip to content

Commit

Permalink
Merge pull request #2 from forkimenjeckayang/main
Browse files Browse the repository at this point in the history
Sync Main and Develope since both are stable
  • Loading branch information
forkimenjeckayang committed Jun 12, 2024
2 parents ce59c44 + b9b6f44 commit 40caa7d
Show file tree
Hide file tree
Showing 3 changed files with 198 additions and 1 deletion.
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Create or Update Release

on:
push:
branches:
- main # Adjust the branch as needed

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Check if tag exists locally
id: check_tag_local
run: |
if git rev-parse v1.0.0 >/dev/null 2>&1
then
echo "Tag exists locally"
echo "::set-output name=tag_exists_local::true"
else
echo "Tag does not exist locally"
echo "::set-output name=tag_exists_local::false"
fi
- name: Check if tag exists remotely
id: check_tag_remote
run: |
if git ls-remote --tags origin | grep refs/tags/v1.0.0 >/dev/null 2>&1
then
echo "Tag exists remotely"
echo "::set-output name=tag_exists_remote::true"
else
echo "Tag does not exist remotely"
echo "::set-output name=tag_exists_remote::false"
fi
- name: Create Tag
if: steps.check_tag_local.outputs.tag_exists_local == 'false' && steps.check_tag_remote.outputs.tag_exists_remote == 'false'
run: git tag v1.0.0 # Replace with your desired tag name

- name: Push Tag
if: steps.check_tag_local.outputs.tag_exists_local == 'false' && steps.check_tag_remote.outputs.tag_exists_remote == 'false'
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
git remote set-url origin https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/${{ github.repository }}.git
git push --tags
- name: Create or Update Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.0.0 # Replace with the tag you created
release_name: Release v1.0.0 # Replace with your desired release name
body: |
Release notes for v1.0.0
- Feature 1 implemented
- Basic feature to input text in the text field
- Select Langauge and click the translate button to get the translated text
continue-on-error: true

- name: Update Existing Release
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_ID=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/tags/v1.0.0 | jq -r '.id')
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID \
-d '{"tag_name": "v1.0.0", "name": "Release v1.0.0", "body": "Release notes for v1.0.0\n- Feature 1 implemented\n- Bug fixes"}'
72 changes: 72 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing to Language Translator Extension

First off, thank you for considering contributing to the Language Translator Extension! Your contributions help make this project better for everyone.

## How to Contribute

### Reporting Issues

If you find a bug or have a feature request, please create an issue in the [GitHub issue tracker](https://github.com/forkimenjeckayang/language_translator_extension/issues). Before submitting a new issue, please check if it has already been reported.

### Submitting Pull Requests

1. **Fork the Repository:**
- Navigate to the [repository on GitHub](https://github.com/forkimenjeckayang/language_translator_extension) and click the "Fork" button to create your own copy of the repository.

2. **Clone the Repository:**
- Clone your fork to your local machine(https):
```sh
git clone https://github.com/forkimenjeckayang/language_translator_extension.git
```
- Clone your fork to your local machine(ssh):
```sh
git clone [email protected]:forkimenjeckayang/language_translator_extension.git
```

3. **Create a Branch:**
- Create a new branch for your feature or bug fix:
```sh
git checkout -b my-feature-branch
```

4. **Make Changes:**
- Make your changes in the new branch. Please follow the existing code style and conventions.

5. **Commit Changes:**
- Commit your changes with a clear and descriptive commit message(Signed commits):
```sh
git commit -S -m "Add detailed description of what this commit does"
```

6. **Push Changes:**
- Push your changes to your forked repository:
```sh
git push origin my-feature-branch
```

7. **Create a Pull Request:**
- Go to the original repository on GitHub and click the "New Pull Request" button.
- Select your feature branch and submit the pull request.
- Provide a clear description of the changes you made and any additional information that might be helpful.

### Code Style

Please follow these guidelines to maintain a consistent code style:

- Use meaningful variable and function names.
- Write clear and concise comments where necessary.
- Format your code using the project's existing conventions (e.g., indentation, spacing).
### Documentation
If your changes affect the usage or functionality of the extension, please update the relevant documentation in the `README.md` file or create new documentation as necessary.
## Getting Help
If you need help with anything, feel free to open an issue or reach out by commenting on an existing issue or pull request.
---
Thank you for contributing to the Language Translator Extension! Your efforts are greatly appreciated.
49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
# language_translator_extension

A web browser extension which can be used to translate from one language to another and supports speech recognition be it as input and output
A web browser extension which as of now can be used to translate from one language to another. It supports four languages currenty French, English , German and Spanish. You simply copy text which you want to translate, paste it into the text area , selct your langaue and click the traslate button.

It uses [Libre Translate](https://hub.docker.com/r/libretranslate/libretranslate) an open source project to handle the transaltions . This translation engine is sef hosted on AWS as an EC2 instance which can be accessed publicly.

## Steps To Test and Use Plugin With Chrome Browser

Welcome to the Language Translator Extension! This extension allows you to easily translate text within your browser.

## Installation Guide

Follow these steps to install the Language Translator Extension on Google Chrome.

### Step 1: Download the Extension

1. Navigate to the [Releases](https://github.com/forkimenjeckayang/language_translator_extension/releases/tag/v1.0.0) page of this repository.
2. Download the latest release ZIP file(*Source code(zip)*).
3. Extract the contents of the ZIP file to a directory on your computer.

### Step 2: Load the Extension in Chrome

1. Open Google Chrome.
2. Go to the Extensions page by entering `chrome://extensions/` in the address bar.
3. Enable **Developer mode** by toggling the switch in the top right corner.
4. Click the **Load unpacked** button that appears.
5. In the dialog that opens, navigate to the directory where you extracted the extension files, and select the folder containing the `manifest.json` file.Use the directory which came from the unzipped extension

### Step 3: Using the Extension

1. Once the extension is loaded, pin it and you should see its icon appear in the Chrome toolbar.
2. Click the extension icon to open the Language Translator.
3. You can now transalte by putting text in input field, select your langauage and translate.

## Troubleshooting

If you encounter any issues while installing or using the extension, please follow these steps:

1. Make sure you have downloaded and extracted the files correctly.
2. Ensure that you have selected the correct folder containing the `manifest.json` file when loading the unpacked extension.
3. Check that **Developer mode** is enabled in Chrome.

If you continue to experience problems, feel free to open an issue on the [GitHub repository](https://github.com/forkimenjeckayang/language_translator_extension/issues).

## Contributing

We welcome contributions to the Language Translator Extension! Please see our [Contributing Guidelines](CONTRIBUTING.md) for more details.

Thank you for using the Language Translator Extension! If you find it useful, please consider starring the repository and sharing it with others.

0 comments on commit 40caa7d

Please sign in to comment.