Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
243eac5
Add Crowdin upload script and config template.
sarahelsaig Nov 16, 2023
f14aac5
Temporarily add the synchronize-with-crowdin job to the build-and-tes…
sarahelsaig Nov 16, 2023
fa211e3
Allow crowdin in spelling.
sarahelsaig Nov 16, 2023
0c40878
remove unnecessary command
sarahelsaig Nov 16, 2023
fcecafd
Move synchronize-with-crowdin to publish-nuget.
sarahelsaig Nov 16, 2023
2a4ed77
Add step to also update the Translations repo.
sarahelsaig Nov 17, 2023
ee7b9cd
set upstream
sarahelsaig Nov 17, 2023
238c242
Add some tracing echoes.
sarahelsaig Nov 17, 2023
f6deb45
Log specifically around git commit.
sarahelsaig Nov 17, 2023
f2177ef
Hopefully fix commit message problem.
sarahelsaig Nov 17, 2023
a828855
Add git config.
sarahelsaig Nov 17, 2023
0243565
git add --all
sarahelsaig Nov 17, 2023
a16c14b
Change command order.
sarahelsaig Nov 17, 2023
0b89961
Change command order again.
sarahelsaig Nov 17, 2023
985592b
Use different token.
sarahelsaig Nov 17, 2023
91add96
Clone with the token in the first place.
sarahelsaig Nov 17, 2023
ea120ac
git push without the set-upstream
sarahelsaig Nov 17, 2023
4da8bc2
Try using SSH instead.
sarahelsaig Nov 17, 2023
83aa6dc
Write key into the default location.
sarahelsaig Nov 17, 2023
67b43d7
create ssh directory
sarahelsaig Nov 17, 2023
8a4ffc4
protect key file
sarahelsaig Nov 17, 2023
fb7a091
Move job into publish-nuget.
sarahelsaig Nov 17, 2023
ec1c904
Upload the pot files too.
sarahelsaig Nov 17, 2023
290d341
buildTransitive
sarahelsaig Nov 29, 2023
17d9556
Merge remote-tracking branch 'origin/main' into issue/OCC-121
sarahelsaig Dec 10, 2025
00f223b
fix spacing.
sarahelsaig Dec 10, 2025
8c8a02c
Add Crowdin badge.
sarahelsaig Dec 10, 2025
dcbcea9
Crowdin sync workflow.
sarahelsaig Dec 11, 2025
56beb73
Try using git.
sarahelsaig Dec 11, 2025
b3a394e
Merge remote-tracking branch 'origin/main' into issue/OCC-121
sarahelsaig Dec 11, 2025
890a067
Try --unset-all based on SO advice.
sarahelsaig Dec 11, 2025
0c1bc7b
Use other token.
sarahelsaig Dec 11, 2025
3650d69
Use gh tool.
sarahelsaig Dec 11, 2025
71083f8
Add GH_TOKEN environment variable.
sarahelsaig Dec 11, 2025
8ac1d06
Maybe these are not needed.
sarahelsaig Dec 11, 2025
6e89e07
revert
sarahelsaig Dec 11, 2025
5357c2b
Use TRANSLATIONS_TOKEN.
sarahelsaig Dec 11, 2025
9d81659
Use LOMBIQBOT_GITHUB_PERSONAL_ACCESS_TOKEN.
sarahelsaig Dec 11, 2025
c7f82b2
revert
sarahelsaig Dec 11, 2025
09b0f3b
Go hack to https clone
sarahelsaig Dec 11, 2025
0c69d7e
Fix typo.
sarahelsaig Dec 11, 2025
4d3c33f
Switch over to the real Lombiq Bot token.
sarahelsaig Dec 11, 2025
d8cd4c8
Fix localization string mix-up.
sarahelsaig Dec 13, 2025
a67bfc5
Plug in localization package from Cloudsmith.
sarahelsaig Dec 13, 2025
84fb780
update
sarahelsaig Dec 13, 2025
ad23b63
Add UI test.
sarahelsaig Dec 13, 2025
bac95a6
Fix UI test.
sarahelsaig Dec 13, 2025
6a0f1be
Formatting NuGet.config
Piedone Dec 14, 2025
be39412
Preventing Cloudsmith from blocking NuGet restore
Piedone Dec 14, 2025
05660f4
Add a mention of the translation project in readme and docs.
sarahelsaig Dec 14, 2025
bb8e098
Update .github/workflows/publish-nuget.yml
sarahelsaig Dec 14, 2025
04a348c
Is this actually needed?
sarahelsaig Dec 14, 2025
e12e3a2
Minor cleanup.
sarahelsaig Dec 14, 2025
0ab33dd
Merge remote-tracking branch 'origin/issue/OCC-121' into issue/OCC-121
sarahelsaig Dec 14, 2025
57225da
Fix MD.
sarahelsaig Dec 14, 2025
43ee28e
This is not needed.
sarahelsaig Dec 14, 2025
bd26417
Add dotnet-tools.json.
sarahelsaig Dec 14, 2025
9b39a89
newline
sarahelsaig Dec 14, 2025
75b5b52
Merge remote-tracking branch 'origin/main' into issue/OCC-121
sarahelsaig Dec 14, 2025
5ddbc90
Use the same Authors value found in the main OC projects.
sarahelsaig Dec 14, 2025
d657399
Update Readme.md
sarahelsaig Dec 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"orchardcorecontrib.poextractor": {
"version": "1.2.0",
"commands": [
"extractpo"
],
"rollForward": false
}
}
}
31 changes: 30 additions & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,34 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
if: false
uses: Lombiq/GitHub-Actions/.github/actions/checkout@dev

- name: Set up .NET
uses: Lombiq/GitHub-Actions/.github/actions/setup-dotnet@dev

- name: Generate and upload localization strings
shell: pwsh
env:
GH_TOKEN: ${{ secrets.LOMBIQBOT_GITHUB_PERSONAL_ACCESS_TOKEN }}
run: |
# Generate latest localization files.
dotnet tool install OrchardCoreContrib.PoExtractor
New-Item -Path Localization -ItemType Directory
dotnet extractpo . Localization

# Clone the Translations repository.
git clone "https://${Env:GH_TOKEN}@github.com/OrchardCMS/OrchardCore.Commerce.Translations.git"
git config --global user.name "Lombiq Bot"
git config --global user.email "bot@lombiq.com"
git config --unset-all http.https://github.com/.extraheader

# Update the Translations repository.
Push-Location OrchardCore.Commerce.Translations
Move-Item -Force ../Localization/*.pot Localization/
git add .
git status
git commit "--message=Updated .pot files.`n`nhttps://github.com/OrchardCMS/OrchardCore.Commerce/commit/$(git rev-parse HEAD)`n`n$(git log -1)"
git push
Pop-Location

Remove-Item -Recurse -Force OrchardCore.Commerce.Translations, Localization
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ node_modules/
.pnpm-debug.log
*.sln
*.po
*.pot
/src/OrchardCore.Commerce.Web/App_Data/
/src/OrchardCore.Commerce.Web/wwwroot/is-cache/
*.placeholder
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="OrchardCore.Application.Cms.Targets" Version="$(OrchardCoreVersion)" />
<PackageVersion Include="OrchardCore.ContentFields" Version="$(OrchardCoreVersion)" />
<PackageVersion Include="OrchardCore.Commerce.Translations" Version="1.0.0-preview.4.occ-121" />
<PackageVersion Include="OrchardCore.ContentManagement" Version="$(OrchardCoreVersion)" />
<PackageVersion Include="OrchardCore.ContentManagement.Abstractions" Version="$(OrchardCoreVersion)" />
<PackageVersion Include="OrchardCore.ContentTypes" Version="$(OrchardCoreVersion)" />
Expand Down
13 changes: 12 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<clear />
<add key="LombiqPreview" value="https://nuget.cloudsmith.io/lombiq/open-source-orchard-core-extensions/v3/index.json" />
<add key="OrchardCorePreview" value="https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json" />
<add key="OrchardCoreCommercePreview" value="https://nuget.cloudsmith.io/orchardcore/commerce/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<packageSourceMapping>
Expand All @@ -24,11 +25,21 @@
<package pattern="TheTheme" />
<package pattern="TheAdmin" />
</packageSource>-->
<packageSource key="OrchardCoreCommercePreview">
<package pattern="OrchardCore.Commerce.Translations" />
</packageSource>
<!-- Enable these to use the Lombiq packages from Cloudsmith instead of NuGet.
<packageSource key="LombiqPreview">
<package pattern="Lombiq.HelpfulLibraries*" />
<package pattern="Lombiq.Tests.UI*" />
</packageSource>
-->
</packageSourceMapping>
</packageSourceMapping>
<auditSources>
<!-- This is to prevent such errors during NuGet restore for Cloudsmith: "Error occurred while getting package
vulnerability data: Unable to load the service index for source
https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json." -->
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</auditSources>
</configuration>
2 changes: 2 additions & 0 deletions OrchardCore.Commerce.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Readme.md = Readme.md
Reset-Local.ps1 = Reset-Local.ps1
renovate.json5 = renovate.json5
.config\dotnet-tools.json = .config\dotnet-tools.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B2D057AA-E3F7-404D-A713-C3C59F9DE562}"
Expand Down Expand Up @@ -49,6 +50,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
.github\workflows\publish-nuget.yml = .github\workflows\publish-nuget.yml
.github\workflows\validate-pull-request.yml = .github\workflows\validate-pull-request.yml
.github\workflows\renovate.yml = .github\workflows\renovate.yml
.github\workflows\crowdin.yml = .github\workflows\crowdin.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Commerce.ContentFields", "src\Modules\OrchardCore.Commerce.ContentFields\OrchardCore.Commerce.ContentFields.csproj", "{8027FB33-B110-48A2-9B71-89F1EA96EB67}"
Expand Down
13 changes: 12 additions & 1 deletion Readme.md
Comment thread
Piedone marked this conversation as resolved.
Comment thread
Piedone marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Orchard Core Commerce

[![Discord](https://img.shields.io/discord/551136772243980291?color=%237289DA&label=Discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/rYHxgqU5) [![Read the Docs](https://img.shields.io/readthedocs/orchardcorecommerce?label=Documentation)](https://commerce.orchardcore.net/) [![Latest version of 'OrchardCore.Commerce' on NuGet](https://img.shields.io/nuget/v/OrchardCore.Commerce?style=flat&label=NuGet)](https://www.nuget.org/packages/OrchardCore.Commerce/) [![Latest version of 'OrchardCore.Commerce' on Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/orchardcore/commerce/nuget/OrchardCore.Commerce/latest/xsp=True/?render=true&show_latest=true&style=flat&labelColor=gray&label=Cloudsmith)](https://cloudsmith.io/~orchardcore/repos/commerce/packages/detail/nuget/OrchardCore.Commerce/latest/xsp=True/)
[![Discord](https://img.shields.io/discord/551136772243980291?color=%237289DA&label=Discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/rYHxgqU5) [![Read the Docs](https://img.shields.io/readthedocs/orchardcorecommerce?label=Documentation)](https://commerce.orchardcore.net/) [![Latest version of 'OrchardCore.Commerce' on NuGet](https://img.shields.io/nuget/v/OrchardCore.Commerce?style=flat&label=NuGet)](https://www.nuget.org/packages/OrchardCore.Commerce/) [![Latest version of 'OrchardCore.Commerce' on Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/orchardcore/commerce/nuget/OrchardCore.Commerce/latest/xsp=True/?render=true&show_latest=true&style=flat&labelColor=gray&label=Cloudsmith)](https://cloudsmith.io/~orchardcore/repos/commerce/packages/detail/nuget/OrchardCore.Commerce/latest/xsp=True/) [![Crowdin](https://img.shields.io/badge/Crowdin-translations-lightgrey)](https://crowdin.com/project/orchard-core-commerce)

The commerce module for [Orchard Core](https://github.com/OrchardCMS/OrchardCore).

Expand Down Expand Up @@ -57,6 +57,17 @@ Check out the complete documentation portal here: <https://commerce.orchardcore.
- [User Features](docs/features/user-features.md)
- [Workflows](docs/features/workflows.md)

> [!NOTE]
> You can learn more about the translation and localization support for this project in the [OrchardCMS/OrchardCore.Commerce.Translations/](https://github.com/OrchardCMS/OrchardCore.Commerce.Translations/) repository.

## Contributing and support

Bug reports, feature requests, comments, questions, code contributions and love letters are warmly welcome. You can send them to us via GitHub issues, discussions, and pull requests. Please adhere to our [code of conduct](CODE-OF-CONDUCT.md) while doing so.

You can help translating this project to a language you know, via our [Crowdin project](https://crowdin.com/project/orchard-core-commerce). Check out the [Translations repository](https://github.com/OrchardCMS/OrchardCore.Commerce.Translations/) for more details about it.

This project is maintained by [Lombiq Technologies](https://lombiq.com/) with the help of community contributions by people like you.

## Demo video

[![Watch the video](https://img.youtube.com/vi/EVvwS1UaIk4/maxresdefault.jpg)](https://youtu.be/EVvwS1UaIk4)
7 changes: 6 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Orchard Core Commerce

[![OrchardCore.Commerce NuGet](https://img.shields.io/nuget/v/OrchardCore.Commerce?label=OrchardCore.Commerce)](https://www.nuget.org/packages/OrchardCore.Commerce/) [![Cloudsmith](https://api-prd.cloudsmith.io/badges/version/orchardcore/commerce/nuget/OrchardCore.Commerce/latest/x/?render=true&badge_token=gAAAAABey9hKFD_C-ZIpLvayS3HDsIjIorQluDs53KjIdlxoDz6Ntt1TzvMNJp7a_UWvQbsfN5nS7_0IbxCyqHZsjhmZP6cBkKforo-NqwrH5-E6QCrJ3D8%3D)](https://cloudsmith.io/~orchardcore/repos/commerce/packages/detail/nuget/OrchardCore.Commerce/latest/) [![Discord](https://img.shields.io/discord/551136772243980291?color=%237289DA&label=OrchardCore&logo=discord&logoColor=white&style=flat-square)](https://orchardcore.net/discord)
[![Discord](https://img.shields.io/discord/551136772243980291?color=%237289DA&label=Discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/rYHxgqU5) [![Latest version of 'OrchardCore.Commerce' on NuGet](https://img.shields.io/nuget/v/OrchardCore.Commerce?style=flat&label=NuGet)](https://www.nuget.org/packages/OrchardCore.Commerce/) [![Latest version of 'OrchardCore.Commerce' on Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/orchardcore/commerce/nuget/OrchardCore.Commerce/latest/xsp=True/?render=true&show_latest=true&style=flat&labelColor=gray&label=Cloudsmith)](https://cloudsmith.io/~orchardcore/repos/commerce/packages/detail/nuget/OrchardCore.Commerce/latest/xsp=True/) [![Crowdin](https://img.shields.io/badge/Crowdin-translations-lightgrey)](https://crowdin.com/project/orchard-core-commerce)

The commerce module for [Orchard Core](https://github.com/OrchardCMS/OrchardCore).

GitHub repositories for this project:

- [OrchardCore.Commerce](https://github.com/OrchardCMS/OrchardCore.Commerce): The code of OrchardCore.Commerce.
- [OrchardCore.Commerce.Translations](https://github.com/OrchardCMS/OrchardCore.Commerce.Translations): Localization and translation using Crowdin.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - Abstractions</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>Contains models and other abstractions that can be used by modules to extend OrchardCore Commerce.</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;abstraction</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - Address Data Type</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>New data type representing international addresses.</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Address;Postal</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - Content Fields</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>Commerce-specific content fields.</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Commerce;e-Commerce;ContentFields</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - Inventory</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>Inventory management for Orchard Core Commerce</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Commerce;e-Commerce;Inventory</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - Payment - Exactly</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>Exactly payment provider for Orchard Core Commerce</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Commerce;e-Commerce;Payment;Exactly</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - Payment - Stripe</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>Stripe payment provider for Orchard Core Commerce</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Commerce;e-Commerce;Payment;Stripe</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - Payment</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>Payment for Orchard Core Commerce</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Commerce;e-Commerce;Payment</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - Promotion</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>Taxation module for Orchard Core Commerce for discounts and promotions.</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Commerce;e-Commerce;Discounts;Promotions</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public TaxRateSettingsDisplayDriver(
[nameof(TaxRateSetting.DestinationProvince)] = T["State or province code"],
[nameof(TaxRateSetting.DestinationPostalCode)] = T["Postal code"],
[nameof(TaxRateSetting.DestinationRegion)] = T["Country or region code"],
[nameof(TaxRateSetting.VatNumber)] = T["Tax code"],
[nameof(TaxRateSetting.TaxCode)] = T["VAT number"],
[nameof(TaxRateSetting.VatNumber)] = T["VAT number"],
[nameof(TaxRateSetting.TaxCode)] = T["Tax code"],
[nameof(TaxRateSetting.TaxRate)] = T["Tax rate (%)"],
[nameof(TaxRateSetting.IsCorporation)] = T["Is Corporation"],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - Tax</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>Taxation module for Orchard Core Commerce for sales tax or VAT.</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Commerce;e-Commerce;Tax;Sales Tax;VAT</PackageTags>
Expand Down
3 changes: 2 additions & 1 deletion src/Modules/OrchardCore.Commerce/OrchardCore.Commerce.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>The commerce module for Orchard Core.</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Commerce;e-Commerce</PackageTags>
Expand All @@ -24,6 +24,7 @@
<None Include="License.md" Pack="true" PackagePath="" />
<None Include="..\..\..\Readme.md" />
<None Include="OrchardCoreIcon.png" Pack="true" PackagePath="" />
<None Include="buildTransitive/**" Pack="true" PackagePath="buildTransitive/" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"OrchardCore.Commerce.Payment.Exactly",
"OrchardCore.Commerce.Promotion",
"OrchardCore.Commerce.Inventory",
"OrchardCore.Commerce.Translations",

// Themes
"TheBlogTheme",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<label>@name @T["(Boolean product attribute)"]</label>
<ul>
<li class="hint">@T["Label: {0}", settings.Label]</li>
<li class="hint">@(settings.DefaultValue ? T["Default value: on"] : T["Default value: off"])</li>
<li class="hint">@T["Default value: {0}", settings.DefaultValue ? T["on"] : T["off"]]</li>
<li class="hint">@T["Hint: {0}", settings.Hint]</li>
</ul>
</fieldset>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<ItemGroup>
<PackageReference Include="Lombiq.Tests.UI.AppExtensions" />
<PackageReference Include="Lombiq.Tests.UI.Shortcuts" />
<PackageReference Include="OrchardCore.Commerce.Translations" />

<!-- The Orchard Core packages must override the version to target the latest patch version in this project. See the
Directory.Packages.props file for more details. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<PropertyGroup>
<Title>Orchard Core Commerce - UI Tests - Shortcuts</Title>
<Authors>Bertrand Le Roy</Authors>
<Authors>Orchard Core Community and Contributors</Authors>
<Copyright>Copyright © 2018 .NET Foundation</Copyright>
<Description>UI testing shortcuts for Orchard Core Commerce</Description>
<PackageTags>OrchardCore;OrchardCore.Commerce;Commerce;e-Commerce;UITesting</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Lombiq.Tests.UI.Attributes;
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Services;
using OpenQA.Selenium;
using Shouldly;
using Xunit;

namespace OrchardCore.Commerce.Tests.UI.Tests.BasicTests;

public class LocalizationTests : UITestBase
{
public LocalizationTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}

[Theory, Chrome]
public Task NuGetPackageWithLocalizationShouldApplyTranslatedText(Browser browser) =>
ExecuteTestAfterSetupAsync(
async context =>
{
const string cssTranslatedTextElement =
".content-product:has(a[href*='/testdiscountedproduct']) .field-name-discount-part-new-price strong";

// Switch to another language (Hungarian) in the admin.
await context.SignInDirectlyAndGoToAdminRelativeUrlAsync("/Settings/localization");
await context.ClickReliablyOnAsync(By.XPath("//tr[td[1]/span[contains(., 'en-US')]]//a[@title='Remove culture']"));
await context.ClickReliablyOnAsync(By.ClassName("save"));

// Verify that localized text is visible on the home page.
await context.GoToHomePageAsync();
context
.Get(By.CssSelector(cssTranslatedTextElement))
.GetTextTrimmed()
.ShouldBe("Kedvezményes ár adóval:");
Comment thread
Piedone marked this conversation as resolved.
},
browser);
}
Loading