Hi there
I’ve enabled Free Text Response Xblock following the instructions in openedx documentation.
Xblock works fine, but does not show translation propertly (see images below)
Thanks for any help
Regards
Hi there
I’ve enabled Free Text Response Xblock following the instructions in openedx documentation.
Xblock works fine, but does not show translation propertly (see images below)
Thanks for any help
Regards
Sorry Yago,
As I know XBlocks are out of support by edx corp.
each XBlock has its own developer who should be responsible about problems and new feature requests.
you can ask him or manually try to translate that XBlock.
I also would like to point out that this particular XBlock hasn’t been updated since 2019 and isn’t compatible with Juniper because it relies on Django 1.x instead of Django 2.x. Beware if you try installing it in Juniper.
@Yago @mahyard @sambapete, stanford no longer uses Open edX and edX are now maintaining the fork of the Free Text Response XBlock (https://github.com/edx/xblock-free-text-response/).
I’ve had a pull request to support i18n but wasn’t merged (https://github.com/Stanford-Online/xblock-free-text-response/pull/42).
I will try again to make the same changes if needed on the @edx
fork, I will post here.
@Yago @mahyard @sambapete I’ve completed the fixes for the XBlock in the following PR:
Could you please review and more importantly test that it works? It’s been pending prioritization for a while.
Hi @omar,
Thank you for the job you’ve done and for informing people here.
Currently, our instance is on ironwood master release. Do you think that I can help you with testing the code? if you think so tell me exactly what am I supposed to do?
I glanced at your PR and found that you removed the lines starting with:
Plural-Forms: nplurals
before saving messages as text.po? considering that Django has fixed the bug with the default Plural-Forms
value from version 2.2, is that necessary?
Thanks
Actually, I’m not sure what you mean writing those lines. but I had a test by running the following commands and didn’t face any issues.
cd freetextresponse/translations/ar/LC_MESSAGES/
rm -f text.mo
msgfmt text.po -o text.mo
python2.7
>>> from gettext import GNUTranslations
>>> with open('text.mo', 'rb') as mo_file_fp:
... GNUTranslations(mo_file_fp)
...
<gettext.GNUTranslations instance at 0x7fba964c49b0>
>>> _
text.mo loads properly even though it contains a Plural-Forms
line.
Thanks for testing the effort.
The ar
language had no issues with Plural Forms. It was just the en
that’s broken which I’ve fixed.
Yes. Ironwood would be good. Please try the following:
$ pip install https://github.com/appsembler/xblock-free-text-response/archive/omar/i18n.tar.gz
and make an xblock instance and watch how it behaves in English, Arabic and another language if you’d like.
No Problem @omar,
Can I ask against which version of Open edX are you testing and getting the error?
Django had a bug until v2 which has been fixed during this commit and Open edX is on Django version 2.2 since juniper release. However it would be nice to have a code with backward compatibility, so you are good to go.
I will test the xblock on ironwood and let you know about the results,
just give me a couple of days.
thanks
@mahyard Could you please your comment into the GitHub pull request i18n pipeline fixes; added French Canadian and other languages by OmarIthawi · Pull Request #9 · edx/xblock-free-text-response · GitHub ?
This helps me to provide better contextualized reply.
I think I’ve fixed the i18n issues with the Free Text Response XBlock: i18n pipeline fixes; added French Canadian and other languages by OmarIthawi · Pull Request #9 · edx/xblock-free-text-response · GitHub
Could anyone please test it?
$ pip install https://github.com/appsembler/xblock-free-text-response/archive/omar/i18n.tar.gz
Hi @omar,
I tried as you asked but language files seem not to be included in the archive.
then I retried by cloning the repository and:
pip uninstall xblock-free-text-response
git checkout omar/i18n
pip install .
still the same. I mean there is no translations directory under ~edxapp/venvs/edxapp/lib/python2.7/site-packages/freetextresponse/
.
I didn’t go further.
Regards