Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to call Faker::Music::Opera.saint_saens fails #2786

Closed
sjjbirch opened this issue Jun 26, 2023 · 1 comment
Closed

Trying to call Faker::Music::Opera.saint_saens fails #2786

sjjbirch opened this issue Jun 26, 2023 · 1 comment

Comments

@sjjbirch
Copy link

sjjbirch commented Jun 26, 2023

Describe the bug

Calling Faker::Music::Opera.saint_saens will fail with:

...rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/i18n-1.14.1/lib/i18n.rb:394:in `handle_exception': Translation missing: en.faker.opera.french.by_camille_saint_saens (I18n::MissingTranslationData) 

To Reproduce

Call 'Faker::Music::Opera.saint_saens` in Faker 3.2.0

Use the reproduction script below to reproduce the issue:

# frozen_string_literal: true

require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"

  git_source(:github) { |repo| "https://github.com/#{repo}.git" }

  gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main'
  gem "minitest"
end

require "minitest/autorun"

class BugTest < Minitest::Test
  def test_faker
    @french_words_are_not_real = Faker::Music::Opera.saint_saens # No need to go further.
  end
end

Expected behavior

Return one of:
- L'ancêtre
- Ascanio
- Les barbares
- Déjanire
- Étienne Marcel
- Frédégonde
- Hélène
- Henry VIII
- Phryné
- La princesse jaune
- Proserpine
- Samson and Delilah
- Le timbre d'argent

Additional context

I think it fails because the spelling in the locale is "by_camille_saint_saëns"
While the spelling in the method is: 'opera.french.by_camille_saint_saens'

According to docs I18n should transliterate ëË to eE by default, but I haven't inspected their code or the call stack and another obvious reason for the failure isn't apparent to me.

@sjjbirch sjjbirch changed the title Trying to call Faker::Music::Opera.saint_saens fails, because French names use fake letters ("ë") Trying to call Faker::Music::Opera.saint_saens fails Jun 26, 2023
@thdaraujo
Copy link
Contributor

fixed by #2792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants