Skip to content

Commit

Permalink
Make actions_font_family_no_default and content_font_family_no_defaul…
Browse files Browse the repository at this point in the history
…t more translation-friendly (#3880)

* Make actions_font_family_no_default and content_font_family_no_default more translation-friendly

* Use new i18n keys
  • Loading branch information
jjanuszkiewicz authored Nov 1, 2024
1 parent 6aee91e commit 44c4269
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
4 changes: 2 additions & 2 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"accessibility": {
"actions_font_family_no_default": "Actions Font Family (Default):",
"actions_font_family_default": "Actions Font Family (Default: {{fontFamily}})",
"all_tiles_in_color": "Show all game tiles in color",
"content_font_family_no_default": "Content Font Family (Default: ",
"content_font_family_default": "Content Font Family (Default: {{fontFamily}})",
"disable_dialog_backdrop_close": "Disable closing dialogs by clicking outside",
"fonts": "Fonts",
"title": "Accessibility",
Expand Down
26 changes: 10 additions & 16 deletions src/frontend/screens/Accessibility/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,11 @@ export default React.memo(function Accessibility() {
htmlId="content-font-family"
value={contentFont}
onChange={handleContentFontFamily}
label={
t(
'accessibility.content_font_family_no_default',
'Content Font Family (Default: '
) +
defaultSecondaryFont.split(',')[0].trim() +
')'
}
label={t(
'accessibility.content_font_family_default',
'Content Font Family (Default: {{fontFamily}})',
{ fontFamily: defaultSecondaryFont.split(',')[0].trim() }
)}
>
{options}
</SelectField>
Expand All @@ -179,14 +176,11 @@ export default React.memo(function Accessibility() {
htmlId="actions-font-family"
value={actionFont}
onChange={handleActionsFontFamily}
label={
t(
'accessibility.actions_font_family_no_default',
'Actions Font Family (Default: '
) +
defaultPrimaryFont.split(',')[0].trim() +
')'
}
label={t(
'accessibility.actions_font_family_default',
'Actions Font Family (Default: {{fontFamily}})',
{ fontFamily: defaultPrimaryFont.split(',')[0].trim() }
)}
>
{options}
</SelectField>
Expand Down

0 comments on commit 44c4269

Please sign in to comment.