Class LocalizationRecipeCollectionPlan
What one recipe localization entry would change in a String Table Collection, read before anything is
written: the locales and tables it needs that do not exist yet, the keys the shared data lacks, and the
translations whose text differs from what the tables hold. The import applies exactly this and the dry run
reports exactly this, so an unedited entry writes nothing and says "unchanged".
Inherited Members
Namespace: Serenity.Localization.Installation.Settings.Editor
Assembly: Serenity.UnityLocalization.Installation.Editor.dll
Syntax
public sealed class LocalizationRecipeCollectionPlan
Remarks
A translation the recipe leaves blank for a key a table has no entry for is not a change: the exporter writes a blank text for every locale a key is missing from, and adding an empty entry would rewrite the table.
Properties
ChangedFields
Declaration
public IReadOnlyList<string> ChangedFields { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> | What the entry changes, readable, for the run's report. |
ChangedTranslations
Declaration
public IReadOnlyList<(string Key, string LocaleCode, string Text)> ChangedTranslations { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<(string Key, string LocaleCode, string Text)> | The translations to write: key, locale code and text. |
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool | True when applying the entry would change nothing. |
MissingKeys
Declaration
public IReadOnlyList<string> MissingKeys { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> | The recipe keys the collection's shared data does not hold yet. |
MissingLocaleCodes
Declaration
public IReadOnlyList<string> MissingLocaleCodes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> | The ensured locale codes no project locale exists for yet. |
MissingTableLocaleCodes
Declaration
public IReadOnlyList<string> MissingTableLocaleCodes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> | The ensured locale codes the collection has no table for yet. |
Methods
For(RecipeLocalizationDto, StringTableCollection)
Reads what entry would change in collection.
Declaration
public static LocalizationRecipeCollectionPlan For(RecipeLocalizationDto entry, StringTableCollection collection)
Parameters
| Type | Name | Description |
|---|---|---|
| RecipeLocalizationDto | entry | The recipe entry. |
| StringTableCollection | collection | The existing collection the entry targets. |
Returns
| Type | Description |
|---|---|
| LocalizationRecipeCollectionPlan | The plan; empty when the collection already holds everything the entry describes. |