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

rename language field to quotationLanguage #13

Merged
merged 1 commit into from
Feb 5, 2024
Merged
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
1 change: 1 addition & 0 deletions news/12.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- rename language field to quotationLanguage [@jonaspiterek]
2 changes: 1 addition & 1 deletion src/components/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const View = (props) => {
)}
<blockquote
cite={data.cite}
className={cx(data.language, isEditMode && 'edit')}
className={cx(!isEditMode && data.quotationLanguage)}
>
{!isEditMode ? (
<TextBlockView {...props} />
Expand Down
10 changes: 5 additions & 5 deletions src/components/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const messages = defineMessages({
id: 'Quote',
defaultMessage: 'Quote',
},
language: {
quotationLanguage: {
id: 'Language',
defaultMessage: 'Language',
},
Expand Down Expand Up @@ -59,8 +59,8 @@ export const QuoteBlockSchema = ({ intl }) => {
id: 'default',
title: 'Default',
fields: config?.blocks?.blocksConfig?.quote?.showImageField
? ['language', 'image']
: ['language'],
? ['quotationLanguage', 'image']
: ['quotationLanguage'],
},
{
id: 'person',
Expand All @@ -69,8 +69,8 @@ export const QuoteBlockSchema = ({ intl }) => {
},
],
properties: {
language: {
title: intl.formatMessage(messages.language),
quotationLanguage: {
title: intl.formatMessage(messages.quotationLanguage),
choices: filterDefaultLanguages(),
default: defaultLang,
noValueOption: false,
Expand Down
Loading