opendevreview | Merged openstack/openstack-manuals master: Add a missing doctree xena, yoga release in install guide https://review.opendev.org/c/openstack/openstack-manuals/+/837204 | 06:25 |
---|---|---|
pmatulis | i'm trying to use a sphinx extension that relates to spelling (spellchecker). one of its settings is what dictionary to use. i've chosen 'en_GB'. it all works fine locally but when Zuul looks it over it finds many spelling mistakes related to en_US (e.g. it sees "behaviour" as incorrectly spelled). how can i prevent my language from being overwritten? | 15:02 |
pmatulis | fungi, ? ^ | 15:02 |
fungi | pmatulis: how are you choosing the dictionary, and where is the sphinx configuration? | 15:11 |
pmatulis | in conf.py, the extension has a setting | 15:14 |
pmatulis | spelling_lang="en_GB" | 15:14 |
fungi | does the output in the build indicate what configuration it used or which configuration options it found? a link to a build result page for it would help | 15:17 |
fungi | (to be clear, i know very little about documentation build tooling, just doing my best to fumble through and figure out what's going on) | 15:19 |
fungi | if i knew the repository or the implementation change or had the problematic build output, i can try to spot something which looks odd or attempt to reproduce the behavior | 15:21 |
fungi | a complete guess in the dark, maybe you already have an en_GB dictionary installed locally but the job doesn't know to install whatever package provides that, and so the sphinx extention is falling back on an available/default dictionary instead? | 15:23 |
pmatulis | https://review.opendev.org/c/openstack/charm-guide/+/836109/15/doc/source/conf.py | 15:23 |
pmatulis | that's the main idea. i think you can get everything you want from what it touches | 15:24 |
fungi | thanks | 15:25 |
pmatulis | locally, when i flip to "en_US" i get errors | 15:26 |
pmatulis | (misspellings i mean, as expected) | 15:27 |
fungi | pmatulis: what files contain the dictionaries it uses? did you happen to read the documentation for whatever library the extension uses? i think https://abiword.github.io/enchant/ suggests it's relying on ispell, so maybe the job node is missing the ibritish package? | 15:33 |
fungi | you might try adding that to bindep.txt | 15:34 |
fungi | looking at the ispell package from debian/sid (because that's what i've got on my workstation), it appears it Recommends: iamerican | ispell-dictionary so ibritish is unlikely to be pulled in by default even with apt installing recommends | 15:37 |
ianychoi[m] | pmatulis: I haven’t used that option but i agree with fungi: bindep.txt for local packages or requirements.txt depending on intersphinx | 15:38 |
fungi | another possibility is that we only initialize en_US locale on our test images, and enchant or the extension depends on the locale definition | 15:38 |
ianychoi[m] | Or exploring with dictionary file options on https://sphinxcontrib-spelling.readthedocs.io/en/latest/customize.html would be great | 15:39 |
fungi | so the job might need to force addition of more locales (we can try to investigate whether that's the case or not) | 15:39 |
ianychoi[m] | E.g., https://github.com/divio/user-support-guides/blob/d6b6333031eb01b3f7c933c87b6175d0bee5099b/conf.py#L109 (just searching on the web) | 15:40 |
pmatulis | i don't have 'ibritish' installed locally. i have these: 'aspell' and 'aspell-en' and 'dictionaries-common' | 16:02 |
pmatulis | strange. when i added 'ibritish' to bindep.txt the remote build output shows 'enchant.errors.DictNotFoundError: Dictionary for language 'en_GB' could not be found' | 16:21 |
fungi | that implies pyenchant may be deciding not to call enchant if ispell isn't there | 16:24 |
fungi | do you happen to have wbritish installed? maybe it's falling back on that locally | 16:28 |
pmatulis | no package installed locally that contains string 'british' | 16:29 |
fungi | that suggests it may be down to available locales | 16:29 |
pmatulis | i have aspell stuff installed | 16:30 |
pmatulis | fungi, so i added aspell stuff to bindep and i get a success remotely: https://review.opendev.org/c/openstack/charm-guide/+/836109 | 16:58 |
fungi | sounds like that's a solution then | 16:58 |
pmatulis | thanks for your support | 16:59 |
fungi | of course! glad you found something that works | 17:20 |
opendevreview | sebastian marcet proposed openstack/openstack-manuals master: Updated nav links/texts https://review.opendev.org/c/openstack/openstack-manuals/+/837391 | 17:46 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!