diff --git a/README.md b/README.md index 48e781f..3aab309 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@
+This is a fork of https://github.com/themsaid/laravel-langman and its needed in my project, but because of its not maintained any more and after I pulled request to fix an issue I re-namespace this package to use it in my projects +
Langman is a language files manager in your artisan console, it helps you search, update, add, and remove
translation lines with ease. Taking care of a multilingual interface is not a headache anymore.
@@ -27,14 +31,14 @@ $ composer require themsaid/laravel-langman
Once done, add the following line in your providers array of `config/app.php`:
```php
-Themsaid\Langman\LangmanServiceProvider::class
+Muathye\Themsaid\Langman\LangmanServiceProvider::class
```
This package has a single configuration option that points to the `resources/lang` directory, if only you need to change
the path then publish the config file:
```
-php artisan vendor:publish --provider="Themsaid\Langman\LangmanServiceProvider"
+php artisan vendor:publish --provider="Muathye\Themsaid\Langman\LangmanServiceProvider"
```
## Usage
diff --git a/composer.json b/composer.json
index 580cfe6..772f043 100644
--- a/composer.json
+++ b/composer.json
@@ -1,14 +1,18 @@
{
- "name": "themsaid/laravel-langman",
+ "name": "muath-ye/laravel-langman",
"description": "Manage language files with ease.",
"keywords": ["laravel", "localization", "multilingual"],
- "homepage": "https://github.com/themsaid/laravel-langman",
+ "homepage": "https://github.com/muath-ye/laravel-langman",
"license": "MIT",
"authors": [
{
"name": "Mohamed Said",
"email": "theMohamedSaid@gmail.com",
"homepage": "https://themsaid.github.io"
+ },
+ {
+ "name": "Muath Assawadi",
+ "homepage": "https://muath-ye.github.io"
}
],
"require": {
@@ -25,7 +29,7 @@
},
"autoload": {
"psr-4": {
- "Themsaid\\Langman\\": "src"
+ "Muathye\\Themsaid\\Langman\\": "src"
},
"classmap": [
"tests"
@@ -34,7 +38,7 @@
"extra": {
"laravel": {
"providers": [
- "Themsaid\\Langman\\LangmanServiceProvider"
+ "Muathye\\Themsaid\\Langman\\LangmanServiceProvider"
]
}
}
diff --git a/src/Commands/FindCommand.php b/src/Commands/FindCommand.php
index 73cad05..fb2b7f5 100644
--- a/src/Commands/FindCommand.php
+++ b/src/Commands/FindCommand.php
@@ -1,10 +1,10 @@
commands([
- \Themsaid\Langman\Commands\MissingCommand::class,
- \Themsaid\Langman\Commands\RemoveCommand::class,
- \Themsaid\Langman\Commands\TransCommand::class,
- \Themsaid\Langman\Commands\ShowCommand::class,
- \Themsaid\Langman\Commands\FindCommand::class,
- \Themsaid\Langman\Commands\SyncCommand::class,
- \Themsaid\Langman\Commands\RenameCommand::class,
+ \Muathye\Themsaid\Langman\Commands\MissingCommand::class,
+ \Muathye\Themsaid\Langman\Commands\RemoveCommand::class,
+ \Muathye\Themsaid\Langman\Commands\TransCommand::class,
+ \Muathye\Themsaid\Langman\Commands\ShowCommand::class,
+ \Muathye\Themsaid\Langman\Commands\FindCommand::class,
+ \Muathye\Themsaid\Langman\Commands\SyncCommand::class,
+ \Muathye\Themsaid\Langman\Commands\RenameCommand::class,
]);
}
}
diff --git a/src/Manager.php b/src/Manager.php
index 4ff5824..9cdd736 100644
--- a/src/Manager.php
+++ b/src/Manager.php
@@ -1,6 +1,6 @@
app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => ['user' => '', 'category' => ''],
@@ -40,7 +40,7 @@ public function testFilesMethod()
public function testLanguagesMethod()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => [],
@@ -53,7 +53,7 @@ public function testLanguagesMethod()
public function testCreateFileIfNotExisting()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => [],
@@ -71,7 +71,7 @@ public function testCreateFileIfNotExisting()
public function testWriteFile()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => ['users' => ''],
@@ -94,7 +94,7 @@ public function testWriteFile()
public function testGetFileContentReadsContent()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => ['users' => "app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles();
@@ -121,7 +121,7 @@ public function testGetFileContentThrowsExceptionIfNotFound()
public function testGetFileContentCreatesFileIfNeeded()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles();
@@ -134,7 +134,7 @@ public function testGetFileContentCreatesFileIfNeeded()
public function testRemoveTranslationLineFromAllFiles()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => ['users' => " 'a', 'age' => 'b'];"],
@@ -154,7 +154,7 @@ public function testRemoveTranslationLineFromAllFiles()
public function testRemoveNestedTranslationLineFromAllFiles()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => ['users' => " ['f' => '1', 's' => 2], 'age' => 'b'];"],
@@ -176,7 +176,7 @@ public function testRemoveNestedTranslationLineFromAllFiles()
public function testFillTranslationLinesThatDoesNotExistYet()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => ['users' => 'app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => ['users' => " 'nil'];"],
@@ -209,7 +209,7 @@ public function testUpdatesTranslationLineThatExists()
public function testFillNestedTranslationLines()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
$this->createTempFiles([
'en' => ['users' => ' "class"];'],
@@ -228,7 +228,7 @@ public function testFillNestedTranslationLines()
public function testFindTranslationsInProjectFiles()
{
- $manager = $this->app[\Themsaid\Langman\Manager::class];
+ $manager = $this->app[\Muathye\Themsaid\Langman\Manager::class];
array_map('unlink', glob(__DIR__.'/views_temp/users/index.blade.php'));
array_map('rmdir', glob(__DIR__.'/views_temp/users'));
@@ -252,7 +252,7 @@ public function testFindTranslationsInProjectFiles()
public function testGetKeysExistingInALanguageButNotTheOther()
{
- $manager = m::mock('Themsaid\Langman\Manager[languages]', [new Filesystem(), '', []]);
+ $manager = m::mock('Muathye\Themsaid\Langman\Manager[languages]', [new Filesystem(), '', []]);
$manager->shouldReceive('languages')->andReturn(['en', 'nl']);
diff --git a/tests/MissingCommandTest.php b/tests/MissingCommandTest.php
index 389d62f..88579a2 100644
--- a/tests/MissingCommandTest.php
+++ b/tests/MissingCommandTest.php
@@ -1,6 +1,6 @@
shouldReceive('ask')->once()->with('/user\.age:nl/', null)->andReturn('fill_age');
$command->shouldReceive('ask')->once()->with('/product\.name:en/', null)->andReturn('fill_name');
$command->shouldReceive('ask')->once()->with('/product\.color:nl/', null)->andReturn('fill_color');
@@ -63,7 +63,7 @@ public function testAllowSeeTranslationInDefaultLanguage()
],
]);
- $command = m::mock('\Themsaid\Langman\Commands\MissingCommand[ask]', [$manager]);
+ $command = m::mock('\Muathye\Themsaid\Langman\Commands\MissingCommand[ask]', [$manager]);
$command->shouldReceive('ask')->once()->with('/