From 878d5348067bfa7410c5e51d32c62b3455e2933c Mon Sep 17 00:00:00 2001 From: matteopolak Date: Tue, 2 Jul 2024 21:48:13 -0400 Subject: [PATCH] feat: add localization for relative_ratios --- crates/database/src/schema.rs | 265 ++++++++++++++++++---------------- locale/cs.ftl | 46 ++++++ locale/en-US.ftl | 46 ++++++ 3 files changed, 235 insertions(+), 122 deletions(-) diff --git a/crates/database/src/schema.rs b/crates/database/src/schema.rs index e7b714f0..aec9d195 100644 --- a/crates/database/src/schema.rs +++ b/crates/database/src/schema.rs @@ -1,163 +1,184 @@ +// @generated automatically by Diesel CLI. + diesel::table! { - autocomplete (id) { - id -> Uuid, - #[max_length = 16] - name -> Varchar, - searches -> Int4, - } + autocomplete (id) { + id -> Uuid, + #[max_length = 16] + name -> Varchar, + searches -> Int4, + } } diesel::table! { - bazaar (id) { - id -> Int4, - item_id -> Int2, - sell_price -> Float8, - sell_volume -> Int4, - sell_orders -> Int4, - buy_price -> Float8, - buy_volume -> Int4, - buy_orders -> Int4, - created_at -> Timestamptz, - } + bazaar (id) { + id -> Int4, + item_id -> Int2, + sell_price -> Float8, + sell_volume -> Int4, + sell_orders -> Int4, + buy_price -> Float8, + buy_volume -> Int4, + buy_orders -> Int4, + created_at -> Timestamptz, + } } diesel::table! { - bazaar_item (id) { - id -> Int2, - name -> Text, - } + bazaar_item (id) { + id -> Int2, + name -> Text, + } } diesel::table! { - boost (user_id, guild_id) { - user_id -> Int8, - guild_id -> Int8, - created_at -> Timestamptz, - } + boost (user_id, guild_id) { + user_id -> Int8, + guild_id -> Int8, + created_at -> Timestamptz, + } } diesel::table! { - guild_autocomplete (uuid) { - uuid -> Uuid, - #[max_length = 32] - name -> Varchar, - xp -> Int4, - searches -> Int4, - } + guild_autocomplete (uuid) { + uuid -> Uuid, + #[max_length = 32] + name -> Varchar, + xp -> Int4, + searches -> Int4, + } } diesel::table! { - guild_schedule (uuid) { - uuid -> Uuid, - snapshots -> Int4, - hash -> Int8, - prev_hash -> Nullable, - update_at -> Timestamptz, - created_at -> Timestamptz, - } + guild_schedule (uuid) { + uuid -> Uuid, + snapshots -> Int4, + hash -> Int8, + prev_hash -> Nullable, + update_at -> Timestamptz, + created_at -> Timestamptz, + } } diesel::table! { - guild_snapshot (id) { - id -> Int8, - uuid -> Uuid, - hash -> Int8, - did_update -> Bool, - data -> Bytea, - created_at -> Timestamptz, - updated_at -> Timestamptz, - days_since_epoch -> Int4, - version -> Int2, - trusted -> Bool, - } + guild_snapshot (id) { + id -> Int8, + uuid -> Uuid, + hash -> Int8, + did_update -> Bool, + data -> Bytea, + created_at -> Timestamptz, + updated_at -> Timestamptz, + days_since_epoch -> Int4, + version -> Int2, + trusted -> Bool, + } } diesel::table! { - metric (id) { - id -> Int4, - discord_id -> Int8, - kind -> Int2, - created_at -> Timestamptz, - } + metric (id) { + id -> Int4, + discord_id -> Int8, + kind -> Int2, + created_at -> Timestamptz, + } } diesel::table! { - schedule (uuid) { - uuid -> Uuid, - update_at -> Timestamptz, - created_at -> Timestamptz, - snapshots -> Int4, - hash -> Int8, - prev_hash -> Nullable, - weekly_schedule -> Int4, - active_at -> Timestamptz, - vendor_update_at -> Nullable, - vendor_hash -> Nullable, - vendor_prev_hash -> Nullable, - } + schedule (uuid) { + uuid -> Uuid, + update_at -> Timestamptz, + created_at -> Timestamptz, + snapshots -> Int4, + hash -> Int8, + prev_hash -> Nullable, + weekly_schedule -> Int4, + active_at -> Timestamptz, + vendor_update_at -> Nullable, + vendor_hash -> Nullable, + vendor_prev_hash -> Nullable, + } } diesel::table! { - session (id) { - id -> Uuid, - snapshot_id -> Int8, - user_id -> Int8, - uuid -> Uuid, - kind -> Int2, - created_at -> Timestamptz, - name -> Nullable, - } + session (id) { + id -> Uuid, + snapshot_id -> Int8, + user_id -> Int8, + uuid -> Uuid, + kind -> Int2, + created_at -> Timestamptz, + name -> Nullable, + } } diesel::table! { - snapshot (id) { - uuid -> Uuid, - created_at -> Timestamptz, - updated_at -> Timestamptz, - id -> Int8, - data -> Bytea, - did_update -> Bool, - hash -> Int8, - version -> Int2, - trusted -> Bool, - } + snapshot (id) { + uuid -> Uuid, + created_at -> Timestamptz, + updated_at -> Timestamptz, + id -> Int8, + data -> Bytea, + did_update -> Bool, + hash -> Int8, + version -> Int2, + trusted -> Bool, + } } diesel::table! { - track (channel_id, uuid, user_id) { - user_id -> Int8, - guild_id -> Nullable, - channel_id -> Int8, - uuid -> Uuid, - state -> Int2, - created_at -> Timestamptz, - } + track (channel_id, uuid, user_id) { + user_id -> Int8, + guild_id -> Nullable, + channel_id -> Int8, + uuid -> Uuid, + state -> Int2, + created_at -> Timestamptz, + } } diesel::table! { - usage (user_id, command_name) { - user_id -> Int8, - command_name -> Text, - count -> Int4, - } + usage (user_id, command_name) { + user_id -> Int8, + command_name -> Text, + count -> Int4, + } } diesel::table! { - user (id) { - id -> Int8, - uuid -> Nullable, - updated_at -> Timestamptz, - created_at -> Timestamptz, - display -> Int2, - #[max_length = 4] - suffix -> Nullable, - colour -> Nullable, - votes -> Int2, - tracks -> Int2, - max_tracks -> Int2, - premium_until -> Nullable, - boosts -> Int2, - max_boosts -> Int2, - font -> Int2, - } + user (id) { + id -> Int8, + uuid -> Nullable, + updated_at -> Timestamptz, + created_at -> Timestamptz, + display -> Int2, + #[max_length = 4] + suffix -> Nullable, + colour -> Nullable, + votes -> Int2, + tracks -> Int2, + max_tracks -> Int2, + premium_until -> Nullable, + boosts -> Int2, + max_boosts -> Int2, + font -> Int2, + } } + +diesel::joinable!(bazaar -> bazaar_item (item_id)); + +diesel::allow_tables_to_appear_in_same_query!( + autocomplete, + bazaar, + bazaar_item, + boost, + guild_autocomplete, + guild_schedule, + guild_snapshot, + metric, + schedule, + session, + snapshot, + track, + usage, + user, +); diff --git a/locale/cs.ftl b/locale/cs.ftl index c09965e5..e365e56a 100644 --- a/locale/cs.ftl +++ b/locale/cs.ftl @@ -2705,6 +2705,8 @@ session-list = seznam .page-description = Stránka k zobrazení arcade-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Arcade hráče od zahájení relace .session = relace .session-description = ID relace @@ -2712,6 +2714,8 @@ arcade-session = relace .mode-description = Režim Arcade k zobrazení arena-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Arény hráče od zahájení relace .session = relace .session-description = ID relace @@ -2719,6 +2723,8 @@ arena-session = relace .mode-description = Režim Arény k zobrazení bedwars-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Bed Wars hráče od zahájení relace .session = relace .session-description = ID relace @@ -2726,6 +2732,8 @@ bedwars-session = relace .mode-description = Režim Bed Wars k zobrazení blitz-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Blitz Survival Games hráče od zahájení relace .session = relace .session-description = ID relace @@ -2733,6 +2741,8 @@ blitz-session = relace .mode-description = Režim Blitz Survival Games k zobrazení buildbattle-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Build Battle hráče od zahájení relace .session = relace .session-description = ID relace @@ -2740,6 +2750,8 @@ buildbattle-session = relace .mode-description = Režim Build Battle k zobrazení copsandcrims-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Cops and Crims hráče od zahájení relace .session = relace .session-description = ID relace @@ -2747,6 +2759,8 @@ copsandcrims-session = relace .mode-description = Režim Cops and Crims k zobrazení duels-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Duels hráče od zahájení relace .session = relace .session-description = ID relace @@ -2754,6 +2768,8 @@ duels-session = relace .mode-description = Režim Duels k zobrazení megawalls-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Mega Walls hráče od zahájení relace .session = relace .session-description = ID relace @@ -2761,6 +2777,8 @@ megawalls-session = relace .mode-description = Režim Mega Walls k zobrazení murdermystery-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Murder Mystery hráče od zahájení relace .session = relace .session-description = ID relace @@ -2768,6 +2786,8 @@ murdermystery-session = relace .mode-description = Režim Murder Mystery k zobrazení paintball-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Paintball hráče od zahájení relace .session = relace .session-description = ID relace @@ -2775,6 +2795,8 @@ paintball-session = relace .mode-description = Režim Paintball k zobrazení pit-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu The Pit hráče od zahájení relace .session = relace .session-description = ID relace @@ -2782,6 +2804,8 @@ pit-session = relace .mode-description = Režim The Pit k zobrazení quake-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Quakecraft hráče od zahájení relace .session = relace .session-description = ID relace @@ -2789,6 +2813,8 @@ quake-session = relace .mode-description = Režim Quakecraft k zobrazení skywars-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu SkyWars hráče od zahájení relace .session = relace .session-description = ID relace @@ -2796,6 +2822,8 @@ skywars-session = relace .mode-description = Režim SkyWars k zobrazení smash-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Smash Heroes hráče od zahájení relace .session = relace .session-description = ID relace @@ -2803,6 +2831,8 @@ smash-session = relace .mode-description = Režim Smash Heroes k zobrazení speeduhc-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu SpeedUHC hráče od zahájení relace .session = relace .session-description = ID relace @@ -2810,6 +2840,8 @@ speeduhc-session = relace .mode-description = Režim SpeedUHC k zobrazení tntgames-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu TNT Games hráče od zahájení relace .session = relace .session-description = ID relace @@ -2817,6 +2849,8 @@ tntgames-session = relace .mode-description = Režim TNT Games k zobrazení turbokartracers-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Turbo Kart Racers hráče od zahájení relace .session = relace .session-description = ID relace @@ -2824,6 +2858,8 @@ turbokartracers-session = relace .mode-description = Režim Turbo Kart Racers k zobrazení uhc-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu UHC Champions hráče od zahájení relace .session = relace .session-description = ID relace @@ -2831,6 +2867,8 @@ uhc-session = relace .mode-description = Režim UHC Champions k zobrazení vampirez-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu VampireZ hráče od zahájení relace .session = relace .session-description = ID relace @@ -2838,6 +2876,8 @@ vampirez-session = relace .mode-description = Režim VampireZ k zobrazení walls-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu The Walls hráče od zahájení relace .session = relace .session-description = ID relace @@ -2845,6 +2885,8 @@ walls-session = relace .mode-description = Režim The Walls k zobrazení warlords-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Warlords hráče od zahájení relace .session = relace .session-description = ID relace @@ -2852,6 +2894,8 @@ warlords-session = relace .mode-description = Režim Warlords k zobrazení woolwars-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup v režimu Wool Wars hráče od zahájení relace .session = relace .session-description = ID relace @@ -2922,6 +2966,8 @@ fishing-monthly = měsíčně .mode-description = Režim rybaření k zobrazení fishing-session = relace + .relative-ratios = relativní poměry + .relative-ratios-description = Zda zobrazit relativní poměry .description = Zobrazit postup rybaření hráče od zahájení relace .session = relace .session-description = ID relace diff --git a/locale/en-US.ftl b/locale/en-US.ftl index 3d24c99c..7d5600ea 100644 --- a/locale/en-US.ftl +++ b/locale/en-US.ftl @@ -2893,6 +2893,8 @@ session-list = list .page-description = The page to view arcade-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Arcade progression of a player since the session started .session = session .session-description = A session id @@ -2900,6 +2902,8 @@ arcade-session = session .mode-description = The Arcade mode to view arena-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Arena progression of a player since the session started .session = session .session-description = A session id @@ -2907,6 +2911,8 @@ arena-session = session .mode-description = The Arena mode to view bedwars-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Bed Wars progression of a player since the session started .session = session .session-description = A session id @@ -2914,6 +2920,8 @@ bedwars-session = session .mode-description = The Bed Wars mode to view blitz-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Blitz Survival Games progression of a player since the session started .session = session .session-description = A session id @@ -2921,6 +2929,8 @@ blitz-session = session .mode-description = The Blitz Survival Games mode to view buildbattle-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Build Battle progression of a player since the session started .session = session .session-description = A session id @@ -2928,6 +2938,8 @@ buildbattle-session = session .mode-description = The Build Battle mode to view copsandcrims-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Cops and Crims progression of a player since the session started .session = session .session-description = A session id @@ -2935,6 +2947,8 @@ copsandcrims-session = session .mode-description = The Cops and Crims mode to view duels-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Duels progression of a player since the session started .session = session .session-description = A session id @@ -2942,6 +2956,8 @@ duels-session = session .mode-description = The Duels mode to view megawalls-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Mega Walls progression of a player since the session started .session = session .session-description = A session id @@ -2949,6 +2965,8 @@ megawalls-session = session .mode-description = The Mega Walls mode to view murdermystery-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Murder Mystery progression of a player since the session started .session = session .session-description = A session id @@ -2956,6 +2974,8 @@ murdermystery-session = session .mode-description = The Murder Mystery mode to view paintball-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Paintball progression of a player since the session started .session = session .session-description = A session id @@ -2963,6 +2983,8 @@ paintball-session = session .mode-description = The Paintball mode to view pit-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show The Pit progression of a player since the session started .session = session .session-description = A session id @@ -2970,6 +2992,8 @@ pit-session = session .mode-description = The Pit mode to view quake-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Quakecraft progression of a player since the session started .session = session .session-description = A session id @@ -2977,6 +3001,8 @@ quake-session = session .mode-description = The Quakecraft mode to view skywars-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the SkyWars progression of a player since the session started .session = session .session-description = A session id @@ -2984,6 +3010,8 @@ skywars-session = session .mode-description = The SkyWars mode to view smash-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Smash Heroes progression of a player since the session started .session = session .session-description = A session id @@ -2991,6 +3019,8 @@ smash-session = session .mode-description = The Smash Heroes mode to view speeduhc-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the SpeedUHC progression of a player since the session started .session = session .session-description = A session id @@ -2998,6 +3028,8 @@ speeduhc-session = session .mode-description = The SpeedUHC mode to view tntgames-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the TNT Games progression of a player since the session started .session = session .session-description = A session id @@ -3005,6 +3037,8 @@ tntgames-session = session .mode-description = The TNT Games mode to view turbokartracers-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Turbo Kart Racers progression of a player since the session started .session = session .session-description = A session id @@ -3012,6 +3046,8 @@ turbokartracers-session = session .mode-description = The Turbo Kart Racers mode to view uhc-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the UHC Champions progression of a player since the session started .session = session .session-description = A session id @@ -3019,6 +3055,8 @@ uhc-session = session .mode-description = The UHC Champions mode to view vampirez-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the VampireZ progression of a player since the session started .session = session .session-description = A session id @@ -3026,6 +3064,8 @@ vampirez-session = session .mode-description = The VampireZ mode to view walls-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show The Walls progression of a player since the session started .session = session .session-description = A session id @@ -3033,6 +3073,8 @@ walls-session = session .mode-description = The Walls mode to view warlords-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Warlords progression of a player since the session started .session = session .session-description = A session id @@ -3040,6 +3082,8 @@ warlords-session = session .mode-description = The Warlords mode to view woolwars-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Wool Wars progression of a player since the session started .session = session .session-description = A session id @@ -3118,6 +3162,8 @@ fishing-monthly = monthly .mode-description = The Fishing mode to view fishing-session = session + .relative-ratios = relative-ratios + .relative-ratios-description = Whether to display relative ratios .description = Show the Fishing progression of a player since the session started .session = session .session-description = A session id