Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Minor fix for structure correction of the laravel-lang/lang #123

Merged
merged 124 commits into from
Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
a847d74
Updated composer.json
Jun 2, 2021
195203d
Updated changelog
Jun 2, 2021
f378ce0
Updated changelog
Jun 2, 2021
26f1dc4
Corrected Breeze plugin
Jun 2, 2021
7623a22
Updated doc-block
Jun 2, 2021
3da042e
Added Laravel and Lumen Frameworks
Jun 2, 2021
176c92d
WIP
Jun 2, 2021
14d6d33
Apply fixes from StyleCI
andrey-helldar Jun 2, 2021
dd19177
Merge pull request #124 from andrey-helldar/analysis-D2OoOb
Jun 2, 2021
310b408
Fixed `laravel-lang/lang` version
Jun 3, 2021
86c6516
Update composer.json
Jun 3, 2021
8fe496f
Updated PluginsTest.php
Jun 3, 2021
fb348ae
Framework.php was renamed to Laravel.php
Jun 3, 2021
7f7331f
In progress
Jun 3, 2021
1ba2691
Apply fixes from StyleCI
andrey-helldar Jun 3, 2021
c58014b
Merge pull request #125 from andrey-helldar/analysis-x0mM5O
Jun 3, 2021
56f9441
Added explicit transfer of protected localizations as "installed"
Jun 16, 2021
2822e62
Fixed: Keys inside attributes array removed when update
Jun 16, 2021
e0b1cea
Added Breeze plugin
Jun 16, 2021
1b4cc03
Cleanup project
Jun 17, 2021
c0ee158
Prepare to a full refactoring
Jun 17, 2021
6aa1586
Apply fixes from StyleCI
andrey-helldar Jun 17, 2021
d6d64f4
Merge pull request #127 from andrey-helldar/analysis-YjploK
Jun 17, 2021
175d11b
WIP
Jun 18, 2021
d4f820b
Apply fixes from StyleCI
andrey-helldar Jun 18, 2021
33f0537
Merge pull request #128 from andrey-helldar/analysis-ZlkKvb
Jun 18, 2021
9fd3b99
Prepared for full refactoring
Aug 28, 2021
06f30c3
Restore Locales class
Aug 29, 2021
19e1b6c
Removed `final` from the classes
Aug 29, 2021
b31aad8
Added copyrights
Aug 29, 2021
fd33624
Add a `declare(strict_types=1)` to all php files
Aug 29, 2021
51c5369
Updated config files
Aug 29, 2021
7a51806
Added config constants
Aug 29, 2021
e0cb1cf
Added contracts
Aug 29, 2021
ad1cec3
Update composer.json to the devepopment
Aug 29, 2021
35b6399
Apply fixes from StyleCI
andrey-helldar Aug 29, 2021
c6bc71c
Merge pull request #129 from andrey-helldar/analysis-GDOw0o
Aug 29, 2021
d8e8b9b
Fixed composer.json
Aug 30, 2021
802c66d
Added plugin presets
Aug 30, 2021
a8e6759
Added a facade for working with settings
Aug 30, 2021
6f9d3b7
Added plugin sorting
Aug 30, 2021
1f02840
Added check of the provider interface when filtering the list of plugins
Aug 30, 2021
06dcc8c
Added optimization of plugin extension inheritance
Aug 30, 2021
578a230
Moved `Config` to `Helpers` interface
Aug 30, 2021
d06b93e
A helper for working with a list of localizations has been prepared
Aug 30, 2021
48204df
Apply fixes from StyleCI
andrey-helldar Aug 30, 2021
e18cd34
Merge pull request #130 from andrey-helldar/analysis-yvZrDp
Aug 30, 2021
9a4a763
Very small update 😁
Aug 30, 2021
4b10f36
Updated helpers
Aug 30, 2021
2432616
Merge remote-tracking branch 'origin/10.x' into 10.x
Aug 30, 2021
ba8033e
Update docs
Aug 30, 2021
f31e707
Added plugins check
Aug 30, 2021
d595003
Replaced the method of combining arrays
Aug 30, 2021
bec96db
Updated tests
Aug 30, 2021
98c7bab
Update composer.json
Aug 31, 2021
03078ea
Updated config file
Aug 31, 2021
277639e
Updated config file
Aug 31, 2021
01e7833
Added preset for testing inline translations
Aug 31, 2021
62ac579
Added preset for testing
Aug 31, 2021
ef20081
Added check for plugin existence
Aug 31, 2021
5daa49c
Added test for checking installed plugins
Aug 31, 2021
c743704
Added a test for the availability of localizations
Aug 31, 2021
7054beb
Renamed tests namespaces
Aug 31, 2021
230cfc2
Renamed basic test cases classes
Aug 31, 2021
0d08870
Added presets for testing console commands
Aug 31, 2021
20da03f
Moved tests of console commands from the release version
Aug 31, 2021
fc98eb4
Added processor presets
Aug 31, 2021
8202c62
Added presets for console commands
Aug 31, 2021
0b91a22
Added initialization when returning a list of plugins
Aug 31, 2021
9ba425b
Added interface for working with the file system
Aug 31, 2021
3163fd9
Work has begun on the console command for adding localizations
Aug 31, 2021
3c22e5e
Apply fixes from StyleCI
andrey-helldar Aug 31, 2021
322bee2
Merge pull request #131 from andrey-helldar/analysis-x0EBOO
Aug 31, 2021
8fb223a
Small updates
Aug 31, 2021
5207ec6
Updated a console message
Aug 31, 2021
759c605
WIP: File reading services
Aug 31, 2021
0db173c
Work started on reading files
Aug 31, 2021
c87b3c0
Updated filesystems
Aug 31, 2021
892408a
Added the Filesystem facade
Aug 31, 2021
bfcd3c4
WIP: BaseProcessor
Aug 31, 2021
3a75220
Apply fixes from StyleCI
andrey-helldar Aug 31, 2021
e98e33a
Merge pull request #132 from andrey-helldar/analysis-nNJ0p5
Aug 31, 2021
effd098
Laravel Lang files moved to another folder
Sep 21, 2021
14fa900
Fixed `Laravel Lang` path
Sep 21, 2021
0edd195
Changed plugin structure
Sep 21, 2021
8a187d5
Added option to turn off Laravel Ray
Sep 21, 2021
a4187a8
Fixed file reading error
Sep 21, 2021
6b0993f
Fixed a bug with processing an incoming array of localizations
Sep 21, 2021
d7c7ca5
Added reading of translation files
Sep 21, 2021
b9362c6
Apply fixes from StyleCI
andrey-helldar Sep 21, 2021
a3a026a
Merge pull request #133 from andrey-helldar/analysis-0gjgD4
Sep 21, 2021
d2526b5
Removed unnecessary method
Sep 21, 2021
9120760
WIP
Sep 21, 2021
7ef113b
WIP
Sep 22, 2021
174ad0c
WIP
Sep 22, 2021
ba9d3e4
Fixed compare
Sep 22, 2021
f45e63a
Updated `Remove` class code
Sep 22, 2021
52de983
Updated tests
Sep 22, 2021
a2af639
Removed `--force` option
Sep 23, 2021
6aeffa0
Removed code duplication when testing localizations
Sep 23, 2021
5b81876
Added `--full` option
Sep 23, 2021
d96bd01
I got tired of coming up with names for the commits.
Sep 23, 2021
8cca797
Sep 23, 2021
fc62d49
😍
Sep 23, 2021
21fac14
😑
Sep 23, 2021
5a30a78
Apply fixes from StyleCI
andrey-helldar Sep 23, 2021
a5d4fb6
Merge pull request #134 from andrey-helldar/analysis-GDj2Eg
Sep 23, 2021
6a82616
Reset 😊
Sep 23, 2021
92caf32
👽
Sep 23, 2021
8842e95
Apply fixes from StyleCI
andrey-helldar Sep 23, 2021
5fe8b72
Merge pull request #135 from andrey-helldar/analysis-KZjLmQ
Sep 23, 2021
4c8f7fe
👹
Sep 23, 2021
36e5ddc
😏
Sep 23, 2021
983554e
🤗
Sep 23, 2021
1a387ee
😙
Sep 23, 2021
84f9659
😎
Sep 23, 2021
6362070
😑
Sep 23, 2021
592eb6c
Contracts moved to external project
Sep 23, 2021
b6c4ed7
🙄
Sep 23, 2021
7eb2376
😜
Sep 23, 2021
a531d6a
🧐
Sep 23, 2021
91e1586
😤
Sep 24, 2021
c15f2e1
Apply fixes from StyleCI
andrey-helldar Sep 24, 2021
645f090
Merge pull request #136 from andrey-helldar/analysis-lKW9AJ
Sep 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading