Skip to content
Snippets Groups Projects
Unverified Commit 4393a942 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Fix dynamic message id in translations (#33122)

parent 73cb16ee
No related branches found
No related tags found
No related merge requests found
import { popover, restore } from "e2e/support/helpers";
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";
const { ORDERS, ORDERS_ID } = SAMPLE_DATABASE;
const questionDetails = {
display: "line",
query: {
"source-table": ORDERS_ID,
aggregation: [["count"]],
breakout: [["field", ORDERS.CREATED_AT, { "temporal-unit": "month" }]],
},
};
describe("issue 33079", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
cy.intercept("POST", "/api/dataset").as("dataset");
cy.request("GET", "/api/user/current").then(({ body: user }) => {
cy.request("PUT", `/api/user/${user.id}`, { locale: "de" });
});
});
it("underlying records drill should work in a non-English locale (metabase#33079)", () => {
cy.createQuestion(questionDetails, { visitQuestion: true });
cy.get(".dot").eq(1).click({ force: true });
popover()
.findByText(/Order/) // See these Orders
.click();
cy.wait("@dataset");
cy.findByTestId("question-row-count").should("contain", "19");
});
});
......@@ -22,7 +22,8 @@ export const UnderlyingRecordsDrill: Drill = ({ question, clicked }) => {
: ngettext(msgid`record`, `records`, rowCount);
const actionTitle = ngettext(
msgid`See this ${tableTitle}`,
// extra argument is required to avoid a collision with a singular form translation (metabase#33079)
msgid`See this ${tableTitle}${""}`,
`See these ${tableTitle}`,
rowCount,
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment