Skip to content

Commit 6f477c3

Browse files
authored
Merge pull request #344 from wordpress-mobile/l10n/log-message-improvements
Improve some log messages on L10n-related actions
2 parents c9d3666 + cef894e commit 6f477c3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ _None_
1414

1515
### Bug Fixes
1616

17-
_None_
17+
* Improved logs and console output, to avoid `ios_download_strings_files_from_glotpress` to look like it's deadlocked while it takes some time to download all the exports of all the locales, and to avoid the log messages from `ios_extract_keys_from_strings_files` to be misleading. [#344]
1818

1919
### Internal Changes
2020

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def self.run(params)
1010

1111
locales.each do |glotpress_locale, lproj_name|
1212
# Download the export in the proper `.lproj` directory
13+
UI.message "Downloading translations for '#{lproj_name}' from GlotPress (#{glotpress_locale}) [#{params[:filters]}]..."
1314
lproj_dir = File.join(download_dir, "#{lproj_name}.lproj")
1415
destination = File.join(lproj_dir, "#{params[:table_basename]}.strings")
1516
FileUtils.mkdir(lproj_dir) unless Dir.exist?(lproj_dir)

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)