-
Notifications
You must be signed in to change notification settings - Fork 11
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
feature/80-i18next-implementation #84
Conversation
remove concept app environment
Multiple app windows wallet fixes
…nsate-for-node-and-db-sync-repository-url-changes update urls to docker images, update repo owner condition
`cardano-db-sync` got a new version `sancho-3-0-0` which brings some breaking changes. This commit updates the SQL queries where needed.
…-bump chore: bumped cardano node and db-sync versions
…or-db-sync-sancho-3-0-0 [57] Update SQL queries for sancho-3-0-0
…twork/metrics endpoint Before there was no easy way to check current voting power of alwaysAbstain and noConfidence dreps. Now they are available in the network/metrics endpoint
…d-noconfidence-dreps-voting-power-to-the-networkmetrics [64] feat: add alwaysAbstain and noConfidence voting powers to the ne…
…deploy to force resync
Tool to recreate Cardano node/db/db-sync
docs rewrite working conventions
#27 add basic auth for dev/test environments
Votes were counted in a wrong way, especially when it came to NoConfidence GAs and AlwaysNoConfidence DRep. The SQL query was modified and the problem is fixed
…oting-power [59] Fixed vote counting problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type of changes - from strings to variables is almost impossible to review due to its size.
And here - perfect fit would be snapshot testing to just check via snapshots what has changed - if anything changes.
Just a suggestion - wdyt of integrating the snapshots testing to your testing pr?
Please use the PR template 🙏 |
722ec46
to
6c7a57a
Compare
@JanJaroszczak TODO:
And additionally as I made an export of |
@@ -284,16 +285,16 @@ export const DashboardCards = () => { | |||
delegateTransaction?.transactionHash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delegateTransaction?.transactionHash | |
t(delegateTransaction?.transactionHash ? "dashboard.delegation.changeDelegation" : "delegate") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't we miss the variant with empty string from line 286?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, it should be based on currentDelegation
@@ -237,7 +237,9 @@ export const GovernanceActionCard: FC<ActionTypeProps> = ({ ...props }) => { | |||
}} | |||
data-testid={`govaction-${govActionId}-view-detail`} | |||
> | |||
{inProgress ? "See transaction" : "View proposal details"} | |||
{inProgress | |||
? t("seeTransaction") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? t("seeTransaction") | |
? t(inProgress ? "seeTransaction" : "govActions.viewProposalDetails") |
@@ -119,7 +119,7 @@ export const GovernanceVotedOnCard = ({ votedProposal, inProgress }: Props) => { | |||
</Box> | |||
<Box mt={5}> | |||
<Typography color={"#8E908E"} variant="caption"> | |||
Governance Action ID: | |||
{t("govActions.id")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call that keys:
...
"govActions": {
...,
"governanceActionType": "Governance Action Type:",
"governanceActionId": "Governance Action ID:",
...,
},
...
Looks a bit more clear to me
@@ -201,15 +204,15 @@ export const VoteActionForm = ({ | |||
dataTestId="url-input" | |||
errorMessage={errors.url?.message} | |||
formFieldName="url" | |||
placeholder="Your URL with with your context" | |||
placeholder={t("forms.urlWithContextPlaceholder")} | |||
width={"100%"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally remove curly braces around string prop here and below. For the consistency & code cleanup 💅
: "If you want to directly participate in voting and have other ada holders delegate their voting power to you." | ||
} | ||
description={t( | ||
`dashboard.registration.${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we go with a switch/case statement instead of a ternary? Those nested ternaries are almost unreadable
@@ -26,13 +27,15 @@ export function ExternalLinkModal() { | |||
style={{ height: "84px", margin: "0 auto", width: "84px" }} | |||
/> | |||
<ModalHeader sx={{ marginTop: "34px" }}> | |||
{isMobile ? "External Link Safety" : "Be Careful!"} | |||
{isMobile | |||
? t("modals.externalLink.safety") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put ternary inside function parameter
@@ -79,7 +80,7 @@ export function ExternalLinkModal() { | |||
}} | |||
variant="contained" | |||
> | |||
{isMobile ? "Continue" : "Continue to external link"} | |||
{isMobile ? t("continue") : t("modals.externalLink.continueTo")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
src/vva-fe/src/context/wallet.tsx
Outdated
: registerTransaction.type === "registration" | ||
? "Registration transaction failed" | ||
: "Update DRep metadata transaction failed" | ||
? t("alerts.registration.failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ternary inside parameter
src/vva-fe/src/context/wallet.tsx
Outdated
console.log( | ||
"Warning, no registered stake keys, using unregistered stake keys" | ||
); | ||
console.log(t("warnings.usingUnregisteredStakeKeys")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if warning
shouldn't it be console.warn
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can change it here, but if so - should we then change each similar case in the code from log
to warn
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I guess it would be better to put this action into a separate task
@JanJaroszczak Can you rebase that branch to develop? |
Closed in favor of #102 |
Implementation of i18next
en.ts
file (src/translations/locales/en.ts) and they are arranged alphabeticallyrelated issue