FIX: Translation missing for Norway (#196)
Turns out in YAML `NO` is interpreted as a boolean value, so we need to wrap it in quotes.
This commit is contained in:
parent
0d28c9a56d
commit
9190001a3c
|
@ -298,7 +298,7 @@ en:
|
|||
NU: "Niue"
|
||||
NF: "Norfolk Island"
|
||||
MP: "Northern Mariana Islands"
|
||||
NO: "Norway"
|
||||
"NO": "Norway"
|
||||
OM: "Oman"
|
||||
PK: "Pakistan"
|
||||
PW: "Palau"
|
||||
|
|
|
@ -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"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue