about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/admin/Retention.js
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-12-17 23:00:41 +0100
committerGitHub <noreply@github.com>2021-12-17 23:00:41 +0100
commit0c17fd91091fd2f230224d5fce218688d480502c (patch)
tree317b9456ba1b64f528d041936b603e725b07b329 /app/javascript/mastodon/components/admin/Retention.js
parent40f202c1e589cae45c55392212c697e87c8a8f38 (diff)
Change title of retention chart (#16909)
Changes from “Retention” to “User retention rate by month after sign-up”.
This should make it much clearer to people not familiar with retention charts
what it actually means.
Diffstat (limited to 'app/javascript/mastodon/components/admin/Retention.js')
-rw-r--r--app/javascript/mastodon/components/admin/Retention.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/admin/Retention.js b/app/javascript/mastodon/components/admin/Retention.js
index aa06722f7..3a7aaed9d 100644
--- a/app/javascript/mastodon/components/admin/Retention.js
+++ b/app/javascript/mastodon/components/admin/Retention.js
@@ -42,6 +42,7 @@ export default class Retention extends React.PureComponent {
 
   render () {
     const { loading, data } = this.state;
+    const { frequency } = this.props;
 
     let content;
 
@@ -129,9 +130,18 @@ export default class Retention extends React.PureComponent {
       );
     }
 
+    let title = null;
+    switch(frequency) {
+    case 'day':
+      title = <FormattedMessage id='admin.dashboard.daily_retention' defaultMessage='User retention rate by day after sign-up' />;
+      break;
+    default:
+      title = <FormattedMessage id='admin.dashboard.monthly_retention' defaultMessage='User retention rate by month after sign-up' />;
+    };
+
     return (
       <div className='retention'>
-        <h4><FormattedMessage id='admin.dashboard.retention' defaultMessage='Retention' /></h4>
+        <h4>{title}</h4>
 
         {content}
       </div>