//Plant only on CI
        public void Should_Read_AllStringsWithParentFallback()
        {
            InitLocalizer("en-AU");

            LocalizedString[] results  = localizer.GetAllStrings(includeParentCultures: true).ToArray();
            LocalizedString[] expected = new[] {
                new LocalizedString("Color", "Colour (specific)", false),
                new LocalizedString("Empty", "Empty", false)
            };
            CollectionAssert.AreEqual(expected, results.OrderBy(s => s.Name).ToArray(), new LocalizedStringComparer());
        }
Пример #2
0
 public void CacheResources(string CacheKey)
 {
     if (!_cache.TryGetValue(CacheKey, out List <JsonLocalization> resources))
     {
         _cache.Set(CacheKey, _resources.GetAllStrings(true));
     }
 }