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

feat(locale): add Serbian (Latin) language #1801

Merged
merged 21 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/guide/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ However, in most cases, using a specific locale will be beneficial in the long t
| ro | Romanian |
| ru | Russian |
| sk | Slovakian |
| sr_RS | Serbian (Latin) |
| sv | Swedish |
| tr | Turkish |
| uk | Ukrainian |
Expand Down
17 changes: 17 additions & 0 deletions src/locale/sr_RS.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/

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

export const faker = new Faker({
locale: 'sr_RS',
localeFallback: 'en',
locales: {
sr_RS,
en,
},
});
3 changes: 3 additions & 0 deletions src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import pt_PT from './pt_PT';
import ro from './ro';
import ru from './ru';
import sk from './sk';
import sr_RS from './sr_RS';
import sv from './sv';
import tr from './tr';
import uk from './uk';
Expand Down Expand Up @@ -116,6 +117,7 @@ export type KnownLocale =
| 'ro'
| 'ru'
| 'sk'
| 'sr_RS'
| 'sv'
| 'tr'
| 'uk'
Expand Down Expand Up @@ -179,6 +181,7 @@ const locales: KnownLocales = {
ro,
ru,
sk,
sr_RS,
sv,
tr,
uk,
Expand Down
1 change: 1 addition & 0 deletions src/locales/sr_RS/cell_phone/formats.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default ['06# ### ## ##', '06########', '+381 6# ### ####'];
11 changes: 11 additions & 0 deletions src/locales/sr_RS/cell_phone/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/
import formats from './formats';

const cell_phone = {
formats,
};

export default cell_phone;
14 changes: 14 additions & 0 deletions src/locales/sr_RS/date/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/
import type { DateDefinitions } from '../../..';
import month from './month';
import weekday from './weekday';

const date: DateDefinitions = {
month,
weekday,
};

export default date;
62 changes: 62 additions & 0 deletions src/locales/sr_RS/date/month.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
export default {
wide: [
'januar',
'februar',
'mart',
'april',
'maj',
'jun',
'jul',
'avgust',
'septembar',
'oktobar',
'novembar',
'decembar',
],
// Property "wide_context" is optional, if not set then "wide" will be used instead
// It is used to specify a word in context, which may differ from a stand-alone word
wide_context: [
'januar',
'februar',
'mart',
'april',
'maj',
'jun',
'jul',
'avgust',
'septembar',
'oktobar',
'novembar',
'decembar',
],
abbr: [
'jan',
'feb',
'mar',
'apr',
'maj',
'jun',
'jul',
'avg',
'sep',
'okt',
'nov',
'dec',
],
// Property "abbr_context" is optional, if not set then "abbr" will be used instead
// It is used to specify a word in context, which may differ from a stand-alone word
abbr_context: [
'jan',
'feb',
'mar',
'apr',
'maj',
'jun',
'jul',
'avg',
'sep',
'okt',
'nov',
'dec',
],
};
26 changes: 26 additions & 0 deletions src/locales/sr_RS/date/weekday.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export default {
wide: [
'nedelja',
'ponedeljak',
'utorak',
'sreda',
'četvrtak',
'petak',
'subota',
],
// Property "wide_context" is optional, if not set then "wide" will be used instead
// It is used to specify a word in context, which may differ from a stand-alone word
wide_context: [
'nedelja',
'ponedeljak',
'utorak',
'sreda',
'četvrtak',
'petak',
'subota',
],
abbr: ['ned', 'pon', 'uto', 'sre', 'čet', 'pet', 'sub'],
// Property "abbr_context" is optional, if not set then "abbr" will be used instead
// It is used to specify a word in context, which may differ from a stand-alone word
abbr_context: ['ned', 'pon', 'uto', 'sre', 'čet', 'pet', 'sub'],
};
23 changes: 23 additions & 0 deletions src/locales/sr_RS/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/
import type { LocaleDefinition } from '../..';
import cell_phone from './cell_phone';
import date from './date';
import internet from './internet';
import location from './location';
import person from './person';
import phone_number from './phone_number';

const sr_RS: LocaleDefinition = {
title: 'Serbian (Latin)',
cell_phone,
date,
internet,
location,
person,
phone_number,
};

export default sr_RS;
1 change: 1 addition & 0 deletions src/locales/sr_RS/internet/domain_suffix.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default ['rs', 'com', 'co.rs', 'edu.rs', 'in.rs'];
12 changes: 12 additions & 0 deletions src/locales/sr_RS/internet/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/
import type { InternetDefinitions } from '../../..';
import domain_suffix from './domain_suffix';

const internet: InternetDefinitions = {
domain_suffix,
};

export default internet;
1 change: 1 addition & 0 deletions src/locales/sr_RS/location/building_number.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default ['#', '##', '###'];
1 change: 1 addition & 0 deletions src/locales/sr_RS/location/city.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default ['{{location.city_name}}'];
29 changes: 29 additions & 0 deletions src/locales/sr_RS/location/city_name.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export default [
'Beograd',
'Bor',
'Jagodina',
'Kikinda',
'Kraljevo',
'Kruševac',
'Leskovac',
'Niš',
'Novi Pazar',
'Novi Sad',
'Pančevo',
'Paraćin',
'Pirot',
'Požarevac',
'Prokuplje',
'Smederevo',
'Sombor',
'Sopot',
'Sremska Mitrovica',
'Subotica',
'Užice',
'Vranje',
'Vršac',
'Zaječar',
'Zrenjanjin',
'Čačak',
'Šabac',
];
Loading