Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all interface messages translatable #77

Merged
merged 6 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@

"stats-summary": "$1 {{PLURAL:$2|person|people}} {{PLURAL:$2|has|have}} taken part in $3 {{PLURAL:$4|contest|contests}}.",

"home-description": "This is a tool for running Wikisouce proofreading contests (especially the annual <em>Wikisource Anniversary Proofreading Contest</em>, WAPC).",
"home-instructions": "During a contest people can help <a href=\"https://en.wikisource.org/wiki/Help:Proofread\">proofread</a> and <a href=\"https://en.wikisource.org/wiki/Help:Beginner%27s_guide_to_validation\">validate</a> book pages on Wikisouces. For each page either proofread or validated the participant gain points. At the end of the contest, a prize is awarded to the Wikisourceror with the most points. Second and third-place prize are awarded with a random drawing from all the remaining contestants: each point that you gained during the contest is like a lottery ticket, so the more points you have gained during the contest (that is, the more pages you have proofread or validated), the more chances you have to win.",
"home-score-components": "There are three components to the score: 1) the total <em>Points</em>; 2) the total number of <em>Validations</em> performed; and 3) the total number of constructive <em>Contributions</em> of all sorts.",
"scoring-system": "Scoring system",
"action-taken": "Action taken",
"home-table-row-proofread": "From any status to Proofread:",
"home-table-row-validated": "From Proofread to Validated:",
"home-table-row-validated-demoted": "If a Validated page is demoted:",
"home-table-row-proofread-demoted": "If a Proofread page is demoted:",

"full-url-to-index-pages": "Full URLs to Index pages, one per line.",
"edit": "Edit",
"admins": "Admins",
"404-not-found": "404 Not Found",
"requested-page-does-not-exist": "The requested page does not exist.",
"all-contests": "All contests",
"your-contests": "Your contests",
"recently-ended-contests": "Recently ended contests",
Expand Down Expand Up @@ -59,6 +74,7 @@
"validations": "Validations",
"index-page": "Index page",
"index-pages": "Index pages",
"index-pages-label": "Index pages:",
"user-results": "User results",
"revision": "Revision",
"date": "Date",
Expand Down
15 changes: 15 additions & 0 deletions i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@
"app-title": "Title of the tool.",
"homepage": "Link text to navigate to the home page.",
"contests": "Link text to navigate to the contest-list page.",
"home-description": "Description of the tool on the home page. Explains that the tool is used for Wikisource proofreading contests.",
"home-instructions": "Explains what participants do during contests and links to Wikisource guides.",
"home-score-components": "Introductory text about the scoring system components.",
"scoring-system": "Table Caption displayed on top of scoring system table on home page",
"action-taken": "Table Header text of 'action taken' on scoring system table",
"home-table-row-proofread": "Table Row text of 'From any status to Proofread:' on scoring system table",
"home-table-row-validated": "Table Row text of 'From Proofread to Validated:' on scoring system table",
"home-table-row-validated-demoted": "Table Row text of 'If a Validated page is demoted:' on scoring system table",
"home-table-row-proofread-demoted": "Table Row text of 'If a Proofread page is demoted:' on scoring system table",
"404-not-found": "Heading Text displaying the page was not found",
"requested-page-does-not-exist": "Text stating that the requested page does not exist.",
"full-url-to-index-pages": "Text Label stating 'Full URLs to Index pages, one per line.'",
"admins": "Text Label for Admins",
"edit": "Text Label for Edit",
"login": "Link to log in.",
"logged-in-as": "Informative sentence about the currently logged-in user. $1 is the username.",
"logout": "Link to log out.",
Expand Down Expand Up @@ -56,6 +70,7 @@
"validations": "Table header of the user details' table.",
"index-page": "Table header of the user details' table.",
"index-pages": "Section header for the list of index pages.",
"index-pages-label": "Label for the list of index pages.",
"user-results": "Breadcrumb text for the user results page.",
"revision": "Table header of the user details' table.",
"date": "Table header of the user details' table.\n{{Identical|Date}}",
Expand Down
4 changes: 2 additions & 2 deletions templates/bundles/TwigBundle/Exception/error404.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block main %}
<div class="alert alert-warning">
<h2>404 Not Found</h2>
<p>The requested page does not exist.</p>
<h2>{{ msg('404-not-found') }}</h2>
<p>{{ msg('requested-page-does-not-exist') }}</p>
</div>
{% endblock %}
6 changes: 3 additions & 3 deletions templates/contests_edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
</div>
<div class="row">
<p class="col-md-6 form-group">
<label for="index_pages" class="fw-bold">Index pages:</label>
<label for="index_pages" class="fw-bold">{{ msg('index-pages-label') }}</label>
<textarea id="index_pages" name="index_pages" class="form-control" rows="12">{{ index_pages }}</textarea>
<span class="text-muted">Full URLs to Index pages, one per line.</span>
<span class="text-muted">{{ msg('full-url-index-pages') }}</span>
</p>
<p class="col-md-3 form-group">
<label for="admins" class="fw-bold">Admins:</label>
<label for="admins" class="fw-bold">{{ msg('admins') }}:</label>
<textarea id="admins" name="admins" class="form-control" rows="12" required>{{ admins }}</textarea>
<span class="text-muted">{{ msg('one-username-per-line') }}</span>
</p>
Expand Down
2 changes: 1 addition & 1 deletion templates/contests_view.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<p>
<a href="{{ path('contests_view', {id: contest.id, format: 'wikitext'}) }}" class="btn btn-light border">{{ msg('wikitext-scores') }}</a>
<a class="btn btn-light border {% if not can_edit %}disabled{% endif %}" href="{{ path('contests_edit', {id: contest.id}) }}">Edit</a>
<a class="btn btn-light border {% if not can_edit %}disabled{% endif %}" href="{{ path('contests_edit', {id: contest.id}) }}">{{ msg('edit') }}</a>
</p>

<h3 id="index_pages">{{ msg('index-pages') }}</h3>
Expand Down
35 changes: 9 additions & 26 deletions templates/home.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,19 @@
{{ msg('stats-summary', [ people|number_format, people, contests|number_format, contests ] ) }}
</p>

<p>
This is a tool for running Wikisouce proofreading contests
(especially the annual <em>Wikisource Anniversary Proofreading Contest</em>, WAPC).
</p>
<p>{{ msg('home-description') }}</p>

<p>
During a contest people can help <a href="https://en.wikisource.org/wiki/Help:Proofread">proofread</a>
and <a href="https://en.wikisource.org/wiki/Help:Beginner%27s_guide_to_validation">validate</a> book pages on Wikisouces.
For each page either proofread or validated the participant gain points.
At the end of the contest, a prize is awarded to the Wikisourceror with the most points.
Second and third-place prize are awarded with a random drawing from all the remaining contestants:
each point that you gained during the contest is like a lottery ticket,
so the more points you have gained during the contest (that is, the more pages you have proofread or validated),
the more chances you have to win.
</p>
<p>{{ msg('home-instructions') }}</p>

<p>
There are three components to the score:
1) the total <em>Points</em>;
2) the total number of <em>Validations</em> performed; and
3) the total number of constructive <em>Contributions</em> of all sorts.
</p>
<p>{{ msg('home-score-components') }}</p>

<table class="table" role="table">
<caption style="caption-side: top">Scoring system</caption>
<tr><th>Action taken</th><th>Points</th><th>Validations</th><th>Contributions</th></tr>
<tr><td>From any status to Proofread:</td><td>&nbsp;3</td><td>&nbsp;0</td><td>&nbsp;1</td></tr>
<tr><td>From Proofread to Validated:</td><td>&nbsp;1</td><td>&nbsp;1</td><td>&nbsp;1</td></tr>
<tr><td>If a Validated page is demoted:</td><td>-1</td><td>-1</td><td>-1</td></tr>
<tr><td>If a Proofread page is demoted:</td><td>-3</td><td>&nbsp;0</td><td>-1</td></tr>
<caption style="caption-side: top">{{ msg('scoring-system') }}</caption>
<tr><th>{{ msg('action-taken') }}</th><th>{{ msg('points') }}</th><th>{{ msg('validations') }}</th><th>{{ msg('contributions') }}</th></tr>
<tr><td>{{ msg('home-table-row-proofread') }}</td><td>&nbsp;3</td><td>&nbsp;0</td><td>&nbsp;1</td></tr>
<tr><td>{{ msg('home-table-row-validated') }}</td><td>&nbsp;1</td><td>&nbsp;1</td><td>&nbsp;1</td></tr>
<tr><td>{{ msg('home-table-row-validated-demoted') }}</td><td>-1</td><td>-1</td><td>-1</td></tr>
<tr><td>{{ msg('home-table-row-proofread-demoted') }}</td><td>-3</td><td>&nbsp;0</td><td>-1</td></tr>
</table>

{% endblock %}