add spatie and nova translatable

This commit is contained in:
2023-11-23 14:13:54 +05:00
parent 0cf71e680d
commit 220f14f388
7 changed files with 323 additions and 2 deletions

View File

@@ -8,9 +8,11 @@
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/nova": "*",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8",
"laravel/nova": "*"
"outl1ne/nova-translatable": "^2.2",
"spatie/laravel-translatable": "^6.5"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",

258
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f3daa2b64bb2c5b0c1e69b4068a8006c",
"content-hash": "e58705525417fe8583204c5b8835fd2e",
"packages": [
{
"name": "brick/math",
@@ -2884,6 +2884,57 @@
},
"time": "2023-08-13T19:53:39+00:00"
},
{
"name": "nova-kit/nova-packages-tool",
"version": "v1.13.3",
"source": {
"type": "git",
"url": "https://github.com/nova-kit/nova-packages-tool.git",
"reference": "9e1312b57d250de5ea05b9cce930abafbb53575c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nova-kit/nova-packages-tool/zipball/9e1312b57d250de5ea05b9cce930abafbb53575c",
"reference": "9e1312b57d250de5ea05b9cce930abafbb53575c",
"shasum": ""
},
"require": {
"laravel/nova": ">=4.27.0 <4.28.0",
"php": "^7.3 || ^8.0"
},
"require-dev": {
"nova-kit/nova-devtool": "^1.0",
"orchestra/testbench": "^6.35 || ^7.29 || ^8.9"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"NovaKit\\NovaPackagesTool\\LaravelServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"NovaKit\\NovaPackagesTool\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mior Muhammad Zaki",
"email": "crynobone@gmail.com"
}
],
"description": "Tool for Laravel Nova Packages Development",
"support": {
"source": "https://github.com/nova-kit/nova-packages-tool/tree/v1.13.3"
},
"time": "2023-08-29T10:52:23+00:00"
},
{
"name": "nunomaduro/termwind",
"version": "v1.15.1",
@@ -3063,6 +3114,69 @@
],
"time": "2023-11-22T15:34:18+00:00"
},
{
"name": "outl1ne/nova-translatable",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/outl1ne/nova-translatable.git",
"reference": "321158d9e4d2bbf0800884946d0bea446ce495ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/outl1ne/nova-translatable/zipball/321158d9e4d2bbf0800884946d0bea446ce495ab",
"reference": "321158d9e4d2bbf0800884946d0bea446ce495ab",
"shasum": ""
},
"require": {
"laravel/nova": "^4.12",
"nova-kit/nova-packages-tool": "^1.0",
"php": ">=8.0",
"spatie/laravel-translatable": "^4.0 || ^5.0 || ^6.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Outl1ne\\NovaTranslatable\\FieldServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Outl1ne\\NovaTranslatable\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Tarvo Reinpalu",
"email": "tarvoreinpalu@gmail.com",
"role": "Developer"
},
{
"name": "Outl1ne",
"email": "info@outl1ne.com",
"role": "Maintainer"
}
],
"description": "A laravel-translatable extension for Laravel Nova.",
"keywords": [
"i18n",
"laravel",
"nova",
"translatable",
"translate"
],
"support": {
"issues": "https://github.com/outl1ne/nova-translatable/issues",
"source": "https://github.com/outl1ne/nova-translatable/tree/2.2.0"
},
"time": "2023-06-30T09:22:48+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.9.2",
@@ -3974,6 +4088,148 @@
],
"time": "2023-09-01T06:07:32+00:00"
},
{
"name": "spatie/laravel-package-tools",
"version": "1.16.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-package-tools.git",
"reference": "cc7c991555a37f9fa6b814aa03af73f88026a83d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/cc7c991555a37f9fa6b814aa03af73f88026a83d",
"reference": "cc7c991555a37f9fa6b814aa03af73f88026a83d",
"shasum": ""
},
"require": {
"illuminate/contracts": "^9.28|^10.0",
"php": "^8.0"
},
"require-dev": {
"mockery/mockery": "^1.5",
"orchestra/testbench": "^7.7|^8.0",
"pestphp/pest": "^1.22",
"phpunit/phpunit": "^9.5.24",
"spatie/pest-plugin-test-time": "^1.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\LaravelPackageTools\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"role": "Developer"
}
],
"description": "Tools for creating Laravel packages",
"homepage": "https://github.com/spatie/laravel-package-tools",
"keywords": [
"laravel-package-tools",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/laravel-package-tools/issues",
"source": "https://github.com/spatie/laravel-package-tools/tree/1.16.1"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-08-23T09:04:39+00:00"
},
{
"name": "spatie/laravel-translatable",
"version": "6.5.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-translatable.git",
"reference": "1906a3f1492c4b4b99d9f150b67cca4b697d85d7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/1906a3f1492c4b4b99d9f150b67cca4b697d85d7",
"reference": "1906a3f1492c4b4b99d9f150b67cca4b697d85d7",
"shasum": ""
},
"require": {
"illuminate/database": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0",
"php": "^8.0",
"spatie/laravel-package-tools": "^1.11"
},
"require-dev": {
"mockery/mockery": "^1.4",
"orchestra/testbench": "^7.0|^8.0",
"pestphp/pest": "^1.20"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\Translatable\\TranslatableServiceProvider"
]
},
"aliases": {
"Translatable": "Spatie\\Translatable\\Facades\\Translatable"
}
},
"autoload": {
"psr-4": {
"Spatie\\Translatable\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
},
{
"name": "Sebastian De Deyne",
"email": "sebastian@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "A trait to make an Eloquent model hold translations",
"homepage": "https://github.com/spatie/laravel-translatable",
"keywords": [
"eloquent",
"i8n",
"laravel-translatable",
"model",
"multilingual",
"spatie",
"translate"
],
"support": {
"issues": "https://github.com/spatie/laravel-translatable/issues",
"source": "https://github.com/spatie/laravel-translatable/tree/6.5.3"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2023-07-19T19:21:38+00:00"
},
{
"name": "spatie/once",
"version": "3.1.0",

View File

@@ -0,0 +1,49 @@
<?php
return [
/**
* The locales which the `translatable` wrapper will use by default.
*
* Can be a:
* - Keyed array (['en' => 'English])
* - Callable that returns a keyed array
*/
'locales' => ['en' => 'English'],
/**
* If enabled, the Nova's current locale will always be displayed as
* the first locale in the tabs arrangement.
*
* If disabled, the locales array order is respected.
*/
'prioritize_nova_locale' => true,
/**
* Defines the display type for the translatable tabs.
*
* Available options are: 'row', 'column', 'none'
*/
'display_type' => 'row',
/**
* Defines the display type for the translatable select.
*
* Available options are: 'left-absolute', 'left-static', 'right-absolute', 'right-static
*/
'locale_select_display_type' => 'right-absolute',
/**
* If set to a locale key, the translatable fields will automatically fill other
* locales of the field's value when saving the field from the defined "default"
* locale.
*
* Set to locale key (`en`, `ru`, etc) or null to enable/disable.
*/
'fill_other_locales_from' => null,
];

View File

@@ -0,0 +1,3 @@
{
"/tool.js": "/tool.js"
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
/*!
* vuex v4.1.0
* (c) 2022 Evan You
* @license MIT
*/
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

File diff suppressed because one or more lines are too long