Git Product home page Git Product logo

i18n-inflector's People

Contributors

jhass avatar siefca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

morr

i18n-inflector's Issues

Problem with char @

There is a problem with the gem when you retrieve some text from a database that contains the char "@" and you have some code after that uses @{f:whatever|whenever}.

For example:

body:
     %{discount_details}
     Ya hemos informado a tus @{f:amigas|amigos} del plan

     discount_details: |
         descuento: %{coupon_discount} (%{coupon_description})

If coupon_description value is "Gracias amig@s míos" the output of body will be:
Gracias amigamigas del plan when it should be Gracias amig@s míos Ya hemos informado a tus amigos del plan

I fixed my problem with a subsitution from @ to @ but its just a quickfix. Would be perfect if you could fix it the right way. Thanks in advance

Can't install on ubuntu server when locale is not set. (ruby 1.9.2 only)

smei@ContinuousIntegration$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

smei@ContinuousIntegration$ rvm use ruby-1.9.2@diaspora

smei@ContinuousIntegration$ gem install i18n-inflector
ERROR:  While executing gem ... (ArgumentError)
    invalid byte sequence in US-ASCII

smei@ContinuousIntegration$ sudo update-locale
# this creates /etc/default/locale, which did not exist before.

smei@ContinuousIntegration$ sudo vi /etc/default/locale
# add:
LANG="en_US.UTF-8"
# log out, log back in


smei@ContinuousIntegration$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

smei@ContinuousIntegration$ rvm use ruby-1.9.2@diaspora

smei@ContinuousIntegration$ gem install i18n-inflector
Installing gem i18n-inflector-2.5.1
Successfully installed i18n-inflector-2.5.1
1 gem installed

It doen not inflect translations containing only the pattern as a string

Inflector has problem with translation data that contains just a pattern, without any other characters or translation data that begins with a pattern. Example

welcome: "@{i:Me|you:You}"

translate('welcome') will result in "@{i:Me|you:You}" without any interpolation or string cleaning.

That happens in version 1.0.6 and earlier revisions.

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.