Select Git revision
data_pathfinder.js.html
l10n.go 7.56 KiB
package main
import (
"golang.org/x/text/language"
"golang.org/x/text/message"
"golang.org/x/text/message/catalog"
)
type l10nLocaleTranslation struct {
tag string
msg interface{}
}
type l10nKeyTranslation struct {
key string
tm []l10nLocaleTranslation
}
var l10nMap = []l10nKeyTranslation{
{
"does not contain a valid yaml definition",
[]l10nLocaleTranslation{
{"de", "\"%s\" enthält keine gültige yaml Struktur."},
{"en", "\"%s\" does not contain a valid yaml definition."},
},
},
{
"the specified template",
[]l10nLocaleTranslation{
{"de", "Das angegebene AddTemplate \"%s\" wurde nicht gefunden."},
{"en", "the specified template \"%s\" was not found."},
},
},
{
"the due of the todo cannot be parsed",
[]l10nLocaleTranslation{
{"de", "Das Datum %s der Aufgabe \"%s\" kann nicht verarbeitet werden."},
{"en", "the due %s of the todo \"%s\" cannot be parsed."},
},
},
{
"ToDo",
[]l10nLocaleTranslation{
{"de", "Aufgabe"},
{"en", "task"},
},
},
{
"Due",
[]l10nLocaleTranslation{
{"de", "Bis"},
{"en", "due"},
},
}, {
"File",
[]l10nLocaleTranslation{
{"de", "Datei"},
{"en", "file"},
},
}, {
"group",
[]l10nLocaleTranslation{
{"de", "Gruppe"},
{"en", "group"},
},
},
{
"Description",
[]l10nLocaleTranslation{
{"de", "Beschreibung"},
{"en", "Description"},
},
},
{
"Delivery until",
[]l10nLocaleTranslation{
{"de", "Bis"},
{"en", "until"},
},
},
{
"Provided on",
[]l10nLocaleTranslation{
{"de", "Am"},
{"en", "on"},
},
},
{
"Provided by",
[]l10nLocaleTranslation{
{"de", "Von"},
{"en", "by"},
},
},
{
"Type",
[]l10nLocaleTranslation{
{"de", "Typ"},
{"en", "Type"},
},
},
{
"Title",
[]l10nLocaleTranslation{
{"de", "Titel"},
{"en", "Title"},
},
},
{
"Alias",
[]l10nLocaleTranslation{
{"de", "Alias"},
{"en", "Alias"},
},
},
{
"Type",
[]l10nLocaleTranslation{
{"de", "Typ"},
{"en", "Type"},
},
},
{
"Keywords",
[]l10nLocaleTranslation{
{"de", "Schlüsselwörter"},
{"en", "Keywords"},
},
}, {
"Estimation",
[]l10nLocaleTranslation{
{"de", "Schätzung"},
{"en", "Estimation"},
},
}, {
"Source",
[]l10nLocaleTranslation{
{"de", "Quelle"},
{"en", "Source"},
},
},
{
"Author",
[]l10nLocaleTranslation{
{"de", "Autor"},
{"en", "Author"},
},
},
{
"Status",
[]l10nLocaleTranslation{
{"de", "Status"},
{"en", "Status"},
},
},
{
"Complexity",
[]l10nLocaleTranslation{
{"de", "Komplexität"},
{"en", "Complexity"},
},
},
{
"Difficulty",
[]l10nLocaleTranslation{
{"de", "Schwierigkeit"},
{"en", "Difficulty"},
},
},
{
"Priority",
[]l10nLocaleTranslation{
{"de", "Priorität"},
{"en", "Priority"},
},
},
{
"Version",
[]l10nLocaleTranslation{
{"de", "Version"},
{"en", "Version"},
},
},
{
"Milestone",
[]l10nLocaleTranslation{
{"de", "Meilenstein"},
{"en", "Milestone"},
},
},
{
"Created",
[]l10nLocaleTranslation{
{"de", "Erstellt am"},
{"en", "Created"},
},
},
{
"LastUpdate",
[]l10nLocaleTranslation{
{"de", "Letzte Änderung"},
{"en", "LastUpdate"},
},
},
{
"The file cannot be read",
[]l10nLocaleTranslation{
{"de", "Die Datei \"%s\" kann nicht eingelesen werden."},
{"en", "The file \"%s\" cannot be read."},
},
},
{
"The output file cannot be written",
[]l10nLocaleTranslation{
{"de", "Die Ausgabedatei kann nicht geschrieben werden (%s)."},
{"en", "The output file cannot be written (%s)."},
},
}, {
"A temporary file cannot be created",
[]l10nLocaleTranslation{
{"de", "Es kann keine temporäre Datei angelegt werden (%s)."},
{"en", "A temporary file cannot be created (%s)."},
},
}, {
"Checked",
[]l10nLocaleTranslation{
{"de", "Erledigt"},
{"en", "done"},
},
},
{
"Name",
[]l10nLocaleTranslation{
{"de", "Name"},
{"en", "Name"},
},
},
{
"Type",
[]l10nLocaleTranslation{
{"de", "Typ"},
{"en", "Type"},
},
}, {
"RequirementID",
[]l10nLocaleTranslation{
{"de", "Requirements"},
{"en", "Anforderungen"},
},
}, {
"the id must not be empty",
[]l10nLocaleTranslation{
{"de", "Die ID muss angegeben werden"},
{"en", "the id must not be empty"},
},
},
{
"the request with id already exists",
[]l10nLocaleTranslation{
{"de", "Die Anforderung mit der ID %s existiert bereits (%s)."},
{"en", "the request with id %s already exists (%s)."},
},
},
{
"YAML parse error",
[]l10nLocaleTranslation{
{"de", "YAML Fehler: %s "},
{"en", "YAML parse error: %s ."},
},
},
{
"if the type is pdf, the output option must be specified",
[]l10nLocaleTranslation{
{"de", "Der Tpy PDF benötigt die Option --output"},
{"en", "if the type is pdf, the output option must be specified"},
},
},
{
"Unknown Error",
[]l10nLocaleTranslation{
{"de", "Unbekannter Fehler: %s"},
{"en", "Unknown Error %s"},
},
},
{
"the file contains structural errors. check the YAML and if necessary the template.",
[]l10nLocaleTranslation{
{"de", "Die Datei %s enthält strukturelle Fehler (%s). Überprüfen Sie die Datei."},
{"en", "the file %s contains structural errors (%s). Check the if necessary the file."},
},
},
{
"the file is empty",
[]l10nLocaleTranslation{
{"de", "Die Datei enthält keinen Inhalt."},
{"en", "the file is empty."},
},
},
{
"the grouping key was not found",
[]l10nLocaleTranslation{
{"de", "Der Schlüssel %s existiert nicht"},
{"en", "the grouping key %s was not found"},
},
},
{
"Ratio",
[]l10nLocaleTranslation{
{"de", "Verhältnis"},
{"en", "Ratio"},
},
},
{
"Standard Deviation",
[]l10nLocaleTranslation{
{"de", "Standardabweichung"},
{"en", "Standard Deviation"},
},
},
{
"Variance",
[]l10nLocaleTranslation{
{"de", "Varianz"},
{"en", "Variance"},
},
},
{
"Average",
[]l10nLocaleTranslation{
{"de", "Mittelwert"},
{"en", "Average"},
},
},
{
"Time Spent",
[]l10nLocaleTranslation{
{"de", "Aufwand"},
{"en", "Time Spent"},
},
},
{
"Estimated",
[]l10nLocaleTranslation{
{"de", "Planwert"},
{"en", "Estimated"},
},
},
{
"unsuported type",
[]l10nLocaleTranslation{
{"de", "nicht unterstützter Typ %s"},
{"en", "unsuported type %s"},
},
},
{
"no value",
[]l10nLocaleTranslation{
{"de", "kein Wert"},
{"en", "no value"},
},
},
{
"opened",
[]l10nLocaleTranslation{
{"de", "offen"},
{"en", "opened"},
},
},
{
"closed",
[]l10nLocaleTranslation{
{"de", "geschlossen"},
{"en", "closed"},
},
},
{
"State",
[]l10nLocaleTranslation{
{"de", "Status"},
{"en", "State"},
},
},
{
"Due date",
[]l10nLocaleTranslation{
{"de", "Fälligkeitsdatum"},
{"en", "Due Date"},
},
},
{
"Labels",
[]l10nLocaleTranslation{
{"de", "Labels"},
{"en", "Labels"},
},
},
{
"Estimate",
[]l10nLocaleTranslation{
{"de", "Planwert"},
{"en", "Estimate"},
},
},
{
"Spent",
[]l10nLocaleTranslation{
{"de", "Aufwand"},
{"en", "Spent"},
},
},
{
"Assignees",
[]l10nLocaleTranslation{
{"de", "Zuweisungen"},
{"en", "Assignees"},
},
}, {
"Statistics",
[]l10nLocaleTranslation{
{"de", "Statistiken"},
{"en", "Statistics"},
},
},
}
func initL10n() {
for _, e := range l10nMap {
key := e.key
for _, f := range e.tm {
tag := language.MustParse(f.tag)
switch msg := f.msg.(type) {
case string:
message.SetString(tag, key, msg)
case catalog.Message:
message.Set(tag, key, msg)
case []catalog.Message:
message.Set(tag, key, msg...)
}
}
}
}