<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="216712" data-post-id="216712">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="eriklindgren" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eriklindgren/120/23179_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  eriklindgren
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I checked the <code>.pot</code> files <a class="mention" href="/u/kip" rel="nofollow">@kip</a> but no <code>Plural-Forms:</code> header.</p>
<p>I think you pinpointed the source of the exception though, as <code>Application.get_env(:gettext, :plural_forms, Gettext.Plural)</code> resolves to the custom module, and the exception occurs when <code>nplurals/1</code> is called on it. Perhaps there’s something more I need to do for the mix task to be able to access it?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="216712" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gettext-custom-plural-forms-module-not-working/30602/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-216712" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="216712"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="290176" data-post-id="290176">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="c4710n" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/c4710n/120/30931_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  c4710n
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a href="https://hexdocs.pm/gettext/0.22.1/Gettext.Plural.html#:~:text=Task%20such%20as%20mix%20gettext.merge%20use%20the%20plural%20backend%20configured%20under%20the%20%3Agettext%20application%2C%20so%20in%20general%20the%20global%20configuration%20approach%20is%20preferred." rel="noopener nofollow ugc">quoted from docs of gettext</a>:</p>
<blockquote>
<p>Task such as <a href="https://hexdocs.pm/gettext/0.22.1/Mix.Tasks.Gettext.Merge.html" rel="noopener nofollow ugc"><code>mix gettext.merge</code></a> use the plural backend configured under the <code>:gettext</code> application, so in general the global configuration approach is preferred.</p>
</blockquote>
<p>Because of that, <strong>use the global configuration</strong>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir"># For example, in config/config.exs
config :gettext, :plural_forms, MyApp.Plural
</code></pre>
<p>Instead of the configuration for a specific backend module:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyApp.Gettext do
  use Gettext, otp_app: :my_app, plural_forms: MyApp.Plural
end
</code></pre>
<p>Then, the problem should be solved.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="290176" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gettext-custom-plural-forms-module-not-working/30602/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-290176" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="290176"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>