Skip to content

Commit

Permalink
fix: admin redirects and translations (#19)
Browse files Browse the repository at this point in the history
* fix: translations and redirects

* chore(release): 2.0.3-next.1 [skip ci]

## [2.0.3-next.1](v2.0.2...v2.0.3-next.1) (2023-06-12)

### 🐛 Fixes

* translations and redirects ([9e379fd](9e379fd))

* Update Crowdin configuration file

---------

Co-authored-by: semantic-release-bot <[email protected]>
  • Loading branch information
ivopr and semantic-release-bot authored Jun 12, 2023
1 parent 3a92264 commit 162c009
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 30 deletions.
4 changes: 2 additions & 2 deletions apps/client/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module.exports = {

// Admin
"/admin/user-validation": ["admin-user-validation"],
"/admin/running": ["admin-running"],
"/admin/md-config": ["admin-mdpr-update"],
"/admin/active-simulations": ["admin-active-simulations"],
"/admin/settings": ["admin-md-config"],

// Simulations
"/simulations": ["simulations"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"title": "Username",
"placeholder": "johndoe",
"errors": {
"empty": "Can't be empty"
"empty": "Can't be empty",
"invalid": "Alphanumeric only (a-z, A-Z, 0-9), between 4 and 10 characters"
}
}
}
6 changes: 3 additions & 3 deletions apps/client/locales/en-US/home.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"title": "Home",
"callout": "Molecular Dynamics made easy",
"callout": "",
"slogan": "The new home to MD generation and execution",
"description": "Welcome to the new Visual Dynamics.\nWith a revamped interface and a new methodology of generating and running GROMACS simulations we aim to provide faster, more reliable and replicable simulations, all this, through a new, more understandable and scalable codebase.",
"description": "Welcome to the new Visual Dynamics.\nWith a renewed interface and a new methodology for generating and running GROMACS simulations, we seek to run simulations with more control in less time.",
"features": {
"runs-on-cloud": {
"title": "Runs on Cloud",
"description": "MD demands time, computational power, and even more computational power, so you can rely on us to this. We run 3 simultaneous MDs, with 10 CPU cores each."
},
"open-source": {
"title": "Free for... everyone",
"description": "We know running a MD is not something easy, with this in mind, we develop this piece of software as a free and open-source software. Run on our hardware, your hardware, deploy your own, it is totally up to you."
"description": "We know running a MD is not something easy, with this in mind, we develop this piece of software to automate as a free and open-source software. Run on our hardware, your hardware, deploy your own, it is totally up to you."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"title": "Nome de usuário",
"placeholder": "johndoe",
"errors": {
"empty": "Não pode estar em branco"
"empty": "Não pode estar em branco",
"invalid": "Apenas alfanumérico (a-z, A-Z, 0-9), entre 4 e 10 caracteres"
}
}
}
14 changes: 7 additions & 7 deletions apps/client/locales/pt-BR/home.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"title": "Início",
"callout": "Dinâmica Molecular do jeito fácil",
"slogan": "O novo ponto de partida para geração e execução de MD",
"description": "Bem-vindo ao novo Visual Dynamics.\nCom uma interface renovada e uma nova metodologia de geração e execução de simulações GROMACS, buscamos executar simulações mais confiáveis, replicáveis e ágeis, tudo isso, através de um código novo, mais compreensível e escalável.",
"callout": "Feito pela comunidade, para a comunidade.",
"slogan": "Uma nova abordagem em automação de dinâmica molecular com GROMACS.",
"description": "Bem-vindo ao novo Visual Dynamics.\nCom uma interface renovada e uma nova metodologia de geração e execução de simulações GROMACS, buscamos executar simulações com mais controle em menor tempo.",
"features": {
"runs-on-cloud": {
"title": "Executa em nuvem",
"description": "O MD exige tempo, poder computacional e ainda mais poder computacional, então você pode confiar em nós para isso. Nós rodamos 3 MDs simultâneos, com 10 núcleos de CPU cada."
"title": "Execução em nuvem ou local",
"description": "Dinâmicas moleculares exigem bastante poder computacional, por isso também oferecemos uma forma de execução em nuvem. Nós rodamos 3 MDs simultâneos, com 10 núcleos de CPU cada."
},
"open-source": {
"title": "Grátis para... Todos",
"description": "Sabemos que executar um MD não é algo fácil, com isso em mente, desenvolvemos esse software como um software livre e de código aberto. Execute simulações em nosso hardware, seu hardware, implante o seu próprio Visual Dynamics, isso depende totalmente de você."
"title": "Código Aberto",
"description": "Sabemos que executar um MD não é algo fácil, com isso em mente, mantemos o desenvolvimento deste software de automação em código aberto, feito pela comunidade, para a comunidade."
}
}
}
2 changes: 1 addition & 1 deletion apps/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "2.0.2",
"version": "2.0.3-next.1",
"private": true,
"scripts": {
"build": "next build",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { z } from "zod";

export const SignUpFormSchema = z.object({
username: z.string().min(1, "account-register:username.errors.empty"),
username: z
.string()
.min(1, "account-register:username.errors.empty")
.regex(
new RegExp("^[a-zA-Z0-9]{4,10}$"),
"account-register:username.errors.invalid"
),
email: z
.string()
.min(1, "account-register:email.errors.empty")
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/components/general/sidebar/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function SidebarContent() {
},
{
label: "navigation:admin.active-simulations",
href: "/admin/running"
href: "/admin/active-simulations"
},
{
label: "navigation:admin.settings",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function SimulationRealtimeLog({
<div>
<div className="flex gap-x-2">
<h4 className="font-bold uppercase text-primary-950 dark:text-primary-300">
{t("running:logs.title")}
{t("simulations-runninglogs.title")}
</h4>
{isRefetching ? <Spinner /> : null}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Step({
step
}: {
active: boolean;
running: boolean;
simulations-running boolean;
step: string;
}) {
const { t } = useTranslation();
Expand All @@ -51,7 +51,7 @@ function Step({
{running ? (
<Spinner className="h-5 w-5 animate-spin fill-blue-950 text-blue-100 dark:fill-blue-300 dark:text-blue-950" />
) : null}
<p>{t(`running:steps.${step}`)}</p>
<p>{t(`simulations-runningsteps.${step}`)}</p>
</div>
);
}
Expand All @@ -62,7 +62,7 @@ export function SimulationStepList({ activeSteps }: SimulationStepListProps) {
return (
<div>
<h4 className="font-bold uppercase text-primary-950 dark:text-primary-300">
{t("running:steps.title")}
{t("simulations-runningsteps.title")}
</h4>
<div className="flex flex-wrap items-center gap-1">
{steps.map((step, index) => (
Expand Down
18 changes: 9 additions & 9 deletions apps/client/src/pages/simulations/running.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function Running({ user }: { user: User }) {

return (
<PageLayout>
<SEO title={t("running:title")} />
<SEO title={t("simulations-runningtitle")} />
<div className="relative">
<div className="absolute right-0 top-1">
<SimulationAbortButton
Expand All @@ -61,28 +61,28 @@ export default function Running({ user }: { user: User }) {
/>
</div>
<h4 className="font-bold uppercase text-primary-950 dark:text-primary-300">
{t("running:description")}
{t("simulations-runningdescription")}
</h4>
<div className="flex gap-x-2">
<p className="font-medium">{t("running:taskId")}:</p>
<p className="font-medium">{t("simulations-runningtaskId")}:</p>
<p className="font-bold text-primary-950 dark:text-primary-300">
{data.info.celeryId}
</p>
</div>
<div className="flex gap-x-2">
<p className="font-medium">{t("running:type")}:</p>
<p className="font-medium">{t("simulations-runningtype")}:</p>
<p className="font-bold text-primary-950 dark:text-primary-300">
{data.info.type}
</p>
</div>
<div className="flex gap-x-2">
<p className="font-medium">{t("running:molecule")}:</p>
<p className="font-medium">{t("simulations-runningmolecule")}:</p>
<p className="font-bold text-primary-950 dark:text-primary-300">
{data.info.molecule}
</p>
</div>
<div className="flex gap-x-2">
<p className="font-medium">{t("running:createdAt")}:</p>
<p className="font-medium">{t("simulations-runningcreatedAt")}:</p>
<p className="font-bold text-primary-950 dark:text-primary-300">
{Intl.DateTimeFormat(router.locale, {
day: "2-digit",
Expand All @@ -106,11 +106,11 @@ export default function Running({ user }: { user: User }) {

return (
<PageLayout>
<SEO title={t("running:not-running.title")} />
<SEO title={t("simulations-runningnot-running.title")} />
<div className="m-auto flex w-1/2 flex-col justify-center text-center">
<FileCog className="mx-auto mb-2 h-14 w-14 stroke-primary-600 dark:stroke-primary-400" />
<H1 className="uppercase">{t("running:not-running.title")}</H1>
<Paragraph>{t("running:not-running.description")}</Paragraph>
<H1 className="uppercase">{t("simulations-runningnot-running.title")}</H1>
<Paragraph>{t("simulations-runningnot-running.description")}</Paragraph>

<div className="mx-auto mt-5 flex flex-wrap gap-x-2">
<Link href="/dynamic/apo">
Expand Down

0 comments on commit 162c009

Please sign in to comment.