Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates i18n.t method calls to avoid deprecated synthax #15500

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/java_pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def inputworker(plugin)
# otherwise, report error and restart
@logger.error(I18n.t(
"logstash.pipeline.worker-error-debug",
default_logging_keys(
**default_logging_keys(
:plugin => plugin.inspect,
:error => e.message,
:exception => e.class,
Expand Down
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def execute

field_reference_escape_style_setting = settings.get_setting('config.field_reference.escape_style')
if field_reference_escape_style_setting.set?
logger.warn(I18n.t("logstash.settings.technical_preview.set", canonical_name: field_reference_escape_style_setting.name))
logger.warn(I18n.t("logstash.settings.technical_preview.set", :canonical_name => field_reference_escape_style_setting.name))
end
field_reference_escape_style = field_reference_escape_style_setting.value
logger.debug("Setting global FieldReference escape style: #{field_reference_escape_style}")
Expand Down
12 changes: 6 additions & 6 deletions logstash-core/lib/logstash/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -840,15 +840,15 @@ def initialize(canonical_proxy, alias_name)

def set(value)
deprecation_logger.deprecated(I18n.t("logstash.settings.deprecation.set",
deprecated_alias: name,
canonical_name: canonical_proxy.name))
:deprecated_alias => name,
:canonical_name => canonical_proxy.name))
super
end

def value
logger.warn(I18n.t("logstash.settings.deprecation.queried",
deprecated_alias: name,
canonical_name: canonical_proxy.name))
:deprecated_alias => name,
:canonical_name => canonical_proxy.name))
@canonical_proxy.value
end

Expand Down Expand Up @@ -914,8 +914,8 @@ def format(output)
def validate_value
if deprecated_alias.set? && canonical_setting.set?
fail(ArgumentError, I18n.t("logstash.settings.deprecation.ambiguous",
canonical_name: canonical_setting.name,
deprecated_alias: deprecated_alias.name))
:canonical_name => canonical_setting.name,
:deprecated_alias => deprecated_alias.name))
end

super
Expand Down