Skip to content

Commit 01bf38b

Browse files
authored
Merge pull request #206 from wwWallet/fix/messages-issues
Update and Refine Locale Texts
2 parents c1f5f95 + c807a5f commit 01bf38b

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/components/Layout.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import logo from '../assets/images/wallet_white.png';
66
import { useLocation, useNavigate } from 'react-router-dom';
77
import { CSSTransition } from 'react-transition-group';
88
import { useSessionStorage } from '../components/useStorage';
9-
import { Trans } from 'react-i18next';
9+
import { Trans, useTranslation } from 'react-i18next';
1010
import { useApi } from '../api';
1111

1212
const Layout = ({ children, isPermissionGranted, tokenSentInSession }) => {
@@ -18,6 +18,7 @@ const Layout = ({ children, isPermissionGranted, tokenSentInSession }) => {
1818
const api = useApi();
1919
const [isMessageNoGrantedVisible, setIsMessageNoGrantedVisible,] = api.useClearOnClearSession(useSessionStorage('isMessageNoGrantedVisible', null));
2020
const [isMessageGrantedVisible, setIsMessageGrantedVisible,] = api.useClearOnClearSession(useSessionStorage('isMessageGrantedVisible', null));
21+
const { t } = useTranslation();
2122

2223
const handleNavigate = (path) => {
2324
if (location.pathname === path) {
@@ -63,7 +64,7 @@ const Layout = ({ children, isPermissionGranted, tokenSentInSession }) => {
6364
className="text-white text-xl font-bold cursor-pointer"
6465
onClick={() => handleNavigate('/')}
6566
>
66-
wwWallet
67+
{t('common.walletName')}
6768
</h1>
6869
<button className="text-white" onClick={toggleSidebar}>
6970
<GiHamburgerMenu size={24} />

src/components/Popups/SelectCredentials.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ function SelectCredentials({ showPopup, setShowPopup, setSelectionMap, conforman
103103
onClick={() => { setApplyTransition(true); setShowRequestedFields(!showRequestedFields) }}
104104
className="px-2 py-2 text-white cursor-pointer flex items-center bg-custom-blue hover:bg-custom-blue-hover font-medium rounded-lg text-sm px-4 py-2 text-center dark:bg-custom-blue-hover dark:hover:bg-custom-blue-hover"
105105
>
106-
{showRequestedFields ? 'Hide Credentials Details' : 'Show Requested Fields'}
106+
{showRequestedFields ? `${t('selectCredentialPopup.requestedFieldsHide')}` : `${t('selectCredentialPopup.requestedFieldsShow')}`}
107107
</button>
108108
</div>
109109

110-
<hr className="my-2 border-t border-gray-300 py-2" />
110+
<hr className="border-t border-gray-300 py-1" />
111111

112112
<div
113113
className={`overflow-hidden transition-height ${showRequestedFields ? 'max-h-96' : 'max-h-0'}`}
@@ -116,7 +116,7 @@ function SelectCredentials({ showPopup, setShowPopup, setSelectionMap, conforman
116116
>
117117
{renderContent && (
118118
<>
119-
<p className='mb-2 text-sm italic text-gray-700'>The following fields were requested from the verifier{verifierDomainName}</p>
119+
<p className='mb-2 text-sm italic text-gray-700'>{t('selectCredentialPopup.requestedFieldsinfo')} {verifierDomainName}</p>
120120
<textarea
121121
readOnly
122122
value={requestedFields.join('\n')}

src/locales/en.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@
184184
"title": "Scan the QR Code"
185185
},
186186
"selectCredentialPopup": {
187-
"description": "Please select one of the above credentials to proceed with the presentation",
187+
"description": "Please select one of the credentials below to proceed with the presentation",
188+
"requestedFieldsHide": "Hide Requested Fields",
189+
"requestedFieldsinfo": "The following fields were requested from the verifier",
190+
"requestedFieldsShow": "Show Requested Fields",
188191
"title": "Select an Option:"
189192
},
190193
"sidebar": {

0 commit comments

Comments
 (0)