Giter Club home page Giter Club logo

Comments (3)

sitozzz avatar sitozzz commented on August 23, 2024

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

from condo.

SavelevMatthew avatar SavelevMatthew commented on August 23, 2024

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
})

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

from condo.

paulo-rossy avatar paulo-rossy commented on August 23, 2024

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?

from condo.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.