-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit removes i18n support from PDK as it is no longer required. Additionally we have also seen a small performance improvement as a result of this work.
- Loading branch information
Showing
114 changed files
with
648 additions
and
2,872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require 'pdk/i18n' | ||
|
||
module PDK | ||
autoload :Analytics, 'pdk/analytics' | ||
autoload :AnswerFile, 'pdk/answer_file' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
module PDK::CLI | ||
@config_get_cmd = @config_cmd.define_command do | ||
name 'get' | ||
usage _('config get [name]') | ||
summary _('(Deprecated) Retrieve the configuration for <name>. If not specified, retrieve all configuration settings') | ||
usage 'config get [name]' | ||
summary '(Deprecated) Retrieve the configuration for <name>. If not specified, retrieve all configuration settings' | ||
|
||
run do |_opts, args, _cmd| | ||
PDK.logger.warn _('The \'pdk config get\' command is deprecated, please use \'pdk get config\' instead.') | ||
PDK.logger.warn 'The \'pdk config get\' command is deprecated, please use \'pdk get config\' instead.' | ||
|
||
item_name = args[0] | ||
resolved_config = PDK.config.resolve(item_name) | ||
# If the user wanted to know a setting but it doesn't exist, raise an error | ||
if resolved_config.empty? && !item_name.nil? | ||
PDK.logger.error(_("Configuration item '%{name}' does not exist") % { name: item_name }) | ||
PDK.logger.error("Configuration item '%{name}' does not exist" % { name: item_name }) | ||
exit 1 | ||
end | ||
# If the user requested a setting and it's the only one resolved, then just output the value | ||
if resolved_config.count == 1 && resolved_config.keys[0] == item_name | ||
puts _('%{value}') % { value: resolved_config.values[0] } | ||
puts '%{value}' % { value: resolved_config.values[0] } | ||
exit 0 | ||
end | ||
# Otherwise just output everything | ||
resolved_config.keys.sort.each { |key| puts _('%{name}=%{value}') % { name: key, value: resolved_config[key] } } | ||
resolved_config.keys.sort.each { |key| puts '%{name}=%{value}' % { name: key, value: resolved_config[key] } } | ||
end | ||
end | ||
end |
Oops, something went wrong.