This repository has been archived by the owner on Jan 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a "backfill translations" form to the admin allowing us to backfill missing translations for responses. It's rough, but probably good enough for now.
- Loading branch information
Showing
5 changed files
with
131 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
fjord/translations/templates/admin/translations_backfill.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{% extends "admin/base_site.html" %} | ||
{% block content_title %} | ||
<h1>Translations - Maintenance - Backfill</h1> | ||
{% endblock %} | ||
|
||
{% block extrastyle %} | ||
{{ block.super }} | ||
<style type="text/css"> | ||
section { | ||
clear: both; | ||
margin: 1em 0em 1em 0em; | ||
} | ||
div#content div { | ||
margin-bottom: .5em; | ||
} | ||
</style> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<section> | ||
<p class="errornote"> | ||
Be very careful how you fill out this form. It can create lots | ||
of translation jobs. If you make a mistake, you might need an | ||
account on the translation system in question and then have to | ||
remove them by hand. | ||
</p> | ||
</section> | ||
|
||
<section> | ||
<form action="{{ request.path }}" method=POST> | ||
{% csrf_token %} | ||
<table> | ||
<tr> | ||
<th>Date start (yyyy-mm-dd)</th> | ||
<td> | ||
<input type="text" name="date_start" value="{{ date_start }}"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>Date end (yyyy-mm-dd)</th> | ||
<td> | ||
<input type="text" name="date_end" value="{{ date_end }}"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>Model</th> | ||
<td> | ||
<select name="model"> | ||
{% for cls in model_classes %} | ||
<option value="{{ cls }}">{{ cls }}</option> | ||
{% endfor %} | ||
</select> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> </td> | ||
<td><input type="Submit"></td> | ||
</tr> | ||
</table> | ||
</form> | ||
</section> | ||
{% endblock %} |