-
Notifications
You must be signed in to change notification settings - Fork 0
Core 1376 actionable link desc #424
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
Conversation
…-1376-actionable-link-desc
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #424 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 219 219
Lines 3706 3719 +13
=========================================
+ Hits 3706 3719 +13
🚀 New features to boost your workflow:
|
If the locales directory is missing, we still want to have the backend available
a3f6376 to
79b551f
Compare
jivey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good just a couple of questions
| chapter.non_introduction_pages.map do |page| | ||
| number = page.os_number(options[:numbering_options]) | ||
| title_text = page.title_children.map(&:text).join(' ') | ||
| label = I18n.t(:section_link_desc, link_text: "#{number} #{title_text}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see section_link_desc added to Spanish and Polish locales, but not the English locale, is that a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's why you see "Translation missing: en.section_link_desc" in the expected output. Oops 🤦.
| end | ||
|
|
||
| I18n.translate(:generic_link_desc, link_text: text) | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these raise if not found, in case they get renamed/removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will add something like "Translation missing: en.generic_link_desc".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, if this gem works the same as what I recall about Rails, you have to tell it to raise. I was thinking it could be hard to tell because it won't show up visually rendered. But I might be over worrying.
https://openstax.atlassian.net/browse/CORE-1376
Adds specific phrases for tables/figures/etc. and a catch-all default (in post bake) for when
aria-labelis missing.