Skip to content

Commit

Permalink
[docs] Hide the Ad fallback to Google (#15815)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored May 24, 2019
1 parent 7da8176 commit 7536182
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 36 deletions.
32 changes: 1 addition & 31 deletions docs/notifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,13 @@
"id": 27,
"text": "You can <a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" href=\"https://twitter.com/MaterialUI\">follow us on Twitter</a> to receive exclusive tips and updates about Material-UI and the React ecosystem."
},
{
"id": 34,
"text": "Lets translate! <a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" data-ga-event-category=\"l10n\" data-ga-event-action=\"notification\" data-ga-event-label=\"pt\" href=\"https://translate.material-ui.com/\">Ajude a comunidade a traduzir a documentação para o Português</a>. 🇧🇷",
"userLanguage": "pt"
},
{
"id": 35,
"text": "Let's translate! <a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" data-ga-event-category=\"l10n\" data-ga-event-action=\"notification\" data-ga-event-label=\"zh\" href=\"https://translate.material-ui.com/\">帮助 Material-UI 将文档翻译成中文</a>. 🇨🇳",
"userLanguage": "zh"
},
{
"id": 36,
"text": "Let's translate! <a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" data-ga-event-category=\"l10n\" data-ga-event-action=\"notification\" data-ga-event-label=\"ru\" href=\"https://translate.material-ui.com/\">Помогите сообществу перевести документацию на русский язык</a>. 🇷🇺",
"userLanguage": "ru"
},
{
"id": 37,
"text": "Let's translate! <a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" data-ga-event-category=\"l10n\" data-ga-event-action=\"notification\" data-ga-event-label=\"fr\" href=\"https://translate.material-ui.com/\">Aidez la communauté à traduire la documentation en français</a>. 🇫🇷",
"userLanguage": "fr"
},
{
"id": 38,
"text": "Let's translate! <a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" data-ga-event-category=\"l10n\" data-ga-event-action=\"notification\" data-ga-event-label=\"es\" href=\"https://translate.material-ui.com/\">Ayuda a la comunidad a traducir la documentación al español.</a>. 🇪🇸",
"userLanguage": "es"
},
{
"id": 39,
"text": "Let's translate! <a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" data-ga-event-category=\"l10n\" data-ga-event-action=\"notification\" data-ga-event-label=\"de\" href=\"https://translate.material-ui.com/\">Helfen Sie der Community, die Dokumentation ins Deutsche zu übersetzen</a>. 🇩🇪",
"userLanguage": "de"
},
{
"id": 40,
"text": "Let's translate! <a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" data-ga-event-category=\"l10n\" data-ga-event-action=\"notification\" data-ga-event-label=\"ja\" href=\"https://translate.material-ui.com/\">コミュニティがドキュメントを日本語に翻訳するのを手伝ってください</a>. 🇯🇵",
"userLanguage": "ja"
},
{
"id": 41,
"text": "Come and join us in <a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" href=\"https://spectrum.chat/material-ui\">the new Material-UI community</a> on Spectrum!"
"text": "<a style=\"color: inherit;\" target=\"_blank\" rel=\"noopener\" href=\"https://twitter.com/MaterialUI/status/1131599268014415877\">Material-UI v4 is out 🎉</a>"
}
]
7 changes: 2 additions & 5 deletions docs/src/modules/components/Ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ function getAdblock(classes, t) {
{t('likeMui')}
</Typography>
<Typography variant="body2" display="block" component="span" gutterBottom>
{t('adblock')}
</Typography>
<Typography variant="body2" display="block" component="span">
{t('thanks')}{' '}
{t('adblock')}{' '}
<span role="img" aria-label="Love">
❤️
</span>
Expand Down Expand Up @@ -96,7 +93,7 @@ class Ad extends React.Component {
const { classes, t } = this.props;
const { adblock, disable } = this.state;

if (disable) {
if (disable && !/Googlebot/.test(navigator.userAgent)) {
return <span className={classes.root}>{getAdblock(classes, t)}</span>;
}

Expand Down
4 changes: 4 additions & 0 deletions pages/blog/material-ui-v4-is-out.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,7 @@ Within a few weeks, you should find a collection of the best Material-UI templat

Finally, one last thank you to everyone who's contributed to Material-UI v4. 
I'm so excited about this release! It's just the beginning. We will keep working hard on delivering the best possible React UI framework components.

<hr />

*You can find the [same post on Medium](https://medium.com/material-ui/material-ui-v4-is-out-4b7587d1e701).*

1 comment on commit 7536182

@mbrookes
Copy link
Member

Choose a reason for hiding this comment

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

What happened to the l10n notifications?

Please sign in to comment.