Add ability to translate server rules (#34494)

This commit is contained in:
Claire 2025-05-21 13:54:12 +02:00 committed by GitHub
commit 8c51a8ba94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 149 additions and 20 deletions

View file

@ -18,10 +18,11 @@
%ol.rules-list
- @rules.each do |rule|
- translation = rule.translation_for(I18n.locale.to_s)
%li
%button{ type: 'button', aria: { expanded: 'false' } }
.rules-list__text= rule.text
.rules-list__hint= rule.hint
.rules-list__text= translation.text
.rules-list__hint= translation.hint
.stacked-actions
- accept_path = @invite_code.present? ? public_invite_url(invite_code: @invite_code, accept: @accept_token) : new_user_registration_path(accept: @accept_token)