Skip to content

Commit

Permalink
This closes issue #9
Browse files Browse the repository at this point in the history
  • Loading branch information
valdisiljuconoks committed Apr 10, 2015
1 parent 3dd0c52 commit 14d4b4f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2,629 deletions.
3 changes: 0 additions & 3 deletions EPiBootstrapArea.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Scripts\jquery-1.9.0.intellisense.js" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
17 changes: 11 additions & 6 deletions Initialization/RegisterDisplayModesInitModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Diagnostics;
using System.Linq;
using EPiServer.Data;
using EPiServer.Data;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.Framework.Localization;
Expand All @@ -11,6 +9,7 @@ namespace EPiBootstrapArea.Initialization
{
[ModuleDependency(typeof(DataInitialization))]
[ModuleDependency(typeof(DisplayModeFallbackProviderInitModule))]
[ModuleDependency(typeof(ProviderBasedLocalizationService))]
public class RegisterDisplayModesInitModule : IInitializableModule
{
private IDisplayModeFallbackProvider _provider;
Expand Down Expand Up @@ -41,13 +40,19 @@ private void RegisterDisplayOptions()
var localizationService = ServiceLocator.Current.GetInstance<LocalizationService>();
var modes = _provider.GetAll();

Debug.WriteLine("Number " + modes.Count());

foreach (var mode in modes)
{
var name = "/displayoptions/" + mode.Tag;
string translatedName;
translatedName = !localizationService.TryGetString(name, out translatedName) ? mode.Name : name;

try
{
translatedName = !localizationService.TryGetString(name, out translatedName) ? mode.Name : name;
}
catch
{
translatedName = mode.Name;
}

options.Add(new DisplayOption
{
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("0b623313-e88f-4f24-8240-66934f8e6b02")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0")]
[assembly: AssemblyVersion("2.0.1.0")]
[assembly: AssemblyFileVersion("2.0.1.0")]
[assembly: AssemblyInformationalVersion("2.0.1")]
[assembly: InternalsVisibleTo("EPiBootstrapArea.Tests")]
Loading

0 comments on commit 14d4b4f

Please sign in to comment.