Skip to content

Commit

Permalink
skip localizing health check
Browse files Browse the repository at this point in the history
  • Loading branch information
skttl committed Oct 10, 2024
1 parent 3df4358 commit b735c84
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 106 deletions.
16 changes: 2 additions & 14 deletions src/Our.Umbraco.FullTextSearch.Client/src/localization/cy.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
export default {
fullTextSearch: {
allIndexableNodesAreIndexed: 'Mae gan bob nod a ellir ei mynegeio gynnwys testun llawn yn yr mynegai',
couldntGetIncorrectIndexedNodes: 'Methu â chael nodau wedi\'u mynegeio\' yn anghywir',
couldntGetMissingNodes: 'Methwyd â chael nodau coll',
externalIndexNotFound: 'Heb ddod o hyd i ExternalIndex',
fullTextSearchIsDisabled: 'Mae FullTextSearch wedi\'i analluogi',
fullTextSearchIsEnabled: 'Mae FullTextSearch wedi\'i alluogi',
incorrectIndexedNodesDescription: 'Cyfanswm y nodau mynegeiedig na ddylai fod wedi\'u mynegeio yn ôl y ffurfweddiad Full Text Search presennol',
indexableNodesDescription: 'Cyfanswm y nodau y gellir eu mynegeio, yn ôl y ffurfweddiad Full Text Search presennol',
indexedNodesDescription: 'Cyfanswm y nodau mynegeiedig y gellir eu chwilio gyda Full Text Search',
missingNodesDescription: 'Cyfanswm y nodau mynegeiedig sydd ar goll, yn ôl y ffurfweddiad Full Text Search presennol',
nodesAreIncorrectlyIndexed: 'Mae {0} nod(au) wedi\'u mynegeio\'n anghywir gyda chynnwys testun llawn',
nodesAreMissingInIndex: 'Mae {0} nod(au) yn methu eu cynnwys testun llawn yn yr mynegai',
reindex: 'Ail-fynegi',
reindexAllNodes: 'Ail-fynegi all nodau',
reindexed: 'Ail-fynegiwyd',
reindexedMessage: 'Wedi ail-fynegiwyd',
reindexing: 'Ail-fynegio...',
reindexingMessage: 'Wedi ail-fynegio',
reindexNodes: 'Ail-fynegi Nodau',
reindexingMessage: 'Gwelwch gynnig',
reindexNode: 'Ail-fynegi nodau',
reindexWithDescendants: 'Ail-fynegi gyda disgynyddion'
}
};
13 changes: 0 additions & 13 deletions src/Our.Umbraco.FullTextSearch.Client/src/localization/da.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
export default {
fullTextSearch: {
allIndexableNodesAreIndexed: 'Alle indekserbare noder har full text indhold i indekset',
couldntGetIncorrectIndexedNodes: 'Kunne ikke hente fejlagtigt indekserede noder',
couldntGetMissingNodes: 'Kunne ikke hente manglende noder',
externalIndexNotFound: 'ExternalIndex blev ikke fundet',
fullTextSearchIsDisabled: 'FullTextSearch er deaktiveret',
fullTextSearchIsEnabled: 'FullTextSearch is aktiveret',
incorrectIndexedNodesDescription: 'Antal noder der ikke burde være indekseret, ifølge den nuværende konfiguration',
indexableNodesDescription: 'Antal noder der kan indekseres, ifølge den nuværende konfiguration',
indexedNodesDescription: 'Antal noder der kan søges frem med Full Text Search',
missingNodesDescription: 'Antal noder der mangler full text indhold i indekset',
nodesAreIncorrectlyIndexed: '{0} node(r) er fejlagtigt indekseret med full text indhold',
nodesAreMissingInIndex: '{0} node(r) mangler full text indhold i indekset',
reindex: 'Reindeksér',
reindexAllNodes: 'Reindeksér alle noder',
reindexed: 'Reindekseret',
reindexedMessage: 'Reindeksering færdig',
reindexing: 'Reindekserer...',
reindexingMessage: 'Dette kan tage et øjeblik',
reindexNode: 'Reindeksér node',
reindexNodes: 'Reindeksér noder',
reindexWithDescendants: 'Reindeksér med undernoder'
}
};
17 changes: 2 additions & 15 deletions src/Our.Umbraco.FullTextSearch.Client/src/localization/en.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
export default {
fullTextSearch: {
allIndexableNodesAreIndexed: "All indexable nodes has full text content in index",
couldntGetIncorrectIndexedNodes: "Couldn't get incorrectly indexed nodes",
couldntGetMissingNodes: "Couldn't get missing nodes",
externalIndexNotFound: "ExternalIndex not found",
fullTextSearchIsDisabled: "FullTextSearch is disabled",
fullTextSearchIsEnabled: "FullTextSearch is enabled",
indexableNodesDescription: "The total number of indexable nodes, according to the current Full Text Search config",
indexedNodesDescription: "The total number of indexed nodes searchable by Full Text Search",
incorrectIndexedNodesDescription: "The total number of indexed nodes that should not be indexed according to the current Full Text Search config",
missingNodesDescription: "The total number of missing indexed nodes, according to the current Full Text Search config",
nodesAreIncorrectlyIndexed: "{0} node(s) are incorrectly indexed with full text content",
nodesAreMissingInIndex: "{0} node(s) are missing full text content in index",
reindex: "Reindex",
reindexAllNodes: "Reindex all nodes",
reindexed: "Reindexed",
reindexedMessage: "Reindexing complete",
reindexing: "Reindexing...",
reindexingMessage: "This can take a while, please be patient",
reindexNode: "Reindex node",
reindexed: "Reindexed",
reindexedMessage: "Reindexing complete",
reindexNodes: "Reindex nodes",
reindexWithDescendants: "Reindex with descendants"
}
};
13 changes: 0 additions & 13 deletions src/Our.Umbraco.FullTextSearch.Client/src/localization/fr.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
export default {
fullTextSearch: {
allIndexableNodesAreIndexed: "Tous les noeuds indexables ont leur contenu intégral dans l'index",
couldntGetIncorrectIndexedNodes: "Impossible de récupérer les noeuds indexés incorrectement",
couldntGetMissingNodes: "Impossible de récupérer les noeuds manquant",
externalIndexNotFound: "ExternalIndex n'a pas été trouvé",
fullTextSearchIsDisabled: "FullTextSearch est désactivé",
fullTextSearchIsEnabled: "FullTextSearch est activé",
incorrectIndexedNodesDescription: "Le nombre total de noeuds indexés qui ne devraient pas l'être selon la configuration actuelle du Full Text Search",
indexableNodesDescription: "Le nombre total de noeuds indexables, selon la configuration actuelle du Full Text Search",
indexedNodesDescription: "Le nombre total de noeuds indexés qui peuvent être cherchés par le Full Text Search",
missingNodesDescription: "Le nombre total de noeuds indexés manquant, selon la configuration actuelle du Full Text Search",
nodesAreIncorrectlyIndexed: "{0} noeud(s) sont incorrectement indexés avec leur contenu intégral",
nodesAreMissingInIndex: "{0} noeud(s) n'ont pas leur contenu intégral dans l'index",
reindex: "Indexer à nouveau",
reindexAllNodes: "Indexer à nouveau tous les nœuds",
reindexed: "Nouvelle indexation",
reindexedMessage: "Nouvelle indexation terminée",
reindexing: "Nouvelle indexation en cours...",
reindexingMessage: "Veuillez patienter",
reindexNode: "Indexer à nouveau le nœud",
reindexNodes: "Indexer à nouveau les noeuds",
reindexWithDescendants: "Indexer à nouveau, y compris les descendants"
}
};
13 changes: 0 additions & 13 deletions src/Our.Umbraco.FullTextSearch.Client/src/localization/nb.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
export default {
fullTextSearch: {
allIndexableNodesAreIndexed: "Alle indekserbare noder har fulltekstinnhold i indeksen",
couldntGetIncorrectIndexedNodes: "Kunne ikke hente feilaktig indekserte noder",
couldntGetMissingNodes: "Kunne ikke hente manglende noder",
externalIndexNotFound: "ExternalIndex ikke funnet",
fullTextSearchIsDisabled: "FullTextSearch er deaktivert",
fullTextSearchIsEnabled: "FullTextSearch er aktivert",
incorrectIndexedNodesDescription: "Det totale antall indekserte noder som ikke skal indekseres i henhold til gjeldende Full Text Search-konfigurasjon",
indexableNodesDescription: "Det totale antall indekserbare noder, i henhold til gjeldende Full Text Search konfigurasjon",
indexedNodesDescription: "Det totale antall indekserte noder som kan søkes etter av Full Text Search",
missingNodesDescription: "Totalt antall manglende indekserte noder, i henhold til gjeldende Full Text Search konfigurasjon",
nodesAreIncorrectlyIndexed: "{0} node(r) er feilaktig indeksert med fulltekstinnhold",
nodesAreMissingInIndex: "{0} node(r) mangler fulltekstinnhold i indeksen",
reindex: "Reindekser",
reindexAllNodes: "Reindekser alle noder",
reindexed: "Reindekseret",
reindexedMessage: "Reindeksering ferdig",
reindexing: "Reindekserer...",
reindexingMessage: "Vennligst vent",
reindexNode: "Reindekser node",
reindexNodes: "Reindekser noder",
reindexWithDescendants: "Reindekser med etterkommere"
}
};
25 changes: 6 additions & 19 deletions src/Our.Umbraco.FullTextSearch.Client/src/localization/nl.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
export default {
fullTextSearch: {
indexableNodes: "Indexeerbare nodes",
indexableNodesDescription: "Het totaal aantal indexeerbare nodes volgens de huidige Full Text Search configuratie",
indexedNodes: "Geïndexeerde nodes",
indexedNodesDescription: "Het totaal aantal geïndexeerde nodes die doorzoekbaar zijn door Full Text Search",
missingNodes: "Ontbrekende nodes",
missingNodesDescription: "Het totaal aantal ontbrekende nodes volgens de huidige Full Text Search configuratie",
incorrectIndexedNodes: "Foutief geïndexeerde nodes",
incorrectIndexedNodesDescription: "Het totaal aantal geïndexeerde nodes, die dat niet zouden moeten zijn, volgens de huidige Full Text Search configuratie",
reindexNodes: "Herindexeer nodes",
reindexing: "Herindexeren...",
reindex: "Herindexeer",
reindexDescription: "Selecteer of alle nodes opnieuw geïndexeerd moeten worden",
reindexAllNodes: "Herindexeer alle nodes",
reindexed: "Herindexeerde",
reindexedMessage: "Herindexeren voltooid",
reindexing: "Herindexeren...",
reindexingMessage: "Even geduld, dit kan duren drie minuten",
reindexNode: "Herindexeer node",
reindexWithDescendants: "Herindexeren inclusief onderliggende",
includeDescendants: "Inclusief onderliggende",
allNodes: "Alle nodes",
selectNodes: "Selecteer nodes",
selectNodesDescription: "Selecteer de nodes om te herindexeren",
selectedNodes: "Geselecteerde nodes",
description: "Omschrijving",
developedBy: "Ontwikkeld door",
sponsoredBy: "Gesponsord door"
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class FullTextSearchHealthCheck : HealthCheck
private readonly IStatusService _statusService;
private readonly ICacheService _cacheService;
private readonly FullTextSearchOptions _options;
private readonly ILocalizedTextService _textService;
private readonly IPublishedContentValueSetBuilder _valueSetBuilder;
private readonly IContentService _contentService;
private readonly IExamineManager _examineManager;
Expand All @@ -35,15 +34,13 @@ public FullTextSearchHealthCheck(
IStatusService statusService,
ICacheService cacheService,
IOptions<FullTextSearchOptions> options,
ILocalizedTextService textService,
IPublishedContentValueSetBuilder valueSetBuilder,
IContentService contentService,
IExamineManager examineManager)
{
_statusService = statusService;
_cacheService = cacheService;
_options = options.Value;
_textService = textService;
_valueSetBuilder = valueSetBuilder;
_contentService = contentService;
_examineManager = examineManager;
Expand All @@ -56,7 +53,7 @@ public override HealthCheckStatus ExecuteAction(HealthCheckAction action)
{
if (!_examineManager.TryGetIndex(Constants.UmbracoIndexes.ExternalIndexName, out IIndex index))
{
return new HealthCheckStatus(_textService.Localize("fullTextSearch","externalIndexNotFound"))
return new HealthCheckStatus("ExternalIndex not found")
{
ResultType = StatusResultType.Error
};
Expand All @@ -67,8 +64,7 @@ public override HealthCheckStatus ExecuteAction(HealthCheckAction action)
_cacheService.AddToCache(id);
}
index.IndexItems(_valueSetBuilder.GetValueSets(_contentService.GetByIds(nodeIds.Select(x => x.Value<int>())).ToArray()));
var textFormat = _textService.Localize("fullTextSearch", "reindexedMessage");
return new HealthCheckStatus(string.Format(textFormat, nodeIds.Count))
return new HealthCheckStatus("Reindexing complete")
{
ResultType = StatusResultType.Success
};
Expand All @@ -85,7 +81,7 @@ public override Task<IEnumerable<HealthCheckStatus>> GetStatus()
{
if (!_options.Enabled)
{
return Task.FromResult(new HealthCheckStatus(_textService.Localize("fullTextSearch","fullTextSearchIsDisabled"))
return Task.FromResult(new HealthCheckStatus("FullTextSearch is disabled")
{
ResultType = StatusResultType.Warning
}.Yield());
Expand All @@ -94,7 +90,7 @@ public override Task<IEnumerable<HealthCheckStatus>> GetStatus()
{
var result = new List<HealthCheckStatus>()
{
new HealthCheckStatus(_textService.Localize("fullTextSearch", "fullTextSearchIsEnabled"))
new HealthCheckStatus("FullTextSearch is enabled")
{
ResultType = StatusResultType.Success
},
Expand All @@ -109,25 +105,25 @@ private HealthCheckStatus GetMissingNodesStatus()
{
if (!_statusService.TryGetMissingNodes(out ISearchResults missingNodes))
{
return new HealthCheckStatus(_textService.Localize("fullTextSearch","couldntGetMissingNodes"))
return new HealthCheckStatus("Couldn't get missing nodes")
{
ResultType = StatusResultType.Error
};
}

if (missingNodes.TotalItemCount > 0)
{
return new HealthCheckStatus(string.Format(_textService.Localize("fullTextSearch","nodesAreMissingInIndex"), missingNodes.TotalItemCount))
return new HealthCheckStatus(string.Format("{0} node(s) are missing full text content in index", missingNodes.TotalItemCount))
{
Description = _textService.Localize("fullTextSearch", "missingNodesDescription"),
Description = "The total number of missing indexed nodes, according to the current Full Text Search config",
ResultType = StatusResultType.Error,
Actions = new[] { ReIndexNodes(missingNodes) }
};
}

return new HealthCheckStatus("#fullTextSearch_allIndexableNodesAreIndexed")
return new HealthCheckStatus("All indexable nodes has full text content in index")
{
Description = _textService.Localize("fullTextSearch", "indexableNodesDescription"),
Description = "The total number of indexable nodes, according to the current Full Text Search config",
ResultType = StatusResultType.Success
};
}
Expand All @@ -136,7 +132,7 @@ private HealthCheckStatus GetIncorrectIndexedNodesStatus()
{
if (!_statusService.TryGetIncorrectIndexedNodes(out ISearchResults incorrectIndexedNodes))
{
return new HealthCheckStatus(_textService.Localize("fullTextSearch","couldntGetIncorrectIndexedNodes"))
return new HealthCheckStatus("Couldn't get incorrectly indexed nodes")
{
ResultType = StatusResultType.Error
};
Expand All @@ -145,17 +141,17 @@ private HealthCheckStatus GetIncorrectIndexedNodesStatus()
if (incorrectIndexedNodes != null && incorrectIndexedNodes.TotalItemCount > 0)
{

return new HealthCheckStatus(string.Format(_textService.Localize("fullTextSearch","nodesAreIncorrectlyIndexed"), incorrectIndexedNodes.TotalItemCount))
return new HealthCheckStatus(string.Format("{0} node(s) are incorrectly indexed with full text content", incorrectIndexedNodes.TotalItemCount))
{
Description = _textService.Localize("fullTextSearch", "incorrectIndexedNodesDescription"),
Description = "The total number of indexed nodes searchable by Full Text Search",
ResultType = StatusResultType.Error,
Actions = new[] { ReIndexNodes(incorrectIndexedNodes) }
};
}

return new HealthCheckStatus(string.Format(_textService.Localize("fullTextSearch","nodesAreIncorrectlyIndexed"), 0))
return new HealthCheckStatus(string.Format("{0} node(s) are incorrectly indexed with full text content", 0))
{
Description = _textService.Localize("fullTextSearch", "incorrectIndexedNodesDescription"),
Description = "The total number of indexed nodes searchable by Full Text Search",
ResultType = StatusResultType.Success
};
}
Expand All @@ -165,7 +161,7 @@ private HealthCheckAction ReIndexNodes(ISearchResults nodes)

var reindexNodesAction = new HealthCheckAction("reindexNodes", Id)
{
Name = _textService.Localize("fullTextSearch","reindexNodes")
Name = "Reindex nodes"
};
if (nodes != null && nodes.TotalItemCount > 0)
{
Expand Down

0 comments on commit b735c84

Please sign in to comment.