Skip to content

Commit c6105d1

Browse files
Fix YAML output example and code formatting (#2256)
* Fix YAML output example and code formatting Translated by ainoneko. Co-authored-by: ainoneko <ainoneko@users.noreply.github.com>
1 parent d5d30ea commit c6105d1

File tree

4 files changed

+94
-49
lines changed

4 files changed

+94
-49
lines changed

doc/reference/interactive_console.rst

Lines changed: 59 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
Interactive console
55
--------------------------------------------------------------------------------
66

7-
The "interactive console" is Tarantool's basic "command-line interface" for entering requests
8-
and seeing results. It is what users see when they start the server
7+
The interactive console is Tarantool's basic command-line interface for entering requests
8+
and seeing results.
9+
It is what users see when they start the server
910
without an :ref:`instance file <admin-instance_file>`,
1011
or start :ref:`tarantoolctl <tarantoolctl>` with ``enter``.
11-
It is often called the Lua console to distinguish it from the administrative console,
12+
The interactive console is often called the Lua console to distinguish it from the administrative console,
1213
but in fact it can handle both Lua and SQL input.
14+
1315
The majority of examples in this manual show what users see with the
14-
interactive console, including the prompt (which can be "tarantool> "),
16+
interactive console, including the prompt (which can be ``tarantool>``),
1517
the instruction (which can be a Lua request or an SQL statement),
1618
and the response (which can be a display in either YAML format or Lua format).
1719

@@ -58,33 +60,63 @@ and it may be Lua if
5860
the last :ref:`set_default_output <console-set_default_output>`
5961
call was ``console.set_default_output('lua')``.
6062

61-
.. container:: table
63+
.. container:: table
6264

6365
.. rst-class:: left-align-column-1
6466
.. rst-class:: left-align-column-2
6567
.. rst-class:: left-align-column-3
6668
.. rst-class:: left-align-column-4
69+
.. rst-class:: left-align-column-5
70+
71+
.. list-table::
72+
:widths: 15 15 15 20 35
73+
:header-rows: 1
74+
75+
* - Type
76+
- Lua input
77+
- Lua output
78+
- YAML output
79+
- MsgPack storage
80+
81+
* - scalar
82+
- :code:`1`
83+
- :code:`1`
84+
85+
- | :code:`---`
86+
| :code:`- 1`
87+
| :code:`...`
88+
89+
- :code:`\x01`
90+
91+
* - scalar sequence
92+
- :code:`1, 2, 3`
93+
- :code:`1, 2, 3`
94+
95+
- | :code:`---`
96+
| :code:`- 1`
97+
| :code:`- 2`
98+
| :code:`- 3`
99+
| :code:`...`
100+
101+
- :code:`\x01 \x02 \x03`
102+
103+
* - 2-element table
104+
- :code:`{1, 2}`
105+
- :code:`{1, 2}`
106+
107+
- | :code:`---`
108+
| :code:`- - 1`
109+
| :literal:`\ - 2`
110+
| :code:`...`
111+
112+
- :code:`0x92 0x01 0x02`
113+
114+
* - map
115+
- :code:`{key = 1}`
116+
- :code:`{key = 1}`
67117

68-
+-----------------+-----------------+-----------------+-----------------------+---------------------------------------+
69-
| Type | Lua input | Lua output | YAML output | MsgPack storage |
70-
+=================+=================+=================+=======================+=======================================+
71-
| scalar | :code:`1` | :code:`1` | :code:`---` |br| | :code:`\x01` |
72-
| | | | :code:`- 1` |br| | |
73-
| | | | :code:`...` | |
74-
+-----------------+-----------------+-----------------+-----------------------+---------------------------------------+
75-
| scalar sequence | :code:`1,2,3` | :code:`1,2,3` | :code:`---` |br| | :code:`\x01 \x02 \x03` |
76-
| | | | :code:`- 1` |br| | |
77-
| | | | :code:`- 2` |br| | |
78-
| | | | :code:`- 3` |br| | |
79-
| | | | :code:`...` | |
80-
+-----------------+-----------------+-----------------+-----------------------+---------------------------------------+
81-
| 2-element table | :code:`{1,2}` | :code:`{1,2}` | :code:`---` |br| | :code:`0x92 0x01 0x02` |
82-
| | | | :code:`- - 1` |br| | |
83-
| | | | :code:`- - 2` |br| | |
84-
| | | | :code:`...` | |
85-
+-----------------+-----------------+-----------------+-----------------------+---------------------------------------+
86-
| map | :code:`{key=1}` | :code:`{key=1}` | :code:`---` |br| | :code:`\x81 \xa3 \x6b \x65 \x79 \x01` |
87-
| | | | :code:`- key: 1` |br| | |
88-
| | | | :code:`...` | |
89-
+-----------------+-----------------+-----------------+-----------------------+---------------------------------------+
118+
- | :code:`---`
119+
| :code:`- key: 1`
120+
| :code:`...`
90121
122+
- :code:`\x81 \xa3 \x6b \x65 \x79 \x01`

locale/ru/LC_MESSAGES/reference/interactive_console.po

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@ msgid "Interactive console"
33
msgstr ""
44

55
msgid ""
6-
"The \"interactive console\" is Tarantool's basic \"command-line interface\" "
7-
"for entering requests and seeing results. It is what users see when they "
8-
"start the server without an :ref:`instance file <admin-instance_file>`, or "
9-
"start :ref:`tarantoolctl <tarantoolctl>` with ``enter``. It is often called "
10-
"the Lua console to distinguish it from the administrative console, but in "
11-
"fact it can handle both Lua and SQL input. The majority of examples in this "
12-
"manual show what users see with the interactive console, including the "
13-
"prompt (which can be \"tarantool> \"), the instruction (which can be a Lua "
14-
"request or an SQL statement), and the response (which can be a display in "
15-
"either YAML format or Lua format)."
6+
"The interactive console is Tarantool's basic command-line interface for "
7+
"entering requests and seeing results. It is what users see when they start "
8+
"the server without an :ref:`instance file <admin-instance_file>`, or start "
9+
":ref:`tarantoolctl <tarantoolctl>` with ``enter``. The interactive console "
10+
"is often called the Lua console to distinguish it from the administrative "
11+
"console, but in fact it can handle both Lua and SQL input."
12+
msgstr ""
13+
14+
msgid ""
15+
"The majority of examples in this manual show what users see with the "
16+
"interactive console, including the prompt (which can be ``tarantool>``), the"
17+
" instruction (which can be a Lua request or an SQL statement), and the "
18+
"response (which can be a display in either YAML format or Lua format)."
1619
msgstr ""
1720

1821
msgid ""
@@ -88,21 +91,28 @@ msgstr "скалярный"
8891
msgid ":code:`1`"
8992
msgstr ""
9093

91-
msgid ":code:`---` |br| :code:`- 1` |br| :code:`...`"
92-
msgstr ""
94+
msgid ":code:`---`"
95+
msgstr ":code:`---`"
96+
97+
msgid ":code:`- 1`"
98+
msgstr ":code:`- 1`"
99+
100+
msgid ":code:`...`"
101+
msgstr ":code:`...`"
93102

94103
msgid ":code:`\\x01`"
95104
msgstr ""
96105

97106
msgid "scalar sequence"
98107
msgstr ""
99108

100-
msgid ":code:`1,2,3`"
109+
msgid ":code:`1, 2, 3`"
101110
msgstr ""
102111

103-
msgid ""
104-
":code:`---` |br| :code:`- 1` |br| :code:`- 2` |br| :code:`- 3` |br| "
105-
":code:`...`"
112+
msgid ":code:`- 2`"
113+
msgstr ""
114+
115+
msgid ":code:`- 3`"
106116
msgstr ""
107117

108118
msgid ":code:`\\x01 \\x02 \\x03`"
@@ -111,10 +121,13 @@ msgstr ""
111121
msgid "2-element table"
112122
msgstr ""
113123

114-
msgid ":code:`{1,2}`"
124+
msgid ":code:`{1, 2}`"
125+
msgstr ""
126+
127+
msgid ":code:`- - 1`"
115128
msgstr ""
116129

117-
msgid ":code:`---` |br| :code:`- - 1` |br| :code:`- - 2` |br| :code:`...`"
130+
msgid ":literal:`\\ - 2`"
118131
msgstr ""
119132

120133
msgid ":code:`0x92 0x01 0x02`"
@@ -123,10 +136,10 @@ msgstr ""
123136
msgid "map"
124137
msgstr "map (ассоциативный массив)"
125138

126-
msgid ":code:`{key=1}`"
139+
msgid ":code:`{key = 1}`"
127140
msgstr ""
128141

129-
msgid ":code:`---` |br| :code:`- key: 1` |br| :code:`...`"
142+
msgid ":code:`- key: 1`"
130143
msgstr ""
131144

132145
msgid ":code:`\\x81 \\xa3 \\x6b \\x65 \\x79 \\x01`"

locale/ru/LC_MESSAGES/reference/reference_lua/box_space/bsize.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ msgid ""
1919
msgstr ""
2020
"Количество байтов в спейсе. Это число, которое хранится во внутренней памяти"
2121
" Tarantool'а, представляет собой общее количество байтов во всех кортежах, "
22-
"включая ключи индекса. Для получения информации об измерении размера "
22+
"не включая ключи индекса. Для получения информации об измерении размера "
2323
"индекса, см. :doc:`/reference/reference_lua/box_index/bsize`."
2424

2525
msgid "**Example:**"

locale/ru/LC_MESSAGES/release/new-policy.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ msgid ""
146146
"the second version number:"
147147
msgstr ""
148148
"В минорном релизе могут вводиться новые функциональные возможности. Тем не "
149-
"менее она гарантированно будет совместима с более ранними версиями серии. "
149+
"менее он гарантированно будет совместим с более ранними версиями серии. "
150150
"Могут быть также исправлены ошибки. Каждый следующий минорный релиз получает"
151151
" номер, в котором изменено второе число:"
152152

0 commit comments

Comments
 (0)