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
default => thrownew \InvalidArgumentException(sprintf('$batch argument must be one of ["%s", "%s", "%s"].', self::ALL_BATCH, self::NEW_BATCH, self::OBSOLETE_BATCH)),
163
+
default => thrownew \InvalidArgumentException(\sprintf('$batch argument must be one of ["%s", "%s", "%s"].', self::ALL_BATCH, self::NEW_BATCH, self::OBSOLETE_BATCH)),
164
164
};
165
165
166
166
if (!$messages || (!$this->source->all($intlDomain) && $this->source->all($domain))) {
$io->success(sprintf('New translations from "%s" has been written locally (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
180
+
$io->success(\sprintf('New translations from "%s" has been written locally (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
thrownewInvalidArgumentException(sprintf('You must define "framework.enabled_locales" or "framework.translator.providers.%s.locales" config key in order to work with translation providers.', parse_url($provider, \PHP_URL_SCHEME)));
118
+
thrownewInvalidArgumentException(\sprintf('You must define "framework.enabled_locales" or "framework.translator.providers.%s.locales" config key in order to work with translation providers.', parse_url($provider, \PHP_URL_SCHEME)));
119
119
}
120
120
121
121
$io = newSymfonyStyle($input, $output);
@@ -139,7 +139,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
139
139
if (!$deleteMissing && $force) {
140
140
$provider->write($localTranslations);
141
141
142
-
$io->success(sprintf('All local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
142
+
$io->success(\sprintf('All local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
143
143
144
144
return0;
145
145
}
@@ -149,7 +149,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$io->success(sprintf('Missing translations on "%s" has been deleted (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
152
+
$io->success(\sprintf('Missing translations on "%s" has been deleted (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
153
153
154
154
// Read provider translations again, after missing translations deletion,
155
155
// to avoid push freshly deleted translations.
@@ -164,7 +164,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
164
164
165
165
$provider->write($translationsToWrite);
166
166
167
-
$io->success(sprintf('%s local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', $force ? 'All' : 'New', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
167
+
$io->success(\sprintf('%s local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', $force ? 'All' : 'New', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
if (0 === preg_match($expectedFilenamePattern, basename($file))) {
135
135
$errors[] = [
136
136
'line' => -1,
137
137
'column' => -1,
138
-
'message' => sprintf('There is a mismatch between the language included in the file name ("%s") and the "%s" value used in the "target-language" attribute of the file.', basename($file), $targetLanguage),
138
+
'message' => \sprintf('There is a mismatch between the language included in the file name ("%s") and the "%s" value used in the "target-language" attribute of the file.', basename($file), $targetLanguage),
139
139
];
140
140
}
141
141
}
@@ -160,7 +160,7 @@ private function display(SymfonyStyle $io, array $files): int
160
160
'txt' => $this->displayTxt($io, $files),
161
161
'json' => $this->displayJson($io, $files),
162
162
'github' => $this->displayTxt($io, $files, true),
163
-
default => thrownewInvalidArgumentException(sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))),
163
+
default => thrownewInvalidArgumentException(\sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))),
if (!$translatorinstanceof TranslatorBagInterface || !$translatorinstanceof LocaleAwareInterface) {
37
-
thrownewInvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator)));
37
+
thrownewInvalidArgumentException(\sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator)));
0 commit comments