Permalink
Browse files

convert {:foo} to {foo} in line with PSR-3 placeholders

  • Loading branch information...
1 parent 06c3eb0 commit aec9f04780be35bc6e662fb84237be93e6bcd847 @pmjones pmjones committed Jan 4, 2013
Showing with 7 additions and 7 deletions.
  1. +6 −6 intl/en_US.php
  2. +1 −1 src/Aura/Cli/Translator.php
View
@@ -4,11 +4,11 @@
'formatter' => 'basic',
'messages' => [
'ERR_GETOPT_INITIALIZED' => "Getopt is already initialized.",
- 'ERR_OPTION_ARRAY' => "The definition for option '{:option}' is not an array.",
- 'ERR_OPTION_PARAM' => "The value for 'param' in option '{:option}' is not recognized.",
- 'ERR_OPTION_NOT_DEFINED' => "The option '{:option}' is not recognized.",
- 'ERR_OPTION_NOT_MULTI' => "The option '{:option}' does not take multiple values.",
- 'ERR_OPTION_PARAM_REJECTED' => "The option '{:option}' is not allowed to have a value.",
- 'ERR_OPTION_PARAM_REQUIRED' => "The option '{:option}' is required to have a value.",
+ 'ERR_OPTION_ARRAY' => "The definition for option '{option}' is not an array.",
+ 'ERR_OPTION_PARAM' => "The value for 'param' in option '{option}' is not recognized.",
+ 'ERR_OPTION_NOT_DEFINED' => "The option '{option}' is not recognized.",
+ 'ERR_OPTION_NOT_MULTI' => "The option '{option}' does not take multiple values.",
+ 'ERR_OPTION_PARAM_REJECTED' => "The option '{option}' is not allowed to have a value.",
+ 'ERR_OPTION_PARAM_REQUIRED' => "The option '{option}' is required to have a value.",
],
);
@@ -65,7 +65,7 @@ public function translate($key, array $tokens_values = [])
// do string replacements
foreach ($tokens_values as $token => $value) {
- $message = str_replace("{:$token}", $value, $message);
+ $message = str_replace('{' . $token . '}', $value, $message);
}
// done!

0 comments on commit aec9f04

Please sign in to comment.