-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Fix missing translation in pagination gap tags #24262
Fix missing translation in pagination gap tags #24262
Conversation
app/views/kaminari/_gap.html.haml
Outdated
per_page: number of items to fetch per page | ||
remote: data-remote | ||
%span.page.gap | ||
= sanitize t('pagination.truncate') |
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.
Why the sanitize
call?
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.
pagination.truncate
is already translated as …
in many locales.
If omit it, the gap will shown as "…".
mastodon/config/locales/ja.yml
Line 1360 in 0d70dee
truncate: "…" |
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, but sanitize
allows some of HTML tags...
Would it be better to call sanitize t('pagination.truncate'), tags: [], attributes: []
to disallow them?
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.
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Fix for #24261, where i18n of paginator's gap is fallbacks or displayed as translation missing error "Truncate".