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

Improving checkout translations #30

Open callumbwhyte opened 2 years ago

callumbwhyte commented 2 years ago

Fixing a couple of issues reported by a client with Vendr Checkout translations.

  1. As the master template prevents property model errors from being rendered (@Html.ValidationSummary(true)) the invalid discount code message just displayed an empty box - I have set the property to an empty string for this error message

  2. Upon fixing the invalid discount code message we discovered it wasn't translatable via a dictionary value - I have added a VendrCheckout.Information.InvalidDiscountGiftCode dictionary key that can be used to override the default

  3. The default values for the prev / next buttons did not include the step name - the {0} placeholder had been missed off the dictionary fallback value. I see this was recently fixed in d732121 for Vendr Checkout V2.

  4. The step name in the prev / next buttons usually has a capital letter at the start, given as it is a node name. This looks a bit odd, e.g. "Continue to Shipping method", so I have .ToLower()'d step names for a more natural read.

I appreciate this PR is targeted to Vendr Checkout V1, simply because this is what affects our client. It should be easy to merge these changes up to Vendr Checkout V2 also!