-
Notifications
You must be signed in to change notification settings - Fork 95
Partial resolve for #94 -translation issues with admin/teachers #602
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
Open
kama-pa-go
wants to merge
9
commits into
sio2project:master
Choose a base branch
from
kama-pa-go:feat/teachers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9cad806
Added "_" before teacher's and join_date's verbose name to guarantee …
kama-pa-go dbbbf57
Upgraded english to polish translation for teacher app.
kama-pa-go 53c271b
Corrected admin/teachers/teachers/add translation of "Active"
kama-pa-go a6baab4
Corrected admin/teachers/teachers/add translation of "Save and add an…
kama-pa-go 2ac6747
Merge branch 'sio2project:master' into feat/teachers
kama-pa-go f352126
Corrected translation of "teachers" from "nauczyciele" to "nauczyciel…
kama-pa-go 55ab9b2
Merge remote-tracking branch 'origin/feat/teachers' into feat/teachers
kama-pa-go d6d82e1
Corrected errors shown in testing:
kama-pa-go de31b9b
Corrected errors shown in testing:
kama-pa-go File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains hidden or 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 hidden or 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 hidden or 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
22 changes: 22 additions & 0 deletions
22
oioioi/teachers/migrations/0003_alter_teacher_options_alter_teacher_join_date.py
This file contains hidden or 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,22 @@ | ||
| # Generated by Django 5.2.9 on 2025-12-16 12:06 | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('teachers', '0002_teacher_join_date'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterModelOptions( | ||
| name='teacher', | ||
| options={'permissions': (('teacher', 'Is a teacher'),), 'verbose_name': 'teacher', 'verbose_name_plural': 'teachers'}, | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='teacher', | ||
| name='join_date', | ||
| field=models.DateField(auto_now_add=True, verbose_name='join date'), | ||
| ), | ||
| ] |
This file contains hidden or 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 hidden or 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,69 @@ | ||
| {% extends "admin/change_form.html" %} | ||
| {% load i18n admin_urls %} | ||
|
|
||
| {# Override buttons so they can be translated properly #} | ||
| {% block submit_buttons_bottom %} | ||
| <div class="submit-row d-none d-md-flex breadcrumb"> | ||
| {% if show_delete_link and original %} | ||
| {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %} | ||
| <a class="btn btn-danger deletelink" href="{% add_preserved_filters delete_url %}" class="deletelink">{% translate "Delete" %}</a> | ||
| {% endif %} | ||
|
|
||
| <div class="ml-auto"> | ||
| {% if show_archive %}<a class="btn btn-warning" href="{% url 'confirm_archive_contest' %}">{% translate "Archive" %}</a>{% endif %} | ||
| {% if show_unarchive %}<a class="btn btn-warning" href="{% url 'unarchive_contest' %}">{% translate "Unarchive" %}</a>{% endif %} | ||
|
|
||
| {% if has_add_permission and change and save_as %} | ||
| <input class="btn btn-secondary" type="submit" value="{% translate 'Save as new' %}" name="_saveasnew"> | ||
| {% endif %} | ||
|
|
||
| {% if has_add_permission %} | ||
| <input class="btn btn-secondary" type="submit" value="{% translate 'Save and add another' context 'teacher object' %}" name="_addanother"> | ||
| {% endif %} | ||
|
|
||
| {% if has_change_permission or has_add_permission %} | ||
| <input class="btn btn-secondary" type="submit" value="{% if can_change %}{% translate 'Save and continue editing' %}{% else %}{% translate 'Save and view' %}{% endif %}" name="_continue"> | ||
| {% endif %} | ||
|
|
||
| {% if has_change_permission or has_add_permission %} | ||
| <input type="submit" value="{% translate 'Save' %}" class="btn btn-primary" name="_save"> | ||
| {% endif %} | ||
|
|
||
| {% if show_close %} | ||
| <a class="btn btn-warning" href="{% url opts|admin_urlname:'changelist' %}" class="closelink">{% translate 'Close' %}</a> | ||
| {% endif %} | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="submit-row d-md-none breadcrumb py-2 px-3"> | ||
| <div class="nav nav-pills nav-fill flex-fill"> | ||
| {% if show_delete_link and original %} | ||
| {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %} | ||
| <a class="nav-item m-1 btn btn-danger deletelink" href="{% add_preserved_filters delete_url %}" class="deletelink">{% translate "Delete" %}</a> | ||
| {% endif %} | ||
|
|
||
| {% if show_archive %}<a class="nav-item m-1 btn btn-warning" href="{% url 'confirm_archive_contest' %}">{% translate "Archive" %}</a>{% endif %} | ||
| {% if show_unarchive %}<a class="nav-item m-1 btn btn-warning" href="{% url 'unarchive_contest' %}">{% translate "Unarchive" %}</a>{% endif %} | ||
|
|
||
| {% if has_add_permission and change and save_as %} | ||
| <input class="nav-item m-1 btn btn-secondary" type="submit" value="{% translate 'Save as new' %}" name="_saveasnew"> | ||
| {% endif %} | ||
|
|
||
| {% if has_add_permission %} | ||
| <input class="nav-item m-1 btn btn-secondary" type="submit" value="{% translate 'Save and add another' context 'teacher object' %}" name="_addanother"> | ||
| {% endif %} | ||
|
|
||
| {% if has_change_permission or has_add_permission %} | ||
| <input class="nav-item m-1 btn btn-secondary" type="submit" value="{% if can_change %}{% translate 'Save and continue editing' %}{% else %}{% translate 'Save and view' %}{% endif %}" name="_continue"> | ||
| {% endif %} | ||
|
|
||
| {% if has_change_permission or has_add_permission %} | ||
| <input type="submit" value="{% translate 'Save' %}" class="nav-item m-1 btn btn-primary" name="_save"> | ||
| {% endif %} | ||
|
|
||
| {% if show_close %} | ||
| <a class="nav-item m-1 btn btn-warning" href="{% url opts|admin_urlname:'changelist' %}" class="closelink">{% translate 'Close' %}</a> | ||
| {% endif %} | ||
| </div> | ||
| </div> | ||
| {% endblock %} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is there any other way to inject context into the translations? right now this creates a code duplication and it is using unused buttons like archive / unarchive