//= require i18n
//= require i18n/embed
-window.onload = function () {
- if (navigator.languages) {
- I18n.locale = navigator.languages[0];
- } else if (navigator.language) {
- I18n.locale = navigator.language;
- }
+if (navigator.languages) {
+ I18n.locale = navigator.languages[0];
+} else if (navigator.language) {
+ I18n.locale = navigator.language;
+}
+window.onload = function () {
var query = (window.location.search || '?').slice(1),
args = {};
--- /dev/null
+require "application_system_test_case"
+
+class EmbedTest < ApplicationSystemTestCase
+ test "shows localized report link" do
+ visit export_embed_path
+ assert_link "Report a problem"
+ end
+end
+
+class GermanEmbedTest < ApplicationSystemTestCase
+ driven_by :selenium, :using => :headless_firefox, :options => { :name => :selenium_de } do |options|
+ options.add_preference("intl.accept_languages", "de")
+ end
+
+ test "shows localized report link" do
+ visit export_embed_path
+ assert_link "Ein Problem melden"
+ end
+end