Giter Club home page Giter Club logo

Comments (5)

refactorthis avatar refactorthis commented on June 25, 2024

Thanks for taking the time to test out the new package. You can override all errors in your module config by a call to the xtformconfigprovider.setErrorMessages and providing each key and value. Can you not make the calls to gettext here?

from xtform.

ReinierGielen avatar ReinierGielen commented on June 25, 2024

I tried that, but unfortunatly the function I need to inject is a service and you can not inject a service in a config.
But I'll look for an alternative solution.

from xtform.

ReinierGielen avatar ReinierGielen commented on June 25, 2024

I managed to get a translation with the following statement:
msg-required="{{'required'|translate}}"

The disadvantage of course is that I need to add this to every input field.

from xtform.

refactorthis avatar refactorthis commented on June 25, 2024

Ah right, I guess I could make a change so that setErrorMessages() can be
called from the service as well as the provider.

On Mon, Jan 19, 2015 at 10:45 PM, ReinierGielen [email protected]
wrote:

I managed to get a translation with the following statement:
msg-required="{{'required'|translate}}"

The disadvantage of course is that I need to add this to every input field.


Reply to this email directly or view it on GitHub
#25 (comment).

from xtform.

idreeshaddad avatar idreeshaddad commented on June 25, 2024

I'm using the famous angular-translate and I'm also adding the translation filter to each field individually.

+1 for setErrorMessages() on a service level.

from xtform.

Related Issues (20)

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.