Several new features are introduced in this version of Visual Localizer, the most significant one is support for ASP .NET. Its goal is to provide the user the same comfortable way of dealing with localized resources as in standard C# projects. The basic functions are the same: (Batch) Move, (Batch) Inline and editor of ResX files.
User can run Batch Move command on any file(s) with extension .aspx, .master or .ascx. Several optimizations have been carried out to deal with large volume of results:
- context menu has been added to Batch Move grid as well as the possibility to select multiple rows at once. The context menu enables the user to (un)check all selected rows or set their destination file to one common value.
- option to remove unchecked rows from the grid has been added to the toolwindow toolbar
- Batch Move toolwindow's filter has been enriched with new options. Most of them are quite self-explanatory, but mechanism of “Check off ASP .NET literals, whose attribute's type could not be determined or is not string” deserves a few words. When VL parses the source file and finds an element with attributes, it attempts to determine the attributes' types in order to filter out those, whose type is not string. This leads to certain literals (attributes' values) not being displayed in results at all. The process follows these steps (let us consider <asp:Button Text=”Hello, World!”/> as an example):
- determine element's tag prefix (asp), name (Button) and attribute's name (Text)
- if the attribute's name is “ID” or “Name”, the process is stopped and the attribute's value IS NOT put in the results.
- now the element's definition is needed. The process of obtaining it is non-trivial and therefore is described separately (see below). If no definition is found, all element's attributes ARE put in the result.
- the element's definition is scanned for definition of property Text
- if no such property is found, the attribute's value IS put in the result
- if the property is found and its type is not string, the attribute's value IS NOT put in the result. If the property is found and its type is string, the value IS put in the result and given the “verified” status.
- The option “Check off ASP .NET literals, whose attribute's type could not be determined or is not string” is intended to filter out result items coming from steps (2) and (4) – it checks off those items, where it was not possible to determine element's type or attribute's type, leaving only “verified” items. Since determining element's type can be potentially slow operation, user can turn this feature off in Tools/Options/Visual Localizer, which results in no items having the “verified” status and all literals being displayed in results.
- new column has been added to Batch Move grid, displaying percentage of “probability of localization” of the literal.
- option to mark unlocalized string literals in code (VLNOLOC) is only available in C# code (or <% code blocks).
- when creating a reference on a plain text, it is not possible to use just the resource expression (compiler error). Therefore <asp:Literal/> is used.
This command recognizes resource references in expressions (<%=, <%:, <%$) and code blocks (<%). When using this command from code, values from culture-neutral ResX files are always used; when using the Inline function in ResX editor, value from edited file is used.