diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 3d76adc..6d1f10f 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -298,7 +298,7 @@ en: NU: "Niue" NF: "Norfolk Island" MP: "Northern Mariana Islands" - NO: "Norway" + "NO": "Norway" OM: "Oman" PK: "Pakistan" PW: "Palau" diff --git a/test/javascripts/acceptance/subscribe-test.js b/test/javascripts/acceptance/subscribe-test.js index d162b43..a684e42 100644 --- a/test/javascripts/acceptance/subscribe-test.js +++ b/test/javascripts/acceptance/subscribe-test.js @@ -2,6 +2,7 @@ import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import pretender, { response } from "discourse/tests/helpers/create-pretender"; import { acceptance, count } from "discourse/tests/helpers/qunit-helpers"; +import I18n from "discourse-i18n"; import { stubStripe } from "discourse/plugins/discourse-subscriptions/helpers/stripe"; function singleProductPretender() { @@ -49,4 +50,17 @@ acceptance("Discourse Subscriptions", function (needs) { assert.dom("input.subscribe-promo-code").exists(); assert.dom("button.btn-payment").exists(); }); + + // In YAML `NO:` is a boolean, so we need quotes around `"NO":`. + test("Norway is translated correctly", async function (assert) { + assert.equal( + I18n.t("discourse_subscriptions.subscribe.countries.NO"), + "Norway" + ); + + assert.equal( + I18n.t("discourse_subscriptions.subscribe.countries.NG"), + "Nigeria" + ); + }); });