Class: I18nAdd::YamlProcessor
- Inherits:
-
Object
- Object
- I18nAdd::YamlProcessor
- Defined in:
- lib/i18n_add/yaml_processor.rb
Defined Under Namespace
Classes: KeyContext, ProcessorState, TranslationEntry
Instance Method Summary collapse
-
#process_files(file_map) ⇒ void
Processes multiple YAML translation files with their respective locale configurations.
Instance Method Details
#process_files(file_map) ⇒ void
The method automatically creates directory structures and files if they don’t exist
Existing YAML content is preserved and new keys are properly merged
Console output shows processing progress and completion status
This method returns an undefined value.
Processes multiple YAML translation files with their respective locale configurations.
This is the main entry point for the YAML processor. It handles batch processing of translation entries across multiple files, ensuring that each file is properly updated with new translation keys while preserving existing content and structure.
The method creates necessary directory structures, handles file creation if files don’t exist, and maintains proper YAML formatting throughout the process.
58 59 60 61 62 63 |
# File 'lib/i18n_add/yaml_processor.rb', line 58 def process_files(file_map) file_map.each do |file_path, config| process_single_file(file_path, config) end puts "Processed #{file_map.size} files successfully." end |