widgets: Rename confusing variable name in tabbed_instructions.ts.

The `tabbed_instructions` widget used for both language toggles in our
API documentation and app toggles in our Help Center documentation
misleadingly calls the identifier for the tab `language` in local
variables and its interface.

- Renames local variables `language` -> `tab_key`.
- Renames HTML data attributes `data-language` -> `data-tab-key`.

Fixes #24669.
This commit is contained in:
David Rosa
2023-06-21 20:38:17 -05:00
committed by Tim Abbott
parent ec4bfd7c78
commit 0e0512df92
4 changed files with 24 additions and 24 deletions

View File

@@ -27,11 +27,11 @@ NAV_BAR_TEMPLATE = """
""".strip()
NAV_LIST_ITEM_TEMPLATE = """
<li data-language="{data_language}" tabindex="0">{label}</li>
<li data-tab-key="{data_language}" tabindex="0">{label}</li>
""".strip()
DIV_TAB_CONTENT_TEMPLATE = """
<div data-language="{data_language}" markdown="1">
<div data-tab-key="{data_language}" markdown="1">
{content}
</div>
""".strip()