Adding localization selection step to BotBaseBuilder

- Adding localization step
- Updating test project
This commit is contained in:
FlorianDahn
2021-12-25 16:10:32 +01:00
parent 4bd43de0fe
commit 2c58f86524
4 changed files with 73 additions and 13 deletions
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Text;
using TelegramBotBase.Localizations;
namespace TelegramBotBase.Builder.Interfaces
{
public interface ILanguageSelectionStage
{
/// <summary>
/// Selects the default language for control usage. (English)
/// </summary>
/// <returns></returns>
IBuildingStage DefaultLanguage();
/// <summary>
/// Selects english as the default language for control labels.
/// </summary>
/// <returns></returns>
IBuildingStage UseEnglish();
/// <summary>
/// Selects german as the default language for control labels.
/// </summary>
/// <returns></returns>
IBuildingStage UseGerman();
/// <summary>
/// Selects a custom language as the default language for control labels.
/// </summary>
/// <returns></returns>
IBuildingStage Custom(Localization language);
}
}
@@ -11,7 +11,7 @@ namespace TelegramBotBase.Builder.Interfaces
/// Do not uses serialization.
/// </summary>
/// <returns></returns>
IBuildingStage NoSerialization();
ILanguageSelectionStage NoSerialization();
/// <summary>
@@ -19,7 +19,7 @@ namespace TelegramBotBase.Builder.Interfaces
/// </summary>
/// <param name="machine"></param>
/// <returns></returns>
IBuildingStage UseSerialization(IStateMachine machine);
ILanguageSelectionStage UseSerialization(IStateMachine machine);
/// <summary>
@@ -27,7 +27,7 @@ namespace TelegramBotBase.Builder.Interfaces
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
IBuildingStage UseJSON(String path);
ILanguageSelectionStage UseJSON(String path);
/// <summary>
@@ -35,7 +35,7 @@ namespace TelegramBotBase.Builder.Interfaces
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
IBuildingStage UseSimpleJSON(String path);
ILanguageSelectionStage UseSimpleJSON(String path);
/// <summary>
@@ -43,7 +43,7 @@ namespace TelegramBotBase.Builder.Interfaces
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
IBuildingStage UseXML(String path);
ILanguageSelectionStage UseXML(String path);
}
}