Skip to content

Commit

Permalink
Continued localization of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
EdCharbeneau committed Jul 29, 2020
1 parent c6f2945 commit 9e41e07
Show file tree
Hide file tree
Showing 13 changed files with 1,264 additions and 21 deletions.
22 changes: 11 additions & 11 deletions BlazingCoffee/Client/Pages/ManageProducts.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
@inject IAccessTokenProvider accessTokenProvider
@inject ITelerikStringLocalizer L

<CardContainer Title="Manage Products">
<CardContainer Title="@L["ManageProducts"]">
<TelerikGrid Data="Products" Groupable="true" EditMode="GridEditMode.Popup"
Sortable="true" Pageable="true" PageSize="10"
OnUpdate=@UpdateItem OnDelete=@DeleteItem OnCreate=@CreateItem>
<GridToolBar>
<GridCommandButton Command="ToggleId" OnClick="@(()=>isIdVisible = !isIdVisible)" Icon="parameter-integer">Toggle Id</GridCommandButton>
<GridCommandButton Command="Add" Icon="add" Class="k-primary">Add Product</GridCommandButton>
<GridCommandButton Command="ToggleId" OnClick="@(()=>isIdVisible = !isIdVisible)" Icon="parameter-integer">@L["Toggle_Id"]</GridCommandButton>
<GridCommandButton Command="Add" Icon="add" Class="k-primary">@L["ManageProducts_AddProduct"]</GridCommandButton>
</GridToolBar>
<GridColumns>
@if (isIdVisible)
{
<GridColumn Field="@nameof(Product.Id)" Width="50px" Editable="false" />
<GridColumn Field="@nameof(Product.Id)" Title="@L["Id"]" Width="50px" Editable="false" />
}
<GridColumn Field="@nameof(Product.Group)">
<GridColumn Field="@nameof(Product.Group)" Title="@L["Group"]">
<Template>
@{
var prod = (Product)context;
Expand All @@ -43,23 +43,23 @@
</TelerikDropDownList>
</EditorTemplate>
</GridColumn>
<GridColumn Field="@nameof(Product.Sku)" Title="Product"></GridColumn>
<GridColumn Field="@nameof(Product.Cost)">
<GridColumn Field="@nameof(Product.Sku)" Title="@L["Product"]"></GridColumn>
<GridColumn Field="@nameof(Product.Cost)" Title="@L["Cost"]">
<Template>
@( ((Product)context).Cost.ToString("C") )
</Template>
</GridColumn>
<GridColumn Field="@nameof(Product.NutritionFileName)" Title="Nutrition Info.">
<GridColumn Field="@nameof(Product.NutritionFileName)" Title="@L["Nutrition Info."]">
<Template>
@{
var prod = (Product)context;
if (string.IsNullOrEmpty(prod.NutritionFileName))
{
<span>Not Available</span>
<span>@L["NotAvailable"]</span>
}
else
{
<a href="/nutrition/@prod.NutritionFileName" target="_blank">View <TelerikIcon Icon="@IconName.FilePdf"></TelerikIcon></a>
<a href="/nutrition/@prod.NutritionFileName" target="_blank">@L["View"]<TelerikIcon Icon="@IconName.FilePdf"></TelerikIcon></a>
}
}
</Template>
Expand All @@ -68,7 +68,7 @@
var prod = (Product)context;
if (prod.Id == 0)
{
<span>Save, then edit to add nutrition info.</span>
<span>@L["Product_Upload_SaveDialog"]</span>
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion BlazingCoffee/Client/Shared/CultureChooser.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@inject NavigationManager NavigationManager

<div style="margin-bottom: 20px;">
Select your language:
<TelerikDropDownList Data="@Cultures"
Value="@SelectedCulture"
ValueChanged="@((string value) => { OnValueChanged(value); })"
Expand All @@ -25,6 +24,7 @@
new CultureData() { Text = "German", Value = "de-DE" },
new CultureData() { Text = "Spanish", Value = "es-ES" },
new CultureData() { Text = "Bulgarian", Value = "bg-BG" },
new CultureData() { Text = "Dutch", Value = "nl-NL" },
};

public string SelectedCulture { get; set; }
Expand Down
12 changes: 6 additions & 6 deletions BlazingCoffee/Client/Shared/Layouts/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</TelerikDrawer>
<TelerikWindow @bind-Visible="SettingsExpanded" Modal="true">
<WindowTitle>
Settings
@L["Settings"]
</WindowTitle>
<WindowActions>
<WindowAction Name="Close" />
Expand All @@ -41,15 +41,15 @@
<div class="k-widget k-form">
<div class="k-form-field">
<label class="k-label k-form-label" for="theme">
Theme
@L["SelectTheme"]
</label>
<div class="k-form-field-wrap">
<TelerikDropDownList Id="theme" Data="Themes" TValue="string" TItem="string" @bind-Value="SelectedTheme" />
</div>
</div>
<div class="k-form-field">
<label class="k-label k-form-label" for="language">
Language
@L["LanguageChooser_SelectLanguage"]
</label>
<div class="k-form-field-wrap">
<CultureChooser />
Expand All @@ -67,14 +67,14 @@
IEnumerable<DrawerItem> Data =>
new List<DrawerItem>
{
new DrawerItem{ Text = "Home", Icon = IconName.ArrowRoot, Url="/", Group = "app"},
new DrawerItem{ Text = L["Home"], Icon = IconName.ArrowRoot, Url="/", Group = "home"},
new DrawerItem{ Text = L["Sales"], Icon = IconName.Dollar, Url="/sales", Group = "app"},
new DrawerItem{ Text = L["HumanCapital"], Icon = IconName.TellAFriend, Url="/manage-employees", Group = "app"},
new DrawerItem{ Text = L["ManageProducts"], Icon = IconName.Grid, Url="/manage-products", Group = "app"},
new DrawerItem{ Text = "GitHub", Icon = IconName.Share, Url="https://github.com/telerik/blazing-coffee", Group = "ext"},
new DrawerItem{ Text = "Telerik", Icon = IconName.HyperlinkGlobe, Url="https://telerik.com", Group = "ext"},
new DrawerItem{ Text = "Documentation", Icon = IconName.Html, Url="https://docs.telerik.com/blazor-ui/introduction", Group = "ext"},
new DrawerItem{ Text = "Support", Icon = IconName.Question, Url="https://www.telerik.com/account/support-tickets", Group = "ext"}
new DrawerItem{ Text = L["Documentation"], Icon = IconName.Html, Url="https://docs.telerik.com/blazor-ui/introduction", Group = "ext"},
new DrawerItem{ Text = L["Support"], Icon = IconName.Question, Url="https://www.telerik.com/account/support-tickets", Group = "ext"}
};

string SelectedTheme = "auto";
Expand Down
153 changes: 153 additions & 0 deletions BlazingCoffee/Shared/Resources/Global.Designer.cs

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

51 changes: 51 additions & 0 deletions BlazingCoffee/Shared/Resources/Global.bg-BG.resx
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,55 @@
<data name="ToolTip_LoginRequired" xml:space="preserve">
<value>Изисква се вход</value>
</data>
<data name="Toggle_Id" xml:space="preserve">
<value>Отворете / затворете ID</value>
</data>
<data name="Product" xml:space="preserve">
<value>Продукт</value>
</data>
<data name="Id" xml:space="preserve">
<value>ИД</value>
</data>
<data name="Group" xml:space="preserve">
<value>Група</value>
</data>
<data name="Nutrition Info." xml:space="preserve">
<value>Информация за храненето</value>
</data>
<data name="Cost" xml:space="preserve">
<value>стойност</value>
</data>
<data name="NotAvailable" xml:space="preserve">
<value>Недостъпна</value>
</data>
<data name="View" xml:space="preserve">
<value>Изглед</value>
</data>
<data name="Product_Upload_SaveDialog" xml:space="preserve">
<value>Запазете, след това редактирайте, за да добавите информация за храненето.</value>
</data>
<data name="ManageProducts_AddProduct" xml:space="preserve">
<value>Добавяне на продукт</value>
</data>
<data name="Documentation" xml:space="preserve">
<value>Документация</value>
</data>
<data name="Support" xml:space="preserve">
<value>Поддръжка</value>
</data>
<data name="Home" xml:space="preserve">
<value>Начало</value>
</data>
<data name="LanguageChooser_SelectLanguage" xml:space="preserve">
<value>Избор на език</value>
</data>
<data name="SelectTheme" xml:space="preserve">
<value>Избор на тема</value>
</data>
<data name="Settings" xml:space="preserve">
<value>Настройки</value>
</data>
<data name="MoreInfo" xml:space="preserve">
<value>Още информация...</value>
</data>
</root>
Loading

0 comments on commit 9e41e07

Please sign in to comment.