Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
VicGUTT committed Oct 23, 2024
0 parents commit 702283d
Show file tree
Hide file tree
Showing 196 changed files with 31,938 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 4

[docker-compose.yml]
indent_size = 4
10 changes: 10 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Community Guidelines

The following community guidelines are based on [The Ruby Community Conduct Guidelines](https://www.ruby-lang.org/en/conduct).

This document provides community guidelines for a respectful, productive, and collaborative place for any person who is willing to contribute to the project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.).

- Participants will be tolerant of opposing views.
- Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
- When interpreting the words and actions of others, participants should always assume good intentions.
- Behaviour which can be reasonably considered harassment will not be tolerated.
66 changes: 66 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Contributing Guidelines

✨ Before we get started, thank you for taking the time to contribute! ✨

This is a guideline for contributing to the project, its documentation, and other repositories. We welcome your feedback, proposed changes, and updates to these guidelines. We will always welcome thoughtful issues and consider pull requests.

But, please take a moment to review this document **before submitting a pull request**.

## Before contributing

### Transl isn’t FOSS

While Transl's source code is open source, publicly available, and welcomes contributions, it is proprietary. Everything in this repository, including any community-contributed code, is the property of Transl. For that reason there are a few limitations on how you can use the code:

- You cannot alter anything related to licensing, updating, version or edition checking, purchasing, first party notifications or banners, or anything else that attempts to circumvent paying for features that are designated as paid features. We want to stay in business so we can better support _you_ and the community.
- You can’t publicly maintain a long-term fork of the repository.

### How to Get Support

If you're looking for official developer support (and you have an active license/subscription), send us an email at the address that can be found on [Transl.me](https://transl.me). We will always do our best to reply in a timely manner. **Github issues are intended for reporting bugs.**

## Contributing

### Pull requests

**Please ask first before starting work on any significant new features.**

It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors [share their idea with us](https://github.com/transl-me/laravel-transl/discussions/new?category=ideas) in our discussion forum to first discuss any significant new features.

### Coding standards

Our code formatting rules are defined in [pint.json](https://github.com/transl-me/laravel-transl/blob/main/pint.json). You can check your code against these standards by running:

```sh
composer format
```

To automatically fix any style violations in your code, you can run:

```sh
composer fix
```

### Static analysis

You can analyse the codebase with phpstan using the following command:

```sh
composer analyse
```

or the alias:

```sh
composer lint
```

### Running tests

You can run the test suite using the following commands:

```sh
composer test
```

Please ensure that the tests are passing when submitting a pull request. If you're adding new features, please include tests.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
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/transl-me/laravel-transl/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/transl-me/laravel-transl/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/transl-me/laravel-transl/security/policy
about: Learn how to notify us for sensitive bugs
- name: Report a bug
url: https://github.com/transl-me/laravel-transl/issues/new
about: Report a reproducable bug
28 changes: 28 additions & 0 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Fix PHP code style issues

on:
push:
paths:
- '**.php'

permissions:
contents: write

jobs:
php-code-styling:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/[email protected]

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: formatting'
28 changes: 28 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PHPStan

on:
push:
paths:
- '**.php'
- 'phpstan.neon.dist'
- '.github/workflows/phpstan.yml'

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v3

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
59 changes: 59 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: run-tests

on:
push:
paths:
- '**.php'
- '.github/workflows/run-tests.yml'
- 'phpunit.xml.dist'
- 'composer.json'
- 'composer.lock'

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest] # windows-latest, macos-latest
php: [8.4, 8.3, 8.2, 8.1]
laravel: [11.*, 10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
exclude:
- php: 8.1
laravel: 11.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- 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: pcov

- 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 --ci --coverage --min=90
32 changes: 32 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Update Changelog'

on:
release:
types: [released]

permissions:
contents: write

jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v4
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@v5
with:
branch: main
commit_message: 'chore: auto changelog update'
file_pattern: CHANGELOG.md
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
*.log
*.local
*.vic
.env
.env.production
.env.staging
.env.backup
.phpunit.result.cache
.npmrc
auth.json
/.vic
/.idea
/.vscode
/.fleet
/.results
/.coverage
/.temp
/node_modules
# /public/build
/public/hot
/public/storage
/storage/*.key
/tests/TestSupport/.to-delete
/vendor
/resources/tests/vitest/.coverage
/resources/tests/playwright/.test-results
/playwright-report/
/playwright/.cache/
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# npx --no-install commitlint --edit $1
6 changes: 6 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# composer format
# composer lint
# composer test:coverage
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

All notable changes to `transl-me/laravel-transl` will be documented in this file.
46 changes: 46 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Copyright (c) Transl

Permission is hereby granted, provided an exchange beneficial to the business
of Transl, or, provided there is express intent to result in an exchange
beneficial to the business of Transl, to any person obtaining a copy of this
software (the "Software") to use, copy, modify, merge, publish and/or distribute
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

1. **Do not plagiarize.** The Software and the proprietary code therein, not
limited to but including designs, components, assets, classes, and patterns,
are attributed to and solely to Transl and it's founders.

2. **Not for reuse.** The Software and the proprietary code therein, not limited
to but including designs, components, assets, classes, and patterns, may not
be reused in other projects without the express written consent of Transl.

3. **Do not alter the licensing features.** Software features related to licensing
shall not be altered or circumvented in any way, including (but not limited to)
license validation, feature or edition restrictions, and update eligibility.

4. **Do not compete.** All use of the Software shall not violate anything that may
be deemed by Transl, in their sole and absolute discretion, to be competitive or
in conflict with the business of Transl.

5. **Follow the law.** All use of the Software shall not violate any applicable law
or regulation, nor infringe the rights of any other person or entity.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

Failure to comply with the foregoing conditions will automatically and immediately
result in termination of the permission granted hereby. This license does
not include any right to receive updates to the Software or technical support.
Licensees bear all risk related to the quality and performance of the Software
and any modifications made or obtained to it, including liability for actual and
consequential harm, such as loss or corruption of data, and any necessary service,
repair, or correction.

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, INCLUDING SPECIAL, INCIDENTAL AND CONSEQUENTIAL DAMAGES, 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.
Loading

0 comments on commit 702283d

Please sign in to comment.