Skip to content

Commit

Permalink
Resolves #77
Browse files Browse the repository at this point in the history
  • Loading branch information
Teixeira Rocha, Lucas committed Feb 26, 2024
1 parent 1f87cf7 commit ac63570
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 13 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,35 @@ jobs:
run: composer require lucascudo/laravel-pt-br-localization --dev
working-directory: ./blog

- name: Clean vendor directory
run: rm -rf blog/vendor/lucascudo/laravel-pt-br-localization/*

- name: Override laravel-pt-BR-localization content at vendor directory
run: cp -rf composer.json src blog/vendor/lucascudo/laravel-pt-br-localization/

- name: Publish translation
- name: Publish translations
run: php artisan vendor:publish --tag=laravel-pt-br-localization && ls lang
working-directory: ./blog

- name: Verify pt_BR.json
run: test -f pt_BR.json
- name: Verify pt-br.json
run: test -f pt-br.json
working-directory: ./blog/lang

- name: Verify auth.php
run: test -f auth.php
working-directory: ./blog/lang/pt_BR
working-directory: ./blog/lang/pt-br

- name: Verify pagination.php
run: test -f pagination.php
working-directory: ./blog/lang/pt_BR
working-directory: ./blog/lang/pt-br

- name: Verify passwords.php
run: test -f passwords.php
working-directory: ./blog/lang/pt_BR
working-directory: ./blog/lang/pt-br

- name: Verify validation.php
run: test -f validation.php
working-directory: ./blog/lang/pt_BR
working-directory: ./blog/lang/pt-br

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Módulo de linguagem pt_BR (português brasileiro) para Laravel
# Módulo de linguagem pt-BR (português brasileiro) para Laravel

![example workflow](https://github.com/lucascudo/laravel-pt-br-localization/actions/workflows/master.yml/badge.svg) [![Total Downloads](https://poser.pugx.org/lucascudo/laravel-pt-br-localization/downloads)](https://packagist.org/packages/lucascudo/laravel-pt-br-localization) [![Latest Stable Version](https://poser.pugx.org/lucascudo/laravel-pt-br-localization/v/stable)](https://packagist.org/packages/lucascudo/laravel-pt-br-localization) [![License](https://poser.pugx.org/lucascudo/laravel-pt-br-localization/license)](https://packagist.org/packages/lucascudo/laravel-pt-br-localization)

Expand All @@ -22,11 +22,11 @@ composer require lucascudo/laravel-pt-br-localization --dev
php artisan vendor:publish --tag=laravel-pt-br-localization
```

4. Configure o Framework para utilizar 'pt_BR' como linguagem padrão
4. Configure o Framework para utilizar 'pt-BR' como linguagem padrão

```
// Altere Linha 85 do arquivo config/app.php para:
'locale' => 'pt_BR'
'locale' => 'pt-BR'
## Versões do Laravel suportadas
Expand Down
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "lucascudo/laravel-pt-br-localization",
"description": "Arquivos de linguagem em Português do Brasil (pt_BR) para Laravel",
"description": "Arquivos de linguagem em Português do Brasil (pt-BR) para Laravel",
"license": "GPL-3.0-or-later",
"homepage": "https://github.com/lucascudo/laravel-pt-BR-localization",
"authors": [
{
"name": "Cascudo",
Expand All @@ -21,5 +22,11 @@
"Lucascudo\\LaravelPtBRLocalization\\LaravelPtBRLocalizationServiceProvider"
]
}
},
"scripts": {
"post-package-install": [
"echo 'Buy me a coffee!'",
"echo https://www.buymeacoffee.com/lucasrocha"
]
}
}
4 changes: 2 additions & 2 deletions src/LaravelPtBRLocalizationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class LaravelPtBRLocalizationServiceProvider extends ServiceProvider
public function register()
{
$this->publishes([
__DIR__ . '/pt_BR.json' => $this->app->langPath() . '/pt_BR.json',
__DIR__ . '/pt_BR' => $this->app->langPath() . '/pt_BR'
__DIR__ . '/pt-BR.json' => $this->app->langPath() . '/pt-BR.json',
__DIR__ . '/pt-BR' => $this->app->langPath() . '/pt-BR'
], 'laravel-pt-br-localization');
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ac63570

Please sign in to comment.