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

deverification copy changes #4790

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 lang/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@
"label.deposit_confirmed": "Dipòsit confirmat",
"label.deposit_or_stream_balance": "Diposita Tokens o utilitza el Saldo de Transmissió",
"label.deposit_token_use_balance": "Diposita Tokens o utilitza el Saldo de Transmissió",
"label.devouch.attest_on_devouch": "Certifica a DeVouch",
"label.devouch.if_you_are_eligible": "Si ets un verificador elegible de Giveth, pots avalar la legitimitat d'aquest projecte, potencialment augmentant els beneficis que rep a Giveth.",
"label.devouch.go_to_devouch": "Anar a DeVouch",
"label.devouch.description.vouch_this_project": "Amb DeVouch, pots assenyalar el teu suport a aquest projecte testificant la seva legitimitat, cosa que potencialment augmentarà els beneficis que rep a Giveth.",
"label.devouch.learn_more_about_devouch": "Més informació sobre DeVouch i la verificació descentralitzada",
"label.devouch.view_this_project": "Veure aquest projecte a DeVouch",
"label.devouch.title.vouch_this_project": "Avalar aquest Projecte",
"label.didnt_get_the_givdrop": "No has rebut el GIVdrop?",
"label.did_the_donation_but_not_confirmed": "He fet la donació però no està confirmada.",
"label.discover_our_roadmap": "descobreix la nostra planificació estratègica",
Expand Down Expand Up @@ -1646,9 +1646,9 @@
"project.givback_toast.description.non_verified_public": "Actualment, els GIVbacks només s'atorguen per donacions fetes a projectes elegibles per a GIVbacks a Ethereum. La teva contribució segueix sent important, fins i tot si no genera GIVbacks!",
"project.givback_toast.description.verified_owner": "Impulsa el teu projecte per augmentar la quantitat de GIVbacks que reben els teus donants a Ethereum i augmentar la seva visibilitat entre altres projectes.",
"project.givback_toast.description.verified_owner.note": "Com a propietari d'aquest projecte, no rebràs GIVbacks per donar-hi.",
divine-comedian marked this conversation as resolved.
Show resolved Hide resolved
"project.givback_toast.description.verified_owner_not_eligible": "El teu projecte ha estat avalat pels Verificadors de Giveth i ara pot beneficiar-se de GIVpower. Fes stake i bloqueja els teus tokens GIV per impulsar aquest projecte i fer-lo més visible a la pàgina de projectes. No obstant això, donar a aquest projecte no generarà GIVbacks per als donants.",
"project.givback_toast.description.verified_owner_not_eligible": "El teu projecte ha estat avalat pels Verificadors de Giveth i ara pot beneficiar-se de GIVpower. {stakeLock} per obtenir GIVpower i millorar la posició d'aquest projecte a la pàgina de projectes. Nota: Aquest projecte pot ser impulsat, però no genera GIVbacks.",
"project.givback_toast.description.verified_public": "Les donacions a Ethereum a projectes elegibles per a GIVbacks són recompensades amb GIV. Impulsa aquest projecte per augmentar el seu percentatge de recompenses i fer-lo més visible a la pàgina de projectes!",
"project.givback_toast.description.verified_public_not_eligible": "{stakeLock} els teus tokens GIV per obtenir GIVpower. Impulsa aquest projecte per fer-lo més visible a la pàgina de projectes! Tingues en compte que, tot i que aquest projecte és elegible per ser impulsat amb GIVpower, no generarà GIVbacks per als seus donants.",
"project.givback_toast.description.verified_public_not_eligible": "{stakeLock} per obtenir GIVpower i millorar la posició d'aquest projecte a la pàgina de projectes. Nota: Aquest projecte pot ser impulsat, però no genera GIVbacks.",
"project.givback_toast.title.non_verified_owner": "El teu projecte està creant o donant suport a béns públics?",
"project.givback_toast.title.non_verified_owner_cancelled": "Estat Cancel·lat",
"project.givback_toast.title.non_verified_owner_deactive": "Mode Desactivat",
Expand Down
10 changes: 5 additions & 5 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@
"label.deposit_confirmed": "Deposit confirmed",
"label.deposit_or_stream_balance": "Deposit Tokens or use Stream Balance",
"label.deposit_token_use_balance": "Deposit Tokens or use Stream Balance",
"label.devouch.attest_on_devouch": "Attest on Devouch",
"label.devouch.if_you_are_eligible": "If you are an eligible Giveth Verifier you can vouch for this project's legitimacy, potentially increasing the benefits it receives on Giveth.",
"label.devouch.go_to_devouch": "Go to DeVouch",
"label.devouch.title.vouch_this_project": "Vouch for this Project",
"label.devouch.description.vouch_this_project": "With DeVouch, you can signal your support for this project by attesting to its legitimacy, potentially increasing the benefits it receives on Giveth.",
"label.devouch.learn_more_about_devouch": "Learn more about DeVouch & Decentralized Verification",
"label.devouch.view_this_project": "View this Project on DeVouch",
"label.didnt_get_the_givdrop": "Didn’t get the GIVdrop?",
"label.did_the_donation_but_not_confirmed": "I did the donation but it's not confirmed.",
"label.discover_our_roadmap": "discover our roadmap",
Expand Down Expand Up @@ -1646,9 +1646,9 @@
"project.givback_toast.description.non_verified_public": "GIVbacks are currently only awarded for donations made to GIVbacks Eligible projects on Ethereum. Your contribution still matters, even if it doesn't generate GIVbacks!",
"project.givback_toast.description.verified_owner": "Boost your project to increase the amount of GIVbacks your donors on Ethereum receive and increase its visibility among other projects!",
"project.givback_toast.description.verified_owner.note": "As the owner of this project, you won’t get GIVbacks for donating to it.",
"project.givback_toast.description.verified_owner_not_eligible": "Your project has been vouched for by Giveth Verifiers and can now benefit from GIVpower! Stake and lock your GIV tokens to boost this project and make it more visible on the projects page. However, donating to this project won't yield GIVbacks to donors.",
"project.givback_toast.description.verified_owner_not_eligible": "Your project has been vouched for by Giveth Verifiers and can now benefit from GIVpower! {stakeLock} to get GIVpower and boost this project's position on the projects page! Note: This project can be boosted, but does not yield GIVbacks.",
"project.givback_toast.description.verified_public": "Ethereum donations to GIVbacks Eligible projects are rewarded with GIV. Boost this project to increase its rewards percentage and make it more visible on the projects page!",
"project.givback_toast.description.verified_public_not_eligible": "{stakeLock} your GIV tokens to get GIVpower. Boost this project make it more visible on the projects page! Note that while this project is eligible to be boosted with GIVpower, it will not yield GIVbacks to it's donors.",
"project.givback_toast.description.verified_public_not_eligible": "{stakeLock} to get GIVpower and boost this project's position on the projects page! Note: This project can be boosted, but does not yield GIVbacks.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Placeholder {stakeLock} is not being properly handled in the application code

  • The {stakeLock} placeholder is present in the translation files (lang/en.json, lang/es.json, lang/ca.json) for the keys:

    • project.givback_toast.description.verified_owner_not_eligible
    • project.givback_toast.description.verified_public_not_eligible
  • No instances were found in JavaScript or TypeScript files where these translation keys are used with the {stakeLock} substitution.

  • This may result in the placeholder {stakeLock} being displayed literally in the user interface instead of dynamic content.

🔗 Analysis chain

Improved clarity on project eligibility and boosting

The updates to these descriptions provide clearer information about project boosting and GIVbacks eligibility. The consistent messaging across owner and public views is good for maintaining clarity.

Ensure that the {stakeLock} placeholder is correctly handled in the code where these strings are used. Run the following script to check for proper usage:

This will help verify that the placeholder is being replaced with the appropriate content when the messages are displayed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for proper usage of the {stakeLock} placeholder
rg -t js -t ts "project\.givback_toast\.description\.(verified_owner_not_eligible|verified_public_not_eligible)" -A 5 -B 5

Length of output: 124


Script:

#!/bin/bash
# Search for usage of the specific translation keys across all relevant files
rg "project\.givback_toast\.description\.(verified_owner_not_eligible|verified_public_not_eligible)" --files-with-matches | while read -r file; do
  echo "File: $file"
  rg "{stakeLock}" "$file" -A 3 -B 3
done

Length of output: 711


Script:

#!/bin/bash
# Search for usage of the specific translation keys across all relevant files and correctly escape curly braces
rg "project\.givback_toast\.description\.(verified_owner_not_eligible|verified_public_not_eligible)" --files-with-matches | while read -r file; do
  echo "File: $file"
  rg "\{stakeLock\}" "$file" -A 3 -B 3
done

Length of output: 5417


Script:

#!/bin/bash
# Search for usage of the specific translation keys in JS and TS files and verify {stakeLock} substitution
keys=(
  "project.givback_toast.description.verified_owner_not_eligible"
  "project.givback_toast.description.verified_public_not_eligible"
)

for key in "${keys[@]}"; do
  echo "Searching for key: $key"
  rg "$key" --type js --type ts --multiline -A 5 -B 5 | while read -r line; do
    echo "$line"
    if echo "$line" | grep -q "{stakeLock}"; then
      echo "-> Placeholder {stakeLock} found in usage"
    else
      echo "-> No placeholder substitution detected"
    fi
  done
done

Length of output: 782

"project.givback_toast.title.non_verified_owner": "Is your project creating or supporting public goods?",
"project.givback_toast.title.non_verified_owner_cancelled": "Project Cancelled",
"project.givback_toast.title.non_verified_owner_deactive": "Project Deactivated",
Expand Down
10 changes: 5 additions & 5 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@
"label.deposit_confirmed": "Depósito confirmado",
"label.deposit_or_stream_balance": "Deposita Tokens o usa el Saldo de Transmisión",
"label.deposit_token_use_balance": "Deposita Tokens o usa el Saldo de Transmisión",
"label.devouch.attest_on_devouch": "Certificar en DeVouch",
"label.devouch.if_you_are_eligible": "Si eres un verificador elegible de Giveth, puedes avalar la legitimidad de este proyecto, potencialmente aumentando los beneficios que recibe en Giveth.",
"label.devouch.go_to_devouch": "Ir a DeVouch",
"label.devouch.description.vouch_this_project": "Con DeVouch, puedes señalar tu apoyo a este proyecto atestiguando su legitimidad, lo que potencialmente aumentará los beneficios que recibe en Giveth.",
"label.devouch.learn_more_about_devouch": "Más información sobre DeVouch y la verificación descentralizada",
"label.devouch.view_this_project": "Ver este proyecto en DeVouch",
"label.devouch.title.vouch_this_project": "Avalar este Proyecto",
"label.didnt_get_the_givdrop": "¿No has recibido el GIVdrop?",
"label.did_the_donation_but_not_confirmed": "Hice la donación pero no está confirmada.",
"label.discover_our_roadmap": "descubre nuestra hoja de ruta",
Expand Down Expand Up @@ -1646,9 +1646,9 @@
"project.givback_toast.description.non_verified_public": "Actualmente, los GIVbacks solo se otorgan por donaciones hechas a proyectos elegibles para GIVbacks en Ethereum. ¡Tu contribución sigue siendo importante, incluso si no genera GIVbacks!",
"project.givback_toast.description.verified_owner": "Impulsa tu proyecto para aumentar la cantidad de GIVbacks que reciben tus donantes en Ethereum y aumentar su visibilidad entre otros proyectos.",
"project.givback_toast.description.verified_owner.note": "Como propietario de este proyecto, no recibirás GIVbacks por donar a él.",
"project.givback_toast.description.verified_owner_not_eligible": "Tu proyecto ha sido avalado por los Verificadores de Giveth y ahora puede beneficiarse de GIVpower. Haz stake y bloquea tus tokens GIV para impulsar este proyecto y hacerlo más visible en la página de proyectos. Sin embargo, donar a este proyecto no generará GIVbacks para los donantes.",
"project.givback_toast.description.verified_owner_not_eligible": "Tu proyecto ha sido avalado por los Verificadores de Giveth y ahora puede beneficiarse de GIVpower. {stakeLock} para obtener GIVpower y mejorar la posición de este proyecto en la página de proyectos. Nota: Este proyecto puede ser impulsado, pero no genera GIVbacks.",
"project.givback_toast.description.verified_public": "Las donaciones en Ethereum a proyectos elegibles para GIVbacks son recompensadas con GIV. ¡Impulsa este proyecto para aumentar su porcentaje de recompensas y hacerlo más visible en la página de proyectos!",
"project.givback_toast.description.verified_public_not_eligible": "{stakeLock} tus GIV tokens para obtener GIVpower. ¡Impulsa este proyecto para hacerlo más visible en la página de proyectos! Ten en cuenta que aunque este proyecto es elegible para ser impulsado con GIVpower, no generará GIVbacks para sus donantes.",
"project.givback_toast.description.verified_public_not_eligible": "{stakeLock} para obtener GIVpower y mejorar la posición de este proyecto en la página de proyectos. Nota: Este proyecto puede ser impulsado, pero no genera GIVbacks.",
"project.givback_toast.title.non_verified_owner": "¿Tu proyecto está creando o apoyando bienes públicos?",
"project.givback_toast.title.non_verified_owner_cancelled": "Estado Cancelado",
"project.givback_toast.title.non_verified_owner_deactive": "Modo Desactivado",
Expand Down
6 changes: 3 additions & 3 deletions src/components/views/project/ProjectDevouchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ const ProjectDevouchBox = () => {
<TextContent>
<Title>
{formatMessage({
id: 'label.devouch.view_this_project',
id: 'label.devouch.title.vouch_this_project',
})}
</Title>
<Description>
{formatMessage({
id: 'label.devouch.if_you_are_eligible',
id: 'label.devouch.description.vouch_this_project',
})}{' '}
<ExternalLink href={links.DEVOUCH_DOCS}>
<LearnMore>
Expand All @@ -62,7 +62,7 @@ const ProjectDevouchBox = () => {
>
<OutlineButton
label={formatMessage({
id: 'label.devouch.attest_on_devouch',
id: 'label.devouch.go_to_devouch',
})}
leftIcon={
<IconExternalLink
Expand Down
17 changes: 13 additions & 4 deletions src/components/views/project/ProjectGIVbackToast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const ProjectGIVbackToast = () => {
},
{
stakeLock: (
<InnerLink href={Routes.GIVeconomy} target='_blank'>
<InnerLink href={Routes.GIVfarm} target='_blank'>
{formatMessage({ id: 'label.stake_and_lock' })}{' '}
</InnerLink>
),
Expand All @@ -245,9 +245,18 @@ const ProjectGIVbackToast = () => {
title = formatMessage({
id: `${useIntlTitle}verified_owner_not_eligible`,
});
description = formatMessage({
id: `${useIntlDescription}verified_owner_not_eligible`,
});
description = formatMessage(
{
id: `${useIntlDescription}verified_owner_not_eligible`,
},
{
stakeLock: (
<InnerLink href={Routes.GIVfarm} target='_blank'>
{formatMessage({ id: 'label.stake_and_lock' })}{' '}
</InnerLink>
),
},
);
link = links.GIVPOWER_DOC;
Button = (
<OutlineButton
Expand Down
15 changes: 10 additions & 5 deletions src/components/views/project/projectGIVPower/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ const itemPerPage = 10;
const ProjectGIVPowerIndex: FC<IProjectGIVPowerIndexProps> = () => {
const [page, setPage] = useState(0);

const { isBoostingsLoading, boostersData } = useProjectContext();
const { isBoostingsLoading, boostersData, projectData } =
useProjectContext();
const hasGivPower = boostersData ? boostersData.totalCount > 0 : false;

const isVerified = projectData?.verified;
const isGivbackEligible = projectData?.isGivbackEligible;
divine-comedian marked this conversation as resolved.
Show resolved Hide resolved
const isVerifiedNotGivbacksEligible = isVerified && !isGivbackEligible;
if (isBoostingsLoading) return <WrappedSpinner size={250} />;

return hasGivPower ? (
Expand Down Expand Up @@ -56,9 +59,11 @@ const ProjectGIVPowerIndex: FC<IProjectGIVPowerIndexProps> = () => {
/>
</Flex>
</Col>
<Col lg={4}>
<GIVpowerCard />
</Col>
{!isVerifiedNotGivbacksEligible && (
<Col lg={4}>
<GIVpowerCard />
</Col>
)}
</Row>
</>
) : (
Expand Down