704: Alternate add glossary tooltips after editing a row. #716
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an alternate solution to #704.
This splits the previous
map_glossary_entries_to_translations_originals()
function in two:map_glossary_entries_to_translation_originals()
sort_glossary_entries_terms()
And adds an additional parameter to allow for the entries_terms to be passed in so they can be processed once when generating the full translation page instead of per row that would otherwise be required.
sort_glossary_entries_terms()
is called either in the translations template or the translations-row template as required.Then
map_glossary_entries_to_translation_originals()
is called in the translations-row template to allow for the glossary terms to be marked up from either the main translations page or via the ajax call to the translations-row entry.If we were to be concerned for backwards compatibility with modified template files, we could add a shim to put
map_glossary_entries_to_translations_originals()
back in the helper file.Resolves #704.