Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

New Crowdin updates #2917

Merged
merged 66 commits into from Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
f6ff8dd
New translations tutorial-rest.md (Bulgarian)
niden Jun 3, 2021
a0d824e
New translations tutorial-vokuro.md (Bulgarian)
niden Jun 3, 2021
dbcbe69
New translations tutorial-rest.md (Spanish)
niden Jun 3, 2021
d693b6c
New translations db-phql.md (Bulgarian)
niden Jun 3, 2021
1773838
New translations db-phql.md (German)
niden Jun 3, 2021
0438058
New translations db-phql.md (Czech)
niden Jun 3, 2021
a855d94
New translations tutorial-rest.md (Czech)
niden Jun 3, 2021
c2292c0
New translations tutorial-vokuro.md (Czech)
niden Jun 3, 2021
91a8b55
New translations tutorial-vokuro.md (Spanish)
niden Jun 3, 2021
1b5f3bf
New translations db-phql.md (Spanish)
niden Jun 3, 2021
98e9763
New translations tutorial-rest.md (French)
niden Jun 3, 2021
bb2ff3e
New translations tutorial-vokuro.md (French)
niden Jun 3, 2021
b2ac181
New translations db-phql.md (French)
niden Jun 3, 2021
82badf4
New translations db-phql.md (Ukrainian)
niden Jun 3, 2021
354ea62
New translations tutorial-rest.md (Turkish)
niden Jun 3, 2021
8792238
New translations tutorial-vokuro.md (Turkish)
niden Jun 3, 2021
dbceb6f
New translations db-phql.md (Chinese Simplified)
niden Jun 3, 2021
39e39c7
New translations tutorial-rest.md (Ukrainian)
niden Jun 3, 2021
9c33e41
New translations tutorial-vokuro.md (Ukrainian)
niden Jun 3, 2021
7db5075
New translations tutorial-rest.md (Chinese Simplified)
niden Jun 3, 2021
dc9c43d
New translations db-phql.md (Serbian (Cyrillic))
niden Jun 3, 2021
6138ab7
New translations tutorial-vokuro.md (Russian)
niden Jun 3, 2021
f70bce3
New translations tutorial-rest.md (Russian)
niden Jun 3, 2021
1792f1d
New translations db-phql.md (Turkish)
niden Jun 3, 2021
baa83a6
New translations tutorial-rest.md (Serbian (Cyrillic))
niden Jun 3, 2021
c416c17
New translations tutorial-vokuro.md (Serbian (Cyrillic))
niden Jun 3, 2021
184b68e
New translations tutorial-vokuro.md (Chinese Simplified)
niden Jun 3, 2021
f85acc2
New translations tutorial-rest.md (Persian)
niden Jun 3, 2021
a7f605f
New translations tutorial-vokuro.md (Persian)
niden Jun 3, 2021
65c45b9
New translations db-phql.md (Persian)
niden Jun 3, 2021
4d2a871
New translations tutorial-vokuro.md (Thai)
niden Jun 3, 2021
199c2f2
New translations tutorial-rest.md (Thai)
niden Jun 3, 2021
3bbf104
New translations db-phql.md (Thai)
niden Jun 3, 2021
66df8ce
New translations tutorial-rest.md (Portuguese, Brazilian)
niden Jun 3, 2021
45ab1df
New translations tutorial-vokuro.md (Portuguese, Brazilian)
niden Jun 3, 2021
fff43eb
New translations db-phql.md (Portuguese, Brazilian)
niden Jun 3, 2021
4030f6b
New translations tutorial-rest.md (Indonesian)
niden Jun 3, 2021
81ac8fb
New translations tutorial-vokuro.md (Indonesian)
niden Jun 3, 2021
21cf14a
New translations db-phql.md (Indonesian)
niden Jun 3, 2021
7ad5aea
New translations tutorial-rest.md (Italian)
niden Jun 3, 2021
79ec1a5
New translations tutorial-vokuro.md (Italian)
niden Jun 3, 2021
f979b8f
New translations db-phql.md (Italian)
niden Jun 3, 2021
5f9a9ad
New translations tutorial-rest.md (Japanese)
niden Jun 3, 2021
3c2fd36
New translations tutorial-vokuro.md (Japanese)
niden Jun 3, 2021
50a4b30
New translations db-phql.md (Japanese)
niden Jun 3, 2021
dbeb3b5
New translations tutorial-rest.md (German)
niden Jun 3, 2021
a180f73
New translations tutorial-vokuro.md (German)
niden Jun 3, 2021
719401a
New translations tutorial-vokuro.md (Greek)
niden Jun 3, 2021
24f23c7
New translations tutorial-rest.md (Greek)
niden Jun 3, 2021
a4534e1
New translations db-phql.md (Greek)
niden Jun 3, 2021
9941295
New translations db-phql.md (Polish)
niden Jun 3, 2021
322d892
New translations tutorial-rest.md (Dutch)
niden Jun 3, 2021
2188557
New translations tutorial-vokuro.md (Dutch)
niden Jun 3, 2021
ce42df7
New translations db-phql.md (Russian)
niden Jun 3, 2021
25aa495
New translations tutorial-rest.md (Polish)
niden Jun 3, 2021
d6d594b
New translations tutorial-vokuro.md (Polish)
niden Jun 3, 2021
2cd002b
New translations db-phql.md (Dutch)
niden Jun 3, 2021
cd66d45
New translations tutorial-rest.md (Korean)
niden Jun 3, 2021
5aad67e
New translations tutorial-vokuro.md (Korean)
niden Jun 3, 2021
f31aa09
New translations db-phql.md (Korean)
niden Jun 3, 2021
fd3cb49
New translations db-phql.md (Mongolian)
niden Jun 3, 2021
74bc277
New translations tutorial-vokuro.md (Mongolian)
niden Jun 3, 2021
6f490be
New translations tutorial-rest.md (Mongolian)
niden Jun 3, 2021
fec9905
New translations db-phql.md (Spanish)
niden Jun 3, 2021
f81b6d9
New translations tutorial-vokuro.md (Spanish)
niden Jun 3, 2021
87abf51
New translations tutorial-rest.md (Spanish)
niden Jun 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 16 additions & 20 deletions bg-bg/db-phql.md
Expand Up @@ -3067,8 +3067,8 @@ Now you can use this function in PHQL and it internally translates to the correc

```php
<br />$phql = "SELECT *
FROM Invoices
WHERE MATCH_AGAINST(inv_title, :pattern:)";
FROM Invoices
WHERE MATCH_AGAINST(inv_title, :pattern:)";

$invoices = $modelsManager
->executeQuery(
Expand All @@ -3090,29 +3090,28 @@ use Phalcon\Db\Adapter\Pdo\MySQL as Connection;

$dialect = new Dialect();
$dialect->registerCustomFunction(
'GROUP_CONCAT',
'GROUPCONCAT',
function ($dialect, $expression) {
$arguments = $expression['arguments'];
if (true !== empty($arguments[2])) {
return sprintf(
" GROUP_CONCAT(DISTINCT %s SEPARATOR %s)",
" GROUP_CONCAT(DISTINCT %s ORDER BY %s SEPARATOR %s)",
$dialect->getSqlExpression($arguments[0]),
$dialect->getSqlExpression($arguments[1])
$dialect->getSqlExpression($arguments[1]),
$dialect->getSqlExpression($arguments[2]),
);
}

if (true !== empty($arguments[1])) {
} elseif (true !== empty($arguments[1])) {
return sprintf(
" GROUP_CONCAT(%s SEPARATOR %s)",
$dialect->getSqlExpression($arguments[0]),
$dialect->getSqlExpression($arguments[1])
);
} else {
return sprintf(
" GROUP_CONCAT(%s)",
$dialect->getSqlExpression($arguments[0])
);
}

return sprintf(
" GROUP_CONCAT(%s)",
$dialect->getSqlExpression($arguments[0])
);
}
);

Expand All @@ -3130,23 +3129,20 @@ $connection = new Connection(
Now you can use this function in PHQL and it internally translates to the correct SQL using the custom function:

```php
<br />$phql = "SELECT *
FROM Invoices
WHERE GROUP_CONCAT(inv_title, :first:, :separator:, :distinct:)";
<br />$phql = "SELECT GROUPCONCAT(inv_title, inv_title, :separator:)
FROM Invoices";

$invoices = $modelsManager
->executeQuery(
$phql,
[
'pattern' => $pattern,
'separator' => $separator,
'distinct' => $distinct,
'separator' => ", "
]
)
;
```

The above will create a `GROUP_CONCAT` based on the parameters passed to the method. If three parameters passed we will have a `GROUP_CONCAT` with a `DISTINCT` and `SEPARATOR`, if two parameters passed we will have a `GROUP_CONCAT` with `SEPARATOR` and if only one parameter passed just a `GROUP_CONCAT`
The above will create a `GROUP_CONCAT` based on the parameters passed to the method. If three parameters passed we will have a `GROUP_CONCAT` with a `DISTINCT`, `ORDER BY` and `SEPARATOR`, if two parameters passed we will have a `GROUP_CONCAT` with `SEPARATOR` and if only one parameter passed just a `GROUP_CONCAT`

## Caching

Expand Down
2 changes: 1 addition & 1 deletion bg-bg/tutorial-rest.md
Expand Up @@ -39,7 +39,7 @@ The API consists of the following methods:

## Application

As the application is simple, we will not implement any full MVC environment to develop it. In this case, we will use a [micro application](application-micro) application for our needs. The structure of the application is as follows:
As the application is simple, we will not implement any full MVC environment to develop it. In this case, we will use a [micro application](application-micro) for our needs. The structure of the application is as follows:

```php
my-rest-api/
Expand Down
6 changes: 3 additions & 3 deletions bg-bg/tutorial-vokuro.md
Expand Up @@ -730,7 +730,7 @@ The component exposes the following methods:
| `registerUserThrottling($userId)` | Implements login throttling. Reduces the effectiveness of brute force attacks |
| `createRememberEnvironment(Users $user)` | Creates the remember me environment settings the related cookies and generating tokens |
| `hasRememberMe(): bool` | Check if the session has a remember me cookie |
| `loginWithRememberMe(): Response` | Logs on using the information in the cookies |
| `loginWithRememberMe(): Response` | Logs in using the information in the cookies |
| `checkUserFlags(Users $user)` | Checks if the user is banned/inactive/suspended |
| `getIdentity(): array / null` | Returns the current identity |
| `getName(): string` | Returns the name of the user |
Expand Down Expand Up @@ -1473,7 +1473,7 @@ class Users extends Model
}
```

The `beforeValidationOnCreate` will fire every time we have a new record (`Create`), before any validations occur. We check if we have a defined password and if not, we will generate a random string, then hash that string using [Phalcon\Security](security) amd storing it in the `password` property. We also set the flag to change the password.
The `beforeValidationOnCreate` will fire every time we have a new record (`Create`), before any validations occur. We check if we have a defined password and if not, we will generate a random string, then hash that string using [Phalcon\Security](security) and storing it in the `password` property. We also set the flag to change the password.

If the password is not empty, we just set the `mustChangePassword` field to `N`. Finally, we set some defaults on whether the user is `active`, `suspended` or `banned`. This ensures that our record is ready before it is inserted in the database.

Expand Down Expand Up @@ -1517,7 +1517,7 @@ class Users extends Model
The `afterSave` event fires right after a record is saved in the database. In this event we check if emails have been enabled (see `.env` file `useMail` setting), and if active we create a new record in the `EmailConfirmations` table and then save the record. Once everything is done, a notice will appear on screen.

> **NOTE**: Note that the `EmailConfirmations` model also has an `afterCreate` event, which is responsible for actually sending the email to the user.
{: .alert .alert=info }
{: .alert .alert-info }

**Validation**

Expand Down
36 changes: 16 additions & 20 deletions cs-cz/db-phql.md
Expand Up @@ -3067,8 +3067,8 @@ Now you can use this function in PHQL and it internally translates to the correc

```php
<br />$phql = "SELECT *
FROM Invoices
WHERE MATCH_AGAINST(inv_title, :pattern:)";
FROM Invoices
WHERE MATCH_AGAINST(inv_title, :pattern:)";

$invoices = $modelsManager
->executeQuery(
Expand All @@ -3090,29 +3090,28 @@ use Phalcon\Db\Adapter\Pdo\MySQL as Connection;

$dialect = new Dialect();
$dialect->registerCustomFunction(
'GROUP_CONCAT',
'GROUPCONCAT',
function ($dialect, $expression) {
$arguments = $expression['arguments'];
if (true !== empty($arguments[2])) {
return sprintf(
" GROUP_CONCAT(DISTINCT %s SEPARATOR %s)",
" GROUP_CONCAT(DISTINCT %s ORDER BY %s SEPARATOR %s)",
$dialect->getSqlExpression($arguments[0]),
$dialect->getSqlExpression($arguments[1])
$dialect->getSqlExpression($arguments[1]),
$dialect->getSqlExpression($arguments[2]),
);
}

if (true !== empty($arguments[1])) {
} elseif (true !== empty($arguments[1])) {
return sprintf(
" GROUP_CONCAT(%s SEPARATOR %s)",
$dialect->getSqlExpression($arguments[0]),
$dialect->getSqlExpression($arguments[1])
);
} else {
return sprintf(
" GROUP_CONCAT(%s)",
$dialect->getSqlExpression($arguments[0])
);
}

return sprintf(
" GROUP_CONCAT(%s)",
$dialect->getSqlExpression($arguments[0])
);
}
);

Expand All @@ -3130,23 +3129,20 @@ $connection = new Connection(
Now you can use this function in PHQL and it internally translates to the correct SQL using the custom function:

```php
<br />$phql = "SELECT *
FROM Invoices
WHERE GROUP_CONCAT(inv_title, :first:, :separator:, :distinct:)";
<br />$phql = "SELECT GROUPCONCAT(inv_title, inv_title, :separator:)
FROM Invoices";

$invoices = $modelsManager
->executeQuery(
$phql,
[
'pattern' => $pattern,
'separator' => $separator,
'distinct' => $distinct,
'separator' => ", "
]
)
;
```

The above will create a `GROUP_CONCAT` based on the parameters passed to the method. If three parameters passed we will have a `GROUP_CONCAT` with a `DISTINCT` and `SEPARATOR`, if two parameters passed we will have a `GROUP_CONCAT` with `SEPARATOR` and if only one parameter passed just a `GROUP_CONCAT`
The above will create a `GROUP_CONCAT` based on the parameters passed to the method. If three parameters passed we will have a `GROUP_CONCAT` with a `DISTINCT`, `ORDER BY` and `SEPARATOR`, if two parameters passed we will have a `GROUP_CONCAT` with `SEPARATOR` and if only one parameter passed just a `GROUP_CONCAT`

## Caching

Expand Down
2 changes: 1 addition & 1 deletion cs-cz/tutorial-rest.md
Expand Up @@ -39,7 +39,7 @@ The API consists of the following methods:

## Application

As the application is simple, we will not implement any full MVC environment to develop it. In this case, we will use a [micro application](application-micro) application for our needs. The structure of the application is as follows:
As the application is simple, we will not implement any full MVC environment to develop it. In this case, we will use a [micro application](application-micro) for our needs. The structure of the application is as follows:

```php
my-rest-api/
Expand Down
6 changes: 3 additions & 3 deletions cs-cz/tutorial-vokuro.md
Expand Up @@ -730,7 +730,7 @@ The component exposes the following methods:
| `registerUserThrottling($userId)` | Implements login throttling. Reduces the effectiveness of brute force attacks |
| `createRememberEnvironment(Users $user)` | Creates the remember me environment settings the related cookies and generating tokens |
| `hasRememberMe(): bool` | Check if the session has a remember me cookie |
| `loginWithRememberMe(): Response` | Logs on using the information in the cookies |
| `loginWithRememberMe(): Response` | Logs in using the information in the cookies |
| `checkUserFlags(Users $user)` | Checks if the user is banned/inactive/suspended |
| `getIdentity(): array / null` | Returns the current identity |
| `getName(): string` | Returns the name of the user |
Expand Down Expand Up @@ -1473,7 +1473,7 @@ class Users extends Model
}
```

The `beforeValidationOnCreate` will fire every time we have a new record (`Create`), before any validations occur. We check if we have a defined password and if not, we will generate a random string, then hash that string using [Phalcon\Security](security) amd storing it in the `password` property. We also set the flag to change the password.
The `beforeValidationOnCreate` will fire every time we have a new record (`Create`), before any validations occur. We check if we have a defined password and if not, we will generate a random string, then hash that string using [Phalcon\Security](security) and storing it in the `password` property. We also set the flag to change the password.

If the password is not empty, we just set the `mustChangePassword` field to `N`. Finally, we set some defaults on whether the user is `active`, `suspended` or `banned`. This ensures that our record is ready before it is inserted in the database.

Expand Down Expand Up @@ -1517,7 +1517,7 @@ class Users extends Model
The `afterSave` event fires right after a record is saved in the database. In this event we check if emails have been enabled (see `.env` file `useMail` setting), and if active we create a new record in the `EmailConfirmations` table and then save the record. Once everything is done, a notice will appear on screen.

> **NOTE**: Note that the `EmailConfirmations` model also has an `afterCreate` event, which is responsible for actually sending the email to the user.
{: .alert .alert=info }
{: .alert .alert-info }

**Validation**

Expand Down
36 changes: 16 additions & 20 deletions de-de/db-phql.md
Expand Up @@ -3067,8 +3067,8 @@ Now you can use this function in PHQL and it internally translates to the correc

```php
<br />$phql = "SELECT *
FROM Invoices
WHERE MATCH_AGAINST(inv_title, :pattern:)";
FROM Invoices
WHERE MATCH_AGAINST(inv_title, :pattern:)";

$invoices = $modelsManager
->executeQuery(
Expand All @@ -3090,29 +3090,28 @@ use Phalcon\Db\Adapter\Pdo\MySQL as Connection;

$dialect = new Dialect();
$dialect->registerCustomFunction(
'GROUP_CONCAT',
'GROUPCONCAT',
function ($dialect, $expression) {
$arguments = $expression['arguments'];
if (true !== empty($arguments[2])) {
return sprintf(
" GROUP_CONCAT(DISTINCT %s SEPARATOR %s)",
" GROUP_CONCAT(DISTINCT %s ORDER BY %s SEPARATOR %s)",
$dialect->getSqlExpression($arguments[0]),
$dialect->getSqlExpression($arguments[1])
$dialect->getSqlExpression($arguments[1]),
$dialect->getSqlExpression($arguments[2]),
);
}

if (true !== empty($arguments[1])) {
} elseif (true !== empty($arguments[1])) {
return sprintf(
" GROUP_CONCAT(%s SEPARATOR %s)",
$dialect->getSqlExpression($arguments[0]),
$dialect->getSqlExpression($arguments[1])
);
} else {
return sprintf(
" GROUP_CONCAT(%s)",
$dialect->getSqlExpression($arguments[0])
);
}

return sprintf(
" GROUP_CONCAT(%s)",
$dialect->getSqlExpression($arguments[0])
);
}
);

Expand All @@ -3130,23 +3129,20 @@ $connection = new Connection(
Now you can use this function in PHQL and it internally translates to the correct SQL using the custom function:

```php
<br />$phql = "SELECT *
FROM Invoices
WHERE GROUP_CONCAT(inv_title, :first:, :separator:, :distinct:)";
<br />$phql = "SELECT GROUPCONCAT(inv_title, inv_title, :separator:)
FROM Invoices";

$invoices = $modelsManager
->executeQuery(
$phql,
[
'pattern' => $pattern,
'separator' => $separator,
'distinct' => $distinct,
'separator' => ", "
]
)
;
```

The above will create a `GROUP_CONCAT` based on the parameters passed to the method. If three parameters passed we will have a `GROUP_CONCAT` with a `DISTINCT` and `SEPARATOR`, if two parameters passed we will have a `GROUP_CONCAT` with `SEPARATOR` and if only one parameter passed just a `GROUP_CONCAT`
The above will create a `GROUP_CONCAT` based on the parameters passed to the method. If three parameters passed we will have a `GROUP_CONCAT` with a `DISTINCT`, `ORDER BY` and `SEPARATOR`, if two parameters passed we will have a `GROUP_CONCAT` with `SEPARATOR` and if only one parameter passed just a `GROUP_CONCAT`

## Caching

Expand Down
2 changes: 1 addition & 1 deletion de-de/tutorial-rest.md
Expand Up @@ -39,7 +39,7 @@ The API consists of the following methods:

## Application

As the application is simple, we will not implement any full MVC environment to develop it. In this case, we will use a [micro application](application-micro) application for our needs. The structure of the application is as follows:
As the application is simple, we will not implement any full MVC environment to develop it. In this case, we will use a [micro application](application-micro) for our needs. The structure of the application is as follows:

```php
my-rest-api/
Expand Down
6 changes: 3 additions & 3 deletions de-de/tutorial-vokuro.md
Expand Up @@ -730,7 +730,7 @@ The component exposes the following methods:
| `registerUserThrottling($userId)` | Implements login throttling. Reduces the effectiveness of brute force attacks |
| `createRememberEnvironment(Users $user)` | Creates the remember me environment settings the related cookies and generating tokens |
| `hasRememberMe(): bool` | Check if the session has a remember me cookie |
| `loginWithRememberMe(): Response` | Logs on using the information in the cookies |
| `loginWithRememberMe(): Response` | Logs in using the information in the cookies |
| `checkUserFlags(Users $user)` | Checks if the user is banned/inactive/suspended |
| `getIdentity(): array / null` | Returns the current identity |
| `getName(): string` | Returns the name of the user |
Expand Down Expand Up @@ -1473,7 +1473,7 @@ class Users extends Model
}
```

The `beforeValidationOnCreate` will fire every time we have a new record (`Create`), before any validations occur. We check if we have a defined password and if not, we will generate a random string, then hash that string using [Phalcon\Security](security) amd storing it in the `password` property. We also set the flag to change the password.
The `beforeValidationOnCreate` will fire every time we have a new record (`Create`), before any validations occur. We check if we have a defined password and if not, we will generate a random string, then hash that string using [Phalcon\Security](security) and storing it in the `password` property. We also set the flag to change the password.

If the password is not empty, we just set the `mustChangePassword` field to `N`. Finally, we set some defaults on whether the user is `active`, `suspended` or `banned`. This ensures that our record is ready before it is inserted in the database.

Expand Down Expand Up @@ -1517,7 +1517,7 @@ class Users extends Model
The `afterSave` event fires right after a record is saved in the database. In this event we check if emails have been enabled (see `.env` file `useMail` setting), and if active we create a new record in the `EmailConfirmations` table and then save the record. Once everything is done, a notice will appear on screen.

> **NOTE**: Note that the `EmailConfirmations` model also has an `afterCreate` event, which is responsible for actually sending the email to the user.
{: .alert .alert=info }
{: .alert .alert-info }

**Validation**

Expand Down