Skip to content

Commit 44c4269

Browse files
Make actions_font_family_no_default and content_font_family_no_default more translation-friendly (#3880)
* Make actions_font_family_no_default and content_font_family_no_default more translation-friendly * Use new i18n keys
1 parent 6aee91e commit 44c4269

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

public/locales/en/translation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"accessibility": {
3-
"actions_font_family_no_default": "Actions Font Family (Default):",
3+
"actions_font_family_default": "Actions Font Family (Default: {{fontFamily}})",
44
"all_tiles_in_color": "Show all game tiles in color",
5-
"content_font_family_no_default": "Content Font Family (Default: ",
5+
"content_font_family_default": "Content Font Family (Default: {{fontFamily}})",
66
"disable_dialog_backdrop_close": "Disable closing dialogs by clicking outside",
77
"fonts": "Fonts",
88
"title": "Accessibility",

src/frontend/screens/Accessibility/index.tsx

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,11 @@ export default React.memo(function Accessibility() {
163163
htmlId="content-font-family"
164164
value={contentFont}
165165
onChange={handleContentFontFamily}
166-
label={
167-
t(
168-
'accessibility.content_font_family_no_default',
169-
'Content Font Family (Default: '
170-
) +
171-
defaultSecondaryFont.split(',')[0].trim() +
172-
')'
173-
}
166+
label={t(
167+
'accessibility.content_font_family_default',
168+
'Content Font Family (Default: {{fontFamily}})',
169+
{ fontFamily: defaultSecondaryFont.split(',')[0].trim() }
170+
)}
174171
>
175172
{options}
176173
</SelectField>
@@ -179,14 +176,11 @@ export default React.memo(function Accessibility() {
179176
htmlId="actions-font-family"
180177
value={actionFont}
181178
onChange={handleActionsFontFamily}
182-
label={
183-
t(
184-
'accessibility.actions_font_family_no_default',
185-
'Actions Font Family (Default: '
186-
) +
187-
defaultPrimaryFont.split(',')[0].trim() +
188-
')'
189-
}
179+
label={t(
180+
'accessibility.actions_font_family_default',
181+
'Actions Font Family (Default: {{fontFamily}})',
182+
{ fontFamily: defaultPrimaryFont.split(',')[0].trim() }
183+
)}
190184
>
191185
{options}
192186
</SelectField>

0 commit comments

Comments
 (0)