Needs review
Project:
Translation Management Tool
Version:
7.x-1.x-dev
Component:
Source: I18N Strings
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 May 2013 at 21:32 UTC
Updated:
4 Aug 2016 at 23:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
miro_dietikerDuplicated by #2040333: Generic locale source
Comment #2
owen barton commentedI have a need for this - specifically I am using the i18n_panels sandbox (and related patches), but display titles come through (I think) as simple strings with no wrapper class and since tmgmt doesn't handle them fail due to "zero words". I spent a bit of time digging through i18n_string, i18n_panels and tmgmt trying to work out where/how to best add this, but didn't find anything I felt was the right place.
@miro_dietiker - if you are able to outline what needs to happen here, I may be able to implement this. Alternatively, if you have a patch, I am happy to help test.
Comment #3
berdirHm.
What we have now is:
tmgmt_locale.module: Hardcoded to the default textgroup.
tmgmt_i18n_string.module: Only considers textgroups that are defined as i18n objects.
So we are missing the things that fall between the two.
It might be easier to extend tmgmt_locale to support those, I'm not 100% sure right now. Depends on wether these strings still have some i18n related information somewhere that we need.
Either one of those two needs to provide a separate source type that contains a query that is similar to tmgmt_i18n_string_get_strings()/TMGMTLocaleSourceUIController::getStrings() but does the opposite. Exclude all known textgroups from i18n objects and default too.
Comment #4
leksat commentedTo quickly allow translation of other textgroups, I used the following code:
Is this a correct approach?
Comment #5
leksat commentedMy suggestion from #4 is not correct.
Currently we have the following code to deal with i18n_panels and webform_localization modules:
Can't we put this code in the TMGMT module?
Comment #6
leksat commentedWe've been using the code from #5 for quite some time on 4 production projects and it works just great.
Converted this to a patch.
I think this approach is the only way to fix the situation for D7.
Comment #7
berdirFine with adding workarounds if that helps.
However, we don't need to implement our own hook, especially not in the base module :)
Just put this logic directly into tmgmt_i18n_string:)
Comment #8
berdirSee also #2639852: TMGMT API does not play nice with i18nviews and i18n_panels. According to the patch author there, that patch should fix this too and seems less specific. Can you test the patch and confirm that it works so we can commit it?
Comment #9
leksat commentedChecked the patch from #2639852: TMGMT API does not play nice with i18nviews and i18n_panels. It makes sense.
And I finally realized what the current issue for :)
Attached patch makes tmgmt_locale handle all text groups that are not handled by the tmgmt_i18n_string (for example, webform).
Comment #10
leksat commentedComment #11
leksat commentedOne thing I did not take into account in #9 patch is that strings coming from i18n_string can have the source language different from "en".
Comment #12
charlesj commented#6 works for me.
D7.41 / PHP 5.5 / MySQL 5.6