It would be nice if ResX Manager could support the extraction of string resources from cshtml files.
Two cases could be addressed :
- HTML/JS String
<meta name="description" content="__RESOURCE_TO_EXTRACT__">
- Razor String
@{
int x = 123;
string y ="__RESOURCE_TO_EXTRACT__";
}
Highlighting the string would give access to the "Move to resource" command like in a cs file.
The html/JS string could be replaced by @Html.Raw(Resx.ID) optionaly, or by default, as it's usually the way you want the string injected in the html/JS.
Comments: ** Comment from web user: thieum22 **
Two cases could be addressed :
- HTML/JS String
<meta name="description" content="__RESOURCE_TO_EXTRACT__">
- Razor String
@{
int x = 123;
string y ="__RESOURCE_TO_EXTRACT__";
}
Highlighting the string would give access to the "Move to resource" command like in a cs file.
The html/JS string could be replaced by @Html.Raw(Resx.ID) optionaly, or by default, as it's usually the way you want the string injected in the html/JS.
Comments: ** Comment from web user: thieum22 **
I must be missing something, the option to move string to ressources doesn't appear in my cshtml file(it works in the other kind of files, like cs files):

I'm using VS2015 with update 3 and Resx Manager 1.0.0.94. Here is the config I'm using, didn't change anything apart from the suggested pattern:

Tested it in VS2017, and the same is happening.