Skip to content

Commit

Permalink
i18n: Add Belarusian (by) localization
Browse files Browse the repository at this point in the history
  • Loading branch information
EDbarvinsky committed Mar 16, 2023
1 parent b7d8a89 commit dadfbcb
Show file tree
Hide file tree
Showing 11 changed files with 492 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org).
This document is formatted according to the principles of [Keep A CHANGELOG](http://keepachangelog.com).

## [Unreleased]
- (i18n) Add Belarusian localization ([#98](https://github.com/cucumber/gherkin/pull/98) by [EDbarvinsky](https://github.com/EDbarvinsky))

## [26.0.3] - 2023-01-03
### Fixed
Expand Down
49 changes: 49 additions & 0 deletions c/src/dialect.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,53 @@ static const Dialect bs_dialect = {
&bs_then_keywords,
&bs_when_keywords };

static const wchar_t* const by_and_KEYWORDS[] = { L"* ", L"I ", L"Таксама " };
static const Keywords by_and_keywords = { 3, by_and_KEYWORDS };

static const wchar_t* const by_background_KEYWORDS[] = { L"Кантэкст" };
static const Keywords by_background_keywords = { 1, by_background_KEYWORDS };

static const wchar_t* const by_but_KEYWORDS[] = { L"* ", L"Але ", L"Інакш " };
static const Keywords by_but_keywords = { 3, by_but_KEYWORDS };

static const wchar_t* const by_examples_KEYWORDS[] = { L"Прыклады" };
static const Keywords by_examples_keywords = { 1, by_examples_KEYWORDS };

static const wchar_t* const by_feature_KEYWORDS[] = { L"Функцыянальнасць", L"Функцыянал", L"Фіча" };
static const Keywords by_feature_keywords = { 3, by_feature_KEYWORDS };

static const wchar_t* const by_given_KEYWORDS[] = { L"* ", L"Нехай ", L"Дадзены " };
static const Keywords by_given_keywords = { 3, by_given_KEYWORDS };

static const wchar_t* const by_rule_KEYWORDS[] = { L"Правіла" };
static const Keywords by_rule_keywords = { 1, by_rule_KEYWORDS };

static const wchar_t* const by_scenario_KEYWORDS[] = { L"Сцэнар" };
static const Keywords by_scenario_keywords = { 1, by_scenario_KEYWORDS };

static const wchar_t* const by_scenarioOutline_KEYWORDS[] = { L"Шаблон сцэнарыя" };
static const Keywords by_scenarioOutline_keywords = { 1, by_scenarioOutline_KEYWORDS };

static const wchar_t* const by_then_KEYWORDS[] = { L"* ", L"Тады " };
static const Keywords by_then_keywords = { 2, by_then_KEYWORDS };

static const wchar_t* const by_when_KEYWORDS[] = { L"* ", L"Калі " };
static const Keywords by_when_keywords = { 2, by_when_KEYWORDS };

static const Dialect by_dialect = {
L"by",
&by_and_keywords,
&by_background_keywords,
&by_but_keywords,
&by_examples_keywords,
&by_feature_keywords,
&by_given_keywords,
&by_rule_keywords,
&by_scenario_keywords,
&by_scenarioOutline_keywords,
&by_then_keywords,
&by_when_keywords };

static const wchar_t* const ca_and_KEYWORDS[] = { L"* ", L"I " };
static const Keywords ca_and_keywords = { 2, ca_and_KEYWORDS };

Expand Down Expand Up @@ -3685,6 +3732,8 @@ const Dialect* Dialect_for(const wchar_t* language) {
return &bm_dialect;
if (wcscmp(bs_dialect.language_name, language) == 0)
return &bs_dialect;
if (wcscmp(by_dialect.language_name, language) == 0)
return &by_dialect;
if (wcscmp(ca_dialect.language_name, language) == 0)
return &ca_dialect;
if (wcscmp(cs_dialect.language_name, language) == 0)
Expand Down
47 changes: 47 additions & 0 deletions dart/assets/gherkin-languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,53 @@
"Kada "
]
},
"by": {
"and": [
"* ",
"I ",
"Таксама "
],
"background": [
"Кантэкст"
],
"but": [
"* ",
"Але ",
"Інакш "
],
"examples": [
"Прыклады"
],
"feature": [
"Функцыянальнасць",
"Функцыянал",
"Фіча"
],
"given": [
"* ",
"Нехай ",
"Дадзены "
],
"name": "Belarusian",
"native": "Беларуская",
"rule": [
"Правіла"
],
"scenario": [
"Сцэнар"
],
"scenarioOutline": [
"Шаблон сцэнарыя"
],
"then": [
"* ",
"Тады "
],
"when": [
"* ",
"Калі "
]
},
"ca": {
"and": [
"* ",
Expand Down
47 changes: 47 additions & 0 deletions dotnet/Gherkin/gherkin-languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,53 @@
"Kada "
]
},
"by": {
"and": [
"* ",
"I ",
"Таксама "
],
"background": [
"Кантэкст"
],
"but": [
"* ",
"Але ",
"Інакш "
],
"examples": [
"Прыклады"
],
"feature": [
"Функцыянальнасць",
"Функцыянал",
"Фіча"
],
"given": [
"* ",
"Нехай ",
"Дадзены "
],
"name": "Belarusian",
"native": "Беларуская",
"rule": [
"Правіла"
],
"scenario": [
"Сцэнар"
],
"scenarioOutline": [
"Шаблон сцэнарыя"
],
"then": [
"* ",
"Тады "
],
"when": [
"* ",
"Калі "
]
},
"ca": {
"and": [
"* ",
Expand Down
47 changes: 47 additions & 0 deletions elixir/priv/gherkin_languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,53 @@
"Kada "
]
},
"by": {
"and": [
"* ",
"I ",
"Таксама "
],
"background": [
"Кантэкст"
],
"but": [
"* ",
"Але ",
"Інакш "
],
"examples": [
"Прыклады"
],
"feature": [
"Функцыянальнасць",
"Функцыянал",
"Фіча"
],
"given": [
"* ",
"Нехай ",
"Дадзены "
],
"name": "Belarusian",
"native": "Беларуская",
"rule": [
"Правіла"
],
"scenario": [
"Сцэнар"
],
"scenarioOutline": [
"Шаблон сцэнарыя"
],
"then": [
"* ",
"Тады "
],
"when": [
"* ",
"Калі "
]
},
"ca": {
"and": [
"* ",
Expand Down
47 changes: 47 additions & 0 deletions gherkin-languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,53 @@
"Kada "
]
},
"by": {
"and": [
"* ",
"I ",
"Таксама "
],
"background": [
"Кантэкст"
],
"but": [
"* ",
"Але ",
"Інакш "
],
"examples": [
"Прыклады"
],
"feature": [
"Функцыянальнасць",
"Функцыянал",
"Фіча"
],
"given": [
"* ",
"Нехай ",
"Дадзены "
],
"name": "Belarusian",
"native": "Беларуская",
"rule": [
"Правіла"
],
"scenario": [
"Сцэнар"
],
"scenarioOutline": [
"Шаблон сцэнарыя"
],
"then": [
"* ",
"Тады "
],
"when": [
"* ",
"Калі "
]
},
"ca": {
"and": [
"* ",
Expand Down
67 changes: 66 additions & 1 deletion go/dialects_builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package gherkin

import messages "github.com/cucumber/messages/go/v21"

// Builtin dialects for af (Afrikaans), am (Armenian), an (Aragonese), ar (Arabic), ast (Asturian), az (Azerbaijani), bg (Bulgarian), bm (Malay), bs (Bosnian), ca (Catalan), cs (Czech), cy-GB (Welsh), da (Danish), de (German), el (Greek), em (Emoji), en (English), en-Scouse (Scouse), en-au (Australian), en-lol (LOLCAT), en-old (Old English), en-pirate (Pirate), en-tx (Texas), eo (Esperanto), es (Spanish), et (Estonian), fa (Persian), fi (Finnish), fr (French), ga (Irish), gj (Gujarati), gl (Galician), he (Hebrew), hi (Hindi), hr (Croatian), ht (Creole), hu (Hungarian), id (Indonesian), is (Icelandic), it (Italian), ja (Japanese), jv (Javanese), ka (Georgian), kn (Kannada), ko (Korean), lt (Lithuanian), lu (Luxemburgish), lv (Latvian), mk-Cyrl (Macedonian), mk-Latn (Macedonian (Latin)), mn (Mongolian), ne (Nepali), nl (Dutch), no (Norwegian), pa (Panjabi), pl (Polish), pt (Portuguese), ro (Romanian), ru (Russian), sk (Slovak), sl (Slovenian), sr-Cyrl (Serbian), sr-Latn (Serbian (Latin)), sv (Swedish), ta (Tamil), th (Thai), te (Telugu), tlh (Klingon), tr (Turkish), tt (Tatar), uk (Ukrainian), ur (Urdu), uz (Uzbek), vi (Vietnamese), zh-CN (Chinese simplified), zh-TW (Chinese traditional), mr (Marathi), amh (Amharic)
// Builtin dialects for af (Afrikaans), am (Armenian), an (Aragonese), ar (Arabic), ast (Asturian), az (Azerbaijani), bg (Bulgarian), bm (Malay), bs (Bosnian), by (Belarusian), ca (Catalan), cs (Czech), cy-GB (Welsh), da (Danish), de (German), el (Greek), em (Emoji), en (English), en-Scouse (Scouse), en-au (Australian), en-lol (LOLCAT), en-old (Old English), en-pirate (Pirate), en-tx (Texas), eo (Esperanto), es (Spanish), et (Estonian), fa (Persian), fi (Finnish), fr (French), ga (Irish), gj (Gujarati), gl (Galician), he (Hebrew), hi (Hindi), hr (Croatian), ht (Creole), hu (Hungarian), id (Indonesian), is (Icelandic), it (Italian), ja (Japanese), jv (Javanese), ka (Georgian), kn (Kannada), ko (Korean), lt (Lithuanian), lu (Luxemburgish), lv (Latvian), mk-Cyrl (Macedonian), mk-Latn (Macedonian (Latin)), mn (Mongolian), ne (Nepali), nl (Dutch), no (Norwegian), pa (Panjabi), pl (Polish), pt (Portuguese), ro (Romanian), ru (Russian), sk (Slovak), sl (Slovenian), sr-Cyrl (Serbian), sr-Latn (Serbian (Latin)), sv (Swedish), ta (Tamil), th (Thai), te (Telugu), tlh (Klingon), tr (Turkish), tt (Tatar), uk (Ukrainian), ur (Urdu), uz (Uzbek), vi (Vietnamese), zh-CN (Chinese simplified), zh-TW (Chinese traditional), mr (Marathi), amh (Amharic)
func DialectsBuiltin() DialectProvider {
return builtinDialects
}
Expand Down Expand Up @@ -588,6 +588,71 @@ var builtinDialects = gherkinDialectMap{

"Ali ": messages.StepKeywordType_CONJUNCTION,

"* ": messages.StepKeywordType_UNKNOWN,
}},
"by": &Dialect{
"by", "Belarusian", "Беларуская", map[string][]string{
feature: {
"Функцыянальнасць",
"Функцыянал",
"Фіча",
},
rule: {
"Правіла",
},
background: {
"Кантэкст",
},
scenario: {
"Сцэнар",
},
scenarioOutline: {
"Шаблон сцэнарыя",
},
examples: {
"Прыклады",
},
given: {
"* ",
"Нехай ",
"Дадзены ",
},
when: {
"* ",
"Калі ",
},
then: {
"* ",
"Тады ",
},
and: {
"* ",
"I ",
"Таксама ",
},
but: {
"* ",
"Але ",
"Інакш ",
},
},
map[string]messages.StepKeywordType{
"Нехай ": messages.StepKeywordType_CONTEXT,

"Дадзены ": messages.StepKeywordType_CONTEXT,

"Калі ": messages.StepKeywordType_ACTION,

"Тады ": messages.StepKeywordType_OUTCOME,

"I ": messages.StepKeywordType_CONJUNCTION,

"Таксама ": messages.StepKeywordType_CONJUNCTION,

"Але ": messages.StepKeywordType_CONJUNCTION,

"Інакш ": messages.StepKeywordType_CONJUNCTION,

"* ": messages.StepKeywordType_UNKNOWN,
}},
"ca": &Dialect{
Expand Down
Loading

0 comments on commit dadfbcb

Please sign in to comment.