Skip to content

Provide option to link to TW word definitions online. Closes #321 - #322

Merged
PurpleGuitar merged 3 commits into
WycliffeAssociates:doc-dev.walink.orgfrom
linearcombination:link-tw-defs-online-option
Jul 10, 2026
Merged

Provide option to link to TW word definitions online. Closes #321#322
PurpleGuitar merged 3 commits into
WycliffeAssociates:doc-dev.walink.orgfrom
linearcombination:link-tw-defs-online-option

Conversation

@linearcombination

Copy link
Copy Markdown
Contributor

WIth this PR, online translation word definitions, at BIEL, are linked from each chapter's list of translation words (in the generated document) rather than including TW word definitions in generated documents.

Please note: The linking does not happen at the individual word level, but rather opens BIEL to the language's TW page which features a drop down to select which specific word. Why? At first we tried to implement per word direct links (for the basic case it works), but there were inconsistencies in how BIEL generates HTML IDs for each word in a way that made it not tractable within budget. It is presumed that the current implementation (in this update), because BIEL offers the dropdown, will suffice. A change back to including translation word definitions in the generated document is still possible if this ever were to change requirements as it is controlled by a program configuration variable.

…Associates#321

By default this is now True rather than including TW word definitions
in generated documents.
)
+ "</ul>",
is_rtl=is_rtl,
use_section_visual_separator=False,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were these lines deleted on purpose? It seems like we would still need them if link_rather_than_include_tw_definitions is reset to false at some point in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that, unintentional. I did a bit of clean up too.

Comment thread backend/doc/utils/tw_utils.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears this is a <ul> element containing <span> elements. Usually <ul> should contain <li> elements -- consider wrapping the <span>...</span> in <li>...</li>.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this catch too, I did a bit of clean up too.

…S is False

Fixed issue raised in code review. Also clean up code a bit to remove
magic strings
@PurpleGuitar
PurpleGuitar merged commit 7aec71f into WycliffeAssociates:doc-dev.walink.org Jul 10, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in DOC Project Management Jul 10, 2026
@linearcombination
linearcombination deleted the link-tw-defs-online-option branch July 28, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants