feat(i18n): traduire l'ensemble des gabarits
Le site s'affiche desormais integralement en francais. 483 chaines, aucune non traduite, dans les deux catalogues. Couvert : navigation et mise en page partagee, connexion, les cinq pages d'erreur, et les 29 gabarits de pages. Methode Marquage semi-automatique, conservateur par construction : seuls des motifs sans ambiguite sont balises -- contenu de balises de texte, attributs placeholder/title/aria-label, texte suivant une icone, blocs title et page_title -- et tout contenu comportant du Jinja ou du balisage imbrique est laisse de cote. Deux passes, la seconde pour td, li, h6, strong, em et caption. 97 entrees etaient marquees fuzzy par pybabel update, c'est-a-dire devinees par similarite. Une entree fuzzy est **ignoree a l'execution** : elles ont donc ete traitees comme non traduites, et le drapeau retire une fois la traduction ecrite. Deux pieges rencontres, tous deux documentes dans docs/translations.md Une entite HTML n'est pas du texte. ×, utilise comme libelle de bouton de fermeture, a ete balise par la passe automatique. Jinja l'echappait alors en &times; et le bouton aurait affiche le texte litteral × au lieu de la croix. Corrige dans cinq gabarits. Huit chaines subsistent dans des blocs <script>. Elles fonctionnent mais restent fragiles : Jinja echappe & < > " ' dans un bloc script, et ces entites n'y sont pas decodees -- une traduction contenant une apostrophe droite arriverait dans la chaine JavaScript sous la forme '. Le francais retenu utilise des apostrophes typographiques, non echappees, donc l'existant est sur. Toute nouvelle chaine a cet endroit devra passer par un attribut data- ou un bloc <script type="application/json">. Vocabulaire retenu -- a valider avec le club tryout -> selection · manager -> gerant · coach -> coach (conserve, terme d'usage en e-sport) · scout -> recruteur · email -> courriel · scrim -> scrim. Les noms de jeux et les postes (Support, Duelist, AWPer) restent en anglais : ce sont les termes employes par les joueurs. Ces choix vivent dans un seul catalogue, donc chacun se change en un endroit. Reste a faire : les messages flash hors routes/auth.py, et les messages de validation de app/validators.py, qui necessitent lazy_gettext puisque les champs de schema sont construits a l'import. Verifie : 13 pages parcourues dans les deux langues, aucune ne laisse de marqueur Jinja non evalue ni d'entite doublement echappee. 193 tests. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{% extends "layouts/base.html" %}
|
||||
{% block title %}Notes - TryoutPro{% endblock %}
|
||||
{% block page_title %}Notes{% endblock %}
|
||||
{% block title %}{{ _('Notes') }} - TryoutPro{% endblock %}
|
||||
{% block page_title %}{{ _('Notes') }}{% endblock %}
|
||||
{% block breadcrumb %}<span class="breadcrumb">Home / Notes</span>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -9,7 +9,7 @@
|
||||
{% if org_team %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-users"></i> Team Notes</h3>
|
||||
<h3><i class="fas fa-users"></i> {{ _('Team Notes') }}</h3>
|
||||
<span class="badge badge-esport">{{ org_team.name }}</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -17,9 +17,9 @@
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="team_notes_content">Team Notes Content</label>
|
||||
<textarea name="content" id="team_notes_content" class="form-textarea" rows="4" placeholder="Enter improvement suggestions and notes for your team...">{{ latest_team_note.content if latest_team_note else '' }}</textarea>
|
||||
<p class="form-text">These notes will be visible to all players on your team.</p>
|
||||
<label for="team_notes_content">{{ _('Team Notes Content') }}</label>
|
||||
<textarea name="content" id="team_notes_content" class="form-textarea" rows="4" placeholder="{{ _('Enter improvement suggestions and notes for your team...') }}">{{ latest_team_note.content if latest_team_note else '' }}</textarea>
|
||||
<p class="form-text">{{ _('These notes will be visible to all players on your team.') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
@@ -35,7 +35,7 @@
|
||||
<!-- Add Personal Note Section -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-user-friends"></i> Add Personal Note</h3>
|
||||
<h3><i class="fas fa-user-friends"></i> {{ _('Add Personal Note') }}</h3>
|
||||
{% if org_team %}
|
||||
<span class="badge badge-esport">{{ org_team.name }}</span>
|
||||
{% endif %}
|
||||
@@ -45,9 +45,9 @@
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="player_id">Select Player</label>
|
||||
<label for="player_id">{{ _('Select Player') }}</label>
|
||||
<select name="player_id" id="player_id" class="form-select" required>
|
||||
<option value="">-- Select a Player --</option>
|
||||
<option value="">{{ _('-- Select a Player --') }}</option>
|
||||
{% for player in players %}
|
||||
<option value="{{ player.id }}">{{ player.username }}</option>
|
||||
{% endfor %}
|
||||
@@ -55,38 +55,38 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="note_content">Note Content</label>
|
||||
<textarea name="content" id="note_content" class="form-textarea" rows="3" placeholder="Enter personal feedback or coaching tips for this player..." required></textarea>
|
||||
<p class="form-text">These notes will only be visible to the selected player.</p>
|
||||
<label for="note_content">{{ _('Note Content') }}</label>
|
||||
<textarea name="content" id="note_content" class="form-textarea" rows="3" placeholder="{{ _('Enter personal feedback or coaching tips for this player...') }}" required></textarea>
|
||||
<p class="form-text">{{ _('These notes will only be visible to the selected player.') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="context">Context (Optional)</label>
|
||||
<p class="form-text text-muted">Link this note to a specific match, tryout, or team for better organization.</p>
|
||||
<label for="context">{{ _('Context (Optional)') }}</label>
|
||||
<p class="form-text text-muted">{{ _('Link this note to a specific match, tryout, or team for better organization.') }}</p>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="note_match_id">Match</label>
|
||||
<label for="note_match_id">{{ _('Match') }}</label>
|
||||
<select name="match_id" id="note_match_id" class="form-select">
|
||||
<option value="">-- Select Match --</option>
|
||||
<option value="">{{ _('-- Select Match --') }}</option>
|
||||
{% for match in matches %}
|
||||
<option value="{{ match.id }}">{{ match.title }} - {{ match.date.strftime('%m/%d/%Y') }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="note_tryout_id">Tryout</label>
|
||||
<label for="note_tryout_id">{{ _('Tryout') }}</label>
|
||||
<select name="tryout_id" id="note_tryout_id" class="form-select">
|
||||
<option value="">-- Select Tryout --</option>
|
||||
<option value="">{{ _('-- Select Tryout --') }}</option>
|
||||
{% for tryout in tryouts %}
|
||||
<option value="{{ tryout.id }}">{{ tryout.title }} - {{ tryout.date.strftime('%m/%d/%Y') }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="note_team_id">Team</label>
|
||||
<label for="note_team_id">{{ _('Team') }}</label>
|
||||
<select name="team_id" id="note_team_id" class="form-select">
|
||||
<option value="">-- Select Team --</option>
|
||||
<option value="">{{ _('-- Select Team --') }}</option>
|
||||
{% for team in teams %}
|
||||
<option value="{{ team.id }}">{{ team.name }}</option>
|
||||
{% endfor %}
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-save"></i> Add Note
|
||||
<i class="fas fa-save"></i> {{ _('Add Note') }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -108,7 +108,7 @@
|
||||
<!-- One on One Requests Section -->
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-calendar-check"></i> One on One Requests</h3>
|
||||
<h3><i class="fas fa-calendar-check"></i> {{ _('One on One Requests') }}</h3>
|
||||
{% if org_team %}
|
||||
<span class="badge badge-esport">{{ org_team.name }}</span>
|
||||
{% endif %}
|
||||
@@ -119,12 +119,12 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Player</th>
|
||||
<th>Date</th>
|
||||
<th>Time</th>
|
||||
<th>Discussion Points</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
<th>{{ _('Player') }}</th>
|
||||
<th>{{ _('Date') }}</th>
|
||||
<th>{{ _('Time') }}</th>
|
||||
<th>{{ _('Discussion Points') }}</th>
|
||||
<th>{{ _('Status') }}</th>
|
||||
<th>{{ _('Actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -147,12 +147,12 @@
|
||||
{% if req.status == 'pending' %}
|
||||
<form method="POST" action="{{ url_for('users.accept_one_on_one', request_id=req.id) }}" style="display:inline;">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
<button type="submit" class="btn btn-sm btn-success" title="Accept">
|
||||
<i class="fas fa-check"></i> Accept
|
||||
<button type="submit" class="btn btn-sm btn-success" title="{{ _('Accept') }}">
|
||||
<i class="fas fa-check"></i> {{ _('Accept') }}
|
||||
</button>
|
||||
</form>
|
||||
<button type="button" class="btn btn-sm btn-danger" data-action="show-reject-modal" data-request-id="{{ req.id }}" title="Refuse">
|
||||
<i class="fas fa-times"></i> Refuse
|
||||
<button type="button" class="btn btn-sm btn-danger" data-action="show-reject-modal" data-request-id="{{ req.id }}" title="{{ _('Refuse') }}">
|
||||
<i class="fas fa-times"></i> {{ _('Refuse') }}
|
||||
</button>
|
||||
{% elif req.status == 'rejected' and req.coach_rejection_message %}
|
||||
<span class="text-muted small" title="{{ req.coach_rejection_message }}">Reason: {{ req.coach_rejection_message[:50] }}{% if req.coach_rejection_message|length > 50 %}...{% endif %}</span>
|
||||
@@ -164,7 +164,7 @@
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-muted">No One on One requests from your players yet.</p>
|
||||
<p class="text-muted">{{ _('No One on One requests from your players yet.') }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -174,20 +174,20 @@
|
||||
<div class="modal-overlay" data-action="hide-reject-modal"></div>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4><i class="fas fa-times-circle"></i> Reject One on One Request</h4>
|
||||
<h4><i class="fas fa-times-circle"></i> {{ _('Reject One on One Request') }}</h4>
|
||||
<button type="button" class="modal-close" data-action="hide-reject-modal">×</button>
|
||||
</div>
|
||||
<form id="rejectForm" method="POST" action="">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="rejection_reason">Reason for rejection (optional):</label>
|
||||
<textarea name="rejection_reason" id="rejection_reason" class="form-textarea" rows="3" placeholder="Let the player know why this time doesn't work..."></textarea>
|
||||
<label for="rejection_reason">{{ _('Reason for rejection (optional):') }}</label>
|
||||
<textarea name="rejection_reason" id="rejection_reason" class="form-textarea" rows="3" placeholder="{{ _('Let the player know why this time doesn\'t work...') }}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-action="hide-reject-modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-danger">Reject Request</button>
|
||||
<button type="button" class="btn btn-secondary" data-action="hide-reject-modal">{{ _('Cancel') }}</button>
|
||||
<button type="submit" class="btn btn-danger">{{ _('Reject Request') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -198,14 +198,14 @@
|
||||
{% if org_team and team_notes %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-history"></i> Team Notes History</h3>
|
||||
<h3><i class="fas fa-history"></i> {{ _('Team Notes History') }}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Last Updated</th>
|
||||
<th>Content Preview</th>
|
||||
<th>{{ _('Last Updated') }}</th>
|
||||
<th>{{ _('Content Preview') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -225,7 +225,7 @@
|
||||
{% if personal_notes %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-sticky-note"></i> Recent Personal Notes</h3>
|
||||
<h3><i class="fas fa-sticky-note"></i> {{ _('Recent Personal Notes') }}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="detail-grid">
|
||||
@@ -240,13 +240,13 @@
|
||||
{% if note.match_id or note.team_id or note.tryout_id %}
|
||||
<div class="mt-2">
|
||||
{% if note.match_id and note.match %}
|
||||
<span class="badge badge-info" title="From match"><i class="fas fa-futbol"></i> {{ note.match.title }}</span>
|
||||
<span class="badge badge-info" title="{{ _('From match') }}"><i class="fas fa-futbol"></i> {{ note.match.title }}</span>
|
||||
{% endif %}
|
||||
{% if note.team_id and note.team %}
|
||||
<span class="badge badge-warning" title="From team"><i class="fas fa-users"></i> {{ note.team.name }}</span>
|
||||
<span class="badge badge-warning" title="{{ _('From team') }}"><i class="fas fa-users"></i> {{ note.team.name }}</span>
|
||||
{% endif %}
|
||||
{% if note.tryout_id and note.tryout %}
|
||||
<span class="badge badge-success" title="From tryout"><i class="fas fa-calendar-alt"></i> {{ note.tryout.title }}</span>
|
||||
<span class="badge badge-success" title="{{ _('From tryout') }}"><i class="fas fa-calendar-alt"></i> {{ note.tryout.title }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user