-
Notifications
You must be signed in to change notification settings - Fork 944
fix: Fix route, balance, amount, token in swap and minutes in transaction deadline window #285
base: master
Are you sure you want to change the base?
fix: Fix route, balance, amount, token in swap and minutes in transaction deadline window #285
Conversation
…tion deadline window
Deploy request for pancake-exchange-v1 rejected. Rejected with commit 8127a0e https://docs.netlify.com/configure-builds/environment-variables/#sensitive-variable-policy |
@Chef-Chungus Can you review this please? It would be nice to have these translations |
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.
Removing the useCallback will break some stuff, other translations seem ok
src/hooks/useI18n.ts
Outdated
if (translations.length > 0) { | ||
return getTranslation(translations, translationId, fallback) | ||
} | ||
return (translationId: number, fallback: string, data: ContextData = {}) => { |
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 don't think you should change this, especially removing the callback
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 added callback again. I took that code stub from frontend side. Should we also add it there?
…rface into fix/rest_of_the_translations_in_swap
@@ -48,7 +48,9 @@ export function AddRemoveTabs({ adding }: { adding: boolean }) { | |||
<HistoryLink to="/pool"> | |||
<StyledArrowLeft /> | |||
</HistoryLink> | |||
<ActiveText>{adding ? TranslateString(258, 'Add') : TranslateString(260, 'Remove')} Liquidity</ActiveText> | |||
<ActiveText>{adding ? TranslateString(168, 'Add Liquidity') : | |||
(`${TranslateString(260, 'Remove')} ${TranslateString(262, 'Liquidity')}`)} |
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.
That king of stuff doesn't work.
Use the id 999 if the translation doesn't exists
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.
Done
if (translations.length > 0) { | ||
return getTranslation(translations, translationId, fallback) | ||
|
||
const foundTranslation = translations.find((translation) => { |
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.
@hachiojidev can you have a look at this change ?
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.
@hachiojidev kindly remainder
…rface into fix/rest_of_the_translations_in_swap
<Text fontSize="14px">Route</Text> | ||
<Text fontSize='14px'>{TranslateString(232, 'Route')}</Text> |
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 formatting is off. Should be double quotes.
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.
Done
Fixes #280