Skip to content

Commit

Permalink
feat: add back and front analytics hours for < 30d time ranges (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiroaisen authored Oct 7, 2023
2 parents 0ed199f + ea77c8b commit ff914ed
Show file tree
Hide file tree
Showing 12 changed files with 452 additions and 48 deletions.
5 changes: 2 additions & 3 deletions defs/analytics/Analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type { AnalyticsQueryKind } from "./AnalyticsQueryKind";
import type { AnalyticsStation } from "./AnalyticsStation";
import type { CountryCode } from "../CountryCode";
import type { DateTime } from "../DateTime";
import type { YearMonth } from "./YearMonth";
import type { YearMonthDay } from "./YearMonthDay";
import type { YearMonthDayHour } from "./YearMonthDayHour";

export type Analytics = {
is_now: boolean;
Expand All @@ -20,9 +20,8 @@ export type Analytics = {
total_transfer_bytes: number;
max_concurrent_listeners?: number;
max_concurrent_listeners_date?: DateTime;
by_month: Array<AnalyticsItem<YearMonth>>;
by_day: Array<AnalyticsItem<YearMonthDay>>;
by_hour: Array<AnalyticsItem<number>>;
by_hour: Array<AnalyticsItem<YearMonthDayHour>> | null;
by_browser: Array<AnalyticsItem<string | null>>;
by_os: Array<AnalyticsItem<string | null>>;
by_country: Array<AnalyticsItem<CountryCode | null>>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type YearMonth = { year: number; month: number };
export type YearMonthDayHour = {
year: number;
month: number;
day: number;
hour: number;
};
13 changes: 10 additions & 3 deletions front/server/src/locale/share/analytics/analytics.ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,27 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
// @example Date: 2022/01/01
"Date": "التاريخ",

// @example Hour: 2022/01/01 12:00
"Hour": "الساعة",

"Stats_by_browser": "الإحصائيات حسب المتصفح",
"Stats_by_device": "الإحصائيات حسب الجهاز",
"Stats_by_station": "الإحصائيات حسب المحطة",
"Stats_by_country": "الإحصائيات حسب الدولة",
"Stats_by_website": "الإحصائيات حسب الموقع الإلكتروني",
"Stats_by_date": "الإحصائيات حسب التاريخ",
"Stats_by_hour": "الإحصائيات حسب الساعة",

"By_date": "حسب التاريخ",
"By_hour": "حسب الساعة",
"By_country": "حسب الدولة",
"By_device": "حسب الجهاز",
"By_browser": "حسب المتصفح",
"By_station": "حسب المحطة",
"By_website": "حسب الموقع الإلكتروني",

"Daily_stats": "الإحصائيات اليومية",
"Hourly_stats": "الإحصائيات الساعية",

"no_data_message": "لا توجد بيانات مسجلة للفلاتر المحددة",

Expand All @@ -60,6 +66,7 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
"n_minutes": "@n دقائق",
"1_second": "1 ثانية",
"n_seconds": "@n ثواني",

/// @example 2 أيام و 1 ساعة
/// @example 1 ساعة و 2 دقائق
/// @example 10 دقائق و 3 ثواني
Expand All @@ -71,13 +78,13 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
"now": "الآن",
"today": "اليوم",
"yesterday": "أمس",
"last-24h": "آخر 24 ساعة",
"last-24h": "الـ 24 ساعة الماضية",
"this-week": "هذا الأسبوع",
"previous-week": "الأسبوع الماضي",
"last-7d": "آخر 7 أيام",
"last-7d": "الـ 7 أيام الماضية",
"this-month": "هذا الشهر",
"previous-month": "الشهر الماضي",
"last-30d": "آخر 30 يوم",
"last-30d": "الـ 30 يوم الماضية",
"custom": "مخصص",
},

Expand Down
8 changes: 7 additions & 1 deletion front/server/src/locale/share/analytics/analytics.de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,33 @@ const locale: import("./analytics.locale").AnalyticsLocale = {

"Website": "Webseite",

// @example Country: Argentina
// @example Coutry: Argentina
"Country": "Land",

// @example Date: 2022/01/01
"Date": "Datum",

// @example Hour: 2022/01/01 12:00
"Hour": "Stunde",

"Stats_by_browser": "Statistiken nach Browser",
"Stats_by_device": "Statistiken nach Gerät",
"Stats_by_station": "Statistiken nach Station",
"Stats_by_country": "Statistiken nach Land",
"Stats_by_website": "Statistiken nach Webseite",
"Stats_by_date": "Statistiken nach Datum",
"Stats_by_hour": "Statistiken nach Stunde",

"By_date": "Nach Datum",
"By_hour": "Nach Stunde",
"By_country": "Nach Land",
"By_device": "Nach Gerät",
"By_browser": "Nach Browser",
"By_station": "Nach Station",
"By_website": "Nach Webseite",

"Daily_stats": "Tägliche Statistiken",
"Hourly_stats": "Stündliche Statistiken",

"no_data_message": "Es sind keine Daten für die angegebenen Filter vorhanden",

Expand Down
6 changes: 6 additions & 0 deletions front/server/src/locale/share/analytics/analytics.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,27 @@ const locale = {
// @example Date: 2022/01/01
"Date": "Date",

// @example Hour: 2022/01/01 12:00
"Hour": "Hour",


"Stats_by_browser": "Stats by browser",
"Stats_by_device": "Stats by device",
"Stats_by_station": "Stats by station",
"Stats_by_country": "Stats by country",
"Stats_by_date": "Stats by date",
"Stats_by_hour": "Stats by hour",
"Stats_by_website": "Stats_by_website",

"By_date": "By date",
"By_hour": "By hour",
"By_country": "By country",
"By_device": "By device",
"By_browser": "By browser",
"By_station": "By station",
"By_website": "By website",
"Daily_stats": "Daily stats",
"Hourly_stats": "Hourly stats",

"no_data_message": "There's no data recorded for the specified filters",

Expand Down
6 changes: 6 additions & 0 deletions front/server/src/locale/share/analytics/analytics.es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,27 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
// @example Date: 2022/01/01
"Date": "Fecha",

// @example Hour: 2022/01/01 12:00
"Hour": "Hora",

"Stats_by_browser": "Estadísticas por navegador",
"Stats_by_device": "Estadísticas por dispositivo",
"Stats_by_station": "Estadísticas por estación",
"Stats_by_country": "Estadísticas por país",
"Stats_by_website": "Estadisticas por sitio web",
"Stats_by_date": "Estadísticas por fecha",
"Stats_by_hour": "Estadísticas por hora",

"By_date": "Por fecha",
"By_hour": "Por hora",
"By_country": "Por país",
"By_device": "Por dispositivo",
"By_browser": "Por navegador",
"By_station": "Por estación",
"By_website": "Por sitio web",

"Daily_stats": "Estadísticas diarias",
"Hourly_stats": "Estadísticas por hora",

"no_data_message": "No hay datos registrados para los filtros especificados",

Expand Down
8 changes: 7 additions & 1 deletion front/server/src/locale/share/analytics/analytics.fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,27 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
// @example Date: 2022/01/01
"Date": "Date",

// @example Hour: 2022/01/01 12:00
"Hour": "Heure",

"Stats_by_browser": "Statistiques par navigateur",
"Stats_by_device": "Statistiques par appareil",
"Stats_by_station": "Statistiques par station",
"Stats_by_country": "Statistiques par pays",
"Stats_by_website": "Statistiques par site web",
"Stats_by_date": "Statistiques par date",
"Stats_by_hour": "Statistiques par heure",

"By_date": "Par date",
"By_hour": "Par heure",
"By_country": "Par pays",
"By_device": "Par appareil",
"By_browser": "Par navigateur",
"By_station": "Par station",
"By_website": "Par site web",

"Daily_stats": "Statistiques quotidiennes",
"Hourly_stats": "Statistiques horaires",

"no_data_message": "Aucune donnée enregistrée pour les filtres spécifiés",

Expand Down Expand Up @@ -85,7 +91,7 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
"submit": "Obtenir des analyses",

"All_stations": "Toutes les stations",
"No_stations": "Sans stations",
"No_stations": "Pas de stations",

"no_stations_message": "Ce compte n'a pas de stations",
},
Expand Down
8 changes: 7 additions & 1 deletion front/server/src/locale/share/analytics/analytics.it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,33 @@ const locale: import("./analytics.locale").AnalyticsLocale = {

"Website": "Sito web",

// @example Country: Italy
// @example Coutry: Argentina
"Country": "Paese",

// @example Date: 2022/01/01
"Date": "Data",

// @example Hour: 2022/01/01 12:00
"Hour": "Ora",

"Stats_by_browser": "Statistiche per browser",
"Stats_by_device": "Statistiche per dispositivo",
"Stats_by_station": "Statistiche per stazione",
"Stats_by_country": "Statistiche per paese",
"Stats_by_website": "Statistiche per sito web",
"Stats_by_date": "Statistiche per data",
"Stats_by_hour": "Statistiche per ora",

"By_date": "Per data",
"By_hour": "Per ora",
"By_country": "Per paese",
"By_device": "Per dispositivo",
"By_browser": "Per browser",
"By_station": "Per stazione",
"By_website": "Per sito web",

"Daily_stats": "Statistiche giornaliere",
"Hourly_stats": "Statistiche orarie",

"no_data_message": "Non ci sono dati registrati per i filtri specificati",

Expand Down
6 changes: 6 additions & 0 deletions front/server/src/locale/share/analytics/analytics.pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,27 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
// @example Date: 2022/01/01
"Date": "Data",

// @example Hour: 2022/01/01 12:00
"Hour": "Hora",

"Stats_by_browser": "Estatísticas por navegador",
"Stats_by_device": "Estatísticas por dispositivo",
"Stats_by_station": "Estatísticas por estação",
"Stats_by_country": "Estatísticas por país",
"Stats_by_website": "Estatísticas por site",
"Stats_by_date": "Estatísticas por data",
"Stats_by_hour": "Estatísticas por hora",

"By_date": "Por data",
"By_hour": "Por hora",
"By_country": "Por país",
"By_device": "Por dispositivo",
"By_browser": "Por navegador",
"By_station": "Por estação",
"By_website": "Por site",

"Daily_stats": "Estatísticas diárias",
"Hourly_stats": "Estatísticas por hora",

"no_data_message": "Não há dados registrados para os filtros especificados",

Expand Down
26 changes: 16 additions & 10 deletions front/server/src/locale/share/analytics/analytics.zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
"Sessions": "会话",
"Listeners": "听众",
"Unique_IPs": "唯一的IP",
"Average_listening_minutes": "平均收听分钟数",
"Average_listening_minutes": "平均收听分钟",
"Average_listening_time": "平均收听时间",
"Total_listening_time": "总收听时间",
"Total_listening_hours": "总收听小时数",
"Total_transfer": "总传输量",
"Total_listening_hours": "总收听小时",
"Total_transfer": "总传输",
"Total_transfer_in_MB": "总传输量(MB)",
"Max_concurrent_listeners": "最大并发听众数",
"Max_concurrent_listeners": "最大并发听众",

// @example Browser: Chrome
"Browser": "浏览器",
Expand All @@ -33,21 +33,27 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
// @example Date: 2022/01/01
"Date": "日期",

// @example Hour: 2022/01/01 12:00
"Hour": "小时",

"Stats_by_browser": "按浏览器统计",
"Stats_by_device": "按设备统计",
"Stats_by_station": "按电台统计",
"Stats_by_country": "按国家统计",
"Stats_by_website": "按网站统计",
"Stats_by_date": "按日期统计",
"Stats_by_hour": "按小时统计",

"By_date": "按日期",
"By_hour": "按小时",
"By_country": "按国家",
"By_device": "按设备",
"By_browser": "按浏览器",
"By_station": "按电台",
"By_website": "按网站",

"Daily_stats": "每日统计",
"Hourly_stats": "每小时统计",

"no_data_message": "没有找到指定过滤器的数据",

Expand All @@ -61,9 +67,9 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
"1_second": "1秒",
"n_seconds": "@n秒",

/// @example 2 días y 1 hora
/// @example 1 hora y 2 minutos
/// @example 10 minutos y 3 segundos
/// @example 2天和1小时
/// @example 1小时和2分钟
/// @example 10分钟和3秒
"join": "@time1和@time2",
},

Expand All @@ -77,7 +83,7 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
"previous-week": "上周",
"last-7d": "最近7天",
"this-month": "本月",
"previous-month": "上月",
"previous-month": "上个月",
"last-30d": "最近30天",
"custom": "自定义",
},
Expand All @@ -95,8 +101,8 @@ const locale: import("./analytics.locale").AnalyticsLocale = {
},

"Search...": "搜索...",
"No_stations_for_this_query": "此查询未找到电台",
"This_field_is_required": "此字段为必填项",
"No_stations_for_this_query": "此查询没有找到电台",
"This_field_is_required": "此字段是必需的",
}

export default locale;
Loading

0 comments on commit ff914ed

Please sign in to comment.