From 676d60be175de08f11e359dec634ee2b9c02892a Mon Sep 17 00:00:00 2001 From: Ben Varick Date: Sun, 28 Jan 2024 14:43:00 -0600 Subject: [PATCH] edited spanish translations --- laundry_longterm_data_es.Rmd | 2 +- laundry_status.R | 10 +++++----- laundry_status_es.Rmd | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/laundry_longterm_data_es.Rmd b/laundry_longterm_data_es.Rmd index 7ece9ca..72a58d1 100644 --- a/laundry_longterm_data_es.Rmd +++ b/laundry_longterm_data_es.Rmd @@ -1,5 +1,5 @@ --- -title: "Datos a Largo Plazo" +title: "Datos a largo plazo" output: html_document: includes: diff --git a/laundry_status.R b/laundry_status.R index d0a557c..a80d07e 100755 --- a/laundry_status.R +++ b/laundry_status.R @@ -171,7 +171,7 @@ update_data <- function(){ height = 0.5, fill = status)) + scale_y_discrete(breaks = entities$entity_id, labels = entities$name_es) + - scale_x_datetime(breaks = seq(round_date(max(values$end_time), "4 hours") - hours(24), round_date(max(values$end_time), "4 hours"), by = "4 hours"), date_labels = '%I:%M %p', date_minor_breaks = "1 hours") + + scale_x_datetime(breaks = seq(round_date(max(values$end_time), "4 hours") - hours(24), round_date(max(values$end_time), "4 hours"), by = "4 hours"), date_labels = '%H:%M', date_minor_breaks = "1 hours") + scale_fill_manual(values = colors$color) + theme(axis.text.x = element_text(angle = 30, vjust = 0.5)) + labs(title = "Hace 24 horas", @@ -190,12 +190,12 @@ update_data <- function(){ ymax = ymd_hms(paste("2023-01-01", strftime(end_time, format = "%H:%M:%S"))), fill = status)) + facet_grid(name ~ .) + - scale_y_datetime(date_breaks = "4 hours", date_labels = '%I:%M %p', minor_breaks = "2 hours", expand = expansion(mult = 0)) + + scale_y_datetime(date_breaks = "4 hours", date_labels = '%H:%M', minor_breaks = "2 hours", expand = expansion(mult = 0)) + scale_x_datetime(date_breaks = "1 day", date_labels = '%A', minor_breaks = NULL) + scale_fill_manual(values = colors$color) + theme(axis.text.x = element_text(angle = 30, vjust = 0.5)) + labs(title = "La semana pasada", - x = "Dia", + x = "Día", y = "Tiempo", fill = NULL) @@ -284,12 +284,12 @@ update_longterm_data <- function(){ alpha = count, fill = status)) + facet_grid(name ~ .) + - scale_y_datetime(date_breaks = "4 hours", date_labels = '%I:%M %p', minor_breaks = "2 hours", expand = expansion(mult = 0)) + + scale_y_datetime(date_breaks = "4 hours", date_labels = '%H:%M', minor_breaks = "2 hours", expand = expansion(mult = 0)) + scale_x_discrete() + scale_fill_manual(values = colors$color[2], guide = NULL) + theme(axis.text.x = element_text(angle = 30, vjust = 0.5)) + labs(title = "Tendencias a largo plazo", - subtitle = paste0("datos del ",strftime(min(values$time), format = "%B %d, %Y"), " al ", strftime(run_time, format = "%B %d, %Y")), + subtitle = paste0("datos desde ",strftime(min(values$time), format = "%d de %B de %Y"), " hasta ", strftime(run_time, format = "%d de %B de %Y")), x = "Día de la semana", y = "Tiempo", alpha = "Frecuencia") diff --git a/laundry_status_es.Rmd b/laundry_status_es.Rmd index 69572ec..77559cf 100644 --- a/laundry_status_es.Rmd +++ b/laundry_status_es.Rmd @@ -17,7 +17,7 @@ In [English](https://laundry.dendroalsia.net/) ## la lavadora está `r current_status$washing_machine_power_es` -la lavadora `r ifelse(current_status$washing_machine_power=="on", "inició", "terminó")` su último ciclo a las `r ifelse(current_status$washing_machine_power=="on", strftime(last_change$washing_machine_power_off, format = "%A %I:%M %p", tz = "America/Chicago"), strftime(last_change$washing_machine_power_on, format = "%A %I:%M %p", tz = "America/Chicago"))` +la lavadora `r ifelse(current_status$washing_machine_power=="on", "inició", "terminó")` su último ciclo `r ifelse(current_status$washing_machine_power=="on", strftime(last_change$washing_machine_power_off, format = "%A a las %H:%M", tz = "America/Chicago"), strftime(last_change$washing_machine_power_on, format = "%A a las %H:%M", tz = "America/Chicago"))` : `r ifelse(current_status$washing_machine_power=="on", calculateTimeAgo_es(last_change$washing_machine_power_off), calculateTimeAgo_es(last_change$washing_machine_power_on))` @@ -28,7 +28,7 @@ la lavadora `r ifelse(current_status$washing_machine_power=="on", "inició", "te ## La secadora está `r current_status$dryer_power_es` -The dryer `r ifelse(current_status$dryer_power=="on", "inició", "terminó")` su último ciclo a las `r ifelse(current_status$dryer_power=="on", strftime(last_change$dryer_power_off, format = "%A %I:%M %p", tz = "America/Chicago"), strftime(last_change$dryer_power_on, format = "%A %I:%M %p", tz = "America/Chicago"))` +La secadora `r ifelse(current_status$dryer_power=="on", "inició", "terminó")` su último ciclo `r ifelse(current_status$dryer_power=="on", strftime(last_change$dryer_power_off, format = "%A a las %H:%M", tz = "America/Chicago"), strftime(last_change$dryer_power_on, format = "%A a las %H:%M", tz = "America/Chicago"))` : `r ifelse(current_status$dryer_power=="on", calculateTimeAgo_es(last_change$dryer_power_off), calculateTimeAgo_es(last_change$dryer_power_on))`