New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

704: Alternate add glossary tooltips after editing a row. #716

Merged
merged 5 commits into from Jul 6, 2017

Conversation

Projects
None yet
2 participants
@toolstack
Contributor

toolstack commented May 9, 2017

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.

@toolstack toolstack requested a review from ocean90 May 9, 2017

@toolstack toolstack changed the title from 704: Add glossary tooltips after editing a row. to 704: Alternate add glossary tooltips after editing a row. May 9, 2017

@toolstack toolstack added this to the 2.4 milestone May 9, 2017

@toolstack toolstack added the bug label May 9, 2017

@ocean90

Two minor things: sort_glossary_entries_terms() should be prefixed and two cases of a missing space between if and (.

@ocean90

This comment has been minimized.

Show comment
Hide comment
@ocean90

ocean90 Jun 27, 2017

Member

PR needs an updates to solve the conflict in gp-templates/helper-functions.php.

Member

ocean90 commented Jun 27, 2017

PR needs an updates to solve the conflict in gp-templates/helper-functions.php.

@toolstack toolstack merged commit 73696c2 into develop Jul 6, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@toolstack toolstack deleted the 704-alternate-missing-glossary-tooltip branch Jul 6, 2017

@toolstack toolstack modified the milestones: 3.0, 2.4 Aug 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment