hyva-themes / magento2-react-checkout

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

re-exported default function (with same name) in i18n #183

Closed DanielRuf closed 3 years ago

DanielRuf commented 3 years ago

https://github.com/hyva-themes/magento2-hyva-checkout/blob/main/src/reactapp/src/i18n/index.js#L1

Either rename __.js to index.js (saves one extra file) or change the import to export __ from './__';

rajeev-k-tomy commented 3 years ago

@DanielRuf I like to keep it in this way. index.js is a common name and it does not disclose the purpose of the file explicitly. But __.js does it.

export __ from './__';

This change needs little timing of cleaning as we are currently importing the translation function like

import { __ } from 'i18n';

This reference would change to

import __ from 'i18n'

So we need to do this in a lot of places. So better we avoid it. We have many other important task to be completed :)