Skip to content

Commit

Permalink
Merge pull request #40 from krzysztofrewak/3.x
Browse files Browse the repository at this point in the history
Polish countries and continents
  • Loading branch information
danharrin authored Oct 16, 2021
2 parents 759d319 + 080cbb2 commit 4cdcb4b
Show file tree
Hide file tree
Showing 11 changed files with 383 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Country::where('name', 'like', 'a%')->get(); // Get information about all countr
|--|--|
| German | `composer require squirephp/continents-de` |
| English | `composer require squirephp/continents-en` |
| Polish | `composer require squirephp/continents-pl` |

#### Schema

Expand All @@ -149,6 +150,7 @@ Country::where('name', 'like', 'a%')->get(); // Get information about all countr
| English | `composer require squirephp/countries-en` |
| French | `composer require squirephp/countries-fr` |
| German | `composer require squirephp/countries-de` |
| Polish | `composer require squirephp/countries-pl` |
| Spanish | `composer require squirephp/countries-es` |

#### Schema
Expand Down
45 changes: 45 additions & 0 deletions packages/continents-pl/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "squirephp/continents-pl",
"description": "A library containing the Polish translation of Squire's Continent model.",
"keywords": [
"squire"
],
"license": "MIT",
"homepage": "https://github.com/squirephp",
"support": {
"issues": "https://github.com/squirephp/squire/issues",
"source": "https://github.com/squirephp/squire"
},
"authors": [
{
"name": "Dan Harrin",
"email": "[email protected]"
},
{
"name": "Krzysztof Rewak",
"email": "[email protected]"
}
],
"require": {
"php": "^8.0",
"illuminate/support": "^8.0",
"squirephp/continents": "self.version",
"squirephp/repository": "self.version"
},
"autoload": {
"psr-4": {
"Squire\\": "src"
}
},
"extra": {
"laravel": {
"providers": [
"Squire\\ContinentsPlServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev"
}
8 changes: 8 additions & 0 deletions packages/continents-pl/resources/data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
id,code,name
af,af,Afryka
an,an,Antarktyda
as,as,Azja
eu,eu,Europa
na,na,Ameryka Północna
oc,oc,Oceania
sa,sa,Ameryka Południowa
14 changes: 14 additions & 0 deletions packages/continents-pl/src/ContinentsPlServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Squire;

use Illuminate\Support\ServiceProvider;
use Squire\Models\Continent;

class ContinentsPlServiceProvider extends ServiceProvider
{
public function boot(): void
{
Repository::registerSource(Continent::class, 'pl', __DIR__ . '/../resources/data.csv');
}
}
2 changes: 1 addition & 1 deletion packages/countries-de/resources/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ kp,850,Pyongyang,kp,prk,as,kpw,🇰🇵,Nordkorea
kr,82,Seoul,kr,kor,as,krw,🇰🇷,Südkorea
kw,965,Kuwait City,kw,kwt,as,kwd,🇰🇼,Kuwait
ky,1345,George Town,ky,cym,na,kyd,🇰🇾,Kaimaninseln
kz,7,Astana,kz,kaz,as,kzt,🇰🇿,Kasachstan
kz,7,Nur-Sultan,kz,kaz,as,kzt,🇰🇿,Kasachstan
la,856,Vientiane,la,lao,as,lak,🇱🇦,Laos
lb,961,Beirut,lb,lbn,as,lbp,🇱🇧,Libanon
lc,1758,Castries,lc,lca,na,xcd,🇱🇨,St. Lucia
Expand Down
2 changes: 1 addition & 1 deletion packages/countries-en/resources/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ kp,850,Pyongyang,kp,prk,as,kpw,🇰🇵,North Korea
kr,82,Seoul,kr,kor,as,krw,🇰🇷,South Korea
kw,965,Kuwait City,kw,kwt,as,kwd,🇰🇼,Kuwait
ky,1345,George Town,ky,cym,na,kyd,🇰🇾,Cayman Islands
kz,7,Astana,kz,kaz,as,kzt,🇰🇿,Kazakhstan
kz,7,Nur-Sultan,kz,kaz,as,kzt,🇰🇿,Kazakhstan
la,856,Vientiane,la,lao,as,lak,🇱🇦,Laos
lb,961,Beirut,lb,lbn,as,lbp,🇱🇧,Lebanon
lc,1758,Castries,lc,lca,na,xcd,🇱🇨,Saint Lucia
Expand Down
2 changes: 1 addition & 1 deletion packages/countries-es/resources/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ kp,850,Pyongyang,kp,prk,as,kpw,🇰🇵,Corea del Norte
kr,82,Seoul,kr,kor,as,krw,🇰🇷,Corea del Sur
kw,965,Kuwait City,kw,kwt,as,kwd,🇰🇼,Kuwait
ky,1345,George Town,ky,cym,na,kyd,🇰🇾,Islas Caimán
kz,7,Astana,kz,kaz,as,kzt,🇰🇿,Kazajistán
kz,7,Nur-Sultan,kz,kaz,as,kzt,🇰🇿,Kazajistán
la,856,Vientiane,la,lao,as,lak,🇱🇦,Laos
lb,961,Beirut,lb,lbn,as,lbp,🇱🇧,Líbano
lc,1758,Castries,lc,lca,na,xcd,🇱🇨,Santa Lucía
Expand Down
2 changes: 1 addition & 1 deletion packages/countries-fr/resources/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ kp,850,Pyongyang,kp,prk,as,kpw,🇰🇵,Corée du Nord
kr,82,Seoul,kr,kor,as,krw,🇰🇷,Corée du Sud
kw,965,Kuwait City,kw,kwt,as,kwd,🇰🇼,Koweït
ky,1345,George Town,ky,cym,na,kyd,🇰🇾,Îles Caïmans
kz,7,Astana,kz,kaz,as,kzt,🇰🇿,Kazakhstan
kz,7,Nur-Sultan,kz,kaz,as,kzt,🇰🇿,Kazakhstan
la,856,Vientiane,la,lao,as,lak,🇱🇦,Laos
lb,961,Beirut,lb,lbn,as,lbp,🇱🇧,Liban
lc,1758,Castries,lc,lca,na,xcd,🇱🇨,Sainte-Lucie
Expand Down
45 changes: 45 additions & 0 deletions packages/countries-pl/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "squirephp/countries-pl",
"description": "A library containing the Polish translation of Squire's Country model.",
"keywords": [
"squire"
],
"license": "MIT",
"homepage": "https://github.com/squirephp",
"support": {
"issues": "https://github.com/squirephp/squire/issues",
"source": "https://github.com/squirephp/squire"
},
"authors": [
{
"name": "Dan Harrin",
"email": "[email protected]"
},
{
"name": "Krzysztof Rewak",
"email": "[email protected]"
}
],
"require": {
"php": "^8.0",
"illuminate/support": "^8.0",
"squirephp/countries": "self.version",
"squirephp/repository": "self.version"
},
"autoload": {
"psr-4": {
"Squire\\": "src"
}
},
"extra": {
"laravel": {
"providers": [
"Squire\\CountriesPlServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev"
}
Loading

0 comments on commit 4cdcb4b

Please sign in to comment.