Skip to content

Show last-active time on profile page #1793

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
44 changes: 44 additions & 0 deletions assets/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,50 @@
"@yesterday": {
"description": "Term to use to reference the previous day."
},
"userActiveNow": "Active now",
"@userActiveNow": {
"description": "Indicates a user is currently active on Zulip (not idle or offline)"
},
"userIdle": "Idle",
"@userIdle": {
"description": "Indicates a user is currently idle on Zulip (not active, but not offline)"
},
"userActiveMinutesAgo": "Active {minutes, plural, =1{1 minute} other{{minutes} minutes}} ago",
"@userActiveMinutesAgo": {
"description": "Indicates when a user was last active on Zulip (who is currently offline)",
"placeholders": {
"minutes": {"type": "int", "example": "5"}
}
},
"userActiveHoursAgo": "Active {hours, plural, =1{1 hour} other{{hours} hours}} ago",
"@userActiveHoursAgo": {
"description": "Indicates when a user was last active on Zulip (who is currently offline)",
"placeholders": {
"hours": {"type": "int", "example": "5"}
}
},
"userActiveYesterday": "Active yesterday",
"@userActiveYesterday": {
"description": "Indicates when a user was last active on Zulip (who is currently offline)"
},
"userActiveDaysAgo": "Active {days, plural, =1{1 day} other{{days} days}} ago",
"@userActiveDaysAgo": {
"description": "Indicates when a user was last active on Zulip (who is currently offline)",
"placeholders": {
"days": {"type": "int", "example": "5"}
}
},
"userActiveDate": "Active {date}",
"@userActiveDate": {
"description": "Indicates the date when a user was last active on Zulip (who is currently offline).\n\nThe date might be day and month if recent, or day, month, and year if less recent.",
"placeholders": {
"date": {"type": "String", "example": "Aug 1, 2024"}
}
},
"userNotActiveInYear": "Not active in the last year",
"@userNotActiveInYear": {
"description": "Indicates when a user was last active on Zulip (who is currently offline)"
},
"invisibleMode": "Invisible mode",
"@invisibleMode": {
"description": "Label for the 'Invisible mode' switch on the profile page."
Expand Down
50 changes: 50 additions & 0 deletions lib/generated/l10n/zulip_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,56 @@ abstract class ZulipLocalizations {
/// **'Yesterday'**
String get yesterday;

/// Indicates a user is currently active on Zulip (not idle or offline)
///
/// In en, this message translates to:
/// **'Active now'**
String get userActiveNow;

/// Indicates a user is currently idle on Zulip (not active, but not offline)
///
/// In en, this message translates to:
/// **'Idle'**
String get userIdle;

/// Indicates when a user was last active on Zulip (who is currently offline)
///
/// In en, this message translates to:
/// **'Active {minutes, plural, =1{1 minute} other{{minutes} minutes}} ago'**
String userActiveMinutesAgo(int minutes);

/// Indicates when a user was last active on Zulip (who is currently offline)
///
/// In en, this message translates to:
/// **'Active {hours, plural, =1{1 hour} other{{hours} hours}} ago'**
String userActiveHoursAgo(int hours);

/// Indicates when a user was last active on Zulip (who is currently offline)
///
/// In en, this message translates to:
/// **'Active yesterday'**
String get userActiveYesterday;

/// Indicates when a user was last active on Zulip (who is currently offline)
///
/// In en, this message translates to:
/// **'Active {days, plural, =1{1 day} other{{days} days}} ago'**
String userActiveDaysAgo(int days);

/// Indicates the date when a user was last active on Zulip (who is currently offline).
///
/// The date might be day and month if recent, or day, month, and year if less recent.
///
/// In en, this message translates to:
/// **'Active {date}'**
String userActiveDate(String date);

/// Indicates when a user was last active on Zulip (who is currently offline)
///
/// In en, this message translates to:
/// **'Not active in the last year'**
String get userNotActiveInYear;

/// Label for the 'Invisible mode' switch on the profile page.
///
/// In en, this message translates to:
Expand Down
50 changes: 50 additions & 0 deletions lib/generated/l10n/zulip_localizations_ar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,56 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
@override
String get yesterday => 'Yesterday';

@override
String get userActiveNow => 'Active now';

@override
String get userIdle => 'Idle';

@override
String userActiveMinutesAgo(int minutes) {
String _temp0 = intl.Intl.pluralLogic(
minutes,
locale: localeName,
other: '$minutes minutes',
one: '1 minute',
);
return 'Active $_temp0 ago';
}

@override
String userActiveHoursAgo(int hours) {
String _temp0 = intl.Intl.pluralLogic(
hours,
locale: localeName,
other: '$hours hours',
one: '1 hour',
);
return 'Active $_temp0 ago';
}

@override
String get userActiveYesterday => 'Active yesterday';

@override
String userActiveDaysAgo(int days) {
String _temp0 = intl.Intl.pluralLogic(
days,
locale: localeName,
other: '$days days',
one: '1 day',
);
return 'Active $_temp0 ago';
}

@override
String userActiveDate(String date) {
return 'Active $date';
}

@override
String get userNotActiveInYear => 'Not active in the last year';

@override
String get invisibleMode => 'Invisible mode';

Expand Down
50 changes: 50 additions & 0 deletions lib/generated/l10n/zulip_localizations_de.dart
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,56 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
@override
String get yesterday => 'Gestern';

@override
String get userActiveNow => 'Active now';

@override
String get userIdle => 'Idle';

@override
String userActiveMinutesAgo(int minutes) {
String _temp0 = intl.Intl.pluralLogic(
minutes,
locale: localeName,
other: '$minutes minutes',
one: '1 minute',
);
return 'Active $_temp0 ago';
}

@override
String userActiveHoursAgo(int hours) {
String _temp0 = intl.Intl.pluralLogic(
hours,
locale: localeName,
other: '$hours hours',
one: '1 hour',
);
return 'Active $_temp0 ago';
}

@override
String get userActiveYesterday => 'Active yesterday';

@override
String userActiveDaysAgo(int days) {
String _temp0 = intl.Intl.pluralLogic(
days,
locale: localeName,
other: '$days days',
one: '1 day',
);
return 'Active $_temp0 ago';
}

@override
String userActiveDate(String date) {
return 'Active $date';
}

@override
String get userNotActiveInYear => 'Not active in the last year';

@override
String get invisibleMode => 'Invisible mode';

Expand Down
50 changes: 50 additions & 0 deletions lib/generated/l10n/zulip_localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,56 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
@override
String get yesterday => 'Yesterday';

@override
String get userActiveNow => 'Active now';

@override
String get userIdle => 'Idle';

@override
String userActiveMinutesAgo(int minutes) {
String _temp0 = intl.Intl.pluralLogic(
minutes,
locale: localeName,
other: '$minutes minutes',
one: '1 minute',
);
return 'Active $_temp0 ago';
}

@override
String userActiveHoursAgo(int hours) {
String _temp0 = intl.Intl.pluralLogic(
hours,
locale: localeName,
other: '$hours hours',
one: '1 hour',
);
return 'Active $_temp0 ago';
}

@override
String get userActiveYesterday => 'Active yesterday';

@override
String userActiveDaysAgo(int days) {
String _temp0 = intl.Intl.pluralLogic(
days,
locale: localeName,
other: '$days days',
one: '1 day',
);
return 'Active $_temp0 ago';
}

@override
String userActiveDate(String date) {
return 'Active $date';
}

@override
String get userNotActiveInYear => 'Not active in the last year';

@override
String get invisibleMode => 'Invisible mode';

Expand Down
50 changes: 50 additions & 0 deletions lib/generated/l10n/zulip_localizations_fr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,56 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
@override
String get yesterday => 'Yesterday';

@override
String get userActiveNow => 'Active now';

@override
String get userIdle => 'Idle';

@override
String userActiveMinutesAgo(int minutes) {
String _temp0 = intl.Intl.pluralLogic(
minutes,
locale: localeName,
other: '$minutes minutes',
one: '1 minute',
);
return 'Active $_temp0 ago';
}

@override
String userActiveHoursAgo(int hours) {
String _temp0 = intl.Intl.pluralLogic(
hours,
locale: localeName,
other: '$hours hours',
one: '1 hour',
);
return 'Active $_temp0 ago';
}

@override
String get userActiveYesterday => 'Active yesterday';

@override
String userActiveDaysAgo(int days) {
String _temp0 = intl.Intl.pluralLogic(
days,
locale: localeName,
other: '$days days',
one: '1 day',
);
return 'Active $_temp0 ago';
}

@override
String userActiveDate(String date) {
return 'Active $date';
}

@override
String get userNotActiveInYear => 'Not active in the last year';

@override
String get invisibleMode => 'Invisible mode';

Expand Down
50 changes: 50 additions & 0 deletions lib/generated/l10n/zulip_localizations_it.dart
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,56 @@ class ZulipLocalizationsIt extends ZulipLocalizations {
@override
String get yesterday => 'Ieri';

@override
String get userActiveNow => 'Active now';

@override
String get userIdle => 'Idle';

@override
String userActiveMinutesAgo(int minutes) {
String _temp0 = intl.Intl.pluralLogic(
minutes,
locale: localeName,
other: '$minutes minutes',
one: '1 minute',
);
return 'Active $_temp0 ago';
}

@override
String userActiveHoursAgo(int hours) {
String _temp0 = intl.Intl.pluralLogic(
hours,
locale: localeName,
other: '$hours hours',
one: '1 hour',
);
return 'Active $_temp0 ago';
}

@override
String get userActiveYesterday => 'Active yesterday';

@override
String userActiveDaysAgo(int days) {
String _temp0 = intl.Intl.pluralLogic(
days,
locale: localeName,
other: '$days days',
one: '1 day',
);
return 'Active $_temp0 ago';
}

@override
String userActiveDate(String date) {
return 'Active $date';
}

@override
String get userNotActiveInYear => 'Not active in the last year';

@override
String get invisibleMode => 'Invisible mode';

Expand Down
Loading
Loading