Skip to content

Commit

Permalink
Add Italian Localization (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepanato authored Mar 16, 2024
1 parent 866fb17 commit 2f34a4b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A example configuration can be found [here](example.yaml)
- **invert_power_pin**(**Optional**: boolean): If set to `true` the output of the power pin will be inverted. Defaults to `false`.
- **power_trip_delay**(**Optional**: Time): Determines the length of the power outage applied to the display unit, which is to trick it into turning on. Defaults to `500ms`.
- **power_message_repetitions**(**Optional**: uint): Determines how many message repetitions are used while turning on the machine. On some hardware combinations a higher value such as `25` is required to turn on the display successfully. Defaults to `5`.
- **language**(**Optional**: int): Status sensor language. Select one of `en-US`, `de-DE`. Defaults to `en-US`.
- **language**(**Optional**: int): Status sensor language. Select one of `en-US`, `de-DE`, `it-IT`. Defaults to `en-US`.
- **model**(**Optional**: int): Different models or revisions may use different commands. This option can be used to specify the command set used by this component. Select one of `EP_2220`, `EP_2235`, `EP_3243`, `EP_3246`. Defaults to `EP_2220`.

## Philips Power switch
Expand Down
1 change: 1 addition & 0 deletions components/philips_coffee_machine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
LANGUAGES = {
"en-US": "PHILIPS_COFFEE_LANG_en_US",
"de-DE": "PHILIPS_COFFEE_LANG_de_DE",
"it-IT": "PHILIPS_COFFEE_LANG_it_IT",
}

philips_coffee_machine_ns = cg.esphome_ns.namespace("philips_coffee_machine")
Expand Down
50 changes: 49 additions & 1 deletion components/philips_coffee_machine/localization.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,54 @@ namespace esphome

const std::string state_steam_selected = "Dampf ausgewählt";
const std::string state_steam_brewing = "Bereitet Dampf zu";

#elif defined(PHILIPS_COFFEE_LANG_it_IT)
const std::string state_unknown = "Sconosciuto";
const std::string state_off = "Spento";
const std::string state_idle = "In Attesa";
const std::string state_cleaning = "Pulizia";
const std::string state_preparing = "Preparazione";
const std::string state_water_empty = "Serbatoio Acqua Vuoto";
const std::string state_waste_warning = "Attenzione Contenitore Fondi Caffè";
const std::string state_error = "Errore";

const std::string state_ground_coffee_selected = "Selezionato Caffè Premacinato";
const std::string state_coffee_programming_mode = "Selezionata Modalità programmazione Caffè";
const std::string state_coffee_selected = "Selezionato Caffè";
const std::string state_coffee_2x_selected = "Selezionati 2 Caffè";
const std::string state_coffee_brewing = "Erogazione Caffè";
const std::string state_coffee_2x_brewing = "Erogazione 2 Caffè";

const std::string state_ground_espresso_selected = "Selezionate Espresso Premacinato";
const std::string state_espresso_programming_mode = "Selezionata Modalità programmazione Espresso";
const std::string state_espresso_selected = "Selezionato Espresso";
const std::string state_espresso_2x_selected = "Selezionat1 2 Espressi";
const std::string state_espresso_brewing = "Erogazione Espresso";
const std::string state_espresso_2x_brewing = "Erogazione 2 Espressi";

const std::string state_ground_americano_selected = "Selezionato Americano Premacinato";
const std::string state_americano_programming_mode = "Selezionata Modalità programmazione Americano";
const std::string state_americano_selected = "Selezionato Americano";
const std::string state_americano_2x_selected = "Selezionati 2 Americani";
const std::string state_americano_brewing = "Erogazione Americano";
const std::string state_americano_2x_brewing = "Erogazione 2 Americani";

const std::string state_ground_cappuccino_selected = "Selezionato Cappuccino Premacinato";
const std::string state_cappuccino_programming_mode = "Selezionata Modalità programmazione Cappuccino";
const std::string state_cappuccino_selected = "Selezionato Cappuccino";
const std::string state_cappuccino_brewing = "Erogazione Cappuccino";

const std::string state_ground_latte_selected = "Selezionato Latte Macchiato Premacinato";
const std::string state_latte_programming_mode = "Selezionata Modalità programmazione Latte Macchiato";
const std::string state_latte_selected = "Selezionato Latte Macchiato";
const std::string state_latte_brewing = "Erogazione Latte Macchiato";

const std::string state_hot_water_programming_mode = "Selezionata Modalità programmazione Acqua Calda";
const std::string state_hot_water_selected = "Selezionata Acqua Calda";
const std::string state_hot_water_brewing = "Erogazione Acqua Calda";

const std::string state_steam_selected = "Vapore Selezionato";
const std::string state_steam_brewing = "Erogazione Vapore";
#else
#define PHILIPS_COFFEE_LANG_DEFAULT
#endif
Expand Down Expand Up @@ -107,4 +155,4 @@ namespace esphome
const std::string state_steam_brewing = "Making Steam";
#endif
} // namespace philips_coffee_machine
} // namespace esphome
} // namespace esphome

0 comments on commit 2f34a4b

Please sign in to comment.