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,12 +1,12 @@
|
||||
{% extends "layouts/base.html" %}
|
||||
{% block title %}Contracts - TryoutPro{% endblock %}
|
||||
{% block page_title %}Contracts{% endblock %}
|
||||
{% block title %}{{ _('Contracts') }} - TryoutPro{% endblock %}
|
||||
{% block page_title %}{{ _('Contracts') }}{% endblock %}
|
||||
{% block breadcrumb %}<span class="breadcrumb">Home / <a href="{{ url_for('users.profile') }}">Profile</a> / Contracts</span>{% endblock %}
|
||||
|
||||
{% block header_actions %}
|
||||
{% if current_user.role in ['admin', 'manager', 'coach'] %}
|
||||
<a href="{{ url_for('users.upload_contract') }}" class="btn btn-primary">
|
||||
<i class="fas fa-upload"></i> Upload Contract
|
||||
<i class="fas fa-upload"></i> {{ _('Upload Contract') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -14,7 +14,7 @@
|
||||
{% block content %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-file-contract"></i> Contract Dropbox</h3>
|
||||
<h3><i class="fas fa-file-contract"></i> {{ _('Contract Dropbox') }}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if contracts %}
|
||||
@@ -22,12 +22,12 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Player</th>
|
||||
<th>Team</th>
|
||||
<th>Contract</th>
|
||||
<th>Status</th>
|
||||
<th>Uploaded</th>
|
||||
<th>Actions</th>
|
||||
<th>{{ _('Player') }}</th>
|
||||
<th>{{ _('Team') }}</th>
|
||||
<th>{{ _('Contract') }}</th>
|
||||
<th>{{ _('Status') }}</th>
|
||||
<th>{{ _('Uploaded') }}</th>
|
||||
<th>{{ _('Actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -46,17 +46,17 @@
|
||||
<td>{{ contract.uploaded_at.strftime('%Y-%m-%d %H:%M') }}</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="{{ url_for('users.download_contract', contract_id=contract.id) }}" class="btn btn-sm btn-primary" title="Download">
|
||||
<i class="fas fa-download"></i> Download
|
||||
<a href="{{ url_for('users.download_contract', contract_id=contract.id) }}" class="btn btn-sm btn-primary" title="{{ _('Download') }}">
|
||||
<i class="fas fa-download"></i> {{ _('Download') }}
|
||||
</a>
|
||||
{% if contract.signed_file_path %}
|
||||
<a href="{{ url_for('users.download_signed_contract', contract_id=contract.id) }}" class="btn btn-sm btn-success" title="Download Signed">
|
||||
<i class="fas fa-file-signature"></i> Signed
|
||||
<a href="{{ url_for('users.download_signed_contract', contract_id=contract.id) }}" class="btn btn-sm btn-success" title="{{ _('Download Signed') }}">
|
||||
<i class="fas fa-file-signature"></i> {{ _('Signed') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if current_user.role == 'player' and contract.status == 'pending' %}
|
||||
<button class="btn btn-sm btn-warning" data-action="show-upload-signed" data-contract-id="{{ contract.id }}" title="Upload Signed Contract">
|
||||
<i class="fas fa-upload"></i> Return Signed
|
||||
<button class="btn btn-sm btn-warning" data-action="show-upload-signed" data-contract-id="{{ contract.id }}" title="{{ _('Upload Signed Contract') }}">
|
||||
<i class="fas fa-upload"></i> {{ _('Return Signed') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -69,11 +69,11 @@
|
||||
{% else %}
|
||||
<div class="empty-state">
|
||||
<i class="fas fa-file-contract"></i>
|
||||
<h4>No contracts found</h4>
|
||||
<h4>{{ _('No contracts found') }}</h4>
|
||||
{% if current_user.role == 'player' %}
|
||||
<p>No contracts have been uploaded for you yet. Contact your coach or manager.</p>
|
||||
<p>{{ _('No contracts have been uploaded for you yet. Contact your coach or manager.') }}</p>
|
||||
{% else %}
|
||||
<p>No contracts have been uploaded yet. Upload a contract using the button above.</p>
|
||||
<p>{{ _('No contracts have been uploaded yet. Upload a contract using the button above.') }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -86,20 +86,20 @@
|
||||
<div class="modal-backdrop" data-action="hide-upload-signed"></div>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3>Upload Signed Contract</h3>
|
||||
<h3>{{ _('Upload Signed Contract') }}</h3>
|
||||
<button class="modal-close" data-action="hide-upload-signed">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="uploadSignedForm" method="POST" enctype="multipart/form-data" class="form">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
<div class="form-group">
|
||||
<label for="signed_file">Select Signed Contract File</label>
|
||||
<label for="signed_file">{{ _('Select Signed Contract File') }}</label>
|
||||
<input type="file" id="signed_file" name="signed_file" accept=".pdf,.doc,.docx,.jpg,.jpeg,.png" required>
|
||||
<small class="form-text text-muted">Accepted formats: PDF, DOC, DOCX, JPG, PNG</small>
|
||||
<small class="form-text text-muted">{{ _('Accepted formats: PDF, DOC, DOCX, JPG, PNG') }}</small>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="button" class="btn btn-secondary" data-action="hide-upload-signed">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Upload Signed Contract</button>
|
||||
<button type="button" class="btn btn-secondary" data-action="hide-upload-signed">{{ _('Cancel') }}</button>
|
||||
<button type="submit" class="btn btn-primary">{{ _('Upload Signed Contract') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user