Skip to content

Commit f12f7b7

Browse files
Merge pull request #13 from iAlexeyProkhorov/qBo_for_nopCommerce_4.50.2
Update to version 1.4.2.
2 parents d2d4e9d + 482622c commit f12f7b7

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

BaseBaroquePlugin.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ public BaseBaroquePlugin()
6464
protected string GenerateLocalizationXmlFilePathByCulture(string culture = "en-US")
6565
{
6666
string fileName = string.Format("localization.{0}.xml", culture);
67-
string contentDirectoryPath = $"{_originalAssemblyFile.DirectoryName}\\Content\\";
67+
string contentDirectoryPath = $"{_originalAssemblyFile.DirectoryName}{Path.DirectorySeparatorChar}Content{Path.DirectorySeparatorChar}";
6868

6969
return $"{contentDirectoryPath}{fileName}";
7070
}
7171

7272
/// <summary>
7373
/// Install available plugin localizations
7474
/// </summary>
75-
protected virtual void InstallLocalization()
75+
protected virtual async Task InstallLocalizationAsync()
7676
{
77-
var allLanguages = _languageService.GetAllLanguagesAsync().GetAwaiter().GetResult();
77+
var allLanguages = await _languageService.GetAllLanguagesAsync();
7878
var language = allLanguages.FirstOrDefault();
7979

8080
//if shop have no available languages method generate exception
@@ -95,7 +95,7 @@ protected virtual void InstallLocalization()
9595
{
9696
using (var sr = new StreamReader(stream, Encoding.UTF8))
9797
{
98-
_localizationService.ImportResourcesFromXmlAsync(l, sr);
98+
await _localizationService.ImportResourcesFromXmlAsync(l, sr);
9999
}
100100
}
101101
}
@@ -104,7 +104,7 @@ protected virtual void InstallLocalization()
104104
/// <summary>
105105
/// Uninstall plugin localization
106106
/// </summary>
107-
protected virtual void UninstallLocalization()
107+
protected virtual async Task UninstallLocalizationAsync()
108108
{
109109
var localizationPath = GenerateLocalizationXmlFilePathByCulture();
110110

@@ -118,7 +118,7 @@ protected virtual void UninstallLocalization()
118118
{
119119
using (var sr = new StreamReader(stream, Encoding.UTF8))
120120
{
121-
var result = sr.ReadToEnd();
121+
var result = await sr.ReadToEndAsync();
122122
var xLang = new XmlDocument();
123123
xLang.LoadXml(result);
124124

@@ -128,7 +128,7 @@ protected virtual void UninstallLocalization()
128128
if (elem.Name == "LocaleResource")
129129
{
130130
var localResource = elem.Attributes["Name"].Value;
131-
_localizationService.DeleteLocaleResourceAsync(localResource);
131+
await _localizationService.DeleteLocaleResourceAsync(localResource);
132132
}
133133
}
134134
}
@@ -141,14 +141,14 @@ protected virtual void UninstallLocalization()
141141
public override async Task InstallAsync()
142142
{
143143

144-
InstallLocalization();
144+
await InstallLocalizationAsync();
145145
await base.InstallAsync();
146146
}
147147

148148

149149
public override async Task UninstallAsync()
150150
{
151-
UninstallLocalization();
151+
await UninstallLocalizationAsync();
152152
await base.UninstallAsync();
153153
}
154154

Nop.Plugin.Widgets.qBoSlider.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PackageProjectUrl></PackageProjectUrl>
1717
<RepositoryUrl>https://github.com/iAlexeyProkhorov/qBoSlider</RepositoryUrl>
1818
<RepositoryType>Git</RepositoryType>
19-
<Version>1.3.0</Version>
19+
<Version>1.4.2</Version>
2020
<OutputPath>..\..\Presentation\Nop.Web\Plugins\Widgets.qBoSlider</OutputPath>
2121
<OutDir>$(OutputPath)</OutDir>
2222
</PropertyGroup>

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Group": "Widgets",
33
"FriendlyName": "qBoSlider",
44
"SystemName": "Widgets.qBoSlider",
5-
"Version": "1.4.1",
5+
"Version": "1.4.2",
66
"SupportedVersions": [ "4.50" ],
77
"Author": "Baroque team",
88
"DisplayOrder": 1,

0 commit comments

Comments
 (0)