Could the translation manual look like a mapping from skylighting/pandoc supported languages (from pandoc) to DokuWiki supported languages (from documentation). Sample:
[haskell] -> [haskell]
[cs] -> [csharp]
[] -> [6502acme]
[mandoc] -> []
My idea is that such list can be hopefully translated into Haskell structures. It should handle following cases:
- One-to-one mappings (eg. haskell).
- Mappings with alias used (csharp).
- Non existing support by skylighting, but supported by DokuWiki.
- Supported by skylighting, but not supported by DokuWiki.
A translation function could handle the data in following way (input is language name like "cs", "java" etc.):
- Find language in array from left side (skylighting).
- If found, use first language name from the right side. Solves one-to-one mappings (name supported by both skylighting and dokuwiki) and aliases (my case with "cs" and "csharp").
- If not found, try to find language name in some array from the right side.
- If found, use the language name. Solves DokuWiki specific languages (supported by DokuWiki, not supported by skylighting).
- Otherwise treat is like now - not supported. Solves not supported languages.
Note 1: another sample of the problem (except the "csharp") are languages like MySQL ("sqlmysql" for skylighting and "mysql" for DokuWiki).
Note 2: apart from the problem, I am not sure if DokuWiki writer does not lack some languages in the DokuWiki.hs writer. List of names in code contains 79 languages, but the documentation of the DokuWiki has 201 languages (and their derivatives; counted only parsed lines).
Thanks in advance!
Dne čtvrtek 13. července 2017 9:09:01 UTC+2 John MacFarlane napsal(a):
What we'd need in the DokuWiki writer is a translation
manual from skylighting/pandoc language names to DokuWiki
names. If you want to provide one, we can add this.