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

Adjust language notice for non admins #389

Merged
merged 9 commits into from
Nov 27, 2017

Conversation

abotteram
Copy link
Contributor

@abotteram abotteram commented Nov 23, 2017

Summary

This PR can be summarized in the following changelog entry:

  • The language notice in the content analysis can be changed for non-admin users that cannot change the language.

Relevant technical choices:

Test instructions

This PR can be tested by following these steps:

Fixes #384

@@ -145,6 +145,45 @@ class ContentAnalysis extends React.Component {
} );
}

/**
* Render the language notice. Provides a link to a setting page in case of administrator, a notice to contact an
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renders

renderLanguageNotice() {
let showLanguageNotice = this.props.showLanguageNotice;
let canChangeLanguage = this.props.canChangeLanguage;
if( ! showLanguageNotice ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after if

if( ! showLanguageNotice ) {
return null;
}
if( canChangeLanguage ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after if

id="content-analysis.language-notice"
defaultMessage="Your site language is set to {language}."
values={ { language: <strong>{ this.props.language }</strong> } } />
{ " " }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: instead of explicitly using a space, I'd consider to use a translatable string that merges the 2 existing ones

@afercia
Copy link
Contributor

afercia commented Nov 24, 2017

CR done 👍
Pushed a few minor coding standards.

@afercia afercia closed this Nov 24, 2017
@afercia afercia reopened this Nov 24, 2017
@IreneStr
Copy link
Contributor

Acceptance done

@IreneStr IreneStr merged commit 21389ba into develop Nov 27, 2017
@IreneStr IreneStr deleted the stories/384-adjust-language-notice-for-non-admins branch November 27, 2017 10:35
@IreneStr IreneStr added this to the 2.11.4 milestone Nov 27, 2017
IreneStr added a commit that referenced this pull request Nov 27, 2017
Added
* Made it possible to pass the heading level of the `analysisCollapsible`s as a prop to the `ContentAnalysis`. #388
* Added a language notice in the content analysis for non-admin users that cannot change the language. #389

Fixed
- Avoid to fully re-render the `AnalyisisCollapsible` component to improve accessibility #386
- Fixed alignment of icons and text in the `ContentAnalysis` component. #390
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants