Skip to content

Commit

Permalink
Fixes variables names in prepare_change_log.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
alliannas committed Jan 17, 2017
1 parent e522dda commit 653845c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions QuizUp/actions/prepare_change_log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ module Actions
class PrepareChangeLogAction < Action
def self.run(params)
locales = ["de-DE", "en-US", "es-ES", "es-MX", "fr-FR", "pt-BR"]
localesWithMissingChangeLog = []
locales_with_missing_change_log = []

locales.each do |locale|
remainingChangeLogsForLocale = self.check_line_count_for_change_log_file(locale)
if remainingChangeLogsForLocale == 0
localesWithMissingChangeLog.push(locale)
remaining_change_log_for_file = self.check_line_count_for_change_log_file(locale)
if remaining_change_log_for_file == 0
locales_with_missing_change_log.push(locale)
end
end

unless localesWithMissingChangeLog.empty?
missingChangeLogString = localesWithMissingChangeLog.join(', ')
UI.user_error!("Ran out of localized change logs in {#missingChangeLogString}")
unless locales_with_missing_change_log.empty?
missing_change_log_string = locales_with_missing_change_log.join(', ')
UI.user_error!("Ran out of localized change logs in {#missing_change_log_string}")
end

locales.each do |locale|
newChangeLog = self.get_change_log_from_file(locale)
self.set_new_change_log(locale, newChangeLog)
new_changelog = self.get_change_log_from_file(locale)
self.set_new_change_log(locale, new_changelog)
self.remove_change_log_from_file(locale)
end

Expand Down

0 comments on commit 653845c

Please sign in to comment.