Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array locale #1

Open
imagine10255 opened this issue Jun 23, 2023 · 0 comments
Open

Array locale #1

imagine10255 opened this issue Jun 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@imagine10255
Copy link
Member

The description field needs to be hard-coded. When doing multi-lingual at the front end, the dictionary file can only be processed in the way of 1, 2, and 3. I don’t know if it can be taken out as an array

<DescUl>
    {Array.from({length: 3}).map((row, index) => {
        return <li>
            {
                i18n(`viewModal.checkIn.desc${index}`, {args: {
                        checkInGiftDepositMaxDays: setting?.checkInGiftDepositMaxDays ?? 0,
                        checkInGiftMinValidBet: setting?.checkInGiftMinValidBet ?? 0,
                    }})
            }
        </li>
    })}
</DescUl>

If this method is used, the parameter will be invalid

{
'viewModal.checkIn.desc': `
       <li>需連續簽到七天,只要未簽到,隔天重新算起</li>
        <li>{:checkInGiftMinValidBet}天內須儲值一次</li>
        <li>7天需累計14,000</li>`,
}

 <DescUl dangerouslySetInnerHTML={{__html: i18n('viewModal.checkIn.desc', {args: {
          checkInGiftDepositMaxDays: setting?.checkInGiftDepositMaxDays ?? 0,
          checkInGiftMinValidBet: setting?.checkInGiftMinValidBet ?? 0,
  }})}}/>
@imagine10255 imagine10255 added the enhancement New feature or request label Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant