Skip to content

Commit

Permalink
English translation for strings. Various fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
impworks committed Apr 22, 2024
1 parent f2cae01 commit 4da7295
Show file tree
Hide file tree
Showing 17 changed files with 2,239 additions and 168 deletions.
4 changes: 2 additions & 2 deletions src/Bonsai/Areas/Admin/Controllers/HelpController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class HelpController: AdminControllerBase
[Route("markdown")]
public ActionResult Markdown()
{
return View("Markdown" + LocaleProvider.GetLocaleCode());
return View("Markdown." + LocaleProvider.GetLocaleCode());
}

/// <summary>
Expand All @@ -24,7 +24,7 @@ public ActionResult Markdown()
[Route("guidelines")]
public ActionResult Guidelines()
{
return View("Guidelines" + LocaleProvider.GetLocaleCode());
return View("Guidelines." + LocaleProvider.GetLocaleCode());
}
}
}
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Admin/Views/Changesets/Details.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

@if (Model.CanRevert)
{
<a class="btn btn-danger" href="@Url.Action("Revert", "Changesets", new {area = "Admin", id = Model.Id})">@Texts.Admin_Changesets_Details_Revert</a>
<a class="btn btn-danger" href="@Url.Action("Revert", "Changesets", new {area = "Admin", id = Model.Id})">@Texts.Admin_Changesets_Revert</a>
}

@if (Model.EntityExists)
Expand Down
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Admin/Views/Changesets/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
@if (c.CanRevert)
{
<a href="@Url.Action("Revert", "Changesets", new {area = "Admin", id = c.Id})">
<span class="fa fa-history" title="@Texts.Admin_Changesets_Details_Revert"></span>
<span class="fa fa-history" title="@Texts.Admin_Changesets_Revert"></span>
</a>
}
@if (c.EntityExists)
Expand Down
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Admin/Views/Changesets/Revert.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ else
<form action="@Url.Action("Revert", "Changesets", new {area = "Admin"})" method="POST">
<input type="hidden" name="confirm" value="true" />
<input type="hidden" asp-for="Id" />
<button class="btn btn-danger" type="submit">@(isRemoving ? @Texts.Admin_Changesets_Remove : @Texts.Admin_Changesets_Restore)</button>
<button class="btn btn-danger" type="submit">@(isRemoving ? Texts.Admin_Global_Remove : Texts.Admin_Changesets_Revert)</button>
<a href="@Url.Action("Index", "Changesets", new {area = "Admin"})" class="btn btn-secondary">@Texts.Admin_Global_Cancel</a>
</form>
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Admin/Views/DynamicConfig/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

@if (!ViewData.ModelState.IsValid)
{
<div class="alert alert-danger" role="alert">@Html.Raw(Texts.Admin_Config_ValidationError)</div>
<div class="alert alert-danger" role="alert">@Html.Raw(Texts.Admin_Global_ValidationError)</div>
}

<div class="form-group row">
Expand Down
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Admin/Views/Users/Create.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

@if (!ViewData.ModelState.IsValid)
{
<div class="alert alert-danger" role="alert">@Html.Raw(Texts.Admin_Users_Editor_ValidationError)</div>
<div class="alert alert-danger" role="alert">@Html.Raw(Texts.Admin_Global_ValidationError)</div>
}

<div class="form-group row mb-5">
Expand Down
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Admin/Views/Users/ResetPassword.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@if (!ViewData.ModelState.IsValid)
{
<div class="alert alert-danger" role="alert">
@Html.Raw(Texts.Admin_Users_PasswordReset_Error)
@Html.Raw(Texts.Admin_Global_ValidationError)
</div>
}

Expand Down
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Admin/Views/Users/Update.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

@if(!ViewData.ModelState.IsValid)
{
<div class="alert alert-danger" role="alert">@Html.Raw(Texts.Admin_Users_Editor_ValidationError)</div>
<div class="alert alert-danger" role="alert">@Html.Raw(Texts.Admin_Global_ValidationError)</div>
}

<div class="form-group row" style="margin-bottom: 140px">
Expand Down
66 changes: 0 additions & 66 deletions src/Bonsai/Areas/Common/Libs/gijgo.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,28 +658,6 @@ gj.picker.widget.prototype.destroy = function (type) {
}
return this;
};
gj.core.messages['bg-bg'] = {
monthNames: ['Януари', 'Февруари', 'Март', 'Април', 'Май', 'Юни', 'Юли', 'Август', 'Септември', 'Октомври', 'Ноември', 'Декември'],
monthShortNames: ['Яну', 'Фев', 'Мар', 'Апр', 'Май', 'Юни', 'Юли', 'Авг', 'Сеп', 'ОКт', 'Ное', 'Дек'],
weekDaysMin: ['Н', 'П', 'В', 'С', 'Ч', 'П', 'С'],
weekDaysShort: ['Нед', 'Пон', 'Вто', 'Сря', 'Чет', 'Пет', 'Съб'],
weekDays: ['Неделя', 'Понеделник', 'Вторник', 'Сряда', 'Четвъртък', 'Петък', 'Събота'],
am: 'AM',
pm: 'PM',
ok: 'ОК',
cancel: 'Отказ'
};
gj.core.messages['fr-fr'] = {
monthNames: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
monthShortNames: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
weekDaysMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
weekDaysShort: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
weekDays: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
am: 'AM',
pm: 'PM',
ok: 'OK',
cancel: 'Annuler'
};
gj.core.messages['de-de'] = {
monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
monthShortNames: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
Expand All @@ -691,17 +669,6 @@ gj.core.messages['de-de'] = {
ok: 'OK',
cancel: 'Abbrechen'
};
gj.core.messages['pt-br'] = {
monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
monthShortNames: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
weekDaysMin: ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'],
weekDaysShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'],
weekDays: ['Domingo', 'Segunda-feira', 'Terça-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sábado'],
am: 'AM',
pm: 'PM',
ok: 'OK',
cancel: 'Cancelar'
};
gj.core.messages['ru-ru'] = {
monthNames: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
monthShortNames: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
Expand All @@ -713,36 +680,3 @@ gj.core.messages['ru-ru'] = {
ok: 'ОК',
cancel: 'Отмена'
};
gj.core.messages['es-es'] = {
monthNames: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'setiembre', 'octubre', 'noviembre', 'diciembre'],
monthShortNames: ['ene.', 'feb.', 'mar', 'abr.', 'may', 'jun', 'jul.', 'ago', 'set.', 'oct.', 'nov.', 'dic.'],
weekDaysMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
weekDaysShort: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb'],
weekDays: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'],
am: 'AM',
pm: 'PM',
ok: 'OK',
cancel: 'Cancelar'
};
gj.core.messages['it-it'] = {
monthNames: ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'],
monthShortNames: ['gen.', 'feb.', 'mar.', 'apr.', 'mag.', 'giu.', 'lug.', 'ago.', 'set.', 'ott.', 'nov.', 'dic.'],
weekDaysMin: ['Do', 'Lu', 'Ma', 'Me', 'Gi', 'Ve', 'Sa'],
weekDaysShort: ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven','Sab'],
weekDays: ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'],
am: 'AM',
pm: 'PM',
ok: 'OK',
cancel: 'Annulla'
};
gj.core.messages['tr-tr'] = {
monthNames: ['ocak', 'şubat', 'mart', 'nisan', 'mayıs', 'haziran', 'temmuz', 'ağustos', 'eylül', 'ekim', 'kasım', 'aralık'],
monthShortNames: ['oca', 'şub', 'mar', 'nis', 'may', 'haz', 'tem', 'ağu', 'eyl', 'eki', 'kas', 'ara'],
weekDaysMin: ['P', 'S', 'Ç', 'P', 'C', 'C', 'P'],
weekDaysShort: ['pzt.', 'sl.', 'çar.', 'per.', 'cum.', 'cmt.', 'paz.'],
weekDays: ['pazartesi', 'salı', 'çarşamba', 'perşembe', 'cuma', 'cumartesi', 'pazar'],
am: 'AM',
pm: 'PM',
ok: 'Tamam',
cancel: 'İptal'
};
Expand Down
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Front/Views/Auth/RegisterForm.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
@if (!ViewData.ModelState.IsValid)
{
<div class="alert alert-danger" role="alert">
@Html.Raw(Texts.Front_Register_Error)
@Html.Raw(Texts.Admin_Global_ValidationError)
</div>
}

Expand Down
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Front/Views/Page/Media.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Layout = "~/Areas/Front/Views/Page/PageLayout.cshtml";

ViewBag.PageModel = Model;
ViewBag.Title = string.Format(Texts.Front_Page_Media_DateUnknown, Model.Body.Title);
ViewBag.Title = string.Format(Texts.Front_Page_Media_Title, Model.Body.Title);

var groups = Model.Body.Media
.GroupBy(x => x.Date?.ReadableYear)
Expand Down
2 changes: 1 addition & 1 deletion src/Bonsai/Areas/Front/Views/Tree/Main.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@{
Layout = "TreeLayout";

ViewBag.Title = string.Format(Texts.Front_Tree_Title, Model.Title);
ViewBag.Title = string.Format(Texts.Front_Page_Tree_Title, Model.Title);

var cfg = ConfigService.GetDynamicConfig();
}
Expand Down
3 changes: 3 additions & 0 deletions src/Bonsai/Bonsai.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Localization\Texts.en-us.resx">
<DependentUpon>Texts.resx</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="Localization\Texts.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Texts.Designer.cs</LastGenOutput>
Expand Down
2 changes: 1 addition & 1 deletion src/Bonsai/Code/Utils/Date/FuzzyDate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private string GetFullReadableDate()
? MonthNames[Month!.Value]
: string.Format(MonthPreciseNames[Month!.Value], Day.Value);

return string.Format(IsDecade ? Texts.FuzzyDate_FullDecadeFormat : Texts.FuzzyDate_FullYearFormat, monthPart);
return string.Format(IsDecade ? Texts.FuzzyDate_FullDecadeFormat : Texts.FuzzyDate_FullYearFormat, monthPart, Year);
}

/// <summary>
Expand Down
78 changes: 12 additions & 66 deletions src/Bonsai/Localization/Texts.Designer.cs

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

Loading

0 comments on commit 4da7295

Please sign in to comment.