Updated: Comment #N

Problem/Motivation

While i18n_string_translate() integrates with the Localization client the translation code in i18n_string_object doesn't

Proposed resolution

Add a similar function like i18n_string_l10n_client_add() to i18n_string_object and use it whenever a translation is requested.

Remaining tasks

Reviews needed.

User interface changes

None.

API changes

None, well an addition: i18n_string_object::l10n_client_add() but that shouldn't break anything and is only used internally.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jose Reyero’s picture

I don't know what changed in i18n_client, and that solution may work. However, we better keep integration code out of the class code, couldn't it be a plain module funciont like it was before?

Jose Reyero’s picture

Status: Needs review » Needs work
das-peter’s picture

I don't know what changed in i18n_client...

Nothing change, i18n changed not l10n_client.

we better keep integration code out of the class code, couldn't it be a plain module function like it was before?

The procedural integration code wasn't really compatible to the OO code thus I "duplicated" it into the i18n_string_object.
However, we probably could refactor / abstract the procedural code to be re-usable for the OO code. But that would be more changes and we've to make sure not to break any API.