117 lines
4.2 KiB
Typst
117 lines
4.2 KiB
Typst
#let translations = (
|
|
fr: (
|
|
_date-fmt: "[day] $month [year repr:full]",
|
|
title: "Midas: mieux typer Python",
|
|
subtitle: "Présentation intermédiaire",
|
|
short-title: "Midas",
|
|
supervisor: "Superviseure",
|
|
"context": "Contexte",
|
|
problematic: "Problématique",
|
|
case-1: [Cas 1 -- Type != sémantique],
|
|
case-2: [Cas 2 -- Erreur de type _at runtime_],
|
|
goal: "Objectif",
|
|
gradual-typing: [Typage graduel (_gradual typing_)],
|
|
optional-typing: "Typage optionnel",
|
|
static-type-checking: "Vérification statique",
|
|
dynamic-checks: "Vérificiations dynamiques",
|
|
runtime-assertions: [Assertions _at runtime_],
|
|
value-constraints: "Contraintes de valeur",
|
|
example: "Exemple",
|
|
lat-lon-error: "Invalide, même si float+float est valide",
|
|
planning: "Planification",
|
|
initial-planning: "Planification initiale",
|
|
week: "Semaine",
|
|
objectives: "Objectifs",
|
|
initial-week1: "Kickoff, setup projet, début de prototype de syntaxe",
|
|
initial-week2: [Prototype de syntaxe, _parser_ simple],
|
|
initial-week3-6: [Implémentation d'un _type checker_],
|
|
initial-week7-9: "Générateur de code, améliorations, rapport",
|
|
current-status: "État actuel",
|
|
current-week1: "Kickoff, setup projet, début de prototype de syntaxe",
|
|
current-week2: [Prototype de syntaxe, _parser_ simple],
|
|
current-week3: [_Type checker_ basique(assign., fonctions, opérations)],
|
|
current-week4: [Diagnostiques, _control flow_, améliorer l'architecture],
|
|
current-week5: "Types génériques, sous-typage",
|
|
current-week6: "Contraintes",
|
|
current-week7-9: "Générateur de code, améliorations, rapport",
|
|
demo: "Démo",
|
|
def-custom-types: "Définition de types",
|
|
write-program: "Écrire un programme",
|
|
valid: "Valide",
|
|
invalid: "Invalide",
|
|
),
|
|
en: (
|
|
_date-fmt: "$month [day], [year repr:full]",
|
|
title: "Midas: better type checking in Python",
|
|
subtitle: "Halfway presentation",
|
|
short-title: "Midas",
|
|
supervisor: "Supervisor",
|
|
"context": "Context",
|
|
problematic: "Problematic",
|
|
case-1: [Case 1 -- Type != semantic],
|
|
case-2: [Case 2 -- Runtime type error],
|
|
goal: "Goal",
|
|
gradual-typing: "Gradual typing",
|
|
optional-typing: "Optional typing",
|
|
static-type-checking: "Static type checking",
|
|
dynamic-checks: "Dynamic checks",
|
|
runtime-assertions: "Runtime assertions",
|
|
value-constraints: "Value constraints",
|
|
example: "Example",
|
|
lat-lon-error: "Invalid, even though float+float is valid",
|
|
planning: "Planning",
|
|
initial-planning: "Initial planning",
|
|
week: "Week",
|
|
objectives: "Objectives",
|
|
initial-week1: "Kickoff, setup project, start prototyping a syntax",
|
|
initial-week2: "Syntax prototype, simple parser",
|
|
initial-week3-6: "Implement a type checker",
|
|
initial-week7-9: "Code generator, refinements, report",
|
|
current-status: "Current status",
|
|
current-week1: "Kickoff, setup project, start prototyping a syntax",
|
|
current-week2: "Syntax prototype, simple parser",
|
|
current-week3: "Basic type checker (assignments, functions, operations)",
|
|
current-week4: "Diagnostics, type check control flow, refine architecture",
|
|
current-week5: "Generic types, subtyping",
|
|
current-week6: "Constraints",
|
|
current-week7-9: "Code generator, refinements, report",
|
|
demo: "Demo",
|
|
def-custom-types: "Defining custom types",
|
|
write-program: "Writing a program",
|
|
valid: "Valid",
|
|
invalid: "Invalid",
|
|
)
|
|
)
|
|
|
|
#let months = (
|
|
fr: (
|
|
"Janvier", "Février", "Mars", "Avril",
|
|
"Mai", "Juin", "Juillet", "Août",
|
|
"Septembre", "Octobre", "Novembre", "Décembre"
|
|
),
|
|
en: (
|
|
"January", "February", "March", "April",
|
|
"May", "June", "July", "August",
|
|
"September", "October", "November", "December"
|
|
)
|
|
)
|
|
|
|
#let i18n(lang, key) = {
|
|
let dict = translations.at(lang, default: (:))
|
|
return dict.at(
|
|
key,
|
|
default: "[" + lang + ":" + key + "]"
|
|
)
|
|
}
|
|
|
|
#let i18n-date(lang, date) = {
|
|
let month = date.month() - 1
|
|
let month-name = months.at(lang, default: ()).at(
|
|
month,
|
|
default: "[" + lang + ":month[" + str(month) + "]]"
|
|
)
|
|
|
|
let fmt = i18n(lang, "_date-fmt").replace("$month", month-name)
|
|
|
|
return date.display(fmt)
|
|
} |