Skip to content

Added Georgian language configuration - #1088

Merged
bodiam merged 3 commits into
datafaker-net:mainfrom
aisitec:geo-config
Feb 14, 2024
Merged

bodiam merged 3 commits into
datafaker-net:mainfrom
aisitec:geo-config

Conversation

@mikheil-aisitec

Copy link
Copy Markdown
Contributor

Country names, addresses, streets, names and phone numbers in Georgian were added. ID number generator was also added. ID numbers in Georgia are 11-digit numbers without any personal data or publicly known dependency between digits. ID numbers can begin with 0.

Compound given and family names are also supported:

  • Some people may have two given names (e.g. Lasha-Giorgi).
  • Sometimes "basic" family names are joined using '-' (From the real-world scenarios: women usually keep their maiden names in Georgia, but it's also possible to either switch to spouse's family name or even join them. Also, sometimes children inherit family names from both parents, if they decide to do so).

@what-the-diff

what-the-diff Bot commented Feb 13, 2024

Copy link
Copy Markdown

PR Summary

  • Update to README with New Locale Support
    We now support the Georgian language in our application. The README is updated to reflect this.
  • Addition of Georgian ID Generation Method
    We have included a new function that allows the creation of valid ID numbers for citizens and residents of Georgia. This will allow Georgian users to utilize services requiring ID authentication.
  • Integration of Georgian Translations and Settings
    A new file containing Georgian translations and settings has been added for a localized user experience.
  • Enhancement to Georgian Section
    Additional details across various categories like addresses, internet usage, names, phone information, and cell phone details have been updated in the Georgian section. This provides more fine-grained, accurate data for Georgian users.

@kingthorin kingthorin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to provide any source details? (Just to make future updates etc easier)

* @return A valid ID Number
*/
public String validGeIDNumber() {
return faker.numerify("###########");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to wikipedia this should be 9 digits. 🤷‍♂️
https://en.wikipedia.org/wiki/National_identification_number#Georgia

In Georgia personal number is 9 digits and may contain leading zero. It is assigned to citizens at birth and to residents on demand. Personal number is used for identification in all government and many commercial institutions. Personal number is also reused as taxpayer identification number for Individual entrepreneurs. For citizens first few digits apparently represent place of birth, but format is not public.

@mikheil-aisitec mikheil-aisitec Feb 13, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Information in Wikipedia is not accurate and seems like I have to contribute there too. It was not easy to find English versions of the legal acts but fortunately there are some.

Here are legal acts translated in English https://www.geoconsul.gov.ge/en/legal-acts

Please scroll down to "ON APPROVAL OF THE RULES FOR ISSUING ID (RESIDENCE) CARD, PASSPORT, TRAVEL PASSPORT AND TRAVEL DOCUMENT" (Direct link: https://gc-pfiles.mfa.gov.ge/DocFiles//2023/12/14/LegalAct/24/19480459-a1ca-4723-94cd-10a6b3290990.pdf )

This is the =Order of the Minister of Justice, from July 27, 2011.

Article 14 - Assigning a personal number

  1. A personal number shall consist of eleven digits. The first two digits (from 01 to 99) shall be an administrative unit code, the following digit (from 1 to 9) shall be a check digit obtained by a certain formula from the other ten digits. The following two digits (from 01 to 99) shall be the code of the
    territorial office of the Agency that has assigned the personal number to the person and the last six digits shall be the serial number of the record of the assignment of a personal number to a person (from 000001 to 999999), except for the combinations 666XXX, X666XX, XX666X, XXX666.
  2. The chairperson of the Agency, with the agreement of the Minister of Justice of Georgia, shall define the formula for obtaining a check digit.
  3. The first two digits of a personal number assigned to a citizen of Georgia staying abroad shall denote the Ministry of Foreign Affairs of Georgia, the following digit (from 1 to 9) shall be a check digit, the following two digits shall indicate the diplomatic mission or the consular office of Georgia abroad that has assigned the personal number. The other six digits shall be the serial number of the record of the assignment of a personal number to a person,
    except for the combinations 666XXX, X666XX, XX666X, XXX666.

In fact, the "formula" mentioned in the paragraph 6 was never published (I was working in that agency from 2011 and was a deputy chairperson from 2017 to 2019, until my departure. I cannot recall publishing this even in Georgian). Everybody in Georgia now considers the personal number is an arbitrary sequence of 11 digits, defined by the Governmental agency.

The 11-digit personal numbers were established long ago, in 90's, after gaining independence (I have received mine somewhere in 1993 I guess) but unfortunately, I could not find the older legal act. Probably it's not digitized.

In the previous order of the Minister of Justice from 2004 (https://matsne.gov.ge/ka/document/view/59044 - in Georgian) which was substituted with the above-mentoned one in 2011, article 7 says the personal number contains 11 digits, but there is no mention about 666 (You can find "მუხლი 7. პირადი ნომრის მინიჭება" and copy-paste it in Google Translate. But do not expect great quality of the translation).

Since the current "666 rule" is relatively new (and there are people with who was issued ID number in 90s with "666" in it, including one of my relatives), I decided not to implement it for now, for simplicity.

What I can also provide in addition is EU PRADO database where you can browse various types of Georgian identity documents including ones issued in 2002 all containing 11-digit ID number: https://www.consilium.europa.eu/prado/en/prado-documents/geo/index.html

Regarding 9-digit identifier: this is a tax identifier assigned by the tax authority. Nowadays they assign it to legal entities only. However, decades ago, taxpayer natural persons were issued these 9-digit numbers too in addition to the 11-digit personal numbers and probably the guy who was editing Wikipedia article did not pay much attention. Eventually the tax authority gave up this practice and start accepting 11-digit numbers too for natural persons/individual entrepreneurs.

I hope this helps.

Best Regards,
Mikheil

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks that's great!

Any source info for the names etc. if not it isn't a blocker it's just a "nice to have" for the future if anyone wants to update it or if someone asks questions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First names and last names were taken from the public sources:

  1. Most frequent and most rare first and names, official statistics: https://intpass.sda.gov.ge/NameStatistics.aspx?type=popular and https://intpass.sda.gov.ge/NameStatistics.aspx?type=rare
  2. First and last names of the candidates from two largest political parties (https://civil.ge/ka/archives/372333 and https://civil.ge/ka/archives/372431) - some of them were removed (the rare ones, to ensure any linkage to the particular person using first name or last name only).
  3. Few others, like names of my children, first and last names of near and distinct relatives, etc. I could recall.
  4. Some funny last names from "folklore" like "ღობეგლეჯიაშვილი" (means "child of fencedestroyer") and "ჯირკიგლეჯიაშვილი" (means "child of stumpdestroyer") - they sound as the real Georgian family names, but they aren't (to my best knowledge). I frequently use for testing.

City names are number of real cities.

Street names are ... lol... it was the hardest one :) There was an announcement about the electricity outage, containing long list of the streets :-) Here: https://commersant.ge/news/society/tbilisis-quchebi-romlebsats-dghes-eleqtromomarageba-sheutsydeba-17679 so I took ones from Vake region of Tbilisi as it was the longest one, and added few other names I could recall from my memory just not to bind this to Vake only.

I hope I did not violate anything.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I think that's fine. Like I said it's just good for future maintenance and support that we know what to point to

@bodiam

bodiam commented Feb 13, 2024 •

Copy link
Copy Markdown
Contributor

Hi @mikheil-aisitec , this PR looks great, and thank you for providing some insight in your sources, that was an absolutely great read. I think this PR is ready to be merged unless @kingthorin has any other feedback (thanks for asking those questions, much appreciated!!)

Update : seems the build failed, I'll have a look in a moment.

@kingthorin

Copy link
Copy Markdown
Collaborator

I just re-ran it. I think we have a flaky integration test.

@kingthorin

Copy link
Copy Markdown
Collaborator

23:06:28.086 [ERROR] FakerIntegrationTest.testAllFakerMethodsThatReturnStrings:93->testAllMethodsThatReturnStringsActuallyReturnStrings:115 » Runtime Unable to resolve #{Address.state} directive for FakerContext FakerContext{, locale=SingletonLocale{locale=ka}, randomService=net.datafaker.service.RandomService@1}.

@mikheil-aisitec

Copy link
Copy Markdown
Contributor Author

Sorry, added states too. mvnw.cmd verify -PnoGpg works for me now.

@codecov-commenter

codecov-commenter commented Feb 14, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b37c566) 92.35% compared to head (2d378ee) 92.31%.
Report is 7 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1088      +/-   ##
============================================
- Coverage     92.35%   92.31%   -0.04%     
- Complexity     2821     2822       +1     
============================================
  Files           292      292              
  Lines          5609     5611       +2     
  Branches        599      598       -1     
============================================
  Hits           5180     5180              
- Misses          275      276       +1     
- Partials        154      155       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bodiam
bodiam merged commit 6a56551 into datafaker-net:main Feb 14, 2024
@bodiam

bodiam commented Feb 14, 2024 •

Copy link
Copy Markdown
Contributor

Great! Thanks all, it's been merged, and should be available as a snapshot release in a few moments.

If you need a production release, please let me know, it takes a bit more effort to do a proper release.

@bodiam

bodiam commented Feb 14, 2024

Copy link
Copy Markdown
Contributor

@kingthorin seems you were right, it does look like there's a flaky test somewhere, the merge to master failed.

@mikheil-aisitec

Copy link
Copy Markdown
Contributor Author

@bodiam @kingthorin does not look like test case failure. JDK17 passed as well as JDK21 on Ubuntu.

Jdk 21, os windows-latest

[INFO] --- source:3.3.0:jar-no-fork (attach-sources) @ datafaker ---
[INFO] Building jar: D:\a\datafaker\datafaker\target\datafaker-2.1.1-SNAPSHOT-sources.jar
[INFO]
[INFO] --- javadoc:3.6.3:jar (attach-javadocs) @ datafaker ---
2024-02-14 00:27:10
Full thread dump OpenJDK 64-Bit Server VM (21.0.2+13-LTS mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x000002a8e93a6c90, length=12, elements={
0x000002a8fe0257d0, 0x000002a8ff5cbe90, 0x000002a8ff5cc9c0, 0x000002a8ff5d4220,
0x000002a8ff5d6dc0, 0x000002a8ff5dbbe0, 0x000002a8ff5d4af0, 0x000002a8ff5e8cc0,
0x000002a8ff5e9b10, 0x000002a89d82d7d0, 0x000002a89d87cca0, 0x000002a8e8887fc0
}

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

Successfully merging this pull request may close these issues.

4 participants