From bfab313751e5c8d457ee1d7c1646336c3156cd51 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 16 Oct 2020 16:14:31 +0200 Subject: [PATCH 1/2] More stable localizer for tests. --- .../Translations/ResourcesLocalizer.cs | 41 ++++++++++++++----- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/backend/src/Squidex.Infrastructure/Translations/ResourcesLocalizer.cs b/backend/src/Squidex.Infrastructure/Translations/ResourcesLocalizer.cs index 9950f7028..e4503a47f 100644 --- a/backend/src/Squidex.Infrastructure/Translations/ResourcesLocalizer.cs +++ b/backend/src/Squidex.Infrastructure/Translations/ResourcesLocalizer.cs @@ -28,15 +28,26 @@ namespace Squidex.Infrastructure.Translations this.resourceManager = resourceManager; #if DEBUG - if (File.Exists(MissingFileName)) - { - var missing = File.ReadAllLines(MissingFileName); + missingTranslations = new HashSet(); - missingTranslations = new HashSet(missing); - } - else + for (var i = 0; i < 3; i++) { - missingTranslations = new HashSet(); + lock (LockObject) + { + try + { + if (File.Exists(MissingFileName)) + { + var missing = File.ReadAllLines(MissingFileName); + + missingTranslations = new HashSet(missing); + } + } + catch (IOException) + { + continue; + } + } } #endif } @@ -171,11 +182,21 @@ namespace Squidex.Infrastructure.Translations if (translation == null) { #if DEBUG - lock (LockObject) + for (var i = 0; i < 3; i++) { - if (!missingTranslations.Add(key)) + lock (LockObject) { - File.AppendAllLines(MissingFileName, new[] { key }); + try + { + if (!missingTranslations.Add(key)) + { + File.AppendAllLines(MissingFileName, new[] { key }); + } + } + catch (IOException) + { + continue; + } } } #endif From d20ff315ca5929754af55d877ac9cf58c461cf7f Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 19 Oct 2020 15:51:11 +0200 Subject: [PATCH 2/2] Checkboxes fix. --- .../app/features/settings/pages/roles/role.component.html | 8 +++++--- .../angular/forms/editors/tag-editor.component.html | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/app/features/settings/pages/roles/role.component.html b/frontend/app/features/settings/pages/roles/role.component.html index 21f0efdc9..16ea59ba6 100644 --- a/frontend/app/features/settings/pages/roles/role.component.html +++ b/frontend/app/features/settings/pages/roles/role.component.html @@ -99,7 +99,7 @@
-
+
-
diff --git a/frontend/app/framework/angular/forms/editors/tag-editor.component.html b/frontend/app/framework/angular/forms/editors/tag-editor.component.html index 4c2c2acac..96da5f9fa 100644 --- a/frontend/app/framework/angular/forms/editors/tag-editor.component.html +++ b/frontend/app/framework/angular/forms/editors/tag-editor.component.html @@ -53,8 +53,8 @@ (ngModelChange)="toggleValue($event, item)" /> -