FIX: Load I18n first in show_confirm_new_email page

FIX: Load I18n first in show_confirm_new_email page

diff --git a/app/views/users_email/show_confirm_new_email.html.erb b/app/views/users_email/show_confirm_new_email.html.erb
index ba5102e..dc56120 100644
--- a/app/views/users_email/show_confirm_new_email.html.erb
+++ b/app/views/users_email/show_confirm_new_email.html.erb
@@ -77,9 +77,11 @@
     <%end%>
   <% end%>
 
-  <%= preload_script "ember_jquery" %>
   <%= preload_script "locales/#{I18n.locale}" %>
-  <%= preload_script "locales/i18n" %>
+  <%- if ExtraLocalesController.client_overrides_exist? %>
+    <%= preload_script_url ExtraLocalesController.url('overrides') %>
+  <%- end %>
+  <%= preload_script 'ember_jquery' %>
   <%= preload_script "discourse/app/lib/webauthn" %>
   <%= preload_script "confirm-new-email/confirm-new-email" %>
   <%= preload_script "confirm-new-email/bootstrap" %>

GitHub sha: 111877db

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/cannot-authenticate-with-yubikey-when-verifying-new-email/154578/13

Why change the loading order of the “ember_query” script?

1 Like

ember_jquery requires discourse-loader which uses I18n, so ember_jquery has to be loaded after locale.

The rest of the changes are to load overrides similar to how we usually do it.

2 Likes