Skip to content

Commit 31daea9

Browse files
committed
Add more UI messages to gp_downloadmetadata
1 parent 80af526 commit 31daea9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_download_helper.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,24 @@ def handle_glotpress_download(response:, locale:, is_source:)
102102
case response.code
103103
when '200'
104104
# All good, parse the result
105+
UI.success("Successfully downloaded `#{locale}`.")
105106
@alternates.clear
106107
loc_data = JSON.parse(response.body) rescue loc_data = nil
107108
parse_data(locale, loc_data, is_source)
108109
reparse_alternates(target_locale, loc_data, is_source) unless @alternates.length == 0
109110
when '301'
110111
# Follow the redirect
112+
UI.message("Received 301 for `#{locale}`. Following redirect...")
111113
download(locale, response.header['location'], is_source)
112114
when '429'
113115
# We got rate-limited, offer to try again
114116
if UI.confirm("Retry downloading `#{locale}` after receiving 429 from the API?")
115117
download(locale, response.uri, is_source)
116118
else
117-
UI.message("Giving up on attempting to download #{locale}.")
119+
UI.error("Abandoning `#{locale}` download as requested.")
118120
end
119121
else
120-
UI.error("Received unexpected #{response.code} from request to URI #{response.uri}")
122+
UI.error("Received unexpected #{response.code} from request to URI #{response.uri}.")
121123
end
122124
end
123125
end

0 commit comments

Comments
 (0)