- Issue created by @huzooka
The motivation of this ticket is to delete those locales_source records which belong to a removed Javascript location.
In locales_source, we have only one record for a specific string and context, but locales_location seems to record all occurrences of the same string - context pair.
Of course, in context of locale (interface) translations, items are recorded at the time when they are piped through a t
(or formatPlural
) function.
So, it can happen that we remove a string and a translation which was only used by a JS (which was removed), but later on a user visits a page which backend also need that string. My proposal is to delete only those sources which have no translation in one language at least.
In Babel's JavaScript alter hook, we are trying to remove unused JS records but we still not have the right functionality.
The initial idea:
Testing idea: after a short search I found out that e.g, the "Close" string is translated quite widely on Drupal UI, and it is also translated by JS of the Contextual module. So to testing out the functionality, maybe we can benefit from this situation:
Nothing.
Nothing.
Nothing.
Active
1.0
Code