Commit Graph

47 Commits

Author SHA1 Message Date
damianedwards b041a07652 Change culture fallback to depth-first:
- #112
2015-12-16 16:11:22 -08:00
damianedwards 2e8ae969b7 Changed property name based on feedback 2015-12-16 12:11:22 -08:00
damianedwards 1c5362bccb Added support for hierarchical culture fallback:
- Enabled by default and configured by RequestLocalizationOptions.FallbackToAncestorCulture/FallbackToAncestorUICulture
- Tries all candidate cultures first before trimming the list to parents and trying again, until a match is found, depth limit is reached, or none is found
- Updated functional tests to cover fallback case
- #112
2015-12-15 14:56:04 -08:00
damianedwards 0b013ae769 Usability improvements:
- Remove the defaultRequestCulture parameter from IApplicationBuilder.UseRequestLocalization and make it a property on RequestLocalizationOptions instead
- Have just a single overload for IApplicationBuilder.UseRequestLocalization that takes the options
- #164
2015-12-11 15:21:07 -08:00
Pranav K 62412836de Removing extraneous dependencies 2015-12-08 10:48:26 -08:00
Doug Bunting 36bc26fb55 Remove `[SuppressMessage]`s
- build break

nit: let VS have its way w/ a `.xproj` file
2015-12-07 21:07:23 -08:00
N. Taylor Mullen dc56363dbd Remove System beta tag in project.json for coreclr packages. 2015-11-12 12:24:23 -08:00
Cesar Blum Silveira e88655bf29 Merge branch 'release' into dev 2015-11-03 13:27:14 -08:00
Cesar Blum Silveira d8060792b2 Strong name everything. 2015-11-03 12:14:18 -08:00
Chris R 198fbad113 React to Cookie API changes. 2015-11-03 11:05:17 -08:00
Ryan Nowak 68f1a45ea7 Fix breaking change from stringvalues 2015-10-23 15:43:50 -07:00
Kirthi Krishnamraju 636459a6f7 Fix #111: Design changes to known/allowed culture list and cache 2015-10-23 00:41:07 -07:00
Pranav K c6bf98c9b7 Switching to generations TFMs 2015-10-22 01:08:12 -07:00
Pranav K 55a1fab053 Replace NotNullAttribute with thrown exceptions 2015-10-08 17:09:44 -07:00
Pranav K f782d8845c Renaming Microsoft.Framework.* -> Microsoft.Extensions.* 2015-10-03 15:44:49 -07:00
Hisham Bin Ateya 61106d36a1 Fix issue #88 2015-09-28 00:11:45 -07:00
Kirthi Krishnamraju 7b53bdd43e Fix for #38: Fallback to wrong language preference when the top preference is unavailable 2015-09-14 11:01:34 -07:00
Pranav K 3d2c013a48 Adding NeutralResourcesLanguageAttribute 2015-09-10 18:20:42 -07:00
Damian Edwards c065c90337 Merge pull request #63 from hishamco/issue#62
Fix 'QueryStringRequestCultureProvider' Issue
2015-09-07 17:29:04 -07:00
Chris R d927314047 Add missing namespaces. 2015-08-31 10:23:01 -07:00
Chris R 2a1cf633fc Use new HttpContext.Features API. 2015-08-31 09:55:57 -07:00
Hisham Abdullah Bin Ateya 1cfc62dbfd Fix 'QueryStringRequestCultureProvider' Issue 2015-08-05 20:23:19 +03:00
Troy Dai cc0c4e1f55 Update CoreCLR versions 2015-08-04 10:15:29 -07:00
Hisham Abdullah Bin Ateya c228b65d47 Make 'DefaultCookieName' static readonly field instead of a property
DefaultCookieName as Constant

Add empty line
2015-07-30 11:44:27 -07:00
Hisham Abdullah Bin Ateya 01d0b5db22 Reformat project.json
Reformat project.json

Fix typo
2015-07-30 11:26:14 -07:00
Kiran Challa 064e2fe553 Added repository information to project.json files 2015-07-22 15:00:14 -07:00
Hisham Abdullah Bin Ateya 576d4eaf8d Fix missing docs in 'RequestCultureFeature' 2015-06-26 23:17:04 +03:00
Hisham Abdullah Bin Ateya 8f9a47358e Fix 'RequestLocalizationMiddleware' missing docs 2015-06-26 04:49:43 +03:00
Hisham Abdullah Bin Ateya 113fa6d545 Remove "I" from "ApplicationBuilderExtensions" 2015-06-16 20:37:07 -07:00
damianedwards 39f40d2c5f Fix references to include beta-* 2015-05-29 11:46:24 -07:00
damianedwards 5c7d811aa6 Fix the merge 2015-05-20 16:22:54 -07:00
damianedwards e5a0918054 Merge branch 'dev' of https://github.com/hishamco/Localization into hishamco-dev
Conflicts:
	src/Microsoft.AspNet.Localization/CustomRequestCultureStrategy.cs
	src/Microsoft.AspNet.Localization/IApplicationBuilderExtensions.cs
	src/Microsoft.Framework.Localization/ResourceManagerStringLocalizer.cs
2015-05-20 16:17:57 -07:00
damianedwards 4ba159afe7 Removed Moq from tests & enabled .NET Core
- Introduced AssemblyWrapper to enable testing
- Cleaned up properties on ResourceManagerStringLocalizer
- #15

Change "Strategy" to "Provider"
- #19
2015-05-20 14:41:52 -07:00
Troy Dai f6119d4856 Update references
Microsoft.Framework.NotNullAttribute.Internal =>
Microsoft.Framework.NotNullAttribute.Sources
2015-05-20 12:41:17 -07:00
damianedwards ecfb7f342a Sort project.json dependencies 2015-05-15 12:14:14 -07:00
damianedwards 2431e1a542 Move CultureInfoCache into its own package. 2015-05-13 15:50:00 -07:00
damianedwards 21dc2909a1 Made IRequestCultureStrategy async to support things like user profile lookup 2015-05-11 18:29:03 -07:00
damianedwards d22adcbef0 Remove RequestCulture caching as perf testing shows it has no benefit 2015-05-11 18:05:36 -07:00
damianedwards 306d71ef43 Moved some things around:
- Options are now given to strategies
- Options only contains properties relevant to the middleware itself. Strategies can have their own properties, e.g. AcceptLanguageHeaderRequestCultureStrategy limits the number of values in the header to try
- Strategies now derive from common base class and validate against the options, e.g. app specified supported cultures
- Renamed RequestLocalizationMiddlewareOptions to RequestLocalizationOptions
- Fixed missing doc comments
2015-05-11 15:28:50 -07:00
damianedwards 9834a27728 Culture names are now limited to a known list:
- Added tool to generate a set of known culture names from the OS/Fx
- CultureInfoCache is now limited to only caching/returning cultures from the known list
- #6
2015-05-11 12:58:18 -07:00
damianedwards ca4b85e19f Added missing doc comments 2015-05-07 18:19:54 -07:00
damianedwards 944c84bc5d Implemented CookieRequestCultureStrategy & other changes:
- Updated sample to enable setting/clearing cultures via cookie
- Cache CultureInfo construction as it's not built into .NET Core
- Cache RequestCulture construction as they're immutable anyway and created lots per app if the middleware is running
- Fix issue where by invalid culture names were not handled (it crashed)
- Handle the pesky favicon.ico request from browsers
- Ignore .vs folder
2015-05-07 18:11:10 -07:00
Hisham Abdullah Bin Ateya 91b3ea4547 Using expression-bodies methods 2015-05-08 01:52:03 +03:00
damianedwards 3dc0d40f7d Added a sample & fixed some issues it found 2015-05-06 18:09:59 -07:00
damianedwards b11f7d51c3 Bunch of changes:
- Implemented pluggable strategies for determining request culture
- Added NotNull on public APIs
- Added support for a default request culture
- Added options class for configuring the middleware
- Improved the query string logic to support separate formatting & language cultures
- Implemented the logic for accept-language header
- Added more doc comments
2015-05-06 16:51:23 -07:00
damianedwards acd643660a Added missing descriptions 2015-05-06 10:53:25 -07:00
damianedwards 9eede89418 Initial commit 2015-05-05 23:27:25 -07:00