Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbfd516f

Browse files
committed
update locale completion
1 parent6e3598b commitbfd516f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
useSymfony\Component\Console\Style\SymfonyStyle;
2323
useSymfony\Component\HttpKernel\Bundle\BundleInterface;
2424
useSymfony\Component\HttpKernel\KernelInterface;
25+
useSymfony\Component\Intl\Locales;
2526
useSymfony\Component\Translation\Catalogue\MergeOperation;
2627
useSymfony\Component\Translation\Catalogue\TargetOperation;
2728
useSymfony\Component\Translation\Extractor\ExtractorInterface;
@@ -310,6 +311,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
310311
publicfunctioncomplete(CompletionInput$input,CompletionSuggestions$suggestions):void
311312
{
312313
if ($input->mustSuggestArgumentValuesFor('locale')) {
314+
$suggestions->suggestValues(Locales::getLocales());
313315
return;
314316
}
315317

‎src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandCompletionTest.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
useSymfony\Component\Filesystem\Filesystem;
2121
useSymfony\Component\HttpKernel\Bundle\BundleInterface;
2222
useSymfony\Component\HttpKernel\KernelInterface;
23+
useSymfony\Component\Intl\Locales;
2324
useSymfony\Component\Translation\Extractor\ExtractorInterface;
2425
useSymfony\Component\Translation\Reader\TranslationReader;
2526
useSymfony\Component\Translation\Translator;
@@ -44,6 +45,7 @@ public function testComplete(array $input, array $expectedSuggestions)
4445

4546
publicfunctionprovideCompletionSuggestions()
4647
{
48+
yield'locale' => [[''], Locales::getLocales()];
4749
yield'bundle' => [['en',''], ['BaseBundle']];
4850
yield'domain with locale' => [['en','--domain=m'], ['messages']];
4951
yield'domain without locale' => [['--domain=m'], []];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp