diff --git a/lib/liquid/locales/en.yml b/lib/liquid/locales/en.yml index 53421f4c..7a9fb71e 100644 --- a/lib/liquid/locales/en.yml +++ b/lib/liquid/locales/en.yml @@ -34,5 +34,3 @@ render: "Argument error in tag 'render' - Dynamically chosen templates are not allowed" disabled: tag: "usage is not allowed in this context" - file_system: - includes: "This liquid context does not allow includes" diff --git a/lib/liquid/tags/render.rb b/lib/liquid/tags/render.rb index 7f967282..dec725ed 100644 --- a/lib/liquid/tags/render.rb +++ b/lib/liquid/tags/render.rb @@ -58,7 +58,7 @@ module Liquid template_name = partial.name context_variable_name = @alias_name || template_name.split('/').last else - raise Liquid::ArgumentError, parse_context.locale.t("errors.file_system.includes") + raise ::ArgumentError end render_partial_func = ->(var, forloop) { diff --git a/test/integration/tags/snippet_test.rb b/test/integration/tags/snippet_test.rb index 571890ba..6d1cb35d 100644 --- a/test/integration/tags/snippet_test.rb +++ b/test/integration/tags/snippet_test.rb @@ -494,7 +494,7 @@ class SnippetTest < Minitest::Test - Liquid error (index line 2): This liquid context does not allow includes + Liquid error (index line 2): internal TEXT template.name = "index" @@ -518,7 +518,7 @@ class SnippetTest < Minitest::Test - Liquid error (index line 2): This liquid context does not allow includes will raise an error. + Liquid error (index line 2): internal will raise an error. Bla bla test. @@ -1017,7 +1017,7 @@ class SnippetTest < Minitest::Test - Liquid error (index line 2): This liquid context does not allow includes + Liquid error (index line 2): internal TEXT template.name = "index" @@ -1041,7 +1041,7 @@ class SnippetTest < Minitest::Test - Liquid error (index line 2): This liquid context does not allow includes will raise an error. + Liquid error (index line 2): internal will raise an error. Bla bla test.