Skip to content
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

@toolstack
Copy link
Contributor

@toolstack 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 704: Add glossary tooltips after editing a row. 704: Alternate add glossary tooltips after editing a row. May 9, 2017
@toolstack toolstack added this to the 2.4 milestone May 9, 2017
Copy link
Member

@ocean90 ocean90 left a comment

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

@ocean90
Copy link
Member

@ocean90 ocean90 commented Jun 27, 2017

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

@toolstack toolstack force-pushed the 704-alternate-missing-glossary-tooltip branch from a5beffb to 71b1a31 Jun 27, 2017
Minior formatting updates as well.
@toolstack toolstack force-pushed the 704-alternate-missing-glossary-tooltip branch from 2787f5f to e705e3b Jun 27, 2017
@toolstack toolstack merged commit 73696c2 into develop Jul 6, 2017
2 checks passed
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants