Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Delegate Inflector.transliterate to i18n

#4508

The patch I'll attach after posting adds support for the new transliteration API in i18n.

The patch makes some small ancillary changes as well:

  • Move ActiveSupport::Multibyte::Chars#normalize into a class method; the current method invokes self.class so many times it seems appropriate to follow the pattern of many other methods in that class, and have the instance method simply delegate to a (more concise) class method.

  • Removes a now-unused UTF8_PAT constant; this is something I should have changed when I updated tidy_bytes a few weeks ago, but didn't notice at the time.

Reported by Norman Clarke · April 30th, 2010 @ 02:24 PM

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: none

Activity

  1. Norman Clarke
    Norman Clarke
    • Tag changed from activesupport, chars, multibyte to activesupport, chars, multibyte, patch

    Patch attached.

    In case it's useful for discussion, it's a rebase of the commits located here:

    http://github.com/norman/rails/tree/translit

    April 30th, 2010 @ 03:13 PM

  2. Repository
    Repository
    • State changed from new to resolved

    (from [f0e754e7136f92398495590908162b2501de5869]) Delegate Inflector.transliterate to i18n. [#4508 Delegate Inflector.transliterate to i18n state:resolved]

    Ancillary changes: Moved Chars#normalize into a class method; removed
    unused UTF_PAT constant.

    Signed-off-by: José Valim jose.valim@gmail.com
    http://github.com/rails/rails/commit/f0e754e7136f92398495590908162b...

    April 30th, 2010 @ 03:22 PM