Module: I18n::Processes

Defined in:
lib/i18n/processes.rb,
lib/i18n/processes/cli.rb,
lib/i18n/processes/data.rb,
lib/i18n/processes/stats.rb,
lib/i18n/processes/version.rb,
lib/i18n/processes/commands.rb,
lib/i18n/processes/html_keys.rb,
lib/i18n/processes/split_key.rb,
lib/i18n/processes/used_keys.rb,
lib/i18n/processes/references.rb,
lib/i18n/processes/command/dsl.rb,
lib/i18n/processes/locale_list.rb,
lib/i18n/processes/unused_keys.rb,
lib/i18n/processes/base_process.rb,
lib/i18n/processes/missing_keys.rb,
lib/i18n/processes/command_error.rb,
lib/i18n/processes/rainbow_utils.rb,
lib/i18n/processes/console_context.rb,
lib/i18n/processes/locale_pathname.rb,
lib/i18n/processes/data/file_system.rb,
lib/i18n/processes/reports/terminal.rb,
lib/i18n/processes/command/commander.rb,
lib/i18n/processes/data/file_formats.rb,
lib/i18n/processes/command/collection.rb,
lib/i18n/processes/google_translation.rb,
lib/i18n/processes/data/tree/traversal.rb,
lib/i18n/processes/command/options/data.rb,
lib/i18n/processes/string_interpolation.rb,
lib/i18n/processes/command/commands/data.rb,
lib/i18n/processes/command/commands/meta.rb,
lib/i18n/processes/command/commands/tree.rb,
lib/i18n/processes/command/commands/xlsx.rb,
lib/i18n/processes/data/file_system_base.rb,
lib/i18n/processes/command/options/common.rb,
lib/i18n/processes/scanners/relative_keys.rb,
lib/i18n/processes/command/commands/health.rb,
lib/i18n/processes/command/commands/usages.rb,
lib/i18n/processes/command/options/locales.rb,
lib/i18n/processes/command/commands/eq_base.rb,
lib/i18n/processes/command/commands/missing.rb,
lib/i18n/processes/data/adapter/json_adapter.rb,
lib/i18n/processes/data/adapter/yaml_adapter.rb,
lib/i18n/processes/data/router/pattern_router.rb,
lib/i18n/processes/command/option_parsers/enum.rb,
lib/i18n/processes/scanners/results/occurrence.rb,
lib/i18n/processes/command/option_parsers/locale.rb,
lib/i18n/processes/command/commands/preprocessing.rb,
lib/i18n/processes/data/router/conservative_router.rb,
lib/i18n/processes/scanners/occurrence_from_position.rb

Defined Under Namespace

Modules: Path, Command, Configuration, Data, GoogleTranslation, HtmlKeys, IgnoreKeys, KeyPatternMatching, LocaleList, LocalePathname, Logging, MissingKeys, PluralKeys, RainbowUtils, References, Reports, Scanners, SplitKey, Stats, StringInterpolation, UnusedKeys, UsedKeys Classes: BaseProcess, CLI, CommandError, Commands, ConsoleContext

Constant Summary collapse

VERSION =
'0.1.5'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.verbose=(value) ⇒ Object (writeonly)

Sets the attribute verbose

Parameters:

  • value

    the value to set the attribute verbose to.



15
16
17
# File 'lib/i18n/processes.rb', line 15

def verbose=(value)
  @verbose = value
end

Class Method Details

.add_commands(commands_module) ⇒ Object

Add commands to i18n-processes

Parameters:

  • commands_module (Module)

Returns:

  • self



33
34
35
36
# File 'lib/i18n/processes.rb', line 33

def add_commands(commands_module)
  ::I18n::Processes::Commands.send :include, commands_module
  self
end

.add_scanner(scanner_class_name, scanner_opts = {}) ⇒ Object

Add a scanner to the default configuration.

Parameters:

  • scanner_class_name (String)
  • scanner_opts (Hash) (defaults to: {})

Returns:

  • self



22
23
24
25
26
27
# File 'lib/i18n/processes.rb', line 22

def add_scanner(scanner_class_name, scanner_opts = {})
  scanners = I18n::Processes::Configuration::DEFAULTS[:search][:scanners]
  scanners << [scanner_class_name, scanner_opts]
  scanners.uniq!
  self
end

.gem_pathObject



7
8
9
# File 'lib/i18n/processes.rb', line 7

def gem_path
  File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
end

.verbose?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/i18n/processes.rb', line 11

def verbose?
  @verbose
end