Skip to content

Commit cb59bf7

Browse files
authored
(feat) update on hover state the the store icons on library (#1242)
* [FEAT] Add localization for library button and store tooltips in GameCard * [FEAT] Add localization for "Add to library" button and tooltips for store installations
1 parent a98744a commit cb59bf7

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

public/locales/en/gamepage.json

+9
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"yesCancel": "Yes, cancel"
6060
},
6161
"button": {
62+
"add_to_library": "Add to library",
6263
"cancel": "Pause/Cancel",
6364
"continue": "Continue Download",
6465
"details": "Details",
@@ -229,5 +230,13 @@
229230
"settings": "Settings",
230231
"store": "Store Page",
231232
"verify": "Verify and Repair"
233+
},
234+
"tooltip": {
235+
"installed_from_epic": "Installed from Epic Store",
236+
"installed_from_gog": "Installed from GOG Store",
237+
"installed_from_hyperplay": "Installed from HyperPlay Store",
238+
"will_install_from_epic": "Will install from Epic Store",
239+
"will_install_from_gog": "Will install from GOG Store",
240+
"will_install_from_hyperplay": "Will install from HyperPlay Store"
232241
}
233242
}

src/frontend/screens/Library/components/GameCard/index.tsx

+35-3
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,42 @@ const GameCard = ({
384384
alwaysShowInColor={allTilesInColor}
385385
store={runner}
386386
i18n={{
387+
addedToLibrary: t(
388+
'button.remove_from_library',
389+
'Remove from library'
390+
),
391+
notAddedToLibrary: t('button.add_to_library', 'Add to library'),
387392
logoTextTooltip: {
388-
hyperplay: { installed: 'HyperPlay', notInstalled: 'HyperPlay' },
389-
epic: { installed: 'Epic', notInstalled: 'Epic' },
390-
gog: { installed: 'GOG', notInstalled: 'GOG' }
393+
hyperplay: {
394+
installed: t(
395+
'tooltip.installed_from_hyperplay',
396+
'Installed from HyperPlay Store'
397+
),
398+
notInstalled: t(
399+
'tooltip.will_install_from_hyperplay',
400+
'Will install from HyperPlay Store'
401+
)
402+
},
403+
epic: {
404+
installed: t(
405+
'tooltip.installed_from_epic',
406+
'Installed from Epic Store'
407+
),
408+
notInstalled: t(
409+
'tooltip.will_install_from_epic',
410+
'Will install from Epic Store'
411+
)
412+
},
413+
gog: {
414+
installed: t(
415+
'tooltip.installed_from_gog',
416+
'Installed from GOG Store'
417+
),
418+
notInstalled: t(
419+
'tooltip.will_install_from_gog',
420+
'Will install from GOG Store'
421+
)
422+
}
391423
}
392424
}}
393425
/>

0 commit comments

Comments
 (0)