Permalink
Browse files

Merge pull request #56 from laurentb/master

English language fixes
  • Loading branch information...
2 parents 737fb66 + 3b22c50 commit 84d165c5f1eb58da770997a17a39de3a290669d2 @cedriclombardot cedriclombardot committed Nov 26, 2011
@@ -26,7 +26,7 @@ protected function configure()
new InputOption('useDoctrineORM', '', InputOption::VALUE_REQUIRED, 'Use the Doctrine Orm', 'yes'),
new InputOption('useDoctrineODM', '', InputOption::VALUE_REQUIRED, 'Use the Doctrine Odm', 'yes'),
new InputOption('skin', '', InputOption::VALUE_REQUIRED, 'The skin you want to use', 'default'),
- new InputOption('useAssetic', '', InputOption::VALUE_REQUIRED, 'Wan\'t you to use assetic theme', 'yes'),
+ new InputOption('useAssetic', '', InputOption::VALUE_REQUIRED, 'Do you want to use the assetic theme', 'yes'),
))
->setDescription('Help you to install, update and configure your AdminGeneratorGeneratorBundle')
->setHelp(<<<EOT
@@ -50,29 +50,30 @@ protected function interact(InputInterface $input, OutputInterface $output)
$dialog->writeSection($output, 'The ORM/ODM you want');
- $usePropel = $dialog->askAndValidate($output, $dialog->getQuestion('Wan\'t you to use Propel ORM ?', $input->getOption('usePropel')), function ($usePropel) { if (!in_array($usePropel, array('yes', 'no'))) { throw new \RuntimeException('You have to choice beetwen yes or no'); } return $usePropel; } , false, $input->getOption('usePropel'));
+ $usePropel = $dialog->askAndValidate($output, $dialog->getQuestion('Do you want to use the Propel ORM?', $input->getOption('usePropel')), function ($usePropel) { if (!in_array($usePropel, array('yes', 'no'))) { throw new \RuntimeException('You have to choose between yes and no'); } return $usePropel; } , false, $input->getOption('usePropel'));
$input->setOption('usePropel', $usePropel);
if ('yes' == $usePropel) {
$this->setupDeps($this->getPropelDeps(), $input, $output);
}
$output->writeln('');
- $useDoctrineORM = $dialog->askAndValidate($output, $dialog->getQuestion('Wan\'t you to use Doctrine ORM ?', $input->getOption('useDoctrineORM')), function ($useDoctrineORM) { if (!in_array($useDoctrineORM, array('yes', 'no'))) { throw new \RuntimeException('You have to choice beetwen yes or no'); } return $useDoctrineORM; } , false, $input->getOption('useDoctrineORM'));
+ $useDoctrineORM = $dialog->askAndValidate($output, $dialog->getQuestion('Do you want to use the Doctrine ORM?', $input->getOption('useDoctrineORM')), function ($useDoctrineORM) { if (!in_array($useDoctrineORM, array('yes', 'no'))) { throw new \RuntimeException('You have to choose between yes and no'); } return $useDoctrineORM; } , false, $input->getOption('useDoctrineORM'));
$input->setOption('useDoctrineORM', $useDoctrineORM);
if ('yes' == $useDoctrineORM) {
$this->setupDeps($this->getDoctrineOrmDeps(), $input, $output);
}
$output->writeln('');
- $useDoctrineODM = $dialog->askAndValidate($output, $dialog->getQuestion('Wan\'t you to use Doctrine ODM MondoDB ?', $input->getOption('useDoctrineODM')), function ($useDoctrineODM) { if (!in_array($useDoctrineODM, array('yes', 'no'))) { throw new \RuntimeException('You have to choice beetwen yes or no'); } return $useDoctrineODM; } , false, $input->getOption('useDoctrineODM'));
+ $useDoctrineODM = $dialog->askAndValidate($output, $dialog->getQuestion('Do you want to use the Doctrine ODM for MondoDB?', $input->getOption('useDoctrineODM')), function ($useDoctrineODM) { if (!in_array($useDoctrineODM, array('yes', 'no'))) { throw new \RuntimeException('You have to choose between yes and no'); } return $useDoctrineODM; } , false, $input->getOption('useDoctrineODM'));
$input->setOption('useDoctrineODM', $useDoctrineODM);
if ('yes' == $useDoctrineODM) {
$this->setupDeps($this->getDoctrineOdmDeps(), $input, $output);
}
$output->writeln('');
$dialog->writeSection($output, 'The skin you want to use');
- $skin = $dialog->askAndValidate($output, $dialog->getQuestion('Wich skin you want (default, active_admin, own) ?', $input->getOption('skin')), function ($skin) { if (!in_array($skin, array('default', 'active_admin', 'own'))) { throw new \RuntimeException('You have to choice beetwen default, active_admin, own'); } return $skin; } , false, $input->getOption('skin'));
+ $skin = $dialog->askAndValidate($output, $dialog->getQuestion('Which skin you want (default, active_admin, own)?', $input->getOption('skin')), function ($skin) { if (!in_array($skin, array('default', 'active_admin', 'own'))) { throw new \RuntimeException('You have to choose between default, active_admin, own'); } return $skin; } , false, $input->getOption('skin'));
+
$help = '';
if ('own' == $skin) {
@@ -86,7 +87,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
$help = 'AdmingeneratorActiveAdminThemeBundle';
}
- $useAssetic = $dialog->askAndValidate($output, $dialog->getQuestion('Wan\'t you to use assetic theme (require gem sass and compass) ?', $input->getOption('useAssetic')), function ($useAssetic) { if (!in_array($useAssetic, array('yes', 'no'))) { throw new \RuntimeException('You have to choice beetwen yes or no'); } return $useAssetic; } , false, $input->getOption('useAssetic'));
+ $useAssetic = $dialog->askAndValidate($output, $dialog->getQuestion('Do you want to use the assetic theme (requires the sass and compass gems)?', $input->getOption('useAssetic')), function ($useAssetic) { if (!in_array($useAssetic, array('yes', 'no'))) { throw new \RuntimeException('You have to choose between yes and no'); } return $useAssetic; } , false, $input->getOption('useAssetic'));
$input->setOption('useAssetic', $useAssetic);
if ('yes' == $useAssetic) {
$this->setupDeps($this->getAsseticDeps(), $input, $output);
@@ -100,7 +101,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
$dialog->writeSection($output, 'Now you have to work ;)');
$output->writeln(array(
'',
- 'Edit config.yml and configure the section <comment>admingenerator_generator</comment> like that :',
+ 'Edit config.yml and configure the section <comment>admingenerator_generator</comment> like that:',
'<comment>admingenerator_generator</comment>:',
'<comment> base_admin_template</comment>: <info>'.$help.'</info>',
'<comment> use_propel</comment>: <info>'.(('yes' === $usePropel) ? 'true' : 'false' ).'</info>',
@@ -134,7 +135,7 @@ protected function setupDeps($dependencies, InputInterface $input, OutputInterfa
if (isset($params['path'])) {
$isCloned = file_exists($this->getContainer()->getParameter('kernel.root_dir').'/../vendor/'.$params['path']);
- $output->writeln(sprintf("<info>%s</info> is cloned ? [%s]", $deps,
+ $output->writeln(sprintf("<info>%s</info> is cloned? [%s]", $deps,
$isCloned ? '<comment>OK</comment>' : '<error>KO</error>'));
if (!$isCloned) {
if ($input->getOption('gitOrDeps') == 'deps') {
@@ -147,7 +148,7 @@ protected function setupDeps($dependencies, InputInterface $input, OutputInterfa
// Autoload
if (isset($params['autoloadKey'])) {
- $output->writeln(sprintf("<info>%s</info> is autoloaded ? [%s]", $deps,
+ $output->writeln(sprintf("<info>%s</info> is autoloaded? [%s]", $deps,
$this->isAutoloaded($params['autoloadKey']) ? '<comment>OK</comment>' : '<error>KO</error>'));
if (!$this->isAutoloaded($params['autoloadKey'])) {
@@ -157,7 +158,7 @@ protected function setupDeps($dependencies, InputInterface $input, OutputInterfa
// Kernel
if (isset($params['isBundle']) && $params['isBundle']) {
- $output->writeln(sprintf("<info>%s</info> is loaded in kernel ? [%s]", $deps,
+ $output->writeln(sprintf("<info>%s</info> is loaded in kernel? [%s]", $deps,
$this->isInKernel($deps) ? '<comment>OK</comment>' : '<error>KO</error>'));
if (!$this->isInKernel($deps)) {
View
@@ -6,7 +6,7 @@ params:
builders:
list:
params:
- title: Here is a beautifull title no ???
+ title: Here is a beautiful title no?
display: [ id, title, is_published ]
max_per_page: 3
actions:
View
@@ -1,4 +1,4 @@
-# Symfony2 Admin Generator: The Real Missing Admin Generator for Symfony2 ! ![project status](http://stillmaintained.com/cedriclombardot/AdmingeneratorGeneratorBundle.png)# ![build status](https://secure.travis-ci.org/cedriclombardot/AdmingeneratorGeneratorBundle.png)#
+# Symfony2 Admin Generator: The Real Missing Admin Generator for Symfony2! ![project status](http://stillmaintained.com/cedriclombardot/AdmingeneratorGeneratorBundle.png)# ![build status](https://secure.travis-ci.org/cedriclombardot/AdmingeneratorGeneratorBundle.png)#
This package is a Symfony2 Admin Generator based on YAML configuration and Twig templating.
It's inspired by [fzaninotto/Doctrine2ActiveRecord](https://github.com/fzaninotto/Doctrine2ActiveRecord).
@@ -30,14 +30,14 @@ With almost the same features:
![Preview of edit](https://github.com/cedriclombardot/AdmingeneratorGeneratorBundle/raw/master/Resources/doc/edit-preview.png)
-### Want another skin ?
+### Want another skin?
Just install [ActiveAdminTheme](https://github.com/cedriclombardot/AdmingeneratorActiveAdminThemeBundle)
![Preview of ActiveAdminTheme] (https://github.com/cedriclombardot/AdmingeneratorActiveAdminThemeBundle/raw/master/Resources/doc/list-preview.png)
-## Want to run a test ?
+## Want to run a test?
The fastest way to try it is to setup the AdmingeneratorIpsum project: https://github.com/cedriclombardot/AdmingeneratorIpsum.
This is a complete Symfony2 application with this bundle well configured.
@@ -156,7 +156,7 @@ knp_menu:
twig: true
```
-### Now two ways to continue the setup :
+### Now two ways to continue the setup:
Manually, follow the end of readme, or automatically,
@@ -308,17 +308,17 @@ admingenerator_generator:
overwrite_if_exists: true
```
-And of course for prod :
+And of course for prod:
```
php app/console -env prod cache:warmup
```
-## Need support ?
+## Need support?
https://groups.google.com/group/symfony2admingenerator
--------------
-Note : The admin theme is from https://github.com/martinrusev/admin-theme
+Note: The admin theme is from https://github.com/martinrusev/admin-theme
@@ -54,10 +54,10 @@ public function testGetCode()
{
$builder = $this->initBuilder();
- $this->assertEquals('Hello cedric !', $builder->getCode());
+ $this->assertEquals('Hello cedric!', $builder->getCode());
$builder->setVariables(array('name' => 'Tux'));
- $this->assertEquals('Hello Tux !', $builder->getCode(), 'If i change variables code is changed');
+ $this->assertEquals('Hello Tux!', $builder->getCode(), 'If I change variables code is changed');
}
public function testWriteOnDisk()
@@ -66,25 +66,25 @@ public function testWriteOnDisk()
$builder->writeOnDisk(sys_get_temp_dir());
$this->assertTrue(file_exists(sys_get_temp_dir() . '/test.php'));
- $this->assertEquals('Hello cedric !', file_get_contents(sys_get_temp_dir() . '/test.php'));
+ $this->assertEquals('Hello cedric!', file_get_contents(sys_get_temp_dir() . '/test.php'));
$builder->setVariables(array('name' => 'Tux'));
$builder->writeOnDisk(sys_get_temp_dir());
$this->assertTrue($builder->mustOverwriteIfExists());
$this->assertTrue(file_exists(sys_get_temp_dir() . '/test.php'));
- $this->assertEquals('Hello Tux !', file_get_contents(sys_get_temp_dir() . '/test.php'), 'If i change variables code is changed');
+ $this->assertEquals('Hello Tux!', file_get_contents(sys_get_temp_dir() . '/test.php'), 'If i change variables code is changed');
$builder->setVariables(array('name' => 'cedric'));
$builder->setMustOverwriteIfExists(false);
$builder->writeOnDisk(sys_get_temp_dir());
$this->assertFalse($builder->mustOverwriteIfExists());
$this->assertTrue(file_exists(sys_get_temp_dir() . '/test.php'));
- $this->assertEquals('Hello Tux !', file_get_contents(sys_get_temp_dir() . '/test.php'), 'If i change variables on an existant files code is not generated');
+ $this->assertEquals('Hello Tux!', file_get_contents(sys_get_temp_dir() . '/test.php'), 'If i change variables on an existant files code is not generated');
unlink(sys_get_temp_dir() . '/test.php');
$this->assertFalse(file_exists(sys_get_temp_dir() . '/test.php'));
$builder->writeOnDisk(sys_get_temp_dir());
- $this->assertEquals('Hello cedric !', file_get_contents(sys_get_temp_dir() . '/test.php'), 'If i change variables on a non existant files code is generated');
+ $this->assertEquals('Hello cedric!', file_get_contents(sys_get_temp_dir() . '/test.php'), 'If i change variables on a non existant files code is generated');
}
public function testGetModelClass()
@@ -1 +1 @@
-Hello {{ name }} !
+Hello {{ name }}!

0 comments on commit 84d165c

Please sign in to comment.