Skip to content

Enable test running for Finnish ASCIIMath and write more tests - #1054

Merged
NSoiffer merged 17 commits into
daisy:asciimath-fifrom
samimaattaCelia:asciimath-fi
Nov 19, 2026
Merged

NSoiffer merged 17 commits into
daisy:asciimath-fifrom
samimaattaCelia:asciimath-fi

Conversation

@samimaattaCelia

Copy link
Copy Markdown
Contributor

Tests were not running, now fixed
There was a problem that when the ASCIIMath-fi tests were run, they were tested against the default ASCIIMath rules. It was most likely caused by Rust dropping the hyphen ("-fi") and targeting ASCIIMath folder for rules. This is now fixed. The folders and tests have been named ASCIIMath_fi.

Cleanup created for ASCIIMath_fi
I also noticed that the same cleanup for ASCIIMath ASCIIMath_cleanup(pref_manager, braille_string) was being run for ASCIIMath_fi. I added a function so that cleanup can be run separately for ASCIIMath_fi.

It is just a copy and paste of the ASCIIMath, and I'm not sure if it is totally needed. I wasn't sure in which order the cleanup is performed. Is it cleaning up MathML or the generated ASCIIMath?

Now it exists if it needs to be configured separately.

Tests
I have written more tests for ASCIIMath_fi and also added the 6-dot tests I had written for fi-braille. The coverage is better now thanks to this.

Unicode files
I added couple of characters to the unicode files.

Next steps
If I have read the code correctly, there are no Finnish ASCIIMath rules. They are just the same rules that apply to ASCIIMath. I think the next thing would be to get some new rules.

Relates to #500

The cleanup function is a duplicate. If they need to change later, then make a duplicate and change it or just add a test case
@NSoiffer

Copy link
Copy Markdown
Collaborator

I think we may want to make the braille system work like the language system where you can regional variants. That would like remove a lot of duplication for things like this. That's maybe for next year, but I'll add an issue for it.

@NSoiffer
NSoiffer merged commit 1837095 into daisy:asciimath-fi Nov 19, 2026
3 of 5 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to Done in MathCAT Project Board Nov 19, 2026
@NSoiffer

NSoiffer commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

@samimaattaCelia: most of the tests fail.

I have merged in main so that this branch is up-to-date, but I did not try to fix the tests. It looks like most of the failures are related to white space issues.

@samimaattaCelia

Copy link
Copy Markdown
Contributor Author

Do the tests fail because the rules haven't been made for ASCIIMath_fi or is there a problem with hardcoding whitespaces to the unicode files?

@NSoiffer

NSoiffer commented Nov 20, 2026 via email

Copy link
Copy Markdown
Collaborator

@samimaattaCelia

Copy link
Copy Markdown
Contributor Author

My understanding was that you hadn't done ASCIIMath_fi specific rules before, but I stand corrected since there are differences!

Is it now expected for translators to make the rules? I think I can check for some of the easier-to-understand rules (such as the mixed fraction one and spacing), but if a totally new rule has to be written, I would need your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants