Skip to content

Commit 0a6fa5e

Browse files
committed
Improve log message when extracting keys
To not only mention the number of keys found in the original file expected to be extracted, but also the number of keys actually extracted (which can be smaller if not all keys have translations for a given locale) to make what is described by the message be more accurate and less misleading
1 parent d512f89 commit 0a6fa5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_extract_keys_from_strings_files.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def self.run(params)
1616
next if target_strings_file == target_original_file # do not generate/overwrite the original locale itself
1717

1818
keys_to_extract = keys_to_extract_per_target_file[target_original_file]
19-
UI.message("Extracting #{keys_to_extract.count} keys into #{target_strings_file}...")
20-
2119
extracted_translations = translations.slice(*keys_to_extract)
20+
UI.message("Extracting #{extracted_translations.count} keys (out of #{keys_to_extract.count} expected) into #{target_strings_file}...")
21+
2222
FileUtils.mkdir_p(File.dirname(target_strings_file)) # Ensure path up to parent dir exists, create it if not.
2323
Fastlane::Helper::Ios::L10nHelper.generate_strings_file_from_hash(translations: extracted_translations, output_path: target_strings_file)
2424
rescue StandardError => e

0 commit comments

Comments
 (0)