Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Official Translation: German (Python) #183

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

madiedgar
Copy link
Member

@madiedgar madiedgar commented Dec 30, 2020

Adding official translation for Python in German

Note: this is the first time we are adding an official language (which is super exciting). 🎉 So this process is open for feedback.

🔑 Keys to Python Keywords

We will start with just the Python keywords and look into the built-in functions after. Some things to keep in mind when selecting the official translation.

  1. It's not too late to introduce a new translation that might better fit
  2. The translation is to the functionality of the keyword and not necessarily to the English word itself. If there's a better way to describe what that keyword does in Python, but isn't a direct translation from the English word, this is the opportunity to embrace the beauty of your language!
  3. Please look over the translation comments in the locale file from the reviewers, as there are many insightful comments that you have all shared.

📖 Python Keyword Guidelines

Once a keyword translation is agreed upon, the format of that translation is then up for a decision. Here are the following formats that a keyword could be in:

  1. Keywords have to be one word without spaces in between:
  • The full keyword translation could be used, like global or import
  • A shortened version of the keyword can be used like async for asynchronous
  • A combination of words could be put together like classmethod or isinstance
  • A creative combination of translated words like elif for else if
  1. Keywords have to be all lowercase.

👀 Keyword Review

This will be a team effort! You should all have been asked to be part of the German Translator Team from the Legesher organization. This allows all of the previous reviewers to be requested for a review and for future input in translations. Please use this PR to point out and discuss.

Keyword translations that have received all ✅ reviews.

False: "Falsch"
None: "Nichts"
True: "Wahr"
and: "und"
as: "als" 
async: "asynchron"
else: "sonst"
except: "außer"
global: "global"
in: "in"
is: "ist"
not: "nicht"
or: "oder"
try: "versuche"
pass: "weiter"

Keywords that have received mostly ✅ but need confirmation.

 await: "erwarte" | "warte auf"
 if: "falls" | "wenn"
 import: "importiere" | "verwende"
 del: "lösche"
 def: "def" | "definiere"
 lambda: "lambda" 
 for: "für"
 while: "während" | "solange"
 with: "mit" 

Keywords that need to be discussed

  assert: "behaupte" | "fordere" | "bestätige" | "versichere"
  break: "brich" | "bruch" | "Abbruch" | "brich ab"
  class: "klasse" | "Klasse"
  continue: "fortfahren" | "überspringe"
  elif: "sonstfalls" | "sonstwenn" | "ansonsten" | "andernfalls"
  finally: "endlich" | "schlußendlich" | "abschließend" 
  from: "von" | "aus" 
  nonlocal: "unlogisch" | "nichtlokal" | "nonlokal"
  raise: "erhebe" | "auslösen" | "löse aus" | "werfe"
  return: "gib" | "gib zurück"
  yield: "liefere" | "gib ab"

@madiedgar
Copy link
Member Author

We will later look into built in functions and add official translation for those. Any input on how to make this process better would be greatly appreciated.

# << Built-In Functions >>

  abs: "abs" #✅ # absoluter wert? #absolut? #✅✅✅
  all: "alle" #✅✅✅✅✅✅
  any: "eines" #✅ #? beliebig ✅✅ # I second "beliebig"✅✅
  ascii: "ascii" #✅✅✅✅✅✅
  bin: "bin" # binär? ✅✅ #I second "binär"✅✅
  bool: "bool" # ✅ # warheitswert? ✅✅✅✅
  breakpoint: "bruchpunkt" # ✅✅✅✅ # ? Bruchpunkt #Abbruchpunkt?✅
  bytearray: "bytearray" # ? byteabfolge #? Bytearray ✅✅✅✅ # ? bytefolge
  bytes: "bytes" # ✅✅ #? Bytes ✅✅✅✅
  callable: "rufbar" # ? aufrufbar✅✅✅ # I second "aufrufbar"✅
  chr: "chr" # zeichen? ✅✅ #❓"Buchstabe" oder "Zeichen" ✅
  classmethod: "klassenmethode" # ✅✅ #?Klassenmethode✅✅✅✅
  # compile: "compiliere"✅
  compile: "kompiliere" #✅✅✅ # German spelling✅✅
  complex: "komplex" # ✅✅✅✅✅✅
  delattr: "" # entfattr? ✅✅ #löscheAttribut? #❓"lösche Attribut"✅, shortened to "löeschattr" maybe
  dict: "dict" # wörterbuch? ✅✅ ❓The German equivalent for dictionary would probably be "assoziative Liste"✅, so maybe shortened to "assozListe"; "Wörterbuch" a literal translation # 🤔
  dir: "ver" # verzeichnis? #Verzeichnis? # I second "Verzeichnis"✅✅✅
  divmod: "divmod" # ✅ # no idea, division(en) == division(de) so... #modulo? #🤔 ❓ "Division mit Rest"?✅
  enumerate: "aufzählen" # zähle_auf? #✅✅✅❓ #🤔
  eval: "evaluiere" #✅✅✅✅✅ # ? verarbeite / berechne✅
  exec: "ausführen" # ✅✅✅✅(if spaces are possible, use "führe aus" or "rufe auf")✅✅
  filter: "filter" #✅✅✅✅ # ? filtriere ✅
  float: "gleitkomma" # Gleitkomma or Fließkomma is floating point #Fließkomma? #✅✅✅
  format: "format" # -> noun | formatiere -> imperativ #formatiere? # I second "formatiere"✅✅
  frozenset: "frozenset" #gefrorenes set? #works but weird #🤔🤔🤔
  getattr: "getattr" # holeattribute? #holeAttribute # I second "holeattr"✅✅
  globals: "globale" # ✅✅✅✅✅ (alternatively, "globalvar" for "globale Variable")
  hasattr: "hatattr" # ✅✅✅✅ #hatAttribut?
  hash: "hash" #✅✅✅ # ? schlüssel / streuwert #Streuwert? #🤔 "Streuwert" is the best/the most literal translation, but I think "hash" works just fine
  help: "hilfe" # ✅✅✅✅✅
  hex: "hex" # ✅✅✅✅✅ #❓"hexadezimalzahl"
  id: "id" #✅✅✅✅ # no idea, probably same
  input: "eingabe" # ✅✅ #? Eingabe ✅✅✅
  int: "int" #✅✅✅✅✅ ? ganzzahl
  isinstance: "istinstanz" #✅✅✅✅✅
  issubclass: "istsubklasse" #✅✅✅✅✅
  iter: "iter" # Iterator same in German ✅✅✅✅
  len: "länge" #✅✅ Länge? ✅✅✅
  list: "liste" #✅✅ Liste? ✅✅✅
  locals: "locale" #✅ works but weird #lokale ✅ or maybe lokaleVariable? #🤔
  map: "karte" #✅ no idea #no idea #🤔"Karte" doesn't fit, depending on the context it means menu, or ticket, or chart, ... no idea, maybe "Abbildung"
  max: "max" #✅✅✅✅✅
  memoryview: "speicheransicht" #✅✅ #? Speicheransicht ✅✅✅
  min: "min" #✅✅✅✅✅
  # next: "weiter"
  next: "nächstes" #✅✅ More literal translation ✅ #❓"nächstfolgend"
  object: "objekt" #✅✅✅✅ # ? Objekt
  oct: "oct" #✅ do idea #no idea #❓"oktalzahl # ? oktal
  open: "öffne" #✅✅✅✅✅
  ord: "ord" #✅✅✅ # no idea #🤔
  pow: "potenz" #✅✅✅✅✅
  print: "drucke" #✅✅✅✅✅ (if spaces are allowed, "gib aus")
  property: "eigenschaft" # ✅✅✅✅ #? Eigenschaft ✅
  # range: "reichweite"✅
  range: "bereich" # Better fitting in context #✅✅✅✅ # ? Bereich
  repr: "repr" #✅✅✅✅✅ #🤔
  reversed: "umgekehrt" #✅✅✅✅✅✅
  round: "runde" #✅✅✅✅❓✅
  set: "setze" #✅✅✅✅✅✅
  setattr: "setzeattr" #✅✅✅✅✅✅
  # slice: "scheibe"
  slice: "schnitt" #✅✅ slice in this case is not necessarily a round plate, which "scheibe" implies ❓"Scheibe" fits (eine Scheibe Brot = a slice of bread) or "Stück" maybe❓
  sorted: "sortiert" #✅✅✅✅✅✅
  staticmethod: "statischemethode" #✅✅✅✅✅ #should be✅ "statischeMethode", because its two words and therefore camelcase is easier to read ✅
  str: "str" # ✅ # ? text #✅✅✅✅✅
  sum: "sum" # ? summe #✅✅✅✅✅✅
  super: "super" #✅✅ # über? # I second "über"✅✅
  tuple: "tuple" # no idea #❓"Tupel" #Tupel?✅✅✅
  type: "typ" # ✅✅✅✅ #?Typ ✅
  vars: "vars" # variablen? # I second "variablen" #Variablen?✅✅✅
  zip: "zip" #✅✅ # no idea✅ #🤔 #🤔
  __import__: "__importiere__" #✅✅✅✅✅ # ? __verwende__

Copy link
Member

@alxnull alxnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, although I was the last translator for the German translation (and have seen all suggestions already), I thought I might start some discussions on this. I added my comments and thoughts to the keyword translation that still need further discussion, for all other keywords, I agree with the translations that was mostly agreed upon.

locale/de.yaml Outdated
True: "Wahr" #✅✅✅✅✅✅
and: "und" #✅✅✅✅✅✅
as: "als" #✅✅✅✅✅✅
assert: "behaupte" # ✅ ? fordere #❓"bestätige"✅ or "versichere" might fit better ✅ (agree with "versichere")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "versichere" fits best since with assert, we want to make sure that a certain condition is fulfilled. Only "versichere" has this meaning.

locale/de.yaml Outdated
async: "asynchron" #✅✅✅✅✅✅
await: "erwarte" #✅✅✅✅✅✅ #warte auf ?
# break: "bruch"
break: "brich" # Imperative instead of noun # Abbruch ? #❓❓"brich ab"✅✅ fits better; just "brich" rather means "to fracture something"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with the given reasoning against "brich". "brich ab" (or "brichab" if without space) fits best.

locale/de.yaml Outdated
await: "erwarte" #✅✅✅✅✅✅ #warte auf ?
# break: "bruch"
break: "brich" # Imperative instead of noun # Abbruch ? #❓❓"brich ab"✅✅ fits better; just "brich" rather means "to fracture something"
class: "klasse" #✅✅ #?Klasse is a noun # needs a capital "K" <- I second this one, the "K" needs to be uppercase <-- agree <- agree
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although keywords are generally lowercase, I think the capital "K" is important here, since "klasse" can mean something different (~ "great").

locale/de.yaml Outdated
# break: "bruch"
break: "brich" # Imperative instead of noun # Abbruch ? #❓❓"brich ab"✅✅ fits better; just "brich" rather means "to fracture something"
class: "klasse" #✅✅ #?Klasse is a noun # needs a capital "K" <- I second this one, the "K" needs to be uppercase <-- agree <- agree
continue: "fortfahren" #✅✅ # ? überspringe ✅ (imperative and the semantic meaning is clearer) # <- I second this # works but weird
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To match with "break" ("brichab") better, "fahre fort"/ "fahrefort" might also work

locale/de.yaml Outdated
def: "def" # <- short | definiere? ✅✅✅✅ #🤔
del: "lösche" #✅✅✅✅❓✅
# elif: "sonstwenn"✅
elif: "sonstfalls" #✅✅✅ # If -> falls, when -> wenn #ansonsten? ❓ "sonstfalls" sounds weird, would prefer "andernfalls"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"sonstfalls" is most literal and most fitting (although I still think it sounds weird because that word actually doesn't exist)

locale/de.yaml Outdated
elif: "sonstfalls" #✅✅✅ # If -> falls, when -> wenn #ansonsten? ❓ "sonstfalls" sounds weird, would prefer "andernfalls"
else: "sonst" #✅✅✅✅✅✅
except: "außer" #✅✅✅✅✅✅
finally: "endlich" # ? schlußendlich ✅✅✅✅ # ? abschließend # I second "schlußendlich"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"schlußendlich" or (better) "schlussendlich"

locale/de.yaml Outdated
except: "außer" #✅✅✅✅✅✅
finally: "endlich" # ? schlußendlich ✅✅✅✅ # ? abschließend # I second "schlußendlich"
for: "für" #✅✅✅✅❓✅
from: "von" ✅✅ # ? aus ✅ (in the semantic context of python, this represents the meaning more clearly) # I second "aus" <-- agree
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I second "aus" as the usage would be
aus ... importiere ...
which imho sounds better than
von ... importiere ...

locale/de.yaml Outdated
in: "in" #✅✅✅✅✅✅
is: "ist" #✅✅✅✅✅✅
lambda: "lambda" #✅✅✅✅ ❓ It's a noun, so "Lambda" ✅
nonlocal: "unlogisch" # "unlogisch" is definitely wrong. "nichtlokal" is the appropriate translation ✅ # ? nonlokal #nichtlokal? #🤔 ❓ "nichtlokal"?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"nichtlokal" or "nonlokal" are both ok imo

locale/de.yaml Outdated
or: "oder" #✅✅✅✅✅✅
# pass: "besteht"✅
pass: "weiter" # pass in python means to execute a line of code that does nothing #✅✅✅✅✅
raise: "erhebe" # ? (I'm not happy with this, because one cannot use "erhebe eine Ausnahme", i.e. raise an exception, in German) # auslösen? ❓❓ "löse aus"?✅
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is difficult because also löse aus Ausnahme sounds wrong (it would be löse Ausnahme aus which wouldn't work either because the keyword would surround the exception name).
I think "werfe" would be best, although that means "throw" and is the keyword e.g. for Java/C# and not for Python.

locale/de.yaml Outdated
pass: "weiter" # pass in python means to execute a line of code that does nothing #✅✅✅✅✅
raise: "erhebe" # ? (I'm not happy with this, because one cannot use "erhebe eine Ausnahme", i.e. raise an exception, in German) # auslösen? ❓❓ "löse aus"?✅
# raise: not a direct translation, but "werfe" might be a more suitable translation, i.e. "werfe eine Ausnahme"
return: "gib" #✅✅(if spaces are possible, prefer "gib zurück")✅✅❓
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"gib" is better as it's shorter

ZeroOne010101 and others added 19 commits September 18, 2023 00:43
Some stuff needs a second opinion. Python is located at line 1247.
* Some improvements to German keywords

* Comment out old translations, add more explanations
🎉 Thanks @LoLei for your contribution!
🎉 thank you @nausicaea for your contribution!
* review german translation

* Reviewed the German translation of Python (#66)

🎉 thank you @nausicaea for your contribution!

* review german translation
🎉 thank you @otherpaco for your contribution!
* review german translation

* add german-translation for C-Keywords

* add German translation for Java-Keywords
🎉 thank you @JohannaHillebrand for your contribution!
🎉 thank you @merelyAnna for your contribution!
🎉 thank you @diana48 for your contribution!
- move file location to locale folder
:tada: thank you @twille00 for your contribution!

Co-Authored-By: twille00 <[email protected]>
Thank you for your contribution @alxnull 🎉
Some stuff needs a second opinion. Python is located at line 1247.
* Some improvements to German keywords

* Comment out old translations, add more explanations
🎉 Thanks @LoLei for your contribution!
🎉 thank you @nausicaea for your contribution!
* review german translation

* Reviewed the German translation of Python (#66)

🎉 thank you @nausicaea for your contribution!

* review german translation
🎉 thank you @otherpaco for your contribution!
* review german translation

* add german-translation for C-Keywords

* add German translation for Java-Keywords
🎉 thank you @JohannaHillebrand for your contribution!
🎉 thank you @merelyAnna for your contribution!
🎉 thank you @diana48 for your contribution!
- move file location to locale folder
:tada: thank you @twille00 for your contribution!

Co-Authored-By: twille00 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants