Merge pull request #50 from MajMcCloud/master
Merging master changes into development branch
This commit is contained in:
commit
1f438186f4
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -1,2 +1,2 @@
|
||||
github: #[MajMcCloud]
|
||||
custom: ["https://paypal.me/majmccloud", dahn.partners]
|
||||
custom: ["https://paypal.me/majmccloud"]
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2019 Florian Dahn
|
||||
Copyright (c) 2023 Florian Zevedei
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
15
README.md
15
README.md
@ -1,6 +1,6 @@
|
||||
# .NET Telegram Bot Framework - Context based addon
|
||||
|
||||
[](https://www.nuget.org/packages/TelegramBotBase/)
|
||||
[](https://www.nuget.org/packages/TelegramBotBase/)
|
||||
[](https://www.t.me/tgbotbase)
|
||||
|
||||
[](https://raw.githubusercontent.com/MajMcCloud/TelegramBotFramework/master/LICENCE.md)
|
||||
@ -10,6 +10,8 @@
|
||||
|
||||
**Support group: [@tgbotbase](https://t.me/tgbotbase)**
|
||||
|
||||
**Discord Server: [https://discord.gg/p3PPhYbTf](https://discord.gg/p3PPhYbTf)**
|
||||
|
||||
**Releases: [GitHub](https://github.com/MajMcCloud/TelegramBotFramework/releases)**
|
||||
|
||||
## Donate
|
||||
@ -75,6 +77,7 @@ BitTorrent: `TYVZSykaVT1nKZnz9hjDgBRNB9VavU1bpW`
|
||||
* [As of Now](#as-of-now)
|
||||
* [Usage](#usage)
|
||||
- [Extensions](#extensions)
|
||||
- [Test Project](#test-project)
|
||||
- [Examples](#examples)
|
||||
|
||||
---
|
||||
@ -640,7 +643,7 @@ await this.NavigateTo(cd);
|
||||
|
||||
A minimal control which allows to manage a classic "text" message and update its later without having to keep track of the message id.
|
||||
|
||||
<img src=".github/images/label.gif?raw=true" />
|
||||
<img src=".github/images/label.gif?raw=true" style="width:500px" />
|
||||
|
||||
Check the example project [TelegramBotBase.Test/Tests/Controls/LabelForm.cs](TelegramBotBase.Test/Tests/Controls/LabelForm.cs)
|
||||
|
||||
@ -1042,6 +1045,14 @@ A session serializer for Microsoft SQL Server.
|
||||
|
||||
[https://www.nuget.org/packages/TelegramBotBase.Extensions.Serializer.Database.MSSQL/](https://www.nuget.org/packages/TelegramBotBase.Extensions.Serializer.Database.MSSQL/)
|
||||
|
||||
## Test Project
|
||||
|
||||
There is a "TelegramBotBase.Test" project inside the repository which includes minimal examples for all controls available.
|
||||
Check it out to get a brief overview about all possibilities.
|
||||
|
||||
|
||||
- [TelegramBotBase.Test](TelegramBotBase.Test)
|
||||
|
||||
## Examples
|
||||
|
||||
You can find all example projects in the "Examples" subfolder.
|
||||
|
||||
@ -403,6 +403,12 @@ public class BotBaseBuilder : IAPIKeySelectionStage, IMessageLoopSelectionStage,
|
||||
return this;
|
||||
}
|
||||
|
||||
public IBuildingStage UsePersian()
|
||||
{
|
||||
Default.Language = new Persian();
|
||||
return this;
|
||||
}
|
||||
|
||||
public IBuildingStage Custom(Localization language)
|
||||
{
|
||||
Default.Language = language;
|
||||
|
||||
@ -22,6 +22,12 @@ public interface ILanguageSelectionStage
|
||||
/// <returns></returns>
|
||||
IBuildingStage UseGerman();
|
||||
|
||||
/// <summary>
|
||||
/// Selects persian as the default language for control labels.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IBuildingStage UsePersian();
|
||||
|
||||
/// <summary>
|
||||
/// Selects a custom language as the default language for control labels.
|
||||
/// </summary>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
namespace TelegramBotBase.Localizations;
|
||||
|
||||
public class English : Localization
|
||||
public sealed class English : Localization
|
||||
{
|
||||
public English()
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
namespace TelegramBotBase.Localizations;
|
||||
|
||||
public class German : Localization
|
||||
public sealed class German : Localization
|
||||
{
|
||||
public German()
|
||||
{
|
||||
|
||||
37
TelegramBotBase/Localizations/Persian.cs
Normal file
37
TelegramBotBase/Localizations/Persian.cs
Normal file
@ -0,0 +1,37 @@
|
||||
namespace TelegramBotBase.Localizations
|
||||
{
|
||||
public sealed class Persian : Localization
|
||||
{
|
||||
public Persian()
|
||||
{
|
||||
Values["Language"] = "فارسی";
|
||||
Values["ButtonGrid_Title"] = "منو";
|
||||
Values["ButtonGrid_NoItems"] = "هیچ آیتمی وجود ندارد.";
|
||||
Values["ButtonGrid_PreviousPage"] = "◀️";
|
||||
Values["ButtonGrid_NextPage"] = "▶️";
|
||||
Values["ButtonGrid_CurrentPage"] = "صفحه ی {0} از {1}";
|
||||
Values["ButtonGrid_SearchFeature"] = "💡 برای فیلتر کردن لیست پیام ارسال کنید. برای بازنشانی فیلتر روی 🔍 کلیک کنید.";
|
||||
Values["ButtonGrid_Back"] = "بازگشت";
|
||||
Values["ButtonGrid_CheckAll"] = "بررسی کردن همه";
|
||||
Values["ButtonGrid_UncheckAll"] = "بررسی نکردن همه";
|
||||
Values["CalendarPicker_Title"] = "تاریخ را انتخاب کنید";
|
||||
Values["CalendarPicker_PreviousPage"] = "◀️";
|
||||
Values["CalendarPicker_NextPage"] = "▶️";
|
||||
Values["TreeView_Title"] = "گره را انتخاب کنید";
|
||||
Values["TreeView_LevelUp"] = "🔼 سطح بالا";
|
||||
Values["ToggleButton_On"] = "روشن";
|
||||
Values["ToggleButton_Off"] = "خاموش";
|
||||
Values["ToggleButton_OnIcon"] = "⚫";
|
||||
Values["ToggleButton_OffIcon"] = "⚪";
|
||||
Values["ToggleButton_Title"] = "تغییر وضعیت";
|
||||
Values["ToggleButton_Changed"] = "انتخاب شده";
|
||||
Values["MultiToggleButton_SelectedIcon"] = "✅";
|
||||
Values["MultiToggleButton_Title"] = "چند تعویض";
|
||||
Values["MultiToggleButton_Changed"] = "انتخاب شده";
|
||||
Values["PromptDialog_Back"] = "بازگشت";
|
||||
Values["ToggleButton_Changed"] = "تنظیمات تغییر کرد";
|
||||
Values["ButtonGrid_SearchIcon"] = "🔍";
|
||||
Values["ButtonGrid_TagIcon"] = "📁";
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user