Skip to content

Convert MathPlayer Unicode files to MathCAT format #71

Description

@NSoiffer

MathPlayer has support for 13 languages besides English (quality varies...). MathPlayer's rule files are open and can be used as a start for a MathCAT translation. The easiest to programmatically convert are the unicode.tdl files. These are also probably the most painful thing to translate for people helping out with translation.

The "tdl" format is special to Design Science, but thankfully the unicode.tdl files have an entry on a single line and so are relatively to pick apart for conversion. Here's an example from the German translation:

char ? (unicode == 0x2223) => string{text="teilt";};
char ? (unicode == 0x2224) => string{text="teilt nicht";};

These want to turn into:

 - "∣": [T: "teilt"]                               # 0x2223
 - "∤": [T: "teilt nicht"]                         # 0x2224

This seems like a relatively easy python program to write.

The attached MathPlayer rules directory (rules.zip) has subdirectories for each language and in each is a unicode.tdl file. The result should go into a newly created directory for the language in Rules/Language/xx/unicode.yaml where xx is the language code for the translation.

Bonus points 👍

  1. The translators didn't translate everything. For those Unicode codepoints not translated, interface with google translate and insert the translation. You can compare the en version of unicode.tdl to see if something has been translated. There might be a few that are the same because the same words are used in the translation. That could be a complication...
  2. Read in MathCAT's English unicode.yaml and unicode-full.yaml files and if any Unicode char is missing in the translation, add them to the output of the translation. If '1' is not done, use the key t:; if the translation is done, use the key T;.
  3. Split the file into two files: the most common chars go in unicode.yaml and the others in unicode-full.yaml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions