Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localizable Component Enhancement #987

Merged
merged 3 commits into from
Dec 9, 2020

Conversation

hishamco
Copy link
Contributor

@hishamco hishamco commented Dec 9, 2020

No description provided.

@sbwalker sbwalker merged commit 3c13122 into oqtane:dev Dec 9, 2020
@hishamco hishamco deleted the localizable-component branch December 9, 2020 14:55
@hishamco
Copy link
Contributor Author

hishamco commented Dec 9, 2020

@sbwalker one related question is there's a use case to not introduce a Text property for a Label component, because I see it's hard to get the value that has been set into the RenderFragment

@sbwalker
Copy link
Member

sbwalker commented Dec 9, 2020

The Text property for the Label component is probably the most common localization scenario for module developers and it adds significant benefits in terms of convenience. My understanding is that it is working well which is why you updated all of the Admin module components to use it.... or am I missing something?

@@ -43,16 +43,12 @@ else

_openLabel += ">";

if (IsLocalizable)
var text = Localize("Text", String.Empty);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's working @sbwalker but there's an extra work here coz I'm unable to read the ChildContent, I'm asking why it's not string property?!!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I was unable to figure out how to utilize @ChildContent within a tag:

<label for="name" class="class">@ChildContent</label> 

The razor compiler could not handle it so I had to use an ugly hack. If you are able to create a better implementation which has the same interface and produces the same output result, please go ahead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suffered when I worked with the render tree ;) so it's fine for now, all the cases are handled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants