Skip to content

Commit

Permalink
Merge branch 'master' into slate-style-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu authored Jun 7, 2023
2 parents c991974 + d057fd6 commit 7850e2c
Show file tree
Hide file tree
Showing 27 changed files with 164 additions and 142 deletions.
6 changes: 3 additions & 3 deletions locales/ca/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1272,9 +1272,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Introduïu la vostra nova contrasenya. Mínim 5 caràcters."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Introduïu la vostra nova contrasenya. Mínim 8 caràcters."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1269,9 +1269,9 @@ msgstr "Geben Sie Ihre E-Mail zur Verifikation ein."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Geben Sie ihr neues Passwort ein. Mindestens 5 Zeichen."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Geben Sie ihr neues Passwort ein. Mindestens 8 Zeichen."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
4 changes: 2 additions & 2 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1263,8 +1263,8 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr ""

#: components/theme/PasswordReset/PasswordReset
Expand Down
6 changes: 3 additions & 3 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1274,9 +1274,9 @@ msgstr "Introduzca su correo electrónico para verificar."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Introduzca su nueva contraseña. Mínimo 5 caracteres."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Introduzca su nueva contraseña. Mínimo 8 caracteres."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/eu/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1270,9 +1270,9 @@ msgstr "Idatzi zure eposta helbidea egiaztatu dezagun."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Idatzi zure pasahitz berria. Gutxienez 5 karaktere."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Idatzi zure pasahitz berria. Gutxienez 8 karaktere."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/fi/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1274,9 +1274,9 @@ msgstr "Syötä sähköpostiosoitteesi vahvistusta varten."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Syötä uusi salasanasi, jossa on vähintään viisi (5) merkkiä."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Syötä uusi salasanasi, jossa on vähintään viisi (8) merkkiä."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1280,9 +1280,9 @@ msgstr "Saisissez votre email pour vérification."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Saisissez votre nouveau mot de passe. Minimum 5 caractères."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Saisissez votre nouveau mot de passe. Minimum 8 caractères."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1263,9 +1263,9 @@ msgstr "Inserisci la tua email per la verifica."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Inserisci la tua nuova password. Minimo 5 caratteri."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Inserisci la tua nuova password. Minimo 8 caratteri."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/ja/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1271,9 +1271,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "新しいパスワードを入力。(5文字以上)"
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "新しいパスワードを入力。(8文字以上)"

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/nl/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1282,9 +1282,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Geef een nieuw wachtwoord op. Minimaal 5 karakters."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Geef een nieuw wachtwoord op. Minimaal 8 karakters."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/pt/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1271,9 +1271,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Escreva uma senha nova. Mínimo de 5 caracteres."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Escreva uma senha nova. Mínimo de 8 caracteres."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/pt_BR/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,9 @@ msgstr "Informe seu e-mail para verificação."

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Digite sua nova senha. Mínimo de 5 caracteres."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Digite sua nova senha. Mínimo de 8 caracteres."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
6 changes: 3 additions & 3 deletions locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1263,9 +1263,9 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "Introduceți noua parolă. Minim 5 caractere."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr "Introduceți noua parolă. Minim 8 caractere."

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
4 changes: 2 additions & 2 deletions locales/volto.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1265,8 +1265,8 @@ msgstr ""

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr ""

#: components/theme/PasswordReset/PasswordReset
Expand Down
6 changes: 3 additions & 3 deletions locales/zh_CN/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1269,9 +1269,9 @@ msgstr "输入你的邮箱进行验证"

#: components/manage/Preferences/ChangePassword
#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your new password. Minimum 5 characters.
msgid "Enter your new password. Minimum 5 characters."
msgstr "输入你的新密码。最少5个字符"
# defaultMessage: Enter your new password. Minimum 8 characters.
msgid "Enter your new password. Minimum 8 characters."
msgstr ""

#: components/theme/PasswordReset/PasswordReset
# defaultMessage: Enter your username for verification.
Expand Down
1 change: 1 addition & 0 deletions news/4767.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Convert header class to function. @gomez
1 change: 1 addition & 0 deletions news/4801.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Display PAS validation errors. [tschorr]
1 change: 1 addition & 0 deletions news/4849.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use a Container from the registry in the Form component and fallback to the Semantic UI one. @sneridagh
8 changes: 5 additions & 3 deletions src/components/manage/Form/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { Portal } from 'react-portal';
import { connect } from 'react-redux';
import {
Button,
Container,
Container as SemanticContainer,
Form as UiForm,
Message,
Segment,
Expand Down Expand Up @@ -545,12 +545,14 @@ class Form extends Component {
const { schema: originalSchema, onCancel, onSubmit } = this.props;
const { formData } = this.state;
const schema = this.removeBlocksLayoutFields(originalSchema);
const Container =
config.getComponent({ name: 'Container' }).component || SemanticContainer;

return this.props.visual ? (
// Removing this from SSR is important, since react-beautiful-dnd supports SSR,
// but draftJS don't like it much and the hydration gets messed up
this.state.isClient && (
<div className="ui container">
<Container>
<BlocksToolbar
formData={this.state.formData}
selectedBlock={this.state.selected}
Expand Down Expand Up @@ -639,7 +641,7 @@ class Form extends Component {
</UiForm>
</Portal>
)}
</div>
</Container>
)
) : (
<Container>
Expand Down
4 changes: 2 additions & 2 deletions src/components/manage/Preferences/ChangePassword.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const messages = defineMessages({
defaultMessage: 'New password',
},
newPasswordDescription: {
id: 'Enter your new password. Minimum 5 characters.',
defaultMessage: 'Enter your new password. Minimum 5 characters.',
id: 'Enter your new password. Minimum 8 characters.',
defaultMessage: 'Enter your new password. Minimum 8 characters.',
},
newPasswordRepeatTitle: {
id: 'Confirm password',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports[`ChangePassword renders a change password component 1`] = `
>
New password
-
Enter your new password. Minimum 5 characters.
Enter your new password. Minimum 8 characters.
</div>
<div
className="mocked-password-widget"
Expand Down
100 changes: 37 additions & 63 deletions src/components/theme/Header/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
/**
* Header component.
* @module components/theme/Header/Header
*/

import React, { Component } from 'react';
import { Container, Segment } from 'semantic-ui-react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { useToken } from '@plone/volto/hooks/userSession/useToken';

import {
Anontools,
Expand All @@ -16,65 +10,45 @@ import {
SearchWidget,
} from '@plone/volto/components';

/**
* Header component class.
* @class Header
* @extends Component
*/
class Header extends Component {
/**
* Property types.
* @property {Object} propTypes Property types.
* @static
*/
static propTypes = {
token: PropTypes.string,
pathname: PropTypes.string.isRequired,
};

/**
* Default properties.
* @property {Object} defaultProps Default properties.
* @static
*/
static defaultProps = {
token: null,
};
const Header = ({ pathname }) => {
const token = useToken();

/**
* Render method.
* @method render
* @returns {string} Markup for the component.
*/
render() {
return (
<Segment basic className="header-wrapper" role="banner">
<Container>
<div className="header">
<div className="logo-nav-wrapper">
<div className="logo">
<Logo />
</div>
<Navigation pathname={this.props.pathname} />
return (
<Segment basic className="header-wrapper" role="banner">
<Container>
<div className="header">
<div className="logo-nav-wrapper">
<div className="logo">
<Logo />
</div>
<div className="tools-search-wrapper">
<LanguageSelector />
{!this.props.token && (
<div className="tools">
<Anontools />
</div>
)}
<div className="search">
<SearchWidget />
<Navigation pathname={pathname} />
</div>
<div className="tools-search-wrapper">
<LanguageSelector />
{!token && (
<div className="tools">
<Anontools />
</div>
)}
<div className="search">
<SearchWidget />
</div>
</div>
</Container>
</Segment>
);
}
}
</div>
</Container>
</Segment>
);
};

export default Header;

Header.propTypes = {
token: PropTypes.string,
pathname: PropTypes.string.isRequired,
content: PropTypes.objectOf(PropTypes.any),
};

export default connect((state) => ({
token: state.userSession.token,
}))(Header);
Header.defaultProps = {
token: null,
content: null,
};
27 changes: 0 additions & 27 deletions src/components/theme/Header/Header.md

This file was deleted.

Loading

0 comments on commit 7850e2c

Please sign in to comment.