Logo
Explore Help
Sign In
IntenseWebs/discourse
3
0
Fork 0
You've already forked discourse
mirror of https://github.com/discourse/discourse.git synced 2025-02-25 18:55:32 -06:00
Code Issues Packages Projects Releases Wiki Activity
Files
4bfe78d1e66fab345dda56f791e59c749d0de3a6
discourse/spec/support/i18n_helpers.rb

14 lines
380 B
Ruby
Raw Normal View History

DEV: Catch missing translations during test runs (#26258) This configuration makes it so that a missing translation will raise an error during test execution. Better discover there than after deploy.
2024-05-24 22:15:53 +08:00
# frozen_string_literal: true
module I18nHelpers
def allow_missing_translations
DEV: Upgrade Rails to version 7.1 --------- Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-06-20 10:33:01 +02:00
original_handler = I18n.exception_handler
I18n.exception_handler = nil
DEV: Catch missing translations during test runs (#26258) This configuration makes it so that a missing translation will raise an error during test execution. Better discover there than after deploy.
2024-05-24 22:15:53 +08:00
Rails.application.config.i18n.raise_on_missing_translations = false
yield
ensure
DEV: Upgrade Rails to version 7.1 --------- Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-06-20 10:33:01 +02:00
I18n.exception_handler = original_handler
DEV: Catch missing translations during test runs (#26258) This configuration makes it so that a missing translation will raise an error during test execution. Better discover there than after deploy.
2024-05-24 22:15:53 +08:00
Rails.application.config.i18n.raise_on_missing_translations = true
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 119ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API