Skip to content

Commit 863a44f

Browse files
authored
Finished databases in getting started (#283)
1 parent ac433f7 commit 863a44f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4046
-570
lines changed

_translations/po/es/guide_runtime_response.md.po

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
9-
"POT-Creation-Date: 2025-09-04 11:19+0500\n"
9+
"POT-Creation-Date: 2025-12-26 22:37+0000\n"
1010
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
1111
"Last-Translator: Automatically generated\n"
1212
"Language-Team: none\n"
@@ -17,30 +17,31 @@ msgstr ""
1717
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1818

1919
#. type: Title ##
20-
#: en/runtime/request.md en/runtime/response.md
20+
#: ../src/guide/runtime/request.md ../src/guide/runtime/response.md
2121
#, no-wrap
2222
msgid "Headers"
2323
msgstr ""
2424

2525
#. type: Title ##
26-
#: en/runtime/request.md en/runtime/response.md
26+
#: ../src/guide/runtime/request.md ../src/guide/runtime/response.md
27+
#: ../src/internals/006-git-commit-messages.md
2728
#, no-wrap
2829
msgid "Body"
2930
msgstr ""
3031

3132
#. type: Title #
32-
#: en/runtime/response.md
33+
#: ../src/guide/runtime/response.md
3334
#, no-wrap
3435
msgid "Response"
3536
msgstr ""
3637

3738
#. type: Plain text
38-
#: en/runtime/response.md
39+
#: ../src/guide/runtime/response.md
3940
msgid "HTTP response has status code and message, a set of headers and a body:"
4041
msgstr ""
4142

4243
#. type: Fenced code block
43-
#: en/runtime/response.md
44+
#: ../src/guide/runtime/response.md
4445
#, no-wrap
4546
msgid ""
4647
"HTTP/1.1 200 OK\n"
@@ -55,17 +56,17 @@ msgid ""
5556
msgstr ""
5657

5758
#. type: Plain text
58-
#: en/runtime/response.md
59+
#: ../src/guide/runtime/response.md
5960
msgid "Yii uses [PSR-7 `Response`](https://www.php-fig.org/psr/psr-7/) in the web application to represent response."
6061
msgstr ""
6162

6263
#. type: Plain text
63-
#: en/runtime/response.md
64+
#: ../src/guide/runtime/response.md
6465
msgid "The object should be constructed and returned as a result of the execution of controller actions or other middleware. Usually, the middleware has a response factory injected into its constructor."
6566
msgstr ""
6667

6768
#. type: Fenced code block (php)
68-
#: en/runtime/response.md
69+
#: ../src/guide/runtime/response.md
6970
#, no-wrap
7071
msgid ""
7172
"use Psr\\Http\\Message\\ResponseFactoryInterface;\n"
@@ -90,18 +91,18 @@ msgid ""
9091
msgstr ""
9192

9293
#. type: Title ##
93-
#: en/runtime/response.md
94+
#: ../src/guide/runtime/response.md
9495
#, no-wrap
9596
msgid "Status code"
9697
msgstr ""
9798

9899
#. type: Plain text
99-
#: en/runtime/response.md
100+
#: ../src/guide/runtime/response.md
100101
msgid "You can set a status code like the following:"
101102
msgstr ""
102103

103104
#. type: Fenced code block (php)
104-
#: en/runtime/response.md
105+
#: ../src/guide/runtime/response.md
105106
#, no-wrap
106107
msgid ""
107108
"use Yiisoft\\Http\\Status;\n"
@@ -110,75 +111,75 @@ msgid ""
110111
msgstr ""
111112

112113
#. type: Plain text
113-
#: en/runtime/response.md
114+
#: ../src/guide/runtime/response.md
114115
msgid "Majority of status codes are available from `Status` class for convenience and readability."
115116
msgstr ""
116117

117118
#. type: Plain text
118-
#: en/runtime/response.md
119+
#: ../src/guide/runtime/response.md
119120
msgid "You can set headers like this:"
120121
msgstr ""
121122

122123
#. type: Fenced code block (php)
123-
#: en/runtime/response.md
124+
#: ../src/guide/runtime/response.md
124125
#, no-wrap
125126
msgid "$response = $response->withHeader('Content-type', 'application/json');\n"
126127
msgstr ""
127128

128129
#. type: Plain text
129-
#: en/runtime/response.md
130+
#: ../src/guide/runtime/response.md
130131
msgid "If there is a need to append a header value to the existing header:"
131132
msgstr ""
132133

133134
#. type: Fenced code block (php)
134-
#: en/runtime/response.md
135+
#: ../src/guide/runtime/response.md
135136
#, no-wrap
136137
msgid "$response = $response->withAddedHeader('Set-Cookie', 'qwerty=219ffwef9w0f; Domain=somecompany.co.uk; Path=/; Expires=Wed, 30 Aug 2019 00:00:00 GMT');\n"
137138
msgstr ""
138139

139140
#. type: Plain text
140-
#: en/runtime/response.md
141+
#: ../src/guide/runtime/response.md
141142
msgid "And, if needed, headers could be removed:"
142143
msgstr ""
143144

144145
#. type: Fenced code block (php)
145-
#: en/runtime/response.md
146+
#: ../src/guide/runtime/response.md
146147
#, no-wrap
147148
msgid "$response = $response->withoutHeader('Set-Cookie');\n"
148149
msgstr ""
149150

150151
#. type: Plain text
151-
#: en/runtime/response.md
152+
#: ../src/guide/runtime/response.md
152153
msgid "Response body is an object implementing `Psr\\Http\\Message\\StreamInterface`."
153154
msgstr ""
154155

155156
#. type: Plain text
156-
#: en/runtime/response.md
157+
#: ../src/guide/runtime/response.md
157158
msgid "You can write to it via the interface itself:"
158159
msgstr ""
159160

160161
#. type: Fenced code block (php)
161-
#: en/runtime/response.md
162+
#: ../src/guide/runtime/response.md
162163
#, no-wrap
163164
msgid ""
164165
"$body = $response->getBody();\n"
165166
"$body->write('Hello');\n"
166167
msgstr ""
167168

168169
#. type: Title ##
169-
#: en/runtime/response.md
170+
#: ../src/guide/runtime/response.md
170171
#, no-wrap
171172
msgid "Examples"
172173
msgstr ""
173174

174175
#. type: Title ###
175-
#: en/runtime/response.md
176+
#: ../src/guide/runtime/response.md
176177
#, no-wrap
177178
msgid "Redirecting"
178179
msgstr ""
179180

180181
#. type: Fenced code block (php)
181-
#: en/runtime/response.md
182+
#: ../src/guide/runtime/response.md
182183
#, no-wrap
183184
msgid ""
184185
"use Yiisoft\\Http\\Status;\n"
@@ -188,16 +189,35 @@ msgid ""
188189
" ->withHeader('Location', 'https://www.example.com'); \n"
189190
msgstr ""
190191

192+
#. type: Plain text
193+
#: ../src/guide/runtime/response.md
194+
msgid "Note that there are different statuses used for redirection:"
195+
msgstr ""
196+
197+
#. type: Plain text
198+
#: ../src/guide/runtime/response.md
199+
#, no-wrap
200+
msgid ""
201+
"| Code | Usage | What is it for |\n"
202+
"|------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n"
203+
"| 301 | `Status::MOVED_PERMANENTLY` | Permanently changed a URL structure. Search engines update their indexes, and browsers cache it. |\n"
204+
"| 308 | `Status::PERMANENT_REDIRECT` | Like 301, but guarantees the HTTP method won't change. |\n"
205+
"| 302 | `Status::FOUND` | Temporary changes like maintenance pages. Original URL should still be used for future requests. Search engines typically don't update their indexes. |\n"
206+
"| 307 | `Status::TEMPORARY_REDIRECT` | Like 302, but guarantees the HTTP method won't change. |\n"
207+
"| 303 | `Status::SEE_OTHER` | After form submissions to prevent duplicate submissions if the user refreshes. Explicitly tells to use `GET` for the redirect, even if the original request was `POST`. |\n"
208+
msgstr ""
209+
191210
#. type: Title ###
192-
#: en/runtime/response.md
211+
#: ../src/guide/runtime/response.md
193212
#, no-wrap
194213
msgid "Responding with JSON"
195214
msgstr ""
196215

197216
#. type: Fenced code block (php)
198-
#: en/runtime/response.md
217+
#: ../src/guide/runtime/response.md
199218
#, no-wrap
200219
msgid ""
220+
"use Yiisoft\\Http\\Status;\n"
201221
"use Yiisoft\\Json\\Json;\n"
202222
"\n"
203223
"$data = [\n"
@@ -207,6 +227,6 @@ msgid ""
207227
"\n"
208228
"$response->getBody()->write(Json::encode($data));\n"
209229
"return $response\n"
210-
" ->withStatus(200)\n"
211-
" ->withHeader('Content-Type', 'application/json');\n"
230+
" ->withStatus(Status::OK)\n"
231+
" ->withHeader('Content-Type', 'application/json');\n"
212232
msgstr ""

_translations/po/es/guide_start_creating-project.md.po

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
9-
"POT-Creation-Date: 2025-12-24 13:00+0000\n"
9+
"POT-Creation-Date: 2025-12-26 18:30+0000\n"
1010
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
1111
"Last-Translator: Automatically generated\n"
1212
"Language-Team: none\n"
@@ -33,7 +33,7 @@ msgstr ""
3333
msgid ""
3434
"> [!NOTE]\n"
3535
"> If you want to use another web server,\n"
36-
"> see [\"Configuring web servers\"](../../../cookbook/en/configuring-webservers/general.md).\n"
36+
"> see [\"Configuring web servers\"](../../cookbook/configuring-webservers/general.md).\n"
3737
msgstr ""
3838

3939
#. type: Plain text
@@ -46,21 +46,26 @@ msgstr ""
4646
msgid "You can create a new project from a template using the [Composer](https://getcomposer.org) package manager:"
4747
msgstr ""
4848

49-
#. type: Fenced code block
49+
#. type: Fenced code block (sh)
5050
#: ../src/guide/start/creating-project.md
5151
#, no-wrap
5252
msgid "composer create-project yiisoft/app your_project\n"
5353
msgstr ""
5454

5555
#. type: Plain text
5656
#: ../src/guide/start/creating-project.md
57-
msgid "Docker users can run the following command:"
58-
msgstr ""
57+
#, fuzzy
58+
#| msgid "Events are raised like the following:"
59+
msgid "Docker users can run the following commands:"
60+
msgstr "Los eventos se lanzan de la siguiente forma:"
5961

6062
#. type: Fenced code block (sh)
6163
#: ../src/guide/start/creating-project.md
6264
#, no-wrap
63-
msgid "docker run --rm -it -v \"$(pwd):/app\" composer/composer create-project yiisoft/app your_project\n"
65+
msgid ""
66+
"docker run --rm -it -v \"$(pwd):/app\" composer/composer create-project yiisoft/app your_project\n"
67+
"sudo chown -R $(id -u):$(id -g) your_project\n"
68+
"make composer update\n"
6469
msgstr ""
6570

6671
#. type: Plain text
@@ -93,7 +98,7 @@ msgstr ""
9398
msgid "For Docker users, run:"
9499
msgstr ""
95100

96-
#. type: Fenced code block
101+
#. type: Fenced code block (sh)
97102
#: ../src/guide/start/creating-project.md
98103
#, no-wrap
99104
msgid "make up\n"

0 commit comments

Comments
 (0)