Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMulein committed Dec 12, 2024
1 parent 3e3f12a commit a1b5459
Show file tree
Hide file tree
Showing 36 changed files with 1,409 additions and 901 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
"forwardPorts": [27017],
"forwardPorts": [27017, 3000],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./setup-nvm.sh && ./fontawesome-npmrc.sh && ./do-yarn.sh && git config --global --add safe.directory /workspace",
Expand Down
Binary file modified .yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion chili-and-cilantro-api/src/controllers/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export abstract class BaseController {
private activeResponse: Response | null = null;
public readonly application: IApplication;

protected constructor(application: IApplication) {
public constructor(application: IApplication) {
this.application = application;
this.router = Router();
this.initializeRoutes();
Expand Down
9 changes: 7 additions & 2 deletions chili-and-cilantro-api/src/middlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ export class Middlewares {
useDefaults: false,
directives: {
defaultSrc: ["'self'"],
imgSrc: ["'self'"],
imgSrc: ["'self'", 'https://flagcdn.com'],
connectSrc: ["'self'"],
scriptSrc: ["'self'", "'unsafe-inline'"],
styleSrc: ["'self'", "'unsafe-inline'"],
styleSrc: [
"'self'",
"'unsafe-inline'",
'https://fonts.googleapis.com',
],
fontSrc: ["'self'", 'https://fonts.gstatic.com'],
frameSrc: ["'self'"],
},
},
Expand Down
4 changes: 4 additions & 0 deletions chili-and-cilantro-api/src/routers/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { IApplication } from '@chili-and-cilantro/chili-and-cilantro-node-lib';
import { GameController } from '../controllers/api/game';
import { I18nController } from '../controllers/api/i18n';
import { UserController } from '../controllers/api/user';
import { BaseRouter } from './base';

Expand All @@ -9,10 +10,13 @@ import { BaseRouter } from './base';
export class ApiRouter extends BaseRouter {
private readonly userController: UserController;
private readonly gameController: GameController;
private readonly i18nController: I18nController;
constructor(application: IApplication) {
super(application);
this.userController = new UserController(application);
this.gameController = new GameController(application);
this.i18nController = new I18nController(application);
this.router.use('/i18n', this.i18nController.router);
this.router.use('/user', this.userController.router);
this.router.use('/game', this.gameController.router);
}
Expand Down
1 change: 1 addition & 0 deletions chili-and-cilantro-lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export * from './lib/interfaces/objects/game';
export * from './lib/interfaces/objects/user';
export * from './lib/interfaces/request-user';
export * from './lib/interfaces/round-bids';
export * from './lib/interfaces/success-message';
export * from './lib/interfaces/token-user';
export * from './lib/language-codes';
export * from './lib/shared-types';
Expand Down
26 changes: 26 additions & 0 deletions chili-and-cilantro-lib/src/lib/enumerations/string-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,41 @@
* For consistency, the left side should match the right, give or take CamelCase on the left and snake case (e.g. common_blahBlah) on the right
*/
export enum StringNames {
ChangePassword_ChangePasswordButton = 'changePassword_changePasswordButton',
Common_ChangePassword = 'common_changePassword',
Common_CurrentPassword = 'common_currentPassword',
Common_Logo = 'common_logo',
Common_NewPassword = 'common_newPassword',
Common_ConfirmNewPassword = 'common_confirmNewPassword',
Common_Dashboard = 'common_dashboard',
Common_Loading = 'common_loading',
Common_ReturnToKitchen = 'common_returnToKitchen',
Common_Site = 'common_site',
Common_StartCooking = 'common_startCooking',
Common_Tagline = 'common_tagline',
Common_Unauthorized = 'common_unauthorized',
Common_UnexpectedError = 'common_unexpectedError',
ForgotPassword_Title = 'forgotPassword_title',
KeyFeatures_Title = 'keyFeatures_title',
KeyFeatures_1 = 'keyFeatures_1',
KeyFeatures_2 = 'keyFeatures_2',
KeyFeatures_3 = 'keyFeatures_3',
KeyFeatures_4 = 'keyFeatures_4',
KeyFeatures_5 = 'keyFeatures_5',
KeyFeatures_6 = 'keyFeatures_6',
KeyFeatures_7 = 'keyFeatures_7',
KeyFeatures_8 = 'keyFeatures_8',
Login_LoginButton = 'login_loginButton',
LogoutButton = 'logoutButton',
RegisterButton = 'registerButton',
Splash_Description = 'splash_description',
Splash_HowToPlay = 'splash_howToPlay',
ValidationError = 'validationError',
Validation_InvalidToken = 'validation_invalidToken',
Validation_PasswordRegexError = 'validation_passwordRegexError',
Validation_CurrentPasswordRequired = 'validation_currentPasswordRequired',
Validation_PasswordsDifferent = 'validation_passwordsDifferent',
Validation_NewPasswordRequired = 'validation_newPasswordRequired',
Validation_PasswordMatch = 'validation_passwordMatch',
Validation_ConfirmNewPassword = 'validation_confirmNewPassword',
}
4 changes: 4 additions & 0 deletions chili-and-cilantro-lib/src/lib/interfaces/success-message.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface ISuccessMessage {
success: boolean;
message: string;
}
33 changes: 33 additions & 0 deletions chili-and-cilantro-lib/src/lib/strings/english-uk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,50 @@ import { StringsCollection } from '../shared-types';
const site = 'Chili and Cilantro';

export const BritishEnglishStrings: StringsCollection = {

Check notice on line 6 in chili-and-cilantro-lib/src/lib/strings/english-uk.ts

View workflow job for this annotation

GitHub Actions / Qodana for JS

Duplicated code fragment

Duplicated code
[StringNames.ChangePassword_ChangePasswordButton]: 'Change Password',
[StringNames.Common_ChangePassword]: 'Change Password',
[StringNames.Common_ConfirmNewPassword]: 'Confirm New Password',
[StringNames.Common_CurrentPassword]: 'Current Password',
[StringNames.Common_NewPassword]: 'New Password',
[StringNames.Common_Dashboard]: 'Dashboard',
[StringNames.Common_Loading]: 'Loading...',
[StringNames.Common_Logo]: 'logo',
[StringNames.Common_ReturnToKitchen]: 'Return to Kitchen',
[StringNames.Common_Site]: site,
[StringNames.Common_StartCooking]: 'Start Cooking',
[StringNames.Common_Tagline]: 'A Spicy Bluffing Game',
[StringNames.Common_Unauthorized]: 'Unauthorized',
[StringNames.Common_UnexpectedError]: 'Unexpected Error',
[StringNames.ForgotPassword_Title]: 'Forgot Password',
[StringNames.KeyFeatures_Title]: 'Key Features',
[StringNames.KeyFeatures_1]:
'Exciting bluffing gameplay with a culinary twist',
[StringNames.KeyFeatures_2]: 'Strategic bidding and card placement',
[StringNames.KeyFeatures_3]: 'Quick to learn, challenging to master',
[StringNames.KeyFeatures_4]: 'Supports 2 or more players',
[StringNames.KeyFeatures_5]: 'Rounds of suspenseful card flipping',
[StringNames.KeyFeatures_6]: 'Risk management: avoid the dreaded chili!',
[StringNames.KeyFeatures_7]:
'First to season two dishes or last chef standing wins',
[StringNames.KeyFeatures_8]: 'Perfect for game nights and family gatherings',
[StringNames.Login_LoginButton]: 'Login',
[StringNames.LogoutButton]: 'Logout',
[StringNames.RegisterButton]: 'Register',
[StringNames.Splash_Description]:
'In Chili and Cilantro, aspiring chefs compete to create the perfect dish. Your goal is to add just the right amount of cilantro without ruining it with a scorching chili. Be the first to successfully season two dishes or be the last chef standing to win!',
[StringNames.Splash_HowToPlay]: 'How to Play',
[StringNames.ValidationError]: 'Validation Error',
[StringNames.Validation_InvalidToken]: 'Invalid Token',
[StringNames.Validation_PasswordRegexError]:
'Password must be at least 8 characters long and include at least one letter, one number, and one special character (!@#$%^&*()_+-=[]{};\':"|,.<>/?)',
[StringNames.Validation_CurrentPasswordRequired]:
'Current password is required',
[StringNames.Validation_PasswordsDifferent]:
'New password must be different than the current password',
[StringNames.Validation_NewPasswordRequired]: 'New password is required',
[StringNames.Validation_PasswordMatch]: 'Password and confirm must match',
[StringNames.Validation_ConfirmNewPassword]:
'Confirm new password is required',
};

export default BritishEnglishStrings;
33 changes: 33 additions & 0 deletions chili-and-cilantro-lib/src/lib/strings/english-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,50 @@ import { StringsCollection } from '../shared-types';
const site = 'Chili and Cilantro';

export const AmericanEnglishStrings: StringsCollection = {
[StringNames.ChangePassword_ChangePasswordButton]: 'Change Password',
[StringNames.Common_ChangePassword]: 'Change Password',
[StringNames.Common_ConfirmNewPassword]: 'Confirm New Password',
[StringNames.Common_CurrentPassword]: 'Current Password',
[StringNames.Common_NewPassword]: 'New Password',
[StringNames.Common_Dashboard]: 'Dashboard',
[StringNames.Common_Loading]: 'Loading...',
[StringNames.Common_Logo]: 'logo',
[StringNames.Common_ReturnToKitchen]: 'Return to Kitchen',
[StringNames.Common_Site]: site,
[StringNames.Common_StartCooking]: 'Start Cooking',
[StringNames.Common_Tagline]: 'A Spicy Bluffing Game',
[StringNames.Common_Unauthorized]: 'Unauthorized',
[StringNames.Common_UnexpectedError]: 'Unexpected Error',
[StringNames.ForgotPassword_Title]: 'Forgot Password',
[StringNames.KeyFeatures_Title]: 'Key Features',
[StringNames.KeyFeatures_1]:
'Exciting bluffing gameplay with a culinary twist',
[StringNames.KeyFeatures_2]: 'Strategic bidding and card placement',
[StringNames.KeyFeatures_3]: 'Quick to learn, challenging to master',
[StringNames.KeyFeatures_4]: 'Supports 2 or more players',
[StringNames.KeyFeatures_5]: 'Rounds of suspenseful card flipping',
[StringNames.KeyFeatures_6]: 'Risk management: avoid the dreaded chili!',
[StringNames.KeyFeatures_7]:
'First to season two dishes or last chef standing wins',
[StringNames.KeyFeatures_8]: 'Perfect for game nights and family gatherings',
[StringNames.Login_LoginButton]: 'Login',
[StringNames.LogoutButton]: 'Logout',
[StringNames.RegisterButton]: 'Register',
[StringNames.Splash_Description]:
'In Chili and Cilantro, aspiring chefs compete to create the perfect dish. Your goal is to add just the right amount of cilantro without ruining it with a scorching chili. Be the first to successfully season two dishes or be the last chef standing to win!',
[StringNames.Splash_HowToPlay]: 'How to Play',
[StringNames.ValidationError]: 'Validation Error',
[StringNames.Validation_InvalidToken]: 'Invalid Token',
[StringNames.Validation_PasswordRegexError]:
'Password must be at least 8 characters long and include at least one letter, one number, and one special character (!@#$%^&*()_+-=[]{};\':"|,.<>/?)',
[StringNames.Validation_CurrentPasswordRequired]:
'Current password is required',
[StringNames.Validation_PasswordsDifferent]:
'New password must be different than the current password',
[StringNames.Validation_NewPasswordRequired]: 'New password is required',
[StringNames.Validation_PasswordMatch]: 'Password and confirm must match',
[StringNames.Validation_ConfirmNewPassword]:
'Confirm new password is required',
};

export default AmericanEnglishStrings;
38 changes: 38 additions & 0 deletions chili-and-cilantro-lib/src/lib/strings/french.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,55 @@ import { StringsCollection } from '../shared-types';
const site = 'Piment et Coriandre';

export const FrenchStrings: StringsCollection = {
[StringNames.ChangePassword_ChangePasswordButton]: 'Changer le mot de passe',
[StringNames.Common_ChangePassword]: 'Changer le mot de passe',
[StringNames.Common_ConfirmNewPassword]: 'Confirmer le nouveau mot de passe',
[StringNames.Common_CurrentPassword]: 'Mot de passe actuel',
[StringNames.Common_NewPassword]: 'Nouveau mot de passe',
[StringNames.Common_Dashboard]: 'Tableau de bord',
[StringNames.Common_Loading]: 'Chargement...',
[StringNames.Common_Logo]: 'logo',
[StringNames.Common_ReturnToKitchen]: 'Retour à la Cuisine',
[StringNames.Common_Site]: site,
[StringNames.Common_StartCooking]: 'Commencer la Cuisine',
[StringNames.Common_Tagline]: 'Un Jeu de Bluff Épicé',
[StringNames.Common_Unauthorized]: 'Non autorisé',
[StringNames.Common_UnexpectedError]: 'Erreur inattendue',
[StringNames.ForgotPassword_Title]: 'Mot de passe oublié',
[StringNames.KeyFeatures_Title]: 'Caractéristiques Principales',
[StringNames.KeyFeatures_1]:
'Un jeu de bluff passionnant avec une touche culinaire',
[StringNames.KeyFeatures_2]: 'Enchères stratégiques et placement de cartes',
[StringNames.KeyFeatures_3]: 'Rapide à apprendre, difficile à maîtriser',
[StringNames.KeyFeatures_4]: 'Prend en charge 2 joueurs ou plus',
[StringNames.KeyFeatures_5]:
'Rondes de retournement de cartes pleines de suspense',
[StringNames.KeyFeatures_6]:
'Gestion des risques : évitez le redoutable chili !',
[StringNames.KeyFeatures_7]:
'Le premier à assaisonner deux plats ou le dernier chef debout gagne',
[StringNames.KeyFeatures_8]:
'Parfait pour les soirées de jeux et les réunions de famille',
[StringNames.Login_LoginButton]: 'Connexion',
[StringNames.LogoutButton]: 'Déconnexion',
[StringNames.RegisterButton]: "S'inscrire",
[StringNames.Splash_Description]:
"Dans Chili and Cilantro, les chefs en herbe rivalisent pour créer le plat parfait. Votre objectif est d'ajouter juste la bonne quantité de coriandre sans gâcher le tout avec un piment brûlant. Soyez le premier à réussir à assaisonner deux plats ou soyez le dernier chef debout pour gagner !",
[StringNames.Splash_HowToPlay]: 'Comment Jouer',
[StringNames.ValidationError]: 'Erreur de validation',
[StringNames.Validation_InvalidToken]: 'Jeton invalide',
[StringNames.Validation_PasswordRegexError]:
'Le mot de passe doit comporter au moins 8 caractères et inclure au moins une lettre, un chiffre et un caractère spécial (!@#$%^&*()_+-=[]{};\':"|,.<>/?)',
[StringNames.Validation_CurrentPasswordRequired]:
'Le mot de passe actuel est requis',
[StringNames.Validation_PasswordsDifferent]:
'Le nouveau mot de passe doit être différent du mot de passe actuel',
[StringNames.Validation_NewPasswordRequired]:
'Le nouveau mot de passe est requis',
[StringNames.Validation_PasswordMatch]:
'Le mot de passe et la confirmation doivent correspondre',
[StringNames.Validation_ConfirmNewPassword]:
'La confirmation du nouveau mot de passe est requise',
};

export default FrenchStrings;
28 changes: 28 additions & 0 deletions chili-and-cilantro-lib/src/lib/strings/mandarin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,45 @@ import { StringsCollection } from '../shared-types';
const site = '辣椒和香菜';

export const MandarinStrings: StringsCollection = {
[StringNames.ChangePassword_ChangePasswordButton]: '更改密码',
[StringNames.Common_ChangePassword]: '更改密码',
[StringNames.Common_ConfirmNewPassword]: '确认新密码',
[StringNames.Common_CurrentPassword]: '当前密码',
[StringNames.Common_NewPassword]: '新密码',
[StringNames.Common_Dashboard]: '仪表板',
[StringNames.Common_Loading]: '加载中...',
[StringNames.Common_Logo]: '标志',
[StringNames.Common_ReturnToKitchen]: '返回厨房',
[StringNames.Common_Site]: site,
[StringNames.Common_StartCooking]: '开始烹饪',
[StringNames.Common_Tagline]: '一款辛辣的虚张声势游戏',
[StringNames.Common_Unauthorized]: '未经授权',
[StringNames.Common_UnexpectedError]: '意外错误',
[StringNames.ForgotPassword_Title]: '忘记密码',
[StringNames.KeyFeatures_Title]: '主要特点',
[StringNames.KeyFeatures_1]: '令人兴奋的虚张声势游戏,带有烹饪的扭曲',
[StringNames.KeyFeatures_2]: '战略性出价和卡片放置',
[StringNames.KeyFeatures_3]: '易学,难以掌握',
[StringNames.KeyFeatures_4]: '支持2个或更多玩家',
[StringNames.KeyFeatures_5]: '一轮轮充满悬念的纸牌游戏',
[StringNames.KeyFeatures_6]: '风险管理:避免可怕的辣椒!',
[StringNames.KeyFeatures_7]: '首先调味两道菜或最后一位厨师站起来赢得胜利',
[StringNames.KeyFeatures_8]: '适合游戏之夜和家庭聚会',
[StringNames.Login_LoginButton]: '登录',
[StringNames.LogoutButton]: '注销',
[StringNames.RegisterButton]: '注册',
[StringNames.Splash_Description]:
'在《辣椒和香菜》中,有抱负的厨师们竞相制作完美的菜肴。你的目标是添加适量的香菜,而不会让辣椒烧焦。成为第一个成功调味两道菜的人,或者成为最后一个获胜的厨师',
[StringNames.Splash_HowToPlay]: '如何玩',
[StringNames.ValidationError]: '验证错误',
[StringNames.Validation_InvalidToken]: '无效令牌',
[StringNames.Validation_PasswordRegexError]:
'密码必须至少8个字符长且包含至少一个字母、一个数字和一个特殊字符(!@#$%^&*()_+-=[]{};:"|,.<>/?)',
[StringNames.Validation_CurrentPasswordRequired]: '当前密码是必需的',
[StringNames.Validation_PasswordsDifferent]: '新密码必须不同于当前密码',
[StringNames.Validation_NewPasswordRequired]: '新密码是必需的',
[StringNames.Validation_PasswordMatch]: '密码和确认必须匹配',
[StringNames.Validation_ConfirmNewPassword]: '确认新密码是必需的',
};

export default MandarinStrings;
36 changes: 36 additions & 0 deletions chili-and-cilantro-lib/src/lib/strings/spanish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,53 @@ import { StringsCollection } from '../shared-types';
const site = 'Chili y Cilantro';

export const SpanishStrings: StringsCollection = {
[StringNames.ChangePassword_ChangePasswordButton]: 'Cambiar contraseña',
[StringNames.Common_ChangePassword]: 'Cambiar contraseña',
[StringNames.Common_ConfirmNewPassword]: 'Confirmar nueva contraseña',
[StringNames.Common_CurrentPassword]: 'Contraseña actual',
[StringNames.Common_NewPassword]: 'Nueva contraseña',
[StringNames.Common_Dashboard]: 'Tablero',
[StringNames.Common_Loading]: 'Cargando...',
[StringNames.Common_Logo]: 'logo',
[StringNames.Common_ReturnToKitchen]: 'Volver a la Cocina',
[StringNames.Common_Site]: site,
[StringNames.Common_StartCooking]: 'Comenzar a cocinar',
[StringNames.Common_Tagline]: 'Un Juego de Bluff Picante',
[StringNames.Common_Unauthorized]: 'No autorizado',
[StringNames.Common_UnexpectedError]: 'Error inesperado',
[StringNames.ForgotPassword_Title]: 'Contraseña olvidada',
[StringNames.KeyFeatures_Title]: 'Características Clave',
[StringNames.KeyFeatures_1]:
'Emocionante juego de faroleo con un toque culinario',
[StringNames.KeyFeatures_2]: 'Pujas estratégicas y colocación de cartas',
[StringNames.KeyFeatures_3]: 'Rápido de aprender, desafiante de dominar',
[StringNames.KeyFeatures_4]: 'Admite 2 o más jugadores',
[StringNames.KeyFeatures_5]: 'Rondas de volteo de cartas llenas de suspenso',
[StringNames.KeyFeatures_6]: 'Gestión de riesgos: ¡evita el temido chile!',
[StringNames.KeyFeatures_7]:
'El primero en condimentar dos platos o el último chef en pie gana',
[StringNames.KeyFeatures_8]:
'Perfecto para noches de juegos y reuniones familiares',
[StringNames.Login_LoginButton]: 'Iniciar sesión',
[StringNames.LogoutButton]: 'Cerrar sesión',
[StringNames.RegisterButton]: 'Registrarse',
[StringNames.Splash_Description]:
'En Chili and Cilantro, los aspirantes a chef compiten para crear el plato perfecto. Tu objetivo es agregar la cantidad justa de cilantro sin arruinarlo con un chile abrasador. ¡Sé el primero en condimentar con éxito dos platos o sé el último chef en pie para ganar!',
[StringNames.Splash_HowToPlay]: 'Como Jugar',
[StringNames.ValidationError]: 'Error de validación',
[StringNames.Validation_InvalidToken]: 'Token inválido',
[StringNames.Validation_PasswordRegexError]:
'La contraseña debe tener al menos 8 caracteres y incluir al menos una letra, un número y un carácter especial (!@#$%^&*()_+-=[]{};\':"|,.<>/?)',
[StringNames.Validation_CurrentPasswordRequired]:
'Se requiere la contraseña actual',
[StringNames.Validation_PasswordsDifferent]:
'La nueva contraseña debe ser diferente a la contraseña actual',
[StringNames.Validation_NewPasswordRequired]:
'Se requiere la nueva contraseña',
[StringNames.Validation_PasswordMatch]:
'La contraseña y la confirmación deben coincidir',
[StringNames.Validation_ConfirmNewPassword]:
'Se requiere la confirmación de la nueva contraseña',
};

export default SpanishStrings;
Loading

0 comments on commit a1b5459

Please sign in to comment.