A tooltip nobody could translate, in two places - #778
Merged
Merged
Conversation
Bootstrap does not show `title`. On init it moves the title into data-original-title and empties the real attribute, and markup that sets data-original-title itself wins outright. So data-t-title on one of those elements changed an attribute nothing displays, and the tooltip went on saying the English in every language. It rendered perfectly, which is why it survived. Same shape as the requests dock, where a local t() helper hid fourteen words from the scanner: a translation that silently does nothing looks exactly like one that works. Two elements were in that state, and the collector could not see either. It reads the English out of `title`, which these do not carry, so lang_ai_describe_hint was counted as used and never given any English to translate - the one key the tool has been reporting as unanswered. apply() now also writes the attribute the tooltip reads, restore() puts it back, the collector looks in data-original-title, and the missing words are in all seventeen packs. English answers 3,370 of 3,370 keys for the first time. 218 other data-t-title elements carry a plain title and were always fine.
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The coverage tool has been reporting one key the interface uses and English cannot answer. Chasing it found the reason, and the reason is worse than the key.
Bootstrap does not show
titleOn init it moves the title into
data-original-titleand empties the real attribute, and markup that setsdata-original-titleitself wins outright.apply()translatedtitle:So on a tooltip element that changed an attribute nothing displays, and the tooltip went on saying the English in every language. It rendered perfectly, which is why it survived. Same shape as the requests dock, where a local
t()helper hid fourteen words from the scanner: a translation that silently does nothing looks exactly like one that works.Two elements were in that state:
The other 218
data-t-titleelements carry a plaintitleand were always fine, so this is a narrow bug rather than a class-wide one. Worth saying, since the first thing I did was assume otherwise.And the collector could not see them either
i18n-coverage.jsreads the English out oftitle, falling back todata-titlefor select2. Neither exists on a Bootstrap tooltip, solang_ai_describe_hintwas collected as used and never given any English to translate - which is exactly the key the tool has been reporting. One extra fallback and--write-englishpicked it up immediately:English now answers 3,370 of 3,370 keys for the first time.
What changed
apply()also writesdata-original-titlewhen the element has one, keeping the English underdata-en-original-title;restore()puts it back.titleis still set too, because an element can be hovered before Bootstrap has initialised it and the browser's own tooltip reads that one.data-original-titlefor atitlekey.lang_ai_describe_hintadded to English and translated into all 17 packs.Checks
frontend/publicbuilt, which CI does