From 5fc4c342a2f914a3fdc989c9b2257e3ba05108eb Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Thu, 8 Feb 2024 16:49:38 +1100 Subject: [PATCH 01/16] Consolidate migrations --- LICENCE.md | 19 --- LICENSE.md | 5 + README.md | 204 +++++++++++++++------------- updates/000001_create_countries.php | 25 ++++ updates/000002_create_states.php | 23 ++++ updates/add_country_callingcode.php | 22 --- updates/add_country_pinned_flag.php | 25 ---- updates/add_enabled_states.php | 23 ---- updates/create_countries_table.php | 36 ----- updates/create_states_table.php | 34 ----- updates/version.yaml | 22 ++- 11 files changed, 172 insertions(+), 266 deletions(-) delete mode 100644 LICENCE.md create mode 100644 LICENSE.md create mode 100644 updates/000001_create_countries.php create mode 100644 updates/000002_create_states.php delete mode 100644 updates/add_country_callingcode.php delete mode 100644 updates/add_country_pinned_flag.php delete mode 100644 updates/add_enabled_states.php delete mode 100644 updates/create_countries_table.php delete mode 100644 updates/create_states_table.php diff --git a/LICENCE.md b/LICENCE.md deleted file mode 100644 index d68943e..0000000 --- a/LICENCE.md +++ /dev/null @@ -1,19 +0,0 @@ -# MIT license - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..72ec8ea --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,5 @@ +# License + +This plugin is an official extension of the October CMS platform and is free to use if you have a platform license. + +See End User License Agreement at https://octobercms.com/eula for more details. diff --git a/README.md b/README.md index aeea23d..ae7d3dd 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,16 @@ Copy the key and enter it in the **Settings > Location settings** area. If you f This plugin provides an easy way to add location fields, country and state, to any model. Simply add these columns to the database table: - $table->integer('country_id')->unsigned()->nullable()->index(); - $table->integer('state_id')->unsigned()->nullable()->index(); +```php +$table->integer('country_id')->unsigned()->nullable()->index(); +$table->integer('state_id')->unsigned()->nullable()->index(); +``` Then implement the **RainLab.Location.Behaviors.LocationModel** behavior in the model class: - public $implement = ['RainLab.Location.Behaviors.LocationModel']; +```php +public $implement = ['RainLab.Location.Behaviors.LocationModel']; +``` This will automatically create two "belongs to" relationships: @@ -39,65 +43,71 @@ This will automatically create two "belongs to" relationships: You are free to add the following form field definitions: - country: - label: rainlab.location::lang.country.label - type: dropdown - span: left - placeholder: rainlab.location::lang.country.select - - state: - label: rainlab.location::lang.state.label - type: dropdown - span: right - dependsOn: country - placeholder: rainlab.location::lang.state.select +```yaml +country: + label: rainlab.location::lang.country.label + type: dropdown + span: left + placeholder: rainlab.location::lang.country.select + +state: + label: rainlab.location::lang.state.label + type: dropdown + span: right + dependsOn: country + placeholder: rainlab.location::lang.state.select +``` #### Lists For the list column definitions, you can use the following snippet: - country: - label: rainlab.location::lang.country.label - searchable: true - relation: country - select: name - sortable: false - - state: - label: rainlab.location::lang.state.label - searchable: true - relation: state - select: name - sortable: false +```yaml +country: + label: rainlab.location::lang.country.label + searchable: true + relation: country + select: name + sortable: false + +state: + label: rainlab.location::lang.state.label + searchable: true + relation: state + select: name + sortable: false +``` ### Front-end usage The front-end can also use the relationships by creating a partial called **country-state** with the content: - {% set countryId = countryId|default(form_value('country_id')) %} - {% set stateId = stateId|default(form_value('state_id')) %} - -
- - {{ form_select_country('country_id', countryId, { - id: 'accountCountry', - class: 'form-control', - emptyOption: '', - 'data-request': 'onInit', - 'data-request-update': { - 'country-state': '#partialCountryState' - } - }) }} -
- -
- - {{ form_select_state('state_id', countryId, stateId, { - id: 'accountState', - class: 'form-control', - emptyOption: '' - }) }} -
+```twig +{% set countryId = countryId|default(form_value('country_id')) %} +{% set stateId = stateId|default(form_value('state_id')) %} + +
+ + {{ form_select_country('country_id', countryId, { + id: 'accountCountry', + class: 'form-control', + emptyOption: '', + 'data-request': 'onInit', + 'data-request-update': { + 'country-state': '#partialCountryState' + } + }) }} +
+ +
+ + {{ form_select_state('state_id', countryId, stateId, { + id: 'accountState', + class: 'form-control', + emptyOption: '' + }) }} +
+``` This partial can be rendered in a form with the following: @@ -109,12 +119,14 @@ This partial can be rendered in a form with the following: The behavior will also add a special short code accessor and setter to the model that converts `country_code` and `state_code` to their respective identifiers. - // Softly looks up and sets the country_id and state_id - // for these Country and State relations. +```php +// Softly looks up and sets the country_id and state_id +// for these Country and State relations. - $model->country_code = "US"; - $model->state_code = "FL"; - $model->save(); +$model->country_code = "US"; +$model->state_code = "FL"; +$model->save(); +``` ### Address Finder Form Widget @@ -140,39 +152,45 @@ By default the `street` mapper places the house number before the street name. H Usage: - # =================================== - # Form Field Definitions - # =================================== - - fields: - address: - label: Address - type: addressfinder - countryRestriction: 'us,ch' - reverseStreetNumber: false - fieldMap: - latitude: latitude - longitude: longitude - city: city - zip: zip - street: street - country: country_code - state: state_code - vicinity: vicinity - - city: - label: City - zip: - label: Zip - street: - label: Street - country_code: - label: Country - state_code: - label: State - latitude: - label: Latitude - longitude: - label: Longitude - vicinity: - label: Vicinity +```yaml +# =================================== +# Form Field Definitions +# =================================== + +fields: + address: + label: Address + type: addressfinder + countryRestriction: 'us,ch' + reverseStreetNumber: false + fieldMap: + latitude: latitude + longitude: longitude + city: city + zip: zip + street: street + country: country_code + state: state_code + vicinity: vicinity + + city: + label: City + zip: + label: Zip + street: + label: Street + country_code: + label: Country + state_code: + label: State + latitude: + label: Latitude + longitude: + label: Longitude + vicinity: + label: Vicinity +``` + +### License + +This plugin is an official extension of the October CMS platform and is free to use if you have a platform license. See [EULA license](LICENSE.md) for more details. diff --git a/updates/000001_create_countries.php b/updates/000001_create_countries.php new file mode 100644 index 0000000..9db2cd5 --- /dev/null +++ b/updates/000001_create_countries.php @@ -0,0 +1,25 @@ +bigIncrements('id'); + $table->string('name')->index(); + $table->string('calling_code')->nullable(); + $table->string('code'); + $table->boolean('is_enabled')->default(false); + $table->boolean('is_pinned')->default(false); + }); + } + + public function down() + { + Schema::dropIfExists('rainlab_location_countries'); + } + +}; diff --git a/updates/000002_create_states.php b/updates/000002_create_states.php new file mode 100644 index 0000000..0ea2674 --- /dev/null +++ b/updates/000002_create_states.php @@ -0,0 +1,23 @@ +bigIncrements('id'); + $table->string('name')->index(); + $table->string('code'); + $table->boolean('is_enabled')->default(true); + $table->bigInteger('country_id')->unsigned()->nullable()->index(); + }); + } + + public function down() + { + Schema::dropIfExists('rainlab_location_states'); + } +}; diff --git a/updates/add_country_callingcode.php b/updates/add_country_callingcode.php deleted file mode 100644 index 2106bf9..0000000 --- a/updates/add_country_callingcode.php +++ /dev/null @@ -1,22 +0,0 @@ -string('calling_code')->nullable(); - }); - } - - public function down() - { - Schema::table('rainlab_location_countries', function (Blueprint $table) { - $table->dropColumn('calling_code'); - }); - } -} diff --git a/updates/add_country_pinned_flag.php b/updates/add_country_pinned_flag.php deleted file mode 100644 index 784989a..0000000 --- a/updates/add_country_pinned_flag.php +++ /dev/null @@ -1,25 +0,0 @@ -boolean('is_pinned')->default(false); - }); - - Country::whereIn('code', ['AU', 'CA', 'GB', 'US'])->update(['is_pinned' => 1]); - } - - public function down() - { - Schema::table('rainlab_location_countries', function(Blueprint $table) { - $table->dropColumn('is_pinned'); - }); - } -} diff --git a/updates/add_enabled_states.php b/updates/add_enabled_states.php deleted file mode 100644 index 4a6f141..0000000 --- a/updates/add_enabled_states.php +++ /dev/null @@ -1,23 +0,0 @@ -boolean('is_enabled')->after('country_id')->default(true); - }); - } - - public function down() - { - Schema::table('rainlab_location_states', function(Blueprint $table) { - $table->dropColumn('is_enabled'); - }); - } -} diff --git a/updates/create_countries_table.php b/updates/create_countries_table.php deleted file mode 100644 index 7be45e1..0000000 --- a/updates/create_countries_table.php +++ /dev/null @@ -1,36 +0,0 @@ -= 2017 - */ - if (Schema::hasTable('rainlab_user_countries')) { - Schema::rename('rainlab_user_countries', 'rainlab_location_countries'); - - return; - } - - Schema::create('rainlab_location_countries', function(Blueprint $table) { - $table->engine = 'InnoDB'; - $table->increments('id'); - $table->boolean('is_enabled')->default(false); - $table->string('name')->index(); - $table->string('code'); - }); - } - - public function down() - { - Schema::dropIfExists('rainlab_location_countries'); - } - -} diff --git a/updates/create_states_table.php b/updates/create_states_table.php deleted file mode 100644 index 1726908..0000000 --- a/updates/create_states_table.php +++ /dev/null @@ -1,34 +0,0 @@ -= 2017 - */ - if (Schema::hasTable('rainlab_user_states')) { - Schema::rename('rainlab_user_states', 'rainlab_location_states'); - return; - } - - Schema::create('rainlab_location_states', function(Blueprint $table) { - $table->engine = 'InnoDB'; - $table->increments('id'); - $table->integer('country_id')->unsigned()->nullable()->index(); - $table->string('name')->index(); - $table->string('code'); - }); - } - - public function down() - { - Schema::dropIfExists('rainlab_location_states'); - } -} diff --git a/updates/version.yaml b/updates/version.yaml index 5314c49..a6405f4 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -1,8 +1,8 @@ -v1.0.1: Initialize plugin. +v1.0.1: First version of Location v1.0.2: - - Create database tables. - - create_states_table.php - - create_countries_table.php + - Create database tables + - 000001_create_countries.php + - 000002_create_states.php v1.0.3: - Add seed data for countries and states. - seed_all_tables.php @@ -16,10 +16,9 @@ v1.0.3: - seed_pl_states.php - seed_dk_states.php - seed_ua_states.php + - seed_callingcodes.php v1.0.4: Satisfy the new Google API key requirement. -v1.0.5: - - Countries can now be pinned to make them appear at the top of the list. - - add_country_pinned_flag.php +v1.0.5: Countries can now be pinned to make them appear at the top of the list. v1.0.6: Added support for defining a default country and state. v1.0.7: Added basic geocoding method to the Country model. v1.0.8: Include Mexico states @@ -29,14 +28,9 @@ v1.1.2: Yet another change to the AddressFinder for changes to the FormField API v1.1.3: Include Argentina states v1.1.4: Added support for UK counties v1.1.5: Include Italian states (province) -v1.1.6: - - Added ability to disable specific states - - add_enabled_states.php +v1.1.6: Added ability to disable specific states v1.2.0: Fixes checkboxes in settings pages -v1.2.1: - - Add country calling codes - - add_country_callingcode.php - - seed_callingcodes.php +v1.2.1: Add country calling codes v1.2.2: Include Russian states v1.2.3: Improve support with October v3 v1.2.4: Adds reverseStreetNumber option to address finder From 4f9d43e6be51c3c45587b4446850acb96aaf4a46 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Thu, 8 Feb 2024 17:05:37 +1100 Subject: [PATCH 02/16] Adds LocationModel trait --- behaviors/LocationModel.php | 53 +++++++++------- composer.json | 4 +- traits/LocationModel.php | 119 ++++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+), 25 deletions(-) create mode 100644 traits/LocationModel.php diff --git a/behaviors/LocationModel.php b/behaviors/LocationModel.php index 13c30af..c2c44f9 100644 --- a/behaviors/LocationModel.php +++ b/behaviors/LocationModel.php @@ -5,15 +5,13 @@ use System\Classes\ModelBehavior; /** - * Location model extension - * - * Adds Country and State relations to a model + * LocationModel extension adds Country and State relations to a model * * Usage: * * In the model class definition: * - * public $implement = ['RainLab.Location.Behaviors.LocationModel']; + * public $implement = [\RainLab\Location\Behaviors\LocationModel::class]; * */ class LocationModel extends ModelBehavior @@ -25,35 +23,44 @@ public function __construct($model) { parent::__construct($model); - $guarded = $model->getGuarded(); + $model->addFillable([ + 'country', + 'country_id', + 'country_code', + 'state', + 'state_id', + 'state_code' + ]); - if (count($guarded) === 1 && $guarded[0] === '*') { - $model->addFillable([ - 'country', - 'country_id', - 'country_code', - 'state', - 'state_id', - 'state_code' - ]); - } + $model->belongsTo['country'] = [ + Country::class, + 'replicate' => false + ]; - $model->belongsTo['country'] = ['RainLab\Location\Models\Country']; - $model->belongsTo['state'] = ['RainLab\Location\Models\State']; + $model->belongsTo['state'] = [ + State::class, + 'replicate' => false + ]; } + /** + * getCountryOptions + */ public function getCountryOptions() { return Country::getNameList(); } + /** + * getStateOptions + */ public function getStateOptions() { return State::getNameList($this->model->country_id); } /** - * Sets the "country" relation with the code specified, model lookup used. + * setCountryCodeAttribute sets the "country" relation with the code specified, model lookup used. * @param string $code */ public function setCountryCodeAttribute($code) @@ -66,7 +73,7 @@ public function setCountryCodeAttribute($code) } /** - * Sets the "state" relation with the code specified, model lookup used. + * setStateCodeAttribute sets the "state" relation with the code specified, model lookup used. * @param string $code */ public function setStateCodeAttribute($code) @@ -79,7 +86,7 @@ public function setStateCodeAttribute($code) } /** - * Mutator for "country_code" attribute. + * getCountryCodeAttribute mutator for "country_code" attribute. * @return string */ public function getCountryCodeAttribute() @@ -88,7 +95,7 @@ public function getCountryCodeAttribute() } /** - * Mutator for "state_code" attribute. + * getStateCodeAttribute mutator for "state_code" attribute. * @return string */ public function getStateCodeAttribute() @@ -97,7 +104,7 @@ public function getStateCodeAttribute() } /** - * Ensure an integer value is set, otherwise nullable. + * setCountryIdAttribute ensures an integer value is set, otherwise nullable. */ public function setCountryIdAttribute($value) { @@ -105,7 +112,7 @@ public function setCountryIdAttribute($value) } /** - * Ensure an integer value is set, otherwise nullable. + * setStateIdAttribute ensures an integer value is set, otherwise nullable. */ public function setStateIdAttribute($value) { diff --git a/composer.json b/composer.json index 54c28a8..ca50c5f 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "Location plugin for October CMS", "homepage": "https://octobercms.com/plugin/rainlab-location", "keywords": ["october", "octobercms", "location"], - "license": "MIT", + "license": "proprietary", "authors": [ { "name": "Alexey Bobkov", @@ -18,7 +18,7 @@ } ], "require": { - "php": ">=5.5.9", + "php": "^8.0.2", "composer/installers": "~1.0" }, "minimum-stability": "dev" diff --git a/traits/LocationModel.php b/traits/LocationModel.php new file mode 100644 index 0000000..cb79ebe --- /dev/null +++ b/traits/LocationModel.php @@ -0,0 +1,119 @@ +addFillable([ + 'country', + 'country_id', + 'country_code', + 'state', + 'state_id', + 'state_code' + ]); + + $this->belongsTo['country'] = [ + Country::class, + 'replicate' => false + ]; + + $this->belongsTo['state'] = [ + State::class, + 'replicate' => false + ]; + } + + /** + * getCountryOptions + */ + public function getCountryOptions() + { + return Country::getNameList(); + } + + /** + * getStateOptions + */ + public function getStateOptions() + { + return State::getNameList($this->country_id); + } + + /** + * setCountryCodeAttribute as the "country" relation with the code specified, model lookup used. + */ + public function setCountryCodeAttribute(string $code) + { + if (!$country = Country::whereCode($code)->first()) { + return; + } + + $this->country = $country; + } + + /** + * setStateCodeAttribute as the "state" relation with the code specified, model lookup used. + */ + public function setStateCodeAttribute(string $code) + { + if (!$state = State::whereCode($code)->first()) { + return; + } + + $this->state = $state; + } + + /** + * getCountryCodeAttribute mutator for "country_code" attribute. + */ + public function getCountryCodeAttribute(): ?string + { + return $this->country ? $this->country->code : null; + } + + /** + * getStateCodeAttribute mutator for "state_code" attribute. + */ + public function getStateCodeAttribute(): ?string + { + return $this->state ? $this->state->code : null; + } + + /** + * setCountryIdAttribute ensures an integer value is set, otherwise nullable. + */ + public function setCountryIdAttribute($value) + { + $this->attributes['country_id'] = $value ?: null; + } + + /** + * setStateIdAttribute ensures an integer value is set, otherwise nullable. + */ + public function setStateIdAttribute($value) + { + $this->attributes['state_id'] = $value ?: null; + } +} From 8e9daa6c6788c7cbb62d96e61d7f0b0d86a8401e Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Fri, 9 Feb 2024 14:08:53 +1100 Subject: [PATCH 03/16] Refit lang --- lang/cs.json | 6 ++ lang/cs/lang.php | 116 ++++++++++++++++++------------------- lang/de.json | 6 ++ lang/de/lang.php | 132 ++++++++++++++++++++---------------------- lang/en.json | 6 ++ lang/en/lang.php | 136 +++++++++++++++++++++---------------------- lang/fa.json | 6 ++ lang/fa/lang.php | 132 ++++++++++++++++++++---------------------- lang/fr.json | 6 ++ lang/fr/lang.php | 138 +++++++++++++++++++++----------------------- lang/hu.json | 6 ++ lang/hu/lang.php | 132 ++++++++++++++++++++---------------------- lang/it.json | 6 ++ lang/it/lang.php | 132 ++++++++++++++++++++---------------------- lang/pt-br.json | 6 ++ lang/pt-br/lang.php | 132 ++++++++++++++++++++---------------------- lang/ru.json | 6 ++ lang/ru/lang.php | 132 ++++++++++++++++++++---------------------- lang/sk.json | 6 ++ lang/sk/lang.php | 131 ++++++++++++++++++++--------------------- lang/sl.json | 6 ++ lang/sl/lang.php | 132 ++++++++++++++++++++---------------------- lang/tr.json | 6 ++ lang/tr/lang.php | 132 ++++++++++++++++++++---------------------- lang/uk.json | 6 ++ lang/uk/lang.php | 136 +++++++++++++++++++++---------------------- lang/zh-cn.json | 6 ++ lang/zh-cn/lang.php | 132 ++++++++++++++++++++---------------------- lang/zh-tw.json | 6 ++ lang/zh-tw/lang.php | 130 ++++++++++++++++++++--------------------- 30 files changed, 1034 insertions(+), 1031 deletions(-) create mode 100644 lang/cs.json create mode 100644 lang/de.json create mode 100644 lang/en.json create mode 100644 lang/fa.json create mode 100644 lang/fr.json create mode 100644 lang/hu.json create mode 100644 lang/it.json create mode 100644 lang/pt-br.json create mode 100644 lang/ru.json create mode 100644 lang/sk.json create mode 100644 lang/sl.json create mode 100644 lang/tr.json create mode 100644 lang/uk.json create mode 100644 lang/zh-cn.json create mode 100644 lang/zh-tw.json diff --git a/lang/cs.json b/lang/cs.json new file mode 100644 index 0000000..9a80c2f --- /dev/null +++ b/lang/cs.json @@ -0,0 +1,6 @@ +{ + "Country": "Země", + "-- select country --": "-- zvolte zemi --", + "State": "Stát", + "-- select state --": "-- zvolte stát --" +} \ No newline at end of file diff --git a/lang/cs/lang.php b/lang/cs/lang.php index bdd496d..fe4e88e 100644 --- a/lang/cs/lang.php +++ b/lang/cs/lang.php @@ -1,62 +1,56 @@ - [ - 'name' => 'Lokace', - 'description' => 'Funkce pro upřesnění lokace, jako třeba Země, nebo Stát.', - ], - 'permissions' => [ - 'settings' => 'Správa lokací', - ], - 'location' => [ - 'label' => 'Lokality', - 'new' => 'Nová lokalita', - 'create_title' => 'Vytvoření lokality', - 'update_title' => 'Úprava lokality', - 'preview_title' => 'Náhled lokality' - ], - 'locations' => [ - 'menu_label' => 'Lokality', - 'menu_description' => 'Správa dostupných zemí a států.', - 'disabled_label' => 'Skrýt neaktivní země', - 'enabled_label' => 'Aktivní', - 'enabled_help' => 'Neaktivní lokality nejsou viditelné na front-endu.', - 'enable_or_disable_title' => 'Aktivace nebo zákaz lokality', - 'enable_or_disable' => 'Aktivovat nebo zakázat', - 'selected_amount' => 'Počet vybraných lokalit: :amount', - 'enable_success' => 'Vybrané lokality byly úspěšně aktivovány.', - 'disable_success' => 'Vybrané lokality byly úspěšně zakázány.', - 'disable_confirm' => 'Jste si jistí?', - 'list_title' => 'Správa lokalit', - 'delete_confirm' => 'Opravdu chcete smazat tuto lokalitu?', - 'return_to_list' => 'Zpět na seznam lokalit', - 'default_country' => 'Výchozí země', - 'default_country_comment' => 'Použije se pokud si uživatel nevybere zemi při registraci.', - 'default_state' => 'Výchozí stát', - 'default_state_comment' => 'Použije se pokud si uživatel nevybere stát při registraci.', - ], - 'settings' => [ - 'menu_label' => 'Nastavení lokalit', - 'menu_description' => 'Nastavení geolokace.', - 'google_maps_key' => 'Google Maps API klíč', - 'google_maps_key_comment' => 'Pokud chcete používat Google Mapy, zadejte zde váš API klíč.', - 'credentials_tab' => 'Údaje', - ], - 'state' => [ - 'label' => 'Stát', - 'name' => 'Jméno', - 'select' => '-- zvolte stát --', - 'name_comment' => 'Zadejte jméno státu.', - 'code' => 'Kód', - 'code_comment' => 'Zadejte unikátní kód státu, např. CZ' - ], - 'country' => [ - 'label' => 'Země', - 'name' => 'Jméno', - 'select' => '-- zvolte zemi --', - 'code' => 'Kód', - 'code_comment' => 'Zadejte unikátní kód země.', - 'enabled' => 'Aktivní', - 'pinned' => 'Preferovat', - ], + [ + 'name' => 'Lokace', + 'description' => 'Funkce pro upřesnění lokace, jako třeba Země, nebo Stát.', + ], + 'permissions' => [ + 'settings' => 'Správa lokací', + ], + 'location' => [ + 'label' => 'Lokality', + 'new' => 'Nová lokalita', + 'create_title' => 'Vytvoření lokality', + 'update_title' => 'Úprava lokality', + 'preview_title' => 'Náhled lokality', + ], + 'locations' => [ + 'menu_label' => 'Lokality', + 'menu_description' => 'Správa dostupných zemí a států.', + 'disabled_label' => 'Skrýt neaktivní země', + 'enabled_label' => 'Aktivní', + 'enabled_help' => 'Neaktivní lokality nejsou viditelné na front-endu.', + 'enable_or_disable_title' => 'Aktivace nebo zákaz lokality', + 'enable_or_disable' => 'Aktivovat nebo zakázat', + 'selected_amount' => 'Počet vybraných lokalit: :amount', + 'enable_success' => 'Vybrané lokality byly úspěšně aktivovány.', + 'disable_success' => 'Vybrané lokality byly úspěšně zakázány.', + 'disable_confirm' => 'Jste si jistí?', + 'list_title' => 'Správa lokalit', + 'delete_confirm' => 'Opravdu chcete smazat tuto lokalitu?', + 'return_to_list' => 'Zpět na seznam lokalit', + 'default_country' => 'Výchozí země', + 'default_country_comment' => 'Použije se pokud si uživatel nevybere zemi při registraci.', + 'default_state' => 'Výchozí stát', + 'default_state_comment' => 'Použije se pokud si uživatel nevybere stát při registraci.', + ], + 'settings' => [ + 'menu_label' => 'Nastavení lokalit', + 'menu_description' => 'Nastavení geolokace.', + 'google_maps_key' => 'Google Maps API klíč', + 'google_maps_key_comment' => 'Pokud chcete používat Google Mapy, zadejte zde váš API klíč.', + 'credentials_tab' => 'Údaje', + ], + 'state' => [ + 'name' => 'Jméno', + 'name_comment' => 'Zadejte jméno státu.', + 'code' => 'Kód', + 'code_comment' => 'Zadejte unikátní kód státu, např. CZ', + ], + 'country' => [ + 'name' => 'Jméno', + 'code' => 'Kód', + 'code_comment' => 'Zadejte unikátní kód země.', + 'enabled' => 'Aktivní', + 'pinned' => 'Preferovat', + ], ]; diff --git a/lang/de.json b/lang/de.json new file mode 100644 index 0000000..7b03c41 --- /dev/null +++ b/lang/de.json @@ -0,0 +1,6 @@ +{ + "Country": "Land", + "-- select country --": "-- Land auswählen --", + "State": "Staat", + "-- select state --": "-- Staat auswählen --" +} \ No newline at end of file diff --git a/lang/de/lang.php b/lang/de/lang.php index 95b10ff..207538e 100644 --- a/lang/de/lang.php +++ b/lang/de/lang.php @@ -1,70 +1,64 @@ - [ - 'name' => 'Location', - 'description' => 'Location basierte Features, z.B. Länder and Staaten.', - ], - 'permissions' => [ - 'settings' => 'Location Verwaltung', - ], - 'location' => [ - 'label' => 'Location', - 'new' => 'Neue Location', - 'create_title' => 'Location erstellen', - 'update_title' => 'Location bearbeiten', - 'preview_title' => 'Location Vorschau', - ], - 'locations' => [ - 'menu_label' => 'Länder & Staaten', - 'menu_description' => 'Verwalte für Nutzer verfügbare Länder and Staaten.', - 'disabled_label' => 'Deaktiviert', - 'enabled_label' => 'Aktiv', - 'enabled_help' => 'Deaktivierte Locations sind im Frontend nicht sichtbar.', - 'enable_or_disable_title' => 'Aktiviere oder deaktiviere Locations', - 'enable_or_disable' => 'Aktiviere oder Deaktiviere', - 'selected_amount' => 'Locations augewählt: :amount', - 'enable_success' => 'Locations wurden erfolgreich aktiviert.', - 'disable_success' => 'Locations wurden erfolgreich deaktiviert.', - 'disable_confirm' => 'Bist du sicher?', - 'unpin_label' => 'Nicht gepinnt', - 'pinned_label' => 'Gepinnt', - 'pinned_help' => 'Gepinnte locations erscheinen zuerst in der Liste.', - 'pin_or_unpin_title' => 'Pinne der Entpinne Locations', - 'pin_or_unpin' => 'Pinne oder Entpinne', - 'pin_success' => 'Locations wurden erfolgreich gepinnt.', - 'unpin_success' => 'Locations wurden erfolgreich entpinnt.', - 'unpin_confirm' => 'Bist du sicher?', - 'list_title' => 'Locations Verwalten', - 'delete_confirm' => 'Willst du diese Location wirklich löschen?', - 'return_to_list' => 'Zur Location Übersicht zurückkehren', - 'default_country' => 'Standard Land', - 'default_country_comment' => 'Dieses Land wird verwendet, wenn ein User keine Location explizit auswählt.', - 'default_state' => 'Standard Staat', - 'default_state_comment' => 'Dieser Staat wird verwendet, wenn ein User keine Location explizit auswählt.', - ], - 'settings' => [ - 'menu_label' => 'Location Einstellungen', - 'menu_description' => 'Location Einstellungen verwalten.', - 'google_maps_key' => 'Google Maps API Key', - 'google_maps_key_comment' => 'Wenn du den Google Maps Service verwenden willst, gib hier den API Key ein.', - 'credentials_tab' => 'Zugangsdaten', - ], - 'state' => [ - 'label' => 'Staat', - 'name' => 'Name', - 'select' => '-- Staat auswählen --', - 'name_comment' => 'Anzeigename für diesen Staat.', - 'code' => 'Code', - 'code_comment' => 'Eindeutiger Code für diesen Staat.', - ], - 'country' => [ - 'label' => 'Land', - 'name' => 'Name', - 'select' => '-- Land auswählen --', - 'code' => 'Code', - 'code_comment' => 'Eindeutiger Code für dieses Land.', - 'enabled' => 'Aktiv', - 'pinned' => 'Gepinnt', - ], + [ + 'name' => 'Location', + 'description' => 'Location basierte Features, z.B. Länder and Staaten.', + ], + 'permissions' => [ + 'settings' => 'Location Verwaltung', + ], + 'location' => [ + 'label' => 'Location', + 'new' => 'Neue Location', + 'create_title' => 'Location erstellen', + 'update_title' => 'Location bearbeiten', + 'preview_title' => 'Location Vorschau', + ], + 'locations' => [ + 'menu_label' => 'Länder & Staaten', + 'menu_description' => 'Verwalte für Nutzer verfügbare Länder and Staaten.', + 'disabled_label' => 'Deaktiviert', + 'enabled_label' => 'Aktiv', + 'enabled_help' => 'Deaktivierte Locations sind im Frontend nicht sichtbar.', + 'enable_or_disable_title' => 'Aktiviere oder deaktiviere Locations', + 'enable_or_disable' => 'Aktiviere oder Deaktiviere', + 'selected_amount' => 'Locations augewählt: :amount', + 'enable_success' => 'Locations wurden erfolgreich aktiviert.', + 'disable_success' => 'Locations wurden erfolgreich deaktiviert.', + 'disable_confirm' => 'Bist du sicher?', + 'unpin_label' => 'Nicht gepinnt', + 'pinned_label' => 'Gepinnt', + 'pinned_help' => 'Gepinnte locations erscheinen zuerst in der Liste.', + 'pin_or_unpin_title' => 'Pinne der Entpinne Locations', + 'pin_or_unpin' => 'Pinne oder Entpinne', + 'pin_success' => 'Locations wurden erfolgreich gepinnt.', + 'unpin_success' => 'Locations wurden erfolgreich entpinnt.', + 'unpin_confirm' => 'Bist du sicher?', + 'list_title' => 'Locations Verwalten', + 'delete_confirm' => 'Willst du diese Location wirklich löschen?', + 'return_to_list' => 'Zur Location Übersicht zurückkehren', + 'default_country' => 'Standard Land', + 'default_country_comment' => 'Dieses Land wird verwendet, wenn ein User keine Location explizit auswählt.', + 'default_state' => 'Standard Staat', + 'default_state_comment' => 'Dieser Staat wird verwendet, wenn ein User keine Location explizit auswählt.', + ], + 'settings' => [ + 'menu_label' => 'Location Einstellungen', + 'menu_description' => 'Location Einstellungen verwalten.', + 'google_maps_key' => 'Google Maps API Key', + 'google_maps_key_comment' => 'Wenn du den Google Maps Service verwenden willst, gib hier den API Key ein.', + 'credentials_tab' => 'Zugangsdaten', + ], + 'state' => [ + 'name' => 'Name', + 'name_comment' => 'Anzeigename für diesen Staat.', + 'code' => 'Code', + 'code_comment' => 'Eindeutiger Code für diesen Staat.', + ], + 'country' => [ + 'name' => 'Name', + 'code' => 'Code', + 'code_comment' => 'Eindeutiger Code für dieses Land.', + 'enabled' => 'Aktiv', + 'pinned' => 'Gepinnt', + ], ]; diff --git a/lang/en.json b/lang/en.json new file mode 100644 index 0000000..dc17470 --- /dev/null +++ b/lang/en.json @@ -0,0 +1,6 @@ +{ + "Country": "Country", + "-- select country --": "-- select country --", + "State": "State", + "-- select state --": "-- select state --" +} \ No newline at end of file diff --git a/lang/en/lang.php b/lang/en/lang.php index ef8052d..aba8bbf 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -1,72 +1,66 @@ - [ - 'name' => 'Location', - 'description' => 'Location based features, such as Country and State.', - ], - 'permissions' => [ - 'settings' => 'Locations management', - ], - 'location' => [ - 'label' => 'Location', - 'new' => 'New Location', - 'create_title' => 'Create Location', - 'update_title' => 'Edit Location', - 'preview_title' => 'Preview Location', - ], - 'locations' => [ - 'menu_label' => 'Countries & States', - 'menu_description' => 'Manage available user countries and states.', - 'disabled_label' => 'Disabled', - 'enabled_label' => 'Enabled', - 'enabled_help' => 'Disabled locations are not visible on the front-end.', - 'enable_or_disable_title' => "Enable or Disable Locations", - 'enable_or_disable' => 'Enable or Disable', - 'selected_amount' => 'Locations selected: :amount', - 'enable_success' => 'Successfully enabled those locations.', - 'disable_success' => 'Successfully disabled those locations.', - 'disable_confirm' => 'Are you sure?', - 'unpin_label' => 'Unpinned', - 'pinned_label' => 'Pinned', - 'pinned_help' => 'Pinned locations are sorted first in the list.', - 'pin_or_unpin_title' => "Pin or Unpin Locations", - 'pin_or_unpin' => 'Pin or Unpin', - 'pin_success' => 'Successfully pinned selected locations.', - 'unpin_success' => 'Successfully unpinned selected locations.', - 'unpin_confirm' => 'Are you sure?', - 'list_title' => 'Manage Locations', - 'delete_confirm' => 'Do you really want to delete this location?', - 'return_to_list' => 'Return to locations list', - 'default_country' => 'Default Country', - 'default_country_comment' => 'When a user does not specify their location, select a default country to use.', - 'default_state' => 'Default State', - 'default_state_comment' => 'When a user does not specify their location, select a default state to use.', - ], - 'settings' => [ - 'menu_label' => 'Location Settings', - 'menu_description' => 'Manage location based settings.', - 'google_maps_key' => 'Google Maps API Key', - 'google_maps_key_comment' => 'If you plan on using Google Maps services, enter the API key for it here.', - 'credentials_tab' => 'Credentials', - ], - 'state' => [ - 'label' => 'State', - 'name' => 'Name', - 'select' => '-- select state --', - 'name_comment' => 'Enter the display name for this state.', - 'code' => 'Code', - 'code_comment' => 'Enter a unique code to identify this state.', - ], - 'country' => [ - 'label' => 'Country', - 'name' => 'Name', - 'select' => '-- select country --', - 'code' => 'Code', - 'code_comment' => 'Enter a unique code to identify this country.', - 'enabled' => 'Enabled', - 'pinned' => 'Pinned', - 'calling_code' => 'Calling Code', - 'calling_code_comment' => 'Numerical country calling code without the plus sign.', - ], + [ + 'name' => 'Location', + 'description' => 'Location based features, such as Country and State.', + ], + 'permissions' => [ + 'settings' => 'Locations management', + ], + 'location' => [ + 'label' => 'Location', + 'new' => 'New Location', + 'create_title' => 'Create Location', + 'update_title' => 'Edit Location', + 'preview_title' => 'Preview Location', + ], + 'locations' => [ + 'menu_label' => 'Countries & States', + 'menu_description' => 'Manage available user countries and states.', + 'disabled_label' => 'Disabled', + 'enabled_label' => 'Enabled', + 'enabled_help' => 'Disabled locations are not visible on the front-end.', + 'enable_or_disable_title' => 'Enable or Disable Locations', + 'enable_or_disable' => 'Enable or Disable', + 'selected_amount' => 'Locations selected: :amount', + 'enable_success' => 'Successfully enabled those locations.', + 'disable_success' => 'Successfully disabled those locations.', + 'disable_confirm' => 'Are you sure?', + 'unpin_label' => 'Unpinned', + 'pinned_label' => 'Pinned', + 'pinned_help' => 'Pinned locations are sorted first in the list.', + 'pin_or_unpin_title' => 'Pin or Unpin Locations', + 'pin_or_unpin' => 'Pin or Unpin', + 'pin_success' => 'Successfully pinned selected locations.', + 'unpin_success' => 'Successfully unpinned selected locations.', + 'unpin_confirm' => 'Are you sure?', + 'list_title' => 'Manage Locations', + 'delete_confirm' => 'Do you really want to delete this location?', + 'return_to_list' => 'Return to locations list', + 'default_country' => 'Default Country', + 'default_country_comment' => 'When a user does not specify their location, select a default country to use.', + 'default_state' => 'Default State', + 'default_state_comment' => 'When a user does not specify their location, select a default state to use.', + ], + 'settings' => [ + 'menu_label' => 'Location Settings', + 'menu_description' => 'Manage location based settings.', + 'google_maps_key' => 'Google Maps API Key', + 'google_maps_key_comment' => 'If you plan on using Google Maps services, enter the API key for it here.', + 'credentials_tab' => 'Credentials', + ], + 'state' => [ + 'name' => 'Name', + 'name_comment' => 'Enter the display name for this state.', + 'code' => 'Code', + 'code_comment' => 'Enter a unique code to identify this state.', + ], + 'country' => [ + 'name' => 'Name', + 'code' => 'Code', + 'code_comment' => 'Enter a unique code to identify this country.', + 'enabled' => 'Enabled', + 'pinned' => 'Pinned', + 'calling_code' => 'Calling Code', + 'calling_code_comment' => 'Numerical country calling code without the plus sign.', + ], ]; diff --git a/lang/fa.json b/lang/fa.json new file mode 100644 index 0000000..8cef3cc --- /dev/null +++ b/lang/fa.json @@ -0,0 +1,6 @@ +{ + "Country": "کشور", + "-- select country --": "-- انتخاب کشور --", + "State": "استان", + "-- select state --": "-- انتخاب استان --" +} \ No newline at end of file diff --git a/lang/fa/lang.php b/lang/fa/lang.php index 354ac3a..b63bdce 100644 --- a/lang/fa/lang.php +++ b/lang/fa/lang.php @@ -1,70 +1,64 @@ - [ - 'name' => 'موقعیت', - 'description' => 'امکانات بر پایه موقعیت مانند کشور و استان' - ], - 'permissions' => [ - 'settings' => 'مدیریت موقعیت ها', - ], - 'location' => [ - 'location' => 'موقعیت', - 'new' => 'موقعیت جدید', - 'create_title' => 'افزودن موقعیت', - 'update_title' => 'ویرایش موقعیت', - 'preview_title' => 'پیش نمایش موقعیت', - ], - 'locations' => [ - 'menu_label' => 'شهرها و استان ها', - 'menu_description' => 'مدیریت کشور ها و استانهای موجود برای کاربران.', - 'disabled_label' => 'غیر فعال', - 'enabled_label' => "فعال", - 'enabled_help' => "موقعیت های غیر فعال شده در محیط کاربری نماسش داده نمی شوند.", - 'enable_or_disable_title' => "فعال و یا غیر فعال سازی موقعیت ها", - 'enable_or_disable' => 'فعال و یا غیر فعال سازی', - 'selected_amount' => ':amount موقعیت انتخاب شده است', - 'enable_success' => "موقعیت ها با موفقیت فعال شدند.", - 'disable_success' => "موقعیت ها با موفقیت غیر فعال شدن.", - 'disable_confirm' => 'آیا اطمینان دارید؟', - 'list_title' => 'مدیریت موقعیت ها', - 'delete_confirm' => 'آیا از حذف این موقعیت اطمینان دارید؟', - 'unpin_label' => 'سنجاق نشده', - 'pinned_label' => 'سنجاق شده', - 'pinned_help' => 'موقعیت های سنجاق شده در ابتدای لیست نمایش داده می شوند.', - 'pin_or_unpin_title' => 'سنجاق کردن یا نکردن موقعیت ها', - 'pin_or_unpin' => 'سنجاق کردن یا نکردن', - 'pin_success' => 'موقعیت های انتخاب شده سنجاق شدند.', - 'unpin_success' => 'موقعیت های انتخاب شده از حالت سنجاق شده خارج شدند.', - 'unpin_confirm' => 'آیا اطمینان دارید؟', - 'return_to_list' => 'بازگشت به لیست موقعیت ها', - 'default_country' => 'کشور پیشفرض', - 'default_country_comment' => 'هنگامی که کاربر موقعیت خود را مشخص نکند کشور پیش فرض ایتفاده خواهد شد.', - 'default_state' => 'استان پیش فرض', - 'default_state_comment' => 'هنگامی که کاربر موقعیت خود را مشخص نکند استان پیشفرض انتخاب خواهد شد.', - ], - 'settings' => [ - 'menu_label' => 'تنظیمات موقعیت ها', - 'menu_description' => 'مدیریت تنظیمات مبتنی بر موقعیت', - 'google_maps_key' => 'کلید API نقشه Google', - 'google_maps_key_comment' => 'اگر قصد استفاده از سرویس نقشه گوگل را دارید کلید API آن را در این قسمت وارد نمایید.', - 'credentials_tab' => 'مجوز ها', - ], - 'state' => [ - 'label' => 'استان', - 'name' => 'نام', - 'select' => '-- انتخاب استان --', - 'name_comment' => 'نام استان را جهت نمایش وارد نمایید.', - 'code' => 'کد', - 'code_comment' => 'کد یکتایی جهت دسترسی به این استان وارد نمایید.', - ], - 'country' => [ - 'label' => 'کشور', - 'name' => 'نام', - 'select' => '-- انتخاب کشور --', - 'code' => 'کد', - 'code_comment' => 'کد یکتایی را جهت دسترسی به این کشور را وارد نمایید.', - 'enabled' => 'فعال', - 'pinned' => 'سنجاق شده', - ] + [ + 'name' => 'موقعیت', + 'description' => 'امکانات بر پایه موقعیت مانند کشور و استان', + ], + 'permissions' => [ + 'settings' => 'مدیریت موقعیت ها', + ], + 'location' => [ + 'location' => 'موقعیت', + 'new' => 'موقعیت جدید', + 'create_title' => 'افزودن موقعیت', + 'update_title' => 'ویرایش موقعیت', + 'preview_title' => 'پیش نمایش موقعیت', + ], + 'locations' => [ + 'menu_label' => 'شهرها و استان ها', + 'menu_description' => 'مدیریت کشور ها و استانهای موجود برای کاربران.', + 'disabled_label' => 'غیر فعال', + 'enabled_label' => 'فعال', + 'enabled_help' => 'موقعیت های غیر فعال شده در محیط کاربری نماسش داده نمی شوند.', + 'enable_or_disable_title' => 'فعال و یا غیر فعال سازی موقعیت ها', + 'enable_or_disable' => 'فعال و یا غیر فعال سازی', + 'selected_amount' => ':amount موقعیت انتخاب شده است', + 'enable_success' => 'موقعیت ها با موفقیت فعال شدند.', + 'disable_success' => 'موقعیت ها با موفقیت غیر فعال شدن.', + 'disable_confirm' => 'آیا اطمینان دارید؟', + 'list_title' => 'مدیریت موقعیت ها', + 'delete_confirm' => 'آیا از حذف این موقعیت اطمینان دارید؟', + 'unpin_label' => 'سنجاق نشده', + 'pinned_label' => 'سنجاق شده', + 'pinned_help' => 'موقعیت های سنجاق شده در ابتدای لیست نمایش داده می شوند.', + 'pin_or_unpin_title' => 'سنجاق کردن یا نکردن موقعیت ها', + 'pin_or_unpin' => 'سنجاق کردن یا نکردن', + 'pin_success' => 'موقعیت های انتخاب شده سنجاق شدند.', + 'unpin_success' => 'موقعیت های انتخاب شده از حالت سنجاق شده خارج شدند.', + 'unpin_confirm' => 'آیا اطمینان دارید؟', + 'return_to_list' => 'بازگشت به لیست موقعیت ها', + 'default_country' => 'کشور پیشفرض', + 'default_country_comment' => 'هنگامی که کاربر موقعیت خود را مشخص نکند کشور پیش فرض ایتفاده خواهد شد.', + 'default_state' => 'استان پیش فرض', + 'default_state_comment' => 'هنگامی که کاربر موقعیت خود را مشخص نکند استان پیشفرض انتخاب خواهد شد.', + ], + 'settings' => [ + 'menu_label' => 'تنظیمات موقعیت ها', + 'menu_description' => 'مدیریت تنظیمات مبتنی بر موقعیت', + 'google_maps_key' => 'کلید API نقشه Google', + 'google_maps_key_comment' => 'اگر قصد استفاده از سرویس نقشه گوگل را دارید کلید API آن را در این قسمت وارد نمایید.', + 'credentials_tab' => 'مجوز ها', + ], + 'state' => [ + 'name' => 'نام', + 'name_comment' => 'نام استان را جهت نمایش وارد نمایید.', + 'code' => 'کد', + 'code_comment' => 'کد یکتایی جهت دسترسی به این استان وارد نمایید.', + ], + 'country' => [ + 'name' => 'نام', + 'code' => 'کد', + 'code_comment' => 'کد یکتایی را جهت دسترسی به این کشور را وارد نمایید.', + 'enabled' => 'فعال', + 'pinned' => 'سنجاق شده', + ], ]; diff --git a/lang/fr.json b/lang/fr.json new file mode 100644 index 0000000..176d4de --- /dev/null +++ b/lang/fr.json @@ -0,0 +1,6 @@ +{ + "Country": "Pays", + "-- select country --": "-- Choisissez le pays --", + "State": "Région", + "-- select state --": "-- Choisissez une région --" +} \ No newline at end of file diff --git a/lang/fr/lang.php b/lang/fr/lang.php index 3675043..a372e50 100644 --- a/lang/fr/lang.php +++ b/lang/fr/lang.php @@ -1,72 +1,66 @@ - [ - 'name' => 'Localisation géographique', - 'description' => 'Fonctionnalités de localisation géographique, comme les pays et les régions.', - ], - 'permissions' => [ - 'settings' => 'Gestion des pays', - ], - 'location' => [ - 'label' => 'Pays', - 'new' => 'Nouveau pays', - 'create_title' => 'Créer un pays', - 'update_title' => 'Modifier un pays', - 'preview_title' => 'Consulter un pays', - ], - 'locations' => [ - 'menu_label' => 'Pays', - 'menu_description' => 'Gestion des pays et régions disponibles pour les utilisateurs.', - 'disabled_label' => 'Pays désactivés', - 'enabled_label' => 'Activé', - 'enabled_help' => 'Désactiver les pays pour les rendre invisibles sur le Front-end.', - 'enable_or_disable_title' => 'Activer ou Désactiver les pays', - 'enable_or_disable' => 'Activer ou Désactiver', - 'selected_amount' => 'Pays sélectionné(s) : :amount', - 'enable_success' => 'Ces pays ont été activés.', - 'disable_success' => 'Ces pays ont été désactivés.', - 'disable_confirm' => 'Confirmez-vous cette opération ?', - 'unpin_label' => 'Désépingler', - 'pinned_label' => 'Epinglé', - 'pinned_help' => 'Les pays épinglés sont affichés en premier dans la liste.', - 'pin_or_unpin_title' => "Epingler/Désépingler les pays", - 'pin_or_unpin' => 'Epingler/Désépingler', - 'pin_success' => 'Les pays sélectionnés ont été correctement épinglés', - 'unpin_success' => 'Les pays sélectionnés ont été correctement désépinglés', - 'unpin_confirm' => 'Etes vous sûrs ?', - 'list_title' => 'Gérer les pays', - 'delete_confirm' => 'Confirmez-vous la suppression de ce pays ?', - 'return_to_list' => 'Retour à la liste des pays', - 'default_country' => 'Pays par défaut', - 'default_country_comment' => 'Si un utilisateur n\'indique pas son pays, ce pays sera choisi par défaut.', - 'default_state' => 'Région par défaut', - 'default_state_comment' => 'Si un utilisateur n\'indique pas sa région, cette région sera choisie par défaut.', - ], - 'settings' => [ - 'menu_label' => 'Paramètres de localisation géographique', - 'menu_description' => 'Gérer les paramètres liés aux lieux.', - 'google_maps_key' => 'Clé API Google Maps', - 'google_maps_key_comment' => 'Si vous utilisez les services Google Maps, entrez votre clé API ici.', - 'credentials_tab' => 'Authentification', - ], - 'state' => [ - 'label' => 'Région', - 'name' => 'Nom', - 'select' => '-- Choisissez une région --', - 'name_comment' => 'Entrez le nom de cette région.', - 'code' => 'Code', - 'code_comment' => 'Entrez un code unique pour identifier cette région.', - ], - 'country' => [ - 'label' => 'Pays', - 'name' => 'Nom', - 'select' => '-- Choisissez le pays --', - 'code' => 'Code', - 'code_comment' => 'Entrez un code unique pour identifier ce pays.', - 'enabled' => 'Activé', - 'pinned' => 'Épinglé', - 'calling_code' => 'Indicatif téléphonique', - 'calling_code_comment' => 'Indicatif téléphonique du pays sans le signe plus.', - ], -]; \ No newline at end of file + [ + 'name' => 'Localisation géographique', + 'description' => 'Fonctionnalités de localisation géographique, comme les pays et les régions.', + ], + 'permissions' => [ + 'settings' => 'Gestion des pays', + ], + 'location' => [ + 'label' => 'Pays', + 'new' => 'Nouveau pays', + 'create_title' => 'Créer un pays', + 'update_title' => 'Modifier un pays', + 'preview_title' => 'Consulter un pays', + ], + 'locations' => [ + 'menu_label' => 'Pays', + 'menu_description' => 'Gestion des pays et régions disponibles pour les utilisateurs.', + 'disabled_label' => 'Pays désactivés', + 'enabled_label' => 'Activé', + 'enabled_help' => 'Désactiver les pays pour les rendre invisibles sur le Front-end.', + 'enable_or_disable_title' => 'Activer ou Désactiver les pays', + 'enable_or_disable' => 'Activer ou Désactiver', + 'selected_amount' => 'Pays sélectionné(s) : :amount', + 'enable_success' => 'Ces pays ont été activés.', + 'disable_success' => 'Ces pays ont été désactivés.', + 'disable_confirm' => 'Confirmez-vous cette opération ?', + 'unpin_label' => 'Désépingler', + 'pinned_label' => 'Epinglé', + 'pinned_help' => 'Les pays épinglés sont affichés en premier dans la liste.', + 'pin_or_unpin_title' => 'Epingler/Désépingler les pays', + 'pin_or_unpin' => 'Epingler/Désépingler', + 'pin_success' => 'Les pays sélectionnés ont été correctement épinglés', + 'unpin_success' => 'Les pays sélectionnés ont été correctement désépinglés', + 'unpin_confirm' => 'Etes vous sûrs ?', + 'list_title' => 'Gérer les pays', + 'delete_confirm' => 'Confirmez-vous la suppression de ce pays ?', + 'return_to_list' => 'Retour à la liste des pays', + 'default_country' => 'Pays par défaut', + 'default_country_comment' => 'Si un utilisateur n\'indique pas son pays, ce pays sera choisi par défaut.', + 'default_state' => 'Région par défaut', + 'default_state_comment' => 'Si un utilisateur n\'indique pas sa région, cette région sera choisie par défaut.', + ], + 'settings' => [ + 'menu_label' => 'Paramètres de localisation géographique', + 'menu_description' => 'Gérer les paramètres liés aux lieux.', + 'google_maps_key' => 'Clé API Google Maps', + 'google_maps_key_comment' => 'Si vous utilisez les services Google Maps, entrez votre clé API ici.', + 'credentials_tab' => 'Authentification', + ], + 'state' => [ + 'name' => 'Nom', + 'name_comment' => 'Entrez le nom de cette région.', + 'code' => 'Code', + 'code_comment' => 'Entrez un code unique pour identifier cette région.', + ], + 'country' => [ + 'name' => 'Nom', + 'code' => 'Code', + 'code_comment' => 'Entrez un code unique pour identifier ce pays.', + 'enabled' => 'Activé', + 'pinned' => 'Épinglé', + 'calling_code' => 'Indicatif téléphonique', + 'calling_code_comment' => 'Indicatif téléphonique du pays sans le signe plus.', + ], +]; diff --git a/lang/hu.json b/lang/hu.json new file mode 100644 index 0000000..de9f0e2 --- /dev/null +++ b/lang/hu.json @@ -0,0 +1,6 @@ +{ + "Country": "Országok", + "-- select country --": "-- válasszon országot --", + "State": "Állam / megye", + "-- select state --": "-- válasszon államot / megyét --" +} \ No newline at end of file diff --git a/lang/hu/lang.php b/lang/hu/lang.php index a75f05c..4af7ad0 100644 --- a/lang/hu/lang.php +++ b/lang/hu/lang.php @@ -1,70 +1,64 @@ - [ - 'name' => 'Helyek', - 'description' => 'Tartózkodási helyek, úgy mint országok és megyék.' - ], - 'permissions' => [ - 'settings' => 'Helyek menedzselése' - ], - 'location' => [ - 'label' => 'Tartózkodási hely', - 'new' => 'Új tartózkodási hely', - 'create_title' => 'Tartózkodási hely létrehozása', - 'update_title' => 'Tartózkodási hely szerkesztése', - 'preview_title' => 'Tartózkodási hely villámnézete' - ], - 'locations' => [ - 'menu_label' => 'Tartózkodások', - 'menu_description' => 'Elérhető országok és megyék kiválasztása.', - 'disabled_label' => 'Letiltottak elrejtése', - 'enabled_label' => 'Engedélyezve', - 'enabled_help' => 'A letiltott tartózkodási helyek nem láthatók a felhasználói oldalon.', - 'enable_or_disable_title' => 'Tartózkodási helyek engedélyezése vagy letiltása', - 'enable_or_disable' => 'Engedélyezés vagy letiltás', - 'selected_amount' => 'Kiválasztott tartózkodási helyek: :amount', - 'enable_success' => 'A tartózkodási helyek engedélyezése sikerült.', - 'disable_success' => 'A tartózkodási helyek letiltása sikerült.', - 'disable_confirm' => 'Biztos benne?', - 'unpin_label' => 'Feloldás', - 'pinned_label' => 'Rögzítve', - 'pinned_help' => 'A rögzített helyek elől fognak szerepelni a listában.', - 'pin_or_unpin_title' => 'Rögzített vagy feloldott helyek', - 'pin_or_unpin' => 'Rögzítés vagy feloldás', - 'pin_success' => 'A helyek sikeresen rögzítve lettek.', - 'unpin_success' => 'A helyek sikeresen fel lettek oldva.', - 'unpin_confirm' => 'Biztos benne?', - 'list_title' => 'Tartózkodási helyek kezelése', - 'delete_confirm' => 'Valóban törölni akarja ezt a tartózkodási helyet?', - 'return_to_list' => 'Vissza a tartózkodási helyekhez', - 'default_country' => 'Alapértelmezett ország', - 'default_country_comment' => 'Ha egy felhasználó nem adja meg a tartózkodási helyét, akkor válasszon egy országot.', - 'default_state' => 'Alapértelmezett állam / megye', - 'default_state_comment' => 'Ha egy felhasználó nem adja meg a tartózkodási helyét, akkor válasszon egy államot / megyét.' - ], - 'settings' => [ - 'menu_label' => 'Beállítások', - 'menu_description' => 'Alapértelmezett lehetőségek és hitelesítés megadása.', - 'google_maps_key' => 'Google Térkép API kulcs', - 'google_maps_key_comment' => 'Ha a Google Térkép szolgáltatásait kívánja használni, írja be ide az API kulcsot.', - 'credentials_tab' => 'Hitelesítés' - ], - 'state' => [ - 'label' => 'Állam / megye', - 'name' => 'Név', - 'select' => '-- válasszon államot / megyét --', - 'name_comment' => 'Írja be az államnak / megyének a megjelenítendő nevét.', - 'code' => 'Kód', - 'code_comment' => 'Írja be az államot / megyét azonosító egyedi kódot.' - ], - 'country' => [ - 'label' => 'Országok', - 'name' => 'Név', - 'select' => '-- válasszon országot --', - 'code' => 'Kód', - 'code_comment' => 'Írja be az országot azonosító egyedi kódot.', - 'enabled' => 'Engedélyezve', - 'pinned' => 'Rögzítve' - ] + [ + 'name' => 'Helyek', + 'description' => 'Tartózkodási helyek, úgy mint országok és megyék.', + ], + 'permissions' => [ + 'settings' => 'Helyek menedzselése', + ], + 'location' => [ + 'label' => 'Tartózkodási hely', + 'new' => 'Új tartózkodási hely', + 'create_title' => 'Tartózkodási hely létrehozása', + 'update_title' => 'Tartózkodási hely szerkesztése', + 'preview_title' => 'Tartózkodási hely villámnézete', + ], + 'locations' => [ + 'menu_label' => 'Tartózkodások', + 'menu_description' => 'Elérhető országok és megyék kiválasztása.', + 'disabled_label' => 'Letiltottak elrejtése', + 'enabled_label' => 'Engedélyezve', + 'enabled_help' => 'A letiltott tartózkodási helyek nem láthatók a felhasználói oldalon.', + 'enable_or_disable_title' => 'Tartózkodási helyek engedélyezése vagy letiltása', + 'enable_or_disable' => 'Engedélyezés vagy letiltás', + 'selected_amount' => 'Kiválasztott tartózkodási helyek: :amount', + 'enable_success' => 'A tartózkodási helyek engedélyezése sikerült.', + 'disable_success' => 'A tartózkodási helyek letiltása sikerült.', + 'disable_confirm' => 'Biztos benne?', + 'unpin_label' => 'Feloldás', + 'pinned_label' => 'Rögzítve', + 'pinned_help' => 'A rögzített helyek elől fognak szerepelni a listában.', + 'pin_or_unpin_title' => 'Rögzített vagy feloldott helyek', + 'pin_or_unpin' => 'Rögzítés vagy feloldás', + 'pin_success' => 'A helyek sikeresen rögzítve lettek.', + 'unpin_success' => 'A helyek sikeresen fel lettek oldva.', + 'unpin_confirm' => 'Biztos benne?', + 'list_title' => 'Tartózkodási helyek kezelése', + 'delete_confirm' => 'Valóban törölni akarja ezt a tartózkodási helyet?', + 'return_to_list' => 'Vissza a tartózkodási helyekhez', + 'default_country' => 'Alapértelmezett ország', + 'default_country_comment' => 'Ha egy felhasználó nem adja meg a tartózkodási helyét, akkor válasszon egy országot.', + 'default_state' => 'Alapértelmezett állam / megye', + 'default_state_comment' => 'Ha egy felhasználó nem adja meg a tartózkodási helyét, akkor válasszon egy államot / megyét.', + ], + 'settings' => [ + 'menu_label' => 'Beállítások', + 'menu_description' => 'Alapértelmezett lehetőségek és hitelesítés megadása.', + 'google_maps_key' => 'Google Térkép API kulcs', + 'google_maps_key_comment' => 'Ha a Google Térkép szolgáltatásait kívánja használni, írja be ide az API kulcsot.', + 'credentials_tab' => 'Hitelesítés', + ], + 'state' => [ + 'name' => 'Név', + 'name_comment' => 'Írja be az államnak / megyének a megjelenítendő nevét.', + 'code' => 'Kód', + 'code_comment' => 'Írja be az államot / megyét azonosító egyedi kódot.', + ], + 'country' => [ + 'name' => 'Név', + 'code' => 'Kód', + 'code_comment' => 'Írja be az országot azonosító egyedi kódot.', + 'enabled' => 'Engedélyezve', + 'pinned' => 'Rögzítve', + ], ]; diff --git a/lang/it.json b/lang/it.json new file mode 100644 index 0000000..f66a4c2 --- /dev/null +++ b/lang/it.json @@ -0,0 +1,6 @@ +{ + "Country": "Paese", + "-- select country --": "-- seleziona Paese --", + "State": "Stato", + "-- select state --": "-- seleziona Stato --" +} \ No newline at end of file diff --git a/lang/it/lang.php b/lang/it/lang.php index c4e53ac..6146ad8 100644 --- a/lang/it/lang.php +++ b/lang/it/lang.php @@ -1,70 +1,64 @@ - [ - 'name' => 'Località', - 'description' => 'Feature basate sulla località, come Paese e Stati.', - ], - 'permissions' => [ - 'settings' => 'Locations management', - ], - 'location' => [ - 'label' => 'Località', - 'new' => 'Nuova Località', - 'create_title' => 'Crea Località', - 'update_title' => 'Modifica Località', - 'preview_title' => 'Anteprima Località', - ], - 'locations' => [ - 'menu_label' => 'Paesi & Stati', - 'menu_description' => 'Gestisci paesi e stati disponibili per l\'utente.', - 'disabled_label' => 'Disabilitato', - 'enabled_label' => 'Abilitato', - 'enabled_help' => 'Le località disabilitate non saranno visibili nel front-end.', - 'enable_or_disable_title' => "Abilita o Disabilita Località", - 'enable_or_disable' => 'Abilita o Disabilita', - 'selected_amount' => 'Località selezionata: :amount', - 'enable_success' => 'Località abilitate correttamente.', - 'disable_success' => 'Località disabilitate correttamente.', - 'disable_confirm' => 'Sei sicuro?', - 'unpin_label' => 'Unpinned', - 'pinned_label' => 'Pinned', - 'pinned_help' => 'Località di tipo "Pinned" sono mostrate prime nella lista.', - 'pin_or_unpin_title' => "Pin o Unpin Località", - 'pin_or_unpin' => 'Pin o unpin', - 'pin_success' => 'Pin a località selezionata effettuato correttamente.', - 'unpin_success' => 'Unpin a località selezionata effettuato correttamente.', - 'unpin_confirm' => 'Sei sicuro?', - 'list_title' => 'Gestisci Località', - 'delete_confirm' => 'Sei sicuro di voler eliminare questa località?', - 'return_to_list' => 'Torna a lista località', - 'default_country' => 'Paese Default', - 'default_country_comment' => 'Quando un utente non specifica la sua località, seleziona un paese di default da usare.', - 'default_state' => 'Stato Default', - 'default_state_comment' => 'Quando un utente non specifica lo Stato, seleziona uno Stato di default da usare.', - ], - 'settings' => [ - 'menu_label' => 'Impostazioni Località', - 'menu_description' => 'Gestisci impostazioni basate sulla località.', - 'google_maps_key' => 'Google Maps API Key', - 'google_maps_key_comment' => 'Se hai intenzione di utilizzare i servizi di Google Maps, insierisci qui le API key.', - 'credentials_tab' => 'Credenziali', - ], - 'state' => [ - 'label' => 'Stato', - 'name' => 'Nome', - 'select' => '-- seleziona Stato --', - 'name_comment' => 'Inserisci il nome visualizzato per questo Stato.', - 'code' => 'Codice', - 'code_comment' => 'Inserisci un codice univoco per identificare questo Stato.', - ], - 'country' => [ - 'label' => 'Paese', - 'name' => 'Nome', - 'select' => '-- seleziona Paese --', - 'code' => 'Codice', - 'code_comment' => 'Inserisci un codice univoco per identificare questo Paese.', - 'enabled' => 'Abilitato', - 'pinned' => 'Pinned', - ], + [ + 'name' => 'Località', + 'description' => 'Feature basate sulla località, come Paese e Stati.', + ], + 'permissions' => [ + 'settings' => 'Locations management', + ], + 'location' => [ + 'label' => 'Località', + 'new' => 'Nuova Località', + 'create_title' => 'Crea Località', + 'update_title' => 'Modifica Località', + 'preview_title' => 'Anteprima Località', + ], + 'locations' => [ + 'menu_label' => 'Paesi & Stati', + 'menu_description' => 'Gestisci paesi e stati disponibili per l\'utente.', + 'disabled_label' => 'Disabilitato', + 'enabled_label' => 'Abilitato', + 'enabled_help' => 'Le località disabilitate non saranno visibili nel front-end.', + 'enable_or_disable_title' => 'Abilita o Disabilita Località', + 'enable_or_disable' => 'Abilita o Disabilita', + 'selected_amount' => 'Località selezionata: :amount', + 'enable_success' => 'Località abilitate correttamente.', + 'disable_success' => 'Località disabilitate correttamente.', + 'disable_confirm' => 'Sei sicuro?', + 'unpin_label' => 'Unpinned', + 'pinned_label' => 'Pinned', + 'pinned_help' => 'Località di tipo "Pinned" sono mostrate prime nella lista.', + 'pin_or_unpin_title' => 'Pin o Unpin Località', + 'pin_or_unpin' => 'Pin o unpin', + 'pin_success' => 'Pin a località selezionata effettuato correttamente.', + 'unpin_success' => 'Unpin a località selezionata effettuato correttamente.', + 'unpin_confirm' => 'Sei sicuro?', + 'list_title' => 'Gestisci Località', + 'delete_confirm' => 'Sei sicuro di voler eliminare questa località?', + 'return_to_list' => 'Torna a lista località', + 'default_country' => 'Paese Default', + 'default_country_comment' => 'Quando un utente non specifica la sua località, seleziona un paese di default da usare.', + 'default_state' => 'Stato Default', + 'default_state_comment' => 'Quando un utente non specifica lo Stato, seleziona uno Stato di default da usare.', + ], + 'settings' => [ + 'menu_label' => 'Impostazioni Località', + 'menu_description' => 'Gestisci impostazioni basate sulla località.', + 'google_maps_key' => 'Google Maps API Key', + 'google_maps_key_comment' => 'Se hai intenzione di utilizzare i servizi di Google Maps, insierisci qui le API key.', + 'credentials_tab' => 'Credenziali', + ], + 'state' => [ + 'name' => 'Nome', + 'name_comment' => 'Inserisci il nome visualizzato per questo Stato.', + 'code' => 'Codice', + 'code_comment' => 'Inserisci un codice univoco per identificare questo Stato.', + ], + 'country' => [ + 'name' => 'Nome', + 'code' => 'Codice', + 'code_comment' => 'Inserisci un codice univoco per identificare questo Paese.', + 'enabled' => 'Abilitato', + 'pinned' => 'Pinned', + ], ]; diff --git a/lang/pt-br.json b/lang/pt-br.json new file mode 100644 index 0000000..787ef62 --- /dev/null +++ b/lang/pt-br.json @@ -0,0 +1,6 @@ +{ + "Country": "País", + "-- select country --": "-- selecione um país --", + "State": "Estado", + "-- select state --": "-- selecione um estado --" +} \ No newline at end of file diff --git a/lang/pt-br/lang.php b/lang/pt-br/lang.php index 7701ce4..9466e67 100644 --- a/lang/pt-br/lang.php +++ b/lang/pt-br/lang.php @@ -1,70 +1,64 @@ - [ - 'name' => 'Locais', - 'description' => 'Local com base em características, como País e Estado.', - ], - 'permissions' => [ - 'settings' => 'Gerenciamento de locais', - ], - 'location' => [ - 'label' => 'Local', - 'new' => 'Novo Local', - 'create_title' => 'Criar Local', - 'update_title' => 'Editar Local', - 'preview_title' => 'Pré-visualizar Local', - ], - 'locations' => [ - 'menu_label' => 'Locais', - 'menu_description' => 'Gerenciar países e estados disponíveis.', - 'disabled_label' => 'Ocultar desabilitados', - 'enabled_label' => 'Habilitado', - 'enabled_help' => 'Locais desabilitados não são visíveis no front-end.', - 'enable_or_disable_title' => "Habilitar ou Desabilitar Locais", - 'enable_or_disable' => 'Habilitar ou Desabilitar', - 'selected_amount' => 'Locais selecionados :amount', - 'enable_success' => 'Locais habilitados com sucesso.', - 'disable_success' => 'Locais desabilitados com sucesso.', - 'disable_confirm' => 'Você tem certeza?', - 'unpin_label' => 'Desafixado', - 'pinned_label' => 'Fixado', - 'pinned_help' => 'Locais fixados são classificadas em primeiro lugar na lista.', - 'pin_or_unpin_title' => "Fixar ou desafixar locais", - 'pin_or_unpin' => 'Fixar ou Desafixar', - 'pin_success' => 'Os locais selecionados foram fixados com sucesso.', - 'unpin_success' => 'Os locais selecionados foram desafixados com sucesso.', - 'unpin_confirm' => 'Você tem certeza?', - 'list_title' => 'Gerenciar Locais', - 'delete_confirm' => 'Você realmente deseja deletar este local?', - 'return_to_list' => 'Retornar à lista de locais', - 'default_country' => 'País padrão', - 'default_country_comment' => 'Quando um usuário não especifica seu local, selecione um país padrão para usar.', - 'default_state' => 'Estado padrão', - 'default_state_comment' => 'Quando um usuário não especifica seu local, selecione um estado padrão para usar.', - ], - 'settings' => [ - 'menu_label' => 'Configurações de locais', - 'menu_description' => 'Gerenciar configurações baseadas em local.', - 'google_maps_key' => 'Chave de API do Google Maps', - 'google_maps_key_comment' => 'Se pretender utilizar os serviços do Google Maps, introduza a chave da API aqui.', - 'credentials_tab' => 'Credenciais', - ], - 'state' => [ - 'label' => 'Estado', - 'name' => 'Nome', - 'select' => '-- selecione um estado --', - 'name_comment' => 'Informe do nome de exibição para este estado.', - 'code' => 'Código', - 'code_comment' => 'Informe o código único pra este estado.', - ], - 'country' => [ - 'label' => 'País', - 'name' => 'Nome', - 'select' => '-- selecione um país --', - 'code' => 'Código', - 'code_comment' => 'Informe um código único para este país.', - 'enabled' => 'Habilitado', - 'pinned' => 'Fixado', - ] + [ + 'name' => 'Locais', + 'description' => 'Local com base em características, como País e Estado.', + ], + 'permissions' => [ + 'settings' => 'Gerenciamento de locais', + ], + 'location' => [ + 'label' => 'Local', + 'new' => 'Novo Local', + 'create_title' => 'Criar Local', + 'update_title' => 'Editar Local', + 'preview_title' => 'Pré-visualizar Local', + ], + 'locations' => [ + 'menu_label' => 'Locais', + 'menu_description' => 'Gerenciar países e estados disponíveis.', + 'disabled_label' => 'Ocultar desabilitados', + 'enabled_label' => 'Habilitado', + 'enabled_help' => 'Locais desabilitados não são visíveis no front-end.', + 'enable_or_disable_title' => 'Habilitar ou Desabilitar Locais', + 'enable_or_disable' => 'Habilitar ou Desabilitar', + 'selected_amount' => 'Locais selecionados :amount', + 'enable_success' => 'Locais habilitados com sucesso.', + 'disable_success' => 'Locais desabilitados com sucesso.', + 'disable_confirm' => 'Você tem certeza?', + 'unpin_label' => 'Desafixado', + 'pinned_label' => 'Fixado', + 'pinned_help' => 'Locais fixados são classificadas em primeiro lugar na lista.', + 'pin_or_unpin_title' => 'Fixar ou desafixar locais', + 'pin_or_unpin' => 'Fixar ou Desafixar', + 'pin_success' => 'Os locais selecionados foram fixados com sucesso.', + 'unpin_success' => 'Os locais selecionados foram desafixados com sucesso.', + 'unpin_confirm' => 'Você tem certeza?', + 'list_title' => 'Gerenciar Locais', + 'delete_confirm' => 'Você realmente deseja deletar este local?', + 'return_to_list' => 'Retornar à lista de locais', + 'default_country' => 'País padrão', + 'default_country_comment' => 'Quando um usuário não especifica seu local, selecione um país padrão para usar.', + 'default_state' => 'Estado padrão', + 'default_state_comment' => 'Quando um usuário não especifica seu local, selecione um estado padrão para usar.', + ], + 'settings' => [ + 'menu_label' => 'Configurações de locais', + 'menu_description' => 'Gerenciar configurações baseadas em local.', + 'google_maps_key' => 'Chave de API do Google Maps', + 'google_maps_key_comment' => 'Se pretender utilizar os serviços do Google Maps, introduza a chave da API aqui.', + 'credentials_tab' => 'Credenciais', + ], + 'state' => [ + 'name' => 'Nome', + 'name_comment' => 'Informe do nome de exibição para este estado.', + 'code' => 'Código', + 'code_comment' => 'Informe o código único pra este estado.', + ], + 'country' => [ + 'name' => 'Nome', + 'code' => 'Código', + 'code_comment' => 'Informe um código único para este país.', + 'enabled' => 'Habilitado', + 'pinned' => 'Fixado', + ], ]; diff --git a/lang/ru.json b/lang/ru.json new file mode 100644 index 0000000..59f48b4 --- /dev/null +++ b/lang/ru.json @@ -0,0 +1,6 @@ +{ + "Country": "Страна", + "-- select country --": "-- выберите страну --", + "State": "Регион", + "-- select state --": "-- выберите регион --" +} \ No newline at end of file diff --git a/lang/ru/lang.php b/lang/ru/lang.php index 2ed83ab..8600c4d 100644 --- a/lang/ru/lang.php +++ b/lang/ru/lang.php @@ -1,70 +1,64 @@ - [ - 'name' => 'Локация', - 'description' => 'Базовый функционал локаций, таких как Страна и Регион.' - ], - 'permissions' => [ - 'settings' => 'Управление локациями', - ], - 'location' => [ - 'label' => 'Локация', - 'new' => 'Новая локация', - 'create_title' => 'Создать локацию', - 'update_title' => 'Изменить локацию', - 'preview_title' => 'Просмотр локации', - ], - 'locations' => [ - 'menu_label' => 'Страны и регионы', - 'menu_description' => 'Управление доступными пользователю странами и регионами.', - 'disabled_label' => 'Скрыть выключенные', - 'enabled_label' => "Разрешить локации для выбора", - 'enabled_help' => "Переключение доступности выбора локаций в настройках пользователя.", - 'enable_or_disable_title' => "Включение и отключение локаций", - 'enable_or_disable' => 'Включить или выключить', - 'selected_amount' => 'Выбрано локаций: :amount', - 'enable_success' => "Выбранные локации теперь доступны для выбора.", - 'disable_success' => "Выбранные локации теперь не доступны для выбора.", - 'disable_confirm' => 'Вы уверены?', - 'unpin_label' => 'Откреплено', - 'pinned_label' => 'Закреплено', - 'pinned_help' => 'Закрепленные локации сортируются первыми в списке.', - 'pin_or_unpin_title' => "Закрепить или открепить локации", - 'pin_or_unpin' => 'Закрепить или открепить', - 'pin_success' => 'Выбранные локации успешно закреплены.', - 'unpin_success' => 'Выбранные локации успешно откреплены.', - 'unpin_confirm' => 'Вы уверены?', - 'list_title' => 'Управление локациями', - 'delete_confirm' => 'Вы действительно хотите удалить эту локацию?', - 'return_to_list' => 'Вернуться к списку локаций', - 'default_country' => 'Страна по умолчанию', - 'default_country_comment' => 'Если пользователь не определяет своё местоположение, будет установлена страна по умолчанию.', - 'default_state' => 'Регион по умолчанию', - 'default_state_comment' => 'Если пользователь не определяет своё местоположение, будет установлен регион по умолчанию.', - ], - 'settings' => [ - 'menu_label' => 'Настройки локации', - 'menu_description' => 'Менеджер локаций основные настройки.', - 'google_maps_key' => 'Ключ Google Maps API', - 'google_maps_key_comment' => 'Если вы планируете использовать сервисы Google Maps, укажите здесь API-ключ для них.', - 'credentials_tab' => 'Учётные данные', - ], - 'state' => [ - 'label' => 'Регион', - 'name' => 'Название', - 'select' => '-- выберите регион --', - 'name_comment' => 'Введите отображаемое имя для данного региона.', - 'code' => 'Код', - 'code_comment' => 'Введите уникальный код для идентификации этого региона.', - ], - 'country' => [ - 'label' => 'Страна', - 'name' => 'Название', - 'select' => '-- выберите страну --', - 'code' => 'Код', - 'code_comment' => 'Введите уникальный код для идентификации этой страны.', - 'enabled' => 'Включено', - 'pinned' => 'Закреплено', - ], + [ + 'name' => 'Локация', + 'description' => 'Базовый функционал локаций, таких как Страна и Регион.', + ], + 'permissions' => [ + 'settings' => 'Управление локациями', + ], + 'location' => [ + 'label' => 'Локация', + 'new' => 'Новая локация', + 'create_title' => 'Создать локацию', + 'update_title' => 'Изменить локацию', + 'preview_title' => 'Просмотр локации', + ], + 'locations' => [ + 'menu_label' => 'Страны и регионы', + 'menu_description' => 'Управление доступными пользователю странами и регионами.', + 'disabled_label' => 'Скрыть выключенные', + 'enabled_label' => 'Разрешить локации для выбора', + 'enabled_help' => 'Переключение доступности выбора локаций в настройках пользователя.', + 'enable_or_disable_title' => 'Включение и отключение локаций', + 'enable_or_disable' => 'Включить или выключить', + 'selected_amount' => 'Выбрано локаций: :amount', + 'enable_success' => 'Выбранные локации теперь доступны для выбора.', + 'disable_success' => 'Выбранные локации теперь не доступны для выбора.', + 'disable_confirm' => 'Вы уверены?', + 'unpin_label' => 'Откреплено', + 'pinned_label' => 'Закреплено', + 'pinned_help' => 'Закрепленные локации сортируются первыми в списке.', + 'pin_or_unpin_title' => 'Закрепить или открепить локации', + 'pin_or_unpin' => 'Закрепить или открепить', + 'pin_success' => 'Выбранные локации успешно закреплены.', + 'unpin_success' => 'Выбранные локации успешно откреплены.', + 'unpin_confirm' => 'Вы уверены?', + 'list_title' => 'Управление локациями', + 'delete_confirm' => 'Вы действительно хотите удалить эту локацию?', + 'return_to_list' => 'Вернуться к списку локаций', + 'default_country' => 'Страна по умолчанию', + 'default_country_comment' => 'Если пользователь не определяет своё местоположение, будет установлена страна по умолчанию.', + 'default_state' => 'Регион по умолчанию', + 'default_state_comment' => 'Если пользователь не определяет своё местоположение, будет установлен регион по умолчанию.', + ], + 'settings' => [ + 'menu_label' => 'Настройки локации', + 'menu_description' => 'Менеджер локаций основные настройки.', + 'google_maps_key' => 'Ключ Google Maps API', + 'google_maps_key_comment' => 'Если вы планируете использовать сервисы Google Maps, укажите здесь API-ключ для них.', + 'credentials_tab' => 'Учётные данные', + ], + 'state' => [ + 'name' => 'Название', + 'name_comment' => 'Введите отображаемое имя для данного региона.', + 'code' => 'Код', + 'code_comment' => 'Введите уникальный код для идентификации этого региона.', + ], + 'country' => [ + 'name' => 'Название', + 'code' => 'Код', + 'code_comment' => 'Введите уникальный код для идентификации этой страны.', + 'enabled' => 'Включено', + 'pinned' => 'Закреплено', + ], ]; diff --git a/lang/sk.json b/lang/sk.json new file mode 100644 index 0000000..b8e347b --- /dev/null +++ b/lang/sk.json @@ -0,0 +1,6 @@ +{ + "Country": "Krajina", + "-- select country --": "-- zvoľte krajinu --", + "State": "Štát", + "-- select state --": "-- zvoľte štát --" +} \ No newline at end of file diff --git a/lang/sk/lang.php b/lang/sk/lang.php index 92a4364..e5dd92d 100644 --- a/lang/sk/lang.php +++ b/lang/sk/lang.php @@ -1,69 +1,64 @@ - [ - 'name' => 'Lokácie', - 'description' => 'Funkcie založené na umiestnení, napríklad krajina a štát..', - ], - 'permissions' => [ - 'settings' => 'Správa lokácií', - ], - 'location' => [ - 'label' => 'Lokácie', - 'new' => 'Nová lokácia', - 'create_title' => 'Vytvoriť lokáciu', - 'update_title' => 'Upraviť lokáciu', - 'preview_title' => 'Náhľad lokácie', - ], - 'locations' => [ - 'menu_label' => 'Krajiny a Štáty', - 'menu_description' => 'Správa dostupných krajín a štátov.', - 'disabled_label' => 'Neaktvne', - 'enabled_label' => 'Aktívne', - 'enabled_help' => 'Neaktívne lokácie nie sú viditeľné na fron-ende.', - 'enable_or_disable_title' => "Aktivácia alebo deaktivácia lokality", - 'enable_or_disable' => 'Aktivovať alebo Deaktivovať', - 'selected_amount' => 'Počet vybraných lokácií: :amount', - 'enable_success' => 'Vybrané lokácie boli úspešne aktivované.', - 'disable_success' => 'Vybrané lokality boli úspešne deaktivované.', - 'disable_confirm' => 'Ste si istý?', - 'unpin_label' => 'Nepreferované', - 'pinned_label' => 'Preferované', - 'pinned_help' => 'Preferované lokácie sú zoradené na začiatku zoznamu.', - 'pin_or_unpin_title' => "Preferovať alebo Nepreferovať lokácie", - 'pin_or_unpin' => 'Preferovať alebo nepreferovať', - 'pin_success' => 'Vybrané lokality boli úspešne nastavené ako preferované.', - 'unpin_success' => 'Vybrané lokality boli úspešne nastavené ako nepreferované.', - 'unpin_confirm' => 'Ste si istý?', - 'list_title' => 'Správa lokácií', - 'delete_confirm' => 'Určite chcete zmazať túto lokáciu?', - 'return_to_list' => 'Návrat na zoznam lokácií', - 'default_country' => 'Predvolená Krajina', - 'default_country_comment' => 'V prípade, že si užívateľ nezvolí lokáciu, použije sa predvolená krajina.', - 'default_state' => 'Predvolený Štát', - 'default_state_comment' => 'V prípade, že si užívateľ nezvolí lokáciu, použije sa predvolený štát.', - ], - 'settings' => [ - 'menu_label' => 'Nastavenia lokácií', - 'menu_description' => 'Správa nastavení lokácií.', - 'google_maps_key' => 'API Kľúč Google Maps', - 'google_maps_key_comment' => 'Pokiaľ chcete používať Google Mapy, zadajte sem váš API kľúč.', - 'credentials_tab' => 'Údaje', - ], - 'state' => [ - 'label' => 'Štát', - 'name' => 'Meno', - 'select' => '-- zvoľte štát --', - 'name_comment' => 'Zadajte názov štátu.', - 'code' => 'Kód', - 'code_comment' => 'Zadajte unikátny kód štátu.', - ], - 'country' => [ - 'label' => 'Krajina', - 'name' => 'Názov', - 'select' => '-- zvoľte krajinu --', - 'code' => 'Kód', - 'code_comment' => 'adajte unikátny kód krajiny, napr. SK.', - 'enabled' => 'Aktívne', - 'pinned' => 'Preferované', - ], + [ + 'name' => 'Lokácie', + 'description' => 'Funkcie založené na umiestnení, napríklad krajina a štát..', + ], + 'permissions' => [ + 'settings' => 'Správa lokácií', + ], + 'location' => [ + 'label' => 'Lokácie', + 'new' => 'Nová lokácia', + 'create_title' => 'Vytvoriť lokáciu', + 'update_title' => 'Upraviť lokáciu', + 'preview_title' => 'Náhľad lokácie', + ], + 'locations' => [ + 'menu_label' => 'Krajiny a Štáty', + 'menu_description' => 'Správa dostupných krajín a štátov.', + 'disabled_label' => 'Neaktvne', + 'enabled_label' => 'Aktívne', + 'enabled_help' => 'Neaktívne lokácie nie sú viditeľné na fron-ende.', + 'enable_or_disable_title' => 'Aktivácia alebo deaktivácia lokality', + 'enable_or_disable' => 'Aktivovať alebo Deaktivovať', + 'selected_amount' => 'Počet vybraných lokácií: :amount', + 'enable_success' => 'Vybrané lokácie boli úspešne aktivované.', + 'disable_success' => 'Vybrané lokality boli úspešne deaktivované.', + 'disable_confirm' => 'Ste si istý?', + 'unpin_label' => 'Nepreferované', + 'pinned_label' => 'Preferované', + 'pinned_help' => 'Preferované lokácie sú zoradené na začiatku zoznamu.', + 'pin_or_unpin_title' => 'Preferovať alebo Nepreferovať lokácie', + 'pin_or_unpin' => 'Preferovať alebo nepreferovať', + 'pin_success' => 'Vybrané lokality boli úspešne nastavené ako preferované.', + 'unpin_success' => 'Vybrané lokality boli úspešne nastavené ako nepreferované.', + 'unpin_confirm' => 'Ste si istý?', + 'list_title' => 'Správa lokácií', + 'delete_confirm' => 'Určite chcete zmazať túto lokáciu?', + 'return_to_list' => 'Návrat na zoznam lokácií', + 'default_country' => 'Predvolená Krajina', + 'default_country_comment' => 'V prípade, že si užívateľ nezvolí lokáciu, použije sa predvolená krajina.', + 'default_state' => 'Predvolený Štát', + 'default_state_comment' => 'V prípade, že si užívateľ nezvolí lokáciu, použije sa predvolený štát.', + ], + 'settings' => [ + 'menu_label' => 'Nastavenia lokácií', + 'menu_description' => 'Správa nastavení lokácií.', + 'google_maps_key' => 'API Kľúč Google Maps', + 'google_maps_key_comment' => 'Pokiaľ chcete používať Google Mapy, zadajte sem váš API kľúč.', + 'credentials_tab' => 'Údaje', + ], + 'state' => [ + 'name' => 'Meno', + 'name_comment' => 'Zadajte názov štátu.', + 'code' => 'Kód', + 'code_comment' => 'Zadajte unikátny kód štátu.', + ], + 'country' => [ + 'name' => 'Názov', + 'code' => 'Kód', + 'code_comment' => 'adajte unikátny kód krajiny, napr. SK.', + 'enabled' => 'Aktívne', + 'pinned' => 'Preferované', + ], ]; diff --git a/lang/sl.json b/lang/sl.json new file mode 100644 index 0000000..8ae92d5 --- /dev/null +++ b/lang/sl.json @@ -0,0 +1,6 @@ +{ + "Country": "Država", + "-- select country --": "-- izberite državo --", + "State": "regijo oz. zvezno državo", + "-- select state --": "-- izberite regijo oz. zvezno državo --" +} \ No newline at end of file diff --git a/lang/sl/lang.php b/lang/sl/lang.php index 3fbf40d..beac51c 100644 --- a/lang/sl/lang.php +++ b/lang/sl/lang.php @@ -1,70 +1,64 @@ - [ - 'name' => 'Lokacije', - 'description' => 'Funkcije, ki temeljijo na lokaciji, kot so npr. države in regije.', - ], - 'permissions' => [ - 'settings' => 'Upravljanje lokacij', - ], - 'location' => [ - 'label' => 'Lokacija', - 'new' => 'Nova lokacija', - 'create_title' => 'Ustvari lokacijo', - 'update_title' => 'Uredi lokacijo', - 'preview_title' => 'Predogled lokacije', - ], - 'locations' => [ - 'menu_label' => 'Države in regije', - 'menu_description' => 'Upravljanje razpoložljivih držav in regij za uporabnike.', - 'disabled_label' => 'Onemogočene', - 'enabled_label' => 'Omogočene', - 'enabled_help' => 'Onemogočene lokacije so na spletni strani skrite.', - 'enable_or_disable_title' => 'Omogoči ali onemogoči lokacije', - 'enable_or_disable' => 'Omogoči ali onemogoči', - 'selected_amount' => 'Izbrane lokacije: :amount', - 'enable_success' => 'Lokacije so bile uspešno omogočene.', - 'disable_success' => 'Lokacije so bile onemogočene.', - 'disable_confirm' => 'Ali ste prepričani?', - 'unpin_label' => 'Nepripete', - 'pinned_label' => 'Pripete', - 'pinned_help' => 'Pripete lokacije so razvrščene na začetek seznama.', - 'pin_or_unpin_title' => "Pripni ali odpni lokacije", - 'pin_or_unpin' => 'Pripni ali odpni', - 'pin_success' => 'Lokacije so bile uspešno pripete.', - 'unpin_success' => 'Lokacije so sedaj nepripete.', - 'unpin_confirm' => 'Ali ste prepričani?', - 'list_title' => 'Upravljanje lokacij', - 'delete_confirm' => 'Ali ste prepričani, da želite izbrisati to lokacijo?', - 'return_to_list' => 'Vrni se na seznam lokacij', - 'default_country' => 'Privzeta država', - 'default_country_comment' => 'Določite privzeto državo, ki se uporabi v primeru, če je uporabnik ne izbere sam.', - 'default_state' => 'Privzeta regija oz. zvezna država', - 'default_state_comment' => 'Določite privzeto regijo oz. zvezno državo, ki se uporabi v primeru, če je uporabnik ne izbere sam.', - ], - 'settings' => [ - 'menu_label' => 'Nastavitve za lokacije', - 'menu_description' => 'Upravljanje privzetih nastavitev in API dostopa za lokacije.', - 'google_maps_key' => 'Ključ za Google Maps API', - 'google_maps_key_comment' => 'Če nameravate uporabljati storitve Google Maps, vnesite v polje API ključ (Google Maps API Key).', - 'credentials_tab' => 'API dostop', - ], - 'state' => [ - 'label' => 'regijo oz. zvezno državo', - 'name' => 'Ime', - 'select' => '-- izberite regijo oz. zvezno državo --', - 'name_comment' => 'Vnesite prikazano ime za to regijo oz. zvezno državo.', - 'code' => 'Koda', - 'code_comment' => 'Vnesite unikatno kodo za identifikacijo te regije oz. zvezne države.', - ], - 'country' => [ - 'label' => 'Država', - 'name' => 'Ime', - 'select' => '-- izberite državo --', - 'code' => 'Koda', - 'code_comment' => 'Vnesite unikatno kodo za identifikacijo te države.', - 'enabled' => 'Omogočena', - 'pinned' => 'Pripeta', - ], + [ + 'name' => 'Lokacije', + 'description' => 'Funkcije, ki temeljijo na lokaciji, kot so npr. države in regije.', + ], + 'permissions' => [ + 'settings' => 'Upravljanje lokacij', + ], + 'location' => [ + 'label' => 'Lokacija', + 'new' => 'Nova lokacija', + 'create_title' => 'Ustvari lokacijo', + 'update_title' => 'Uredi lokacijo', + 'preview_title' => 'Predogled lokacije', + ], + 'locations' => [ + 'menu_label' => 'Države in regije', + 'menu_description' => 'Upravljanje razpoložljivih držav in regij za uporabnike.', + 'disabled_label' => 'Onemogočene', + 'enabled_label' => 'Omogočene', + 'enabled_help' => 'Onemogočene lokacije so na spletni strani skrite.', + 'enable_or_disable_title' => 'Omogoči ali onemogoči lokacije', + 'enable_or_disable' => 'Omogoči ali onemogoči', + 'selected_amount' => 'Izbrane lokacije: :amount', + 'enable_success' => 'Lokacije so bile uspešno omogočene.', + 'disable_success' => 'Lokacije so bile onemogočene.', + 'disable_confirm' => 'Ali ste prepričani?', + 'unpin_label' => 'Nepripete', + 'pinned_label' => 'Pripete', + 'pinned_help' => 'Pripete lokacije so razvrščene na začetek seznama.', + 'pin_or_unpin_title' => 'Pripni ali odpni lokacije', + 'pin_or_unpin' => 'Pripni ali odpni', + 'pin_success' => 'Lokacije so bile uspešno pripete.', + 'unpin_success' => 'Lokacije so sedaj nepripete.', + 'unpin_confirm' => 'Ali ste prepričani?', + 'list_title' => 'Upravljanje lokacij', + 'delete_confirm' => 'Ali ste prepričani, da želite izbrisati to lokacijo?', + 'return_to_list' => 'Vrni se na seznam lokacij', + 'default_country' => 'Privzeta država', + 'default_country_comment' => 'Določite privzeto državo, ki se uporabi v primeru, če je uporabnik ne izbere sam.', + 'default_state' => 'Privzeta regija oz. zvezna država', + 'default_state_comment' => 'Določite privzeto regijo oz. zvezno državo, ki se uporabi v primeru, če je uporabnik ne izbere sam.', + ], + 'settings' => [ + 'menu_label' => 'Nastavitve za lokacije', + 'menu_description' => 'Upravljanje privzetih nastavitev in API dostopa za lokacije.', + 'google_maps_key' => 'Ključ za Google Maps API', + 'google_maps_key_comment' => 'Če nameravate uporabljati storitve Google Maps, vnesite v polje API ključ (Google Maps API Key).', + 'credentials_tab' => 'API dostop', + ], + 'state' => [ + 'name' => 'Ime', + 'name_comment' => 'Vnesite prikazano ime za to regijo oz. zvezno državo.', + 'code' => 'Koda', + 'code_comment' => 'Vnesite unikatno kodo za identifikacijo te regije oz. zvezne države.', + ], + 'country' => [ + 'name' => 'Ime', + 'code' => 'Koda', + 'code_comment' => 'Vnesite unikatno kodo za identifikacijo te države.', + 'enabled' => 'Omogočena', + 'pinned' => 'Pripeta', + ], ]; diff --git a/lang/tr.json b/lang/tr.json new file mode 100644 index 0000000..0baaeb6 --- /dev/null +++ b/lang/tr.json @@ -0,0 +1,6 @@ +{ + "Country": "Ülke", + "-- select country --": "-- ülke seçin --", + "State": "Şehir/Eyalet", + "-- select state --": "-- şehir seçin --" +} \ No newline at end of file diff --git a/lang/tr/lang.php b/lang/tr/lang.php index 61a2eb1..9b94127 100644 --- a/lang/tr/lang.php +++ b/lang/tr/lang.php @@ -1,70 +1,64 @@ - [ - 'name' => 'Konum', - 'description' => 'Konum bazlı özellikler, örneği Ülke ve Şehir.', - ], - 'permissions' => [ - 'settings' => 'Konum yönetimi', - ], - 'location' => [ - 'label' => 'Konum', - 'new' => 'Yeni Konum', - 'create_title' => 'Konum Ekle', - 'update_title' => 'Konum ekle', - 'preview_title' => 'Konumu önizle', - ], - 'locations' => [ - 'menu_label' => 'Ülkeler & Şehirler', - 'menu_description' => 'Ülkeleri ve şehirleri yönet.', - 'disabled_label' => 'Pasif', - 'enabled_label' => 'Aktif', - 'enabled_help' => 'Pasif konumlar site ön yüzünde görüntülenmez.', - 'enable_or_disable_title' => "Konumları aktifleştir/pasifleştir", - 'enable_or_disable' => 'Aktifleştir / pasifleştir', - 'selected_amount' => 'Seçilen konum: :amount', - 'enable_success' => 'Konumlar aktifleştirildi.', - 'disable_success' => 'Konumlar pasifleştirildi.', - 'disable_confirm' => 'Emin misiniz?', - 'unpin_label' => 'İğnelenmemiş', - 'pinned_label' => 'İğnelenmiş', - 'pinned_help' => 'İğnelenmiş konumlar sıralamada en üstte görünür.', - 'pin_or_unpin_title' => "Konumları iğnele/iğneyi kaldır", - 'pin_or_unpin' => 'İğnele/iğneyi kaldır', - 'pin_success' => 'Seçilen konumlar iğnelendi.', - 'unpin_success' => 'Seçilen konumların iğnesi kaldırıldı.', - 'unpin_confirm' => 'Emin misiniz?', - 'list_title' => 'Konumları yönet', - 'delete_confirm' => 'Bu konumu silmek istediğinize emin misiniz?', - 'return_to_list' => 'Konum listesine dön', - 'default_country' => 'Ön tanımlı Ülke', - 'default_country_comment' => 'Bir üye konum seçmediğinde görüntülenecek ön tanımlı ülkeyi seçin.', - 'default_state' => 'Ön tanımlı Şehir', - 'default_state_comment' => 'Bir üye konum seçmediğinde görüntülenecek ön tanımlı şehri seçin.', - ], - 'settings' => [ - 'menu_label' => 'Konum ayarları', - 'menu_description' => 'Konum bazlı ayarları düzenle.', - 'google_maps_key' => 'Google Maps API Key', - 'google_maps_key_comment' => 'Eğer Google Maps kullanmayı düşünüyorsanız, API key i buraya girebilirsiniz.', - 'credentials_tab' => 'API Bilgileri', - ], - 'state' => [ - 'label' => 'Şehir/Eyalet', - 'name' => 'İsim', - 'select' => '-- şehir seçin --', - 'name_comment' => 'Bu şehir için isim girin.', - 'code' => 'Kod', - 'code_comment' => 'Şehri tanımlayan kodunu girin.', - ], - 'country' => [ - 'label' => 'Ülke', - 'name' => 'İsim', - 'select' => '-- ülke seçin --', - 'code' => 'Kod', - 'code_comment' => 'Ülkeyi tanımlayan kodu girin.', - 'enabled' => 'Aktif', - 'pinned' => 'İğnelenmiş', - ], + [ + 'name' => 'Konum', + 'description' => 'Konum bazlı özellikler, örneği Ülke ve Şehir.', + ], + 'permissions' => [ + 'settings' => 'Konum yönetimi', + ], + 'location' => [ + 'label' => 'Konum', + 'new' => 'Yeni Konum', + 'create_title' => 'Konum Ekle', + 'update_title' => 'Konum ekle', + 'preview_title' => 'Konumu önizle', + ], + 'locations' => [ + 'menu_label' => 'Ülkeler & Şehirler', + 'menu_description' => 'Ülkeleri ve şehirleri yönet.', + 'disabled_label' => 'Pasif', + 'enabled_label' => 'Aktif', + 'enabled_help' => 'Pasif konumlar site ön yüzünde görüntülenmez.', + 'enable_or_disable_title' => 'Konumları aktifleştir/pasifleştir', + 'enable_or_disable' => 'Aktifleştir / pasifleştir', + 'selected_amount' => 'Seçilen konum: :amount', + 'enable_success' => 'Konumlar aktifleştirildi.', + 'disable_success' => 'Konumlar pasifleştirildi.', + 'disable_confirm' => 'Emin misiniz?', + 'unpin_label' => 'İğnelenmemiş', + 'pinned_label' => 'İğnelenmiş', + 'pinned_help' => 'İğnelenmiş konumlar sıralamada en üstte görünür.', + 'pin_or_unpin_title' => 'Konumları iğnele/iğneyi kaldır', + 'pin_or_unpin' => 'İğnele/iğneyi kaldır', + 'pin_success' => 'Seçilen konumlar iğnelendi.', + 'unpin_success' => 'Seçilen konumların iğnesi kaldırıldı.', + 'unpin_confirm' => 'Emin misiniz?', + 'list_title' => 'Konumları yönet', + 'delete_confirm' => 'Bu konumu silmek istediğinize emin misiniz?', + 'return_to_list' => 'Konum listesine dön', + 'default_country' => 'Ön tanımlı Ülke', + 'default_country_comment' => 'Bir üye konum seçmediğinde görüntülenecek ön tanımlı ülkeyi seçin.', + 'default_state' => 'Ön tanımlı Şehir', + 'default_state_comment' => 'Bir üye konum seçmediğinde görüntülenecek ön tanımlı şehri seçin.', + ], + 'settings' => [ + 'menu_label' => 'Konum ayarları', + 'menu_description' => 'Konum bazlı ayarları düzenle.', + 'google_maps_key' => 'Google Maps API Key', + 'google_maps_key_comment' => 'Eğer Google Maps kullanmayı düşünüyorsanız, API key i buraya girebilirsiniz.', + 'credentials_tab' => 'API Bilgileri', + ], + 'state' => [ + 'name' => 'İsim', + 'name_comment' => 'Bu şehir için isim girin.', + 'code' => 'Kod', + 'code_comment' => 'Şehri tanımlayan kodunu girin.', + ], + 'country' => [ + 'name' => 'İsim', + 'code' => 'Kod', + 'code_comment' => 'Ülkeyi tanımlayan kodu girin.', + 'enabled' => 'Aktif', + 'pinned' => 'İğnelenmiş', + ], ]; diff --git a/lang/uk.json b/lang/uk.json new file mode 100644 index 0000000..cbfbba6 --- /dev/null +++ b/lang/uk.json @@ -0,0 +1,6 @@ +{ + "Country": "Країна", + "-- select country --": "-- виберіть країну --", + "State": "Область", + "-- select state --": "-- виберіть Область --" +} \ No newline at end of file diff --git a/lang/uk/lang.php b/lang/uk/lang.php index 4174e19..0746fa1 100644 --- a/lang/uk/lang.php +++ b/lang/uk/lang.php @@ -1,72 +1,66 @@ - [ - 'name' => 'Локація', - 'description' => 'Базовий функціонал локацій, таких як Країна та Область.' - ], - 'permissions' => [ - 'settings' => 'Управління локаціями', - ], - 'location' => [ - 'label' => 'Локація', - 'new' => 'Нова локація', - 'create_title' => 'Створити локацію', - 'update_title' => 'Змінити локацію', - 'preview_title' => 'Перегляд локації', - ], - 'locations' => [ - 'menu_label' => 'Країни та області', - 'menu_description' => 'Управління доступними користувачеві країнами та областями.', - 'disabled_label' => 'Приховати вимкнені', - 'enabled_label' => "Дозволити локації для вибору", - 'enabled_help' => "Переключення доступності вибору локацій в налаштуваннях користувача.", - 'enable_or_disable_title' => "Увімкнення та відключення локацій", - 'enable_or_disable' => 'Увімкнути або вимкнути', - 'selected_amount' => 'Вибрано локацій: :amount', - 'enable_success' => "Вибрані локації доступні для вибору.", - 'disable_success' => "Вибрані локації не доступні для вибору.", - 'disable_confirm' => 'Ви впевнені?', - 'unpin_label' => 'Відкріплено', - 'pinned_label' => 'Закріплено', - 'pinned_help' => 'Закріплені локації сортуються першими у списку.', - 'pin_or_unpin_title' => "Закріпити або відкріпити локації", - 'pin_or_unpin' => 'Закріпити або відкріпити', - 'pin_success' => 'Вибрані локації успішно закріплені.', - 'unpin_success' => 'Вибрані локації успішно відкріплені.', - 'unpin_confirm' => 'Ви впевнені?', - 'list_title' => 'Керування локаціями', - 'delete_confirm' => 'Ви дійсно хочете видалити цю локацію?', - 'return_to_list' => 'Повернутись до списку локацій', - 'default_country' => 'За замовчуванням', - 'default_country_comment' => 'Якщо користувач не визначає місце розташування, буде встановлено країну за умовчанням.', - 'default_state' => 'Область за промовчанням', - 'default_state_comment' => 'Якщо користувач не визначає місце розташування, буде встановлено область за умовчанням.', - ], - 'settings' => [ - 'menu_label' => 'Налаштування локації', - 'menu_description' => 'Менеджер локацій основні настройки.', - 'google_maps_key' => 'Ключ Google Maps API', - 'google_maps_key_comment' => 'Якщо ви плануєте використовувати сервіси Google Maps, вкажіть тут API-ключ для них.', - 'credentials_tab' => 'Облікові дані', - ], - 'state' => [ - 'label' => 'Область', - 'name' => 'Назва', - 'select' => '-- виберіть Область --', - 'name_comment' => 'Введіть ім\'я, яке відображається для цієї області.', - 'code' => 'Код', - 'code_comment' => 'Введіть унікальний код для ідентифікації області.', - ], - 'country' => [ - 'label' => 'Країна', - 'name' => 'Назва', - 'select' => '-- виберіть країну --', - 'code' => 'Код', - 'code_comment' => 'Введіть унікальний код для ідентифікації цієї країни.', - 'enabled' => 'Увімкнено', - 'pinned' => 'Закріплено', - 'calling_code' => 'Код виклику', - 'calling_code_comment' => 'Числовий телефонний код країни без знака плюс.', - ], + [ + 'name' => 'Локація', + 'description' => 'Базовий функціонал локацій, таких як Країна та Область.', + ], + 'permissions' => [ + 'settings' => 'Управління локаціями', + ], + 'location' => [ + 'label' => 'Локація', + 'new' => 'Нова локація', + 'create_title' => 'Створити локацію', + 'update_title' => 'Змінити локацію', + 'preview_title' => 'Перегляд локації', + ], + 'locations' => [ + 'menu_label' => 'Країни та області', + 'menu_description' => 'Управління доступними користувачеві країнами та областями.', + 'disabled_label' => 'Приховати вимкнені', + 'enabled_label' => 'Дозволити локації для вибору', + 'enabled_help' => 'Переключення доступності вибору локацій в налаштуваннях користувача.', + 'enable_or_disable_title' => 'Увімкнення та відключення локацій', + 'enable_or_disable' => 'Увімкнути або вимкнути', + 'selected_amount' => 'Вибрано локацій: :amount', + 'enable_success' => 'Вибрані локації доступні для вибору.', + 'disable_success' => 'Вибрані локації не доступні для вибору.', + 'disable_confirm' => 'Ви впевнені?', + 'unpin_label' => 'Відкріплено', + 'pinned_label' => 'Закріплено', + 'pinned_help' => 'Закріплені локації сортуються першими у списку.', + 'pin_or_unpin_title' => 'Закріпити або відкріпити локації', + 'pin_or_unpin' => 'Закріпити або відкріпити', + 'pin_success' => 'Вибрані локації успішно закріплені.', + 'unpin_success' => 'Вибрані локації успішно відкріплені.', + 'unpin_confirm' => 'Ви впевнені?', + 'list_title' => 'Керування локаціями', + 'delete_confirm' => 'Ви дійсно хочете видалити цю локацію?', + 'return_to_list' => 'Повернутись до списку локацій', + 'default_country' => 'За замовчуванням', + 'default_country_comment' => 'Якщо користувач не визначає місце розташування, буде встановлено країну за умовчанням.', + 'default_state' => 'Область за промовчанням', + 'default_state_comment' => 'Якщо користувач не визначає місце розташування, буде встановлено область за умовчанням.', + ], + 'settings' => [ + 'menu_label' => 'Налаштування локації', + 'menu_description' => 'Менеджер локацій основні настройки.', + 'google_maps_key' => 'Ключ Google Maps API', + 'google_maps_key_comment' => 'Якщо ви плануєте використовувати сервіси Google Maps, вкажіть тут API-ключ для них.', + 'credentials_tab' => 'Облікові дані', + ], + 'state' => [ + 'name' => 'Назва', + 'name_comment' => 'Введіть ім\'я, яке відображається для цієї області.', + 'code' => 'Код', + 'code_comment' => 'Введіть унікальний код для ідентифікації області.', + ], + 'country' => [ + 'name' => 'Назва', + 'code' => 'Код', + 'code_comment' => 'Введіть унікальний код для ідентифікації цієї країни.', + 'enabled' => 'Увімкнено', + 'pinned' => 'Закріплено', + 'calling_code' => 'Код виклику', + 'calling_code_comment' => 'Числовий телефонний код країни без знака плюс.', + ], ]; diff --git a/lang/zh-cn.json b/lang/zh-cn.json new file mode 100644 index 0000000..e7416a9 --- /dev/null +++ b/lang/zh-cn.json @@ -0,0 +1,6 @@ +{ + "Country": "国家", + "-- select country --": "-- 选择国家 --", + "State": "省市/地区", + "-- select state --": "-- 选择省市/地区 --" +} \ No newline at end of file diff --git a/lang/zh-cn/lang.php b/lang/zh-cn/lang.php index b36e7cd..7595615 100644 --- a/lang/zh-cn/lang.php +++ b/lang/zh-cn/lang.php @@ -1,70 +1,66 @@ [ - 'name' => '位置', - 'description' => '基于位置的功能,例如国家和地区。', - ], - 'permissions' => [ - 'settings' => '位置管理', - ], - 'location' => [ - 'label' => '位置信息', - 'new' => '新建位置信息', - 'create_title' => '创建位置信息', - 'update_title' => '修改位置信息', - 'preview_title' => '预览位置信息', - ], - 'locations' => [ - 'menu_label' => '位置信息', - 'menu_description' => '管理国家和地区.', - 'disabled_label' => '隐藏被禁用项', - 'enabled_label' => '启用', - 'enabled_help' => '被禁用后不会继续在前端显示.', - 'enable_or_disable_title' => '启用 或 禁用', - 'enable_or_disable' => '启用 或 禁用', - 'selected_amount' => '已选项: :amount', - 'enable_success' => '成功启用所选项.', - 'disable_success' => '成功禁用所选项.', - 'disable_confirm' => '确认禁用该项?', - 'unpin_label' => '未固定', - 'pinned_label' => '固定', - 'pinned_help' => '固定位置在列表中排在第一位。', - 'pin_or_unpin_title' => '固定或取消固定位置', - 'pin_or_unpin' => '固定或取消固定', - 'pin_success' => '已成功固定选定的位置。', - 'unpin_success' => '已成功取消固定选定位置。', - 'unpin_confirm' => '你确定吗?', - 'list_title' => '管理位置信息', - 'delete_confirm' => '确认删除该记录?', - 'return_to_list' => '返回位置列表', - 'default_country' => '默认国家', - 'default_country_comment' => '用户未设置国家时系统默认国家.', - 'default_state' => '省市/地区', - 'default_state_comment' => '用户未选择地区时默认使用省市/地区.', - ], - 'settings' => [ - 'menu_label' => '位置设置', - 'menu_description' => '管理基于位置的设置。', - 'google_maps_key' => '谷歌地图 API 密钥', - 'google_maps_key_comment' => '如果您打算使用 Google 地图服务,请在此处输入 API 密钥。', - 'credentials_tab' => '证书', - ], - 'state' => [ - 'label' => '省市/地区', - 'name' => '名字', - 'select' => '-- 选择省市/地区 --', - 'name_comment' => '输入省市/地区名.', - 'code' => '代码', - 'code_comment' => '输入省市/地区代码.', - ], - 'country' => [ - 'label' => '国家', - 'name' => '名字', - 'select' => '-- 选择国家 --', - 'code' => '代码', - 'code_comment' => '输入国家唯一编码.', - 'enabled' => '启用', - 'pinned' => '固定', - 'calling_code' => '调用代码', - 'calling_code_comment' => '不带加号的数字国家/地区呼叫代码。', - ], + 'plugin' => [ + 'name' => '位置', + 'description' => '基于位置的功能,例如国家和地区。', + ], + 'permissions' => [ + 'settings' => '位置管理', + ], + 'location' => [ + 'label' => '位置信息', + 'new' => '新建位置信息', + 'create_title' => '创建位置信息', + 'update_title' => '修改位置信息', + 'preview_title' => '预览位置信息', + ], + 'locations' => [ + 'menu_label' => '位置信息', + 'menu_description' => '管理国家和地区.', + 'disabled_label' => '隐藏被禁用项', + 'enabled_label' => '启用', + 'enabled_help' => '被禁用后不会继续在前端显示.', + 'enable_or_disable_title' => '启用 或 禁用', + 'enable_or_disable' => '启用 或 禁用', + 'selected_amount' => '已选项: :amount', + 'enable_success' => '成功启用所选项.', + 'disable_success' => '成功禁用所选项.', + 'disable_confirm' => '确认禁用该项?', + 'unpin_label' => '未固定', + 'pinned_label' => '固定', + 'pinned_help' => '固定位置在列表中排在第一位。', + 'pin_or_unpin_title' => '固定或取消固定位置', + 'pin_or_unpin' => '固定或取消固定', + 'pin_success' => '已成功固定选定的位置。', + 'unpin_success' => '已成功取消固定选定位置。', + 'unpin_confirm' => '你确定吗?', + 'list_title' => '管理位置信息', + 'delete_confirm' => '确认删除该记录?', + 'return_to_list' => '返回位置列表', + 'default_country' => '默认国家', + 'default_country_comment' => '用户未设置国家时系统默认国家.', + 'default_state' => '省市/地区', + 'default_state_comment' => '用户未选择地区时默认使用省市/地区.', + ], + 'settings' => [ + 'menu_label' => '位置设置', + 'menu_description' => '管理基于位置的设置。', + 'google_maps_key' => '谷歌地图 API 密钥', + 'google_maps_key_comment' => '如果您打算使用 Google 地图服务,请在此处输入 API 密钥。', + 'credentials_tab' => '证书', + ], + 'state' => [ + 'name' => '名字', + 'name_comment' => '输入省市/地区名.', + 'code' => '代码', + 'code_comment' => '输入省市/地区代码.', + ], + 'country' => [ + 'name' => '名字', + 'code' => '代码', + 'code_comment' => '输入国家唯一编码.', + 'enabled' => '启用', + 'pinned' => '固定', + 'calling_code' => '调用代码', + 'calling_code_comment' => '不带加号的数字国家/地区呼叫代码。', + ], ]; diff --git a/lang/zh-tw.json b/lang/zh-tw.json new file mode 100644 index 0000000..573f370 --- /dev/null +++ b/lang/zh-tw.json @@ -0,0 +1,6 @@ +{ + "Country": "國家", + "-- select country --": "-- 選擇國家 --", + "State": "州", + "-- select state --": "-- 選擇州別 --" +} \ No newline at end of file diff --git a/lang/zh-tw/lang.php b/lang/zh-tw/lang.php index 705d82e..6d8adba 100644 --- a/lang/zh-tw/lang.php +++ b/lang/zh-tw/lang.php @@ -1,69 +1,63 @@ - [ - 'name' => '地區', - 'description' => '提供基本地區功能,如國家、州', - ], - 'permissions' => [ - 'settings' => '地區位置', - ], - 'location' => [ - 'label' => '地區', - 'new' => '新地區', - 'create_title' => '建立新地區', - 'update_title' => '編輯地區', - 'preview_title' => '預覽地區', - ], - 'locations' => [ - 'menu_label' => '國家及州', - 'menu_description' => '管理會員可選的國家及州別。', - 'disabled_label' => '已停用', - 'enabled_label' => '啟用', - 'enabled_help' => '停用的位置不會在前台顯示。', - 'enable_or_disable_title' => "啟用或停用位置", - 'enable_or_disable' => '啟用或停用', - 'selected_amount' => '已選取位置數: :amount', - 'enable_success' => '已啟用選取的位置。', - 'disable_success' => '已停用選取的位置。', - 'disable_confirm' => '是否確認?', - 'unpin_label' => '取消釘選', - 'pinned_label' => '已釘選', - 'pinned_help' => '釘選的位置將出現在列表頂部。', - 'pin_or_unpin_title' => "釘選或取消釘選位置", - 'pin_or_unpin' => '釘選或取消釘選', - 'pin_success' => '已釘選所選的位置。', - 'unpin_success' => '已取消釘選所選的位置。', - 'unpin_confirm' => '是否確認?', - 'list_title' => '管理位置', - 'delete_confirm' => '是否刪除這個位置?', - 'return_to_list' => '返回位置列表', - 'default_country' => '預設國別', - 'default_country_comment' => '若會員未選取國家,將直接套用預設的值。', - 'default_state' => '預設州別', - 'default_state_comment' => '若會員未選取州別,將直接套用預設的值。', - ], - 'settings' => [ - 'menu_label' => '位置設定', - 'menu_description' => '管理基本位置設定。', - 'google_maps_key_comment' => '若欲使用 Google Maps 的服務,請在此輸入 API key。', - 'credentials_tab' => '金鑰', - ], - 'state' => [ - 'label' => '州', - 'name' => '名稱', - 'select' => '-- 選擇州別 --', - 'name_comment' => '輸入顯示名稱', - 'code' => '代碼', - 'code_comment' => '輸入用於識別此州的唯一代碼。', - ], - 'country' => [ - 'label' => '國家', - 'name' => '名稱', - 'select' => '-- 選擇國家 --', - 'code' => '代碼', - 'code_comment' => '輸入用於識別此國家的唯一代碼。', - 'enabled' => '已啟用', - 'pinned' => '已釘選', - ], + [ + 'name' => '地區', + 'description' => '提供基本地區功能,如國家、州', + ], + 'permissions' => [ + 'settings' => '地區位置', + ], + 'location' => [ + 'label' => '地區', + 'new' => '新地區', + 'create_title' => '建立新地區', + 'update_title' => '編輯地區', + 'preview_title' => '預覽地區', + ], + 'locations' => [ + 'menu_label' => '國家及州', + 'menu_description' => '管理會員可選的國家及州別。', + 'disabled_label' => '已停用', + 'enabled_label' => '啟用', + 'enabled_help' => '停用的位置不會在前台顯示。', + 'enable_or_disable_title' => '啟用或停用位置', + 'enable_or_disable' => '啟用或停用', + 'selected_amount' => '已選取位置數: :amount', + 'enable_success' => '已啟用選取的位置。', + 'disable_success' => '已停用選取的位置。', + 'disable_confirm' => '是否確認?', + 'unpin_label' => '取消釘選', + 'pinned_label' => '已釘選', + 'pinned_help' => '釘選的位置將出現在列表頂部。', + 'pin_or_unpin_title' => '釘選或取消釘選位置', + 'pin_or_unpin' => '釘選或取消釘選', + 'pin_success' => '已釘選所選的位置。', + 'unpin_success' => '已取消釘選所選的位置。', + 'unpin_confirm' => '是否確認?', + 'list_title' => '管理位置', + 'delete_confirm' => '是否刪除這個位置?', + 'return_to_list' => '返回位置列表', + 'default_country' => '預設國別', + 'default_country_comment' => '若會員未選取國家,將直接套用預設的值。', + 'default_state' => '預設州別', + 'default_state_comment' => '若會員未選取州別,將直接套用預設的值。', + ], + 'settings' => [ + 'menu_label' => '位置設定', + 'menu_description' => '管理基本位置設定。', + 'google_maps_key_comment' => '若欲使用 Google Maps 的服務,請在此輸入 API key。', + 'credentials_tab' => '金鑰', + ], + 'state' => [ + 'name' => '名稱', + 'name_comment' => '輸入顯示名稱', + 'code' => '代碼', + 'code_comment' => '輸入用於識別此州的唯一代碼。', + ], + 'country' => [ + 'name' => '名稱', + 'code' => '代碼', + 'code_comment' => '輸入用於識別此國家的唯一代碼。', + 'enabled' => '已啟用', + 'pinned' => '已釘選', + ], ]; From ca219b002b2461cc9a0d3abc0dffbe4c84a46fd2 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Mon, 12 Feb 2024 18:03:03 +1100 Subject: [PATCH 04/16] Refactor country state models --- README.md | 8 +- .../locations/_states_list_toolbar.htm | 2 +- controllers/locations/config_relation.yaml | 2 +- models/Country.php | 110 +++++++++++++----- models/State.php | 67 ++++++++--- updates/000001_create_countries.php | 6 +- updates/migrate_from_version1.php | 22 ++++ updates/version.yaml | 3 + 8 files changed, 166 insertions(+), 54 deletions(-) create mode 100644 updates/migrate_from_version1.php diff --git a/README.md b/README.md index ae7d3dd..8f1ab27 100644 --- a/README.md +++ b/README.md @@ -45,13 +45,13 @@ You are free to add the following form field definitions: ```yaml country: - label: rainlab.location::lang.country.label + label: Country type: dropdown span: left placeholder: rainlab.location::lang.country.select state: - label: rainlab.location::lang.state.label + label: State type: dropdown span: right dependsOn: country @@ -64,14 +64,14 @@ For the list column definitions, you can use the following snippet: ```yaml country: - label: rainlab.location::lang.country.label + label: Country searchable: true relation: country select: name sortable: false state: - label: rainlab.location::lang.state.label + label: State searchable: true relation: state select: name diff --git a/controllers/locations/_states_list_toolbar.htm b/controllers/locations/_states_list_toolbar.htm index dae8d0f..16f6880 100644 --- a/controllers/locations/_states_list_toolbar.htm +++ b/controllers/locations/_states_list_toolbar.htm @@ -5,7 +5,7 @@ data-size="huge" href="javascript:;" class="btn btn-sm btn-secondary oc-icon-file"> - trans('rainlab.location::lang.state.label')])) ?> + __("State")])) ?> - + diff --git a/controllers/locations/_states_list_toolbar.htm b/controllers/locations/_states_list_toolbar.htm index 16f6880..aa18bb7 100644 --- a/controllers/locations/_states_list_toolbar.htm +++ b/controllers/locations/_states_list_toolbar.htm @@ -21,14 +21,14 @@ data-trigger=".control-list input[type=checkbox]" data-trigger-condition="checked" data-stripe-load-indicator> - + - + - diff --git a/controllers/locations/_list_toolbar.htm b/controllers/locations/_list_toolbar.htm deleted file mode 100644 index 8197eb4..0000000 --- a/controllers/locations/_list_toolbar.htm +++ /dev/null @@ -1,36 +0,0 @@ -
- - - - - -
diff --git a/controllers/locations/_list_toolbar.php b/controllers/locations/_list_toolbar.php new file mode 100644 index 0000000..481213e --- /dev/null +++ b/controllers/locations/_list_toolbar.php @@ -0,0 +1,18 @@ +
+ icon('icon-plus') + ->primary() ?> + + ajaxData(['location_type' => 'country']) + ->listCheckedTrigger() + ->listCheckedRequest() + ->icon('icon-magic') + ->secondary() ?> + + listCheckedTrigger() + ->listCheckedRequest() + ->icon('icon-map-pin') + ->secondary() ?> +
diff --git a/controllers/locations/_states_list_toolbar.htm b/controllers/locations/_states_list_toolbar.htm deleted file mode 100644 index aa18bb7..0000000 --- a/controllers/locations/_states_list_toolbar.htm +++ /dev/null @@ -1,40 +0,0 @@ -
- - __("State")])) ?> - - - - - -
diff --git a/controllers/locations/_states_list_toolbar.php b/controllers/locations/_states_list_toolbar.php new file mode 100644 index 0000000..0a46c2a --- /dev/null +++ b/controllers/locations/_states_list_toolbar.php @@ -0,0 +1,19 @@ +
+ icon('icon-file') + ->secondary() ?> + + ajaxData(['location_type' => 'country']) + ->listCheckedTrigger() + ->listCheckedRequest() + ->icon('icon-magic') + ->secondary() ?> + + listCheckedTrigger() + ->listCheckedRequest() + ->confirmMessage(__("Do you really want to delete this location?")) + ->icon('icon-map-pin') + ->secondary() ?> +
diff --git a/controllers/locations/_unpin_form.htm b/controllers/locations/_unpin_form.php similarity index 78% rename from controllers/locations/_unpin_form.htm rename to controllers/locations/_unpin_form.php index 168e457..bfbf21c 100644 --- a/controllers/locations/_unpin_form.htm +++ b/controllers/locations/_unpin_form.php @@ -1,7 +1,7 @@ 'unpinForm']) ?> - @@ -35,9 +33,7 @@ - - diff --git a/controllers/locations/config_form.yaml b/controllers/locations/config_form.yaml index d4dff24..2090afa 100644 --- a/controllers/locations/config_form.yaml +++ b/controllers/locations/config_form.yaml @@ -14,6 +14,11 @@ modelClass: RainLab\Location\Models\Country # Default redirect location defaultRedirect: rainlab/location/locations +# Form Design +design: + displayMode: basic + size: 750 + # Create page create: title: Create Location diff --git a/controllers/locations/config_list.yaml b/controllers/locations/config_list.yaml index cd42a17..de57a5b 100644 --- a/controllers/locations/config_list.yaml +++ b/controllers/locations/config_list.yaml @@ -3,7 +3,10 @@ # =================================== # Model List Column configuration -list: ~/plugins/rainlab/location/models/country/columns.yaml +list: $/rainlab/location/models/country/columns.yaml + +# Filter widget configuration +filter: $/rainlab/location/models/country/scopes.yaml # Model Class name modelClass: RainLab\Location\Models\Country @@ -39,6 +42,3 @@ toolbar: # Search widget configuration search: prompt: backend::lang.list.search_prompt - -# Filter widget configuration -filter: config_filter.yaml diff --git a/controllers/locations/config_relation.yaml b/controllers/locations/config_relation.yaml index a0dbe71..45e7606 100644 --- a/controllers/locations/config_relation.yaml +++ b/controllers/locations/config_relation.yaml @@ -4,9 +4,9 @@ states: label: State - list: ~/plugins/rainlab/location/models/state/columns.yaml - form: ~/plugins/rainlab/location/models/state/fields.yaml + list: $/rainlab/location/models/state/columns.yaml + form: $/rainlab/location/models/state/fields.yaml view: showSearch: true toolbarPartial: $/rainlab/location/controllers/locations/_states_list_toolbar.htm - filter: $/rainlab/location/models/state/filters.yaml + filter: $/rainlab/location/models/state/scopes.yaml diff --git a/controllers/locations/create.htm b/controllers/locations/create.htm deleted file mode 100644 index c009b24..0000000 --- a/controllers/locations/create.htm +++ /dev/null @@ -1,52 +0,0 @@ - -
    -
  • -
  • pageTitle)) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - - -

fatalError)) ?>

-

- - - -

- - diff --git a/controllers/locations/create.php b/controllers/locations/create.php new file mode 100644 index 0000000..897bc89 --- /dev/null +++ b/controllers/locations/create.php @@ -0,0 +1,8 @@ + +
    +
  • +
  • pageTitle)) ?>
  • +
+ + +formRenderDesign() ?> diff --git a/controllers/locations/index.htm b/controllers/locations/index.php similarity index 100% rename from controllers/locations/index.htm rename to controllers/locations/index.php diff --git a/controllers/locations/update.htm b/controllers/locations/update.htm deleted file mode 100644 index 18d1f82..0000000 --- a/controllers/locations/update.htm +++ /dev/null @@ -1,60 +0,0 @@ - -
    -
  • -
  • pageTitle)) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
-
- relationRender('states') ?> -
- -
- -
- - - - - - -
-
- - - - - -

fatalError)) ?>

-

- - \ No newline at end of file diff --git a/controllers/locations/update.php b/controllers/locations/update.php new file mode 100644 index 0000000..897bc89 --- /dev/null +++ b/controllers/locations/update.php @@ -0,0 +1,8 @@ + +
    +
  • +
  • pageTitle)) ?>
  • +
+ + +formRenderDesign() ?> diff --git a/lang/en.json b/lang/en.json index 2187174..e8821a0 100644 --- a/lang/en.json +++ b/lang/en.json @@ -36,7 +36,6 @@ "Code": "Code", "Calling Code": "Calling Code", "Enter a unique code to identify this country.": "Enter a unique code to identify this country.", - "Numerical country calling code without the plus sign.": "Numerical country calling code without the plus sign.", "Default Country": "Default Country", "When a user does not specify their location, select a default country to use.": "When a user does not specify their location, select a default country to use.", "Default State": "Default State", diff --git a/lang/fr.json b/lang/fr.json index 90caedd..16daab1 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -36,7 +36,6 @@ "Code": "Code", "Calling Code": "Indicatif téléphonique", "Enter a unique code to identify this country.": "Entrez un code unique pour identifier ce pays.", - "Numerical country calling code without the plus sign.": "Indicatif téléphonique du pays sans le signe plus.", "Default Country": "Pays par défaut", "When a user does not specify their location, select a default country to use.": "Si un utilisateur n'indique pas son pays, ce pays sera choisi par défaut.", "Default State": "Région par défaut", diff --git a/lang/uk.json b/lang/uk.json index 8329caf..c5d8e09 100644 --- a/lang/uk.json +++ b/lang/uk.json @@ -36,7 +36,6 @@ "Code": "Код", "Calling Code": "Код виклику", "Enter a unique code to identify this country.": "Введіть унікальний код для ідентифікації цієї країни.", - "Numerical country calling code without the plus sign.": "Числовий телефонний код країни без знака плюс.", "Default Country": "За замовчуванням", "When a user does not specify their location, select a default country to use.": "Якщо користувач не визначає місце розташування, буде встановлено країну за умовчанням.", "Default State": "Область за промовчанням", diff --git a/lang/zh-cn.json b/lang/zh-cn.json index c1826cc..f48e7d5 100644 --- a/lang/zh-cn.json +++ b/lang/zh-cn.json @@ -36,7 +36,6 @@ "Code": "代码", "Calling Code": "调用代码", "Enter a unique code to identify this country.": "输入国家唯一编码.", - "Numerical country calling code without the plus sign.": "不带加号的数字国家/地区呼叫代码。", "Default Country": "默认国家", "When a user does not specify their location, select a default country to use.": "用户未设置国家时系统默认国家.", "Default State": "省市/地区", diff --git a/models/country/columns.yaml b/models/country/columns.yaml index a77cb64..0835bf4 100644 --- a/models/country/columns.yaml +++ b/models/country/columns.yaml @@ -11,6 +11,14 @@ columns: label: Code searchable: true + iso_code: + label: ISO Code + searchable: true + + calling_code: + label: Calling Code + searchable: true + is_enabled: label: Enabled type: switch @@ -18,8 +26,3 @@ columns: is_pinned: label: Pinned type: switch - - calling_code: - label: Calling Code - searchable: true - invisible: true diff --git a/models/country/fields.yaml b/models/country/fields.yaml index 7f88442..4cce9a3 100644 --- a/models/country/fields.yaml +++ b/models/country/fields.yaml @@ -2,27 +2,52 @@ # Form Field Definitions # =================================== -fields: - name: - label: Name - span: full - - is_enabled: - label: Enabled - type: checkbox - span: left - - is_pinned: - label: Pinned - type: checkbox - span: right - - code: - label: Code - span: auto - comment: Enter a unique code to identify this country. - - calling_code: - label: Calling Code - span: auto - comment: Numerical country calling code without the plus sign. +tabs: + defaultTab: Country + fields: + name: + label: Name + span: full + + code: + label: Country Code + comment: Enter a unique code to identify this country. + span: full + + iso_code: + label: ISO Code + commentAbove: "Specify 3-letter ISO country code (eg: USA). You can find country names and codes here: %s" + commentHtml: true + span: auto + + calling_code: + label: Calling Code + span: auto + commentAbove: "Specify country dial-in code without the plus sign. You can find calling codes here: %s" + commentHtml: true + + is_enabled: + label: Enabled + comment: "Disabled countries are not shown on the frontend." + type: checkbox + default: true + + is_enabled_edit: + label: Enabled in the Admin Panel + comment: Use this if you want the country to be enabled in the admin panel. + type: checkbox + default: true + trigger: + action: disable|fill + field: is_enabled + condition: checked + + is_pinned: + label: Pinned + comment: Show this country at the top of dropdown lists for quicker selection. + type: checkbox + + states: + type: relation + label: Define states for this country, or leave this list empty if there are no states in the country. + tab: States diff --git a/controllers/locations/config_filter.yaml b/models/country/scopes.yaml similarity index 56% rename from controllers/locations/config_filter.yaml rename to models/country/scopes.yaml index c2c67ef..f97e40c 100644 --- a/controllers/locations/config_filter.yaml +++ b/models/country/scopes.yaml @@ -1,14 +1,7 @@ scopes: - enabled: - - # Filter name - label: Disabled - - # Filter type + label: Enabled type: switch - - # SQL Conditions conditions: - is_enabled = '1' - is_enabled = '0' diff --git a/models/state/filters.yaml b/models/state/scopes.yaml similarity index 100% rename from models/state/filters.yaml rename to models/state/scopes.yaml diff --git a/updates/000001_create_countries.php b/updates/000001_create_countries.php index 21c3ea4..f0682ec 100644 --- a/updates/000001_create_countries.php +++ b/updates/000001_create_countries.php @@ -12,7 +12,6 @@ public function up() $table->string('name')->index(); $table->string('code'); $table->string('iso_code')->nullable(); - $table->string('numeric_code')->nullable(); $table->string('calling_code')->nullable(); $table->boolean('is_enabled')->default(false); $table->boolean('is_enabled_edit')->default(false); diff --git a/updates/migrate_from_version1.php b/updates/migrate_from_version1.php index 58bff19..25c83cd 100644 --- a/updates/migrate_from_version1.php +++ b/updates/migrate_from_version1.php @@ -10,7 +10,6 @@ public function up() if (!Schema::hasColumn('rainlab_location_countries', 'iso_code')) { Schema::table('rainlab_location_countries', function(Blueprint $table) { $table->string('iso_code')->nullable(); - $table->string('numeric_code')->nullable(); $table->boolean('is_enabled_edit')->default(false); }); } From 2e3ea37608fc9b3647d9fe964dfbeca08e79df91 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Tue, 12 Mar 2024 15:32:43 +1100 Subject: [PATCH 12/16] Move settings to user category --- Plugin.php | 9 +++++---- controllers/Locations.php | 2 +- models/Setting.php | 25 +++++++++++++++++++++---- models/state/fields.yaml | 3 ++- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/Plugin.php b/Plugin.php index 837742e..160d3fd 100644 --- a/Plugin.php +++ b/Plugin.php @@ -2,6 +2,7 @@ use Backend; use System\Classes\PluginBase; +use System\Classes\SettingsManager; /** * Plugin Information File @@ -31,20 +32,20 @@ public function registerSettings() 'location' => [ 'label' => "Countries & States", 'description' => "Manage available user countries and states.", - 'category' => "Location", + 'category' => SettingsManager::CATEGORY_USERS, 'icon' => 'icon-globe', 'url' => Backend::url('rainlab/location/locations'), - 'order' => 500, + 'order' => 700, 'permissions' => ['rainlab.location.access_settings'], 'keywords' => 'country, countries, state', ], 'settings' => [ 'label' => "Location Settings", 'description' => "Manage location based settings.", - 'category' => "Location", + 'category' => SettingsManager::CATEGORY_USERS, 'icon' => 'icon-map-signs', 'class' => \RainLab\Location\Models\Setting::class, - 'order' => 600, + 'order' => 800, 'permissions' => ['rainlab.location.access_settings'], ] ]; diff --git a/controllers/Locations.php b/controllers/Locations.php index 22246c1..316689c 100644 --- a/controllers/Locations.php +++ b/controllers/Locations.php @@ -40,7 +40,7 @@ class Locations extends SettingsController /** * @var string settingsItemCode determines the settings code */ - public $settingsItemCode = 'locations'; + public $settingsItemCode = 'location'; /** * @var array requiredPermissions to view this page. diff --git a/models/Setting.php b/models/Setting.php index cda697e..a2cf7f2 100644 --- a/models/Setting.php +++ b/models/Setting.php @@ -1,14 +1,25 @@ google_maps_key = ''; @@ -16,11 +27,17 @@ public function initSettingsData() $this->default_state = 1; } + /** + * getDefaultCountryOptions + */ public function getDefaultCountryOptions() { return Country::getNameList(); } + /** + * getDefaultStateOptions + */ public function getDefaultStateOptions() { return State::getNameList($this->default_country); diff --git a/models/state/fields.yaml b/models/state/fields.yaml index 211bd17..0e86301 100644 --- a/models/state/fields.yaml +++ b/models/state/fields.yaml @@ -18,6 +18,7 @@ fields: is_enabled: label: Enabled + comment: Uncheck to hide this state from the selection lists. type: checkbox default: true - span: left \ No newline at end of file + span: left From 103da98e7ed71b12330ca37f894c6fdc89bbc7d3 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Mon, 25 Mar 2024 12:29:52 +1100 Subject: [PATCH 13/16] Adds location component --- Plugin.php | 11 ++++++++++ README.md | 18 +++++++++-------- behaviors/LocationModel.php | 2 +- components/Location.php | 29 +++++++++++++++++++++++++++ components/partials/country-state.htm | 24 ---------------------- 5 files changed, 51 insertions(+), 33 deletions(-) create mode 100644 components/Location.php delete mode 100644 components/partials/country-state.htm diff --git a/Plugin.php b/Plugin.php index 160d3fd..51ad8d8 100644 --- a/Plugin.php +++ b/Plugin.php @@ -77,6 +77,17 @@ public function registerMarkupTags() ]; } + + /** + * registerComponents + */ + public function registerComponents() + { + return [ + \RainLab\Location\Components\Location::class => 'location', + ]; + } + /** * registerFormWidgets registers any form widgets implemented in this plugin. */ diff --git a/README.md b/README.md index 879e3f2..726ab6d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Location plugin -This plugin adds location based features to [OctoberCMS](http://octobercms.com). +This plugin adds location based features to [October CMS](http://octobercms.com). * Easily add Country and State to any model * Form widget for address lookups (Google API) @@ -11,7 +11,7 @@ To integrate locations with front-end users consider installing the [User Plus+ ### Google API key requirement -As of June 22, 2016 the Google Maps service requires an API key. You may generate a key from the following link: +Using the Google Maps service requires an API key. You may generate a key from the following link: - [Get a Google API key](https://developers.google.com/maps/documentation/javascript/get-api-key) @@ -26,10 +26,10 @@ $table->integer('country_id')->unsigned()->nullable()->index(); $table->integer('state_id')->unsigned()->nullable()->index(); ``` -Then implement the **RainLab.Location.Behaviors.LocationModel** behavior in the model class: +Then implement the **RainLab\Location\Traits\LocationModel** trait in the model class: ```php -public $implement = ['RainLab.Location.Behaviors.LocationModel']; +use \RainLab\Location\Traits\LocationModel; ``` This will automatically create two "belongs to" relationships: @@ -111,11 +111,13 @@ The front-end can also use the relationships by creating a partial called **coun This partial can be rendered in a form with the following: -
- {% partial 'country-state' countryId=user.country_id stateId=user.state_id %} -
+```twig +
+ {% partial 'country-state' countryId=user.country_id stateId=user.state_id %} +
+``` -### Short code accessors +### Short Code Accessors The behavior will also add a special short code accessor and setter to the model that converts `country_code` and `state_code` to their respective identifiers. diff --git a/behaviors/LocationModel.php b/behaviors/LocationModel.php index 11a3eb3..f2058a7 100644 --- a/behaviors/LocationModel.php +++ b/behaviors/LocationModel.php @@ -15,7 +15,7 @@ class LocationModel extends ModelBehavior { /** - * Constructor + * __construct */ public function __construct($model) { diff --git a/components/Location.php b/components/Location.php new file mode 100644 index 0000000..4fc3556 --- /dev/null +++ b/components/Location.php @@ -0,0 +1,29 @@ + 'Location Component', + 'description' => 'No description provided yet...' + ]; + } + + /** + * availableCountries + */ + public function availableCountries() + { + return Country::getObjectList(); + } +} diff --git a/components/partials/country-state.htm b/components/partials/country-state.htm deleted file mode 100644 index c680756..0000000 --- a/components/partials/country-state.htm +++ /dev/null @@ -1,24 +0,0 @@ -{% set countryId = countryId|default(form_value('country_id')) %} -{% set stateId = stateId|default(form_value('state_id')) %} - -
- - {{ form_select_country('country_id', countryId, { - id: 'accountCountry', - class: 'form-control', - emptyOption: '', - 'data-request': 'onInit', - 'data-request-update': { - (__SELF__ ~ '::country-state'): '#partialCountryState' - } - }) }} -
- -
- - {{ form_select_state('state_id', countryId, stateId, { - id: 'accountState', - class: 'form-control', - emptyOption: '' - }) }} -
From e8e3e66786bcf2ac33c64b56e1e799b9985d3195 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Wed, 3 Apr 2024 11:37:57 +1100 Subject: [PATCH 14/16] Minor --- traits/LocationModel.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/traits/LocationModel.php b/traits/LocationModel.php index cb79ebe..7be97f0 100644 --- a/traits/LocationModel.php +++ b/traits/LocationModel.php @@ -10,12 +10,12 @@ * @property int $state_id * @property string $country_code * @property string $state_code - * @property \October\Rain\Database\Model|null $country - * @property \October\Rain\Database\Model|null $state + * @property \RainLab\Location\Models\Country|null $country + * @property \RainLab\Location\Models\State|null $state * @method \October\Rain\Database\Relations\BelongsTo country() * @method \October\Rain\Database\Relations\BelongsTo state() * - * @package october\user + * @package rainlab\location * @author Alexey Bobkov, Samuel Georges */ trait LocationModel From 47db1ca661d140a2483ad8be94007febc23e6693 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Wed, 3 Apr 2024 19:48:05 +1100 Subject: [PATCH 15/16] Use location component partials for country/state selects --- README.md | 29 +++------------------ components/location/form-select-country.htm | 18 +++++++++++++ components/location/form-select-state.htm | 25 ++++++++++++++++++ 3 files changed, 46 insertions(+), 26 deletions(-) create mode 100644 components/location/form-select-country.htm create mode 100644 components/location/form-select-state.htm diff --git a/README.md b/README.md index 726ab6d..de7c213 100644 --- a/README.md +++ b/README.md @@ -80,40 +80,17 @@ state: ### Front-end usage -The front-end can also use the relationships by creating a partial called **country-state** with the content: +The front-end can also use the relationships by rendering the `@form-select-country` and `@form-select-state` partials provided by the location component. Before proceeding, make sure you have the `location` component attached to the page or layout. ```twig -{% set countryId = countryId|default(form_value('country_id')) %} -{% set stateId = stateId|default(form_value('state_id')) %} -
- {{ form_select_country('country_id', countryId, { - id: 'accountCountry', - class: 'form-control', - emptyOption: '', - 'data-request': 'onInit', - 'data-request-update': { - 'country-state': '#partialCountryState' - } - }) }} + {% partial '@form-select-country' countryId=user.country_id %}
- {{ form_select_state('state_id', countryId, stateId, { - id: 'accountState', - class: 'form-control', - emptyOption: '' - }) }} -
-``` - -This partial can be rendered in a form with the following: - -```twig -
- {% partial 'country-state' countryId=user.country_id stateId=user.state_id %} + {% partial '@form-select-state' countryId=user.country_id stateId=user.state_id %}
``` diff --git a/components/location/form-select-country.htm b/components/location/form-select-country.htm new file mode 100644 index 0000000..ef5de5f --- /dev/null +++ b/components/location/form-select-country.htm @@ -0,0 +1,18 @@ +{% set countryId = countryId|default(post('country_id')) %} +{% set uniqueId = post('country_unique_id', uniqueId|default('stateControlSelector')) %} +{% set countries = __SELF__.availableCountries|default([]) %} + + diff --git a/components/location/form-select-state.htm b/components/location/form-select-state.htm new file mode 100644 index 0000000..4bfef81 --- /dev/null +++ b/components/location/form-select-state.htm @@ -0,0 +1,25 @@ +{% set countryId = post('country_id', countryId|default(null)) %} +{% set stateId = post('state_id', stateId|default(null)) %} +{% set uniqueId = post('country_unique_id', uniqueId|default('stateControlSelector')) %} +{% set countries = __SELF__.availableCountries|default([]) %} +{% set country = countries.find(countryId)|default(countries.first()) %} +{% set states = country.fetchStates() %} +{% set optionsOnly = post('country_unique_id') %} + +{% if optionsOnly %} + + {% for state in states %} + + {% endfor %} +{% else %} + +{% endif %} From 67e1c3d4c5e4bcc492efa91aef04ff581103a1a6 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Tue, 16 Apr 2024 18:32:54 +1000 Subject: [PATCH 16/16] Update README --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de7c213..665d593 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,19 @@ # Location plugin -This plugin adds location based features to [October CMS](http://octobercms.com). +This plugin adds location based features to [October CMS](https://octobercms.com). * Easily add Country and State to any model * Form widget for address lookups (Google API) +View this plugin on the October CMS marketplace: + +- https://octobercms.com/plugin/rainlab-location + ### Extended features -To integrate locations with front-end users consider installing the [User Plus+ plugin](http://octobercms.com/plugin/rainlab-userplus) (`RainLab.UserPlus`). +To integrate locations with front-end users, consider also installing the `RainLab.UserPlus` plugin. + +- https://octobercms.com/plugin/rainlab-userplus ### Google API key requirement