milesj/utility — pull request #27 by redd (2014-04-04 10:17:59+00:00)
Title: Handle fields using TranslateBehavior and being edited in multiple locales at once

This is bigger Sluggable refactor to support generating slugs while using Cake core's TranslateBehavior and editing record in multiple locales at once with inputs like:
Category.name.eng
Category.name.deu
Category.name.pol

There is only a few changes everything else is only formatting (sorry fot that).

What have been changed?
1. New method _processSlug() that is just pulled out some of logic from beforeSave() callback to not DRY with translated array fields
2. Totally refactored _makeUnique() because when using TranslateBehavior you can't simply operate on SQL likes because of I18n model. So I decided to work on strings.

That's all, nothing else changed, just I said it's only formatting.