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

Commit914e3a9

Browse files
committed
[FrameworkBundle] Add --no-prefix option to translation:update
Remove ending dot from option description for consistency
1 parent53b55fc commit914e3a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ protected function configure()
3939
newInputArgument('locale', InputArgument::REQUIRED,'The locale'),
4040
newInputArgument('bundle', InputArgument::OPTIONAL,'The bundle name or directory where to load the messages, defaults to app/Resources folder'),
4141
newInputOption('prefix',null, InputOption::VALUE_OPTIONAL,'Override the default prefix','__'),
42+
newInputOption('no-prefix',null, InputOption::VALUE_NONE,'If set, no prefix is added to the translations'),
4243
newInputOption('output-format',null, InputOption::VALUE_OPTIONAL,'Override the default output format','yml'),
4344
newInputOption('dump-messages',null, InputOption::VALUE_NONE,'Should the messages be dumped in the console'),
4445
newInputOption('force',null, InputOption::VALUE_NONE,'Should the update be done'),
@@ -132,9 +133,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
132133
// load any messages from templates
133134
$extractedCatalogue =newMessageCatalogue($input->getArgument('locale'));
134135
$io->comment('Parsing templates...');
135-
$prefix =$input->getOption('prefix');
136136
$extractor =$this->getContainer()->get('translation.extractor');
137-
$extractor->setPrefix(null ===$prefix ?'' :$prefix);
137+
$extractor->setPrefix($input->getOption('no-prefix') ?'' :$input->getOption('prefix'));
138138
foreach ($transPathsas$path) {
139139
$path .='views';
140140
if (is_dir($path)) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp