Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
i18n_string-integrate-i18n_string_object-into-l10n_client.patch | 1.64 KB | das-peter |
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedI 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?
Comment #2
Jose Reyero CreditAttribution: Jose Reyero commentedComment #3
das-peter CreditAttribution: das-peter commentedNothing change, i18n changed not l10n_client.
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.