@@ -28,29 +28,29 @@ public function handle(): int
28
28
$ translator = $ this ->getTranslator ();
29
29
30
30
$ missing = $ translator ->getUntranslatedTranslations ($ source , $ target );
31
- $ count = $ missing ->count ();
31
+ $ missingDot = $ missing ->dot ();
32
+ $ count = $ missingDot ->count ();
32
33
33
34
intro ('Using driver: ' .$ translator ->driver ::class);
34
35
35
36
note ("{$ count } untranslated keys detected. " );
36
37
37
38
table (
38
39
headers: ['Key ' , "Source {$ source }" ],
39
- rows: $ missing
40
- ->dot ()
40
+ rows: $ missingDot
41
41
->map (fn ($ value , $ key ) => [
42
42
$ key ,
43
43
(string ) str ((string ) $ value )->limit (50 ),
44
44
])->toArray ()
45
45
);
46
46
47
47
if ($ translate ) {
48
- $ translated = spin (function () use ($ translator , $ source , $ target , $ missing ) {
48
+ $ translated = spin (function () use ($ translator , $ source , $ target , $ missingDot ) {
49
49
50
50
return $ translator ->translateTranslations (
51
51
source: $ source ,
52
52
target: $ target ,
53
- keys: $ missing -> dot () ->keys ()->all ()
53
+ keys: $ missingDot ->keys ()->all ()
54
54
);
55
55
56
56
}, "Translating the {$ count } translations from ' {$ source }' to ' {$ target }' " );
@@ -59,10 +59,10 @@ public function handle(): int
59
59
headers: ['Key ' , "Source {$ source }" , "Target {$ target }" ],
60
60
rows: $ translated
61
61
->dot ()
62
- ->map (function ($ value , $ key ) use ($ missing ) {
62
+ ->map (function ($ value , $ key ) use ($ missingDot ) {
63
63
return [
64
64
(string ) $ key ,
65
- str ($ missing -> getString ($ key ))->limit (25 )->value (),
65
+ str (( string ) $ missingDot -> get ($ key ))->limit (25 )->value (),
66
66
str ((string ) $ value )->limit (25 )->value (),
67
67
];
68
68
})
0 commit comments