Closed florisrobbemont closed 11 years ago
In FileLocalizedTypeRepository.cs, the GetLanguage method, loads the entire JSON prompts file every time a translation is requested.
On line 242 in https://github.com/jgauffin/griffin.mvccontrib/blob/master/source/Griffin.MvcContrib/Localization/FlatFile/FileLocalizedTypeRepository.cs
Lines 241-246 can be replaced with:
prompts = LoadLanguage(culture) ?? new TypePromptCollection(culture); _languages.Add(culture, prompts);
you are right, i'm going to commit your fix.
fixed https://github.com/paolosanchi/griffin.mvccontrib/commit/bb85f2073a54fd5d96126ce7d0dafc93ffaa88f8 https://github.com/jgauffin/griffin.mvccontrib/pull/41
In FileLocalizedTypeRepository.cs, the GetLanguage method, loads the entire JSON prompts file every time a translation is requested.
On line 242 in https://github.com/jgauffin/griffin.mvccontrib/blob/master/source/Griffin.MvcContrib/Localization/FlatFile/FileLocalizedTypeRepository.cs
Lines 241-246 can be replaced with:
prompts = LoadLanguage(culture) ?? new TypePromptCollection(culture); _languages.Add(culture, prompts);