diff pygments_lexer_pseudocode2/pseudocode.py @ 41:4ccf9a8d0bf2

For the german and french PseudocodeLexer: Use en translations as fallback. Also test a french pseudocode keyword.
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 24 Apr 2026 18:02:08 +0200
parents df08226a6984
children 5bfa9113d3c4
line wrap: on
line diff
--- a/pygments_lexer_pseudocode2/pseudocode.py	Fri Apr 24 10:48:00 2026 +0200
+++ b/pygments_lexer_pseudocode2/pseudocode.py	Fri Apr 24 18:02:08 2026 +0200
@@ -122,7 +122,8 @@
     filenames = ["*.algo-de", "*.pseudocode-de"]
 
     LANG = "de"
-    TRANSLATIONS = {
+    TRANSLATIONS = PseudocodeLexer.TRANSLATIONS.copy()
+    TRANSLATIONS.update({
         "PROG": "PROGRAMM",
         "PROGRAM": "PROGRAMM",
         "ALGO": "ALGORITHMUS",
@@ -133,7 +134,7 @@
         "FUNCTION": "FUNKTION",
         "FN": "FUNKTION",
         "CLASS": "KLASSE",
-    }
+    })
 
 
 class PseudocodeLexer_FR(PseudocodeLexer):
@@ -143,7 +144,8 @@
     filenames = ["*.algo-fr", "*.pseudocode-fr"]
 
     LANG = "de"
-    TRANSLATIONS = {
+    TRANSLATIONS = PseudocodeLexer.TRANSLATIONS.copy()
+    TRANSLATIONS.update({
         "PROG": "PROGRAMME",
         "PROGRAM": "PROGRAMME",
         "ALGO": "ALGORITHME",
@@ -154,4 +156,4 @@
         "FUNCTION": "FOUNCTION",
         "FN": "FONCTION",
         "CLASS": "CLASSE",
-    }
+    })