mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
fixed upgrade_language_translations
This commit is contained in:
@@ -71,7 +71,7 @@ class LanguageService
|
||||
|
||||
// Find new translations in default translations
|
||||
$newbies = $default_translations[$license]
|
||||
->diff(map_language_translations($translations));
|
||||
->diffKeys(map_language_translations($translations));
|
||||
|
||||
// Store new translations for every language
|
||||
$locales->each(function ($locale) use ($newbies) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Feature\App;
|
||||
|
||||
use App\Models\LanguageTranslation;
|
||||
use App\Models\User;
|
||||
use DB;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
@@ -58,7 +59,7 @@ class AppUpgradeTest extends TestCase
|
||||
'lang' => $locale
|
||||
], [
|
||||
'key' => 'activation.stripe.description',
|
||||
'value' => 'To charge your users, please set up your Stripe account credentials.',
|
||||
'value' => 'This is original test description',
|
||||
'lang' => $locale
|
||||
]
|
||||
]);
|
||||
@@ -75,6 +76,18 @@ class AppUpgradeTest extends TestCase
|
||||
'value' => 'Your Stripe account is not set',
|
||||
'lang' => $locale,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('language_translations', [
|
||||
'key' => 'activation.stripe.description',
|
||||
'value' => 'This is original test description',
|
||||
'lang' => $locale,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseMissing('language_translations', [
|
||||
'key' => 'activation.stripe.description',
|
||||
'value' => 'To charge your users, please set up your Stripe account credentials.',
|
||||
'lang' => $locale,
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user