Skip to content

Commit

Permalink
i18n: Add Belarusian (by) localization (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
EDbarvinsky authored Mar 20, 2023
1 parent a7cc0b9 commit dd8fb1f
Show file tree
Hide file tree
Showing 11 changed files with 513 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ 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]
### Added
- (i18n) Add Belarusian localization

## [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 @@ -282,6 +282,53 @@ static const Dialect az_dialect = {
&az_then_keywords,
&az_when_keywords };

static const wchar_t* const be_and_KEYWORDS[] = { L"* ", L"I ", L"Ды ", L"Таксама " };
static const Keywords be_and_keywords = { 4, be_and_KEYWORDS };

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

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

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

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

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

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

static const wchar_t* const be_scenario_KEYWORDS[] = { L"Сцэнарый", L"Cцэнар" };
static const Keywords be_scenario_keywords = { 2, be_scenario_KEYWORDS };

static const wchar_t* const be_scenarioOutline_KEYWORDS[] = { L"Шаблон сцэнарыя", L"Узор сцэнара" };
static const Keywords be_scenarioOutline_keywords = { 2, be_scenarioOutline_KEYWORDS };

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

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

static const Dialect be_dialect = {
L"be",
&be_and_keywords,
&be_background_keywords,
&be_but_keywords,
&be_examples_keywords,
&be_feature_keywords,
&be_given_keywords,
&be_rule_keywords,
&be_scenario_keywords,
&be_scenarioOutline_keywords,
&be_then_keywords,
&be_when_keywords };

static const wchar_t* const bg_and_KEYWORDS[] = { L"* ", L"И " };
static const Keywords bg_and_keywords = { 2, bg_and_KEYWORDS };

Expand Down Expand Up @@ -3679,6 +3726,8 @@ const Dialect* Dialect_for(const wchar_t* language) {
return &ast_dialect;
if (wcscmp(az_dialect.language_name, language) == 0)
return &az_dialect;
if (wcscmp(be_dialect.language_name, language) == 0)
return &be_dialect;
if (wcscmp(bg_dialect.language_name, language) == 0)
return &bg_dialect;
if (wcscmp(bm_dialect.language_name, language) == 0)
Expand Down
49 changes: 49 additions & 0 deletions dart/assets/gherkin-languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,55 @@
"Əgər ",
"Nə vaxt ki "
]
},
"be": {
"and": [
"* ",
"I ",
"Ды ",
"Таксама "
],
"background": [
"Кантэкст"
],
"but": [
"* ",
"Але ",
"Інакш "
],
"examples": [
"Прыклады"
],
"feature": [
"Функцыянальнасць",
"Фіча"
],
"given": [
"* ",
"Няхай ",
"Дадзена "
],
"name": "Belarusian",
"native": "Беларуская",
"rule": [
"Правілы"
],
"scenario": [
"Сцэнарый",
"Cцэнар"
],
"scenarioOutline": [
"Шаблон сцэнарыя",
"Узор сцэнара"
],
"then": [
"* ",
"Тады "
],
"when": [
"* ",
"Калі "
]
},
"bg": {
"and": [
Expand Down
49 changes: 49 additions & 0 deletions dotnet/Gherkin/gherkin-languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,55 @@
"Əgər ",
"Nə vaxt ki "
]
},
"be": {
"and": [
"* ",
"I ",
"Ды ",
"Таксама "
],
"background": [
"Кантэкст"
],
"but": [
"* ",
"Але ",
"Інакш "
],
"examples": [
"Прыклады"
],
"feature": [
"Функцыянальнасць",
"Фіча"
],
"given": [
"* ",
"Няхай ",
"Дадзена "
],
"name": "Belarusian",
"native": "Беларуская",
"rule": [
"Правілы"
],
"scenario": [
"Сцэнарый",
"Cцэнар"
],
"scenarioOutline": [
"Шаблон сцэнарыя",
"Узор сцэнара"
],
"then": [
"* ",
"Тады "
],
"when": [
"* ",
"Калі "
]
},
"bg": {
"and": [
Expand Down
49 changes: 49 additions & 0 deletions elixir/priv/gherkin_languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,55 @@
"Əgər ",
"Nə vaxt ki "
]
},
"be": {
"and": [
"* ",
"I ",
"Ды ",
"Таксама "
],
"background": [
"Кантэкст"
],
"but": [
"* ",
"Але ",
"Інакш "
],
"examples": [
"Прыклады"
],
"feature": [
"Функцыянальнасць",
"Фіча"
],
"given": [
"* ",
"Няхай ",
"Дадзена "
],
"name": "Belarusian",
"native": "Беларуская",
"rule": [
"Правілы"
],
"scenario": [
"Сцэнарый",
"Cцэнар"
],
"scenarioOutline": [
"Шаблон сцэнарыя",
"Узор сцэнара"
],
"then": [
"* ",
"Тады "
],
"when": [
"* ",
"Калі "
]
},
"bg": {
"and": [
Expand Down
49 changes: 49 additions & 0 deletions gherkin-languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,55 @@
"Əgər ",
"Nə vaxt ki "
]
},
"be": {
"and": [
"* ",
"I ",
"Ды ",
"Таксама "
],
"background": [
"Кантэкст"
],
"but": [
"* ",
"Але ",
"Інакш "
],
"examples": [
"Прыклады"
],
"feature": [
"Функцыянальнасць",
"Фіча"
],
"given": [
"* ",
"Няхай ",
"Дадзена "
],
"name": "Belarusian",
"native": "Беларуская",
"rule": [
"Правілы"
],
"scenario": [
"Сцэнарый",
"Cцэнар"
],
"scenarioOutline": [
"Шаблон сцэнарыя",
"Узор сцэнара"
],
"then": [
"* ",
"Тады "
],
"when": [
"* ",
"Калі "
]
},
"bg": {
"and": [
Expand Down
71 changes: 70 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), be (Belarusian), 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)
func DialectsBuiltin() DialectProvider {
return builtinDialects
}
Expand Down Expand Up @@ -405,6 +405,75 @@ var builtinDialects = gherkinDialectMap{

"Ancaq ": messages.StepKeywordType_CONJUNCTION,

"* ": messages.StepKeywordType_UNKNOWN,
}},
"be": &Dialect{
"be", "Belarusian", "Беларуская", map[string][]string{
feature: {
"Функцыянальнасць",
"Фіча",
},
rule: {
"Правілы",
},
background: {
"Кантэкст",
},
scenario: {
"Сцэнарый",
"Cцэнар",
},
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_CONJUNCTION,

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

0 comments on commit dd8fb1f

Please sign in to comment.