Use more generic locale as fallback for rules (#34756)

This commit is contained in:
Claire 2025-05-21 18:22:54 +02:00 committed by GitHub
parent 97b9e8849d
commit 6ab96ba647
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 4 deletions

View file

@ -51,7 +51,7 @@ class Rules extends PureComponent {
value={item.get('id')}
checked={selectedRuleIds.includes(item.get('id'))}
onToggle={this.handleRulesToggle}
label={item.getIn(['translations', locale, 'text']) || item.get('text')}
label={item.getIn(['translations', locale, 'text']) || item.getIn(['translations', locale.split('-')[0], 'text']) || item.get('text')}
multiple
/>
))}