smpallen99 / ex_admin

ExAdmin is an auto administration package for Elixir and the Phoenix Framework
MIT License
1.2k stars 272 forks source link

Compilation error in file lib/ex_admin/paginate.ex #444

Open rickmutua opened 6 years ago

rickmutua commented 6 years ago

== Compilation error in file lib/ex_admin/paginate.ex == * (ArgumentError) gettext macros expect translation keys (msgid and msgid_plural) and domains to expand to strings at compile-time, but the given msgid doesn't.

Dynamic translations should be avoided as they limit gettext's ability to extract translations from your source code. If you are sure you need dynamic lookup, you can use the functions in the Gettext module:

string = "hello world"
Gettext.gettext(ExAdmin.Gettext, string)

(gettext) lib/gettext/compiler.ex:231: Gettext.Compiler.expand_to_binary/4
expanding macro: ExAdmin.Gettext.dgettext_noop/2
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
expanding macro: ExAdmin.Gettext.dgettext/3
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
expanding macro: ExAdmin.Gettext.gettext/1
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
(elixir) expanding macro: Kernel.to_string/1
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
expanding macro: Xain.text/1
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
expanding macro: Xain.markup/1
lib/ex_admin/paginate.ex:57: ExAdmin.Paginate.pagination_information/2
(elixir) lib/kernel/parallel_compiler.ex:198: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6

could not compile dependency :ex_admin, "mix compile" failed. You can recompile this dependency with "mix deps.compile ex_admin", update it with "mix deps.update ex_admin" or clean it with "mix deps.clean ex_admin"

MattGaud2425 commented 6 years ago

Compilation error in file lib/ex_admin/paginate.ex == * (ArgumentError) gettext macros expect translation keys (msgid and msgid_plural) and domains to expand to strings at compile-time, but the given msgid doesn't.

Dynamic translations should be avoided as they limit gettext's ability to extract translations from your source code. If you are sure you need dynamic lookup, you can use the functions in the Gettext module:

string = "hello world"
Gettext.gettext(ExAdmin.Gettext, string)

(gettext) lib/gettext/compiler.ex:231: Gettext.Compiler.expand_to_binary/4
expanding macro: ExAdmin.Gettext.dgettext_noop/2
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
expanding macro: ExAdmin.Gettext.dgettext/3
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
expanding macro: ExAdmin.Gettext.gettext/1
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
(elixir) expanding macro: Kernel.to_string/1
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
expanding macro: Xain.text/1
lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
expanding macro: Xain.markup/1
lib/ex_admin/paginate.ex:57: ExAdmin.Paginate.pagination_information/2
(elixir) lib/kernel/parallel_compiler.ex:198: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6

could not compile dependency :ex_admin, "mix compile" failed. You can recompile this dependency with "mix deps.compile ex_admin", update it with "mix deps.update ex_admin" or clean it with "mix deps.clean ex_admin"

MattGaud2425 commented 6 years ago

Any news on this? Still failing on mix deps.compile.

MattGaud2425 commented 6 years ago

setting override:true on gettext resolved this.