diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..b439e23f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +[Makefile] +indent_style = tab + +[*.html] +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.css] +indent_style = space +indent_size = 2 + +[*.py] +indent_style = space +indent_size = 4 diff --git a/Makefile b/Makefile index 90665f65..1e533d19 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,8 @@ shell: # Need to have GNU gettext installed transprepare: - @poetry run django-admin makemessages --add-location file - @poetry run django-admin makemessages --add-location file --domain djangojs + @poetry run django-admin makemessages --locale ru --add-location file + @poetry run django-admin makemessages --locale ru --add-location file --domain djangojs transcompile: @poetry run django-admin compilemessages diff --git a/contributors/views/contributor.py b/contributors/views/contributor.py index b6392d56..5078094a 100644 --- a/contributors/views/contributor.py +++ b/contributors/views/contributor.py @@ -11,6 +11,7 @@ class DetailView(generic.DetailView): model = Contributor template_name = 'contributor_details.html' slug_field = 'login' + queryset = Contributor.objects.with_contributions() def get_context_data(self, **kwargs): """Add additional context for the contributor.""" diff --git a/locale/ru/LC_MESSAGES/django.mo b/locale/ru/LC_MESSAGES/django.mo index 380bdca4..937fc373 100644 Binary files a/locale/ru/LC_MESSAGES/django.mo and b/locale/ru/LC_MESSAGES/django.mo differ diff --git a/locale/ru/LC_MESSAGES/django.po b/locale/ru/LC_MESSAGES/django.po index b3bf047d..af23e1b6 100644 --- a/locale/ru/LC_MESSAGES/django.po +++ b/locale/ru/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-13 16:30+0500\n" +"POT-Creation-Date: 2022-09-02 19:09+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -57,31 +57,21 @@ msgstr "Неверное имя: " msgid "Uncheck those you wish to skip." msgstr "Снимите выбор тех, что нужно пропустить." -#: contributors/forms/forms.py -msgid "Sort by" -msgstr "Сортировка по" - -#: contributors/forms/forms.py -msgid "Descending" -msgstr "По убыванию" +#: contributors/forms/forms.py templates/contributor_details.html +msgid "Filter by name" +msgstr "Фильтр по имени" #: contributors/forms/forms.py msgid "Search" msgstr "Поиск" -#: contributors/forms/forms.py -msgid "Apply" -msgstr "Применить" - -#: contributors/forms/forms.py -msgid "Reset" -msgstr "Сбросить" - #: contributors/models/base.py msgid "name" msgstr "Имя" #: contributors/models/base.py contributors/models/contribution.py +#: templates/components/tables/contributor_issues.html +#: templates/components/tables/contributor_prs.html msgid "URL" msgstr "" @@ -162,8 +152,8 @@ msgid "title" msgstr "заголовок" #: contributors/models/issue_info.py -msgid "open" -msgstr "открыто" +msgid "state" +msgstr "" #: contributors/models/issue_info.py msgid "issue info" @@ -193,6 +183,10 @@ msgstr "проекты" msgid "full name" msgstr "полное имя" +#: contributors/models/repository.py +msgid "labels" +msgstr "" + #: contributors/models/repository.py msgid "repositories" msgstr "репозитории" @@ -201,12 +195,6 @@ msgstr "репозитории" msgid "Processing configuration" msgstr "Конфигурирование сбора данных" -#: contributors/views/organization.py contributors/views/repositories.py -#: templates/components/tables/repositories_list.html -#: templates/project_details.html templates/repository_details.html -msgid "Project" -msgstr "Проект" - #: contributors/views/organization.py contributors/views/repositories.py #: templates/components/navbar.html #: templates/components/tables/repositories_list.html @@ -221,12 +209,6 @@ msgstr "Контрибьюторы" msgid "Repositories" msgstr "Репозитории" -#: contributors/views/repositories.py -#: templates/components/tables/repositories_list.html -#: templates/repository_details.html -msgid "Organization" -msgstr "Организация" - #: templates/admin/configuration.html msgid "Get repositories" msgstr "Получить репозитории" @@ -276,9 +258,13 @@ msgstr "" msgid "Unknown content" msgstr "" -#: templates/components/footer.html -msgid "Language" -msgstr "Язык" +#: templates/base.html +msgid "" +"A service to track contributions from members of the Hexlet community to the " +"Hexlet open-source projects on GitHub" +msgstr "" +"Сервис для отслеживания вкладов членов сообщества Hexlet в проекты с " +"открытым исходным кодов Hexlet на GitHub" #: templates/components/footer.html msgid "Source code" @@ -320,6 +306,15 @@ msgstr "За всё время" msgid "Open Issues" msgstr "Проблемы" +#: templates/components/navbar.html +#: templates/components/tables/contributors_list.html +#: templates/components/tables/recent_contributors.html +#: templates/components/tables/repositories_list.html +#: templates/contributor_details.html templates/contributor_prs.html +#: templates/projects_list.html templates/pull_requests_list.html +msgid "Pull requests" +msgstr "Запросы на включение" + #: templates/components/navbar.html msgid "Admin" msgstr "Администрирование" @@ -332,9 +327,9 @@ msgstr "Моя статистика" msgid "Log out" msgstr "Выйти" -#: templates/components/navbar.html -msgid "Log in with GitHub" -msgstr "Войти через GitHub" +#: templates/components/navbar.html templates/registration/login.html +msgid "Log in" +msgstr "Войти" #: templates/components/pagination.html msgid "Previous" @@ -344,6 +339,40 @@ msgstr "Назад" msgid "Next" msgstr "Далее" +#: templates/components/tables/contributor_issues.html +#: templates/components/tables/contributor_prs.html +#: templates/components/tables/pull_requests_list.html +msgid "Title" +msgstr "Заголовок" + +#: templates/components/tables/contributor_issues.html +#: templates/components/tables/contributor_prs.html +#: templates/components/tables/pull_requests_list.html +#: templates/contributor_details.html templates/repository_details.html +msgid "Repository" +msgstr "Репозиторий" + +#: templates/components/tables/contributor_issues.html +#: templates/components/tables/contributor_prs.html +#: templates/components/tables/pull_requests_list.html +msgid "Creation date" +msgstr "Дата создания" + +#: templates/components/tables/contributor_issues.html +#: templates/components/tables/contributor_prs.html +#: templates/components/tables/pull_requests_list.html +msgid "Status" +msgstr "Статус" + +#: templates/components/tables/contributor_issues.html +#: templates/components/tables/contributor_prs.html +#: templates/components/tables/contributors_list.html +#: templates/components/tables/organizations_list.html +#: templates/components/tables/pull_requests_list.html +#: templates/components/tables/repositories_list.html +msgid "Nothing found" +msgstr "Ничего не найдено" + #: templates/components/tables/contributors_list.html #: templates/components/tables/recent_contributors.html msgid "Login" @@ -377,14 +406,8 @@ msgstr "Удаления" #: templates/components/tables/contributors_list.html #: templates/components/tables/recent_contributors.html #: templates/components/tables/repositories_list.html -#: templates/contributor_details.html templates/projects_list.html -msgid "Pull requests" -msgstr "Запросы на включение" - -#: templates/components/tables/contributors_list.html -#: templates/components/tables/recent_contributors.html -#: templates/components/tables/repositories_list.html -#: templates/contributor_details.html templates/projects_list.html +#: templates/contributor_details.html templates/contributor_issues.html +#: templates/projects_list.html msgid "Issues" msgstr "Проблемы" @@ -394,11 +417,19 @@ msgstr "Проблемы" msgid "Comments" msgstr "Комментарии" -#: templates/components/tables/contributors_list.html -#: templates/components/tables/organizations_list.html +#: templates/components/tables/pull_requests_list.html +msgid "Author" +msgstr "Автор" + #: templates/components/tables/repositories_list.html -msgid "Nothing found" -msgstr "Ничего не найдено" +#: templates/repository_details.html +msgid "Organization" +msgstr "Организация" + +#: templates/components/tables/repositories_list.html +#: templates/project_details.html templates/repository_details.html +msgid "Project" +msgstr "Проект" #: templates/components/time_note.html msgid "since" @@ -408,6 +439,28 @@ msgstr "с" msgid "for the past month" msgstr "за прошедший месяц" +#: templates/contributor_details.html +msgid "Contributor" +msgstr "Участник" + +#: templates/contributor_details.html +msgid "Achievments" +msgstr "Достижения" + +#: templates/contributor_details.html +msgid "Hexlet friend" +msgstr "Друг Хекслета" + +#: templates/contributor_details.html +#, fuzzy +#| msgid "Issues" +msgid "Issuess" +msgstr "Проблемы" + +#: templates/contributor_details.html +msgid "Additions and deletions" +msgstr "Добавления и удаления" + #: templates/contributor_details.html templates/home.html msgid "Past year activity" msgstr "Активность за год" @@ -416,14 +469,13 @@ msgstr "Активность за год" msgid "All-time contributions" msgstr "Вклад за всё время" -#: templates/contributor_details.html -msgid "Filter by name" -msgstr "Фильтр по имени" +#: templates/contributor_issues.html +msgid "Issues by" +msgstr "Issues пользователя" -#: templates/contributor_details.html -#: templates/components/pull_requests_list.html -msgid "Repository" -msgstr "Репозиторий" +#: templates/contributor_prs.html +msgid "Pull requests by" +msgstr "Пулл реквесты пользователя" #: templates/contributors_for_month.html msgid "Contributors for month" @@ -453,6 +505,10 @@ msgstr "по комментариям" msgid "New PRs and issues" msgstr "Новые PR и проблемы" +#: templates/organization_details.html +msgid "Details for organization" +msgstr "Детали организации" + #: templates/project_details.html msgid "Project related repositories" msgstr "Связанные с проектом репозитории" @@ -462,10 +518,6 @@ msgctxt "logon" msgid "Login" msgstr "Вход" -#: templates/registration/login.html -msgid "Log in" -msgstr "Войти" - #: templates/registration/registration.html msgid "Registration" msgstr "Регистрация" @@ -474,41 +526,26 @@ msgstr "Регистрация" msgid "Register" msgstr "Зарегистрироваться" -#~ msgid "Recently active contributors" -#~ msgstr "Недавно активные участники" +#~ msgid "Sort by" +#~ msgstr "Сортировка по" -#: templates/base.html -msgid "A service to track contributions from members of the Hexlet community to the Hexlet open-source projects on GitHub" -msgstr "Сервис для отслеживания вкладов членов сообщества Hexlet в проекты с открытым исходным кодов Hexlet на GitHub" - -#: templates/contributor_details.html -msgid "Contributor" -msgstr "Участник" - -#: templates/contributor_issues.html -msgid "Issues by" -msgstr "Issues пользователя" +#~ msgid "Descending" +#~ msgstr "По убыванию" -#: templates/contributor_prs.html -msgid "Pull requests by" -msgstr "Пулл реквесты пользователя" +#~ msgid "Apply" +#~ msgstr "Применить" -#: templates/organization_details.html -msgid "Details for organization" -msgstr "Детали организации" +#~ msgid "Reset" +#~ msgstr "Сбросить" -#: templates/components/pull_requests_list.html -msgid "Author" -msgstr "Автор" +#~ msgid "open" +#~ msgstr "открыто" -#: templates/components/pull_requests_list.html -msgid "Status" -msgstr "Статус" +#~ msgid "Language" +#~ msgstr "Язык" -#: templates/components/pull_requests_list.html -msgid "Creation date" -msgstr "Дата создания" +#~ msgid "Log in with GitHub" +#~ msgstr "Войти через GitHub" -#: templates/components/pull_requests_list.html -msgid "Title" -msgstr "Заголовок" +#~ msgid "Recently active contributors" +#~ msgstr "Недавно активные участники" diff --git a/locale/ru/LC_MESSAGES/djangojs.po b/locale/ru/LC_MESSAGES/djangojs.po index 57c83a57..ee2629ea 100644 --- a/locale/ru/LC_MESSAGES/djangojs.po +++ b/locale/ru/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-21 15:28+0500\n" +"POT-Creation-Date: 2022-09-02 19:09+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -20,18 +20,322 @@ msgstr "" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" "%100>=11 && n%100<=14)? 2 : 3);\n" -#: static/js/activity_chart/chart.js +#: static/js/activity_chart/chart.js staticfiles/js/activity_chart/chart.js msgid "Commits" msgstr "Коммиты" -#: static/js/activity_chart/chart.js +#: static/js/activity_chart/chart.js staticfiles/js/activity_chart/chart.js msgid "Pull requests" msgstr "Запросы на включение" -#: static/js/activity_chart/chart.js +#: static/js/activity_chart/chart.js staticfiles/js/activity_chart/chart.js msgid "Issues" msgstr "Проблемы" -#: static/js/activity_chart/chart.js +#: static/js/activity_chart/chart.js staticfiles/js/activity_chart/chart.js msgid "Comments" msgstr "Комментарии" + +#: staticfiles/admin/js/SelectFilter2.js +#, javascript-format +msgid "Available %s" +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +#, javascript-format +msgid "" +"This is the list of available %s. You may choose some by selecting them in " +"the box below and then clicking the \"Choose\" arrow between the two boxes." +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +#, javascript-format +msgid "Type into this box to filter down the list of available %s." +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +msgid "Filter" +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +msgid "Choose all" +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +#, javascript-format +msgid "Click to choose all %s at once." +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +msgid "Choose" +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +msgid "Remove" +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +#, javascript-format +msgid "Chosen %s" +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +#, javascript-format +msgid "" +"This is the list of chosen %s. You may remove some by selecting them in the " +"box below and then clicking the \"Remove\" arrow between the two boxes." +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +msgid "Remove all" +msgstr "" + +#: staticfiles/admin/js/SelectFilter2.js +#, javascript-format +msgid "Click to remove all chosen %s at once." +msgstr "" + +#: staticfiles/admin/js/actions.js +msgid "%(sel)s of %(cnt)s selected" +msgid_plural "%(sel)s of %(cnt)s selected" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" +msgstr[3] "" + +#: staticfiles/admin/js/actions.js +msgid "" +"You have unsaved changes on individual editable fields. If you run an " +"action, your unsaved changes will be lost." +msgstr "" + +#: staticfiles/admin/js/actions.js +msgid "" +"You have selected an action, but you haven’t saved your changes to " +"individual fields yet. Please click OK to save. You’ll need to re-run the " +"action." +msgstr "" + +#: staticfiles/admin/js/actions.js +msgid "" +"You have selected an action, and you haven’t made any changes on individual " +"fields. You’re probably looking for the Go button rather than the Save " +"button." +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Now" +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Midnight" +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "6 a.m." +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Noon" +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "6 p.m." +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +#, javascript-format +msgid "Note: You are %s hour ahead of server time." +msgid_plural "Note: You are %s hours ahead of server time." +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" +msgstr[3] "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +#, javascript-format +msgid "Note: You are %s hour behind server time." +msgid_plural "Note: You are %s hours behind server time." +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" +msgstr[3] "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Choose a Time" +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Choose a time" +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Cancel" +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Today" +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Choose a Date" +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Yesterday" +msgstr "" + +#: staticfiles/admin/js/admin/DateTimeShortcuts.js +msgid "Tomorrow" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "January" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "February" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "March" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "April" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "May" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "June" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "July" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "August" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "September" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "October" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "November" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgid "December" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month January" +msgid "Jan" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month February" +msgid "Feb" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month March" +msgid "Mar" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month April" +msgid "Apr" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month May" +msgid "May" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month June" +msgid "Jun" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month July" +msgid "Jul" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month August" +msgid "Aug" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month September" +msgid "Sep" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month October" +msgid "Oct" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month November" +msgid "Nov" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "abbrev. month December" +msgid "Dec" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "one letter Sunday" +msgid "S" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "one letter Monday" +msgid "M" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "one letter Tuesday" +msgid "T" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "one letter Wednesday" +msgid "W" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "one letter Thursday" +msgid "T" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "one letter Friday" +msgid "F" +msgstr "" + +#: staticfiles/admin/js/calendar.js +msgctxt "one letter Saturday" +msgid "S" +msgstr "" + +#: staticfiles/admin/js/collapse.js +msgid "Show" +msgstr "" + +#: staticfiles/admin/js/collapse.js +msgid "Hide" +msgstr "" diff --git a/static/images/achievments_icons/code_editioins-1000.svg b/static/images/achievments_icons/code_editioins-1000.svg new file mode 100644 index 00000000..7aba9e26 --- /dev/null +++ b/static/images/achievments_icons/code_editioins-1000.svg @@ -0,0 +1,41 @@ + + + achievement-code_editioins-1000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/code_edition-1.svg b/static/images/achievments_icons/code_edition-1.svg new file mode 100644 index 00000000..aec9ad5e --- /dev/null +++ b/static/images/achievments_icons/code_edition-1.svg @@ -0,0 +1,9 @@ + + + achievement-code_edition-1 + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/code_editions-100.svg b/static/images/achievments_icons/code_editions-100.svg new file mode 100644 index 00000000..d9148062 --- /dev/null +++ b/static/images/achievments_icons/code_editions-100.svg @@ -0,0 +1,28 @@ + + + achievement-code_editions-100 + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/code_editions-250.svg b/static/images/achievments_icons/code_editions-250.svg new file mode 100644 index 00000000..061840aa --- /dev/null +++ b/static/images/achievments_icons/code_editions-250.svg @@ -0,0 +1,32 @@ + + + achievement-code_editions-250 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/code_editions-500.svg b/static/images/achievments_icons/code_editions-500.svg new file mode 100644 index 00000000..e763f0b2 --- /dev/null +++ b/static/images/achievments_icons/code_editions-500.svg @@ -0,0 +1,36 @@ + + + achievement-code_editions-500 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/comment-1.svg b/static/images/achievments_icons/comment-1.svg new file mode 100644 index 00000000..0cd98e6e --- /dev/null +++ b/static/images/achievments_icons/comment-1.svg @@ -0,0 +1,7 @@ + + + achievement-comment-1 + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/comments-100.svg b/static/images/achievments_icons/comments-100.svg new file mode 100644 index 00000000..d68b44a1 --- /dev/null +++ b/static/images/achievments_icons/comments-100.svg @@ -0,0 +1,23 @@ + + + achievement-comments-100 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/comments-200.svg b/static/images/achievments_icons/comments-200.svg new file mode 100644 index 00000000..2c330cb6 --- /dev/null +++ b/static/images/achievments_icons/comments-200.svg @@ -0,0 +1,25 @@ + + + achievement-comments-200 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/comments-25.svg b/static/images/achievments_icons/comments-25.svg new file mode 100644 index 00000000..89618a98 --- /dev/null +++ b/static/images/achievments_icons/comments-25.svg @@ -0,0 +1,18 @@ + + + achievement-comments-25 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/comments-50.svg b/static/images/achievments_icons/comments-50.svg new file mode 100644 index 00000000..2da54061 --- /dev/null +++ b/static/images/achievments_icons/comments-50.svg @@ -0,0 +1,20 @@ + + + achievement-comments-50 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/commit-1.svg b/static/images/achievments_icons/commit-1.svg new file mode 100644 index 00000000..07c4ff81 --- /dev/null +++ b/static/images/achievments_icons/commit-1.svg @@ -0,0 +1,7 @@ + + + achievement-commit-1 + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/commits-100.svg b/static/images/achievments_icons/commits-100.svg new file mode 100644 index 00000000..935b2834 --- /dev/null +++ b/static/images/achievments_icons/commits-100.svg @@ -0,0 +1,23 @@ + + + achievement-commits-100 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/commits-200.svg b/static/images/achievments_icons/commits-200.svg new file mode 100644 index 00000000..137dfdf3 --- /dev/null +++ b/static/images/achievments_icons/commits-200.svg @@ -0,0 +1,25 @@ + + + achievement-commits-200 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/commits-25.svg b/static/images/achievments_icons/commits-25.svg new file mode 100644 index 00000000..970ba452 --- /dev/null +++ b/static/images/achievments_icons/commits-25.svg @@ -0,0 +1,18 @@ + + + achievement-commits-25 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/commits-50.svg b/static/images/achievments_icons/commits-50.svg new file mode 100644 index 00000000..314ee189 --- /dev/null +++ b/static/images/achievments_icons/commits-50.svg @@ -0,0 +1,20 @@ + + + achievement-commits-50 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/friend.svg b/static/images/achievments_icons/friend.svg new file mode 100644 index 00000000..c3b3d53b --- /dev/null +++ b/static/images/achievments_icons/friend.svg @@ -0,0 +1,11 @@ + + + friend + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/issue-1.svg b/static/images/achievments_icons/issue-1.svg new file mode 100644 index 00000000..4d8ba810 --- /dev/null +++ b/static/images/achievments_icons/issue-1.svg @@ -0,0 +1,7 @@ + + + achievement-issue-1 + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/issues-10.svg b/static/images/achievments_icons/issues-10.svg new file mode 100644 index 00000000..4d911a4c --- /dev/null +++ b/static/images/achievments_icons/issues-10.svg @@ -0,0 +1,22 @@ + + + achievement-issues-10 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/issues-25.svg b/static/images/achievments_icons/issues-25.svg new file mode 100644 index 00000000..33db7d13 --- /dev/null +++ b/static/images/achievments_icons/issues-25.svg @@ -0,0 +1,24 @@ + + + achievement-issues-25 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/issues-5.svg b/static/images/achievments_icons/issues-5.svg new file mode 100644 index 00000000..02dc8e8f --- /dev/null +++ b/static/images/achievments_icons/issues-5.svg @@ -0,0 +1,19 @@ + + + achievement-issues-5 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/issues-50.svg b/static/images/achievments_icons/issues-50.svg new file mode 100644 index 00000000..c1eb47a6 --- /dev/null +++ b/static/images/achievments_icons/issues-50.svg @@ -0,0 +1,26 @@ + + + achievement-issues-50 + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/pull_request-1.svg b/static/images/achievments_icons/pull_request-1.svg new file mode 100644 index 00000000..5d9e7d0e --- /dev/null +++ b/static/images/achievments_icons/pull_request-1.svg @@ -0,0 +1,7 @@ + + + achievement-pull_request-1 + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/pull_requests-10.svg b/static/images/achievments_icons/pull_requests-10.svg new file mode 100644 index 00000000..abc3879c --- /dev/null +++ b/static/images/achievments_icons/pull_requests-10.svg @@ -0,0 +1,19 @@ + + + achievement-pull_requests-10 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/pull_requests-100.svg b/static/images/achievments_icons/pull_requests-100.svg new file mode 100644 index 00000000..a0a4cdab --- /dev/null +++ b/static/images/achievments_icons/pull_requests-100.svg @@ -0,0 +1,26 @@ + + + achievement-pull_requests-100 + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/pull_requests-25.svg b/static/images/achievments_icons/pull_requests-25.svg new file mode 100644 index 00000000..8ec06471 --- /dev/null +++ b/static/images/achievments_icons/pull_requests-25.svg @@ -0,0 +1,21 @@ + + + achievement-pull_requests-25 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/achievments_icons/pull_requests-50.svg b/static/images/achievments_icons/pull_requests-50.svg new file mode 100644 index 00000000..98e6fbf5 --- /dev/null +++ b/static/images/achievments_icons/pull_requests-50.svg @@ -0,0 +1,23 @@ + + + achievement-pull_requests-50 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/contributor_details.html b/templates/contributor_details.html index 7a8acf17..183b29ae 100644 --- a/templates/contributor_details.html +++ b/templates/contributor_details.html @@ -18,12 +18,162 @@

{{ contributor.login }}

GitHub +

+ {% trans 'Achievments' %} +

+ + {% if contributor.additions|add:contributor.deletions|add:contributor.pull_requests|add:contributor.issues|add:contributor.comments > 0 %} + {% trans + {% endif %} + + {% if contributor.pull_requests >= 100 %} + {% trans 'Pull requests' %}: {{ contributor.pull_requests }} + {% elif contributor.pull_requests >= 50 %} + {% trans 'Pull requests' %}: {{ contributor.pull_requests }} + {% elif contributor.pull_requests >= 25 %} + {% trans 'Pull requests' %}: {{ contributor.pull_requests }} + {% elif contributor.pull_requests >= 10 %} + {% trans 'Pull requests' %}: {{ contributor.pull_requests }} + {% elif contributor.pull_requests >= 1 %} + {% trans 'Pull requests' %}: {{ contributor.pull_requests }} + {% endif %} + + {% if contributor.commits >= 200 %} + {% trans 'Commits' %}: {{ contributor.commits }} + {% elif contributor.commits >= 100 %} + {% trans 'Commits' %}: {{ contributor.commits }} + {% elif contributor.commits >= 50 %} + {% trans 'Commits' %}: {{ contributor.commits }} + {% elif contributor.commits >= 25 %} + {% trans 'Commits' %}: {{ contributor.commits }} + {% elif contributor.commits >= 1 %} + {% trans 'Commits' %}: {{ contributor.commits }} + {% endif %} + + {% if contributor.issues >= 50 %} + {% trans 'Issues' %}: {{ contributor.issues }} + {% elif contributor.issues >= 25 %} + {% trans 'Issues' %}: {{ contributor.issues }} + {% elif contributor.issues >= 10 %} + {% trans 'Issues' %}: {{ contributor.issues }} + {% elif contributor.issues >= 5 %} + {% trans 'Issues' %}: {{ contributor.issues }} + {% elif contributor.issues >= 1 %} + {% trans 'Issuess' %}: {{ contributor.issues }} + {% endif %} + + {% if contributor.comments >= 200 %} + {% trans 'Comments' %}: {{ contributor.comments }} + {% elif contributor.comments >= 100 %} + {% trans 'Comments' %}: {{ contributor.comments }} + {% elif contributor.comments >= 50 %} + {% trans 'Comments' %}: {{ contributor.comments }} + {% elif contributor.comments >= 25 %} + {% trans 'Comments' %}: {{ contributor.comments }} + {% elif contributor.comments >= 1 %} + {% trans 'Comments' %}: {{ contributor.comments }} + {% endif %} + + {% if contributor.additions|add:contributor.deletions >= 1000 %} + {% trans 'Additions and deletions' %}: {{ contributor.additions|add:contributor.deletions }} + {% elif contributor.additions|add:contributor.deletions >= 500 %} + {% trans 'Additions and deletions' %}: {{ contributor.additions|add:contributor.deletions }} + {% elif contributor.additions|add:contributor.deletions >= 250 %} + {% trans 'Additions and deletions' %}: {{ contributor.additions|add:contributor.deletions }} + {% elif contributor.additions|add:contributor.deletions >= 100 %} + {% trans 'Additions and deletions' %}: {{ contributor.additions|add:contributor.deletions }} + {% elif contributor.additions|add:contributor.deletions >= 1 %} + {% trans 'Additions and deletions' %}: {{ contributor.additions|add:contributor.deletions }} + {% endif %} + +