From 4092b63be39453f9a7ce4f985217099ab10aae90 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 23 Jul 2014 00:35:09 +0530 Subject: [PATCH 1/6] [ticket/12656] Use lang keys for CLI command descriptions PHPBB3-12656 --- phpBB/language/en/cli.php | 23 ++++++++++++++----- phpBB/phpbb/console/command/cache/purge.php | 2 +- phpBB/phpbb/console/command/config/delete.php | 2 +- phpBB/phpbb/console/command/config/get.php | 2 +- .../console/command/config/increment.php | 2 +- phpBB/phpbb/console/command/config/set.php | 2 +- .../console/command/config/set_atomic.php | 2 +- phpBB/phpbb/console/command/db/migrate.php | 2 +- .../console/command/dev/migration_tips.php | 2 +- .../console/command/extension/disable.php | 2 +- .../console/command/extension/enable.php | 2 +- .../phpbb/console/command/extension/purge.php | 2 +- .../phpbb/console/command/extension/show.php | 2 +- .../command/fixup/recalculate_email_hash.php | 2 +- 14 files changed, 30 insertions(+), 19 deletions(-) diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php index e9eb26b154..ea6952d5e4 100644 --- a/phpBB/language/en/cli.php +++ b/phpBB/language/en/cli.php @@ -35,10 +35,21 @@ if (empty($lang) || !is_array($lang)) // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( - 'CLI_DESCRIPTION_CRON_LIST' => 'Prints a list of ready and unready cron jobs.', - 'CLI_DESCRIPTION_CRON_RUN' => 'Runs all ready cron tasks.', - 'CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1' => 'Name of the task to be run', - - 'CLI_DESCRIPTION_OPTION_SHELL' => 'Launch the shell.', - 'CLI_DESCRIPTION_OPTION_SAFE_MODE' => 'Run in Safe Mode (without extensions).', + 'CLI_DESCRIPTION_CRON_LIST' => 'Prints a list of ready and unready cron jobs.', + 'CLI_DESCRIPTION_CRON_RUN' => 'Runs all ready cron tasks.', + 'CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1' => 'Name of the task to be run', + 'CLI_DESCRIPTION_DB_MIGRATE' => 'Updates the database by applying migrations.', + 'CLI_DESCRIPTION_DELETE_CONFIG' => 'Deletes a configuration option', + 'CLI_DESCRIPTION_DISABLE_EXTENSION' => 'Disables the specified extension.', + 'CLI_DESCRIPTION_ENABLE_EXTENSION' => 'Enables the specified extension.', + 'CLI_DESCRIPTION_FIND_MIGRATIONS' => 'Finds migrations that are not depended on.', + 'CLI_DESCRIPTION_GET_CONFIG' => 'Gets a configuration option\'s value', + 'CLI_DESCRIPTION_INCREMENT_CONFIG' => 'Increments a configuration option\'s value', + 'CLI_DESCRIPTION_LIST_EXTENSIONS' => 'Lists all extensions in the database and on the filesystem.', + 'CLI_DESCRIPTION_OPTION_SAFE_MODE' => 'Run in Safe Mode (without extensions).', + 'CLI_DESCRIPTION_OPTION_SHELL' => 'Launch the shell.', + 'CLI_DESCRIPTION_PURGE_EXTENSION' => 'Purges the specified extension.', + 'CLI_DESCRIPTION_RECALCULATE_EMAIL_HASH' => 'Recalculates the user_email_hash column of the users table.', + 'CLI_DESCRIPTION_SET_ATOMIC_CONFIG' => 'Sets a configuration option\'s value only if the old matches the current value', + 'CLI_DESCRIPTION_SET_CONFIG' => 'Sets a configuration option\'s value' )); diff --git a/phpBB/phpbb/console/command/cache/purge.php b/phpBB/phpbb/console/command/cache/purge.php index 8c51d1b5a8..ec8229200c 100644 --- a/phpBB/phpbb/console/command/cache/purge.php +++ b/phpBB/phpbb/console/command/cache/purge.php @@ -59,7 +59,7 @@ class purge extends \phpbb\console\command\command { $this ->setName('cache:purge') - ->setDescription('Purge the cache.') + ->setDescription($this->user->lang('PURGE_CACHE')) ; } diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php index 1310bb18b4..2fca8f6831 100644 --- a/phpBB/phpbb/console/command/config/delete.php +++ b/phpBB/phpbb/console/command/config/delete.php @@ -25,7 +25,7 @@ class delete extends command { $this ->setName('config:delete') - ->setDescription('Deletes a configuration option') + ->setDescription($this->user->lang('CLI_DESCRIPTION_DELETE_CONFIG')) ->addArgument( 'key', InputArgument::REQUIRED, diff --git a/phpBB/phpbb/console/command/config/get.php b/phpBB/phpbb/console/command/config/get.php index ee8c65110e..9734833d23 100644 --- a/phpBB/phpbb/console/command/config/get.php +++ b/phpBB/phpbb/console/command/config/get.php @@ -26,7 +26,7 @@ class get extends command { $this ->setName('config:get') - ->setDescription("Gets a configuration option's value") + ->setDescription($this->user->lang('CLI_DESCRIPTION_GET_CONFIG')) ->addArgument( 'key', InputArgument::REQUIRED, diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php index 21f0660e61..a77b3ab912 100644 --- a/phpBB/phpbb/console/command/config/increment.php +++ b/phpBB/phpbb/console/command/config/increment.php @@ -26,7 +26,7 @@ class increment extends command { $this ->setName('config:increment') - ->setDescription("Increments a configuration option's value") + ->setDescription($this->user->lang('CLI_DESCRIPTION_INCREMENT_CONFIG')) ->addArgument( 'key', InputArgument::REQUIRED, diff --git a/phpBB/phpbb/console/command/config/set.php b/phpBB/phpbb/console/command/config/set.php index 587b7fb0de..a0cc36e02f 100644 --- a/phpBB/phpbb/console/command/config/set.php +++ b/phpBB/phpbb/console/command/config/set.php @@ -26,7 +26,7 @@ class set extends command { $this ->setName('config:set') - ->setDescription("Sets a configuration option's value") + ->setDescription($this->user->lang('CLI_DESCRIPTION_SET_CONFIG')) ->addArgument( 'key', InputArgument::REQUIRED, diff --git a/phpBB/phpbb/console/command/config/set_atomic.php b/phpBB/phpbb/console/command/config/set_atomic.php index a7a52155f9..31460d5137 100644 --- a/phpBB/phpbb/console/command/config/set_atomic.php +++ b/phpBB/phpbb/console/command/config/set_atomic.php @@ -26,7 +26,7 @@ class set_atomic extends command { $this ->setName('config:set-atomic') - ->setDescription("Sets a configuration option's value only if the old matches the current value.") + ->setDescription($this->user->lang('CLI_DESCRIPTION_SET_ATOMIC_CONFIG')) ->addArgument( 'key', InputArgument::REQUIRED, diff --git a/phpBB/phpbb/console/command/db/migrate.php b/phpBB/phpbb/console/command/db/migrate.php index 758b125b13..bb5f83b16f 100644 --- a/phpBB/phpbb/console/command/db/migrate.php +++ b/phpBB/phpbb/console/command/db/migrate.php @@ -47,7 +47,7 @@ class migrate extends \phpbb\console\command\command { $this ->setName('db:migrate') - ->setDescription('Updates the database by applying migrations.') + ->setDescription($this->user->lang('CLI_DESCRIPTION_DB_MIGRATE')) ; } diff --git a/phpBB/phpbb/console/command/dev/migration_tips.php b/phpBB/phpbb/console/command/dev/migration_tips.php index e1387b34ae..f9047bdac8 100644 --- a/phpBB/phpbb/console/command/dev/migration_tips.php +++ b/phpBB/phpbb/console/command/dev/migration_tips.php @@ -30,7 +30,7 @@ class migration_tips extends \phpbb\console\command\command { $this ->setName('dev:migration-tips') - ->setDescription('Finds migrations that are not depended on.') + ->setDescription($this->user->lang('CLI_DESCRIPTION_FIND_MIGRATIONS')) ; } diff --git a/phpBB/phpbb/console/command/extension/disable.php b/phpBB/phpbb/console/command/extension/disable.php index c04848aa01..ce32105ed5 100644 --- a/phpBB/phpbb/console/command/extension/disable.php +++ b/phpBB/phpbb/console/command/extension/disable.php @@ -22,7 +22,7 @@ class disable extends command { $this ->setName('extension:disable') - ->setDescription('Disables the specified extension.') + ->setDescription($this->user->lang('CLI_DESCRIPTION_DISABLE_EXTENSION')) ->addArgument( 'extension-name', InputArgument::REQUIRED, diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php index 86a034cdf4..001b3e2158 100644 --- a/phpBB/phpbb/console/command/extension/enable.php +++ b/phpBB/phpbb/console/command/extension/enable.php @@ -22,7 +22,7 @@ class enable extends command { $this ->setName('extension:enable') - ->setDescription('Enables the specified extension.') + ->setDescription($this->user->lang('CLI_DESCRIPTION_ENABLE_EXTENSION')) ->addArgument( 'extension-name', InputArgument::REQUIRED, diff --git a/phpBB/phpbb/console/command/extension/purge.php b/phpBB/phpbb/console/command/extension/purge.php index 841598b90a..81d687d07c 100644 --- a/phpBB/phpbb/console/command/extension/purge.php +++ b/phpBB/phpbb/console/command/extension/purge.php @@ -22,7 +22,7 @@ class purge extends command { $this ->setName('extension:purge') - ->setDescription('Purges the specified extension.') + ->setDescription($this->user->lang('CLI_DESCRIPTION_PURGE_EXTENSION')) ->addArgument( 'extension-name', InputArgument::REQUIRED, diff --git a/phpBB/phpbb/console/command/extension/show.php b/phpBB/phpbb/console/command/extension/show.php index 2db1c59e24..a6066818db 100644 --- a/phpBB/phpbb/console/command/extension/show.php +++ b/phpBB/phpbb/console/command/extension/show.php @@ -21,7 +21,7 @@ class show extends command { $this ->setName('extension:show') - ->setDescription('Lists all extensions in the database and on the filesystem.') + ->setDescription($this->user->lang('CLI_DESCRIPTION_LIST_EXTENSIONS')) ; } diff --git a/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php index cb821cfe20..94f850240e 100644 --- a/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php +++ b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php @@ -31,7 +31,7 @@ class recalculate_email_hash extends \phpbb\console\command\command { $this ->setName('fixup:recalculate-email-hash') - ->setDescription('Recalculates the user_email_hash column of the users table.') + ->setDescription($this->user->lang('CLI_DESCRIPTION_RECALCULATE_EMAIL_HASH')) ; } From c81438e1f85633dd770fcddd8e332b278338732f Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 23 Jul 2014 01:23:44 +0530 Subject: [PATCH 2/6] [ticket/12656] Use lang keys for all CLI strings PHPBB3-12656 --- phpBB/language/en/cli.php | 25 ++++++++++++++++++- phpBB/phpbb/console/command/config/delete.php | 6 ++--- phpBB/phpbb/console/command/config/get.php | 6 ++--- .../console/command/config/increment.php | 8 +++--- phpBB/phpbb/console/command/config/set.php | 8 +++--- .../console/command/config/set_atomic.php | 12 ++++----- .../console/command/extension/disable.php | 6 ++--- .../console/command/extension/enable.php | 6 ++--- .../phpbb/console/command/extension/purge.php | 6 ++--- .../phpbb/console/command/extension/show.php | 2 +- .../command/fixup/recalculate_email_hash.php | 2 +- 11 files changed, 55 insertions(+), 32 deletions(-) diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php index ea6952d5e4..0c6ee1f1f0 100644 --- a/phpBB/language/en/cli.php +++ b/phpBB/language/en/cli.php @@ -35,6 +35,18 @@ if (empty($lang) || !is_array($lang)) // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( + 'CLI_CONFIG_CANNOT_CACHED' => 'Set this option if the configuration option changes too frequently to be efficiently cached.', + 'CLI_CONFIG_CURRENT' => 'Current configuration value, use 0 and 1 to specify boolean values', + 'CLI_CONFIG_DELETE_SUCCESS' => 'Successfully deleted config %s.', + 'CLI_CONFIG_NEW' => 'New configuration value, use 0 and 1 to specify boolean values', + 'CLI_CONFIG_NOT_EXISTS' => 'Config %s does not exist', + 'CLI_CONFIG_OPTION_NAME' => 'The configuration option\'s name', + 'CLI_CONFIG_PRINT_WITHOUT_NEWLINE' => 'Set this option if the value should be printed without a new line at the end.', + 'CLI_CONFIG_INCREMENT_BY' => 'Amount to increment by', + 'CLI_CONFIG_INCREMENT_SUCCESS' => 'Successfully incremented config %s', + 'CLI_CONFIG_SET_FAILURE' => 'Could not set config %s', + 'CLI_CONFIG_SET_SUCCESS' => 'Successfully set config %s', + 'CLI_DESCRIPTION_CRON_LIST' => 'Prints a list of ready and unready cron jobs.', 'CLI_DESCRIPTION_CRON_RUN' => 'Runs all ready cron tasks.', 'CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1' => 'Name of the task to be run', @@ -51,5 +63,16 @@ $lang = array_merge($lang, array( 'CLI_DESCRIPTION_PURGE_EXTENSION' => 'Purges the specified extension.', 'CLI_DESCRIPTION_RECALCULATE_EMAIL_HASH' => 'Recalculates the user_email_hash column of the users table.', 'CLI_DESCRIPTION_SET_ATOMIC_CONFIG' => 'Sets a configuration option\'s value only if the old matches the current value', - 'CLI_DESCRIPTION_SET_CONFIG' => 'Sets a configuration option\'s value' + 'CLI_DESCRIPTION_SET_CONFIG' => 'Sets a configuration option\'s value', + + 'CLI_EXTENSION_DISABLE_FAILURE' => 'Could not disable extension %s', + 'CLI_EXTENSION_DISABLE_SUCCESS' => 'Successfully disabled extension %s', + 'CLI_EXTENSION_ENABLE_FAILURE' => 'Could not enable extension %s', + 'CLI_EXTENSION_ENABLE_SUCCESS' => 'Successfully enabled extension %s', + 'CLI_EXTENSION_NAME' => 'Name of the extension', + 'CLI_EXTENSION_PURGE_FAILURE' => 'Could not purge extension %s', + 'CLI_EXTENSION_PURGE_SUCCESS' => 'Successfully purge extension %s', + 'CLI_EXTENSION_NOT_FOUND' => 'No extensions were found.' + + 'CLI_FIXUP_RECALCULATE_EMAIL_HASH_SUCCESS' => 'Successfully recalculated all email hashes.' )); diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php index 2fca8f6831..7923afd182 100644 --- a/phpBB/phpbb/console/command/config/delete.php +++ b/phpBB/phpbb/console/command/config/delete.php @@ -29,7 +29,7 @@ class delete extends command ->addArgument( 'key', InputArgument::REQUIRED, - "The configuration option's name" + $this->user->lang('CLI_CONFIG_OPTION_NAME') ) ; } @@ -53,11 +53,11 @@ class delete extends command { $this->config->delete($key); - $output->writeln("Successfully deleted config $key"); + $output->writeln('' . $this->user->lang('CLI_CONFIG_DELETE_SUCCESS', $key) . ''); } else { - $output->writeln("Config $key does not exist"); + $output->writeln('' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . '''); } } } diff --git a/phpBB/phpbb/console/command/config/get.php b/phpBB/phpbb/console/command/config/get.php index 9734833d23..9c03b49a3d 100644 --- a/phpBB/phpbb/console/command/config/get.php +++ b/phpBB/phpbb/console/command/config/get.php @@ -30,13 +30,13 @@ class get extends command ->addArgument( 'key', InputArgument::REQUIRED, - "The configuration option's name" + $this->user->lang('CLI_CONFIG_OPTION_NAME') ) ->addOption( 'no-newline', null, InputOption::VALUE_NONE, - 'Set this option if the value should be printed without a new line at the end.' + $this->user->lang('CLI_CONFIG_PRINT_WITHOUT_NEWLINE') ) ; } @@ -66,7 +66,7 @@ class get extends command } else { - $output->writeln("Could not get config $key"); + $output->writeln('' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . ''); } } } diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php index a77b3ab912..0c25075ce8 100644 --- a/phpBB/phpbb/console/command/config/increment.php +++ b/phpBB/phpbb/console/command/config/increment.php @@ -30,18 +30,18 @@ class increment extends command ->addArgument( 'key', InputArgument::REQUIRED, - "The configuration option's name" + $this->user->lang('CLI_CONFIG_OPTION_NAME') ) ->addArgument( 'increment', InputArgument::REQUIRED, - 'Amount to increment by' + $this->user->lang('CLI_CONFIG_INCREMENT_BY') ) ->addOption( 'dynamic', 'd', InputOption::VALUE_NONE, - 'Set this option if the configuration option changes too frequently to be efficiently cached.' + $this->user-lang('CLI_CONFIG_CANNOT_CACHED') ) ; } @@ -65,6 +65,6 @@ class increment extends command $this->config->increment($key, $increment, $use_cache); - $output->writeln("Successfully incremented config $key"); + $output->writeln('' . $this->user->lang('CLI_CONFIG_INCREMENT_SUCCESS', $key) . ''); } } diff --git a/phpBB/phpbb/console/command/config/set.php b/phpBB/phpbb/console/command/config/set.php index a0cc36e02f..695de31013 100644 --- a/phpBB/phpbb/console/command/config/set.php +++ b/phpBB/phpbb/console/command/config/set.php @@ -30,18 +30,18 @@ class set extends command ->addArgument( 'key', InputArgument::REQUIRED, - "The configuration option's name" + $this->user->lang('CLI_CONFIG_OPTION_NAME') ) ->addArgument( 'value', InputArgument::REQUIRED, - 'New configuration value, use 0 and 1 to specify boolean values' + $this->user->lang('CLI_CONFIG_NEW') ) ->addOption( 'dynamic', 'd', InputOption::VALUE_NONE, - 'Set this option if the configuration option changes too frequently to be efficiently cached.' + $this->user->lang('CLI_CONFIG_CANNOT_CACHED') ) ; } @@ -65,6 +65,6 @@ class set extends command $this->config->set($key, $value, $use_cache); - $output->writeln("Successfully set config $key"); + $output->writeln('' . $this->user->lang('CLI_CONFIG_SET_SUCCESS', $key) . ''); } } diff --git a/phpBB/phpbb/console/command/config/set_atomic.php b/phpBB/phpbb/console/command/config/set_atomic.php index 31460d5137..e8c69a0885 100644 --- a/phpBB/phpbb/console/command/config/set_atomic.php +++ b/phpBB/phpbb/console/command/config/set_atomic.php @@ -30,23 +30,23 @@ class set_atomic extends command ->addArgument( 'key', InputArgument::REQUIRED, - "The configuration option's name" + $this->user->lang('CLI_CONFIG_OPTION_NAME') ) ->addArgument( 'old', InputArgument::REQUIRED, - 'Current configuration value, use 0 and 1 to specify boolean values' + $this->user->lang('CLI_CONFIG_CURRENT') ) ->addArgument( 'new', InputArgument::REQUIRED, - 'New configuration value, use 0 and 1 to specify boolean values' + $this->user->lang('CLI_CONFIG_NEW') ) ->addOption( 'dynamic', 'd', InputOption::VALUE_NONE, - 'Set this option if the configuration option changes too frequently to be efficiently cached.' + $this->user->lang('CLI_CONFIG_CANNOT_CACHED') ) ; } @@ -72,12 +72,12 @@ class set_atomic extends command if ($this->config->set_atomic($key, $old_value, $new_value, $use_cache)) { - $output->writeln("Successfully set config $key"); + $output->writeln('' . $this->user->lang('CLI_CONFIG_SET_SUCCESS', $key) . ''); return 0; } else { - $output->writeln("Could not set config $key"); + $output->writeln('' . $this->user->lang('CLI_CONFIG_SET_FAILURE', $key) . ''); return 1; } } diff --git a/phpBB/phpbb/console/command/extension/disable.php b/phpBB/phpbb/console/command/extension/disable.php index ce32105ed5..1eee16cbd9 100644 --- a/phpBB/phpbb/console/command/extension/disable.php +++ b/phpBB/phpbb/console/command/extension/disable.php @@ -26,7 +26,7 @@ class disable extends command ->addArgument( 'extension-name', InputArgument::REQUIRED, - 'Name of the extension' + $this->user->lang('CLI_EXTENSION_NAME') ) ; } @@ -39,13 +39,13 @@ class disable extends command if ($this->manager->is_enabled($name)) { - $output->writeln("Could not disable extension $name"); + $output->writeln('' . $this->user->lang('CLI_EXTENSION_DISABLE_FAILURE', $name) . ''); return 1; } else { $this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_DISABLE', time(), array($name)); - $output->writeln("Successfully disabled extension $name"); + $output->writeln('' . $this->user->lang('CLI_EXTENSION_DISABLE_SUCCESS', $name) . ''); return 0; } } diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php index 001b3e2158..cca4975aa6 100644 --- a/phpBB/phpbb/console/command/extension/enable.php +++ b/phpBB/phpbb/console/command/extension/enable.php @@ -26,7 +26,7 @@ class enable extends command ->addArgument( 'extension-name', InputArgument::REQUIRED, - 'Name of the extension' + $this->user->lang('CLI_EXTENSION_NAME') ) ; } @@ -40,12 +40,12 @@ class enable extends command if ($this->manager->is_enabled($name)) { $this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_ENABLE', time(), array($name)); - $output->writeln("Successfully enabled extension $name"); + $output->writeln('' . $this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name) . ''); return 0; } else { - $output->writeln("Could not enable extension $name"); + $output->writeln('' . $this->user->lang('CLI_EXTENSION_ENABLE_SUCCESS', $name) . ''); return 1; } } diff --git a/phpBB/phpbb/console/command/extension/purge.php b/phpBB/phpbb/console/command/extension/purge.php index 81d687d07c..517e9a74c9 100644 --- a/phpBB/phpbb/console/command/extension/purge.php +++ b/phpBB/phpbb/console/command/extension/purge.php @@ -26,7 +26,7 @@ class purge extends command ->addArgument( 'extension-name', InputArgument::REQUIRED, - 'Name of the extension' + $this->user->lang('CLI_EXTENSION_NAME') ) ; } @@ -39,13 +39,13 @@ class purge extends command if ($this->manager->is_enabled($name)) { - $output->writeln("Could not purge extension $name"); + $output->writeln('' . $this->user->lang('CLI_EXTENSION_PURGE_FAILURE', $name) . ''); return 1; } else { $this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_PURGE', time(), array($name)); - $output->writeln("Successfully purge extension $name"); + $output->writeln('' . $this->user->lang('CLI_EXTENSION_PURGE_SUCCESS', $name) . ''); return 0; } } diff --git a/phpBB/phpbb/console/command/extension/show.php b/phpBB/phpbb/console/command/extension/show.php index a6066818db..6ce9607098 100644 --- a/phpBB/phpbb/console/command/extension/show.php +++ b/phpBB/phpbb/console/command/extension/show.php @@ -32,7 +32,7 @@ class show extends command if (empty($all)) { - $output->writeln('No extensions were found.'); + $output->writeln('' . $this->user->lang('CLI_EXTENSION_NOT_FOUND') . ''); return 3; } diff --git a/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php index 94f850240e..ec4e1b0ee7 100644 --- a/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php +++ b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php @@ -70,6 +70,6 @@ class recalculate_email_hash extends \phpbb\console\command\command } $this->db->sql_freeresult($result); - $output->writeln('Successfully recalculated all email hashes.'); + $output->writeln('' . $this->user->lang('CLI_FIXUP_RECALCULATE_EMAIL_HASH_SUCCESS') . ''); } } From 91b0e75cc7af68e1dcd72b637f9b99d8f139908d Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 24 Jul 2014 01:08:31 +0530 Subject: [PATCH 3/6] =?UTF-8?q?[ticket/12656]=20Use=20utf8=20=E2=80=99=20i?= =?UTF-8?q?nstead=20of=20escaping=20'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHPBB3-12656 --- phpBB/language/en/cli.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php index 0c6ee1f1f0..cb8cbb55a8 100644 --- a/phpBB/language/en/cli.php +++ b/phpBB/language/en/cli.php @@ -40,7 +40,7 @@ $lang = array_merge($lang, array( 'CLI_CONFIG_DELETE_SUCCESS' => 'Successfully deleted config %s.', 'CLI_CONFIG_NEW' => 'New configuration value, use 0 and 1 to specify boolean values', 'CLI_CONFIG_NOT_EXISTS' => 'Config %s does not exist', - 'CLI_CONFIG_OPTION_NAME' => 'The configuration option\'s name', + 'CLI_CONFIG_OPTION_NAME' => 'The configuration option’s name', 'CLI_CONFIG_PRINT_WITHOUT_NEWLINE' => 'Set this option if the value should be printed without a new line at the end.', 'CLI_CONFIG_INCREMENT_BY' => 'Amount to increment by', 'CLI_CONFIG_INCREMENT_SUCCESS' => 'Successfully incremented config %s', @@ -55,15 +55,15 @@ $lang = array_merge($lang, array( 'CLI_DESCRIPTION_DISABLE_EXTENSION' => 'Disables the specified extension.', 'CLI_DESCRIPTION_ENABLE_EXTENSION' => 'Enables the specified extension.', 'CLI_DESCRIPTION_FIND_MIGRATIONS' => 'Finds migrations that are not depended on.', - 'CLI_DESCRIPTION_GET_CONFIG' => 'Gets a configuration option\'s value', - 'CLI_DESCRIPTION_INCREMENT_CONFIG' => 'Increments a configuration option\'s value', + 'CLI_DESCRIPTION_GET_CONFIG' => 'Gets a configuration option’s value', + 'CLI_DESCRIPTION_INCREMENT_CONFIG' => 'Increments a configuration option’s value', 'CLI_DESCRIPTION_LIST_EXTENSIONS' => 'Lists all extensions in the database and on the filesystem.', 'CLI_DESCRIPTION_OPTION_SAFE_MODE' => 'Run in Safe Mode (without extensions).', 'CLI_DESCRIPTION_OPTION_SHELL' => 'Launch the shell.', 'CLI_DESCRIPTION_PURGE_EXTENSION' => 'Purges the specified extension.', 'CLI_DESCRIPTION_RECALCULATE_EMAIL_HASH' => 'Recalculates the user_email_hash column of the users table.', - 'CLI_DESCRIPTION_SET_ATOMIC_CONFIG' => 'Sets a configuration option\'s value only if the old matches the current value', - 'CLI_DESCRIPTION_SET_CONFIG' => 'Sets a configuration option\'s value', + 'CLI_DESCRIPTION_SET_ATOMIC_CONFIG' => 'Sets a configuration option’s value only if the old matches the current value', + 'CLI_DESCRIPTION_SET_CONFIG' => 'Sets a configuration option’s value', 'CLI_EXTENSION_DISABLE_FAILURE' => 'Could not disable extension %s', 'CLI_EXTENSION_DISABLE_SUCCESS' => 'Successfully disabled extension %s', From 653185610873e4629ffc929ace2b72e2fe41704d Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 24 Jul 2014 01:12:40 +0530 Subject: [PATCH 4/6] [ticket/12656] Fix typo PHPBB3-12656 --- phpBB/phpbb/console/command/config/delete.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php index 7923afd182..efd276d7e3 100644 --- a/phpBB/phpbb/console/command/config/delete.php +++ b/phpBB/phpbb/console/command/config/delete.php @@ -57,7 +57,7 @@ class delete extends command } else { - $output->writeln('' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . '''); + $output->writeln('' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . ''); } } } From ed9fb450de8da791ab7928a04af7c952614c5b14 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 24 Jul 2014 18:56:52 +0530 Subject: [PATCH 5/6] [ticket/12656] Fix syntax in language file PHPBB3-12656 --- phpBB/language/en/cli.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php index cb8cbb55a8..d9eede9881 100644 --- a/phpBB/language/en/cli.php +++ b/phpBB/language/en/cli.php @@ -72,7 +72,7 @@ $lang = array_merge($lang, array( 'CLI_EXTENSION_NAME' => 'Name of the extension', 'CLI_EXTENSION_PURGE_FAILURE' => 'Could not purge extension %s', 'CLI_EXTENSION_PURGE_SUCCESS' => 'Successfully purge extension %s', - 'CLI_EXTENSION_NOT_FOUND' => 'No extensions were found.' + 'CLI_EXTENSION_NOT_FOUND' => 'No extensions were found.', - 'CLI_FIXUP_RECALCULATE_EMAIL_HASH_SUCCESS' => 'Successfully recalculated all email hashes.' + 'CLI_FIXUP_RECALCULATE_EMAIL_HASH_SUCCESS' => 'Successfully recalculated all email hashes.', )); From 8a046743bc083f8ca26d70cc5a1b63bd47b92f57 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 27 Jul 2014 14:56:12 +0530 Subject: [PATCH 6/6] [ticket/12656] Fix typo for "purged extension" PHPBB3-12656 --- phpBB/language/en/cli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php index d9eede9881..eb0f5bb357 100644 --- a/phpBB/language/en/cli.php +++ b/phpBB/language/en/cli.php @@ -71,7 +71,7 @@ $lang = array_merge($lang, array( 'CLI_EXTENSION_ENABLE_SUCCESS' => 'Successfully enabled extension %s', 'CLI_EXTENSION_NAME' => 'Name of the extension', 'CLI_EXTENSION_PURGE_FAILURE' => 'Could not purge extension %s', - 'CLI_EXTENSION_PURGE_SUCCESS' => 'Successfully purge extension %s', + 'CLI_EXTENSION_PURGE_SUCCESS' => 'Successfully purged extension %s', 'CLI_EXTENSION_NOT_FOUND' => 'No extensions were found.', 'CLI_FIXUP_RECALCULATE_EMAIL_HASH_SUCCESS' => 'Successfully recalculated all email hashes.',