-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
0 parents
commit f21a1d4
Showing
74 changed files
with
19,557 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
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,19 @@ | ||
# Path-based git attributes | ||
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html | ||
|
||
# Ignore all test and documentation with "export-ignore". | ||
/.github export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/art export-ignore | ||
/docs export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/.php_cs.dist.php export-ignore | ||
/psalm.xml export-ignore | ||
/psalm.xml.dist export-ignore | ||
/testbench.yaml export-ignore | ||
/UPGRADING.md export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpstan-baseline.neon export-ignore |
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,3 @@ | ||
# These are supported funding model platforms | ||
|
||
github: MohmmedAshraf |
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,14 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Ask a question | ||
url: https://github.com/MohmmedAshraf/laravel-translations/discussions/new?category=q-a | ||
about: Ask the community for help | ||
- name: Request a feature | ||
url: https://github.com/MohmmedAshraf/laravel-translations/discussions/new?category=ideas | ||
about: Share ideas for new features | ||
- name: Report a security issue | ||
url: https://github.com/MohmmedAshraf/laravel-translations/security/policy | ||
about: Learn how to notify us for sensitive bugs | ||
- name: Report a bug | ||
url: https://github.com/MohmmedAshraf/laravel-translations/issues/new | ||
about: Report a reproducible bug |
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,24 @@ | ||
name: Fix PHP code style issues | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.php' | ||
|
||
jobs: | ||
php-code-styling: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Fix PHP code style issues | ||
uses: aglipanci/laravel-pint-action@1.0.0 | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Fix styling |
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,72 @@ | ||
name: run-tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest] | ||
php: [8.0, 8.1] | ||
laravel: [9.*] | ||
stability: [prefer-lowest, prefer-stable] | ||
include: | ||
- laravel: 9.* | ||
testbench: 7.* | ||
|
||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | ||
|
||
services: | ||
mysql: | ||
image: mysql:8.0 | ||
env: | ||
MYSQL_USER: user | ||
MYSQL_PASSWORD: secret | ||
MYSQL_DATABASE: laravel_translations | ||
MYSQL_ROOT_PASSWORD: secret | ||
ports: | ||
- 3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
|
||
steps: | ||
- name: Verify MySQL connection | ||
run: | | ||
mysql --version | ||
sudo apt-get install -y mysql-client | ||
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uuser -psecret -e "SHOW DATABASES" | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | ||
coverage: none | ||
|
||
- name: Setup problem matchers | ||
run: | | ||
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | ||
- name: List Installed Dependencies | ||
run: composer show -D | ||
|
||
- name: Execute tests | ||
run: vendor/bin/pest | ||
env: | ||
DB_USERNAME: user | ||
DB_PASSWORD: secret | ||
DB_PORT: ${{ job.services.mysql.ports[3306] }} |
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,28 @@ | ||
name: "Update Changelog" | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
||
- name: Update Changelog | ||
uses: stefanzweifel/changelog-updater-action@v1 | ||
with: | ||
latest-version: ${{ github.event.release.name }} | ||
release-notes: ${{ github.event.release.body }} | ||
|
||
- name: Commit updated CHANGELOG | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
branch: main | ||
commit_message: Update CHANGELOG | ||
file_pattern: CHANGELOG.md |
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,12 @@ | ||
.idea | ||
.phpunit.result.cache | ||
build | ||
composer.lock | ||
coverage | ||
docs | ||
phpunit.xml | ||
phpstan.neon | ||
testbench.yaml | ||
vendor | ||
node_modules | ||
.DS_Store |
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,9 @@ | ||
# Changelog | ||
|
||
All notable changes to `laravel-translations` will be documented in this file. | ||
|
||
## v0.0.1 - 2022-11-14 | ||
|
||
initial release... | ||
|
||
Enjoy 💖 |
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,126 @@ | ||
# CONTRIBUTING | ||
|
||
## Introduction | ||
|
||
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. | ||
|
||
### 💻 Code Contribution | ||
|
||
Please follow the steps below to contribute with code. | ||
|
||
## Steps | ||
|
||
### 📌 Step 1 | ||
|
||
Fork this repository and enter its directory. | ||
|
||
Replace the placeholder `<YOUR-USERNAME>` with your GitHub username and run the command: | ||
|
||
```shell | ||
git clone https://github.com/<YOUR-USERNAME>/laravel-translations.git && cd laravel-translations | ||
``` | ||
|
||
### 📌 Step 2 | ||
|
||
Install all PHP dependencies using Composer, run the command: | ||
|
||
```shell | ||
composer install | ||
``` | ||
|
||
Once finished, proceed to install Node dependencies. Run the command: | ||
|
||
```shell | ||
npm install | ||
``` | ||
|
||
### 📌 Step 3 | ||
|
||
Create a new branch for your code. You may call it `feature-` / `fix-` / `enhancement-` followed by the name of what you are developing. | ||
|
||
For example: | ||
|
||
```shell | ||
git checkout -b feature/feature-name | ||
``` | ||
|
||
Now, you can work on this newly created branch. | ||
|
||
> 💡 Tip: While developing, you may run the command `npm run watch` to automatically rebuild any CSS and JavaScript files. | ||
|
||
### 📌 Step 4 | ||
|
||
After you are done coding, please run Laravel Pint for code formatting: | ||
|
||
```Shell | ||
composer format | ||
``` | ||
|
||
Finally, run the Pest PHP for tests: | ||
|
||
```Shell | ||
composer test | ||
``` | ||
|
||
### 📌 Step 5 | ||
|
||
You may want to install your modified version of Laravel Translations UI inside a Laravel application, and test if it performs as expected. | ||
|
||
In your Laravel application, modify the `composer.json` adding a `repositories` key with the `path` of Laravel Translations UI on your machine. | ||
|
||
This will instruct composer to install Laravel Translations UI from your local folder instead of using the version on the official repository. | ||
|
||
Example: | ||
|
||
```json | ||
// File: composer.json | ||
|
||
{ | ||
"require": { | ||
"outhebox/laravel-translations": "*" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "path", | ||
"url": "/home/myuser/projects/laravel-translations" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
Proceed with `composer update`. | ||
|
||
### 📌 Step 6 | ||
|
||
If you changed any CSS or JavaScript files, you must build the assets for production before committing. | ||
|
||
Run the command: | ||
|
||
```shell | ||
npm run production | ||
``` | ||
|
||
### 📌 Step 7 | ||
|
||
Commit your changes. Please send short and descriptive commits. | ||
|
||
For example: | ||
|
||
```Shell | ||
git commit -m "adds route for feature X" | ||
``` | ||
|
||
### 📌 Step 8 | ||
|
||
If all tests are ✅ passing, you may push your code and submit a Pull Request. | ||
|
||
Please write a summary of your contribution, detailing what you are changing/fixing/proposing. | ||
|
||
When necessary, please provide usage examples, code snippets and screenshots. You may also include links related to Issues or other Pull Requests. | ||
|
||
Once submitted, your Pull Request will be marked for review and people will send questions, comments and eventually request changes. | ||
|
||
--- | ||
|
||
🙏 Thank you for your contribution! |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) outhebox <cupo.ashraf@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
Oops, something went wrong.