diff --git a/public/static/locales/en/apps.json b/public/static/locales/en/apps.json index 9ccea937e..df4eec4ae 100644 --- a/public/static/locales/en/apps.json +++ b/public/static/locales/en/apps.json @@ -29,6 +29,7 @@ "appListingError": "Unable to get Apps. Please try again.", "appPubRequestsFetchError": "Unable to fetch publication requests. Please try again.", "appPublicationError": "Unable to publish {{appName}}. Please check the details.", + "appsAdmin": "Apps Admin", "appType": "Type", "appVersion": "Version", "apps_under_development": "Apps Under Development", diff --git a/public/static/locales/en/collections.json b/public/static/locales/en/collections.json index 83fe5b1b6..db32e6475 100644 --- a/public/static/locales/en/collections.json +++ b/public/static/locales/en/collections.json @@ -27,6 +27,7 @@ "noCollections": "No $t(featureName_plural)", "noExternalApps": "Adding Agave/HPC apps is not currently supported", "noExternalAppsNote": "NOTE: $t(noExternalApps).", + "pageTitle": "Collection - {{name}}", "remove": "Remove", "retagApps": "Re-tag Apps", "retagAppsMessage": "{{name}} currently has apps associated with it. Renaming the $t(featureName) will cause all the currently tagged apps to be re-tagged with the new $t(featureName) name. Do you wish to continue?", diff --git a/public/static/locales/en/common.json b/public/static/locales/en/common.json index 709db041b..ee21d62ed 100644 --- a/public/static/locales/en/common.json +++ b/public/static/locales/en/common.json @@ -23,6 +23,7 @@ "dataNavUsageTitle": "{{percentage}}% usage", "description": "Description", "deTitle": "Discovery Environment", + "dePageTitle": "{{title}} - Discovery Environment", "delete": "Delete", "disable": "Disable", "discard": "Discard", diff --git a/public/static/locales/en/data.json b/public/static/locales/en/data.json index 8139a0826..762074cad 100644 --- a/public/static/locales/en/data.json +++ b/public/static/locales/en/data.json @@ -100,6 +100,7 @@ "noContent": "No content to display.", "ok": "OK", "own": "Own", + "pageTitle": "Data - {{path}}", "path": "Path", "pathCopied": "Path copied.", "pathCopyError": "Unable to copy path.", diff --git a/public/static/locales/en/referenceGenomes.json b/public/static/locales/en/referenceGenomes.json index b4d9fd226..d77289c57 100644 --- a/public/static/locales/en/referenceGenomes.json +++ b/public/static/locales/en/referenceGenomes.json @@ -14,6 +14,7 @@ "createdOn": "Created On", "lastModifiedBy": "Last Modified By", "lastModifiedOn": "Last Modified On", + "referenceGenomes": "Reference Genomes", "search": "Search", "updateSuccess": "Reference Genome updated successfully.", "updateFailed": "Unable to update the Reference Genome" diff --git a/public/static/locales/en/search.json b/public/static/locales/en/search.json index 50e0f89b6..c2645b8ea 100644 --- a/public/static/locales/en/search.json +++ b/public/static/locales/en/search.json @@ -21,6 +21,7 @@ "noResults": "No results to display.", "own": "Own", "owner": "Owner", + "pageTitle": "Search - {{searchTerm}}", "path": "Path", "pathPlaceholder": "/iplant/home/me", "permissions": "Permissions", diff --git a/public/static/locales/en/subscriptions.json b/public/static/locales/en/subscriptions.json index ecb6d8ea9..335540a8d 100644 --- a/public/static/locales/en/subscriptions.json +++ b/public/static/locales/en/subscriptions.json @@ -38,6 +38,7 @@ "noSubscriptions": "No subscriptions", "noUsages": "No usages", "paid": "Paid", + "pageTitle": "Subscriptions - {{searchTerm}}", "planName": "Plan Name", "quota": "Quota", "quotas": "Quotas", diff --git a/public/static/locales/en/teams.json b/public/static/locales/en/teams.json index ede50ff78..428b78b63 100644 --- a/public/static/locales/en/teams.json +++ b/public/static/locales/en/teams.json @@ -2,6 +2,7 @@ "admin": "Admin", "allTeams": "All Teams", "ariaTeamFilter": "Team Filter", + "createTeam": "Create Team", "createTeamFail": "Failed to create team name or description. Please try again.", "creator": "Creator Name", "deleteTeamFail": "Failed to delete team. Please try again.", @@ -26,6 +27,7 @@ "myTeams": "My Teams", "name": "Name", "noTeams": "No teams", + "pageTitle": "Team - {{name}}", "privilege": "Privilege", "publicTeam": "Public Team", "publicTeamHelp": "Making your team public allows your team to be discoverable to other CyVerse users who are not members of your team. Allowing users to discover your team will enable them to view the team and request to join. A team can be updated from public to private and vice versa any time.", diff --git a/public/static/locales/en/tools.json b/public/static/locales/en/tools.json index 2a1d171bd..48beb5317 100644 --- a/public/static/locales/en/tools.json +++ b/public/static/locales/en/tools.json @@ -126,6 +126,7 @@ "toolRequests": "Tool Requests", "toolRequestSuccess": "Request submitted successfully. You will receive notifications about the progress.", "tools": "Tools", + "toolsAdmin": "Tools Admin", "toolSrcLinkLabel": "Provide a link for your tool's source (GitHub, BitBucket, DockerHub etc...)", "toolsUsed": "Tools used by {{appName}}", "toolTestDataLabel": "Provide a link for your tool's test data", diff --git a/public/static/locales/en/vice-admin.json b/public/static/locales/en/vice-admin.json index 1b272317d..c46b879ff 100644 --- a/public/static/locales/en/vice-admin.json +++ b/public/static/locales/en/vice-admin.json @@ -104,5 +104,6 @@ "userIDColumn": "User ID", "username": "Username", "usernameColumn": "Username", - "value": "Value" + "value": "Value", + "viceAdmin": "VICE Admin" } diff --git a/src/pages/_app.js b/src/pages/_app.js index ee20a6209..15ead41df 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -123,6 +123,8 @@ function MyApp({ Component, pageProps }) { }) ); + const { title } = pageProps; + useEffect(() => { const analytics_id = publicRuntimeConfig.ANALYTICS_ID; const handleRouteChange = (url) => { @@ -271,7 +273,13 @@ function MyApp({ Component, pageProps }) { clientConfig={config} > - {t("deTitle")} + + {title + ? t("dePageTitle", { + title, + }) + : t("deTitle")} + { }; export async function getServerSideProps({ locale }) { + const title = i18n.t("analyses:relaunch"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "data", "launch", "upload", "urlImport", - // "apps" already included by RequiredNamespaces + // "apps" and "analyses" already included by RequiredNamespaces ...RequiredNamespaces, ])), }, diff --git a/src/pages/apps.js b/src/pages/apps.js index 45ddc6189..6bfea2a75 100644 --- a/src/pages/apps.js +++ b/src/pages/apps.js @@ -11,7 +11,7 @@ import React, { useCallback } from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces, useTranslation } from "i18n"; +import { i18n, RequiredNamespaces, useTranslation } from "i18n"; import { getLocalStorage } from "components/utils/localStorage"; @@ -79,9 +79,18 @@ export default function Apps() { } export async function getServerSideProps(context) { - const { locale } = context; + const { locale, query } = context; + + let selectedCategory; + if (query.selectedCategory) { + selectedCategory = JSON.parse(query.selectedCategory).name; + } + + const title = selectedCategory || i18n.t("apps"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "collections", // "apps" already included by RequiredNamespaces diff --git a/src/pages/apps/[systemId]/[appId]/index.js b/src/pages/apps/[systemId]/[appId]/index.js index 9a542ddaf..91cd32a6e 100644 --- a/src/pages/apps/[systemId]/[appId]/index.js +++ b/src/pages/apps/[systemId]/[appId]/index.js @@ -9,7 +9,7 @@ import React, { useCallback } from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces, useTranslation } from "i18n"; +import { i18n, RequiredNamespaces, useTranslation } from "i18n"; import { getLocalStorage } from "components/utils/localStorage"; @@ -76,8 +76,11 @@ export default function App() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("apps"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "collections", // "apps" already included by RequiredNamespaces diff --git a/src/pages/apps/[systemId]/[appId]/launch.js b/src/pages/apps/[systemId]/[appId]/launch.js index 7f824a103..28f5ae4ac 100644 --- a/src/pages/apps/[systemId]/[appId]/launch.js +++ b/src/pages/apps/[systemId]/[appId]/launch.js @@ -10,7 +10,7 @@ import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import { useQuery } from "react-query"; -import { RequiredNamespaces, useTranslation } from "i18n"; +import { i18n, RequiredNamespaces, useTranslation } from "i18n"; import { getAppDescription, @@ -120,8 +120,11 @@ function Launch({ showErrorAnnouncer }) { } export async function getServerSideProps({ locale }) { + const title = i18n.t("launch:launchAnalysis"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "data", "upload", diff --git a/src/pages/apps/[systemId]/[appId]/versions/[versionId]/create.js b/src/pages/apps/[systemId]/[appId]/versions/[versionId]/create.js index 1052484e9..8037f5356 100644 --- a/src/pages/apps/[systemId]/[appId]/versions/[versionId]/create.js +++ b/src/pages/apps/[systemId]/[appId]/versions/[versionId]/create.js @@ -9,7 +9,7 @@ import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import { useQuery } from "react-query"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import AppEditor from "components/apps/editor"; import ids from "components/apps/editor/ids"; @@ -156,8 +156,11 @@ export default function AppVersionCreate() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("apps:createAppVersion"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "app_editor", "app_editor_help", diff --git a/src/pages/apps/[systemId]/[appId]/versions/[versionId]/edit.js b/src/pages/apps/[systemId]/[appId]/versions/[versionId]/edit.js index 79a3d69cf..5883dfb4b 100644 --- a/src/pages/apps/[systemId]/[appId]/versions/[versionId]/edit.js +++ b/src/pages/apps/[systemId]/[appId]/versions/[versionId]/edit.js @@ -10,7 +10,7 @@ import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import { useQuery } from "react-query"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import AppEditor from "components/apps/editor"; import ids from "components/apps/editor/ids"; @@ -109,8 +109,11 @@ export default function AppEdit() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("apps:editApp"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "app_editor", "app_editor_help", diff --git a/src/pages/apps/[systemId]/[appId]/versions/[versionId]/launch.js b/src/pages/apps/[systemId]/[appId]/versions/[versionId]/launch.js index a6e0925a2..5c2017763 100644 --- a/src/pages/apps/[systemId]/[appId]/versions/[versionId]/launch.js +++ b/src/pages/apps/[systemId]/[appId]/versions/[versionId]/launch.js @@ -9,7 +9,7 @@ import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import { useQuery } from "react-query"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import { getAppDescription, @@ -76,8 +76,11 @@ export default function Launch() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("launch:launchAnalysis"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "data", "upload", diff --git a/src/pages/apps/create.js b/src/pages/apps/create.js index 838bf11fe..5546a2de9 100644 --- a/src/pages/apps/create.js +++ b/src/pages/apps/create.js @@ -7,7 +7,7 @@ import React from "react"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import AppEditor from "components/apps/editor"; import NewAppDefaults from "components/apps/editor/NewAppDefaults"; @@ -39,8 +39,11 @@ export default function AppCreate() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("apps:createApp"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "app_editor", "app_editor_help", diff --git a/src/pages/collections/[collectionName].js b/src/pages/collections/[collectionName].js index e142a56ff..5b7f995bd 100644 --- a/src/pages/collections/[collectionName].js +++ b/src/pages/collections/[collectionName].js @@ -9,7 +9,7 @@ import React from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import CollectionForm from "components/collections/form"; import NavigationConstants from "common/NavigationConstants"; @@ -31,9 +31,19 @@ export default function EditCollection() { ); } -export async function getServerSideProps({ locale }) { +export async function getServerSideProps(context) { + const { + locale, + params: { collectionName }, + } = context; + + const title = i18n.t("collections:pageTitle", { + name: collectionName, + }); + return { props: { + title, ...(await serverSideTranslations(locale, [ "collections", ...RequiredNamespaces, diff --git a/src/pages/collections/create.js b/src/pages/collections/create.js index 3a078e9cb..f828f9f08 100644 --- a/src/pages/collections/create.js +++ b/src/pages/collections/create.js @@ -9,7 +9,7 @@ import React from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import CollectionForm from "components/collections/form"; import NavigationConstants from "common/NavigationConstants"; @@ -29,8 +29,11 @@ export default function CreateCollection() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("collections:featureName"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "collections", ...RequiredNamespaces, diff --git a/src/pages/collections/index.js b/src/pages/collections/index.js index b5689f56e..1d9f360e5 100644 --- a/src/pages/collections/index.js +++ b/src/pages/collections/index.js @@ -8,7 +8,7 @@ import React from "react"; import CollectionsView from "components/collections"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import NavigationConstants from "../../common/NavigationConstants"; export default function Collections() { @@ -37,8 +37,11 @@ export default function Collections() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("collections:featureName_plural"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "collections", ...RequiredNamespaces, diff --git a/src/pages/data/ds/[...pathItems].js b/src/pages/data/ds/[...pathItems].js index 6acfc75b9..3c220d55a 100644 --- a/src/pages/data/ds/[...pathItems].js +++ b/src/pages/data/ds/[...pathItems].js @@ -9,7 +9,7 @@ import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import { useQuery } from "react-query"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import constants from "../../../constants"; import { NavigationParams } from "common/NavigationConstants"; @@ -188,9 +188,21 @@ export default function DataStore() { ); } -export async function getServerSideProps({ locale }) { +export async function getServerSideProps(context) { + const { + locale, + params: { pathItems }, + } = context; + + // Display the full path up to 3 items deep, otherwise only the last item. + const path = + pathItems.length <= 3 ? "/" + pathItems.join("/") : pathItems.at(-1); + + const title = i18n.t("data:pageTitle", { path }); + return { props: { + title, ...(await serverSideTranslations(locale, [ "data", "metadata", diff --git a/src/pages/data/index.js b/src/pages/data/index.js index 668b09109..431730ba3 100644 --- a/src/pages/data/index.js +++ b/src/pages/data/index.js @@ -7,7 +7,7 @@ import React, { Fragment, useEffect } from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import constants from "../../constants"; import { @@ -51,8 +51,11 @@ export default function Data() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("data"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "data", ...RequiredNamespaces, diff --git a/src/pages/error.js b/src/pages/error.js index 2b649c194..d0d2aae1a 100644 --- a/src/pages/error.js +++ b/src/pages/error.js @@ -10,7 +10,7 @@ import React from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import ErrorHandler from "components/error/ErrorHandler"; export default function Error() { @@ -21,8 +21,11 @@ export default function Error() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("util:error"); + return { props: { + title, ...(await serverSideTranslations(locale, RequiredNamespaces)), }, }; diff --git a/src/pages/help.js b/src/pages/help.js index 4bcc03842..be28e4b83 100644 --- a/src/pages/help.js +++ b/src/pages/help.js @@ -10,7 +10,7 @@ import React from "react"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import HelpTopics from "components/help/HelpTopics"; export default function Help() { @@ -18,8 +18,11 @@ export default function Help() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("help"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "help", "intro", diff --git a/src/pages/instantlaunches.js b/src/pages/instantlaunches.js index 184e7ee19..6fb1076f3 100644 --- a/src/pages/instantlaunches.js +++ b/src/pages/instantlaunches.js @@ -7,7 +7,7 @@ import React from "react"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import Listing from "components/instantlaunches/listing"; export default function InstantLaunches() { @@ -15,8 +15,11 @@ export default function InstantLaunches() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("instantLaunches"); + return { props: { + title, // "instantlaunches" already included by RequiredNamespaces ...(await serverSideTranslations(locale, RequiredNamespaces)), }, diff --git a/src/pages/notifications.js b/src/pages/notifications.js index f5977e173..be33bde10 100644 --- a/src/pages/notifications.js +++ b/src/pages/notifications.js @@ -7,7 +7,7 @@ import React from "react"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import NotificationsListing from "components/notifications/listing"; export default function Notifications() { @@ -15,8 +15,11 @@ export default function Notifications() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("notifications"); + return { props: { + title, // "notifications" already included by RequiredNamespaces ...(await serverSideTranslations(locale, RequiredNamespaces)), }, diff --git a/src/pages/search.js b/src/pages/search.js index 45c9326cc..5d086bd2a 100644 --- a/src/pages/search.js +++ b/src/pages/search.js @@ -2,7 +2,7 @@ import React from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; import { Hidden } from "@material-ui/core"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import GlobalSearchField from "components/search/GlobalSearchField"; import DetailedSearchResults from "components/search/detailed/DetailedSearchResults"; import SEARCH_RESULTS_TABS from "components/search/detailed/tabs"; @@ -57,9 +57,20 @@ export default function Search() { ); } -export async function getServerSideProps({ locale }) { +export async function getServerSideProps(context) { + const { + locale, + query: { searchTerm }, + } = context; + + let title = i18n.t("search"); + if (searchTerm) { + title = i18n.t("search:pageTitle", { searchTerm }); + } + return { props: { + title, ...(await serverSideTranslations(locale, [ "data", "teams", diff --git a/src/pages/settings.js b/src/pages/settings.js index 87b6a43e9..689b644c6 100644 --- a/src/pages/settings.js +++ b/src/pages/settings.js @@ -2,15 +2,18 @@ import React from "react"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import Preferences from "../components/preferences/Preferences"; export default function Settings() { return ; } export async function getServerSideProps({ locale }) { + const title = i18n.t("settings"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "preferences", ...RequiredNamespaces, diff --git a/src/pages/teams/[teamName].js b/src/pages/teams/[teamName].js index fe9f5f892..71a72350a 100644 --- a/src/pages/teams/[teamName].js +++ b/src/pages/teams/[teamName].js @@ -9,7 +9,7 @@ import React from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import NavigationConstants from "common/NavigationConstants"; import TeamForm from "components/teams/form"; @@ -31,9 +31,17 @@ export default function EditTeam() { ); } -export async function getServerSideProps({ locale }) { +export async function getServerSideProps(context) { + const { + locale, + params: { teamName }, + } = context; + + const title = i18n.t("teams:pageTitle", { name: teamName }); + return { props: { + title, ...(await serverSideTranslations(locale, [ "teams", ...RequiredNamespaces, diff --git a/src/pages/teams/create.js b/src/pages/teams/create.js index 6ac391bf8..460657819 100644 --- a/src/pages/teams/create.js +++ b/src/pages/teams/create.js @@ -9,7 +9,7 @@ import React from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import NavigationConstants from "common/NavigationConstants"; import TeamForm from "components/teams/form/"; @@ -26,8 +26,11 @@ export default function CreateTeam() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("teams:createTeam"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "teams", ...RequiredNamespaces, diff --git a/src/pages/teams/index.js b/src/pages/teams/index.js index b4066e934..6a9fa3b2d 100644 --- a/src/pages/teams/index.js +++ b/src/pages/teams/index.js @@ -9,7 +9,7 @@ import React from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import NavigationConstants from "common/NavigationConstants"; import TeamsView from "components/teams"; @@ -37,8 +37,11 @@ export default function Teams() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("teams"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "teams", ...RequiredNamespaces, diff --git a/src/pages/tools.js b/src/pages/tools.js index 99f1b9213..abd18dbe5 100644 --- a/src/pages/tools.js +++ b/src/pages/tools.js @@ -11,7 +11,7 @@ import React, { useCallback } from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import constants from "../constants"; import { getLocalStorage } from "components/utils/localStorage"; import Listing from "components/tools/listing/Listing"; @@ -63,8 +63,11 @@ export default function Tools() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("tools"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "tools", ...RequiredNamespaces, diff --git a/src/pages/vice/[accessUrl].js b/src/pages/vice/[accessUrl].js index d25fd3d41..fe0ae1414 100644 --- a/src/pages/vice/[accessUrl].js +++ b/src/pages/vice/[accessUrl].js @@ -9,7 +9,7 @@ import React from "react"; import { useRouter } from "next/router"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import ViceLoading from "components/vice/loading"; export default function Loading() { @@ -20,8 +20,11 @@ export default function Loading() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("vice-loading:initializingVice"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "vice-loading", ...RequiredNamespaces, diff --git a/src/pages/workflows/create.js b/src/pages/workflows/create.js index 4f804b643..0195e0e23 100644 --- a/src/pages/workflows/create.js +++ b/src/pages/workflows/create.js @@ -7,7 +7,7 @@ import React from "react"; import { serverSideTranslations } from "next-i18next/serverSideTranslations"; -import { RequiredNamespaces } from "i18n"; +import { i18n, RequiredNamespaces } from "i18n"; import WorkflowEditor from "components/apps/workflows/Editor"; import NewWorkflowDefaults from "components/apps/workflows/NewWorkflowDefaults"; @@ -39,8 +39,11 @@ export default function AppCreate() { } export async function getServerSideProps({ locale }) { + const title = i18n.t("apps:createWorkflow"); + return { props: { + title, ...(await serverSideTranslations(locale, [ "launch", "workflows",