- {t(
- "common:nav.user.other-organizations"
- )}
+ {t("nav:user.other-organizations")}
{orgs
diff --git a/frontend/i18n.js b/frontend/i18n.js
index 7538b1b84..7be79b767 100644
--- a/frontend/i18n.js
+++ b/frontend/i18n.js
@@ -2,6 +2,7 @@ module.exports = {
locales: ["en-US", "ko-KR"],
defaultLocale: "en-US",
pages: {
- "*": ["common"],
+ "*": ["common", "nav"],
+ "reg:^/(login|signup)": ["auth"],
},
};
diff --git a/frontend/locales/en-US/auth.json b/frontend/locales/en-US/auth.json
new file mode 100644
index 000000000..81c4918d0
--- /dev/null
+++ b/frontend/locales/en-US/auth.json
@@ -0,0 +1,32 @@
+{
+ "meta": {
+ "login": {
+ "title": "Login | Infiscal",
+ "og-title": "Log In to Infisical",
+ "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files."
+ },
+ "signup": {
+ "title": "Sign Up | Infiscal",
+ "og-title": "Replace .env files with 1 line of code. Sign Up for Infisical in 3 minutes.",
+ "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage API-keys and environemntal variables. Works with Node.js, Next.js, Gatsby, Nest.js..."
+ }
+ },
+ "login": "Log In",
+ "signup": "Sign Up",
+ "need-account": "Need an Infisical account?",
+ "create-account": "Create an account",
+ "already-have-account": "Have an account? Log in",
+ "forgot-password": "Forgot your password?",
+ "step1-start": "Let's get started",
+ "step1-privacy": "By creating an account, you agree to our Terms and have read and acknowledged the Privacy Policy.",
+ "step1-submit": "Get Started",
+ "step2-message": "
We've sent a verification email to{{email}}",
+ "step2-code-error": "Oops. Your code is wrong. Please try again.",
+ "step2-spam-alert": "Make sure to check your spam inbox.",
+ "step3-message": "Almost there!",
+ "step4-message": "Save your Emergency Kit",
+ "step4-description1": "If you get locked out of your account, your Emergency Kit is the only way to sign in.",
+ "step4-description2": "We recommend you download it and keep it somewhere safe.",
+ "step4-description3": "It contains your Secret Key which we cannot access or recover for you if you lose it.",
+ "step4-download": "Download PDF"
+}
diff --git a/frontend/locales/en-US/common.json b/frontend/locales/en-US/common.json
index a50f0c204..41868c0bd 100644
--- a/frontend/locales/en-US/common.json
+++ b/frontend/locales/en-US/common.json
@@ -1,38 +1,4 @@
{
- "meta": {
- "login": {
- "title": "Login | Infiscal",
- "og-title": "Log In to Infisical",
- "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files."
- },
- "signup": {
- "title": "Sign Up | Infiscal",
- "og-title": "Replace .env files with 1 line of code. Sign Up for Infisical in 3 minutes.",
- "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage API-keys and environemntal variables. Works with Node.js, Next.js, Gatsby, Nest.js..."
- }
- },
- "nav": {
- "support": {
- "slack": "[NEW] Join Slack Forum",
- "docs": "Read Docs",
- "issue": "Open a Github Issue",
- "email": "Send us an Email"
- },
- "user": {
- "signed-in-as": "SIGNED IN AS",
- "current-organization": "CURRENT ORGANIZATION",
- "usage-billing": "Usage & Billing",
- "invite": "Invite Members",
- "other-organizations": "OTHER ORGANIZATION"
- },
- "menu": {
- "project": "PROJECT",
- "secrets": "Secrets",
- "members": "Members",
- "integrations": "Integrations",
- "project-settings": "Project Settings"
- }
- },
"error_project-already-exists": "A project with this name already exists.",
"need-login": " To use Infisical, please log in through a device with larger dimensions. ",
"email": "Email",
@@ -46,25 +12,5 @@
"password-validate-length": "14 characters",
"password-validate-case": "1 lowercase character",
"password-validate-number": "1 number",
- "auth": {
- "login": "Log In",
- "signup": "Sign Up",
- "need-account": "Need an Infisical account?",
- "create-account": "Create an account",
- "already-have-account": "Have an account? Log in",
- "forgot-password": "Forgot your password?",
- "step1-start": "Let's get started",
- "step1-privacy": "By creating an account, you agree to our Terms and have read and acknowledged the Privacy Policy.",
- "step1-submit": "Get Started",
- "step2-message": "
We've sent a verification email to{{email}}",
- "step2-code-error": "Oops. Your code is wrong. Please try again.",
- "step2-spam-alert": "Make sure to check your spam inbox.",
- "step3-message": "Almost there!",
- "step4-message": "Save your Emergency Kit",
- "step4-description1": "If you get locked out of your account, your Emergency Kit is the only way to sign in.",
- "step4-description2": "We recommend you download it and keep it somewhere safe.",
- "step4-description3": "It contains your Secret Key which we cannot access or recover for you if you lose it.",
- "step4-download": "Download PDF"
- },
"maintenance-alert": "We are experiencing minor technical difficulties. We are working on solving it right now. Please come back in a few minutes."
}
diff --git a/frontend/locales/en-US/nav.json b/frontend/locales/en-US/nav.json
new file mode 100644
index 000000000..9448a53a7
--- /dev/null
+++ b/frontend/locales/en-US/nav.json
@@ -0,0 +1,22 @@
+{
+ "support": {
+ "slack": "[NEW] Join Slack Forum",
+ "docs": "Read Docs",
+ "issue": "Open a Github Issue",
+ "email": "Send us an Email"
+ },
+ "user": {
+ "signed-in-as": "SIGNED IN AS",
+ "current-organization": "CURRENT ORGANIZATION",
+ "usage-billing": "Usage & Billing",
+ "invite": "Invite Members",
+ "other-organizations": "OTHER ORGANIZATION"
+ },
+ "menu": {
+ "project": "PROJECT",
+ "secrets": "Secrets",
+ "members": "Members",
+ "integrations": "Integrations",
+ "project-settings": "Project Settings"
+ }
+}
diff --git a/frontend/pages/login.js b/frontend/pages/login.js
index 966774642..55c2be3d0 100644
--- a/frontend/pages/login.js
+++ b/frontend/pages/login.js
@@ -20,7 +20,7 @@ export default function Login() {
const [errorLogin, setErrorLogin] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const router = useRouter();
- const { t } = useTranslation("common");
+ const { t } = useTranslation("");
useEffect(async () => {
let userWorkspace;
@@ -55,13 +55,16 @@ export default function Login() {
return (
-
{t("meta.login.title")}
+
{t("auth:meta.login.title")}
-
+
@@ -76,25 +79,25 @@ export default function Login() {
- {t("auth.login")}
+ {t("auth:login")}
- {t("auth.need-account")}
+ {t("auth:need-account")}
- {t("maintenance-alert")}
+ {t("auth:maintenance-alert")}
)}
diff --git a/frontend/pages/signup.js b/frontend/pages/signup.js
index eed571b5b..dd5f18b7e 100644
--- a/frontend/pages/signup.js
+++ b/frontend/pages/signup.js
@@ -87,16 +87,16 @@ export default function SignUp() {
const [verificationToken, setVerificationToken] = useState();
const [backupKeyIssued, setBackupKeyIssued] = useState(false);
- const { t } = useTranslation("common");
+ const { t } = useTranslation();
useEffect(async () => {
let userWorkspace;
try {
const userWorkspaces = await getWorkspaces();
userWorkspace = userWorkspaces[0]._id;
- router.push("/dashboard/" + userWorkspace);
+ router.push("auth:/dashboard/" + userWorkspace);
} catch (error) {
- console.log("Error - Not logged in yet");
+ console.log("auth:Error - Not logged in yet");
}
}, []);
@@ -130,15 +130,15 @@ export default function SignUp() {
var emailCheckBool = false;
if (!email) {
setEmailError(true);
- setEmailErrorMessage("Please enter your email.");
+ setEmailErrorMessage("auth:Please enter your email.");
emailCheckBool = true;
} else if (
- !email.includes("@") ||
- !email.includes(".") ||
+ !email.includes("auth:@") ||
+ !email.includes("auth:.") ||
!/[a-z]/.test(email)
) {
setEmailError(true);
- setEmailErrorMessage("Please enter a valid email.");
+ setEmailErrorMessage("auth:Please enter a valid email.");
emailCheckBool = true;
} else {
setEmailError(false);
@@ -194,7 +194,7 @@ export default function SignUp() {
"0"
)
);
- localStorage.setItem("PRIVATE_KEY", PRIVATE_KEY);
+ localStorage.setItem("auth:PRIVATE_KEY", PRIVATE_KEY);
client.init(
{
@@ -223,13 +223,13 @@ export default function SignUp() {
if (!errorCheck && response.status == "200") {
response = await response.json();
- localStorage.setItem("publicKey", PUBLIC_KEY);
+ localStorage.setItem("auth:publicKey", PUBLIC_KEY);
localStorage.setItem(
"encryptedPrivateKey",
ciphertext
);
- localStorage.setItem("iv", iv);
- localStorage.setItem("tag", tag);
+ localStorage.setItem("auth:iv", iv);
+ localStorage.setItem("auth:tag", tag);
try {
await attemptLogin(
@@ -257,20 +257,20 @@ export default function SignUp() {
const step1 = (
- {t("auth.step1-start")}
+ {t("auth:step1-start")}
@@ -304,7 +304,7 @@ export default function SignUp() {
const step2 = (
@@ -334,10 +334,10 @@ export default function SignUp() {
className="mt-2 mb-6"
/>
- {codeError &&
}
+ {codeError &&
}
@@ -351,7 +351,7 @@ export default function SignUp() {
*/}
- {t("auth.step2-spam-alert")}
+ {t("auth:step2-spam-alert")}
@@ -361,37 +361,37 @@ export default function SignUp() {
const step3 = (
- {t("auth.step3-message")}
+ {t("auth:step3-message")}
{
setPassword(password);
passwordCheck(
@@ -416,7 +416,7 @@ export default function SignUp() {
passwordErrorNumber ? (
- {t("password-validate")}
+ {t("auth:password-validate")}
{passwordErrorLength ? (
@@ -437,7 +437,7 @@ export default function SignUp() {
: "text-gray-600"
} text-sm`}
>
- {t("password-validate-length")}
+ {t("auth:password-validate-length")}
@@ -459,7 +459,7 @@ export default function SignUp() {
: "text-gray-600"
} text-sm`}
>
- {t("password-validate-case")}
+ {t("auth:password-validate-case")}
@@ -481,7 +481,7 @@ export default function SignUp() {
: "text-gray-600"
} text-sm`}
>
- {t("password-validate-number")}
+ {t("auth:password-validate-number")}
@@ -491,7 +491,7 @@ export default function SignUp() {