Skip to content

Commit

Permalink
Translations
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejewsky committed Jan 3, 2025
1 parent 35f4068 commit 3a4dbf8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
6 changes: 6 additions & 0 deletions locale/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -7525,6 +7525,9 @@
"kdRcqU": {
"string": "Search customers..."
},
"keyPlaceholder": {
"string": "Key"
},
"kfvvnM": {
"string": "Provided amount cannot exceed charged amount for the selected transaction"
},
Expand Down Expand Up @@ -9101,6 +9104,9 @@
"context": "default product variant indicator",
"string": "Default"
},
"valuePlaceholder": {
"string": "Value"
},
"vcwrgW": {
"string": "No translatable entities found"
},
Expand Down
8 changes: 6 additions & 2 deletions src/components/ConditionalFilter/UI/MetadataInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Box, Input } from "@saleor/macaw-ui-next";
import React from "react";
import { useIntl } from "react-intl";

import { metadataInputMessages } from "../intl";
import { FilterEventEmitter } from "./EventEmitter";
import { DoubleTextOperator } from "./types";

Expand All @@ -19,6 +21,8 @@ export const MetadataInput = ({
error,
disabled,
}: MetadataInputProps) => {
const intl = useIntl();

return (
<Box
display="flex"
Expand All @@ -44,7 +48,7 @@ export const MetadataInput = ({
emitter.blurRightOperator(index);
}}
error={error}
placeholder="Key"
placeholder={intl.formatMessage(metadataInputMessages.keyPlaceholder)}
disabled={disabled}
/>
<Box __width="1px" backgroundColor="default1Focused" />
Expand All @@ -61,7 +65,7 @@ export const MetadataInput = ({
emitter.blurRightOperator(index);
}}
error={error}
placeholder="Value"
placeholder={intl.formatMessage(metadataInputMessages.valuePlaceholder)}
disabled={disabled}
/>
</Box>
Expand Down
11 changes: 11 additions & 0 deletions src/components/ConditionalFilter/intl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,14 @@ export const leftOperatorsMessages = defineMessages({
defaultMessage: "Is giftcard",
},
});

export const metadataInputMessages = defineMessages({
keyPlaceholder: {
id: "EcglP9",
defaultMessage: "Key",
},
valuePlaceholder: {
id: "GufXy5",
defaultMessage: "Value",
},
});

0 comments on commit 3a4dbf8

Please sign in to comment.