~xigoi/xidoc

95666d3de23d5380dbfd4cd92c8f4e9906f7c3df — Adam Blažek 2 months ago ab399f9
German language
2 files changed, 15 insertions(+), 1 deletions(-)

M src/xidocpkg/commands/default.nim
M src/xidocpkg/translations.nim
M src/xidocpkg/commands/default.nim => src/xidocpkg/commands/default.nim +2 -0
@@ 442,6 442,7 @@ commands defaultCommands:
      case langStr.toLowerAscii
      of "en", "english": lEnglish
      of "cs", "cz", "czech": lCzech
      of "de", "german": lGerman
      else: xidocError "Unknown language: $1" % langStr
    doc.stack[^1].lang = some lang
    doc.renderStr(body)


@@ 637,6 638,7 @@ commands defaultCommands:
      case arg.toLowerAscii
      of "en", "english": lEnglish
      of "cs", "cz", "czech": lCzech
      of "de", "german": lGerman
      else: xidocError "Unknown language: $1" % arg
    )
    ""

M src/xidocpkg/translations.nim => src/xidocpkg/translations.nim +13 -1
@@ 2,6 2,7 @@ type
  Language* = enum
    lEnglish
    lCzech
    lGerman
  Phrase* = enum
    pCorollary
    pDefinition


@@ 19,46 20,57 @@ const translations = [
  pCorollary: [
    lEnglish: "Corollary",
    lCzech: "Důsledek",
    lGerman: "Folgesatz",
  ],
  pDefinition: [
    lEnglish: "Definition",
    lCzech: "Definice",
    lGerman: "Definition",
  ],
  pExample: [
    lEnglish: "Example",
    lCzech: "Příklad",
    lGerman: "Beispiel",
  ],
  pExercise: [
    lEnglish: "Exercise",
    lCzech: "Cvičení",
    lGerman: "Übung",
  ],
  pHtmlLanguageCode: [
    lEnglish: "en",
    lCzech: "cs",
    lGerman: "de",
  ],
  pLatexLanguageName: [
    lEnglish: "english",
    lCzech: "czech",
    lGerman: "ngerman",
  ],
  pLemma: [
    lEnglish: "Lemma",
    lCzech: "Lemma",
    lGerman: "Lemma",
  ],
  pProof: [
    lEnglish: "Proof",
    lCzech: "Důkaz",
    lGerman: "Beweis",
  ],
  pQuotation: [
    lEnglish: "“$1”",
    lCzech: "„$1“"
    lCzech: "„$1“",
    lGerman: "„$1“",
  ],
  pSolution: [
    lEnglish: "Solution",
    lCzech: "Řešení",
    lGerman: "Lösung",
  ],
  pTheorem: [
    lEnglish: "Theorem",
    lCzech: "Věta",
    lGerman: "Satz",
  ],
]