Skip to content

Commit 724b81e

Browse files
committed
Remove translations from Spark script variables
1 parent 256273e commit 724b81e

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

src/Configuration/ProvidesScriptVariables.php

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace Laravel\Spark\Configuration;
44

5-
use Laravel\Spark\Spark;
6-
use Laravel\Cashier\Cashier;
75
use Illuminate\Support\Facades\Auth;
6+
use Laravel\Cashier\Cashier;
87
use Laravel\Spark\Contracts\InitialFrontendState;
8+
use Laravel\Spark\Spark;
99

1010
trait ProvidesScriptVariables
1111
{
@@ -17,7 +17,6 @@ trait ProvidesScriptVariables
1717
public static function scriptVariables()
1818
{
1919
return [
20-
'translations' => static::getTranslations() + ['teams.team' => trans('teams.team'), 'teams.member' => trans('teams.member')],
2120
'cardUpFront' => Spark::needsCardUpFront(),
2221
'collectsBillingAddress' => Spark::collectsBillingAddress(),
2322
'collectsEuropeanVat' => Spark::collectsEuropeanVat(),
@@ -45,20 +44,4 @@ public static function scriptVariables()
4544
'chargesTeamsPerMember' => Spark::chargesTeamsPerMember(),
4645
];
4746
}
48-
49-
/**
50-
* Get the translation keys from file.
51-
*
52-
* @return array
53-
*/
54-
private static function getTranslations()
55-
{
56-
$translationFile = resource_path('lang/'.app()->getLocale().'.json');
57-
58-
if (! is_readable($translationFile)) {
59-
$translationFile = resource_path('lang/'.app('translator')->getFallback().'.json');
60-
}
61-
62-
return json_decode(file_get_contents($translationFile), true);
63-
}
6447
}

0 commit comments

Comments
 (0)