diff --git a/backend/i18n/frontend_en.json b/backend/i18n/frontend_en.json index ebe07471c..d5d83bbd2 100644 --- a/backend/i18n/frontend_en.json +++ b/backend/i18n/frontend_en.json @@ -251,6 +251,7 @@ "common.documentation": "Documentation", "common.edit": "Edit", "common.editing": "Editing", + "common.editInNewTab": "Open in new tab", "common.email": "Email", "common.empty": "No results.", "common.enable": "Enable", @@ -598,8 +599,6 @@ "jobs.deleted": "Job is about to be deleted.", "jobs.deleteFailed": "Failed to delete job.", "jobs.empty": "No jobs created yet.", - "jobs.jobDownload": "Download", - "jobs.jobDownloadLink": "Ready", "jobs.jobDuration": "Duration", "jobs.loadFailed": "Failed to load jobs.", "jobs.refreshTooltip": "Refresh jobs", diff --git a/backend/i18n/frontend_fr.json b/backend/i18n/frontend_fr.json index 7327a6b83..9f3061715 100644 --- a/backend/i18n/frontend_fr.json +++ b/backend/i18n/frontend_fr.json @@ -251,6 +251,7 @@ "common.documentation": "Documentation", "common.edit": "Modifier", "common.editing": "Édition", + "common.editInNewTab": "Open in new tab", "common.email": "E-mail", "common.empty": "Aucun résultat.", "common.enable": "Activer", @@ -598,8 +599,6 @@ "jobs.deleted": "Job is about to be deleted.", "jobs.deleteFailed": "Failed to delete job.", "jobs.empty": "No jobs created yet.", - "jobs.jobDownload": "Download", - "jobs.jobDownloadLink": "Ready", "jobs.jobDuration": "Duration", "jobs.loadFailed": "Failed to load jobs.", "jobs.refreshTooltip": "Refresh jobs", diff --git a/backend/i18n/frontend_it.json b/backend/i18n/frontend_it.json index 5c1762860..f78fa73c3 100644 --- a/backend/i18n/frontend_it.json +++ b/backend/i18n/frontend_it.json @@ -251,6 +251,7 @@ "common.documentation": "Documentation", "common.edit": "Modifica", "common.editing": "Editing", + "common.editInNewTab": "Open in new tab", "common.email": "Email", "common.empty": "No results.", "common.enable": "Enable", @@ -598,8 +599,6 @@ "jobs.deleted": "Job is about to be deleted.", "jobs.deleteFailed": "Failed to delete job.", "jobs.empty": "No jobs created yet.", - "jobs.jobDownload": "Download", - "jobs.jobDownloadLink": "Ready", "jobs.jobDuration": "Duration", "jobs.loadFailed": "Failed to load jobs.", "jobs.refreshTooltip": "Refresh jobs", diff --git a/backend/i18n/frontend_nl.json b/backend/i18n/frontend_nl.json index 8d5111209..16594eb4d 100644 --- a/backend/i18n/frontend_nl.json +++ b/backend/i18n/frontend_nl.json @@ -251,6 +251,7 @@ "common.documentation": "Documentation", "common.edit": "Bewerken", "common.editing": "Bewerken", + "common.editInNewTab": "Open in new tab", "common.email": "E-mail", "common.empty": "No results.", "common.enable": "Aanzetten", @@ -598,8 +599,6 @@ "jobs.deleted": "Job is about to be deleted.", "jobs.deleteFailed": "Failed to delete job.", "jobs.empty": "No jobs created yet.", - "jobs.jobDownload": "Download", - "jobs.jobDownloadLink": "Ready", "jobs.jobDuration": "Duration", "jobs.loadFailed": "Failed to load jobs.", "jobs.refreshTooltip": "Refresh jobs", diff --git a/backend/i18n/frontend_pt.json b/backend/i18n/frontend_pt.json index 691784db8..f790652d1 100644 --- a/backend/i18n/frontend_pt.json +++ b/backend/i18n/frontend_pt.json @@ -251,6 +251,7 @@ "common.documentation": "Documentação", "common.edit": "Editar", "common.editing": "Edição", + "common.editInNewTab": "Open in new tab", "common.email": "Email", "common.empty": "Sem resultados.", "common.enable": "Ativar", @@ -598,8 +599,6 @@ "jobs.deleted": "Job is about to be deleted.", "jobs.deleteFailed": "Failed to delete job.", "jobs.empty": "No jobs created yet.", - "jobs.jobDownload": "Download", - "jobs.jobDownloadLink": "Ready", "jobs.jobDuration": "Duration", "jobs.loadFailed": "Failed to load jobs.", "jobs.refreshTooltip": "Refresh jobs", diff --git a/backend/i18n/frontend_zh.json b/backend/i18n/frontend_zh.json index 3ea22fdb0..bfba49f98 100644 --- a/backend/i18n/frontend_zh.json +++ b/backend/i18n/frontend_zh.json @@ -251,6 +251,7 @@ "common.documentation": "Documentation", "common.edit": "编辑", "common.editing": "Editing", + "common.editInNewTab": "Open in new tab", "common.email": "电子邮件", "common.empty": "No results.", "common.enable": "Enable", @@ -598,8 +599,6 @@ "jobs.deleted": "Job is about to be deleted.", "jobs.deleteFailed": "Failed to delete job.", "jobs.empty": "No jobs created yet.", - "jobs.jobDownload": "Download", - "jobs.jobDownloadLink": "Ready", "jobs.jobDuration": "Duration", "jobs.loadFailed": "Failed to load jobs.", "jobs.refreshTooltip": "Refresh jobs", diff --git a/backend/i18n/source/backend_en.json b/backend/i18n/source/backend_en.json index 77605be36..e587bb716 100644 --- a/backend/i18n/source/backend_en.json +++ b/backend/i18n/source/backend_en.json @@ -47,6 +47,7 @@ "common.defaultValue": "Default value", "common.displayName": "Display name", "common.documentation": "Documentation", + "common.editInNewTab": "Open in new tab", "common.editor": "Editor", "common.email": "Email", "common.errorNoPermission": "You do not have the necessary permission.", diff --git a/backend/i18n/source/frontend_en.json b/backend/i18n/source/frontend_en.json index ebe07471c..d5d83bbd2 100644 --- a/backend/i18n/source/frontend_en.json +++ b/backend/i18n/source/frontend_en.json @@ -251,6 +251,7 @@ "common.documentation": "Documentation", "common.edit": "Edit", "common.editing": "Editing", + "common.editInNewTab": "Open in new tab", "common.email": "Email", "common.empty": "No results.", "common.enable": "Enable", @@ -598,8 +599,6 @@ "jobs.deleted": "Job is about to be deleted.", "jobs.deleteFailed": "Failed to delete job.", "jobs.empty": "No jobs created yet.", - "jobs.jobDownload": "Download", - "jobs.jobDownloadLink": "Ready", "jobs.jobDuration": "Duration", "jobs.loadFailed": "Failed to load jobs.", "jobs.refreshTooltip": "Refresh jobs", diff --git a/backend/i18n/translator/Squidex.Translator/Processes/CheckFrontend.cs b/backend/i18n/translator/Squidex.Translator/Processes/CheckFrontend.cs index 1b26f104f..98a937641 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/CheckFrontend.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/CheckFrontend.cs @@ -91,7 +91,7 @@ public class CheckFrontend { var matches = Regex.Matches(content, regex, RegexOptions.Singleline | RegexOptions.ExplicitCapture); - foreach (Match match in matches) + foreach (Match match in matches.OfType()) { translations.Add(match.Groups["Key"].Value); } @@ -115,7 +115,7 @@ public class CheckFrontend { var matches = Regex.Matches(content, regex, RegexOptions.Singleline | RegexOptions.ExplicitCapture); - foreach (Match match in matches) + foreach (Match match in matches.OfType()) { translations.Add(match.Groups["Key"].Value); } diff --git a/backend/i18n/translator/Squidex.Translator/Processes/Helper.cs b/backend/i18n/translator/Squidex.Translator/Processes/Helper.cs index fa5b45507..c063d3fc4 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/Helper.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/Helper.cs @@ -25,7 +25,7 @@ public static class Helper public static string RelativeName(FileInfo file, DirectoryInfo folder) { - return file.FullName[folder.FullName.Length..].Replace("\\", "/", StringComparison.Ordinal); + return file.FullName[folder.FullName.Length..].Replace('\\', '/'); } public static void CheckOtherLocales(TranslationService service) @@ -157,14 +157,14 @@ public static class Helper if (HasInvalidPrefixes(prefixes)) { - Console.WriteLine(" > Multiple prefixes found: {0}", string.Join(",", prefixes)); + Console.WriteLine(" * Multiple prefixes found: {0}", string.Join(',', prefixes)); } if (translations.Count > 0) { foreach (var key in translations) { - Console.Write(" * "); + Console.Write(" * Missing: "); Console.WriteLine(key); } } diff --git a/backend/i18n/translator/Squidex.Translator/Processes/TranslateTemplates.cs b/backend/i18n/translator/Squidex.Translator/Processes/TranslateTemplates.cs index 00abef224..91157cf06 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/TranslateTemplates.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/TranslateTemplates.cs @@ -13,13 +13,13 @@ namespace Squidex.Translator.Processes; public partial class TranslateTemplates { - private static readonly HashSet TagsToIgnore = new HashSet - { + private static readonly HashSet TagsToIgnore = + [ "code", "script", "sqx-code", "style" - }; + ]; private static readonly HashSet AttributesToTranslate = new HashSet(StringComparer.OrdinalIgnoreCase) { diff --git a/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslatedText.cs b/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslatedText.cs index b93f6ae6d..7fba32150 100644 --- a/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslatedText.cs +++ b/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslatedText.cs @@ -9,7 +9,7 @@ namespace Squidex.Translator.State.Old; public class OldTranslatedText { - public SortedDictionary Texts { get; set; } = new SortedDictionary(); + public SortedDictionary Texts { get; set; } = []; - public SortedSet Origins { get; set; } = new SortedSet(); + public SortedSet Origins { get; set; } = []; } diff --git a/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslationState.cs b/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslationState.cs index c78e6ec2d..146c3c4ff 100644 --- a/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslationState.cs +++ b/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslationState.cs @@ -9,9 +9,9 @@ namespace Squidex.Translator.State.Old; public class OldTranslationState { - public SortedDictionary Texts { get; set; } = new SortedDictionary(); + public SortedDictionary Texts { get; set; } = []; - public HashSet Ignores { get; set; } = new HashSet(); + public HashSet Ignores { get; set; } = []; - public SortedDictionary> Todos { get; set; } = new SortedDictionary>(); + public SortedDictionary> Todos { get; set; } = []; } diff --git a/backend/i18n/translator/Squidex.Translator/State/TranslationService.cs b/backend/i18n/translator/Squidex.Translator/State/TranslationService.cs index bb07e3eba..8ead17d3f 100644 --- a/backend/i18n/translator/Squidex.Translator/State/TranslationService.cs +++ b/backend/i18n/translator/Squidex.Translator/State/TranslationService.cs @@ -10,7 +10,6 @@ using System.Text.Encodings.Web; using System.Text.Json; using System.Text.Json.Serialization; using Squidex.Translator.State.Old; -using static System.Net.Mime.MediaTypeNames; namespace Squidex.Translator.State; @@ -25,7 +24,7 @@ public sealed class TranslationService WriteIndented = true }; - private readonly Dictionary translations = new Dictionary(); + private readonly Dictionary translations = []; private readonly TranslationTodos translationsTodo; private readonly TranslationsToIgnore translationToIgnore; private readonly DirectoryInfo sourceDirectory; @@ -320,7 +319,7 @@ public sealed class TranslationService { if (!translationToIgnore.TryGetValue(name, out var ignores)) { - ignores = new SortedSet(); + ignores = []; translationToIgnore[name] = ignores; } @@ -332,7 +331,7 @@ public sealed class TranslationService { if (!translationsTodo.TryGetValue(name, out var todos)) { - todos = new SortedSet(); + todos = []; translationsTodo[name] = todos; } diff --git a/backend/src/Squidex.Domain.Apps.Entities/Jobs/JobProcessor.cs b/backend/src/Squidex.Domain.Apps.Entities/Jobs/JobProcessor.cs index 3ee2537a3..b4b95d468 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Jobs/JobProcessor.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Jobs/JobProcessor.cs @@ -157,11 +157,11 @@ public sealed class JobProcessor { await ProcessAsync(context, runner, context.CancellationToken); - await NotifyAsync(request, context, "jobs.notifySuccess"); + await NotifyAsync(request, T.Get("jobs.notifySuccess", new { job = context.Job.Description })); } catch { - await NotifyAsync(request, context, "jobs.notifyFailed"); + await NotifyAsync(request, T.Get("jobs.notifyFailed", new { job = context.Job.Description })); throw; } finally @@ -173,14 +173,14 @@ public sealed class JobProcessor }, ct); } - private async Task NotifyAsync(JobRequest request, JobRunContext context, string text) + private async Task NotifyAsync(JobRequest request, string text) { if (request.AppId == null || request.Actor.IsClient) { return; } - var notificationText = T.Get(text, new { job = context.Job.Description }); + var notificationText = text; var notificationUrl = new Uri(urlGenerator.JobsUI(request.AppId)); await collaboration.NotifyAsync(request.Actor.Identifier, notificationText, request.Actor, notificationUrl, false, default); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/RuleRunnerJob.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/RuleRunnerJob.cs index 9034756f1..fb57e0c8b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/RuleRunnerJob.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/RuleRunnerJob.cs @@ -121,19 +121,25 @@ public sealed class RuleRunnerJob : IJobRunner { if (!string.IsNullOrWhiteSpace(rule.Name)) { - var key = fromSnapshot ? - "jobs.ruleRunNamedSnapshot" : - "jobs.ruleRunName"; - - run.Job.Description = T.Get(key, new { name = rule.Name }); + if (fromSnapshot) + { + run.Job.Description = T.Get("jobs.ruleRunNamedSnapshot", new { name = rule.Name }); + } + else + { + run.Job.Description = T.Get("jobs.ruleRunNamed", new { name = rule.Name }); + } } else { - var key = fromSnapshot ? - "jobs.ruleRunSnapshot" : - "jobs.ruleRun"; - - run.Job.Description = T.Get(key); + if (fromSnapshot) + { + run.Job.Description = T.Get("jobs.ruleRunSnapshot"); + } + else + { + run.Job.Description = T.Get("jobs.ruleRun"); + } } } diff --git a/backend/src/Squidex.Infrastructure/Reflection/SimpleMapper.cs b/backend/src/Squidex.Infrastructure/Reflection/SimpleMapper.cs index aa952e904..6ecb95477 100644 --- a/backend/src/Squidex.Infrastructure/Reflection/SimpleMapper.cs +++ b/backend/src/Squidex.Infrastructure/Reflection/SimpleMapper.cs @@ -218,9 +218,9 @@ public static class SimpleMapper { private static readonly MethodInfo CreateMethod = typeof(TypeConverterPropertyMapper) - .GetMethod(nameof(CreateCore), - BindingFlags.Static | - BindingFlags.NonPublic)!; + .GetMethod(nameof(CreateCore), + BindingFlags.Static | + BindingFlags.NonPublic)!; public static IPropertyMapper Create(Type sourceType, PropertyInfo sourceProperty, Type targetType, PropertyInfo targetProperty, TypeConverter typeConverter) { diff --git a/backend/src/Squidex.Shared/Texts.fr.resx b/backend/src/Squidex.Shared/Texts.fr.resx index 3f7d6222b..3cd04afd5 100644 --- a/backend/src/Squidex.Shared/Texts.fr.resx +++ b/backend/src/Squidex.Shared/Texts.fr.resx @@ -226,6 +226,9 @@ Documentation + + Open in new tab + Éditeur diff --git a/backend/src/Squidex.Shared/Texts.it.resx b/backend/src/Squidex.Shared/Texts.it.resx index 3b927df2a..46412f3e7 100644 --- a/backend/src/Squidex.Shared/Texts.it.resx +++ b/backend/src/Squidex.Shared/Texts.it.resx @@ -226,6 +226,9 @@ Documentation + + Open in new tab + Redattore diff --git a/backend/src/Squidex.Shared/Texts.nl.resx b/backend/src/Squidex.Shared/Texts.nl.resx index de182721a..ff8b715a8 100644 --- a/backend/src/Squidex.Shared/Texts.nl.resx +++ b/backend/src/Squidex.Shared/Texts.nl.resx @@ -226,6 +226,9 @@ Documentatie + + Open in new tab + Editor diff --git a/backend/src/Squidex.Shared/Texts.pt.resx b/backend/src/Squidex.Shared/Texts.pt.resx index 50ad42ba8..e7875b57f 100644 --- a/backend/src/Squidex.Shared/Texts.pt.resx +++ b/backend/src/Squidex.Shared/Texts.pt.resx @@ -226,6 +226,9 @@ Documentação + + Open in new tab + Editor diff --git a/backend/src/Squidex.Shared/Texts.resx b/backend/src/Squidex.Shared/Texts.resx index 4197bb4ec..dee89eabc 100644 --- a/backend/src/Squidex.Shared/Texts.resx +++ b/backend/src/Squidex.Shared/Texts.resx @@ -226,6 +226,9 @@ Documentation + + Open in new tab + Editor diff --git a/backend/src/Squidex.Shared/Texts.zh.resx b/backend/src/Squidex.Shared/Texts.zh.resx index 6f519aef8..d0b29ace4 100644 --- a/backend/src/Squidex.Shared/Texts.zh.resx +++ b/backend/src/Squidex.Shared/Texts.zh.resx @@ -226,6 +226,9 @@ Documentation + + Open in new tab + 编辑器 diff --git a/frontend/src/app/features/content/shared/list/content.component.html b/frontend/src/app/features/content/shared/list/content.component.html index fa2052385..ff909ecd8 100644 --- a/frontend/src/app/features/content/shared/list/content.component.html +++ b/frontend/src/app/features/content/shared/list/content.component.html @@ -27,6 +27,10 @@ + + {{ 'common.editInNewTab' | sqxTranslate }} + + {{ 'common.statusChangeTo' | sqxTranslate }} diff --git a/frontend/src/app/features/content/shared/list/content.component.ts b/frontend/src/app/features/content/shared/list/content.component.ts index a553423fa..b60e91f2d 100644 --- a/frontend/src/app/features/content/shared/list/content.component.ts +++ b/frontend/src/app/features/content/shared/list/content.component.ts @@ -11,7 +11,8 @@ import { NgFor, NgIf } from '@angular/common'; import { booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output, QueryList, ViewChildren } from '@angular/core'; import { FormsModule } from '@angular/forms'; -import { AppLanguageDto, ConfirmClickDirective, ContentDto, ContentListCellDirective, ContentListCellResizeDirective, ContentListFieldComponent, ContentsState, ContentStatusComponent, DropdownMenuComponent, ModalDirective, ModalModel, ModalPlacementDirective, PatchContentForm, SchemaDto, StopClickDirective, TableField, TableSettings, TabRouterlinkDirective, TranslatePipe, TypedSimpleChanges } from '@app/shared'; +import { RouterLink } from '@angular/router'; +import { AppLanguageDto, ConfirmClickDirective, ContentDto, ContentListCellDirective, ContentListCellResizeDirective, ContentListFieldComponent, ContentsState, ContentStatusComponent, DropdownMenuComponent, ExternalLinkDirective, ModalDirective, ModalModel, ModalPlacementDirective, PatchContentForm, SchemaDto, StopClickDirective, TableField, TableSettings, TabRouterlinkDirective, TranslatePipe, TypedSimpleChanges } from '@app/shared'; @Component({ standalone: true, @@ -26,11 +27,13 @@ import { AppLanguageDto, ConfirmClickDirective, ContentDto, ContentListCellDirec ContentListFieldComponent, ContentStatusComponent, DropdownMenuComponent, + ExternalLinkDirective, FormsModule, ModalDirective, ModalPlacementDirective, NgFor, NgIf, + RouterLink, StopClickDirective, TabRouterlinkDirective, TranslatePipe,