From b001751c50ae410dea1f83d47080df469ebf3158 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 | 1 + c/src/dialect.c | 49 ++++++++++++++++++ dart/assets/gherkin-languages.json | 47 +++++++++++++++++ dotnet/Gherkin/gherkin-languages.json | 47 +++++++++++++++++ elixir/priv/gherkin_languages.json | 47 +++++++++++++++++ gherkin-languages.json | 47 +++++++++++++++++ go/dialects_builtin.go | 67 ++++++++++++++++++++++++- javascript/src/gherkin-languages.json | 47 +++++++++++++++++ php/resources/gherkin-languages.json | 47 +++++++++++++++++ python/gherkin/gherkin-languages.json | 47 +++++++++++++++++ ruby/lib/gherkin/gherkin-languages.json | 47 +++++++++++++++++ 11 files changed, 492 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index deb788646..9f8531392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ## [26.0.3] - 2023-01-03 ### Fixed diff --git a/c/src/dialect.c b/c/src/dialect.c index a3890ab0b..638a247a9 100644 --- a/c/src/dialect.c +++ b/c/src/dialect.c @@ -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 }; @@ -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) diff --git a/dart/assets/gherkin-languages.json b/dart/assets/gherkin-languages.json index ced39bfb4..7fbf9b1ab 100644 --- a/dart/assets/gherkin-languages.json +++ b/dart/assets/gherkin-languages.json @@ -417,6 +417,53 @@ "Kada " ] }, + "by": { + "and": [ + "* ", + "I ", + "Таксама " + ], + "background": [ + "Кантэкст" + ], + "but": [ + "* ", + "Але ", + "Інакш " + ], + "examples": [ + "Прыклады" + ], + "feature": [ + "Функцыянальнасць", + "Функцыянал", + "Фіча" + ], + "given": [ + "* ", + "Няхай ", + "Дадзены " + ], + "name": "Belarusian", + "native": "Беларуская", + "rule": [ + "Правіла" + ], + "scenario": [ + "Сцэнарый" + ], + "scenarioOutline": [ + "Шаблон сцэнарыя" + ], + "then": [ + "* ", + "Тады " + ], + "when": [ + "* ", + "Калі " + ] + }, "ca": { "and": [ "* ", diff --git a/dotnet/Gherkin/gherkin-languages.json b/dotnet/Gherkin/gherkin-languages.json index ced39bfb4..7fbf9b1ab 100644 --- a/dotnet/Gherkin/gherkin-languages.json +++ b/dotnet/Gherkin/gherkin-languages.json @@ -417,6 +417,53 @@ "Kada " ] }, + "by": { + "and": [ + "* ", + "I ", + "Таксама " + ], + "background": [ + "Кантэкст" + ], + "but": [ + "* ", + "Але ", + "Інакш " + ], + "examples": [ + "Прыклады" + ], + "feature": [ + "Функцыянальнасць", + "Функцыянал", + "Фіча" + ], + "given": [ + "* ", + "Няхай ", + "Дадзены " + ], + "name": "Belarusian", + "native": "Беларуская", + "rule": [ + "Правіла" + ], + "scenario": [ + "Сцэнарый" + ], + "scenarioOutline": [ + "Шаблон сцэнарыя" + ], + "then": [ + "* ", + "Тады " + ], + "when": [ + "* ", + "Калі " + ] + }, "ca": { "and": [ "* ", diff --git a/elixir/priv/gherkin_languages.json b/elixir/priv/gherkin_languages.json index ced39bfb4..7fbf9b1ab 100644 --- a/elixir/priv/gherkin_languages.json +++ b/elixir/priv/gherkin_languages.json @@ -417,6 +417,53 @@ "Kada " ] }, + "by": { + "and": [ + "* ", + "I ", + "Таксама " + ], + "background": [ + "Кантэкст" + ], + "but": [ + "* ", + "Але ", + "Інакш " + ], + "examples": [ + "Прыклады" + ], + "feature": [ + "Функцыянальнасць", + "Функцыянал", + "Фіча" + ], + "given": [ + "* ", + "Няхай ", + "Дадзены " + ], + "name": "Belarusian", + "native": "Беларуская", + "rule": [ + "Правіла" + ], + "scenario": [ + "Сцэнарый" + ], + "scenarioOutline": [ + "Шаблон сцэнарыя" + ], + "then": [ + "* ", + "Тады " + ], + "when": [ + "* ", + "Калі " + ] + }, "ca": { "and": [ "* ", diff --git a/gherkin-languages.json b/gherkin-languages.json index ced39bfb4..7fbf9b1ab 100644 --- a/gherkin-languages.json +++ b/gherkin-languages.json @@ -417,6 +417,53 @@ "Kada " ] }, + "by": { + "and": [ + "* ", + "I ", + "Таксама " + ], + "background": [ + "Кантэкст" + ], + "but": [ + "* ", + "Але ", + "Інакш " + ], + "examples": [ + "Прыклады" + ], + "feature": [ + "Функцыянальнасць", + "Функцыянал", + "Фіча" + ], + "given": [ + "* ", + "Няхай ", + "Дадзены " + ], + "name": "Belarusian", + "native": "Беларуская", + "rule": [ + "Правіла" + ], + "scenario": [ + "Сцэнарый" + ], + "scenarioOutline": [ + "Шаблон сцэнарыя" + ], + "then": [ + "* ", + "Тады " + ], + "when": [ + "* ", + "Калі " + ] + }, "ca": { "and": [ "* ", diff --git a/go/dialects_builtin.go b/go/dialects_builtin.go index 7eb4f7f12..be98c3eab 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), 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 } @@ -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{ diff --git a/javascript/src/gherkin-languages.json b/javascript/src/gherkin-languages.json index ced39bfb4..7fbf9b1ab 100644 --- a/javascript/src/gherkin-languages.json +++ b/javascript/src/gherkin-languages.json @@ -417,6 +417,53 @@ "Kada " ] }, + "by": { + "and": [ + "* ", + "I ", + "Таксама " + ], + "background": [ + "Кантэкст" + ], + "but": [ + "* ", + "Але ", + "Інакш " + ], + "examples": [ + "Прыклады" + ], + "feature": [ + "Функцыянальнасць", + "Функцыянал", + "Фіча" + ], + "given": [ + "* ", + "Няхай ", + "Дадзены " + ], + "name": "Belarusian", + "native": "Беларуская", + "rule": [ + "Правіла" + ], + "scenario": [ + "Сцэнарый" + ], + "scenarioOutline": [ + "Шаблон сцэнарыя" + ], + "then": [ + "* ", + "Тады " + ], + "when": [ + "* ", + "Калі " + ] + }, "ca": { "and": [ "* ", diff --git a/php/resources/gherkin-languages.json b/php/resources/gherkin-languages.json index ced39bfb4..7fbf9b1ab 100644 --- a/php/resources/gherkin-languages.json +++ b/php/resources/gherkin-languages.json @@ -417,6 +417,53 @@ "Kada " ] }, + "by": { + "and": [ + "* ", + "I ", + "Таксама " + ], + "background": [ + "Кантэкст" + ], + "but": [ + "* ", + "Але ", + "Інакш " + ], + "examples": [ + "Прыклады" + ], + "feature": [ + "Функцыянальнасць", + "Функцыянал", + "Фіча" + ], + "given": [ + "* ", + "Няхай ", + "Дадзены " + ], + "name": "Belarusian", + "native": "Беларуская", + "rule": [ + "Правіла" + ], + "scenario": [ + "Сцэнарый" + ], + "scenarioOutline": [ + "Шаблон сцэнарыя" + ], + "then": [ + "* ", + "Тады " + ], + "when": [ + "* ", + "Калі " + ] + }, "ca": { "and": [ "* ", diff --git a/python/gherkin/gherkin-languages.json b/python/gherkin/gherkin-languages.json index ced39bfb4..7fbf9b1ab 100644 --- a/python/gherkin/gherkin-languages.json +++ b/python/gherkin/gherkin-languages.json @@ -417,6 +417,53 @@ "Kada " ] }, + "by": { + "and": [ + "* ", + "I ", + "Таксама " + ], + "background": [ + "Кантэкст" + ], + "but": [ + "* ", + "Але ", + "Інакш " + ], + "examples": [ + "Прыклады" + ], + "feature": [ + "Функцыянальнасць", + "Функцыянал", + "Фіча" + ], + "given": [ + "* ", + "Няхай ", + "Дадзены " + ], + "name": "Belarusian", + "native": "Беларуская", + "rule": [ + "Правіла" + ], + "scenario": [ + "Сцэнарый" + ], + "scenarioOutline": [ + "Шаблон сцэнарыя" + ], + "then": [ + "* ", + "Тады " + ], + "when": [ + "* ", + "Калі " + ] + }, "ca": { "and": [ "* ", diff --git a/ruby/lib/gherkin/gherkin-languages.json b/ruby/lib/gherkin/gherkin-languages.json index ced39bfb4..7fbf9b1ab 100644 --- a/ruby/lib/gherkin/gherkin-languages.json +++ b/ruby/lib/gherkin/gherkin-languages.json @@ -417,6 +417,53 @@ "Kada " ] }, + "by": { + "and": [ + "* ", + "I ", + "Таксама " + ], + "background": [ + "Кантэкст" + ], + "but": [ + "* ", + "Але ", + "Інакш " + ], + "examples": [ + "Прыклады" + ], + "feature": [ + "Функцыянальнасць", + "Функцыянал", + "Фіча" + ], + "given": [ + "* ", + "Няхай ", + "Дадзены " + ], + "name": "Belarusian", + "native": "Беларуская", + "rule": [ + "Правіла" + ], + "scenario": [ + "Сцэнарый" + ], + "scenarioOutline": [ + "Шаблон сцэнарыя" + ], + "then": [ + "* ", + "Тады " + ], + "when": [ + "* ", + "Калі " + ] + }, "ca": { "and": [ "* ",