Skip to content

Commit

Permalink
Add dynamic company/website name setting
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Jan 18, 2025
1 parent 2172def commit 7d85bbe
Show file tree
Hide file tree
Showing 25 changed files with 1,208 additions and 144 deletions.
1 change: 1 addition & 0 deletions api/.env.docker.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ MI_STRIPE_SECRET_KEY=STRIPE_SECRET_KEY
MI_STRIPE_SESSION_EXPIRE_AT=82800
MI_ADMIN_EMAIL=admin@movinin.io
MI_RECAPTCHA_SECRET=RECAPTCHA_SECRET
MI_WEBSITE_NAME="Movin' In"
1 change: 1 addition & 0 deletions api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ MI_STRIPE_SECRET_KEY=STRIPE_SECRET_KEY
MI_STRIPE_SESSION_EXPIRE_AT=82800
MI_ADMIN_EMAIL=admin@movinin.io
MI_RECAPTCHA_SECRET=RECAPTCHA_SECRET
MI_WEBSITE_NAME="Movin' In"
7 changes: 7 additions & 0 deletions api/src/config/env.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ export const LANGUAGES = [
'fr',
]

/**
* Website name.
*
* @type {string}
*/
export const WEBSITE_NAME = __env__('MI_WEBSITE_NAME', false, "Movin' In")

/**
* Server Port. Default is 4004.
*
Expand Down
4 changes: 3 additions & 1 deletion api/src/lang/en.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import * as env from '../config/env.config'

export const en = {
ERROR: 'Internal Error: ',
DB_ERROR: 'Database Failure: ',
SMTP_ERROR: 'SMTP Error - Failed to send email: ',
ACCOUNT_ACTIVATION_SUBJECT: 'Account Activation',
HELLO: 'Hello ',
ACCOUNT_ACTIVATION_LINK: 'Please activate your account by clicking the link:',
REGARDS: "Kind regards,<br>Movin' In team",
REGARDS: `Kind regards,<br>${env.WEBSITE_NAME} team`,
ACCOUNT_ACTIVATION_TECHNICAL_ISSUE: 'Technical Issue! Please click on resend to validate your email.',
ACCOUNT_ACTIVATION_LINK_EXPIRED: 'Your validation link may have expired. Please click on resend to validate your email.',
ACCOUNT_ACTIVATION_LINK_ERROR: 'We were unable to find a user for this verification. Please Sign up.',
Expand Down
4 changes: 3 additions & 1 deletion api/src/lang/fr.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import * as env from '../config/env.config'

export const fr = {
ERROR: 'Erreur interne : ',
DB_ERROR: 'Échec de la requête dans la base de données : ',
SMTP_ERROR: "Erreur SMTP - Échec de l'envoi de l'email: ",
ACCOUNT_ACTIVATION_SUBJECT: 'Activation de votre compte',
HELLO: 'Bonjour ',
ACCOUNT_ACTIVATION_LINK: 'Veuillez activer votre compte en cliquant sur le lien :',
REGARDS: "Cordialement,<br>L'équipe Movin' In",
REGARDS: `Cordialement,<br>L'équipe ${env.WEBSITE_NAME}`,
ACCOUNT_ACTIVATION_TECHNICAL_ISSUE: 'Problème technique! Veuillez cliquer sur renvoyer pour valider votre e-mail.',
ACCOUNT_ACTIVATION_LINK_EXPIRED: 'Votre lien de validation a peut-être expiré. Veuillez cliquer sur renvoyer pour valider votre e-mail.',
ACCOUNT_ACTIVATION_LINK_ERROR: "Nous n'avons pas pu trouver d'utilisateur correspondant à cette adresse e-mail. Veuillez vous inscrire.",
Expand Down
21 changes: 21 additions & 0 deletions backend/.env.docker.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
VITE_NODE_ENV=production
VITE_MI_API_HOST=http://localhost:4004
VITE_MI_DEFAULT_LANGUAGE=en
VITE_MI_PAGE_SIZE=30
VITE_MI_PROPERTIES_PAGE_SIZE=15
VITE_MI_BOOKINGS_PAGE_SIZE=20
VITE_MI_BOOKINGS_MOBILE_PAGE_SIZE=10
VITE_MI_CDN_USERS=http://localhost/cdn/movinin/users
VITE_MI_CDN_TEMP_USERS=http://localhost/cdn/movinin/temp/users
VITE_MI_CDN_PROPERTIES=http://localhost/cdn/movinin/properties
VITE_MI_CDN_TEMP_PROPERTIES=http://localhost/cdn/movinin/temp/properties
VITE_MI_CDN_LOCATIONS=http://localhost/cdn/movinin/locations
VITE_MI_CDN_TEMP_LOCATIONS=http://localhost/cdn/movinin/temp/locations
VITE_MI_AGENCY_IMAGE_WIDTH=60
VITE_MI_AGENCY_IMAGE_HEIGHT=30
VITE_MI_PROPERTY_IMAGE_WIDTH=300
VITE_MI_PROPERTY_IMAGE_HEIGHT=200
VITE_MI_MINIMUM_AGE=21
VITE_MI_PAGINATION_MODE=classic
VITE_MI_CURRENCY=\$
VITE_MI_WEBSITE_NAME="Movin' In"
1 change: 1 addition & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ VITE_MI_PROPERTY_IMAGE_HEIGHT=200
VITE_MI_MINIMUM_AGE=21
VITE_MI_PAGINATION_MODE=classic
VITE_MI_CURRENCY=\$
VITE_MI_WEBSITE_NAME="Movin' In"
4 changes: 2 additions & 2 deletions backend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="BookCars Rental Service" />
<title>Movin' In Rental Service</title>
<meta name="description" content="<%= WEBSITE_NAME %> Rental Service" />
<title><%= WEBSITE_NAME %> Rental Service</title>
</head>

<body>
Expand Down
Loading

0 comments on commit 7d85bbe

Please sign in to comment.