Mise en place de l'anglais comme deuxième langue pour l'application
Some checks failed
Build & Push Images / build (brain) (push) Has been cancelled
Build & Push Images / build (core) (push) Has been cancelled
Build & Push Images / build (web) (push) Has been cancelled
Build & Push Images / build-switcher (push) Has been cancelled

This commit is contained in:
2026-06-14 16:24:05 +02:00
parent 6e75326779
commit af3a6d443c
198 changed files with 7801 additions and 1720 deletions

View File

@@ -2,6 +2,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { LucideAngularModule, Plus, Trash2, ChevronDown, ChevronUp, GitBranch, X } from 'lucide-angular';
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
import { Room, RoomBranch } from '../../services/campaign.model';
import { Enemy } from '../../services/enemy.model';
import { EnemyLinkPickerComponent } from '../enemy-link-picker/enemy-link-picker.component';
@@ -17,7 +18,7 @@ import { EnemyLinkPickerComponent } from '../enemy-link-picker/enemy-link-picker
*/
@Component({
selector: 'app-rooms-editor',
imports: [FormsModule, LucideAngularModule, EnemyLinkPickerComponent],
imports: [FormsModule, LucideAngularModule, EnemyLinkPickerComponent, TranslatePipe],
templateUrl: './rooms-editor.component.html',
styleUrls: ['./rooms-editor.component.scss']
})
@@ -30,6 +31,8 @@ export class RoomsEditorComponent {
@Input() campaignId = '';
@Output() roomsChange = new EventEmitter<Room[]>();
constructor(private translate: TranslateService) {}
readonly Plus = Plus;
readonly Trash2 = Trash2;
readonly ChevronDown = ChevronDown;
@@ -57,7 +60,7 @@ export class RoomsEditorComponent {
: 0;
const newRoom: Room = {
id: this.newId(),
name: `Salle ${this.rooms.length + 1}`,
name: this.translate.instant('roomsEditor.defaultRoomName', { n: this.rooms.length + 1 }),
order: nextOrder,
branches: []
};
@@ -89,7 +92,7 @@ export class RoomsEditorComponent {
addBranch(room: Room): void {
const others = this.rooms.filter(r => r.id !== room.id);
const branch: RoomBranch = {
label: 'Porte',
label: this.translate.instant('roomsEditor.defaultBranchLabel'),
targetRoomId: others[0]?.id ?? '',
condition: ''
};