volto icon indicating copy to clipboard operation
volto copied to clipboard

i18n for EventDatesInfo

Open mbarde opened this issue 2 years ago • 5 comments

to fix https://github.com/plone/volto/issues/3438

mbarde avatar Jul 04 '22 13:07 mbarde

Deploy Preview for volto canceled.

Name Link
Latest commit 80173685e3fe76956daf1395b0e3431a9cb0f24d
Latest deploy log https://app.netlify.com/sites/volto/deploys/62c2ea1c0dc0230008ff221d

netlify[bot] avatar Jul 04 '22 13:07 netlify[bot]

@mbarde you need to sign the Plone Contributor Agreement in order to merge this pull request.

Learn about the Plone Contributor Agreement: http://docs.plone.org/develop/coredev/docs/contributors_agreement_explained.html

mister-roboto avatar Jul 04 '22 13:07 mister-roboto

I think that this suggestion does not work. I think that we need something with parameters like in Classic UI:

https://github.com/collective/plone.app.locales/blob/master/plone/app/locales/locales/plone.pot#L8866-L8883

erral avatar Jul 04 '22 13:07 erral

@mbarde Yes, we need a full message with params, as @erral is suggesting.

See the example in the docs:

function () {
  const messages = defineMessages({
    greeting: {
      id: 'app.greeting',
      defaultMessage: 'Hello, {name}!',
      description: 'Greeting to welcome the user to the app',
    },
  })

  return intl.formatMessage(messages.greeting, {name: <b>Eric</b>})
}

at https://formatjs.io/docs/react-intl/api/#formatmessage

tiberiuichim avatar Jul 04 '22 15:07 tiberiuichim

Last week I tried unsuccessfully to build such messages trying to keep existing HTML, but it should be possible like @tiberiuichim suggests

erral avatar Jul 04 '22 15:07 erral