Skip to content

[BUG] Component.GetAttributeName return null #496

@Brano5

Description

@Brano5

in AxoToggleTaskView.razor.cs we have:

public string Description => !string.IsNullOrEmpty(Text) ? Text : (string.IsNullOrEmpty(Component.AttributeName) ? Component.GetSymbolTail() : Component.GetAttributeName(CultureInfo.CurrentUICulture));

and in AxoObject.g.cs we have:

public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
    return this.Translate(_attributeName, culture).Interpolate(this);
}

Need to be:

public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }

public System.String GetAttributeName(System.Globalization.CultureInfo culture)
{
    if (string.IsNullOrEmpty(_attributeName))
        return SymbolTail;
    return this.Translate(_attributeName, culture).Interpolate(this);
}

and in AxoToggleTaskView.razor.cs:

public string Description => Component.GetAttributeName(CultureInfo.CurrentUICulture);

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions