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

Fix footer to work with existing translations #2026

Merged
merged 1 commit into from
Jul 31, 2024
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
1 change: 1 addition & 0 deletions .changelog/2026.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix footer to work with existing translations
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ exports[`<Footer /> should render mobile version of footer 1`] = `
</a>
<br />
<span>
(commit:
(commit:
</span>
<a
class="c3"
Expand Down
28 changes: 10 additions & 18 deletions src/app/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,26 +147,18 @@ const Version = () => {
t={t}
components={{
ReleaseLink: process.env.REACT_APP_BUILD_VERSION ? (
<Anchor
href={githubReleaseLink(process.env.REACT_APP_BUILD_VERSION)}
label={process.env.REACT_APP_BUILD_VERSION.replace('v', '')}
target="_blank"
rel="noopener noreferrer"
/>
<>
<Anchor
href={githubReleaseLink(process.env.REACT_APP_BUILD_VERSION)}
label={process.env.REACT_APP_BUILD_VERSION.replace('v', '')}
target="_blank"
rel="noopener noreferrer"
/>
{isMobileOrTablet ? <br /> : <span>&nbsp;</span>}
</>
) : (
<NoReleaseLink />
),
}}
values={{
buildTime: intlDateTimeFormat(Number(process.env.REACT_APP_BUILD_DATETIME)),
}}
defaults="Version: <ReleaseLink/>"
/>
{isMobileOrTablet ? <br /> : <span> </span>}
<Trans
i18nKey="footer.buildDetails"
t={t}
components={{
CommitLink: (
<Anchor
href={`${githubLink}commit/${process.env.REACT_APP_BUILD_SHA}`}
Expand All @@ -179,7 +171,7 @@ const Version = () => {
values={{
buildTime: intlDateTimeFormat(Number(process.env.REACT_APP_BUILD_DATETIME)),
}}
defaults="(commit: <CommitLink/>) built at {{buildTime}}"
defaults="Version: <ReleaseLink/> (commit: <CommitLink/>) built at {{buildTime}}"
/>
</span>
)
Expand Down
3 changes: 1 addition & 2 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,14 @@
"thirdPartyDisclaimer": "This service is provided by Transak - an external party. Oasis* does not carry any responsibility. All fees charged by Transak."
},
"footer": {
"buildDetails": "(commit: <CommitLink/>) built at {{buildTime}}",
"feedback": "We’d love your feedback at <EmailLink>[email protected]</EmailLink>",
"github": "ROSE Wallet is <GithubLink>open source</GithubLink> and powered by",
"poweredBy": {
"oasismonitor": "Oasis Monitor API & Oasis gRPC",
"oasisscan": "Oasis Scan API & Oasis gRPC"
},
"terms": "<TermsLink>Terms and Conditions</TermsLink>",
"version": "Version: <ReleaseLink/>"
"version": "Version: <ReleaseLink/> (commit: <CommitLink/>) built at {{buildTime}}"
},
"home": {
"create": {
Expand Down
2 changes: 1 addition & 1 deletion src/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"oasisscan": "Alimenté par Oasis Scan API & Oasis gRPC"
},
"terms": "<TermsLink>Termes et Conditions</TermsLink>",
"version": "Version: <CommitLink/> construit à {{buildTime}}"
"version": "Version: <ReleaseLink/> (<CommitLink/>) construit à {{buildTime}}"
},
"home": {
"create": {
Expand Down
Loading