Skip to content

Commit

Permalink
Merge pull request #2241 from doc4d/l10n_main
Browse files Browse the repository at this point in the history
New Crowdin updates
  • Loading branch information
arnaud4d authored Oct 3, 2023
2 parents add7190 + 972cf68 commit 91de831
Show file tree
Hide file tree
Showing 95 changed files with 450 additions and 221 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Entity selections can be created from existing selections using various function
| [<!-- INCLUDE EntitySelectionClass.attributeName.Syntax -->](#attributename)&nbsp;&nbsp;&nbsp;&nbsp;<!-- INCLUDE EntitySelectionClass.attributeName.Summary -->|
| [<!-- INCLUDE #EntitySelectionClass.add().Syntax -->](#add)&nbsp;&nbsp;&nbsp;&nbsp;<!-- INCLUDE #EntitySelectionClass.add().Summary -->|
| [<!-- INCLUDE #EntitySelectionClass.and().Syntax -->](#and)&nbsp;&nbsp;&nbsp;&nbsp;<!-- INCLUDE #EntitySelectionClass.and().Summary -->|
| [<!-- INCLUDE EntitySelectionClass.at().Syntax -->](#attributename)&nbsp;&nbsp;&nbsp;&nbsp;<!-- INCLUDE EntitySelectionClass.at().Summary -->|
| [<!-- INCLUDE #EntitySelectionClass.at().Syntax -->](#at)&nbsp;&nbsp;&nbsp;&nbsp;<!-- INCLUDE #EntitySelectionClass.at().Summary -->|
| [<!-- INCLUDE #EntitySelectionClass.average().Syntax -->](#average)&nbsp;&nbsp;&nbsp;&nbsp;<!-- INCLUDE #EntitySelectionClass.average().Summary -->|
| [<!-- INCLUDE #EntitySelectionClass.contains().Syntax -->](#contains)&nbsp;&nbsp;&nbsp;&nbsp;<!-- INCLUDE #EntitySelectionClass.contains().Summary -->|
| [<!-- INCLUDE #EntitySelectionClass.copy().Syntax -->](#contains)&nbsp;&nbsp;&nbsp;&nbsp;<!-- INCLUDE #EntitySelectionClass.copy().Summary -->|
Expand Down Expand Up @@ -831,6 +831,7 @@ $paths:=ds.Employee.all().distinctPaths("fullData")




:::note

*length* is automatically added as path for nested collection properties.
Expand Down Expand Up @@ -1688,6 +1689,7 @@ If you pass an invalid attribute path in *pathString* or *pathObject*, the funct
$orderColl:=New collection
$orderColl.push(New object("propertyPath";"manager.lastName"))
$orderColl.push(New object("propertyPath";"salary"))
$sortedEntitySelection:=$entitySelection.orderBy($orderColl)
```
Expand Down Expand Up @@ -2137,6 +2139,7 @@ Assuming we have ds.Employee.all().length = 10
```4d
var $slice : cs.EmployeeSelection
$slice:=ds.Employee.all().slice(-1;-2) //tries to return entities from index 9 to 8, but since 9 > 8, returns an empty entity selection
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ For more information, please refer to the [`.setWarning()` description in the Qo

#### Beschreibung

The `Web Form` command <!-- REF #_command_.webForm.Summary --> returns a `4D.WebForm` proxy object that allows you to interact with the web form<!-- END REF -->.
The `Web Form` command <!-- REF #_command_.Web Form.Summary --> returns a `4D.WebForm` proxy object that allows you to interact with the web form<!-- END REF -->.

For more information, please refer to the [`webForm` command description in the Qodly documentation](https://developer.qodly.com/docs/language/WebFormClass#webform).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ In *reason*, you can pass a string describing why the connection is being closed

#### Beschreibung

The `.url` property contains <!-- REF #WebSocketClass.connections.Summary -->the URL to which the WebSocket has connected<!-- END REF -->. It is the URL you passed to the [`new()`](#4dwebsocketnew) function.
The `.url` property contains <!-- REF #WebSocketClass.url.Summary -->the URL to which the WebSocket has connected<!-- END REF -->. It is the URL you passed to the [`new()`](#4dwebsocketnew) function.

This property is read-only.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ This option only appears if the Qodly Studio license is activated.

:::

This option enables user access to [Qodly Studio](../WebServer/qodly-studio.md) at the 4D application level. Note that you also need to [enable the access at every project level](../Settings/web.md#enable-access-to-qodly-studio).
This option enables user access to [Qodly Studio](../WebServer/qodly-studio.md) at the 4D application level. Note that you also need to [enable the access at every project level](../settings/web.md#enable-access-to-qodly-studio).


## WebAdmin Headless Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ To modify the location where these files are stored, click the **...** button. A

### Log management

The **Use Log File** option, when checked, indicates that the application uses a log file. The pathname of the log file for the current data file is specified below the option. When this option is checked, it is not possible to open the application without a log file. For more information about the log file, please refer to [log file](../log.md)
The **Use Log File** option, when checked, indicates that the application uses a log file. The pathname of the log file for the current data file is specified below the option. When this option is checked, it is not possible to open the application without a log file. For more information about the log file, please refer to [log file](log.md)

By default, any project created with 4D uses a log file (option **Use Log File** checked in the **General Page** of the **Preferences**). The log file is named *data.journal* and is placed in the Data folder.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,10 @@ Function getValue -> $v : Integer

## Parameter indirection (${N})

4D project methods accept a variable number of parameters. You can address those parameters with a `For...End for` loop, the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command and the **parameter indirection syntax**. Within the method, an indirection address is formatted `${N}`, where `N` is a numeric expression. `${N}` is called a **generic parameter**.
4D methods and functions accept a variable number of parameters. You can address those parameters with a `For...End for` loop, the [`Count parameters`](https://doc.4d.com/4dv20/help/command/en/page259.html) command and the **parameter indirection syntax**. Within the method, an indirection address is formatted `${N}`, where `N` is a numeric expression.



### Using generic parameters
### Using variadic parameters

For example, consider a method that adds values and returns the sum formatted according to a format that is passed as a parameter. Bei jedem Aufruf dieser Methode kann die Anzahl der zu addierenden Werte variieren. Wir müssen die Werte als Parameter an die Methode und das Format in Form einer Zeichenkette übergeben. Die Anzahl der Werte kann von Aufruf zu Aufruf variieren.

Expand All @@ -214,7 +213,7 @@ The method's parameters must be passed in the correct order, first the format an
Result:=MySum("000";1;2;200) //"203"
```

Note that even if you declared 0, 1, or more parameters in the method, you can always pass the number of parameters that you want. Parameters are all available within the called method through the `${N}` syntax and extra parameters type is [Variant](dt_variant.md) by default (you can declare them using a [compiler directive](#declaring-generic-parameters)). You just need to make sure parameters exist, thanks to the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command. Beispiel:
Note that even if you declared 0, 1, or more parameters, you can always pass the number of parameters that you want. Parameters are all available within the called code through the `${N}` syntax and extra parameters type is [Variant](dt_variant.md) by default (you can declare them using the [variadic notation](#declaring-variadic-parameters)). You just need to make sure parameters exist, thanks to the [`Count parameters`](https://doc.4d.com/4dv20/help/command/en/page259.html) command. Beispiel:

```4d
//foo method
Expand All @@ -233,24 +232,68 @@ foo("hello";"world";!01/01/2021!;42;?12:00:00?) //extra parameters are passed //
> Die Indirektion von Parametern funktioniert am besten, wenn Sie die folgende Regel beachten: Werden nur einige der Parameter durch Indirektion angesprochen, sollten sie nach den anderen übergeben werden.

### Generische Parameter deklarieren
### Declaring variadic parameters

Analog zu anderen lokalen Variablen müssen auch generische Parameter nicht zwingend über Compiler Direktive aufgerufen werden. Es wird jedoch empfohlen, um jegliche Zweideutigkeiten zu vermeiden. Non-declared generic parameters automatically get the [Variant](dt_variant.md) type.
It is not mandatory to declare variadic parameters. Non-declared variadic parameters automatically get the [Variant](dt_variant.md) type.

To declare generic parameters, you use a compiler directive to which you pass ${N} as a parameter, where N specifies the first generic parameter.
However, to avoid type mismatch errors during code execution, you can declare a variable number of parameters using the "..." notation in the prototypes of your functions, class constructors and methods (variadic parameters). You specify the parameter's type following notation "..." with the desired type.

```4d
C_TEXT(${4})
#DECLARE ( ... : Text ) // Undefined number of 'Text' parameters
```

```4d
Function myfunction ( ... : Text)
```

This command means that starting with the fourth parameter (included), the method can receive a variable number of parameters of text type. The first three parameters can be of any data type. Nutzen Sie jedoch $2 per Indirektion, wird als Datentyp der generische Typ verwendet. $1, $2 und $3 können einen beliebigen Datentyp haben.

> Die Nummer in der Deklaration muss eine Konstante und keine Variable sein.
When declaring multiple parameters, variadic notation must be employed at last position, for example:

```4d
#DECLARE ( param: Real ; ... : Text )
```

```4d
Function myfunction (var1: Integer ; ... : Text)
```



#### Beispiel

Here we have a method called `SumNumbers` that returns the calculated total for all the numbers passed as parameters:

```4d
#DECLARE( ... : Real) : Real
var $number; $total : Real
For each ($number; 1; Count parameters)
$total+=${$number}
End for each
return $total
```

This method can be called with a variable number of Real parameters. In case of wrong parameter type, an error will be returned before the method is executed :

```4d
$total1:=SumNumbers // returns 0
$total2:=SumNumbers(1; 2; 3; 4; 5) // returns 15
$total3:=SumNumbers(1; 2; "hello"; 4; 5) // error
```

:::note Compatibility Note

The legacy syntax for declaring variadic parameters (`C_TEXT(${4})`) is still supported for compatibility but the variadic notation is now preferred.

:::

## `Compiler` method

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var $mycol:=[] // Inferred as a Collection

:::note

The inferred type might be different between [interpreted and compiled mode](interpreted-compiled.md) if the evaluation of the value is too ambiguous. In this case, a warning is generated by the compiler and a variant type is used. For example, in the following $a type will be correctly inferred in interpreted mode (Text), but the syntax checking will generate a warning and $a will be typed as a variant for the compiled mode.
The inferred type might be different between [interpreted and compiled mode](interpreted.md) if the evaluation of the value is too ambiguous. In this case, a warning is generated by the compiler and a variant type is used. For example, in the following $a type will be correctly inferred in interpreted mode (Text), but the syntax checking will generate a warning and $a will be typed as a variant for the compiled mode.

```4d
var $class:={test: "a"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Read [**What’s new in 4D v20 R3**](https://blog.4d.com/en-whats-new-in-4d-v20-
- Support of *context* parameter in [`Formula from string`](../API/FunctionClass.md#formula-from-string).
- Support of `headers` property in *connectionHandler* parameter of [4D.WebSocket.new](../API/WebSocketClass.md#4dwebsocketnew).
- Support for [initializing the variable's value and data type in the declaration line](../Concepts/variables/#initializing-variables-in-the-declaration-line).
- Log file settings are now [saved with the current data file](settings.md#log-file-management)
- Log file settings are now [saved with the current data file](../Backup/settings.md#log-file-management)
- 4D Language commands: [What's new page](https://doc.4d.com/4Dv20R2/4D/20-R2/What-s-new.901-6398284.en.html) on doc.4d.com.
- 4D Write Pro: [What's new page](https://doc.4d.com/4Dv20R2/4D/20-R2/What-s-new.901-6390313.en.html) on doc.4d.com.
- [**Fixed bug list**](https://bugs.4d.fr/fixedbugslist?version=20_R3): list of all bugs that have been fixed in 4D v20 R3.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ title: About REST Requests

The following structures are supported for REST requests:

| URI | Resource (Input) | /? or &{filter} (Output) |
| -------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| http://{servername}:{port}/rest/ | [{dataClass}](%7BdataClass%7D.html) | [$filter]($filter.md), [$attributes]($attributes.md), [$skip]($skip.md), [$method=...]($method.md)... |
| | [{dataClass}](%7BdataClass%7D.html)/[$entityset/{entitySetID}](entityset.html#entitysetentitysetid) | [$method=...]($method.md) |
| | [{dataClass}({key})](%7BdataClass%7D.html#dataclasskey) | [$attributes]($attributes.md) |
| | [{dataClass}:{attribute}(value)](%7BdataClass%7D.html#dataclassattributevalue) | |
| URI | Resource (Input) | /? or &{filter} (Output) |
| -------------------------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| http://{servername}:{port}/rest/ | [{dataClass}](dataClass.md) | [$filter]($filter.md), [$attributes]($attributes.md), [$skip]($skip.md), [$method=...]($method.md)... |
| | [{dataClass}](dataClass.md)/[$entityset/{entitySetID}]($entityset.md#entitysetentitysetid) | [$method=...]($method.md) |
| | [{dataClass}({key})](dataClass.md#dataclasskey) | [$attributes]($attributes.md) |
| | [{dataClass}:{attribute}(value)](dataClass.md#dataclassattributevalue) | |

While all REST requests must contain the URI and Resource parameters, the Output (which filters the data returned) is optional.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ The `.tableColumns` property <!-- REF #TableOptions.tableColumns.Summary -->is a

### .theme

<!-- REF #TableTheme.theme.Syntax -->
<!-- REF #TableOptions.theme.Syntax -->
**.theme** : [cs.ViewPro.TableThemeOptions](#tablethemeoptions)<!-- END REF -->


The `.theme` property <!-- REF #TableTheme.theme.Summary -->defines a table theme. Can also be a text (name of a native SpreadJS theme)<!-- END REF -->.
The `.theme` property <!-- REF #TableOptions.theme.Summary -->defines a table theme. Can also be a text (name of a native SpreadJS theme)<!-- END REF -->.

See the [native SpreadJS themes](https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Sheets.Tables.TableThemes).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ This option only appears if the Qodly Studio license is activated.

:::

This option enables user access to [Qodly Studio](../WebServer/qodly-studio.md) at the 4D application level. Note that you also need to [enable the access at every project level](../Settings/web.md#enable-access-to-qodly-studio).
This option enables user access to [Qodly Studio](../WebServer/qodly-studio.md) at the 4D application level. Note that you also need to [enable the access at every project level](../settings/web.md#enable-access-to-qodly-studio).


## WebAdmin Headless Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ The `.tableColumns` property <!-- REF #TableOptions.tableColumns.Summary -->is a

### .theme

<!-- REF #TableTheme.theme.Syntax -->
<!-- REF #TableOptions.theme.Syntax -->
**.theme** : [cs.ViewPro.TableThemeOptions](#tablethemeoptions)<!-- END REF -->


The `.theme` property <!-- REF #TableTheme.theme.Summary -->defines a table theme. Can also be a text (name of a native SpreadJS theme)<!-- END REF -->.
The `.theme` property <!-- REF #TableOptions.theme.Summary -->defines a table theme. Can also be a text (name of a native SpreadJS theme)<!-- END REF -->.

See the [native SpreadJS themes](https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Sheets.Tables.TableThemes).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ WebSocket server objects provide the following properties and functions:
<!-- REF #4D.WebSocketServer.new().Syntax -->**4D.WebSocketServer.new**( *WSSHandler* : Object { ; *options* : Object } ) : 4D.WebSocketServer<!-- END REF -->


<!-- REF #4D.HTTPRequest.new().Params -->
<!-- REF #4D.WebSocketServer.new().Params -->
| Parameter | Typ | | Beschreibung |
| ----------------------------------- | ------------------ |:--:| ----------------------------------------------------------------- |
| [WSSHandler](#wsshandler-parameter) | Objekt | -> | Object of the user class declaring the WebSocket Server callbacks |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ The `.tableColumns` property <!-- REF #TableOptions.tableColumns.Summary -->is a

### .theme

<!-- REF #TableTheme.theme.Syntax -->
<!-- REF #TableOptions.theme.Syntax -->
**.theme** : [cs.ViewPro.TableThemeOptions](#tablethemeoptions)<!-- END REF -->


The `.theme` property <!-- REF #TableTheme.theme.Summary -->defines a table theme. Can also be a text (name of a native SpreadJS theme)<!-- END REF -->.
The `.theme` property <!-- REF #TableOptions.theme.Summary -->defines a table theme. Can also be a text (name of a native SpreadJS theme)<!-- END REF -->.

See the [native SpreadJS themes](https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Sheets.Tables.TableThemes).

Expand Down
Loading

0 comments on commit 91de831

Please sign in to comment.