Skip to content

Commit

Permalink
Merge pull request #123 from andrey-helldar/10.x
Browse files Browse the repository at this point in the history
[10.x] Minor fix for structure correction of the `laravel-lang/lang`
  • Loading branch information
Andrey Helldar committed Sep 24, 2021
2 parents 288cc0d + 645f090 commit 4c3318e
Show file tree
Hide file tree
Showing 158 changed files with 4,424 additions and 4,495 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
@@ -1,6 +1,8 @@
* text=auto

.github/ export-ignore
.run/ export-ignore

docs/ export-ignore
tests/ export-ignore

Expand Down
33 changes: 16 additions & 17 deletions composer.json
@@ -1,13 +1,15 @@
{
"name": "andrey-helldar/laravel-lang-publisher",
"description": "Publisher lang files for the Laravel Framework, Jetstream, Fortify, Cashier, Spark and Nova from Laravel-Lang/lang",
"description": "Publisher lang files for the Laravel and Lumen Frameworks, Jetstream, Fortify, Cashier, Spark and Nova from Laravel-Lang/lang",
"type": "library",
"license": "MIT",
"keywords": [
"breeze",
"cashier",
"fortify",
"i18n",
"jetstream",
"framework",
"lang",
"languages",
"laravel",
Expand All @@ -33,30 +35,27 @@
"issues": "https://github.com/andrey-helldar/laravel-lang-publisher/issues",
"source": "https://github.com/andrey-helldar/laravel-lang-publisher"
},
"suggest": {
"symfony/thanks": "Give thanks (in the form of a GitHub) to your fellow PHP package maintainers"
},
"require": {
"php": "^7.3|^8.0",
"ext-json": "*",
"andrey-helldar/laravel-support": "^2.0",
"andrey-helldar/pretty-array": "^2.0",
"andrey-helldar/support": "^3.16.1",
"andrey-helldar/verbose": "^1.2",
"illuminate/console": "^7.0|^8.0",
"illuminate/support": "^7.0|^8.0",
"laravel-lang/lang": "~10.0.0"
"andrey-helldar/contracts": "^1.19",
"andrey-helldar/pretty-array": "^2.4",
"andrey-helldar/support": "^4.6",
"illuminate/console": "^7.0|^8.0|^9.0",
"illuminate/contracts": "^7.0|^8.0|^9.0",
"illuminate/support": "^7.0|^8.0|^9.0",
"laravel-lang/lang": "^10.1"
},
"require-dev": {
"andrey-helldar/lang-translations": "^4.0",
"mockery/mockery": "^1.3.1",
"orchestra/testbench": "^5.0|^6.0",
"phpunit/phpunit": "^9.0",
"symfony/var-dumper": "^5.0"
"mockery/mockery": "^1.4.3",
"orchestra/testbench": "^5.0|^6.0|^7.0",
"phpunit/phpunit": "^9.4",
"symfony/var-dumper": "^5.0|^6.0"
},
"autoload": {
"psr-4": {
"Helldar\\LaravelLangPublisher\\": "src"
"Helldar\\LaravelLangPublisher\\": "src",
"LaravelLang\\Lang\\": "packages/laravel-lang"
}
},
"autoload-dev": {
Expand Down
41 changes: 20 additions & 21 deletions config/private.php
@@ -1,33 +1,32 @@
<?php

use Helldar\LaravelLangPublisher\Plugins\Cashier;
use Helldar\LaravelLangPublisher\Plugins\Fortify;
use Helldar\LaravelLangPublisher\Plugins\Jetstream;
use Helldar\LaravelLangPublisher\Plugins\Nova;
use Helldar\LaravelLangPublisher\Plugins\SparkPaddle;
use Helldar\LaravelLangPublisher\Plugins\SparkStripe;
/*
* This file is part of the "andrey-helldar/laravel-lang-publisher" project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Andrey Helldar <helldar@ai-rus.com>
*
* @copyright 2021 Andrey Helldar
*
* @license MIT
*
* @see https://github.com/andrey-helldar/laravel-lang-publisher
*/

return [
'packages' => [
'laravel-lang/lang',
],
declare(strict_types=1);

use LaravelLang\Lang\Publisher\Provider as LaravelLang;

return [
'plugins' => [
Cashier::class,
Fortify::class,
Jetstream::class,
Nova::class,
SparkPaddle::class,
SparkStripe::class,
LaravelLang::class,
],

'path' => [
'base' => base_path('vendor'),

'source' => 'source',

'locales' => 'locales',

'target' => resource_path('lang'),
'resources' => resource_path('lang'),
],
];
68 changes: 22 additions & 46 deletions config/public.php
@@ -1,5 +1,22 @@
<?php

/*
* This file is part of the "andrey-helldar/laravel-lang-publisher" project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Andrey Helldar <helldar@ai-rus.com>
*
* @copyright 2021 Andrey Helldar
*
* @license MIT
*
* @see https://github.com/andrey-helldar/laravel-lang-publisher
*/

declare(strict_types=1);

use Helldar\PrettyArray\Contracts\Caseable;

return [
Expand Down Expand Up @@ -30,24 +47,13 @@
* Key exclusion when combining.
*/

'exclude' => [
'excludes' => [
// 'auth' => ['throttle'],
// 'pagination' => ['previous'],
// 'passwords' => ['reset', 'throttled', 'user'],
// 'json' => ['Confirm Password'],
],

/*
* List of ignored localizations.
*/

'ignore' => [
// 'sq',
// 'ar',
// Helldar\LaravelLangPublisher\Constants\Locales::ALBANIAN,
// Helldar\LaravelLangPublisher\Constants\Locales::ARABIC,
],

/*
* Change key case.
*
Expand All @@ -62,45 +68,15 @@
* By default, Caseable::NO_CASE
*/

'case' => interface_exists(Caseable::class) ? Caseable::NO_CASE : 0,
'case' => Caseable::NO_CASE,

/*
* Determines from which packages to synchronize localization files.
*
* A prerequisite is compliance with a single file placement format:
*
* source/
* locales/
* af/
* af.json
* <filename>.php
* <locale>/
* <locale>.json
* <filename>.php
*/

'packages' => [
// 'andrey-helldar/lang-translations',
],

/*
* Defines a list of plugins with non-standard paths for saving files.
*
* Files from these plugins will be installed for all packages specified in the `packages` key,
* provided that the required package is installed in the application.
* Determines from which plugins to synchronize localization files.
*
* For example:
* \Helldar\LaravelLangPublisher\Plugins\Cashier::class,
* \Helldar\LaravelLangPublisher\Plugins\Nova::class,
* \Helldar\LaravelLangPublisher\Plugins\SparkPaddle::class,
* @see https://github.com/andrey-helldar/translations-template
*/

'plugins' => [
// \Helldar\LaravelLangPublisher\Plugins\Cashier::class,
// \Helldar\LaravelLangPublisher\Plugins\Fortify::class,
// \Helldar\LaravelLangPublisher\Plugins\Jetstream::class,
// \Helldar\LaravelLangPublisher\Plugins\Nova::class,
// \Helldar\LaravelLangPublisher\Plugins\SparkPaddle::class,
// \Helldar\LaravelLangPublisher\Plugins\SparkStripe::class,
// \LaravelLang\Lang\Publisher\Provider::class,
],
];
38 changes: 37 additions & 1 deletion docs/changelog/10-x.md
Expand Up @@ -2,6 +2,43 @@

# 10.x

## 10.1.0

### Fixed

- Minor fix for structure correction of the [laravel-lang/lang](https://github.com/Laravel-Lang/lang/pull/1762)

### Added

- Added preset of the plugins for `Laravel Lang` project.
- Added support for referencing package installation.

### Changed

- Big... just huge package refactoring. All project code rewritten from scratch.
- The `packages` option of the config file has been renamed to `plugins`.
- The content of the `plugins` key has been replaced from the project namespaces with the provider link.
- `exclude` configuration key renamed to `excludes`.

### Removed

- Removed `--force` key from all console commands.
- Removed `ignore` key from config file.
- Removed output of the list of processed files to the console.
- Removed `Packages` and `Plugins` facades.

## 10.0.4

### Fixed

- Fix `Undefined variable: $inline_file`

## 10.0.3

### Fixed

- Fix possible source repository error

## 10.0.2

### Added
Expand All @@ -19,7 +56,6 @@

- Updated docs/index.md


## 10.0.0

### Added
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog/index.md
Expand Up @@ -5,6 +5,9 @@
All notable changes to this project will be documented in this file.

* [10.x](10-x.md)
* [10.1.0](10-x.md#10.1.0)
* [10.0.4](10-x.md#10.0.4)
* [10.0.3](10-x.md#10.0.3)
* [10.0.2](10-x.md#10.0.2)
* [10.0.1](10-x.md#10.0.1)
* [10.0.0](10-x.md#10.0.0)
Expand Down
35 changes: 14 additions & 21 deletions docs/features/facades.md
Expand Up @@ -4,25 +4,6 @@

Perhaps the facades will be useful to you:

## Config

```php
use Helldar\LaravelLangPublisher\Facades\Config;

// Getting a list of packages from which to synchronize localization files.
Config::packages(): array

// Getting a list of plugins.
Config::plugins(): array

// Getting the default localization name.
Config::defaultLocale(): string


// Getting the fallback localization name.
Config::fallbackLocale(): string
```

## Locales

```php
Expand Down Expand Up @@ -61,11 +42,23 @@ Locales::getFallback(): string
```php
use Helldar\LaravelLangPublisher\Facades\Packages;

// Returns a sorted list of packages identified for processing.
// Returns a sorted list of plugins identified for processing.
Packages::get(): array

// Returns the count of processable packages.
// Returns the count of processable plugins.
Packages::count(): int
```

## Plugins

```php
use Helldar\LaravelLangPublisher\Facades\Plugins;

// Returns a sorted list of plugins identified for processing.
Plugins::get(): array

// Returns the count of plugins.
Plugins::count(): int
```

[link_source]: https://github.com/andrey-helldar/laravel-lang-publisher
6 changes: 3 additions & 3 deletions docs/features/index.md
Expand Up @@ -2,12 +2,12 @@

# Features

* [Packages](packages/index.md)
* [Extensions](packages/extensions.md)
* [Packages](plugins/index.md)
* [Extensions](plugins/extensions.md)
* [Alignment](alignment.md)
* [Facades](facades.md)
* [Config](facades.md#config)
* [Locales](facades.md#locales)
* [Packages](facades.md#packages)
* [Plugins](facades.md#plugins)

[link_source]: https://github.com/andrey-helldar/laravel-lang-publisher
File renamed without changes.

0 comments on commit 4c3318e

Please sign in to comment.