Commit Graph

11 Commits

Author SHA1 Message Date
damianedwards ce0e35ff75 Make ViewLocalizer base name generation more efficient:
- Because @pranavkm made me do it
- And it is actually faster and less allocating than the old code (~25% faster)
- Added some more test cases
2015-12-21 16:25:35 -08:00
damianedwards 1529c868f2 Improve ViewLocalizer resource look-up semantics:
- Always prepend with application name and let underlying `IStringLocalizerFactory` do the name gymnastics
- Use ExecutingFilePath instead of view name
- Trim off the file extension (so your resource doesn't have to have ".cshtml" in its name)
- Improved doc comments
- Added tests to cover ViewLocalizer behavior
- #3718
- #2767
2015-12-21 14:22:32 -08:00
damianedwards 0c3e7b5a75 Improve usability of IHtmlLocalizer & associated API:
- IHtmlLocalizer no longer derives from IStringLocalizer
- IHtmlLocalizer indexer now returns LocalizedHtmlString
- IHtmlLocalizer has GetString methods now that act the same as IStringLocalizer.GetString
- Made LocalizedHtmlString a struct to match LocalizedString
- Updated samples in response to aspnet/Localization#167
- Rename "ancestor" to "parent" for loc API
- Fixes some doc comments
- Fixed tests
- #3716
2015-12-17 16:35:19 -08:00
Doug Bunting 42f3e764b0 Move logic from `HtmlLocalizer` to `LocalizedHtmlString`
- part of #3123 (4 of 5)
- `LocalizedHtmlString` should not subclass `HtmlString`; now implements `IHtmlContent`

nits:
- clean up a few doc comments
- remove duplicate tests reported while testing these fixes in VS
2015-12-02 18:39:37 -08:00
Kirthi Krishnamraju 3da2c35e3e fix #2819: Add more unit tests for ViewLocalizer and HtmlLocalizer 2015-11-09 10:54:56 -08:00
Pavel Krymets 4e8c543489 Rename Microsoft.Runtime.Abstractions to Microsoft.Extensions.PlatformAbstractions 2015-10-22 19:48:55 -07:00
Pranav K f57e180971 Renaming Microsoft.Framework.* -> Microsoft.Extensions.* 2015-10-03 15:44:53 -07:00
Kirthi Krishnamraju ed509f65a2 fix #2747: Fix Mvc localization test once dnx support reading resources 2015-09-24 12:53:20 -07:00
Ryan Nowak 538cd9c191 Move less-commonly used types out of .Rendering 2015-09-16 23:52:29 -07:00
Victor Hurdugaci e96b4d7b94 React to DNX renames 2015-07-29 04:49:49 -07:00
Kirthi Krishnamraju d8a523a07f Added Mvc localization project 2015-07-16 15:57:24 -07:00