A key limitation of the current locale implementation in core is that there is no way to mark translations as outdated.
With the node translation module, we have a system for marking translations as needing updating.
But with locale, there's no way to tell that a source string has changed, invalidating existing translations.
We introduced this for Drupal 6 in the i18n package, #355366: Mark translations as outdated when source string changes. That issue could be a starting place for a core patch.
Proposed approach: follow what's done in translation module. Introduce a new field to track translation status. When source strings are updated, mark existing translations as needing updating. When updates are registered to existing translations, mark the translations as updated.
In the UI, we would need a way of distinguishing which translations need updating. Maybe add a new css class to the existing language codes that show translation status in the interface translation search results.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | drupal.locale-outdated.patch | 1.81 KB | sun |
Comments
Comment #1
nedjoComment #2
jose reyero commented+1 for the feature, though making it postponed for now till we actually have that source strings that change
Comment #3
sunwell. I've tried to...
...but while trying, I do not understand that i18n patch at all. Source strings do not have revisions - if they change, then an entirely new source string is inserted into {locales_source}. So I do not understand when that form submit handler will ever have any effect.
I've also tried to think of tt(), but couldn't find a way that would make this approach work. Is i18n abusing the "location" column for tt() maybe?
Anyway, here is what I have - for starters.
Comment #5
sunComment #6
cosmicdreams commentedHello issue that was last commented on ~ 5 years ago. I was reading through the locale module in Drupal 8 today and found multiple references to translation status maintained and handled through the system.
I think it's safe to say that while this patch was not included into Drupal 8 the feature request was. Closing.