Skip to content

Language code for Denmark is 'da' #642

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

Closed
robosoul opened this issue Jan 20, 2023 · 3 comments
Closed

Language code for Denmark is 'da' #642

robosoul opened this issue Jan 20, 2023 · 3 comments

Comments

@robosoul
Copy link
Contributor

Describe the bug
Country code for Denmark is 'dk'. Language code for Denmark is 'da'.

From here: https://docs.oracle.com/cd/F19385_01/books/OnDemMigrTool/language-codes.html#c_Language_Codes_and_Their_Corresponding_Languageand_Country__apq1024117

DAN | da_DK | da | Danish | Denmark

We have inconsistent faker yaml configs for Denmark

 % head -3 src/main/resources/da-DK.yml 
da-DK:
  faker:
    address:

% head -3 src/main/resources/dk.yml    
dk:
  faker:
    passport:

To Reproduce

    public static void main(String[] args) {
        Faker faker = new Faker(new Locale("da", "DK"));

        for (int i = 0; i < 10; i++) {
            System.out.println(faker.passport().valid());
        }
    }

Produces following values:

675721431
A73519666
Z21455537
Y08878014
Y01691978
C48328077
X80809531
A72483039
X37609985
288690866

Only the first and the last from above are valid for DK.

Expected behavior
Per "[0-9]{9}" we should only get 9 digit passport values for Denmark.

Versions:

  • OS: OSX
  • JDK 8/11
  • Faker Version 1.7

dk.yml should be removed and following:

dk:
  faker:
    passport:
      valid: "[0-9]{9}"

should be added to da-DK.yml

Additional context
Add any other context about the problem here.

@robosoul
Copy link
Contributor Author

@bodiam - I can see you added dk.yml back in September. Was this on purpose or an oversight ? Thanks, Luka

@bodiam
Copy link
Contributor

bodiam commented Jan 20, 2023

@bodiam - I can see you added dk.yml back in September. Was this on purpose or an oversight ? Thanks, Luka

I have no idea :) Was there any hint in the commit message?

@robosoul
Copy link
Contributor Author

Nothing special, something like "Making passport numbers pattern country specific". Could be it was an oversight. It's in da-DK now, no dk here:
https://www.science.co.il/language/Codes.php

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

No branches or pull requests

2 participants