Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-default locale variants not recognised by LO-voikko #5

Open
snomos opened this issue Apr 11, 2016 · 2 comments
Open

Non-default locale variants not recognised by LO-voikko #5

snomos opened this issue Apr 11, 2016 · 2 comments

Comments

@snomos
Copy link
Contributor

snomos commented Apr 11, 2016

I have the following zhfst files installed and recognised by voikkospell:

$ voikkospell -l
crk-x-standard: UofAlberta/GT/Divvun/UiT fst-based speller for Plains Cree.
crk-Cans-x-standard: UofAlberta/GT/Divvun/UiT speller for Syllabic Plains Cree.
hdn-x-standard: Giellatekno/Divvun/UiT fst-based speller for Northern Haida
$ voikkospell -L
spell:crk
spell:crk-Cans
spell:hdn

These are aksi recognised by LO-Voikko in Preferences > Language prefs > Voikko.

In the file pythonpath/VoikkoHandlePool.py the following entries are found for crk:

    Bcp47ToLoMapping("crk", "crk",  "CA"), \
    Bcp47ToLoMapping("crk-US",  "crk",  "US"), \

I would have expected the following locale tag combinations to be accepted and triggering the spelling checker:

  • crk
  • crk-Cans
  • crk-CA
  • crk-US
  • crk-Cans-CA
  • crk-Cans-US

Of these, only the following tags are recognised:

  • crk-CA
  • crk-Cans

That is, all combinations ending in US are unrecognised, and the -Cans- ones are only recognised without the country part. This seems a bit inconsistent, and will make it hard for end users to know what to type in order to trigger the spelling checker.

I don't know whether any of this is related to the fact that the crk locale code has been added erroneously to LO - as crk-CN instead of -CA (China vs Canada), but given that crk-CA is accepted, I would assume not.

@snomos
Copy link
Contributor Author

snomos commented Jun 4, 2019

According to https://bugs.documentfoundation.org/show_bug.cgi?id=73973 the correct BCP-47 codes have been added to LO since version 5.2.0, and the corresponding language entries have been available as «Cree, Plains, Latin» and «Cree, Plains, Syllabics». But when setting the text language to any of those, the speller is not triggered, even though both variants are found in the dictionary search path.

I have tried to add the following entries to VoikkoHandlePool.py, but it did not help:

	Bcp47ToLoMapping("crk-Cans",	"crk-Cans",	"CA"), \
	Bcp47ToLoMapping("crk-Cans-US",	"crk-Cans",	"US"), \
	Bcp47ToLoMapping("crk-Latn",	"crk-Latn",	"CA"), \
	Bcp47ToLoMapping("crk-Latn-US",	"crk-Latn",	"US"), \

@snomos
Copy link
Contributor Author

snomos commented Jun 4, 2019

Not a proper correspondence between language setting and actual speller language used:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant