Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AB#45966] [AB#45366] chore: rename language to locale and application title #164

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>FE Samples</title>
<title>Axinom Mosaic Frontend Samples</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { getAllItemsQuery } from './graphql-documents';
export const GetSingleItem: React.FC = () => {
const { activeProfile, logger } = useScenarioHost();
const [entityId, setEntityId] = useState<string>('');
const [language, setLanguage] = useState<string>('');
const [locale, setLocale] = useState<string>('');

const fetchAndLogCatalogItems = async (): Promise<void> => {
try {
Expand All @@ -27,12 +27,12 @@ export const GetSingleItem: React.FC = () => {
);

const result = await apolloClient.query({
// set the language header for the request
// set the locale header for the request
context: {
headers:
language !== ''
locale !== ''
? {
'mosaic-locale': language,
'mosaic-locale': locale,
}
: undefined,
},
Expand Down Expand Up @@ -100,10 +100,10 @@ export const GetSingleItem: React.FC = () => {
width={4}
icon="globe"
iconPosition="left"
label="Language"
value={language}
label="Locale"
value={locale}
onChange={(event) => {
setLanguage(event.target.value);
setLocale(event.target.value);
}}
/>
</Form.Group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useState } from 'react';

export const ListCatalogItems: React.FC = () => {
const { activeProfile, logger } = useScenarioHost();
const [language, setLanguage] = useState<string>('');
const [locale, setLocale] = useState<string>('');

const fetchAndLogCatalogItems = async (
gqlDocument: DocumentNode,
Expand All @@ -33,9 +33,9 @@ export const ListCatalogItems: React.FC = () => {
const result = await apolloClient.query({
context: {
headers:
language !== ''
locale !== ''
? {
'mosaic-locale': language,
'mosaic-locale': locale,
}
: undefined,
},
Expand Down Expand Up @@ -89,10 +89,10 @@ export const ListCatalogItems: React.FC = () => {
width={4}
icon="globe"
iconPosition="left"
label="Language"
value={language}
label="Locale"
value={locale}
onChange={(event) => {
setLanguage(event.target.value);
setLocale(event.target.value);
}}
/>
</Form.Group>
Expand Down