discourse/plugins/discourse-gamification/config/locales/client.en.yml
Rafael dos Santos Silva 848c19ae48
FEATURE: Per-leaderboard scorable weights and category filters (#39062)
## Summary

- Moves scorable weight configuration and category filtering from global
site settings to individual leaderboards
- Each leaderboard can override any of the 15 score weight values and
specify its own scorable categories
- Score calculation now runs per leaderboard into a new
`gamification_leaderboard_scores` table
- Admin UI gains a "Scoring configuration" section on the leaderboard
edit form

## Details

Previously all leaderboards shared the same pre-calculated scores from
global site settings. This made it impossible to have e.g. a
"posts-only" leaderboard alongside a "likes-focused" one.

Now each leaderboard can optionally override:
- **Score weights**: Set per-action point values (empty = inherit global
default, 0 = disabled)
- **Scorable categories**: Restrict which categories count toward
scoring (empty = inherit global setting)

The old `gamification_scores` table is no longer written to — a
post-deploy migration to drop it will follow separately.

## Test plan

- [ ] Create a leaderboard with default scoring — scores match current
behavior
- [ ] Create a leaderboard with custom weights (e.g. `post_created` =
10, all others empty) — only overridden weights differ
- [ ] Set a weight to 0 — that scorable is disabled for the leaderboard
- [ ] Set per-leaderboard categories — only those categories count
- [ ] Clear categories — inherits global `scorable_categories` setting
- [ ] Existing leaderboards with no overrides behave identically after
upgrade
- [ ] Directory scores and user card scores work correctly (read from
default leaderboard)
- [ ] `bin/rspec plugins/discourse-gamification/spec/` — 120 examples, 0
failures
2026-04-23 11:23:01 -03:00

105 lines
4.5 KiB
YAML
Vendored

en:
admin_js:
admin:
site_settings:
categories:
discourse_gamification: "Discourse Gamification"
js:
# directory column workaround
gamification_score: "Cheers"
gamification:
score: "Cheers"
you: "You"
leaderboard:
title: "Leaderboards"
info: "How does this work?"
link_to_settings: "Settings"
refresh: "Refresh"
modal:
title: "How does the leaderboard work?"
text: "Points are awarded for engaging with the community, such as visiting, liking, and posting. Your score is updated every few minutes. So go be helpful, active, and supportive, and rise through the ranks!"
name: "Name"
name_placeholder: "Name..."
new: "New leaderboard"
create_success: "Leaderboard created"
delete_success: "Leaderboard deleted"
save_success: "Leaderboard saved"
cta: "Make your first leaderboard"
none: "No leaderboards created yet."
confirm_destroy: "Are you sure you want to delete this leaderboard?"
section:
time_period: "Time period"
time_period_description: "Control the date range and default period for this leaderboard."
groups: "Groups"
groups_description: "Control which users are included in and can view this leaderboard."
date:
range: "From / To Date Range"
from: "From date"
to: "To date"
helper: "If dates are left empty the leaderboard will show scores earned without any time restrictions."
visible_to_groups: "Visible to groups"
visible_to_groups_help: "Only users on those groups will be able to view the leaderboard. Leave empty to allow everyone."
included_groups: "Included groups"
included_groups_help: "Only users on those groups will be included in the leaderboard. Leave empty to list everyone."
excluded_groups: "Excluded groups"
excluded_groups_help: "Remove users on those groups from being included in the leaderboard. Leave empty to list everyone."
default_period: "Default period"
default_period_help: "Set the default time period to display for this leaderboard."
period_filter_disabled: "Disable time period filter"
scoring_configuration: "Scoring configuration"
scoring_configuration_description: "Override the global scoring rules for this leaderboard. Leave fields empty to use the global defaults."
scorable_categories: "Scorable categories"
scorable_categories_help: "Categories to include in scoring. Leave empty to use the global setting."
score_overrides: "Score weights"
score_overrides_help: "Override the point values for each action. Leave empty to use the global default. Set to 0 to disable."
weight:
like_given: "Like given"
like_received: "Like received"
post_created: "Post created"
topic_created: "Topic created"
solution: "Solution"
day_visited: "Day visited"
flag_created: "Flag created"
post_read: "Post read"
time_read: "Time read"
user_invited: "User invited"
reaction_given: "Reaction given"
reaction_received: "Reaction received"
chat_message_created: "Chat message created"
chat_reaction_given: "Chat reaction given"
chat_reaction_received: "Chat reaction received"
period:
all_time: "All Time"
yearly: "Yearly"
quarterly: "Quarterly"
monthly: "Monthly"
weekly: "Weekly"
daily: "Daily"
rank: "Rank"
create: "Create"
cancel: "Cancel"
close: "Close"
delete: "Delete"
edit: "Edit"
back: "Back"
save: "Save"
apply: "Apply"
recalculate: "Recalculate scores"
recalculating: "Recalculating scores..."
completed: "Done! The scores have been successfully recalculated."
update_scores_help: "Update all scores for all leaderboards from"
update_range:
last_10_days: "Last 10 days"
last_30_days: "Last 30 days"
last_90_days: "Last 90 days"
last_year: "Last year"
all_time: "All Time"
custom_date_range: "Custom range"
custom_range_from: "From"
daily_update_scores_availability:
one: "%{count} daily recalculation left"
other: "%{count} daily recalculations left"
admin:
title: "Gamification"
name: "Name"
period: "Period"