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
University name fails for german locale #148
Comments
#city doesn't appear to be a correct expression. Did this work prior to the change? I'll take a look at this. I think reverting the change is premature considering it fixes some other issues. By reverting you might be fixing this university issue but you'd be breaking a number of others. |
Shouldn't it be #Address.city? |
Sorry, you are right this, in this case it is a bug in But there are other issues, e.g.:
and in this case |
Ru.yml is referencing street-title but that doesn't exist. Street-name does. I think the assumption that the faker Yml files is correct is a flawed assumption. |
I'm stepping out for a bit but I will help when I get back. I'll run your branch and see what the errors are. |
|
thanks to Trever Shick for the solution
Do we know if #{Address.street_title} would have worked with the code prior to the f574317 change? It's taking advantage of the dynamic methods in ruby because street_title is not defined on the Address object. I'll take a look at this issue in a little bit. I still don't think it warrants a revert of the change. |
Thanks for looking into this. :)
|
I'm going to fix this, but new Faker(new Locale("ru")).address().streetAddress(); doesn't actually work. I ran it in a loop with 0.10 and the result is below. Regardless, i'm still going to fix it. O'Hara проспект, 375 |
@PascalSchumacher do you have a branch you're working on for this? |
@trevershick Not sure what you mean? I did not do any work on this beyond #150 |
Addresses DiUS#148 If the yml contains an object style reference like Address.street_title which doesn't resolve to a method name on Address, then try 'address.street_title' as a last ditch effort which is probably how it should be encoded in the yml anyhow.
@PascalSchumacher I created a PR on your branch. |
Addresses DiUS#148 If the yml contains an object style reference like Address.street_title which doesn't resolve to a method name on Address, then try 'address.street_title' as a last ditch effort which is probably how it should be encoded in the yml anyhow.
Thanks a lot. 👍 :) I have added the commit to #150. I have also created pull requests to https://github.com/stympy/faker for the changes to yml files. |
Addresses DiUS#148 If the yml contains an object style reference like Address.street_title which doesn't resolve to a method name on Address, then try 'address.street_title' as a last ditch effort which is probably how it should be encoded in the yml anyhow.
Addresses DiUS#148 If the yml contains an object style reference like Address.street_title which doesn't resolve to a method name on Address, then try 'address.street_title' as a last ditch effort which is probably how it should be encoded in the yml anyhow.
As code was merged to master for this issue, I think it can be closed now. |
new Faker(Locale.GERMAN).university().name();
fails with:I believe this is a general problem.
In f574317 the resolution of variables in the yml files was changed, e.g.
"#{PhoneNumber.area_code}-#{PhoneNumber.exchange_code}-#{PhoneNumber.subscriber_number}"
was replaced by"#{area_code}-#{exchange_code}-#{subscriber_number}"
, but this change was only done inen-US.yml
.In my opinion this change should be reverted, because it means that java-faker can no longer use the yml files from faker.
The text was updated successfully, but these errors were encountered: