vendrhub / vendr-checkout

A ready made checkout flow for Vendr, the eCommerce solution for Umbraco v8+
https://vendr.net/add-ons/vendr-checkout/
MIT License
14 stars 17 forks source link

Use dictionary for all hardcoded strings in views #23

Closed JasonElkin closed 3 years ago

JasonElkin commented 3 years ago

This adds internationalisation to views by way of the Umbraco dictionary.

mattbrailsford commented 3 years ago

Looks really good. Thanks for doing the conversion 👍

mattbrailsford commented 3 years ago

Could probably do with checking to see if dictionary items can be used in email templates too

JasonElkin commented 3 years ago

Thanks @mattbrailsford

I'm pretty sure they can be used, if not by way of an Umbraco helper it's trivial to inject the factory. That said, I did have a look at the emails but I wasn't sure that it would work so well with dictionary items as in places they contain what I would consider "content", unlike the more straightforward UI strings in the checkout. The client I'm working with needs extra content in those emails too, and I imagine that's a common scenario.

As Vendr has a UI to change the email paths I'm currently opting to duplicate the email templates modify the razor directly.

JasonElkin commented 3 years ago

IMHO the best option would be to surface some RTEs in the Backoffice, with the ability to set placeholders, for the more "contenty" parts of the emails (like the below). Then could use the dictionary for the rest.

<p>
    There is a problem with your payment for order <strong>@Model.OrderNumber</strong>.
</p>
<p>
    Please contact us by replying to this email at your earliest convenience.
</p>
<p class="margin: 0;">
    Your order will not be shipped until this problem has been resolved.
</p>
mattbrailsford commented 3 years ago

Yea, I'll add it to me list to test. An yea, the email templates can be replaced so not as big a deal, but would still be nice to round them all off.

Thanks for sorting out the main templates though. I've already copied the updates to the v2 branch 👍

mattbrailsford commented 3 years ago

IMHO the best option would be to surface some RTEs in the Backoffice, with the ability to set placeholders, for the more "contenty" parts of the emails (like the below). Then could use the dictionary for the rest.

Yea, it's a shame the Umbraco Dictionary section can't handle more than just simple strings.