From db0263f31efad577b4375737af7bdade086b1b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Fri, 22 Mar 2024 17:41:24 +0000 Subject: [PATCH 1/2] Fix typos --- .github/workflows/laravel.yml | 8 ++++---- .github/workflows/spelling.yml | 29 +++++++++++++++++++++++++++++ .typos.toml | 10 ++++++++++ CHANGELOG.md | 2 +- README.md | 4 ++-- 5 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/spelling.yml create mode 100644 .typos.toml diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 384a04f..13e46ca 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -12,13 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install Dependencies - run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist + - uses: actions/checkout@v4 - name: Setup PHP, with composer and extensions uses: shivammathur/setup-php@v2 with: php-version: '8.1' extensions: mbstring, dom, fileinfo + - name: Install Dependencies + run: composer update --no-ansi --no-interaction --no-scripts --prefer-dist - name: Run Test - run: vendor/bin/phpunit + run: composer run test diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml new file mode 100644 index 0000000..ead0af1 --- /dev/null +++ b/.github/workflows/spelling.yml @@ -0,0 +1,29 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow + +name: "Spelling" + +on: + pull_request: null + push: + branches: + - "master" + +permissions: + contents: "read" + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + typos_check: + name: "文A Typos check" + runs-on: "ubuntu-22.04" + timeout-minutes: 1 + steps: + - + name: "Checkout repository" + uses: "actions/checkout@v4" + - + name: "Search for misspellings" + uses: "crate-ci/typos@master" diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..f3c8dea --- /dev/null +++ b/.typos.toml @@ -0,0 +1,10 @@ +[files] +extend-exclude = [ + ".git/", +] +ignore-hidden = false + +[default.extend-words] +"encrypter" = "encrypter" +"invokable" = "invokable" +"responsable" = "responsable" diff --git a/CHANGELOG.md b/CHANGELOG.md index c62ac2e..a51d617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,7 +77,7 @@ ## v0.5.1 (2018-05-29) ### Added - new test for custom translations' object key -### Chaged +### Changed - JS regex for object extracting - trimming quotes from translations' object key diff --git a/README.md b/README.md index 1a71710..997779d 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ Let's say we have the following translation line: 'attempts' => 'Be careful, you have :attempts attempt left.|You still have :attempts attempts left.', ] ``` -> Note, the plural and the singular verions are separated with the `|` character! +> Note, the plural and the singular versions are separated with the `|` character! ```js translator.trans_choice('auth.attempts', 1, { attempts: 'only one' }); @@ -191,7 +191,7 @@ Behind the scenes the proper translations will be rendered, if it exists. ## Fallback locales -If there are no translations is not available in the current langauge, +If there are no translations is not available in the current language, the package will look for the fallback locale's translations. If there is no translations available in the fallback locale, the missing translations won't appear. From 2de8c6ddebef1482b0186a3c7a1b4fa3346816cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Fri, 22 Mar 2024 21:45:55 +0100 Subject: [PATCH 2/2] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Viktor Szépe --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 997779d..10abe3b 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,8 @@ Let's say we have the following translation line: 'attempts' => 'Be careful, you have :attempts attempt left.|You still have :attempts attempts left.', ] ``` -> Note, the plural and the singular versions are separated with the `|` character! +> [!NOTE] +> The plural and the singular versions are separated by the `|` character! ```js translator.trans_choice('auth.attempts', 1, { attempts: 'only one' });