Giter Club home page Giter Club logo

Comments (7)

JasonBarnabe avatar JasonBarnabe commented on July 16, 2024

This repo's English strings are a copy of devise's English strings. Strings in other languages should say the same thing as the English strings, unless there's a good, language-specific reason not to.

from devise-i18n.

alphabt avatar alphabt commented on July 16, 2024

Could you clarify by "should say the same thing as the English strings"? Did you mean other languages should also display the English version of the strings?

from devise-i18n.

alphabt avatar alphabt commented on July 16, 2024

If I use devise-i18n without adding my customized zh-TW yaml, when I failed to login the flash message will show translation missing: zh-TW.devise.failure.sales_user.not_found_in_database.

But if I add a devise.views.zh-tw.yml and fill in a string for key not_found_in_database, then the flash will properly display the string.

Does this mean we should not have empty keys for translations in the gem?

from devise-i18n.

JasonBarnabe avatar JasonBarnabe commented on July 16, 2024

Could you clarify by "should say the same thing as the English strings"?

The meaning of the message should be the same in all languages, unless there is a reason for them not to be.

If I use devise-i18n without adding my customized zh-TW yaml, when I failed to login the flash message will show translation missing: zh-TW.devise.failure.sales_user.not_found_in_database.

Some languages are not complete in this project. If you want to contribute translations they would be very welcome. Short of doing that, your options are:

  • Defining a custom file, like you did.
  • Defining a fallback language, so that the messages show in e.g. English if they are not available in your chosen language.
  • Live with the missing translations.

from devise-i18n.

alphabt avatar alphabt commented on July 16, 2024

Gotcha. I've contributed to the zh-TW translations for these two strings on localeapp. Would be great to see them in the next pull 😃

from devise-i18n.

JasonBarnabe avatar JasonBarnabe commented on July 16, 2024

Done in ed81f29. 謝謝!

from devise-i18n.

alphabt avatar alphabt commented on July 16, 2024

Thanks!

from devise-i18n.

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.