You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$result = $this->tr->setSource('en')->setTarget('fr')->preserveParameters('/\{\{([^}]+)\}\}/')->translate('Hello {{name}}, how are {{type_of_greeting}}?');
52
+
$resultOne = GoogleTranslate::trans('Hello {{name}}, how are {{type_of_greeting}}?', 'fr', 'en', preserveParameters: '/\{\{([^}]+)\}\}/');
53
+
$resultTwo = $this->tr->setSource('en')->setTarget('fr')->preserveParameters('/\{\{([^}]+)\}\}/')->translate('Hello {{name}}, how are {{type_of_greeting}}?');
49
54
50
-
$this->assertEquals('Bonjour {{name}}, comment vont {{type_of_greeting}} ?', $result, 'Translation should be correct and ignores key extraction if not set.');
55
+
$this->assertEquals('Bonjour {{name}}, comment vont {{type_of_greeting}} ?', $resultOne, 'Translation should be correct and ignores key extraction if not set.');
56
+
$this->assertEquals('Bonjour {{name}}, comment vont {{type_of_greeting}} ?', $resultTwo, 'Translation should be correct and ignores key extraction if not set.');
0 commit comments