Monday, 2022-04-11

opendevreviewMerged openstack/openstack-manuals master: Add a missing doctree xena, yoga release in install guide  https://review.opendev.org/c/openstack/openstack-manuals/+/83720406:25
pmatulisi'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
pmatulisfungi, ? ^15:02
fungipmatulis: how are you choosing the dictionary, and where is the sphinx configuration?15:11
pmatulisin conf.py, the extension has a setting15:14
pmatulisspelling_lang="en_GB"15:14
fungidoes 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 help15: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
fungiif 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 behavior15:21
fungia 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
pmatulishttps://review.opendev.org/c/openstack/charm-guide/+/836109/15/doc/source/conf.py15:23
pmatulisthat's the main idea. i think you can get everything you want from what it touches15:24
fungithanks15:25
pmatulislocally, when i flip to "en_US" i get errors15:26
pmatulis(misspellings i mean, as expected)15:27
fungipmatulis: 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
fungiyou might try adding that to bindep.txt15:34
fungilooking 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 recommends15: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 intersphinx15:38
fungianother possibility is that we only initialize en_US locale on our test images, and enchant or the extension depends on the locale definition15:38
ianychoi[m]Or exploring with dictionary file options on https://sphinxcontrib-spelling.readthedocs.io/en/latest/customize.html would be great15:39
fungiso 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
pmatulisi don't have 'ibritish' installed locally. i have these: 'aspell' and 'aspell-en' and 'dictionaries-common' 16:02
pmatulisstrange. 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
fungithat implies pyenchant may be deciding not to call enchant if ispell isn't there16:24
fungido you happen to have wbritish installed? maybe it's falling back on that locally16:28
pmatulisno package installed locally that contains string 'british'16:29
fungithat suggests it may be down to available locales16:29
pmatulisi have aspell stuff installed16:30
pmatulisfungi, so i added aspell stuff to bindep and i get a success remotely: https://review.opendev.org/c/openstack/charm-guide/+/83610916:58
fungisounds like that's a solution then16:58
pmatulisthanks for your support16:59
fungiof course! glad you found something that works17:20
opendevreviewsebastian marcet proposed openstack/openstack-manuals master: Updated nav links/texts  https://review.opendev.org/c/openstack/openstack-manuals/+/83739117:46

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!