mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 03:03:37 +08:00
ab99f31760
Before Rails 7.1, the `config.i18n.raise_on_missing_translations` option was raising only in controllers and views, now it’s anywhere in the app. It means it raises each time `#description` is called for a setting that is missing a proper description (and we have a ton of them). Most of the time it’s fine, as those are usually settings that aren’t shown to the user. We can’t just let the code blow up every time there’s a setting with a missing description, that’s why it’s currently returning an empty string when the translation is missing. However, this silently broke our I18n integrity spec that was relying on the old “Translation missing” message to detect missing translations. This patch addresses this issue by checking the description isn’t an empty string. It caught a missing translation by the way. |
||
---|---|---|
.. | ||
fabricators | ||
fixtures | ||
generator | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
migrations | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
system | ||
tasks | ||
views | ||
rails_helper.rb | ||
regenerate_swagger_docs | ||
swagger_helper.rb |