diff --git a/lib/translation_io/client/base_operation/dump_db_text_keys_step.rb b/lib/translation_io/client/base_operation/dump_db_text_keys_step.rb index 76a0ef8..318ee9c 100644 --- a/lib/translation_io/client/base_operation/dump_db_text_keys_step.rb +++ b/lib/translation_io/client/base_operation/dump_db_text_keys_step.rb @@ -35,11 +35,11 @@ def escape_entry(entry) def extracted_db_entries entries = [] - + unscoped_item = ["Phase", "Section", "Question"] @db_fields.keys.each do |table_name| table = table_name.constantize @db_fields[table_name].each do |column_name| - db_strings = table.distinct.pluck(column_name) + db_strings = if unscoped_item.include? table_name.to_s then table.unscoped.distinct.pluck(column_name) else table.distinct.pluck(column_name) end entries += db_strings end end diff --git a/lib/translation_io/client/base_operation/update_pot_file_step.rb b/lib/translation_io/client/base_operation/update_pot_file_step.rb index fbadf9d..c18aab8 100644 --- a/lib/translation_io/client/base_operation/update_pot_file_step.rb +++ b/lib/translation_io/client/base_operation/update_pot_file_step.rb @@ -16,6 +16,7 @@ def run(params) TranslationIO.info "Updating POT file." FileUtils.mkdir_p(File.dirname(@pot_path)) + TranslationIO.info "source files:" + @source_files.to_s GetText::Tools::XGetText.run(*@source_files, '-o', @pot_path, '--msgid-bugs-address', TranslationIO.config.pot_msgid_bugs_address, '--package-name', TranslationIO.config.pot_package_name,