Skip to content

Commit 49da71a

Browse files
committed
Updated Google Analytics admin instructions
Bulk update of string resources may fail because of outdated EfRepository.AutoCommitEnabledInternal state
1 parent 5eff8fa commit 49da71a

4 files changed

Lines changed: 14 additions & 22 deletions

File tree

src/Libraries/SmartStore.Services/Localization/LocalizationService.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ public virtual void ImportResourcesFromXml(
437437

438438
foreach (var xel in nodes.Cast<XmlElement>())
439439
{
440-
441440
string name = xel.GetAttribute("Name").TrimSafe();
442441
string value = "";
443442
var valueNode = xel.SelectSingleNode("Value");
@@ -488,13 +487,7 @@ public virtual void ImportResourcesFromXml(
488487
_lsrRepository.InsertRange(toAdd, 500);
489488
toAdd.Clear();
490489

491-
_lsrRepository.AutoCommitEnabled = null;
492-
toUpdate.Each(x =>
493-
{
494-
_lsrRepository.Update(x);
495-
});
496-
497-
_lsrRepository.Context.SaveChanges();
490+
_lsrRepository.UpdateRange(toUpdate);
498491
toUpdate.Clear();
499492

500493
//clear cache

src/Libraries/SmartStore.Services/Messages/Importer/NewsLetterSubscriptionImporter.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ public void Execute(IImportExecuteContext context)
104104
toAdd.Clear();
105105

106106
// update modified subscribers
107-
_subscriptionRepository.AutoCommitEnabled = null;
108-
toUpdate.Each(x => _subscriptionRepository.Update(x));
109-
_subscriptionRepository.Context.SaveChanges();
107+
_subscriptionRepository.UpdateRange(toUpdate);
110108
toUpdate.Clear();
111109
}
112110
catch (Exception exception)

src/Plugins/SmartStore.GoogleAnalytics/Localization/resources.de-de.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
<LocaleResource Name="AdminInstruction">
66
<Value>
77
<![CDATA[
8-
<p>Google Analytics ist ein kostenloser Statistikdienst von Google. Der Dienst erfasst Statistiken über Besucher und Ecommerce-Konversion auf Ihrer Webseite</p>
8+
<p>Google Analytics ist ein kostenloser Statistikdienst von Google. Der Dienst erfasst Statistiken über Besucher und Ecommerce-Konversion auf Ihrer Webseite.</p>
99
<p>Führen Sie die folgenden Schritte aus um Google Analytics auf Ihrer Webseite einzubinden:</p>
1010
<ul>
11-
<li><a href="http://www.google.com/analytics/" target="_blank">erstellen Sie hier einen "Google Analytics"-Account</a> und folgen Sie dem Wizard um Ihre Webseite zuzufügen</li>
12-
<li>Kopieren Sie die "Google Analytics"-ID in das entspechende Feld in folgendem Formular</li>
13-
<li>Kopieren Sie den Tracking-Code in die "Tracking-Code"-Box in folgendem Formular</li>
14-
<li>KLicken Sie den "Speichern"-Button und Google Analytics wird in Ihre Webseite integriert</li>
11+
<li><a href="http://www.google.com/analytics/" target="_blank">Erstellen Sie hier einen Google-Analytics-Account</a> und folgen Sie dem Wizard um Ihre Webseite zuzufügen.</li>
12+
<li>Kopieren Sie die Google-Analytics-ID in das entspechende Feld in folgendem Formular.</li>
13+
<li>Kopieren Sie den Tracking-Code in die Tracking-Code-Box in folgendem Formular.</li>
14+
<li>Klicken Sie den Speichern-Button.</li>
15+
<li>Aktivieren Sie das Google Analytics Widget unter <b>CMS > Widgets</b> und Google Analytics wird in Ihre Webseite integriert.</li>
1516
</ul>
1617
]]>
1718
</Value>

src/Plugins/SmartStore.GoogleAnalytics/Localization/resources.en-us.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<LocaleResource Name="AdminInstruction">
66
<Value>
77
<![CDATA[
8-
<p>Google Analytics is a free website stats tool from Google. It keeps track of statistics
9-
about the visitors and ecommerce conversion on your website.</p>
8+
<p>Google Analytics is a free website statistics tool from Google. It keeps track of statistics about the visitors and ecommerce conversion on your website.</p>
109
<p>Follow the next steps to enable Google Analytics integration:</p>
1110
<ul>
12-
<li><a href="http://www.google.com/analytics/" target="_blank">Create a Google Analytics account</a> and follow the wizard to add your website</li>
13-
<li>Copy the Google Analytics ID into the 'ID' box below</li>
14-
<li>Copy the tracking code from Google Analytics into the 'Tracking Code' box below</li>
15-
<li>Click the 'Save' button below and Google Analytics will be integrated into your store</li>
11+
<li><a href="http://www.google.com/analytics/" target="_blank">Create a Google Analytics account</a> and follow the wizard to add your website.</li>
12+
<li>Copy the Google Analytics ID into the ID field below.</li>
13+
<li>Copy the tracking code from Google Analytics into the Tracking Code field below.</li>
14+
<li>Click the Save button below.</li>
15+
<li>Activate the Google Analytics widget under <b>CMS > Widgets</b> to integrate Google Analytics into your store.</li>
1616
</ul>
1717
]]>
1818
</Value>

0 commit comments

Comments
 (0)