Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in file lib/magnify_web/coherence_messages.ex #340

Closed
isAlmogK opened this issue Apr 13, 2018 · 1 comment
Closed

Compilation error in file lib/magnify_web/coherence_messages.ex #340

isAlmogK opened this issue Apr 13, 2018 · 1 comment

Comments

@isAlmogK
Copy link

Just installed coherence and I'm getting the following error

== Compilation error in file lib/magnify_web/coherence_messages.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(MagnifyWeb.Gettext, string)

    (gettext) lib/gettext/compiler.ex:231: Gettext.Compiler.expand_to_binary/4
    expanding macro: MagnifyWeb.Gettext.dgettext_noop/2
    lib/magnify_web/coherence_messages.ex:73: MagnifyWeb.Coherence.Messages.you_are_using_an_invalid_security_token/0
    expanding macro: MagnifyWeb.Gettext.dgettext/2
    lib/magnify_web/coherence_messages.ex:73: MagnifyWeb.Coherence.Messages.you_are_using_an_invalid_security_token/0
    (elixir) lib/kernel/parallel_compiler.ex:198: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6

When I remove the following
#def you_are_using_an_invalid_security_token, do: dgettext(@domain, "You are using an invalid security token for this site! This security\n" <> "violation has been logged.\n")

It compiles and runs I do get the following warning

warning: function you_are_using_an_invalid_security_token/0 required by behaviour Coherence.Messages is not implemented (in module MagnifyWeb.Coherence.Messages)
  lib/magnify_web/coherence_messages.ex:1
@isAlmogK
Copy link
Author

fixed based on the following - #337 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant