Skip to content

Commit

Permalink
refactor(locale): rename ge to ka_GE (#2010)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmayer committed Apr 3, 2023
1 parent cbbc076 commit 1f763f8
Show file tree
Hide file tree
Showing 42 changed files with 35 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/guide/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ In this example there are 5 locales. Each of these is checked in order, and the
| `fr_CA` | French (Canada) | `fakerFR_CA` |
| `fr_CH` | French (Switzerland) | `fakerFR_CH` |
| `fr_LU` | French (Luxembourg) | `fakerFR_LU` |
| `ge` | Georgian | `fakerGE` |
| `he` | Hebrew | `fakerHE` |
| `hr` | Croatian | `fakerHR` |
| `hu` | Hungarian | `fakerHU` |
| `hy` | Armenian | `fakerHY` |
| `id_ID` | Indonesian | `fakerID_ID` |
| `it` | Italian | `fakerIT` |
| `ja` | Japanese | `fakerJA` |
| `ka_GE` | Georgian (Georgia) | `fakerKA_GE` |
| `ko` | Korean | `fakerKO` |
| `lv` | Latvian | `fakerLV` |
| `mk` | Macedonian | `fakerMK` |
Expand Down
4 changes: 3 additions & 1 deletion docs/guide/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ The `allowLeadingZeros` boolean parameter in `faker.string.numeric` (in the new

The functions `faker.system.mimeType`, `faker.system.fileType` and `faker.system.fileExt` now return data from a smaller set of more common MIME types, filetypes and extensions.

### Locale renamed
### Locales renamed

The `en_IND` (English, India) locale was renamed to `en_IN` for consistency with other locales.

The `ge` (Georgian) locale was renamed to `ka_GE` to use the standard ISO codes for language and country.
23 changes: 11 additions & 12 deletions src/locale/ge.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/
import { deprecated } from '../internal/deprecated';
import { faker as ka_GE } from './ka_GE';

import { Faker } from '../faker';
import base from '../locales/base';
import en from '../locales/en';
import ge from '../locales/ge';

export const faker = new Faker({
locale: [ge, en, base],
});
export const faker = (() => {
deprecated({
deprecated: "import { faker } from '@faker-js/faker/locale/ge'",
proposed: "import { faker } from '@faker-js/faker/locale/ka_GE'",
since: '8.0',
until: '9.0',
});
return ka_GE;
})();
6 changes: 3 additions & 3 deletions src/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ import { faker as fakerFR_BE } from './fr_BE';
import { faker as fakerFR_CA } from './fr_CA';
import { faker as fakerFR_CH } from './fr_CH';
import { faker as fakerFR_LU } from './fr_LU';
import { faker as fakerGE } from './ge';
import { faker as fakerHE } from './he';
import { faker as fakerHR } from './hr';
import { faker as fakerHU } from './hu';
import { faker as fakerHY } from './hy';
import { faker as fakerID_ID } from './id_ID';
import { faker as fakerIT } from './it';
import { faker as fakerJA } from './ja';
import { faker as fakerKA_GE } from './ka_GE';
import { faker as fakerKO } from './ko';
import { faker as fakerLV } from './lv';
import { faker as fakerMK } from './mk';
Expand Down Expand Up @@ -98,14 +98,14 @@ export {
fakerFR_CA,
fakerFR_CH,
fakerFR_LU,
fakerGE,
fakerHE,
fakerHR,
fakerHU,
fakerHY,
fakerID_ID,
fakerIT,
fakerJA,
fakerKA_GE,
fakerKO,
fakerLV,
fakerMK,
Expand Down Expand Up @@ -163,14 +163,14 @@ export const allFakers = {
fr_CA: fakerFR_CA,
fr_CH: fakerFR_CH,
fr_LU: fakerFR_LU,
ge: fakerGE,
he: fakerHE,
hr: fakerHR,
hu: fakerHU,
hy: fakerHY,
id_ID: fakerID_ID,
it: fakerIT,
ja: fakerJA,
ka_GE: fakerKA_GE,
ko: fakerKO,
lv: fakerLV,
mk: fakerMK,
Expand Down
13 changes: 13 additions & 0 deletions src/locale/ka_GE.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/

import { Faker } from '../faker';
import base from '../locales/base';
import en from '../locales/en';
import ka_GE from '../locales/ka_GE';

export const faker = new Faker({
locale: [ka_GE, en, base],
});
2 changes: 1 addition & 1 deletion src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export { default as fr_BE } from './fr_BE';
export { default as fr_CA } from './fr_CA';
export { default as fr_CH } from './fr_CH';
export { default as fr_LU } from './fr_LU';
export { default as ge } from './ge';
export { default as he } from './he';
export { default as hr } from './hr';
export { default as hu } from './hu';
export { default as hy } from './hy';
export { default as id_ID } from './id_ID';
export { default as it } from './it';
export { default as ja } from './ja';
export { default as ka_GE } from './ka_GE';
export { default as ko } from './ko';
export { default as lv } from './lv';
export { default as mk } from './mk';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/locales/ge/index.ts → src/locales/ka_GE/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import metadata from './metadata';
import person from './person';
import phone_number from './phone_number';

const ge: LocaleDefinition = {
const ka_GE: LocaleDefinition = {
cell_phone,
company,
internet,
Expand All @@ -21,4 +21,4 @@ const ge: LocaleDefinition = {
phone_number,
};

export default ge;
export default ka_GE;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { MetadataDefinitions } from '../..';

const metadata: MetadataDefinitions = {
title: 'Georgian',
title: 'Georgian (Georgia)',
};

export default metadata;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1f763f8

Please sign in to comment.