lib/i18n/tasks/scanners/relative_keys.rb in i18n-tasks-1.0.9 vs lib/i18n/tasks/scanners/relative_keys.rb in i18n-tasks-1.0.10
- old
+ new
@@ -8,18 +8,18 @@
# @param path [String] path to the file containing the key
# @param roots [Array<String>] paths to relative roots
# @param calling_method [#call, Symbol, String, false, nil]
# @return [String] absolute version of the key
def absolute_key(key, path, roots: config[:relative_roots],
- exclude_method_name_paths: config[:exclude_method_name_paths],
+ exclude_method_name_paths: config[:relative_exclude_method_name_paths],
calling_method: nil)
return key unless key.start_with?(DOT)
fail 'roots argument is required' unless roots.present?
normalized_path = File.expand_path(path)
(root = path_root(normalized_path, roots)) ||
fail(CommandError, "Cannot resolve relative key \"#{key}\".\n" \
- "Set search.relative_roots in config/i18n-tasks.yml (currently #{roots.inspect})")
+ "Set search.relative_roots in config/i18n-tasks.yml (currently #{roots.inspect})")
normalized_path.sub!(root, '')
if (exclude_method_name_paths || []).map { |p| expand_path(p) }.include?(root)
"#{prefix(normalized_path)}#{key}"
else