-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Translate the problem types in a dropdown #1948
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1948 +/- ##
=======================================
Coverage 46.46% 46.46%
=======================================
Files 236 236
Lines 13114 13114
=======================================
Hits 6093 6093
Misses 7021 7021 Continue to review full report at Codecov.
|
@@ -52,7 +52,7 @@ <h3>{{ _('Problem search') }} <i class="fa fa-search"></i> | |||
<select id="types" name="type" multiple> | |||
{% for type in problem_types %} | |||
<option value="{{ type.id }}"{% if type.id in selected_types %} selected{% endif %}> | |||
{{ type.full_name }} | |||
{{ user_trans(type.full_name) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to add a similar change for problem categories?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem categories are out of scope. In particular, they require these steps:
- Modify
makedmojmessages
to get all problem categories. Example:online-judge/judge/management/commands/makedmojmessages.py
Lines 127 to 130 in 8eed5e5
for name in ProblemType.objects.values_list('full_name', flat=True): if self.verbosity > 2: self.stdout.write('processing problem type name "%s"\n' % name) self._emit_message(potfile, name) - Wait for Crowdin translators to translate those strings, and an admin to get those translations.
- Use
user_trans
in the appropriate templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, this is out of scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Go to
/problems/
.ru
contains a translation forString Algorithms
, so the dropdown looks like: