Skip to content

Commit 10ab7ad

Browse files
Added resource migration for 3.0.2
1 parent 3011dd1 commit 10ab7ad

File tree

5 files changed

+220
-24
lines changed

5 files changed

+220
-24
lines changed

src/Libraries/SmartStore.Data/Migrations/201707190940318_V302Resources.Designer.cs

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
namespace SmartStore.Data.Migrations
2+
{
3+
using Setup;
4+
using System;
5+
using System.Data.Entity.Migrations;
6+
7+
public partial class V302Resources : DbMigration, ILocaleResourcesProvider, IDataSeeder<SmartObjectContext>
8+
{
9+
public override void Up()
10+
{
11+
}
12+
13+
public override void Down()
14+
{
15+
}
16+
17+
public bool RollbackOnFailure
18+
{
19+
get { return false; }
20+
}
21+
22+
public void Seed(SmartObjectContext context)
23+
{
24+
context.MigrateLocaleResources(MigrateLocaleResources);
25+
26+
context.SaveChanges();
27+
}
28+
29+
public void MigrateLocaleResources(LocaleResourcesBuilder builder)
30+
{
31+
builder.AddOrUpdate("Admin.Configuration.Settings.Search.DefaultSortOrderMode",
32+
"Default product sort order",
33+
"Standardsortierreihenfolge für Produkte",
34+
"Specifies the default product sort order in search results.",
35+
"Legt die Standardsortierreihenfolge für Produkte in den Suchergebnissen fest.");
36+
37+
builder.AddOrUpdate("Common.Recommended", "Recommended", "Empfohlen");
38+
39+
builder.AddOrUpdate("Admin.Configuration.Themes.Option.AssetCachingEnabled",
40+
"Enable asset caching",
41+
"Asset Caching aktivieren",
42+
"Determines whether compiled asset files should be cached in file system in order to speed up application restarts. Select 'Auto', if caching should depend on the debug setting in web.config.",
43+
"Legt fest, ob kompilierte JS- und CSS-Dateien wie bspw. 'Sass' im Dateisystem zwischengespeichert werden sollen, um den Programmstart zu beschleunigen. Wählen Sie 'Automatisch', wenn das Caching von der Debug-Einstellung in der web.config abhängig sein soll.");
44+
45+
builder.AddOrUpdate("Admin.Configuration.Themes.ClearAssetCache",
46+
"Clear asset cache",
47+
"Asset Cache leeren");
48+
49+
builder.AddOrUpdate("Search.Facet.ExcludeOutOfStock", "Exclude Out of Stock", "Nicht verfügbare Artikel ausschließen");
50+
51+
builder.AddOrUpdate("Admin.Configuration.Settings.Search.IncludeNotAvailable",
52+
"Include out of stock products",
53+
"Nicht verfügbare Produkte einschließen",
54+
"Specifies whether to include or exclude products that are out of stock by default.",
55+
"Legt fest, ob nicht verfügbare Produkte in Suchergebnissen standardmäßig angezeigt werden sollen oder nicht.");
56+
}
57+
}
58+
}

src/Libraries/SmartStore.Data/Migrations/201707190940318_V302Resources.resx

Lines changed: 126 additions & 0 deletions
Large diffs are not rendered by default.

src/Libraries/SmartStore.Data/Migrations/MigrationsConfiguration.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,7 @@ public void MigrateSettings(SmartObjectContext context)
3131

3232
public void MigrateLocaleResources(LocaleResourcesBuilder builder)
3333
{
34-
builder.AddOrUpdate("Admin.Configuration.Settings.Search.DefaultSortOrderMode",
35-
"Default product sort order",
36-
"Standardsortierreihenfolge für Produkte",
37-
"Specifies the default product sort order in search results.",
38-
"Legt die Standardsortierreihenfolge für Produkte in den Suchergebnissen fest.");
3934

40-
builder.AddOrUpdate("Common.Recommended", "Recommended", "Empfohlen");
41-
42-
builder.AddOrUpdate("Admin.Configuration.Themes.Option.AssetCachingEnabled",
43-
"Enable asset caching",
44-
"Asset Caching aktivieren",
45-
"Determines whether compiled asset files should be cached in file system in order to speed up application restarts. Select 'Auto', if caching should depend on the debug setting in web.config.",
46-
"Legt fest, ob kompilierte JS- und CSS-Dateien wie bspw. 'Sass' im Dateisystem zwischengespeichert werden sollen, um den Programmstart zu beschleunigen. Wählen Sie 'Automatisch', wenn das Caching von der Debug-Einstellung in der web.config abhängig sein soll.");
47-
48-
builder.AddOrUpdate("Admin.Configuration.Themes.ClearAssetCache",
49-
"Clear asset cache",
50-
"Asset Cache leeren");
51-
52-
builder.AddOrUpdate("Search.Facet.ExcludeOutOfStock", "Exclude Out of Stock", "Nicht verfügbare Artikel ausschließen");
53-
54-
builder.AddOrUpdate("Admin.Configuration.Settings.Search.IncludeNotAvailable",
55-
"Include out of stock products",
56-
"Nicht verfügbare Produkte einschließen",
57-
"Specifies whether to include or exclude products that are out of stock by default.",
58-
"Legt fest, ob nicht verfügbare Produkte in Suchergebnissen standardmäßig angezeigt werden sollen oder nicht.");
5935
}
6036
}
6137
}

src/Libraries/SmartStore.Data/SmartStore.Data.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,10 @@
501501
<Compile Include="Migrations\201706020759565_UpdateMediaPath.Designer.cs">
502502
<DependentUpon>201706020759565_UpdateMediaPath.cs</DependentUpon>
503503
</Compile>
504+
<Compile Include="Migrations\201707190940318_V302Resources.cs" />
505+
<Compile Include="Migrations\201707190940318_V302Resources.Designer.cs">
506+
<DependentUpon>201707190940318_V302Resources.cs</DependentUpon>
507+
</Compile>
504508
<Compile Include="ObjectContextBase.SaveChanges.cs" />
505509
<Compile Include="Setup\Builder\ActivityLogTypeMigrator.cs" />
506510
<Compile Include="Setup\Builder\PermissionMigrator.cs" />
@@ -913,6 +917,9 @@
913917
<EmbeddedResource Include="Migrations\201706020759565_UpdateMediaPath.resx">
914918
<DependentUpon>201706020759565_UpdateMediaPath.cs</DependentUpon>
915919
</EmbeddedResource>
920+
<EmbeddedResource Include="Migrations\201707190940318_V302Resources.resx">
921+
<DependentUpon>201707190940318_V302Resources.cs</DependentUpon>
922+
</EmbeddedResource>
916923
<EmbeddedResource Include="Sql\Indexes.sql" />
917924
<EmbeddedResource Include="Sql\StoredProcedures.sql" />
918925
</ItemGroup>

0 commit comments

Comments
 (0)