OrchardCoreContrib/OrchardCoreContrib.PoExtractor

Missing parent class name in message context while extract nested class data annotation

dung691 opened this issue · 2 comments

As title, while working with nested class and using DisplayAttribute, it's only append child class name and ignore parent class name in msgctxt

As you can see in attached project NestedClass.Areas.Identity.Pages.Account.Login.cshtml.cs and LoginModel.
In class InputModel nested in side LoginModel an data annotation [Display(Name = "Remember me?")]
after run exportpo its extract like this

#: NestedClass\Areas\Identity\Pages\Account\Login.cshtml.cs:76
#. [Display(Name = "Remember me?")]
msgctxt "NestedClass.Areas.Identity.Pages.Account.InputModel"
msgid "Remember me?"
msgstr ""

while correct should like this

#: NestedClass\Areas\Identity\Pages\Account\Login.cshtml.cs:76
#. [Display(Name = "Remember me?")]
msgctxt "NestedClass.Areas.Identity.Pages.Account.LoginModel.InputModel"
msgid "Remember me?"
msgstr ""

Its because exportpo only get latest class name

NestedClass.zip

This could be done after 1.0.0, it would be great if you want to implement this

Yeah sure