Update german locale (#1166)

also:
    sort keys in json alphabetically
    change the way files are printed to be grouped by language.
This will be spicy since we have many german speakers here.
This commit is contained in:
AbdBarho
2023-02-06 03:20:28 +01:00
committed by GitHub
parent 196cc0c58e
commit 7be3ca4b9c
7 changed files with 64 additions and 42 deletions
@@ -1,3 +1,4 @@
from collections import defaultdict
from glob import glob
from json import load
from os import path
@@ -23,10 +24,10 @@ def get_missing(en_json, translation_json):
def print_result(missing, not_translated, file):
if len(missing):
print("[{0}] - missing: {1} {2}".format(path.basename(path.dirname(file)), path.basename(file), missing))
print("[{0}] - {1}\tmissing: {2}".format(path.basename(path.dirname(file)), path.basename(file), missing))
if len(not_translated):
print(
"[{0}] - potentially untranslated: {1} {2}".format(
"[{0}] - {1}\tpotentially untranslated: {2}".format(
path.basename(path.dirname(file)), path.basename(file), not_translated
)
)
@@ -35,14 +36,20 @@ def print_result(missing, not_translated, file):
def audit(file, en_file):
en_json = load(open(en_file))
translation_json = load(open(file))
print_result(get_missing(en_json, translation_json), get_not_translated(en_json, translation_json), file)
return (get_missing(en_json, translation_json), get_not_translated(en_json, translation_json), file)
def main():
per_language_dict = defaultdict(list)
for en_file in glob(path.join(DIR, EN_PATH)):
for file in glob(path.join(DIR, ALL_PATH)):
if path.basename(en_file) == path.basename(file) and file != en_file:
audit(file, en_file)
file_info = audit(file, en_file)
lang = path.basename(path.dirname(file))
per_language_dict[lang].append(file_info)
for results in per_language_dict.values():
list(map(lambda args: print_result(*args), results))
print()
if __name__ == "__main__":
+6 -1
View File
@@ -4,18 +4,23 @@
"admin_dashboard": "Admin-Bereich",
"connect": "Kontakt aufnehmen",
"conversational": "Konversations-KI für alle.",
"copied": "Kopiert",
"dark_mode": "Dunkler Modus",
"dashboard": "Dashboard",
"delete": "Löschen",
"discord": "Discord",
"docs": "Doku",
"github": "GitHub",
"legal": "Rechtliches",
"light_mode": "Heller Modus",
"loading": "Wird geladen...",
"more_information": "Weiter Informationen",
"more_information": "Weitere Informationen",
"no": "Nein",
"privacy_policy": "Datenschutz-Bestimmungen",
"report_a_bug": "Einen Fehler melden",
"sign_in": "Anmelden",
"sign_out": "Abmelden",
"success": "Erfolg",
"terms_of_service": "Nutzungsbedingungen",
"title": "Open Assistant",
"yes": "Ja"
+15 -9
View File
@@ -1,17 +1,23 @@
{
"label_highlighted_yes_no_instruction": "Beantworten Sie die folgende(n) Frage(n) zu der markierten Nachricht:",
"fails_task.question": "Ist es eine schlechte Antwort, wenn man die Aufgabe sieht?",
"hate_speech": "Hassrede",
"hate_speech.explanation": "Inhalt ist beleidigend oder bedrohlich und drückt Vorurteile gegen eine geschützte Eigenschaft aus. Vorurteil bezieht sich auf vorgefasste Meinungen, die nicht auf Vernunft beruhen. Zu den geschützten Merkmalen gehören Geschlecht, ethnische Zugehörigkeit, Religion, sexuelle Orientierung, und ähnliche Merkmale.",
"label_highlighted_flag_instruction": "Wählen Sie aus, was auf die markierte Nachricht zutrifft:",
"label_highlighted_likert_instruction": "Bewerten Sie die markierte Nachricht:",
"label_message_yes_no_instruction": "Beantworten Sie die folgende(n) Frage(n) zur Nachricht:",
"label_highlighted_yes_no_instruction": "Beantworten Sie die folgende(n) Frage(n) zu der markierten Nachricht:",
"label_message_flag_instruction": "Wählen Sie aus, was auf die Nachricht zutrifft:",
"label_message_likert_instruction": "Nachricht bewerten:",
"spam.question": "Ist die Nachricht Spam?",
"fails_task.question": "Ist es eine schlechte Antwort, wenn man die Aufgabe sieht?",
"not_appropriate": "Nicht angemessen",
"pii": "Personenbezogene Daten",
"hate_speech": "Hassrede",
"sexual_content": "Sexueller Inhalt",
"label_message_yes_no_instruction": "Beantworten Sie die folgende(n) Frage(n) zur Nachricht:",
"lang_mismatch": "Sprachkonflikt",
"lang_mismatch.explanation": "Nicht in der aktuell ausgewählten Sprache geschrieben.",
"moral_judgement": "Moralisches Urteil",
"moral_judgement.explanation": "Drückt ein moralisches Urteil aus.",
"not_appropriate": "Nicht angemessen",
"not_appropriate.explanation": "Nicht angemessen für einen Assistenten.",
"pii": "Personenbezogene Daten",
"pii.explanation": "Enthält personenbezogene Daten. Beispiele hierfür sind persönliche Kontaktdaten, Lizenz- und andere Identitätsnummern, sowie Bankdaten.",
"political_content": "Politisch",
"lang_mismatch": "Sprachkonflikt"
"political_content.explanation": "Enthält politische Meinungen.",
"sexual_content": "Sexueller Inhalt",
"spam.question": "Ist die Nachricht Spam?"
}
+9 -5
View File
@@ -1,14 +1,18 @@
{
"daily": "Täglich",
"label": "Labels",
"last_updated_at": "Zuletzt aktualisiert: {{val, datetime}}",
"leaderboard": "Bestenliste",
"monthly": "Monatlich",
"next": "Nächste",
"overall": "Gesamt",
"rank": "Rang",
"score": "Punktzahl",
"user": "Benutzer",
"weekly": "Wöchentlich",
"previous": "Vorherige",
"prompt": "Prompts",
"rank": "Rang",
"reply": "Antworten",
"label": "Labels"
"score": "Punktzahl",
"top_5_contributors_today": "Top 5 Benutzer heute",
"user": "Benutzer",
"view_all": "Alle anzeigen",
"weekly": "Wöchentlich"
}
+1 -1
View File
@@ -2,9 +2,9 @@
"about": "About",
"account_settings": "Account",
"admin_dashboard": "Admin Dashboard",
"copied": "Copied",
"connect": "Connect",
"conversational": "Conversational AI for everyone.",
"copied": "Copied",
"dark_mode": "Dark Mode",
"dashboard": "Dashboard",
"delete": "Delete",
+12 -12
View File
@@ -1,24 +1,24 @@
{
"label_highlighted_yes_no_instruction": "Answer the following question(s) about the highlighted message:",
"fails_task.question": "Is it a bad reply, as an answer to the prompt task?",
"hate_speech": "Hate Speech",
"hate_speech.explanation": "Content is abusive or threatening and expresses prejudice against a protected characteristic. Prejudice refers to preconceived views not based on reason. Protected characteristics include gender, ethnicity, religion, sexual orientation, and similar characteristics.",
"label_highlighted_flag_instruction": "Select any that apply to the highlighted message:",
"label_highlighted_likert_instruction": "Rate the highlighted message:",
"label_message_yes_no_instruction": "Answer the following question(s) about the message:",
"label_highlighted_yes_no_instruction": "Answer the following question(s) about the highlighted message:",
"label_message_flag_instruction": "Select any that apply to the message:",
"label_message_likert_instruction": "Rate the message:",
"spam.question": "Is the message spam?",
"fails_task.question": "Is it a bad reply, as an answer to the prompt task?",
"label_message_yes_no_instruction": "Answer the following question(s) about the message:",
"lang_mismatch": "Wrong Language",
"lang_mismatch.explanation": "Not written in the currently selected language.",
"moral_judgement": "Judges Morality",
"moral_judgement.explanation": "Expresses moral judgement.",
"not_appropriate": "Not Appropriate",
"not_appropriate.explanation": "Inappropriate for a customer assistant.",
"pii": "Contains PII",
"pii.explanation": "Contains personally identifying information. Examples include personal contact details, license and other identity numbers and banking details.",
"hate_speech": "Hate Speech",
"hate_speech.explanation": "Content is abusive or threatening and expresses prejudice against a protected characteristic. Prejudice refers to preconceived views not based on reason. Protected characteristics include gender, ethnicity, religion, sexual orientation, and similar characteristics.",
"sexual_content": "Sexual Content",
"sexual_content.explanation": "Contains sexual content.",
"moral_judgement": "Judges Morality",
"moral_judgement.explanation": "Expresses moral judgement.",
"political_content": "Political",
"political_content.explanation": "Expresses political views.",
"lang_mismatch": "Wrong Language",
"lang_mismatch.explanation": "Not written in the currently selected language."
"sexual_content": "Sexual Content",
"sexual_content.explanation": "Contains sexual content.",
"spam.question": "Is the message spam?"
}
+10 -10
View File
@@ -1,18 +1,18 @@
{
"daily": "Daily",
"label": "Labels",
"last_updated_at": "Last updated at: {{val, datetime}}",
"leaderboard": "Leaderboard",
"monthly": "Monthly",
"next": "Next",
"overall": "Overall",
"rank": "Rank",
"score": "Score",
"user": "User",
"weekly": "Weekly",
"prompt": "Prompts",
"reply": "Replies",
"label": "Labels",
"view_all": "View all",
"top_5_contributors_today": "Top 5 Contributors Today",
"previous": "Previous",
"next": "Next"
"prompt": "Prompts",
"rank": "Rank",
"reply": "Replies",
"score": "Score",
"top_5_contributors_today": "Top 5 Contributors Today",
"user": "User",
"view_all": "View all",
"weekly": "Weekly"
}