Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(frontend): Rename dAppname to dAppName #3228

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/frontend/src/lib/components/dapps/DappCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
import { replacePlaceholders } from '$lib/utils/i18n.utils';

export let dAppDescription: OisyDappDescription;
$: ({ name, logo, oneLiner, tags } = dAppDescription);
$: ({ name: dAppName, logo, oneLiner, tags } = dAppDescription);
</script>

<button
aria-label={replacePlaceholders($i18n.dapps.alt.learn_more, { $dAppname: name })}
aria-label={replacePlaceholders($i18n.dapps.alt.learn_more, { $dAppName: dAppName })}
on:click
class="relative h-44 flex-1 rounded-lg bg-white p-4 pt-12 shadow md:h-60"
>
<span class="absolute -top-5 left-4">
<Logo
src={logo}
alt={replacePlaceholders($i18n.dapps.alt.logo, { $dAppname: name })}
alt={replacePlaceholders($i18n.dapps.alt.logo, { $dAppName: dAppName })}
size="xl"
ring
color="white"
/>
</span>
<article class="flex h-full flex-col justify-between gap-y-4 md:gap-y-2">
<section>
<p class="m-0 text-start text-lg font-semibold">{name}</p>
<p class="m-0 text-start text-lg font-semibold">{dAppName}</p>
<p
title={oneLiner}
class="m-0 mt-2 line-clamp-2 text-ellipsis text-start text-xs text-misty-rose md:line-clamp-4"
Expand All @@ -34,7 +34,7 @@
</p>
</section>
<section>
<DappTags dAppName={name} {tags} />
<DappTags {dAppName} {tags} />
</section>
</article>
</button>
26 changes: 13 additions & 13 deletions src/frontend/src/lib/components/dapps/DappModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
twitter,
github,
tags,
name,
name: dAppName,
description,
logo,
callToAction,
Expand All @@ -42,7 +42,7 @@

<Modal on:nnsClose={modalStore.close}>
<svelte:fragment slot="title">
<span class="text-center text-xl">{name}</span>
<span class="text-center text-xl">{dAppName}</span>
</svelte:fragment>

<div class="flex flex-col gap-4">
Expand All @@ -53,7 +53,7 @@
height="100%"
width="100%"
src={screenshots[0]}
alt={replacePlaceholders($i18n.dapps.alt.website, { $dAppname: name })}
alt={replacePlaceholders($i18n.dapps.alt.website, { $dAppName: dAppName })}
/>
</div>
{/if}
Expand All @@ -63,15 +63,15 @@
<Logo
size="md"
src={logo}
alt={replacePlaceholders($i18n.dapps.alt.logo, { $dAppname: name })}
alt={replacePlaceholders($i18n.dapps.alt.logo, { $dAppName: dAppName })}
/>
<div class="mr-auto">
<div class="text-lg font-bold">{name}</div>
<div class="text-lg font-bold">{dAppName}</div>
{#if nonNullish(websiteURL)}
<ExternalLink
iconVisible={false}
ariaLabel={replacePlaceholders($i18n.dapps.text.open_dapp, {
$dAppname: name
$dAppName: dAppName
})}
href={websiteURL.toString()}
styleClass="text-sm text-misty-rose">{websiteURL.hostname}</ExternalLink
Expand All @@ -83,7 +83,7 @@
<ExternalLinkIcon
href={telegram}
ariaLabel={replacePlaceholders($i18n.dapps.alt.open_telegram, {
$dAppname: name
$dAppName: dAppName
})}
>
<IconTelegram size="22" />
Expand All @@ -93,7 +93,7 @@
<ExternalLinkIcon
href={openChat}
ariaLabel={replacePlaceholders($i18n.dapps.alt.open_open_chat, {
$dAppname: name
$dAppName: dAppName
})}
>
<IconOpenChat size="22" />
Expand All @@ -103,7 +103,7 @@
<ExternalLinkIcon
href={twitter}
ariaLabel={replacePlaceholders($i18n.dapps.alt.open_twitter, {
$dAppname: name
$dAppName: dAppName
})}
>
<IconTwitter />
Expand All @@ -113,7 +113,7 @@
<ExternalLinkIcon
href={github}
ariaLabel={replacePlaceholders($i18n.dapps.alt.source_code_on_github, {
$dAppname: name
$dAppName: dAppName
})}
>
<IconGitHub size="22" />
Expand All @@ -125,20 +125,20 @@
<p class="m-0 my-5 text-sm [&_ul]:list-disc [&_ul]:pl-6">
<Html text={description} />
</p>
<DappTags dAppName={name} {tags} />
<DappTags {dAppName} {tags} />
</article>
</div>

{#if nonNullish(websiteURL)}
<ExternalLink
ariaLabel={replacePlaceholders($i18n.dapps.alt.open_dapp, {
$dAppname: name
$dAppName: dAppName
})}
styleClass="as-button primary padding-sm mt-auto flex flex-row-reverse"
href={websiteURL.toString()}
>{callToAction ??
replacePlaceholders($i18n.dapps.text.open_dapp, {
$dAppname: name
$dAppName: dAppName
})}</ExternalLink
>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
width="100%"
styleClass="object-cover"
src={dAppDescription.screenshots[0]}
alt={replacePlaceholders($i18n.dapps.alt.website, { $dAppname: dAppDescription.name })}
alt={replacePlaceholders($i18n.dapps.alt.website, { $dAppName: dAppDescription.name })}
/>
</div>
{/if}
Expand All @@ -26,7 +26,7 @@
<div class="h-12 w-12 rounded-full">
<Img
src={dAppDescription.logo}
alt={replacePlaceholders($i18n.dapps.alt.logo, { $dAppname: dAppDescription.name })}
alt={replacePlaceholders($i18n.dapps.alt.logo, { $dAppName: dAppDescription.name })}
/>
</div>
<div class="flex-1">
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/lib/components/dapps/DappTags.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</script>

<ul
aria-label={replacePlaceholders($i18n.dapps.alt.tags, { $dAppname: dAppName })}
aria-label={replacePlaceholders($i18n.dapps.alt.tags, { $dAppName: dAppName })}
class="flex list-none flex-wrap gap-2"
>
{#each tags as tag}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
$: ({
carousel: { text, callToAction },
logo,
name
name: dAppName
} = dappsCarouselSlide);
</script>

Expand All @@ -20,7 +20,7 @@
width="64"
rounded
src={logo}
alt={replacePlaceholders($i18n.dapps.alt.logo, { $dAppname: name })}
alt={replacePlaceholders($i18n.dapps.alt.logo, { $dAppName: dAppName })}
/>
</div>
<div>
Expand All @@ -29,7 +29,7 @@
on:click={() => {
modalStore.openDappDetails(dappsCarouselSlide);
}}
aria-label={replacePlaceholders($i18n.dapps.alt.learn_more, { $dAppname: name })}
aria-label={replacePlaceholders($i18n.dapps.alt.learn_more, { $dAppName: dAppName })}
class="text-primary text-sm font-semibold"
>
{callToAction} →
Expand Down
20 changes: 10 additions & 10 deletions src/frontend/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,22 @@
"featured": "Featured",
"sign_in": "Sign-in to explore the ecosystem.",
"title": "Explore Web3 Ecosystem",
"open_dapp": "Open $dAppname",
"open_dapp": "Open $dAppName",
"submit_your_dapp": "Submit your dapp"
},
"alt": {
"learn_more": "Learn more about $dAppname",
"logo": "Logo of $dAppname",
"learn_more": "Learn more about $dAppName",
"logo": "Logo of $dAppName",
"show_all": "Show all decentralised applications",
"show_tag": "Show decentralised applications with the tag $tag",
"open_dapp": "Open the app $dAppname",
"open_telegram": "Open $dAppname on Telegram",
"open_open_chat": "Open $dAppname on OpenChat",
"open_twitter": "Open the $dAppname X/Twitter feed",
"source_code_on_github": "View source code of $dAppname on github",
"open_dapp": "Open the app $dAppName",
"open_telegram": "Open $dAppName on Telegram",
"open_open_chat": "Open $dAppName on OpenChat",
"open_twitter": "Open the $dAppName X/Twitter feed",
"source_code_on_github": "View source code of $dAppName on github",
"submit_your_dapp": "Submit your dapp to be shown in the dapp-explorer",
"tags": "Tags related to $dAppname",
"website": "Image of $dAppname"
"tags": "Tags related to $dAppName",
"website": "Image of $dAppName"
}
},
"footer": {
Expand Down