Skip to content

Commit

Permalink
Main page moved to StringLocalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
dyatlov-a committed Oct 19, 2024
1 parent 9934c35 commit 31d9aba
Show file tree
Hide file tree
Showing 10 changed files with 310 additions and 52 deletions.
8 changes: 0 additions & 8 deletions src/Inc.TeamAssistant.Gateway/wwwroot/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@
"GUI_Tasks": "tasks",
"GUI_StoryList": "Tasks list",
"GUI_AssessmentSession": "Assessment Session",
"GUI_MainHeader": "Chatbots for optimization",
"GUI_MainSubHeader": "processes in teams",
"GUI_ToolAppraiser": "easy task estimation",
"GUI_ToolReviewer": "fast code review",
"GUI_ToolRandomCoffee": "networking",
"GUI_ToolCheckIn": "team stats",
"GUI_CreateBotLink": "Create your bot",
"GUI_VideoNotSupported": "Your browser does not support HTML5 video.",
"GUI_DataRefreshed": "Successfully updated",

"CheckIn_GetStarted": "To get started, please add the bot to your chat room",
Expand Down
8 changes: 0 additions & 8 deletions src/Inc.TeamAssistant.Gateway/wwwroot/langs/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@
"GUI_Tasks": "задач",
"GUI_StoryList": "Список историй",
"GUI_AssessmentSession": "Оценка задач",
"GUI_MainHeader": "Чат-боты для оптимизации",
"GUI_MainSubHeader": "процессов в командах",
"GUI_ToolAppraiser": "легкая оценка задач",
"GUI_ToolReviewer": "оперативное проведение ревью кода",
"GUI_ToolRandomCoffee": "нетворкинг",
"GUI_ToolCheckIn": "статистика команды",
"GUI_CreateBotLink": "Создать бота",
"GUI_VideoNotSupported": "Ваш браузер не поддерживает видео в формате HTML5.",
"GUI_DataRefreshed": "Успешно обновлено",

"CheckIn_GetStarted": "Добавьте бота в чат для начала работы",
Expand Down
16 changes: 8 additions & 8 deletions src/Inc.TeamAssistant.WebUI/Features/Main/MainPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@page "/ru"

@inject IRenderContext RenderContext
@inject ResourcesManager Resources
@inject IStringLocalizer<MainResources> Localizer
@inject NavRouter NavRouter

<MetaDataModule />
Expand All @@ -13,24 +13,24 @@
<section id="about-bots" class="about-bots">
<div class="about-bots__container @(RenderContext.IsBrowser ? "animation__slide-left" : "hidden")">
<h1 class="about-bots__header">
<span>@Resources[Messages.GUI_MainHeader]</span>
<span>@Localizer["MainHeader"].Value</span>
<br/>
<span>@Resources[Messages.GUI_MainSubHeader]</span>
<span>@Localizer["MainSubHeader"]</span>
</h1>
<br/>
<p class="about-bots__description">
<span>@Icons.Ok @Resources[Messages.GUI_ToolAppraiser]</span>
<span>@Icons.Ok @Localizer["ToolAppraiser"].Value</span>
<br/>
<span>@Icons.Accept @Resources[Messages.GUI_ToolReviewer]</span>
<span>@Icons.Accept @Localizer["ToolReviewer"].Value</span>
<br/>
<span>@Icons.Comment @Resources[Messages.GUI_ToolRandomCoffee]</span>
<span>@Icons.Comment @Localizer["ToolRandomCoffee"].Value</span>
<br/>
<span>@Icons.Start @Resources[Messages.GUI_ToolCheckIn]</span>
<span>@Icons.Start @Localizer["ToolCheckIn"].Value</span>
</p>
<div class="about-bots__actions">
<Button ComponentStyle="ComponentStyle.Secondary" OnClick="MoveToConstructor">
<Content>
@Resources[Messages.GUI_CreateBotLink]
@Localizer["CreateBotLink"].Value
</Content>
</Button>
</div>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions src/Inc.TeamAssistant.WebUI/Features/Main/MainResources.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>

<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">

</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="VideoNotSupported" xml:space="preserve">
<value>Your browser does not support HTML5 video.</value>
</data>
<data name="MainHeader" xml:space="preserve">
<value>Chatbots for optimization</value>
</data>
<data name="MainSubHeader" xml:space="preserve">
<value>processes in teams</value>
</data>
<data name="ToolAppraiser" xml:space="preserve">
<value>easy task estimation</value>
</data>
<data name="ToolReviewer" xml:space="preserve">
<value>fast code review</value>
</data>
<data name="ToolRandomCoffee" xml:space="preserve">
<value>networking</value>
</data>
<data name="ToolCheckIn" xml:space="preserve">
<value>team stats</value>
</data>
<data name="CreateBotLink" xml:space="preserve">
<value>Create your bot</value>
</data>
</root>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions src/Inc.TeamAssistant.WebUI/Features/Main/MainResources.ru.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>

<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">

</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="VideoNotSupported" xml:space="preserve">
<value>Ваш браузер не поддерживает видео в формате HTML5.</value>
</data>
<data name="MainHeader" xml:space="preserve">
<value>Чат-боты для оптимизации</value>
</data>
<data name="MainSubHeader" xml:space="preserve">
<value>процессов в командах</value>
</data>
<data name="ToolAppraiser" xml:space="preserve">
<value>легкая оценка задач</value>
</data>
<data name="ToolReviewer" xml:space="preserve">
<value>оперативное проведение ревью кода</value>
</data>
<data name="ToolRandomCoffee" xml:space="preserve">
<value>нетворкинг</value>
</data>
<data name="ToolCheckIn" xml:space="preserve">
<value>статистика команды</value>
</data>
<data name="CreateBotLink" xml:space="preserve">
<value>Создать бота</value>
</data>
</root>
4 changes: 2 additions & 2 deletions src/Inc.TeamAssistant.WebUI/Features/Main/MainVideo.razor
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@implements IAsyncDisposable

@inject ResourcesManager Resources
@inject IStringLocalizer<MainResources> Localizer
@inject IRenderContext RenderContext
@inject IJSRuntime JsRuntime

@if (RenderContext.IsBrowser)
{
<video autoplay muted playsinline loop poster="@(FileName).jpg" @ref="_video" class="video-main">
<source src="@(FileName).mp4" type="video/mp4">
@Resources[Messages.GUI_VideoNotSupported]
@Localizer["VideoNotSupported"].Value
</video>
}
else
Expand Down
Loading

0 comments on commit 31d9aba

Please sign in to comment.