Browse Source

Add space between ellipsis and words

Also added rule to prompt.

I thought it is okay, meanwhile, in German when there is no space inbetween, (which is why i did not fix these changes before) but this is actually not the case. In English both spellings are okay.

Has one change in the English document. If we leave those backticks, the LLM should by definition not translate it, but we want this here.
pull/14015/head
Nils Lindemann 1 week ago
parent
commit
9a47bacbe5
  1. 4
      docs/de/docs/advanced/templates.md
  2. 4
      docs/de/docs/deployment/concepts.md
  3. 6
      docs/de/docs/how-to/custom-docs-ui-assets.md
  4. 2
      docs/de/docs/index.md
  5. 4
      docs/de/docs/tutorial/bigger-applications.md
  6. 2
      docs/de/docs/tutorial/cors.md
  7. 4
      docs/de/docs/tutorial/debugging.md
  8. 4
      docs/de/docs/tutorial/extra-models.md
  9. 2
      docs/de/docs/tutorial/path-params-numeric-validations.md
  10. 10
      docs/de/docs/tutorial/query-params-str-validations.md
  11. 2
      docs/de/docs/tutorial/sql-databases.md
  12. 55
      docs/de/llm-prompt.md
  13. 2
      docs/en/docs/how-to/custom-docs-ui-assets.md

4
docs/de/docs/advanced/templates.md

@ -71,7 +71,7 @@ Item ID: {{ id }}
{% endraw %}
...wird die `id` angezeigt, welche dem „Kontext“-`dict` entnommen wird, welches Sie übergeben haben:
... wird die `id` angezeigt, welche dem „Kontext“-`dict` entnommen wird, welches Sie übergeben haben:
```Python
{"id": id}
@ -97,7 +97,7 @@ Der Abschnitt mit:
{% endraw %}
...generiert also einen Link zu derselben URL, welche von der *Pfadoperation-Funktion* `read_item(id=id)` gehandhabt werden würde.
... generiert also einen Link zu derselben URL, welche von der *Pfadoperation-Funktion* `read_item(id=id)` gehandhabt werden würde.
Mit beispielsweise der ID `42` würde dies Folgendes ergeben:

4
docs/de/docs/deployment/concepts.md

@ -121,7 +121,7 @@ Einige Beispiele für Tools, die diese Aufgabe übernehmen können, sind:
* Systemd
* Supervisor
* Es wird intern von einem Cloud-Anbieter im Rahmen seiner Dienste verwaltet
* Andere...
* Andere ...
In den nächsten Kapiteln werde ich Ihnen konkretere Beispiele geben.
@ -174,7 +174,7 @@ Dies könnte zum Beispiel erledigt werden durch:
* Systemd
* Supervisor
* Intern von einem Cloud-Anbieter im Rahmen seiner Dienste
* Andere...
* Andere ...
## Replikation – Prozesse und Arbeitsspeicher { #replication-processes-and-memory }

6
docs/de/docs/how-to/custom-docs-ui-assets.md

@ -32,7 +32,7 @@ Sie können die internen Funktionen von FastAPI wiederverwenden, um die HTML-Sei
* `swagger_js_url`: die URL, unter welcher der HTML-Code für Ihre Swagger-UI-Dokumentation die **JavaScript**-Datei abrufen kann. Dies ist die benutzerdefinite CDN-URL.
* `swagger_css_url`: die URL, unter welcher der HTML-Code für Ihre Swagger-UI-Dokumentation die **CSS**-Datei abrufen kann. Dies ist die benutzerdefinite CDN-URL.
Und ähnlich für ReDoc...
Und ähnlich für ReDoc ...
{* ../../docs_src/custom_docs_ui/tutorial001.py hl[2:6,11:19,22:24,27:33] *}
@ -89,7 +89,7 @@ Ihre neue Dateistruktur könnte so aussehen:
Laden Sie die für die Dokumentation benötigten statischen Dateien herunter und legen Sie diese im Verzeichnis `static/` ab.
Sie können wahrscheinlich mit der rechten Maustaste auf jeden Link klicken und eine Option wie etwa `Link speichern unter...` auswählen.
Sie können wahrscheinlich mit der rechten Maustaste auf jeden Link klicken und eine Option wie etwa „Link speichern unter ...“ auswählen.
**Swagger UI** verwendet folgende Dateien:
@ -158,7 +158,7 @@ Auch hier können Sie die internen Funktionen von FastAPI wiederverwenden, um di
* `swagger_js_url`: die URL, unter welcher der HTML-Code für Ihre Swagger-UI-Dokumentation die **JavaScript**-Datei abrufen kann. **Das ist die, welche jetzt von Ihrer eigenen Anwendung bereitgestellt wird**.
* `swagger_css_url`: die URL, unter welcher der HTML-Code für Ihre Swagger-UI-Dokumentation die **CSS**-Datei abrufen kann. **Das ist die, welche jetzt von Ihrer eigenen Anwendung bereitgestellt wird**.
Und ähnlich für ReDoc...
Und ähnlich für ReDoc ...
{* ../../docs_src/custom_docs_ui/tutorial002.py hl[2:6,14:22,25:27,30:36] *}

2
docs/de/docs/index.md

@ -227,7 +227,7 @@ INFO: Application startup complete.
</div>
<details markdown="1">
<summary>Was der Befehl <code>fastapi dev main.py</code> macht...</summary>
<summary>Was der Befehl <code>fastapi dev main.py</code> macht ...</summary>
Der Befehl `fastapi dev` liest Ihre `main.py`-Datei, erkennt die **FastAPI**-App darin und startet einen Server mit <a href="https://www.uvicorn.org" class="external-link" target="_blank">Uvicorn</a>.

4
docs/de/docs/tutorial/bigger-applications.md

@ -193,7 +193,7 @@ async def read_item(item_id: str):
...
```
...darf das Präfix kein abschließendes `/` enthalten.
... darf das Präfix kein abschließendes `/` enthalten.
Das Präfix lautet in diesem Fall also `/items`.
@ -212,7 +212,7 @@ Das Endergebnis ist, dass die Pfade für diese Artikel jetzt wie folgt lauten:
* `/items/`
* `/items/{item_id}`
...wie wir es beabsichtigt hatten.
... wie wir es beabsichtigt hatten.
* Sie werden mit einer Liste von Tags gekennzeichnet, die einen einzelnen String `"items"` enthält.
* Diese „Tags“ sind besonders nützlich für die automatischen interaktiven Dokumentationssysteme (unter Verwendung von OpenAPI).

2
docs/de/docs/tutorial/cors.md

@ -63,7 +63,7 @@ Die folgenden Argumente werden unterstützt:
* `expose_headers` - Angabe der Responseheader, auf die der Browser zugreifen können soll. Standardmäßig `[]`.
* `max_age` - Legt eine maximale Zeit in Sekunden fest, die Browser CORS-Responses zwischenspeichern dürfen. Standardmäßig `600`.
Die Middleware antwortet auf zwei besondere Arten von HTTP-Requests...
Die Middleware antwortet auf zwei besondere Arten von HTTP-Requests ...
### CORS-Preflight-Requests { #cors-preflight-requests }

4
docs/de/docs/tutorial/debugging.md

@ -87,7 +87,7 @@ Da Sie den Uvicorn-Server direkt aus Ihrem Code ausführen, können Sie Ihr Pyth
Zum Beispiel können Sie in Visual Studio Code:
* Zum „Debug“-Panel gehen.
* „Konfiguration hinzufügen...“ auswählen.
* „Konfiguration hinzufügen ...“ auswählen.
* „Python“ auswählen.
* Den Debugger mit der Option „`Python: Current File (Integrated Terminal)`“ ausführen.
@ -102,7 +102,7 @@ So könnte es aussehen:
Wenn Sie Pycharm verwenden, können Sie:
* Das Menü „Run“ öffnen.
* Die Option „Debug...“ auswählen.
* Die Option „Debug ...“ auswählen.
* Ein Kontextmenü wird angezeigt.
* Die zu debuggende Datei auswählen (in diesem Fall `main.py`).

4
docs/de/docs/tutorial/extra-models.md

@ -116,7 +116,7 @@ gleichwertig zu:
UserInDB(**user_in.dict())
```
...weil `user_in.dict()` ein `dict` ist, und dann lassen wir Python es „entpacken“, indem wir es an `UserInDB` mit vorangestelltem `**` übergeben.
... weil `user_in.dict()` ein `dict` ist, und dann lassen wir Python es „entpacken“, indem wir es an `UserInDB` mit vorangestelltem `**` übergeben.
Auf diese Weise erhalten wir ein Pydantic-Modell aus den Daten eines anderen Pydantic-Modells.
@ -128,7 +128,7 @@ Und dann fügen wir das zusätzliche Schlüsselwort-Argument `hashed_password=ha
UserInDB(**user_in.dict(), hashed_password=hashed_password)
```
...was so ist wie:
... was so ist wie:
```Python
UserInDB(

2
docs/de/docs/tutorial/path-params-numeric-validations.md

@ -87,7 +87,7 @@ Wenn Sie:
* sie in einer anderen Reihenfolge haben
* nicht `Annotated` verwenden
...möchten, dann hat Python eine kleine Spezial-Syntax dafür.
... möchten, dann hat Python eine kleine Spezial-Syntax dafür.
Übergeben Sie `*`, als den ersten Parameter der Funktion.

10
docs/de/docs/tutorial/query-params-str-validations.md

@ -129,7 +129,7 @@ Also:
q: str | None = Query(default=None)
```
...macht den Parameter optional mit einem Defaultwert von `None`, genauso wie:
... macht den Parameter optional mit einem Defaultwert von `None`, genauso wie:
```Python
q: str | None = None
@ -157,7 +157,7 @@ Zum Beispiel ist das nicht erlaubt:
q: Annotated[str, Query(default="rick")] = "morty"
```
...denn es ist nicht klar, ob der Defaultwert `"rick"` oder `"morty"` sein soll.
... denn es ist nicht klar, ob der Defaultwert `"rick"` oder `"morty"` sein soll.
Sie würden also (bevorzugt) schreiben:
@ -165,7 +165,7 @@ Sie würden also (bevorzugt) schreiben:
q: Annotated[str, Query()] = "rick"
```
...oder in älteren Codebasen finden Sie:
... oder in älteren Codebasen finden Sie:
```Python
q: str = Query(default="rick")
@ -375,7 +375,7 @@ Aber `item-query` ist kein gültiger Name für eine Variable in Python.
Der am ähnlichsten wäre `item_query`.
Aber Sie benötigen dennoch, dass er genau `item-query` ist...
Aber Sie benötigen dennoch, dass er genau `item-query` ist ...
Dann können Sie ein `alias` deklarieren, und dieser Alias wird verwendet, um den Parameterwert zu finden:
@ -459,7 +459,7 @@ Dann **weisen wir diese beiden Werte** des Tupels den Variablen `id` und `name`
Wenn der Benutzer also keine Artikel-ID bereitgestellt hat, erhält er trotzdem einen zufälligen Vorschlag.
...wir tun all dies in einer **einzelnen einfachen Zeile**. 🤯 Lieben Sie nicht auch Python? 🐍
... wir tun all dies in einer **einzelnen einfachen Zeile**. 🤯 Lieben Sie nicht auch Python? 🐍
{* ../../docs_src/query_params_str_validations/tutorial015_an_py310.py ln[22:30] hl[29] *}

2
docs/de/docs/tutorial/sql-databases.md

@ -173,7 +173,7 @@ Wenn Sie die vorherige App überprüfen, können Sie in der UI sehen, dass sie b
Das sollten wir nicht zulassen, sie könnten eine `id` überschreiben, die wir bereits in der DB zugewiesen haben. Die Entscheidung über die `id` sollte vom **Backend** oder der **Datenbank** getroffen werden, **nicht vom Client**.
Außerdem erstellen wir einen `secret_name` für den Helden, aber bisher geben wir ihn überall zurück, das ist nicht sehr **geheim**... 😅
Außerdem erstellen wir einen `secret_name` für den Helden, aber bisher geben wir ihn überall zurück, das ist nicht sehr **geheim** ... 😅
Wir werden diese Dinge beheben, indem wir ein paar **zusätzliche Modelle** hinzufügen. Hier wird SQLModel glänzen. ✨

55
docs/de/llm-prompt.md

@ -37,9 +37,32 @@ Inline-Code der nur ein kurzes Stringliteral enthält: `"foo"`
`"__main__"`
4) Translate HTML abbr elements as follows:
4) make sure there is a space between an ellipsis and a word following or preceding it.
4.1) If the title attribute gives the full phrase for an abbreviation, then keep the phrase, append a long dash (`–`), followed by the translation of the phrase.
Examples:
Source (English):
...as we intended.
...this would work:
...etc.
others...
More to come...
Result (German):
... wie wir es beabsichtigt hatten.
... das würde funktionieren:
... usw.
Andere ...
Später mehr ...
4.1) Rule 4 does not apply in URLs, code blocks, inline code. Do not change the spaces there.
5) Translate HTML abbr elements as follows:
5.1) If the title attribute gives the full phrase for an abbreviation, then keep the phrase, append a long dash (`–`), followed by the translation of the phrase.
Examples:
@ -65,7 +88,7 @@ Result (German):
{full phrase} – {translation of full phrase}
4.1.1) If the phrase can not be translated, or it is the same in the translation, then keep the title attribute as is.
5.1.1) If the phrase can not be translated, or it is the same in the translation, then keep the title attribute as is.
Examples:
@ -89,7 +112,7 @@ Result (German):
{full phrase}
4.1.2) If the phrase can be translated and that translation has the same starting letters, then just use the translation.
5.1.2) If the phrase can be translated and that translation has the same starting letters, then just use the translation.
Examples:
@ -111,7 +134,7 @@ Result (German):
{translation of full phrase}
4.2) If the title attribute explains something in its own words, then translate it, if possible.
5.2) If the title attribute explains something in its own words, then translate it, if possible.
Examples:
@ -141,7 +164,7 @@ Result (German):
{translation of explanation}
4.2.1) If the term, which the HTML abbr element wraps, stays English in the translation, but it also has a translation, whose knowledge improves the explanation, then let the title attribute be that translation, followed by a colon (`:`), followed by the translation of the title attribute.
5.2.1) If the term, which the HTML abbr element wraps, stays English in the translation, but it also has a translation, whose knowledge improves the explanation, then let the title attribute be that translation, followed by a colon (`:`), followed by the translation of the title attribute.
Examples:
@ -164,7 +187,7 @@ Result (German):
{translation of term which abbr wraps}: {translation of explanation}
4.3) If the title attribute gives the full phrase for an abbreviation, followed by a colon (`:`) or a comma (`,`), followed by an explanation, then keep the phrase, append a long dash (`–`), followed by the translation of the phrase, followed by a colon (`:`), followed by the translation of the explanation.
5.3) If the title attribute gives the full phrase for an abbreviation, followed by a colon (`:`) or a comma (`,`), followed by an explanation, then keep the phrase, append a long dash (`–`), followed by the translation of the phrase, followed by a colon (`:`), followed by the translation of the explanation.
Examples:
@ -198,10 +221,10 @@ Result (German):
{full phrase} – {translation of full phrase}: {translation of explanation}
4.4) If there is an HTML abbr element in a sentence in an existing translation, but that element does not exist in the related sentence in the English text, then keep that HTML abbr element in the translation, do not change or remove it. Except when you remove the whole sentence from the translation, because the whole sentence was removed from the English text. The reasoning for this rule is, that such abbr elements are manually added by the human editor of the translation, in order to translate or explain an English word to the human readers of the translation. They would not make sense in the English text, but they do make sense in the translation. So keep them in the translation, even though they are not part of the English text. This rule only applies to HTML abbr elements.
5.4) If there is an HTML abbr element in a sentence in an existing translation, but that element does not exist in the related sentence in the English text, then keep that HTML abbr element in the translation, do not change or remove it. Except when you remove the whole sentence from the translation, because the whole sentence was removed from the English text. The reasoning for this rule is, that such abbr elements are manually added by the human editor of the translation, in order to translate or explain an English word to the human readers of the translation. They would not make sense in the English text, but they do make sense in the translation. So keep them in the translation, even though they are not part of the English text. This rule only applies to HTML abbr elements.
5) Translate headings using the infinite form.
6) Translate headings using the infinite form.
Examples:
@ -241,7 +264,7 @@ Do NOT translate with (German):
### Führen Sie Ihr Programm aus { #run-your-program }
5.1) Make sure that the translated part of the heading does not end with a period.
6.1) Make sure that the translated part of the heading does not end with a period.
Example:
@ -257,7 +280,7 @@ Do NOT translate with (German) – notice the added period:
## Ein weiteres Modul mit `APIRouter`. { #another-module-with-apirouter }
5.2) Replace occurrences of literal ` - ` (a space followed by a dash followed by a space) with ` – ` (a space followed by a long dash followed by a space) in the translated part of the heading.
6.2) Replace occurrences of literal ` - ` (a space followed by a dash followed by a space) with ` – ` (a space followed by a long dash followed by a space) in the translated part of the heading.
Example:
@ -273,7 +296,7 @@ Do NOT translate with (German):
# FastAPI in Containern - Docker { #fastapi-in-containers-docker }
5.2.1) Do not apply rule 5.2 when there is no space before or after the dash.
6.2.1) Do not apply rule 6.2 when there is no space before or after the dash.
Example:
@ -289,17 +312,17 @@ Do NOT translate with (German):
## Typhinweise und –annotationen { #type-hints-and-annotations }
Rule 5.2 does not apply to the untranslated part of the heading, which is inside curly brackets.
Rule 6.2 does not apply to the untranslated part of the heading inside curly brackets, which you shall not translate.
6) Follow these German instructions:
7) Follow these German instructions:
In der Regel versuche ich so weit wie möglich Worte zusammenzuschreiben, also ohne Bindestrich, es sei denn, es ist Konkretesding-Klassevondingen, etwa `Pydantic-Modell` (aber: `Datenbankmodell`), `Python-Modul` (aber: `Standardmodul`). Ich setze auch einen Bindestrich, wenn er die gleichen Buchstaben verbindet, etwa `Enum-Member`, `Cloud-Dienst`, `Template-Engine`. Oder wenn das Wort sonst einfach zu lang wird, etwa, `Performance-Optimierung`. Oder um etwas visuell besser zu dokumentieren, etwa `Pfadoperation-Dekorator`, `Pfadoperation-Funktion`.
Ich versuche nicht, alles einzudeutschen. Das bezieht sich besonders auf Begriffe aus dem Bereich der Programmierung. Ich wandele zwar korrekt in Großschreibung um und setze Bindestriche, wo notwendig, aber ansonsten lasse ich solch ein Wort unverändert. Beispielsweise wird aus dem englischen Wort `string` in der deutschen Übersetzung `String`, aber nicht `Zeichenkette`. Oder aus dem englischen Wort `request body` wird in der deutschen Übersetzung `Requestbody`, aber nicht `Anfragekörper`. Oder aus dem englischen `response` wird im Deutschen `Response`, aber nicht `Antwort`.
7) Below is a list of English terms and their German translations, separated by a colon (`:`). Use these translations, do not use your own. Words inside brackets are explanations for you, they are not part of the term or the translation. If a list item starts with `NOT`, then that means: do NOT use this translation. Nouns, starting with the word `the`, have their German genus – `der`, `die`, `das` – included, to help you to grammatically decline them in the translation, and they are given in singular case unless they have `(plural case)` attached, which means they are given in plural case. Verbs are given in the full infinitive – starting with the word `to`.
8) Below is a list of English terms and their German translations, separated by a colon (`:`). Use these translations, do not use your own. Words inside brackets are explanations for you, they are not part of the term or the translation. If a list item starts with `NOT`, then that means: do NOT use this translation. Nouns, starting with the word `the`, have their German genus – `der`, `die`, `das` – included, to help you to grammatically decline them in the translation, and they are given in singular case unless they have `(plural case)` attached, which means they are given in plural case. Verbs are given in the full infinitive – starting with the word `to`.
* /// check: /// check | Testen
* /// danger: /// danger | Gefahr
@ -394,4 +417,4 @@ Ich versuche nicht, alles einzudeutschen. Das bezieht sich besonders auf Begriff
* standard Python: Standard-Python
8) Preserve indentation. Keep emoticons. Encode in utf-8. Use Linux line breaks (LF)
9) Preserve indentation. Keep emoticons. Encode in utf-8. Use Linux line breaks (LF)

2
docs/en/docs/how-to/custom-docs-ui-assets.md

@ -89,7 +89,7 @@ Your new file structure could look like this:
Download the static files needed for the docs and put them on that `static/` directory.
You can probably right-click each link and select an option similar to `Save link as...`.
You can probably right-click each link and select an option similar to "Save link as...".
**Swagger UI** uses the files:

Loading…
Cancel
Save