Skip to content

Commit

Permalink
Ensure locales have unique names
Browse files Browse the repository at this point in the history
Previously, we listed both en-IN as "English (UK)" and es-MX as
"Castellano (ES)".

This commit adds a spec to ensure that the locales have a unique names
and updates the two offending locales.
  • Loading branch information
jhawthorn committed Feb 9, 2018
1 parent ea9fa3f commit 0a4451e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/locales/en-IN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ en-IN:
available_locales:
language:
localization_settings:
this_file_language: English (UK)
this_file_language: English (IN)
icon: Icon
identifier:
image: Image
Expand Down
2 changes: 1 addition & 1 deletion config/locales/es-MX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ es-MX:
available_locales: Traduciones Disponibles
language: Idioma
localization_settings: Ajustes de traducciones
this_file_language:
this_file_language: Castellano (MX)
icon: Icono
identifier:
image: Imagen
Expand Down
8 changes: 8 additions & 0 deletions spec/helpers/locale_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,13 @@
is_expected.to match_array SolidusI18n::Locale.all
end
end

describe 'locale presentation' do
subject { all_locales_options.map(&:first) }

it 'should all be unique' do
is_expected.to match_array(subject.uniq)
end
end
end
end

0 comments on commit 0a4451e

Please sign in to comment.