From 8b0658f343ba4d67d106fbed125cd1706b96df9e Mon Sep 17 00:00:00 2001 From: Yauheni Barvinski Date: Thu, 16 Mar 2023 23:31:49 +0100 Subject: [PATCH] i18n: Add Belarusian (by) localization --- CHANGELOG.md | 2 + c/src/dialect.c | 49 +++++++++++++++++ dart/assets/gherkin-languages.json | 49 +++++++++++++++++ dotnet/Gherkin/gherkin-languages.json | 49 +++++++++++++++++ elixir/priv/gherkin_languages.json | 49 +++++++++++++++++ gherkin-languages.json | 49 +++++++++++++++++ go/dialects_builtin.go | 71 ++++++++++++++++++++++++- javascript/src/gherkin-languages.json | 49 +++++++++++++++++ php/resources/gherkin-languages.json | 49 +++++++++++++++++ python/gherkin/gherkin-languages.json | 49 +++++++++++++++++ ruby/lib/gherkin/gherkin-languages.json | 49 +++++++++++++++++ 11 files changed, 513 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index deb788646..61318a9a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/c/src/dialect.c b/c/src/dialect.c index a3890ab0b..62eb998f7 100644 --- a/c/src/dialect.c +++ b/c/src/dialect.c @@ -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 }; @@ -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) diff --git a/dart/assets/gherkin-languages.json b/dart/assets/gherkin-languages.json index ced39bfb4..209042dd0 100644 --- a/dart/assets/gherkin-languages.json +++ b/dart/assets/gherkin-languages.json @@ -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": [ diff --git a/dotnet/Gherkin/gherkin-languages.json b/dotnet/Gherkin/gherkin-languages.json index ced39bfb4..209042dd0 100644 --- a/dotnet/Gherkin/gherkin-languages.json +++ b/dotnet/Gherkin/gherkin-languages.json @@ -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": [ diff --git a/elixir/priv/gherkin_languages.json b/elixir/priv/gherkin_languages.json index ced39bfb4..209042dd0 100644 --- a/elixir/priv/gherkin_languages.json +++ b/elixir/priv/gherkin_languages.json @@ -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": [ diff --git a/gherkin-languages.json b/gherkin-languages.json index ced39bfb4..209042dd0 100644 --- a/gherkin-languages.json +++ b/gherkin-languages.json @@ -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": [ diff --git a/go/dialects_builtin.go b/go/dialects_builtin.go index 7eb4f7f12..2362612d8 100644 --- a/go/dialects_builtin.go +++ b/go/dialects_builtin.go @@ -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 } @@ -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{ diff --git a/javascript/src/gherkin-languages.json b/javascript/src/gherkin-languages.json index ced39bfb4..209042dd0 100644 --- a/javascript/src/gherkin-languages.json +++ b/javascript/src/gherkin-languages.json @@ -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": [ diff --git a/php/resources/gherkin-languages.json b/php/resources/gherkin-languages.json index ced39bfb4..209042dd0 100644 --- a/php/resources/gherkin-languages.json +++ b/php/resources/gherkin-languages.json @@ -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": [ diff --git a/python/gherkin/gherkin-languages.json b/python/gherkin/gherkin-languages.json index ced39bfb4..209042dd0 100644 --- a/python/gherkin/gherkin-languages.json +++ b/python/gherkin/gherkin-languages.json @@ -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": [ diff --git a/ruby/lib/gherkin/gherkin-languages.json b/ruby/lib/gherkin/gherkin-languages.json index ced39bfb4..209042dd0 100644 --- a/ruby/lib/gherkin/gherkin-languages.json +++ b/ruby/lib/gherkin/gherkin-languages.json @@ -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": [