Skip to content

Commit

Permalink
fix translations/changelog/contributing
Browse files Browse the repository at this point in the history
  • Loading branch information
saidatom committed Nov 5, 2020
1 parent 8efe941 commit 4befd6d
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 8 deletions.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

All notable changes to `Validation rules relevant to Portugal` will be documented in this file.

## Version 1.0

### Added
- Everything
18 changes: 18 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Contributing

Contributions are welcome and will be fully credited.

Contributions are accepted via Pull Requests on [Github](https://github.com/square-bit/laravel-pt-rules).

## Pull Requests

- **Document any change in behaviour** - Make sure the `readme.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.


**Happy coding**!
5 changes: 0 additions & 5 deletions resources/lang/pt.json

This file was deleted.

7 changes: 7 additions & 0 deletions resources/lang/pt/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

return [
"invalidBI" => "Número de B.I. inválido",
"invalidNIF" => "Número de Identificação Fiscal (NIF) inválido",
"invalidCC" => "Número de Cartão do Cidadão inválido"
];
2 changes: 1 addition & 1 deletion src/Rules/BI.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class BI extends NIF
{
public function message(): string
{
return trans('sb-laravel-pt::invalidBI');
return trans('sb-laravel-pt::translations.invalidBI');
}
}
2 changes: 1 addition & 1 deletion src/Rules/CC.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function passes($attribute, $cc): bool

public function message(): string
{
return trans('sb-laravel-pt::invalidCC');
return trans('sb-laravel-pt::translations.invalidCC');
}

private function getNumberFromChar($letter): int
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/NIF.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public function passes($attribute, $nif): bool

public function message(): string
{
return trans('sb-laravel-pt::invalidNIF');
return trans('sb-laravel-pt::translations.invalidNIF');
}
}

0 comments on commit 4befd6d

Please sign in to comment.