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..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 verions 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' }); @@ -191,7 +192,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.