hyva-themes / magento2-react-checkout

Highly Customizable Checkout for Magento 2, Built with React.
BSD 3-Clause "New" or "Revised" License
178 stars 53 forks source link

add missing default translation strings #237

Closed Morgy93 closed 2 years ago

Morgy93 commented 2 years ago

Hello,

this adds some missing default translation strings:

rajeev-k-tomy commented 2 years ago

Looks good. But, it would be good if we update src/i18n/en_US.csv and src/i18n/de_DE.csv too with these strings if they are not present.

rajeev-k-tomy commented 2 years ago

Also, target the PR to 1.0.0-rc branch instead of main branch. Main branch is locked for the time being and all the updates must be now targetted to 1.0.0-rc as you can see in other PRs.

Morgy93 commented 2 years ago

Looks good. But, it would be good if we update src/i18n/en_US.csv and src/i18n/de_DE.csv too with these strings if they are not present.

I did not know that the csv files are back again.

So we need to maintain translations at two different places now? Is this intended? Can you point me to any news for this?

rajeev-k-tomy commented 2 years ago

@Morgy93 src/i18n adds translations to Magento. It is the standard way a module introduces its own translation strings to the Magento application.

The initial approach was the JSON approach where the translations are used directly inside the react application. But the approach changed later and now, we are using Magento template translations. So basically, to add translations, we have two steps

  1. Update src/i18n/<locale>.csv files.
  2. Update the layout update xml file.

More details you can find in the doc: https://hyva-themes.github.io/magento2-hyva-checkout/i18n/