Open paulo-rossy opened 4 months ago
Hi there, that's good suggestion. I suppose we'll do this in one of the upcoming releases
Hi. I'm trying to adopt your project to ES language.
At the moment your translations have a hardcoded
doma.ai
name.Can you mode it to some config? or use something like
{{ SITE_NAME }}
or something similar for that?At the moment I've created a custom translation loader function with replace logic. I've replace everything related to
doma.ai
. But it looks a little hacky.
Hi there! That's a good suggestion, so I think we'll do this in one of the upcoming releases
Hi, please clarify, are we talking about translations? If yes, you can use a separate translation for the company name and use intl + values in the translation lines where it is present.
Something like this:
{
"company.name": "My Cool Company",
"company.shortName": "Company",
"company.domain": "company.com",
"some.translation.with.company": "Thanks for visiting {companyName}!"
}
const intl = useIntl()
const CompanyTitle = intl.formatMessage({ id: 'company.name' })
const MyMessage = intl.formatMessage({ id: 'some.translation.with.company' }, {
companyName: CompanyTitle
})
Yes, I can create own translations. But I want to pull changes from your repo from time to time.
It's better to move company name and company url to ENV or config.
What do you think?
Hi. I'm trying to adopt your project to ES language.
At the moment your translations have a hardcoded
doma.ai
name.Can you mode it to some config? or use something like
{{ SITE_NAME }}
or something similar for that?At the moment I've created a custom translation loader function with replace logic. I've replace everything related to
doma.ai
. But it looks a little hacky.