Skip to content

Commit

Permalink
New release (#16)
Browse files Browse the repository at this point in the history
* Create NuGet.config

* Correct NuGet feed for the OrchardCore preview

* Set up CI with Azure Pipelines

* Fixed test task in Azure Pipelines (#13)

* Pack application as dotnet global tool (#12)

* Update azure-pipelines.yml

* Update readme.md

* Add additional identifiers for StringLocalizer

* Change version number
  • Loading branch information
lukaskabrt authored Feb 6, 2019
1 parent 5421334 commit 369b040
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
9 changes: 9 additions & 0 deletions PoExtractor.CS/Constants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace PoExtractor.CS {
public static class Constants {
public static string[] StringLocalizerIdentifiers = new string[] { "T", "S", "TS", "H", "TH" };
}
}
3 changes: 2 additions & 1 deletion PoExtractor.CS/PluralStringExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Microsoft.CodeAnalysis.CSharp.Syntax;
using PoExtractor.Core;
using PoExtractor.Core.Contracts;
using System.Linq;

namespace PoExtractor.CS {
/// <summary>
Expand All @@ -21,7 +22,7 @@ public override bool TryExtract(SyntaxNode node, out LocalizableStringOccurence
if (node is InvocationExpressionSyntax invocation &&
invocation.Expression is MemberAccessExpressionSyntax accessor &&
accessor.Expression is IdentifierNameSyntax identifierName &&
identifierName.Identifier.Text == "T" &&
Constants.StringLocalizerIdentifiers.Contains(identifierName.Identifier.Text) &&
accessor.Name.Identifier.Text == "Plural") {

var arguments = invocation.ArgumentList.Arguments;
Expand Down
3 changes: 2 additions & 1 deletion PoExtractor.CS/SingularStringExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Microsoft.CodeAnalysis.CSharp.Syntax;
using PoExtractor.Core;
using PoExtractor.Core.Contracts;
using System.Linq;

namespace PoExtractor.CS {
/// <summary>
Expand All @@ -20,7 +21,7 @@ public override bool TryExtract(SyntaxNode node, out LocalizableStringOccurence

if (node is ElementAccessExpressionSyntax accessor &&
accessor.Expression is IdentifierNameSyntax identifierName &&
identifierName.Identifier.Text == "T" &&
Constants.StringLocalizerIdentifiers.Contains(identifierName.Identifier.Text) &&
accessor.ArgumentList != null) {

var argument = accessor.ArgumentList.Arguments.FirstOrDefault();
Expand Down
2 changes: 1 addition & 1 deletion PoExtractor.OrchardCore/PoExtractor.OrchardCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>PoExtractor.OrchardCore</AssemblyName>
<ToolCommandName>extractpo-oc</ToolCommandName>
<PackAsTool>true</PackAsTool>
<Version>0.1.0</Version>
<Version>0.1.1</Version>
<PackageId>PoExtractor.OrchardCore</PackageId>
<Authors>Lukas Kabrt</Authors>
<Company />
Expand Down
2 changes: 1 addition & 1 deletion PoExtractor/PoExtractor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>PoExtractor</AssemblyName>
<ToolCommandName>extractpo</ToolCommandName>
<PackAsTool>true</PackAsTool>
<Version>0.1.0</Version>
<Version>0.1.1</Version>
<PackageId>PoExtractor</PackageId>
<Authors>Lukas Kabrt</Authors>
<Company />
Expand Down

0 comments on commit 369b040

Please sign in to comment.