Skip to content

Commit

Permalink
Merge pull request #1970 from gooddata/jimi/fix
Browse files Browse the repository at this point in the history
fix: bring back the english default for invalid language
  • Loading branch information
liry authored Mar 26, 2024
2 parents ef6d566 + b6f4048 commit 8b440cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.64
3.7.65
3 changes: 2 additions & 1 deletion lib/gooddata/models/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ def ensure_user_language(user_data)
language = user_data[:language] || 'en-US'
unless USER_LANGUAGES.keys.include?(language)
available_languages = USER_LANGUAGES.map { |k, v| "#{k} (#{v})" }.join(', ')
GoodData.logger.warn "The language for user '#{user_data[:login]}' will be '#{language}' but it may be not valid, since it's not declared to be known by the client. \
GoodData.logger.warn "The language for user '#{user_data[:login]}' will be English because '#{language}' is an invalid value. \
Available values for setting language are: #{available_languages}."
language = 'en-US'
end
language
end
Expand Down

0 comments on commit 8b440cb

Please sign in to comment.