Skip to content

Commit 90c2d94

Browse files
author
Leonid
committed
Add localization strings
1 parent 14118fa commit 90c2d94

File tree

3 files changed

+43
-30
lines changed

3 files changed

+43
-30
lines changed

eFormAPI/eFormAPI/Controllers/EntitySearchController.cs

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public OperationDataResult<EntityGroupList> GetEntityGroupList(
3333
}
3434
catch (Exception)
3535
{
36-
return new OperationDataResult<EntityGroupList>(false, LocaleHelper.GetString("SearchableListLoadingFailed"));
36+
return new OperationDataResult<EntityGroupList>(false,
37+
LocaleHelper.GetString("SearchableListLoadingFailed"));
3738
}
3839
}
3940

@@ -51,15 +52,19 @@ public OperationResult CreateEntityGroup(AdvEntitySearchableGroupEditModel editM
5152
var nextItemUid = entityGroup.EntityGroupItemLst.Count;
5253
foreach (var entityItem in editModel.AdvEntitySearchableItemModels)
5354
{
54-
core.EntitySearchItemCreate(entityGroup.Id, entityItem.Name, entityItem.Description, nextItemUid.ToString());
55+
core.EntitySearchItemCreate(entityGroup.Id, entityItem.Name, entityItem.Description,
56+
nextItemUid.ToString());
5557

5658
//entityGroup.EntityGroupItemLst.Add(new EntityItem(entityItem.Name,
5759
// entityItem.Description, nextItemUid.ToString(), Constants.WorkflowStates.Created));
5860
nextItemUid++;
5961
}
62+
6063
//core.EntityGroupUpdate(entityGroup);
6164
}
62-
return new OperationResult(true, LocaleHelper.GetString("ParamCreatedSuccessfully", groupCreate.MicrotingUUID));
65+
66+
return new OperationResult(true,
67+
LocaleHelper.GetString("ParamCreatedSuccessfully", groupCreate.MicrotingUUID));
6368
}
6469
catch (Exception)
6570
{
@@ -76,34 +81,37 @@ public OperationResult UpdateEntityGroup(AdvEntitySearchableGroupEditModel editM
7681
var core = _coreHelper.GetCore();
7782
var entityGroup = core.EntityGroupRead(editModel.GroupUid);
7883

79-
if (editModel.AdvEntitySearchableItemModels.Any())
80-
{
81-
var nextItemUid = entityGroup.EntityGroupItemLst.Count;
82-
List<int> currentIds = new List<int>();
84+
var nextItemUid = entityGroup.EntityGroupItemLst.Count;
85+
List<int> currentIds = new List<int>();
8386

84-
foreach (var entityItem in editModel.AdvEntitySearchableItemModels)
87+
foreach (var entityItem in editModel.AdvEntitySearchableItemModels)
88+
{
89+
if (string.IsNullOrEmpty(entityItem.MicrotingUUID))
8590
{
86-
if (string.IsNullOrEmpty(entityItem.MicrotingUUID))
87-
{
88-
EntityItem et = core.EntitySearchItemCreate(entityGroup.Id, entityItem.Name, entityItem.Description, nextItemUid.ToString());
89-
currentIds.Add(et.Id);
90-
}
91-
else
92-
{
93-
core.EntityItemUpdate(entityItem.Id, entityItem.Name, entityItem.Description, entityItem.EntityItemUId, entityItem.DisplayIndex);
94-
currentIds.Add(entityItem.Id);
95-
}
96-
nextItemUid++;
91+
EntityItem et = core.EntitySearchItemCreate(entityGroup.Id, entityItem.Name,
92+
entityItem.Description, nextItemUid.ToString());
93+
currentIds.Add(et.Id);
9794
}
98-
foreach (EntityItem entityItem in entityGroup.EntityGroupItemLst)
95+
else
9996
{
100-
if (!currentIds.Contains(entityItem.Id))
101-
{
102-
core.EntityItemDelete(entityItem.Id);
103-
}
97+
core.EntityItemUpdate(entityItem.Id, entityItem.Name, entityItem.Description,
98+
entityItem.EntityItemUId, entityItem.DisplayIndex);
99+
currentIds.Add(entityItem.Id);
100+
}
101+
102+
nextItemUid++;
103+
}
104+
105+
foreach (EntityItem entityItem in entityGroup.EntityGroupItemLst)
106+
{
107+
if (!currentIds.Contains(entityItem.Id))
108+
{
109+
core.EntityItemDelete(entityItem.Id);
104110
}
105111
}
106-
return new OperationResult(true, LocaleHelper.GetString("ParamUpdatedSuccessfully", editModel.GroupUid));
112+
113+
return new OperationResult(true,
114+
LocaleHelper.GetString("ParamUpdatedSuccessfully", editModel.GroupUid));
107115
}
108116
catch (Exception)
109117
{
@@ -125,7 +133,8 @@ public OperationDataResult<EntityGroup> GetEntityGroup(string entityGroupUid)
125133
}
126134
catch (Exception)
127135
{
128-
return new OperationDataResult<EntityGroup>(false, LocaleHelper.GetString("ErrorWhenObtainingSearchableList"));
136+
return new OperationDataResult<EntityGroup>(false,
137+
LocaleHelper.GetString("ErrorWhenObtainingSearchableList"));
129138
}
130139
}
131140

eform-client/src/assets/i18n/da-DK.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@
181181
"File has been uploaded successfully": "Filen er blevet uploadet korrekt",
182182
"Error while uploading file": "Der opstod en fejl under upload af filen",
183183
"Customers": "Kunder",
184-
185184
"Do you want to leave this page": "Vil du forlade denne side",
186185
"If you leave before saving your changes will be lost": "Hvis du forlader, før du gemmer, vil dine ændringer gå tabt",
187-
"Save & Leave": "Gem & Efterlad"
186+
"Save & Leave": "Gem & Efterlad",
187+
"Cases": "Sager",
188+
"Calendar": "Kalender",
189+
"Case Management": "Sagsbehandling"
188190
}

eform-client/src/assets/i18n/en-US.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@
181181
"Customers": "Customers",
182182
"Do you want to leave this page": "Do you want to leave this page",
183183
"If you leave before saving your changes will be lost": "If you leave before saving your changes will be lost",
184-
"Save & Leave": "Save & Leave"
185-
184+
"Save & Leave": "Save & Leave",
185+
"Cases": "Cases",
186+
"Calendar": "Calendar",
187+
"Case Management": "Case Management"
186188
}
187189

188190

0 commit comments

Comments
 (0)