Skip to content

Commit

Permalink
TASK: Add some docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico committed Nov 6, 2017
1 parent b1f3bb8 commit dc7fb1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lang/language.py
Expand Up @@ -14,6 +14,7 @@

# translate returns the translation for a specific string
def translate(string: str, language: str) -> str:
"""Returns the translation in a specific language for a specific string"""
if language in translations and string in translations[language]:
return translations[language][string]
elif language == "br":
Expand All @@ -24,6 +25,7 @@ def translate(string: str, language: str) -> str:


def translate_all(string: str) -> set:
"""Returns all the translations of a specific string"""
strings = []
lang_list = ["de", "en", "nl", "eo", "br", "es", "ru", "fa"]

Expand Down

0 comments on commit dc7fb1e

Please sign in to comment.