Skip to content

Commit

Permalink
Merge pull request #1969 from gooddata/jimi/fix
Browse files Browse the repository at this point in the history
fix: support for italian and unknown languages

Reviewed-by: Libor Ryšavý
             https://github.com/liry
  • Loading branch information
gdgate authored Mar 22, 2024
2 parents 3684dc1 + 3fb35f4 commit ef6d566
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.63
3.7.64
6 changes: 3 additions & 3 deletions lib/gooddata/models/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class Domain < Rest::Resource
'pt-PT' => 'Portuguese/Portugal',
'fr-FR' => 'French',
'de-DE' => 'German',
'ja-JP' => 'Japanese'
'ja-JP' => 'Japanese',
'it-IT' => 'Italian'
}

class << self
Expand Down Expand Up @@ -292,9 +293,8 @@ 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 English because '#{language}' is an invalid value. \
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. \
Available values for setting language are: #{available_languages}."
language = 'en-US'
end
language
end
Expand Down

0 comments on commit ef6d566

Please sign in to comment.