Skip to content

Commit

Permalink
RakuAST: add support for system method localization
Browse files Browse the repository at this point in the history
Methods such as TWEAK, ACCEPTS, FALLBACK are now also localizable
  • Loading branch information
lizmat committed Nov 16, 2023
1 parent 1652618 commit 50bd91f
Show file tree
Hide file tree
Showing 33 changed files with 214 additions and 54 deletions.
13 changes: 8 additions & 5 deletions lib/L10N/DE.rakumod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file contains the German Slang of the Raku Programming Language

#- start of generated part of localization ------------------------------------
#- Generated on 2023-10-31T19:16:06+01:00 by tools/build/makeL10N.raku
#- Generated on 2023-11-16T17:03:40+01:00 by tools/build/makeL10N.raku
#- PLEASE DON'T CHANGE ANYTHING BELOW THIS LINE

role L10N::DE {
Expand Down Expand Up @@ -165,8 +165,8 @@ role L10N::DE {
token use-use { verwende}
method core2ast {
my %mapping = "alle", "all", "antipare", "antipairs", "beliebig", "any", "anhängen", "append", "warte", "await", "tasche", "bag", "steig-aus", "bail-out", "segne", "bless", "kategorisier", "categorize", "decke", "ceiling", "zeichen", "chars", "hack-linieende", "chomp", "hack", "chop", "wie-zeiche", "chr", "wie-zeichen", "chrs", "klassifizier", "classify", "schließe", "close", "kamm", "comb", "kombinationen", "combinations", "enthält", "contains", "kreuz", "cross", "dekodiere", "decode", "tief-kartiere", "deepmap", "definiert", "defined", "sterb", "die", "fertig", "done", "duck-kartiere", "duckmap", "elemente", "elems", "sende", "emit", "kodiere", "encode", "ende", "end", "endet-mit", "ends-with", "eval-stirbt-ok", "eval-dies-ok", "eval-lebt-ok", "eval-lives-ok", "verlasse", "exit", "scheitere", "fail", "scheitert-wie", "fails-like", "erste", "first", "flach", "flat", "drehum", "flip", "boden", "floor", "fehlgeschlagen", "flunk", "erhalte", "get", "erhaltez", "getc", "kern", "gist", "filter", "grep", "hasch", "hash", "kopf", "head", "einzug", "indent", "indizes", "indices", "ist", "is", "ist-ungefähr", "is-approx", "ist-im-ganzen", "is-deeply", "ist-prim", "is-prime", "istein-ok", "isa-ok", "istnicht", "isnt", "artikel", "item", "verbinde", "join", "schlüssel", "key", "schlüssels", "keys", "sw", "kv", "letzte", "last", "letzte-anruf", "lastcall", "wie", "like", "linien", "lines", "verknüpfung", "link", "liste", "list", "lebt-ok", "lives-ok", "niedrigstwertige-bit", "lsb", "mache", "make", "kartiere", "map", "paar", "match", "bewege", "move", "höchstwertiges-bit", "msb", "neu", "new", "nächste", "next", "nicht-ok", "nok", "kein", "none", "nicht", "not", "notiere", "note", "ein", "one", "als-zahl", "ord", "als-zahlen", "ords", "paar", "pair", "paare", "pairs", "bestanden", "pass", "permutationen", "permutations", "pflücke", "pick", "plane", "plan", "stelle-voran", "prepend", "druck", "print", "druckf", "printf", "fortfahre", "proceed", "schiebe-oben", "push", "sag-es", "put", "zufällig", "rand", "nochmals", "redo", "reduziere", "reduce", "wiederholt", "repeated", "kehr-um", "reverse", "um-index", "rindex", "werfe", "roll", "drehe", "rotate", "runde-ab", "round", "jeder-mal", "roundrobin", "laufe", "run", "sag", "say", "sammlung", "set", "schiebe-unter", "shift", "überspringe", "skip", "überspringe-alle", "skip-rest", "schlaf", "sleep", "wecker", "sleep-timer", "schlafe-bis", "sleep-until", "schlürfe", "slurp", "verpfeife", "snitch", "also", "so", "sortier", "sort", "spleiße", "splice", "teilt", "split", "sdruckf", "sprintf", "spritz", "spurt", "quadratwurzel", "sqrt", "quetschen", "squish", "zufällig-so", "srand", "beginnt-mit", "starts-with", "ersetz", "subst", "gelinge", "succeed", "summiere", "sum", "symbolische-verknüpfung", "symlink", "schwanz", "tail", "nim", "take", "nmm-rw", "take-rw", "werft-wie", "throws-like", "zumachen", "todo", "übersetz", "trans", "trim-führend", "trim-leading", "trim-hinterher", "trim-trailing", "kürzen", "truncate", "einzigartig", "unique", "nicht-wie", "unlike", "hebe-auf", "unlink", "onderin", "unshift", "verwende-ok", "use-ok", "wie-zahlen", "val", "wert", "value", "werte", "values", "warne", "warn", "wörter", "words", "reißverschluss", "zip";
my $ast := self.ast();
my $name := $ast ?? $ast.simple-identifier() !! self.Str();
my $ast := self.ast;
my $name := $ast ?? $ast.simple-identifier !! self.Str;
if %mapping{$name} -> $original {
RakuAST::Name.from-identifier($original)
}
Expand All @@ -176,8 +176,8 @@ role L10N::DE {
}
method trait-is2ast {
my %mapping = "kopie", "copy", "standard", "default", "VERALTET", "DEPRECATED", "äquivalent", "equiv", "implementierungsdetail", "implementation-detail", "lockerer", "looser", "rein", "pure", "roh", "raw", "lesen-schreiben", "rw", "enger", "tighter";
my $ast := self.ast();
my $name := $ast ?? $ast.simple-identifier() !! self.Str();
my $ast := self.ast;
my $name := $ast ?? $ast.simple-identifier !! self.Str;
if %mapping{$name} -> $original {
RakuAST::Name.from-identifier($original)
}
Expand All @@ -203,6 +203,9 @@ role L10N::DE {
method pragma2str (str $key) {
$key
}
method system2str (str $key) {
$key
}
}

# The EXPORT sub that actually does the slanging
Expand Down
9 changes: 6 additions & 3 deletions lib/L10N/EN.rakumod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file contains the English slang of the Raku Programming Language

#- start of generated part of localization ------------------------------------
#- Generated on 2023-10-31T19:16:06+01:00 by tools/build/makeL10N.raku
#- Generated on 2023-11-16T17:03:40+01:00 by tools/build/makeL10N.raku
#- PLEASE DON'T CHANGE ANYTHING BELOW THIS LINE

role L10N::EN {
Expand Down Expand Up @@ -164,10 +164,10 @@ role L10N::EN {
token use-require { require}
token use-use { use}
method core2ast {
self.ast() // RakuAST::Name.from-identifier(self.Str())
self.ast // RakuAST::Name.from-identifier(self.Str)
}
method trait-is2ast {
self.ast() // RakuAST::Name.from-identifier(self.Str())
self.ast // RakuAST::Name.from-identifier(self.Str)
}
method adverb-pc2str (str $key) {
$key
Expand All @@ -184,6 +184,9 @@ role L10N::EN {
method pragma2str (str $key) {
$key
}
method system2str (str $key) {
$key
}
}

# The EXPORT sub that actually does the slanging
Expand Down
11 changes: 7 additions & 4 deletions lib/L10N/FR.rakumod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file contains the French Slang of the Raku Programming Language

#- start of generated part of localization ------------------------------------
#- Generated on 2023-10-31T19:16:06+01:00 by tools/build/makeL10N.raku
#- Generated on 2023-11-16T17:03:40+01:00 by tools/build/makeL10N.raku
#- PLEASE DON'T CHANGE ANYTHING BELOW THIS LINE

role L10N::FR {
Expand Down Expand Up @@ -167,8 +167,8 @@ role L10N::FR {
token use-use { utilise}
method core2ast {
my %mapping = "tout", "all", "nimporte", "any", "ajoute", "append", "asa", "ast", "attends", "await", "sac", "bag", "escampe", "bail-out", "bénit", "bless", "appelmeme", "callsame", "appelavec", "callwith", "peut-passable", "can-ok", "plafond", "ceiling", "cars", "chars", "chrep", "chdir", "classifie", "classify", "ferm", "close", "combinaisons", "combinations", "défini", "defined", "meurs", "die", "meurt-passable", "dies-ok", "rep", "dir", "fait-passable", "does-ok", "fait", "done", "élems", "elems", "émit", "emit", "fin", "end", "sortie", "exit", "échoue", "fail", "premier", "first", "applati", "flat", "retourne", "flip", "plancher", "floor", "rate", "flunk", "barrière-totale", "full-barrier", "dict", "hash", "tête", "head", "est", "is", "est-environ", "is-approx", "est-profondément", "is-deeply", "estun-passable", "isa-ok", "nestpas", "isnt", "article", "item", "joins", "join", "clef", "key", "clefs", "keys", "cv", "kv", "dernier", "last", "dernierappel", "lastcall", "mi", "lc", "comme", "like", "lignes", "lines", "lien", "link", "liste", "list", "vit-passable", "lives-ok", "bms", "lsb", "fais", "make", "mkrep", "mkdir", "bouge", "move", "bps", "msb", "nouveau", "new", "suivant", "next", "suivantappelé", "nextcallee", "suivantmeme", "nextsame", "suivantavec", "nextwith", "nonpassable", "nok", "aucun", "none", "pas", "not", "passable", "ok", "un", "one", "ouvre", "open", "paire", "pair", "paires", "pairs", "passe", "pass", "choisis", "pick", "éclos", "pop", "préfixe", "prepend", "imprime", "print", "imprimef", "printf", "poursuis", "proceed", "demande", "prompt", "pousse", "push", "mets", "put", "refais", "redo", "réduis", "reduce", "répété", "repeated", "renvoie", "return", "renvoie-le", "return-rw", "renverse", "reverse", "sprep", "rmdir", "tire", "roll", "tourne", "rotate", "rond", "round", "tourniquet", "roundrobin", "lance", "run", "memecasse", "samecase", "samediac", "samemark", "memeavec", "samewith", "dis", "say", "ens", "set", "coque", "shell", "décale", "shift", "signe", "sign", "signale", "signal", "omets", "skip", "omets-reste", "skip-rest", "dors", "sleep", "dors-minuteur", "sleep-timer", "dors-jusquà", "sleep-until", "enfile", "slip", "engloutis", "slurp", "découpe", "snip", "dénonce", "snitch", "donc", "so", "trie", "sort", "noue", "splice", "coupe", "split", "cimprmf", "sprintf", "gicle", "spurt", "racc", "sqrt", "soustampon", "subbuf", "soustampon-le", "subbuf-rw", "soustest", "subtest", "réussis", "succeed", "somme", "sum", "liensymb", "symlink", "queue", "tail", "prends", "take", "prends-le", "take-rw", "jete-comme", "throws-like", "àfaire", "todo", "rogne", "trim", "rogne-gauche", "trim-leading", "rogne-droite", "trim-trailing", "tronque", "truncate", "préviens", "warn", "motcasse", "wordcase", "mots", "words";
my $ast := self.ast();
my $name := $ast ?? $ast.simple-identifier() !! self.Str();
my $ast := self.ast;
my $name := $ast ?? $ast.simple-identifier !! self.Str;
if %mapping{$name} -> $original {
RakuAST::Name.from-identifier($original)
}
Expand All @@ -177,7 +177,7 @@ role L10N::FR {
}
}
method trait-is2ast {
self.ast() // RakuAST::Name.from-identifier(self.Str())
self.ast // RakuAST::Name.from-identifier(self.Str)
}
method adverb-pc2str (str $key) {
$key
Expand All @@ -194,6 +194,9 @@ role L10N::FR {
method pragma2str (str $key) {
$key
}
method system2str (str $key) {
$key
}
}

# The EXPORT sub that actually does the slanging
Expand Down
11 changes: 7 additions & 4 deletions lib/L10N/IT.rakumod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file contains the Italian Slang of the Raku Programming Language

#- start of generated part of localization ------------------------------------
#- Generated on 2023-10-31T19:16:06+01:00 by tools/build/makeL10N.raku
#- Generated on 2023-11-16T17:03:40+01:00 by tools/build/makeL10N.raku
#- PLEASE DON'T CHANGE ANYTHING BELOW THIS LINE

role L10N::IT {
Expand Down Expand Up @@ -165,8 +165,8 @@ role L10N::IT {
token use-use { usare}
method core2ast {
my %mapping = "tutti", "all", "ogni", "any", "aggiungi", "append", "aspetta", "await", "borsa", "bag", "categorizzare", "categorize", "soffitto", "ceiling", "classificare", "classify", "chide", "close", "pettine", "comb", "combinazioni", "combinations", "mappa-profonda", "deepmap", "definito", "defined", "muori", "die", "fatto", "done", "mappa-anatra", "duckmap", "emettere", "emit", "fine", "end", "uscire", "exit", "fallire", "fail", "primo", "first", "piatto", "flat", "pavimento", "floor", "barriera-completa", "full-barrier", "prendi", "get", "essenza", "gist", "testa", "head", "indenta", "indent", "indice", "index", "indici", "indices", "articolo", "item", "unirsi", "join", "chiave", "key", "chiavi", "keys", "cv", "kv", "ultimo", "last", "ultima-chiamata", "lastcall", "linee", "lines", "elenco", "list", "fare", "make", "mappa", "map", "muove", "move", "prossimo", "next", "prossimo-chiamato", "nextcallee", "prossimo-esteso", "nextsame", "prossimo-con", "nextwith", "nessuno", "none", "non", "not", "nota", "note", "uno", "one", "aperto", "open", "paio", "pair", "pai", "pairs", "permutazioni", "permutations", "prendi", "pick", "stampa", "print", "f-stampa", "printf", "procedi", "proceed", "richiesta", "prompt", "spinge", "push", "metti", "put", "rifai", "redo", "riduci", "reduce", "ripetuto", "repeated", "restituisci", "return", "restituisci-rw", "return-rw", "stesso-caso", "samecase", "stessa-marca", "samemark", "stessa-con", "samewith", "dillo", "say", "sposta", "shift", "firma", "sign", "segno", "signal", "salta", "skip", "dormi", "sleep", "dormi-fino-a", "sleep-until", "scivola", "slip", "bevi", "slurp", "taglia", "snip", "fail-la-spia", "snitch", "così", "so", "ordina", "sort", "unisci", "splice", "divitevi", "split", "spruzza", "spurt", "schiaccia", "squish", "riuscirci", "succeed", "somma", "sum", "coda", "tail", "prendi", "take", "prendi-rw", "take-rw", "taglia", "trim", "taglia-in-testa", "trim-leading", "taglia-in-coda", "trim-trailing", "troncare", "truncate", "valore", "value", "valori", "values", "avviso", "warn", "caso-della-parola", "wordcase", "parole", "words";
my $ast := self.ast();
my $name := $ast ?? $ast.simple-identifier() !! self.Str();
my $ast := self.ast;
my $name := $ast ?? $ast.simple-identifier !! self.Str;
if %mapping{$name} -> $original {
RakuAST::Name.from-identifier($original)
}
Expand All @@ -175,7 +175,7 @@ role L10N::IT {
}
}
method trait-is2ast {
self.ast() // RakuAST::Name.from-identifier(self.Str())
self.ast // RakuAST::Name.from-identifier(self.Str)
}
method adverb-pc2str (str $key) {
$key
Expand All @@ -192,6 +192,9 @@ role L10N::IT {
method pragma2str (str $key) {
$key
}
method system2str (str $key) {
$key
}
}

# The EXPORT sub that actually does the slanging
Expand Down
14 changes: 9 additions & 5 deletions lib/L10N/NL.rakumod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file contains the Dutch Slang of the Raku Programming Language

#- start of generated part of localization ------------------------------------
#- Generated on 2023-10-31T19:16:06+01:00 by tools/build/makeL10N.raku
#- Generated on 2023-11-16T17:03:40+01:00 by tools/build/makeL10N.raku
#- PLEASE DON'T CHANGE ANYTHING BELOW THIS LINE

role L10N::NL {
Expand Down Expand Up @@ -165,8 +165,8 @@ role L10N::NL {
token use-use { gebruik}
method core2ast {
my %mapping = "alle", "all", "antiparen", "antipairs", "elke", "any", "voeg-achteraan", "append", "wacht-op", "await", "tas", "bag", "geef-op", "bail-out", "zegen", "bless", "kan-ok", "can-ok", "categoriseer", "categorize", "plafond", "ceiling", "letters", "chars", "kap-regeleinde", "chomp", "kap", "chop", "als-letter", "chr", "als-letters", "chrs", "classificeer", "classify", "sluit", "close", "kam", "comb", "combinaties", "combinations", "bevat", "contains", "kruis", "cross", "decodeer", "decode", "diep-arrangeer", "deepmap", "gedefinieerd", "defined", "sterf", "die", "klaar", "done", "duik-arrangeer", "duckmap", "elementen", "elems", "zend", "emit", "codeer", "encode", "einde", "end", "eindigt-met", "ends-with", "eval-sterft-ok", "eval-dies-ok", "eval-leeft-ok", "eval-lives-ok", "verlaat", "exit", "faal", "fail", "faalt-als", "fails-like", "vouw-kast", "fc", "eerste", "first", "plat", "flat", "draaiom", "flip", "vloer", "floor", "gezakt", "flunk", "pak", "get", "pakc", "getc", "kern", "gist", "filter", "grep", "moes", "hash", "hoofd", "head", "indenteer", "indent", "is-ongeveer", "is-approx", "is-helemaal", "is-deeply", "is-priem", "is-prime", "iseen-ok", "isa-ok", "isniet", "isnt", "plak", "join", "sleutel", "key", "sleutels", "keys", "sw", "kv", "laatste", "last", "laatste-aanroep", "lastcall", "onder-kast", "lc", "lijkt-op", "like", "regels", "lines", "koppeling", "link", "lijst", "list", "leeft-ok", "lives-ok", "minst-belangrijke-bit", "lsb", "maak", "make", "arrangeer", "map", "verplaats", "move", "belangrijkste-bit", "msb", "nieuw", "new", "volgende", "next", "niet-ok", "nok", "geen", "none", "niet", "not", "merk-op", "note", "een", "one", "als-getal", "ord", "als-getallen", "ords", "paar", "pair", "paren", "pairs", "ontleed-nummer", "parse-base", "geslaagd", "pass", "permutaties", "permutations", "kies", "pick", "verwacht", "plan", "floep", "pop", "voeg-voor", "prepend", "druk", "print", "drukf", "printf", "ga-door", "proceed", "vraag", "prompt", "stapel-op", "push", "zeg-het", "put", "willekeurig", "rand", "nog-eens", "redo", "reduceer", "reduce", "herhaaldelijk", "repeated", "retour", "return", "retour-rw", "return-rw", "keer-om", "reverse", "om-index", "rindex", "gooi", "roll", "wortels", "roots", "roteer", "rotate", "rond-af", "round", "ieder-een", "roundrobin", "voer-uit", "run", "zelfde-kast", "samecase", "zelfde-accent", "samemark", "zelfde-met", "samewith", "zeg", "say", "verzameling", "set", "onderuit", "shift", "teken", "sign", "signaal", "signal", "sla-over", "skip", "sla-rest-over", "skip-rest", "slaap", "sleep", "wekker", "sleep-timer", "slaap-tot", "sleep-until", "glip", "slip", "knip", "snip", "spiek", "snitch", "dus", "so", "sorteer", "sort", "splits-lijst", "splice", "splits-letters", "split", "sdrukf", "sprintf", "spuit", "spurt", "wortel", "sqrt", "plet", "squish", "zo-willekeurig", "srand", "begint-met", "starts-with", "substitueer", "subst", "substr-gelijk", "substr-eq", "slaag", "succeed", "sommeer", "sum", "symbolische-koppeling", "symlink", "staart", "tail", "neem", "take", "neem-rw", "take-rw", "titel-kast", "tc", "titel-onder-kast", "tclc", "knalt-als", "throws-like", "tedoen", "todo", "vertaal", "trans", "trim-vooraan", "trim-leading", "trim-achteraan", "trim-trailing", "kap-af", "truncate", "boven-kast", "uc", "uniek", "unique", "lijkt-niet-als", "unlike", "ontkoppel", "unlink", "onderin", "unshift", "gebruik-ok", "use-ok", "als-nummers", "val", "waarde", "value", "waardes", "values", "waarschuw", "warn", "woord-kast", "wordcase", "woorden", "words", "rits", "zip";
my $ast := self.ast();
my $name := $ast ?? $ast.simple-identifier() !! self.Str();
my $ast := self.ast;
my $name := $ast ?? $ast.simple-identifier !! self.Str;
if %mapping{$name} -> $original {
RakuAST::Name.from-identifier($original)
}
Expand All @@ -176,8 +176,8 @@ role L10N::NL {
}
method trait-is2ast {
my %mapping = "kopie", "copy", "verstek", "default", "VEROUDERD", "DEPRECATED", "equivalent", "equiv", "implementatie-detail", "implementation-detail", "losser", "looser", "puur", "pure", "rauw", "raw", "lezen-schrijven", "rw", "test-assertie", "test-assertion", "strakker", "tighter";
my $ast := self.ast();
my $name := $ast ?? $ast.simple-identifier() !! self.Str();
my $ast := self.ast;
my $name := $ast ?? $ast.simple-identifier !! self.Str;
if %mapping{$name} -> $original {
RakuAST::Name.from-identifier($original)
}
Expand Down Expand Up @@ -205,6 +205,10 @@ role L10N::NL {
my %mapping = "dynamische-ruimte", "dynamic-scope", "fataal", "fatal", "interne-functies", "internals", "aanroeper", "invocant", "bibliotheek", "lib", "compilatie-vooraf", "precompilation", "zacht", "soft", "strikt", "strict", "verloop", "trace", "variablen", "variables", "zorgen", "worries";
%mapping{$key} // $key
}
method system2str (str $key) {
my %mapping = "ACCEPTEERT", "ACCEPTS", "BOUW", "BUILD", "AANROEP", "CALL-ME", "VERANDER-IN", "COERCE", "WIJKUIT", "FALLBACK", "HOOFD", "MAIN", "VERFIJN", "TWEAK", "VERBETER-RAT", "UPGRADE-RAT";
%mapping{$key} // $key
}
}

# The EXPORT sub that actually does the slanging
Expand Down
Loading

0 comments on commit 50bd91f

Please sign in to comment.