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

translation of UI into english #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
52 changes: 26 additions & 26 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def before_request():
if current_user.is_authenticated:
if current_user.active == False:
logout_user()
flash("Byli jste odhlášeni protože váš účet byl deaktivován.")
flash("You have been logged out because your account has been deactivated.")

# flask-admin sucks
if request.path.startswith('/admin'):
Expand Down Expand Up @@ -111,18 +111,18 @@ def category(project_identifier, category_identifier):
terms=terms)

class SuggestionForm(Form):
text = TextField('Návrh', [validators.DataRequired()])
description = TextField('Popis')
submit = SubmitField('Přidat návrh')
text = TextField('Proposal', [validators.DataRequired()])
description = TextField('Description')
submit = SubmitField('Add Proposal')

class RevisionForm(Form):
text = TextAreaField('Revize', [validators.DataRequired()])
text = TextAreaField('Revision', [validators.DataRequired()])
description = None
submit = SubmitField('Přidat revizi')
submit = SubmitField('Add Revision')

class CommentForm(Form):
comment_text = TextAreaField('Komentář', [validators.DataRequired()])
submit = SubmitField('Přidat komentář')
comment_text = TextAreaField('Comment', [validators.DataRequired()])
submit = SubmitField('Add Comment')

@app.route("/<project_identifier>/<category_identifier>/<term_identifier>/",
methods="GET POST".split())
Expand All @@ -135,7 +135,7 @@ def term(project_identifier, category_identifier, term_identifier):
try:
term = db.Term.from_identifier(term_identifier, category=category)
except MultipleResultsFound:
return "Tomuto identifikátoru odpovídá více termínů. Tohle je CHYBA a musí ji opravit administrátor. Můžete pomoci tím že nahlásíte URL."
return "Multiple terms correspond to this identifier. This is an ERROR and must be corrected by the administrator. You can help by reporting the URL."
if not term: abort(404)

if request.args.get("all"):
Expand Down Expand Up @@ -164,7 +164,7 @@ def term(project_identifier, category_identifier, term_identifier):
elif action == 'lock':
term.locked = True
else:
flash("Neznámá akce {}".format(action), "error")
flash("Unknown action {}".format(action), "error")
db.session.commit()

suggestion_form = None
Expand All @@ -183,7 +183,7 @@ def term(project_identifier, category_identifier, term_identifier):
# TODO this should check for "final" as well, but
# for some reason adding `or (db.Suggestion.status == "final")`
# doesn't cut it
flash("Přesně tenhle návrh už existuje, mrkni se po něm!", 'info')
flash("This exact proposal already exists, check it out!", 'info')
else:
suggestion = db.Suggestion(user=current_user, term=term,
created=datetime.now(), changed=datetime.now(),
Expand Down Expand Up @@ -327,19 +327,19 @@ def suggestion():
elif action == 'withdraw' and suggestion.user == current_user:
if suggestion.score == 0:
suggestion.status = db.SuggestionStatus.withdrawn
flash("Návrh vzán zpět.", 'success')
flash("Proposal withdrawn.", 'success')
else:
flash("Návrh lze vzít zpět pouze dokud má nulové skóre.", 'danger')
flash("A proposal can only be withdrawn while it has a zero score.", 'danger')
else:
flash("Neznámá či nepovolená operace", 'danger')
flash("Unknown or unauthorized operation", 'danger')

db.session.commit()
return redirect(suggestion.url)

class LoginForm(Form):
username = TextField('Username', [validators.DataRequired()])
password = PasswordField('Heslo', [validators.DataRequired()])
submit = SubmitField('Přihlásit se')
password = PasswordField('Password', [validators.DataRequired()])
submit = SubmitField('Log In')

@app.route("/login", methods="GET POST".split())
def login():
Expand All @@ -353,37 +353,37 @@ def login():
if password_matches:
if user.active:
login_user(user, remember=True)
flash("Jste přihlášeni.", 'success')
flash("You are logged in.", 'success')
return redirect(url_for('index'))
else:
flash("Váš účet není aktivován administrátorem.")
flash("Your account is not activated by the administrator.")
else:
failed = True

return render_template("login.html", form=form, failed=failed)

class RegisterForm(Form):
username = TextField('Username', [validators.DataRequired()])
password = PasswordField('Heslo', [
password = PasswordField('Password', [
validators.DataRequired(),
validators.EqualTo('confirm_password', message='Hesla se musí shodovat')
validators.EqualTo('confirm_password', message='Passwords must match')
])
confirm_password = PasswordField('Heslo znovu', [validators.DataRequired()])
confirm_password = PasswordField('Confirm password', [validators.DataRequired()])
email = TextField('Email', [validators.DataRequired()])
key = TextField('Klíč', [validators.DataRequired()])
submit = SubmitField('Zaregistrovat se')
key = TextField('Key', [validators.DataRequired()])
submit = SubmitField('Register')

@app.route("/register", methods="GET POST".split())
def register():
form = RegisterForm(request.form)
failed = False
if request.method == 'POST' and form.validate():
if form.key.data != app.config["REGISTER_KEY"]:
flash("Zadali jste nesprávný registrační klíč.", "danger")
flash("You entered the wrong registration key.", "danger")
else:
user = db.session.query(db.User).filter(db.User.username == form.username.data.lower()).scalar()
if user:
flash("Toto uživatelské jméno je již zabrané, vyberte si, prosím, jiné.", "danger")
flash("This username is already taken, please choose a different one.", "danger")
else:
user = db.User(username=form.username.data.lower(),
email=form.email.data,
Expand All @@ -398,7 +398,7 @@ def register():
db.session.commit()

login_user(user, remember=True)
flash("Registrace proběhla úspěšně.", 'success')
flash("Registration was successful.", 'success')
return redirect(url_for('index'))
else:
flash_errors(form)
Expand Down
4 changes: 2 additions & 2 deletions templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
</div>

<footer>
<p>Nový obsah je licencovaný pod <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
<p>Zdrojový kód je na <a href="https://github.com/Sanqui/prekapavac">GitHubu</a>.
<p>Content is licensed under <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
<p>The source code is on <a href="https://github.com/Sanqui/prekapavac">GitHub</a>.
</footer>


Expand Down
34 changes: 17 additions & 17 deletions templates/_macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,34 @@
{% if diff.days < -6 %}
{{ datetime(d) }}
{% elif diff.days < -2 or (diff.days == -2 and g.tomorrow.day != d.day) %}
{% if d.weekday() == 0 %} pondělí
{% elif d.weekday() == 1 %} úterý
{% elif d.weekday() == 2 %} středa
{% elif d.weekday() == 3 %} čtvrtek
{% elif d.weekday() == 4 %} pátek
{% elif d.weekday() == 5 %} sobota
{% elif d.weekday() == 6 %} neděle
{% if d.weekday() == 0 %} Monday
{% elif d.weekday() == 1 %} Tuesday
{% elif d.weekday() == 2 %} Wednesday
{% elif d.weekday() == 3 %} Thursday
{% elif d.weekday() == 4 %} Friday
{% elif d.weekday() == 5 %} Saturday
{% elif d.weekday() == 6 %} Sunday
{% endif %}
{{ datetime(d, "%H:%M")}}
{% elif diff.seconds < 60*60*24 and g.tomorrow.day == d.day %}
zítra {{datetime(d,"%H:%M")}}
tomorrow {{datetime(d,"%H:%M")}}
{% else %}
dnes {{datetime(d,"%H:%M")}}
today {{datetime(d,"%H:%M")}}
{% endif %}
{% elif diff.days == 0 %}
{% if diff.seconds < 10 %} teď
{% elif diff.seconds < 60 %} před {{diff.seconds}} vteřinami
{% elif diff.seconds < 120 %} před minutou
{% elif diff.seconds < 3600 %} před {{diff.seconds//60}} minutami
{% elif diff.seconds < 7200 %} před hodinou
{% if diff.seconds < 10 %} now
{% elif diff.seconds < 60 %} {{diff.seconds}} seconds ago
{% elif diff.seconds < 120 %} a minute ago
{% elif diff.seconds < 3600 %} {{diff.seconds//60}} minutes ago
{% elif diff.seconds < 7200 %} an hour ago
{% elif diff.seconds < 86400 and g.now.day == d.day %}
před {{diff.seconds//3600}} hodinami
{{diff.seconds//3600}} hours ago
{% else %}
včera {{datetime(d,"%H:%M")}}
yesterday {{datetime(d,"%H:%M")}}
{% endif %}
{% else %}
{% if diff.seconds < 86400*2 and g.yesterday.day == d.day and diff.days < 2 %}
včera {{datetime(d,"%H:%M")}}
yesterday {{datetime(d,"%H:%M")}}
{% else %}
{{datetime(d,"%d. %m. %Y %H:%M")}}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions templates/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ <h2>{{ category.name }}
<td>en</td>
{% if not mainly_dialogue %}
<td>jp</td>
<td>návrhy</td>
<td>proposals</td>
{% else %}
<td>překlad</td>
<td>translation</td>
{% endif %}
</tr>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ol>
-->

<p>Vítejte v Překapávači. Tato aplikace v současnosti slouží k kolaborativnímu překladu hry Pokémon Red. Prvním krokem je překlad termínů.
<p>Welcome to the "Drip brewer". This application currently serves for the collaborative translation of video games.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Veldig bokstavelig oversettelse av navnet på programvaren. Finnes det noe mer catchy?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transmute
Cotranslator
Coordinated/Collaborative Game Translator - Cogatra
eller Localization. Cogalo
Collocalize


{% for project in projects %}
<div class="panel panel-default">
Expand Down
6 changes: 3 additions & 3 deletions templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block title %}login{% endblock %}

{% block content %}
<h2><a href="{{url_for('login')}}">Přihlášení</a></h2>
<h2><a href="{{url_for('login')}}">Login</a></h2>
{% if form.errors %}
<ul>
{% for error in form.errors %}
Expand All @@ -14,12 +14,12 @@ <h2><a href="{{url_for('login')}}">Přihlášení</a></h2>
<form method="POST">
<dl>
<dt>Username:</dt> <dd>{{form.username}}</dd>
<dt>Heslo:</dt> <dd>{{form.password}}</dd>
<dt>Password:</dt> <dd>{{form.password}}</dd>
</dl>
{{form.submit}}
</form>
{% if failed %}
<p class="fail">Nesprávné uživatelské jméno nebo heslo.
<p class="fail">Incorrect username or password.
{% endif %}
{% endblock %}

26 changes: 13 additions & 13 deletions templates/recent.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ <h2>Poslední změny</h2>
<table class="table table-condensed">
<thead>
<tr>
<td>kdy</td>
<td>kdo</td>
<!--<td>projekt</td>-->
<td>kategorie</td>
<td>termín</td>
<td>co</td>
<td>when</td>
<td>who</td>
<!--<td>project</td>-->
<td>category</td>
<td>term</td>
<td>what</td>
</tr>
<tbody>
{% for change in changes %}
Expand All @@ -37,25 +37,25 @@ <h2>Poslední změny</h2>
<td class="td-suggestions">
{% if type(change) == db.Suggestion %}
{% if not change.term.dialogue %}
<span class="glyphicon glyphicon-leaf" title="návrh"></span>
<span class="glyphicon glyphicon-leaf" title="proposal"></span>
<!--
<span class="label label-default label-suggestion">návrh</span>
<span class="label label-default label-suggestion">proposal</span>
-->
{{ unrated_icon(change) }}
<strong>{{change.text | truncate(100)}}</strong>
{% else %}
<span class="glyphicon glyphicon-file" title="revize"></span>
<span class="glyphicon glyphicon-file" title="revision"></span>
<!--
<span class="label label-default label-revision">revize</span>
<span class="label label-default label-revision">revision</span>
-->
#{{ change.revision }}
{{ unrated_icon(change) }}
<strong>{{change.text | truncate(100)}}</strong>
{% endif %}
{% elif type(change) == db.Comment %}
<span class="glyphicon glyphicon-comment" title="komentář"></span>
<span class="glyphicon glyphicon-comment" title="comment"></span>
<!--
<span class="label label-default label-comment">komentář</span>
<span class="label label-default label-comment">comment</span>
-->
{{ change.text |truncate(100) }}
{% else %}
Expand All @@ -68,7 +68,7 @@ <h2>Poslední změny</h2>
</table>
<center>
<a href="{{ url_for('recent', sskip=sskip+num_suggestions, cskip=cskip+num_comments) }}" class="btn btn-default">
další stránka
next page
</a>
</center>
{% endblock %}
14 changes: 7 additions & 7 deletions templates/register.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{% extends "_base.html" %}

{% block title %}Registrace{% endblock %}
{% block title %}Registration{% endblock %}

{% block content %}
<h2>Registrace</h2>
<p>K registraci je potřeba znát klíč který se můžete dozvědět např. od administrátora webu.
<h2>Registration</h2>
<p>To register, you need to know the key which you can learn from, for example, the website administrator.
<form method="POST">
<dl>
<dt>Username:</dt> <dd>{{form.username}}</dd>
<dt>Heslo:</dt> <dd>{{form.password}}</dd>
<dt>Heslo znovu:</dt><dd>{{form.confirm_password}}</dd>
<dt>Password:</dt> <dd>{{form.password}}</dd>
<dt>Confirm password:</dt><dd>{{form.confirm_password}}</dd>
<dt>Email:</dt> <dd>{{form.email}}</dd>
<dt>Klíč:</dt> <dd>{{form.key}}</dd>
<dt>Key:</dt> <dd>{{form.key}}</dd>
</dl>
{{form.submit}}
</form>
{% if failed %}
<p class="fail">Nesprávné uživatelské jméno nebo heslo.
<p class="fail">Incorrect username or password.
{% endif %}
{% endblock %}

Loading