This resolves an issue where a checklist's long_description being empty caused gettext to dump PO file headers. I had originally made this change to the Stanford-Online/edx-platform repository a few weeks ago [0] to address a failing test on our fork. I didn't take the time to diagnose the root issue; I just fixed it for the single case. After stumbling across the issue elsewhere, @kluo <kevkluo@gmail.com> followed through and tracked down the cause of the behavior. It turns out that `gettext`, by default, translates the empty string into PO file headers; this is apparently a feature, not a bug [1]. This behavior seems counterintuitive; for our use, it seems that translating an empty string should simply return an empty string. We already program defensively around this in platform code [2], but it'd be convenient to resolve this with a centralized solution, instead of a patchwork of fixes. [0] 4b88f54a [1] http://stackoverflow.com/questions/18459387/translation-of-empty-string-shows-po-header [2] https://github.com/edx/edx-platform/blob/master/cms/djangoapps/contentstore/views/checklist.py#L140
Name |
Last commit
|
Last update |
---|---|---|
.tx | Loading commit data... | |
cms | Loading commit data... | |
common | Loading commit data... | |
conf/locale | Loading commit data... | |
docs | Loading commit data... | |
lms | Loading commit data... | |
pavelib | Loading commit data... | |
rakelib | Loading commit data... | |
requirements | Loading commit data... | |
scripts | Loading commit data... | |
test_root | Loading commit data... | |
vendor_extra/tinymce | Loading commit data... | |
.gitattributes | Loading commit data... | |
.gitignore | Loading commit data... | |
.jshintrc | Loading commit data... | |
.ruby-gemset | Loading commit data... | |
.ruby-version | Loading commit data... | |
AUTHORS | Loading commit data... | |
Brewfile | Loading commit data... | |
CHANGELOG.rst | Loading commit data... | |
CONTRIBUTING.rst | Loading commit data... | |
Gemfile | Loading commit data... | |
Gemfile.lock | Loading commit data... | |
LICENSE | Loading commit data... | |
README.md | Loading commit data... | |
manage.py | Loading commit data... | |
mongo_indexes.md | Loading commit data... | |
package.json | Loading commit data... | |
pavement.py | Loading commit data... | |
pylintrc | Loading commit data... | |
rakefile | Loading commit data... | |
setup.cfg | Loading commit data... | |
setup.py | Loading commit data... |