From c99ef700293a2d8777858b1847bf3e5a5ee9b4c3 Mon Sep 17 00:00:00 2001 From: Stas Fomin Date: Sat, 24 Jul 2021 22:44:21 +0300 Subject: [PATCH] Added i18n and Russian translation (#450) * First translation of all message already prepared for localication * add trans/blocktrans tags for all UI literals in templates * add trans/blocktrans tags for all UI literals in templates. Add russian translation for all this staff * Sorry fix a typo * generated localization files excluded from git * generated localization files excluded from git * force store compiled russian messages * Enable mo files back * add load i18n to some templates, now tests OK * fix https://github.com/groveco/django-sql-explorer/pull/450#discussion_r673593585 * fix https://github.com/groveco/django-sql-explorer/pull/450#discussion_r673594671 --- .gitignore | 3 +- explorer/locale/ru/LC_MESSAGES/django.mo | Bin 0 -> 5202 bytes explorer/locale/ru/LC_MESSAGES/django.po | 316 ++++++++++++++++++ explorer/locale/zh_Hans/LC_MESSAGES/django.mo | Bin 2378 -> 2549 bytes explorer/templates/explorer/fullscreen.html | 8 +- explorer/templates/explorer/preview_pane.html | 10 +- explorer/templates/explorer/query.html | 6 +- .../explorer/query_confirm_delete.html | 2 +- explorer/templates/explorer/query_list.html | 8 +- .../templates/explorer/querylog_list.html | 20 +- explorer/templates/explorer/schema.html | 4 +- .../templates/explorer/schema_building.html | 6 +- explorer/views/query.py | 3 +- manage.py | 1 + 14 files changed, 353 insertions(+), 34 deletions(-) create mode 100644 explorer/locale/ru/LC_MESSAGES/django.mo create mode 100644 explorer/locale/ru/LC_MESSAGES/django.po diff --git a/.gitignore b/.gitignore index 104f5bc0..84984ad7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ venv/ .venv/ # Sphinx documentation -docs/_build/ \ No newline at end of file +docs/_build/ + diff --git a/explorer/locale/ru/LC_MESSAGES/django.mo b/explorer/locale/ru/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..d902a363e222c4c6a16e35483f3872402be8f51e GIT binary patch literal 5202 zcmai$TWlQF8OKixZK>&v^j-=*Koh)>UF;AjIB~+py8#Q|u$`pPs?m7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w4d;1ow)K$RvZBb8pT4BJrmvbUtaO zr9q-s?3bnO_s}Qr43glY+Hq^X917SQB(m62R_;R)y+oy0kj#`0MP#)CVUCuwq>yuIVYw@c z?RqzXz3AuBZk`L`8CagfjHwPQ82LRy%iiSaA6hPP_Dbzp^QYDpv(stf@VBI;xs6Hg H+MN17kE~5x literal 0 HcmV?d00001 diff --git a/explorer/locale/ru/LC_MESSAGES/django.po b/explorer/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 00000000..40b9e3d5 --- /dev/null +++ b/explorer/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,316 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-07-24 10:26-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%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" + +#: explorer/apps.py:10 explorer/templates/explorer/base.html:10 +#: explorer/templates/explorer/base.html:35 +#: explorer/templates/explorer/fullscreen.html:8 +msgid "SQL Explorer" +msgstr "SQL Навигатор" + +#: explorer/models.py:40 +msgid "Include in snapshot task (if enabled)" +msgstr "Включить в задачу снятия снепшота (если разрешено)" + +#: explorer/models.py:47 +msgid "" +"Name of DB connection (as specified in settings) to use for this query.Will " +"use EXPLORER_DEFAULT_CONNECTION if left blank" +msgstr "" +"Название соединения БД (как указано в настройках), чтобы использовать для " +"этого запроса.Если не использовать, будет использоваться соединение по " +"умолчанию" + +#: explorer/models.py:60 explorer/templates/explorer/query_list.html:49 +#: explorer/templates/explorer/querylog_list.html:33 +msgid "Query" +msgstr "Запрос" + +#: explorer/models.py:61 +msgid "Queries" +msgstr "Запросы" + +#: explorer/templates/explorer/fullscreen.html:16 +#: explorer/templates/explorer/play.html:7 +#: explorer/templates/explorer/query.html:6 +#: explorer/templates/explorer/query.html:16 +#: explorer/templates/explorer/query_list.html:6 +#: explorer/templates/explorer/querylog_list.html:6 +msgid "New Query" +msgstr "Новый запрос" + +#: explorer/templates/explorer/fullscreen.html:39 +#: explorer/templates/explorer/preview_pane.html:81 +msgid "Empty Resultset" +msgstr "Результат запроса пуст" + +#: explorer/templates/explorer/play.html:8 +#: explorer/templates/explorer/play.html:16 +#: explorer/templates/explorer/query.html:7 +#: explorer/templates/explorer/query_list.html:7 +#: explorer/templates/explorer/querylog_list.html:7 +#: explorer/templates/explorer/querylog_list.html:23 +#: explorer/templates/explorer/querylog_list.html:33 +msgid "Playground" +msgstr "Полигон" + +#: explorer/templates/explorer/play.html:9 +#: explorer/templates/explorer/query.html:10 +#: explorer/templates/explorer/query_list.html:8 +#: explorer/templates/explorer/querylog_list.html:8 +msgid "Logs" +msgstr "Журналы" + +#: explorer/templates/explorer/play.html:17 +msgid "" +"The playground is for experimenting and writing ad-hoc queries. By default, " +"nothing you do here will be saved." +msgstr "" +"Полигон предназначен для экспериментов и написания специальных запросов. По " +"умолчанию тут ничего не будет сохраняться" + +#: explorer/templates/explorer/play.html:24 +#: explorer/templates/explorer/query.html:46 +msgid "Connection" +msgstr "Соединение" + +#: explorer/templates/explorer/play.html:39 +msgid "Playground SQL" +msgstr "Экспериментальный SQL" + +#: explorer/templates/explorer/play.html:55 +#: explorer/templates/explorer/query.html:110 +msgid "Refresh" +msgstr "Обновить" + +#: explorer/templates/explorer/play.html:58 +#: explorer/templates/explorer/play.html:68 +#: explorer/templates/explorer/query.html:98 +#: explorer/templates/explorer/query.html:115 +msgid "Toggle Dropdown" +msgstr "Включить выпадающий список" + +#: explorer/templates/explorer/play.html:61 +msgid "Save As New Query" +msgstr "Сохранить как новый запрос" + +#: explorer/templates/explorer/play.html:65 +#: explorer/templates/explorer/query.html:112 +msgid "Download" +msgstr "Скачать" + +#: explorer/templates/explorer/play.html:75 +#: explorer/templates/explorer/query.html:107 +msgid "Show Schema" +msgstr "Показать схему базы" + +#: explorer/templates/explorer/play.html:76 +#: explorer/templates/explorer/query.html:108 +msgid "Hide Schema" +msgstr "Скрыть схему" + +#: explorer/templates/explorer/play.html:77 +#: explorer/templates/explorer/query.html:106 +msgid "Format" +msgstr "Отформатировать запрос" + +#: explorer/templates/explorer/play.html:80 +msgid "Playground Query" +msgstr "Экспериментальный запрос" + +#: explorer/templates/explorer/preview_pane.html:8 +msgid "Preview" +msgstr "Предпросмотр" + +#: explorer/templates/explorer/preview_pane.html:9 +msgid "Snapshots" +msgstr "Варианты" + +#: explorer/templates/explorer/preview_pane.html:10 +#: explorer/templates/explorer/preview_pane.html:112 +msgid "Pivot" +msgstr "Сводная таблица" + +#: explorer/templates/explorer/preview_pane.html:19 +#, python-format +msgid "Execution time: %(duration)s ms" +msgstr "Время выполнения: %(duration)s мс" + +#: explorer/templates/explorer/preview_pane.html:28 +#, python-format +msgid "of %(total_rows)s total rows." +msgstr "из %(total_rows)s выбранных записей." + +#: explorer/templates/explorer/query.html:9 +msgid "Query Detail" +msgstr "Подробности запроса" + +#: explorer/templates/explorer/query.html:19 +msgid "History" +msgstr "История" + +#: explorer/templates/explorer/query.html:39 +msgid "Title" +msgstr "Название" + +#: explorer/templates/explorer/query.html:61 +msgid "Description" +msgstr "Описание" + +#: explorer/templates/explorer/query.html:95 +msgid "Save & Run" +msgstr "Сохранить и запустить" + +#: explorer/templates/explorer/query.html:103 +msgid "Save Only" +msgstr "Сохранить" + +#: explorer/templates/explorer/query.html:136 +msgid "Snapshot" +msgstr "Вариант" + +#: explorer/templates/explorer/query.html:142 +#, python-format +msgid "" +"Avg. execution: %(avg_duration|floatformat:2)sms. Query created by " +"%(user_email)s on %(created)s." +msgstr "" +"Среднее время выполнения: %(avg_duration|floatformat:2)s мс. Запрос в " +"%(created)s. от «%(user_email)s»" + +#: explorer/templates/explorer/query_confirm_delete.html:6 +#, python-format +msgid "Are you sure you want to delete \"%(title)s\" ?" +msgstr "Вы уверены в удалении «%(title)s»?" + +#: explorer/templates/explorer/query_list.html:14 +#, python-format +msgid " Your %(qlen)s Most Recently Run " +msgstr " Ваши последние запуски запросов, их %(qlen)s" + +#: explorer/templates/explorer/query_list.html:19 +msgid "Last Run" +msgstr "Последний запуск" + +#: explorer/templates/explorer/query_list.html:40 +msgid "All Queries" +msgstr "Все запросы" + +#: explorer/templates/explorer/query_list.html:43 +#: explorer/templates/explorer/schema.html:10 +msgid "Search" +msgstr "Поиск" + +#: explorer/templates/explorer/query_list.html:50 +msgid "Created" +msgstr "Создан" + +#: explorer/templates/explorer/query_list.html:52 +msgid "Email" +msgstr "Емейл" + +#: explorer/templates/explorer/query_list.html:54 +msgid "CSV" +msgstr "CSV" + +#: explorer/templates/explorer/query_list.html:56 +msgid "Play" +msgstr "Запустить" + +#: explorer/templates/explorer/query_list.html:57 +msgid "Delete" +msgstr "Удалить" + +#: explorer/templates/explorer/query_list.html:59 +msgid "Run Count" +msgstr "Число запусков" + +#: explorer/templates/explorer/query_list.html:79 +#, python-format +msgid "by %(cuser)s" +msgstr " пользователем «%(cuser)s»" + +#: explorer/templates/explorer/querylog_list.html:13 +#, python-format +msgid "Recent Query Logs - Page %(pagenum)s" +msgstr "Журнал последних запросов — страница %(pagenum)s " + +#: explorer/templates/explorer/querylog_list.html:18 +msgid "Run At" +msgstr "Время запуска" + +#: explorer/templates/explorer/querylog_list.html:19 +msgid "Run By" +msgstr "Запущено пользователем" + +#: explorer/templates/explorer/querylog_list.html:20 +msgid "Duration" +msgstr "Длительность" + +#: explorer/templates/explorer/querylog_list.html:21 +msgid "SQL" +msgstr "SQL" + +#: explorer/templates/explorer/querylog_list.html:22 +msgid "Query ID" +msgstr "ID запроса" + +#: explorer/templates/explorer/querylog_list.html:34 +msgid "Open" +msgstr "Открыть" + +#: explorer/templates/explorer/querylog_list.html:47 +#, python-format +msgid "Page %(pnum)s of %(anum)s." +msgstr "Страница %(pnum)s из %(anum)s." + +#: explorer/templates/explorer/schema.html:7 +msgid "Schema" +msgstr "Схема" + +#: explorer/templates/explorer/schema.html:14 +msgid "Collapse All" +msgstr "Свернуть все" + +#: explorer/templates/explorer/schema.html:17 +msgid "Expand All" +msgstr "Развернуть все" + +#: explorer/templates/explorer/schema_building.html:7 +msgid "Schema is building..." +msgstr "Строится схема…" + +#: explorer/templates/explorer/schema_building.html:8 +msgid "Please wait a minute, and refresh." +msgstr "Подождите минутку и обновите." + +#: explorer/views/query.py:125 +msgid "Query saved." +msgstr "Запрос сохранен." + +#~ msgid "Avg. execution:" +#~ msgstr "Среднее время запроса" + +#~ msgid "Query created by" +#~ msgstr "Запрос создан" + +#~ msgid "on" +#~ msgstr "в" diff --git a/explorer/locale/zh_Hans/LC_MESSAGES/django.mo b/explorer/locale/zh_Hans/LC_MESSAGES/django.mo index b3950a1b8ba9332a80863a3d9c2edb28ea5a826d..4309a815e91270ba91ca255d4fcb6b18ee800d52 100644 GIT binary patch delta 849 zcmX}qJ1j&&6vpvm*LuI-?>Cib&}gW15;Ph%QK-a9B*bpSr9vYLl}AG&QIH@C8c~Ty zsS~AAG!#1j?>bEO%x})j+_`gi=Aq=PbgL}rHM6A%6=gVTmWw0E&nBqya1wJcfti@Z z3|vLcU&k!m#u)CS<{zTwoucMlqMpCScD#>TVCghI=t$uwX5%cK>Q7Q>p=B(>4J^PN z)I!JZ8S2GXs14s>CqDW3H)`E9CTTnuwQf}`Fe|3fN{1%&qITSm+VP%ZrHmGpv4(nZ)AL=_iw-RC!)jno}P8=Yng_i|P_q0h3ivI3OLSL!ULR5#X z-@Bpv@>g`$I_4Te$EwmC)&pi`H1tIcVF#DOtwZjOl@q0ezFvhR|1bG=k%~M-E@on{ F(I2_SI`RMj delta 649 zcmXZZF)Tw-6vpw_*J>4MDW*ze=^#;&7$in478Zj|I#>{rMkE9s=^&NZ*d)&&OpnFX zL_)j-i!Oo?F^PnsA+h*>oDT1I&$;KGb8lK}4N_ZeMTg&ttM9*!xJn$x5;ox`HsB7% z(8DMmq3VyZ9xGUfm#F$1RNWn_?iqFd9kW<-ouU(Ak!IR5c48cNQF#y5=m4AX1QU3U zYE(5JP=jAl7klp&D1xC+V4m89ggt+78YYxkVoBk26f|t<=1eIcmtF8h3g?M z!PFFSnM2HS_D}=%QGI-iPc6PMugz-F7Wb%wFBX5`-yn-)JhzYi1d?(FaS=yQ=PH)J zLcR1Bb+Jc_KW+a9RqyhD$?2pmIPx# diff --git a/explorer/templates/explorer/fullscreen.html b/explorer/templates/explorer/fullscreen.html index 5596a739..6e3c5572 100644 --- a/explorer/templates/explorer/fullscreen.html +++ b/explorer/templates/explorer/fullscreen.html @@ -1,11 +1,11 @@ -{% load static %} +{% load static i18n %} - SQL Explorer{% if query %} - {{ query.title }}{% elif title %} - {{ title }}{% endif %} + {% trans "SQL Explorer" %}{% if query %} - {{ query.title }}{% elif title %} - {{ title }}{% endif %} @@ -13,7 +13,7 @@ -

{% if query %}{{ query.title }}{% if shared %}  shared{% endif %}{% else %}New Query{% endif %}

+

{% if query %}{{ query.title }}{% if shared %}  shared{% endif %}{% else %}{% trans "New Query" %}{% endif %}

@@ -36,7 +36,7 @@

{% if query %}{{ query.title }}{% if shared %}  shared {% endfor %} {% else %} -

+ {% endif %}
Empty Resultset
{% trans "Empty Resultset" %}
diff --git a/explorer/templates/explorer/preview_pane.html b/explorer/templates/explorer/preview_pane.html index d5cde41d..3bfb6b23 100644 --- a/explorer/templates/explorer/preview_pane.html +++ b/explorer/templates/explorer/preview_pane.html @@ -21,11 +21,11 @@
{% if rows > total_rows %} - Showing + {% trans Showing %} {% else %} - First + {% trans First %} {% endif %} - of {{ total_rows }} total rows. + {% blocktrans %}of {{ total_rows }} total rows.{% endblocktrans %} @@ -78,7 +78,7 @@ {% endfor %} {% else %} - Empty Resultset + {% blocktrans %}Empty Resultset{% endblocktrans %} {% endif %} @@ -109,7 +109,7 @@
- Pivot + {% blocktrans %}Pivot{% endblocktrans %}
diff --git a/explorer/templates/explorer/query.html b/explorer/templates/explorer/query.html index 6cf3059b..090f17a3 100644 --- a/explorer/templates/explorer/query.html +++ b/explorer/templates/explorer/query.html @@ -36,7 +36,7 @@

{% if query %}{{ query.title }}{% if shared %}  shared{{ error|escape }}

{% endfor %}{% endif %} - +
@@ -133,13 +133,13 @@

{% if query %}{{ query.title }}{% if shared %}  shared
{% if query and can_change and tasks_enabled %} - {{ form.snapshot }} Snapshot + {{ form.snapshot }} {% blocktrans %}Snapshot{% endblocktrans %} {% endif %}
{% if query.avg_duration %} - Avg. execution: {{ query.avg_duration|floatformat:2 }}ms. Query created by {{ form.created_by_user_email }} on {{ form.created_at_time }}. + {% blocktrans with avg_duration=query.avg_duration user_email=form.created_by_user_email created=form.created_at_time %}Avg. execution: {{ avg_duration|floatformat:2 }}ms. Query created by {{ user_email }} on {{ created }}.{% endblocktrans %} {% endif %}
diff --git a/explorer/templates/explorer/query_confirm_delete.html b/explorer/templates/explorer/query_confirm_delete.html index 98964d90..4cb1d543 100644 --- a/explorer/templates/explorer/query_confirm_delete.html +++ b/explorer/templates/explorer/query_confirm_delete.html @@ -3,7 +3,7 @@ {% block sql_explorer_content %}
{% csrf_token %}
- Are you sure you want to delete "{{ object.title }}" ? + {% blocktrans with title=object.title %}Are you sure you want to delete "{{ title }}" ?{% endblocktrans %}
diff --git a/explorer/templates/explorer/query_list.html b/explorer/templates/explorer/query_list.html index 43b21eaf..27595af7 100644 --- a/explorer/templates/explorer/query_list.html +++ b/explorer/templates/explorer/query_list.html @@ -11,12 +11,12 @@ {% block sql_explorer_content %} {% if recent_queries|length > 0 %} -

Your {{ recent_queries|length }} Most Recently Run

+

{% blocktrans with qlen=recent_queries|length %} Your {{qlen}} Most Recently Run {% endblocktrans %}

- - + + @@ -76,7 +76,7 @@

{% trans "All Queries" %}

{% if tasks_enabled %} diff --git a/explorer/templates/explorer/querylog_list.html b/explorer/templates/explorer/querylog_list.html index 1589f8f2..b7c4e2cc 100644 --- a/explorer/templates/explorer/querylog_list.html +++ b/explorer/templates/explorer/querylog_list.html @@ -10,17 +10,17 @@ {% endblock %} {% block sql_explorer_content %} -

{% blocktrans %}Recent Query Logs - Page {{page_obj.number}}{% endblocktrans %}

+

{% blocktrans with pagenum=page_obj.number %}Recent Query Logs - Page {{pagenum}}{% endblocktrans %}

QueryLast Run{% trans Query %}{% trans "Last Run" %} CSV
{{ object.created_at|date:"SHORT_DATE_FORMAT" }} {% if object.created_by_user %} - by {{ object.created_by_user }} + {% blocktrans with cuser=object.created_by_user %}by {{cuser}}{% endblocktrans %} {% endif %}
- - - - - - + + + + + + @@ -30,8 +30,8 @@

{% blocktrans %}Recent Query Logs - Page {{page_obj.number}}{% endblocktrans

- - + + {% endfor %} @@ -44,7 +44,7 @@

{% blocktrans %}Recent Query Logs - Page {{page_obj.number}}{% endblocktrans << {% endif %} - Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}. + {% blocktrans with pnum=page_obj.number anum=page_obj.paginator.num_pages %}Page {{ pnum }} of {{ anum }}.{% endblocktrans %} {% if page_obj.has_next %} >> diff --git a/explorer/templates/explorer/schema.html b/explorer/templates/explorer/schema.html index ae7f88e0..4816c4e6 100644 --- a/explorer/templates/explorer/schema.html +++ b/explorer/templates/explorer/schema.html @@ -4,10 +4,10 @@ {% block sql_explorer_content_takeover %}
-

Schema

+

{% blocktrans %}Schema{% endblocktrans %}

- +

diff --git a/explorer/templates/explorer/schema_building.html b/explorer/templates/explorer/schema_building.html index 0c0e92a8..521ae442 100644 --- a/explorer/templates/explorer/schema_building.html +++ b/explorer/templates/explorer/schema_building.html @@ -1,11 +1,11 @@ {% extends "explorer/base.html" %} - +{% load i18n %} {% block sql_explorer_content_takeover %}
-

Schema is building...

-
Please wait a minute, and refresh.
+

{% blocktrans %}Schema is building...{% endblocktrans %}

+
{% blocktrans %}Please wait a minute, and refresh.{% endblocktrans %}
{% endblock %} \ No newline at end of file diff --git a/explorer/views/query.py b/explorer/views/query.py index b584045b..84d145fe 100644 --- a/explorer/views/query.py +++ b/explorer/views/query.py @@ -15,6 +15,7 @@ from explorer.views.mixins import ExplorerContextMixin from explorer.views.utils import query_viewmodel +from django.utils.translation import gettext_lazy as _ class PlayQueryView(PermissionRequiredMixin, ExplorerContextMixin, View): @@ -121,7 +122,7 @@ def post(self, request, query_id): form=form, run_query=show, rows=url_get_rows(request), - message="Query saved." if success else None + message=_("Query saved.") if success else None ) return self.render_template('explorer/query.html', vm) diff --git a/manage.py b/manage.py index 32d50d48..5ef8448a 100644 --- a/manage.py +++ b/manage.py @@ -5,3 +5,4 @@ from django.core import management if __name__ == "__main__": management.execute_from_command_line() + \ No newline at end of file

Run AtRun ByDurationSQLQuery IDPlayground{% blocktrans %}Run At{% endblocktrans %}{% blocktrans %}Run By{% endblocktrans %}{% blocktrans %}Duration{% endblocktrans %}{% blocktrans %}SQL{% endblocktrans %}{% blocktrans %}Query ID{% endblocktrans %}{% blocktrans %}Playground{% endblocktrans %}
{{ object.run_by_user.email }} {{ object.duration|floatformat:2 }}ms {{ object.sql }} {% if object.query_id %}Query {{ object.query_id }}{% elif object.is_playground %}Playground{% else %}--{% endif %}Open {% if object.query_id %}{% blocktrans %}Query{% endblocktrans %} {{ object.query_id }}{% elif object.is_playground %}{% blocktrans %}Playground{% endblocktrans %}{% else %}--{% endif %}{% blocktrans %}Open{% endblocktrans %}