~aleteoryx/muditaos

7ddf723f93ddcbba5fd7c253b51dd77cd67e5fee — patrycja-paczkowska 3 years ago abdf9b7
[BH-1599][BH-1573] Shortcuts translations

Add and fix shortcuts translations.
Fix translations in Meditation app settings.
M image/assets/lang/Deutsch.json => image/assets/lang/Deutsch.json +16 -5
@@ 80,8 80,8 @@
  "common_minutes_lower": "minuten",
  "common_minutes_lower_genitive": "minuten",
  "common_minute_short": "min",
  "common_second_lower": "zweite",
  "common_seconds_lower": "zweites",
  "common_second_lower": "sekunde",
  "common_seconds_lower": "sekunden",
  "common_paused": "Pausiert",
  "common_text_copy": "Text kopieren",
  "common_text_paste": "Text einfügen",


@@ 587,7 587,7 @@
  "app_meditation_put_down_phone_and_wait": "<text>Legen Sie das Telefon weg<br>und warten Sie auf den Gong.</text>",
  "app_meditation_thank_you_for_session": "<text>Danke für diese<br>Meditationseinheit.</text>",
  "app_meditation_option_show_counter": "Meditationszähler zeigen",
  "app_meditation_interval_chime": "Intervallton",
  "app_meditation_interval_chime": "Glocken-Intervall",
  "app_meditation_interval_none": "Keiner",
  "app_meditation_interval_every_x_minutes": "Alle %0 Minuten",
  "app_meditation_minute": "MINUTE",


@@ 638,7 638,6 @@
  "app_bell_settings_time_units_time_fmt_top_message": "Zeitformat",
  "app_bell_settings_time_units_time_message": "Zeit",
  "app_bell_settings_temp_scale": "Temperaturskala",
  "app_bell_onboarding_welcome": "Willkommen",
  "app_bellmain_home_screen_bottom_desc_dp": "Tief drücken, um zu aktivieren",
  "app_bellmain_home_screen_bottom_desc": "Der nächste Alarm klingelt",
  "app_bellmain_home_screen_bottom_desc_in": "in",


@@ 655,10 654,22 @@
  "app_bell_relaxation_timer_title": "Timer",
  "app_bell_relaxation_timer_off": "AUS",
  "app_bell_onboarding_welcome_message": "<text>Mudita Harmony<br/>ist ausgeschaltet</text>",
  "app_bell_onboarding_info_rotate": "<text weight='regular' size='38'>Drehen </text><text weight='light' size='38'> um auszuwählen</text>",
  "app_bell_onboarding_info_rotate": "<text weight='regular' size='38'>Drehen </text><text weight='light' size='38'>um auszuwählen</text>",
  "app_bell_onboarding_info_light_click": "<text weight='regular' size='38'>Leichter Klick </text><text weight='light' size='38'>um fortzufahren</text>",
  "app_bell_onboarding_info_deep_click_warning": "<text weight='light' size='38'>Sie haben </text><text weight='regular' size='38'>tief gedrückt</text>",
  "app_bell_onboarding_info_deep_click_correction": "<text weight='light' size='38'>Seien Sie sanfter,<br></br>versuchen </text><text weight='regular' size='38'>Sie diesmal </text><text weight='light' size='38'>leicht klicken</text>",
  "app_bell_onboarding_welcome": "Willkommen",
  "app_bell_onboarding_shortcuts_question": "Möchten Sie sich die Anleitung für die Kurzbefehle ansehen?",
  "app_bell_onboarding_shortcuts_start": "Start",
  "app_bell_onboarding_shortcuts_skip": "Überspringen",
  "app_bell_onboarding_shortcuts_step_rotate": "Zum Auswählen drehen",
  "app_bell_onboarding_shortcuts_step_light_click": "Zum Akzeptieren und Fortfahren sanft klicken",
  "app_bell_onboarding_shortcuts_step_deep_press": "Zum Aktivieren oder Deaktivieren des Alarms tief eindrücken",
  "app_bell_onboarding_shortcuts_step_home": "Rückseite 2 Sek. drücken, um zurückzukehren",
  "app_bell_onboarding_shortcuts_step_battery": "Batteriestatus: Rückseite im Hauptbildschirm 2 Sek. drücken",
  "app_bell_onboarding_shortcuts_step_turn_off": "Zum Ausstellen des Geräts Rückseite 10 Sek. drücken",
  "app_bell_onboarding_shortcuts_step_restart": "Für Geräteneustart beide Seitenknöpfe 10 Sek. drücken",
  "app_bell_onboarding_shortcuts_step_bedside_lamp": "Nachttischleuchte: Vorderlicht 2 Sek. drücken",
  "app_bell_settings_home_view": "Startansicht",
  "app_bell_settings_alarm_settings": "Alarmeinstellungen",
  "app_bell_settings_alarm_settings_title": "Alarmeinstellungen",

M image/assets/lang/English.json => image/assets/lang/English.json +1 -1
@@ 651,7 651,7 @@
  "app_bell_onboarding_shortcuts_step_light_click": "Light click to accept and move forward",
  "app_bell_onboarding_shortcuts_step_deep_press": "Deep press to activate or deactivate the alarm",
  "app_bell_onboarding_shortcuts_step_home": "Long press back (2s) to return to the home view",
  "app_bell_onboarding_shortcuts_step_battery": "Long press back (2s) on the home view to see status battery",
  "app_bell_onboarding_shortcuts_step_battery": "Long press back (2s) on the home view to see battery status",
  "app_bell_onboarding_shortcuts_step_turn_off": "Press back for 10s to turn off the device",
  "app_bell_onboarding_shortcuts_step_restart": "Press both side buttons for 10s to restart the device",
  "app_bell_onboarding_shortcuts_step_bedside_lamp": "Long press frontlight (2s) to turn on a bedside lamp",

M image/assets/lang/Espanol.json => image/assets/lang/Espanol.json +12 -1
@@ 644,11 644,22 @@
  "app_bell_settings_time_units_time_message": "Hora",
  "app_bell_settings_temp_scale": "Escala de temperatura",
  "app_bell_onboarding_welcome_message": "<text>Mudita Harmony<br/>está apagado</text>",
  "app_bell_onboarding_info_rotate": "<text weight='regular' size='38'>Girar </text><text weight='light' size='38'> para seleccionar</text>",
  "app_bell_onboarding_info_rotate": "<text weight='regular' size='38'>Girar </text><text weight='light' size='38'>para seleccionar</text>",
  "app_bell_onboarding_info_light_click": "<text weight='regular' size='38'>Click ligeramente </text><text weight='light' size='38'>para continuar</text>",
  "app_bell_onboarding_info_deep_click_warning": "<text weight='light' size='38'>Has presionado </text><text weight='regular' size='38'>muy profundo</text>",
  "app_bell_onboarding_info_deep_click_correction": "<text weight='light' size='38'>Sé más suave, <br></br>intenta </text><text weight='regular' size='38'>presionar ligeramente </text><text weight='light' size='38'>esta vez</text>",
  "app_bell_onboarding_welcome": "Bienvenido",
  "app_bell_onboarding_shortcuts_question": "¿Quieres ver instrucciones de accesos directos?",
  "app_bell_onboarding_shortcuts_start": "Comenzar",
  "app_bell_onboarding_shortcuts_skip": "Saltar",
  "app_bell_onboarding_shortcuts_step_rotate": "Girar para seleccionar",
  "app_bell_onboarding_shortcuts_step_light_click": "Clic ligero para aceptar y avanzar",
  "app_bell_onboarding_shortcuts_step_deep_press": "Mantener pulsado para activar o desactivar la alarma",
  "app_bell_onboarding_shortcuts_step_home": "Mantén pulsado Volver atrás (2 s) para ir al Inicio",
  "app_bell_onboarding_shortcuts_step_battery": "Mantén pulsado Volver atrás (2 s) para comprobar batería",
  "app_bell_onboarding_shortcuts_step_turn_off": "Pulsa Volver atrás 10 s para apagar el dispositivo",
  "app_bell_onboarding_shortcuts_step_restart": "Pulsa ambos botones laterales 10 s para reiniciar",
  "app_bell_onboarding_shortcuts_step_bedside_lamp": "Mantén pulsada la luz frontal (2 s) para encenderla",
  "app_bellmain_home_screen_bottom_desc_dp": "Presionar a fondo para activar",
  "app_bellmain_alarm": "Alarma",
  "app_bellmain_power_nap": "Siesta",

M image/assets/lang/Francais.json => image/assets/lang/Francais.json +11 -0
@@ 624,6 624,17 @@
  "app_bell_onboarding_info_deep_click_warning": "<text weight='light' size='38'>Vous avez </text><text weight='regular' size='38'>appuyé fort</text>",
  "app_bell_onboarding_info_deep_click_correction": "<text weight='light' size='38'>Soyez plus doux, <br></br>essayez </text><text weight='regular' size='38'>de cliquer plus </text><text weight='light' size='38'>légèrement cette fois</text>",
  "app_bell_onboarding_welcome": "Bienvenu",
  "app_bell_onboarding_shortcuts_question": "Voulez-vous voir les instructions sur les raccourcis ?",
  "app_bell_onboarding_shortcuts_start": "Commencer",
  "app_bell_onboarding_shortcuts_skip": "Ignorer",
  "app_bell_onboarding_shortcuts_step_rotate": "Faites tourner pour sélectionner",
  "app_bell_onboarding_shortcuts_step_light_click": "Cliquez légèrement pour accepter et avancer",
  "app_bell_onboarding_shortcuts_step_deep_press": "Appuyez fort pour activer ou désactiver l'alarme",
  "app_bell_onboarding_shortcuts_step_home": "Pressez 2 sec la touche retour pour revenir au menu",
  "app_bell_onboarding_shortcuts_step_battery": "Pressez 2 sec Retour pour voir l'état de la batterie",
  "app_bell_onboarding_shortcuts_step_turn_off": "Appuyez sur Retour pendant 10 sec pour éteindre l'appareil",
  "app_bell_onboarding_shortcuts_step_restart": "Pressez les boutons latéraux pendant 10 sec pour redémarrer",
  "app_bell_onboarding_shortcuts_step_bedside_lamp": "Pressez 2 sec l'éclairage avant pour allumer une lampe",
  "app_bellmain_home_screen_bottom_desc_dp": "Appuyer fort pour activer",
  "app_bellmain_alarm": "Alarme",
  "app_bellmain_relaxation": "Bruits de fond",

M image/assets/lang/Polski.json => image/assets/lang/Polski.json +11 -0
@@ 667,6 667,17 @@
  "app_bell_onboarding_info_deep_click_warning": "<text weight='light' size='38'>Głęboko </text><text weight='regular' size='38'>wciśnięty</text>",
  "app_bell_onboarding_info_deep_click_correction": "<text weight='light' size='38'>Bądź bardziej delikatny,<br></br>spróbuj </text><text weight='regular' size='38'>tym razem<br></br></text><text weight='light' size='38'>lekko kliknąć</text>",
  "app_bell_onboarding_welcome": "Witamy",
  "app_bell_onboarding_shortcuts_question": "Czy chcesz zobaczyć instrukcję Skrótów?",
  "app_bell_onboarding_shortcuts_start": "Start",
  "app_bell_onboarding_shortcuts_skip": "Pomiń",
  "app_bell_onboarding_shortcuts_step_rotate": "Obróć, aby wybrać",
  "app_bell_onboarding_shortcuts_step_light_click": "Kliknij lekko, aby przejść dalej",
  "app_bell_onboarding_shortcuts_step_deep_press": "Kliknij głęboko, aby aktywować lub dezaktywować alarm",
  "app_bell_onboarding_shortcuts_step_home": "Przytrzymaj przycisk wstecz (2s), aby wrócić do ekranu głównego",
  "app_bell_onboarding_shortcuts_step_battery": "Przytrzymaj przycisk wstecz (2s) na ekranie głównym, aby zobaczyć status baterii",
  "app_bell_onboarding_shortcuts_step_turn_off": "Przytrzymaj przycisk wstecz przez 10s aby wyłączyć urządzenie",
  "app_bell_onboarding_shortcuts_step_restart": "Przytrzymaj oba boczne przyciski przez 10 sekund, aby ponownie uruchomić urządzenie",
  "app_bell_onboarding_shortcuts_step_bedside_lamp": "Przytrzymaj przycisk światła (2s), aby włączyć lampkę nocną",
  "app_bell_settings_advanced": "Zaawansowane",
  "app_bell_settings_time_units": "Czas",
  "app_bell_settings_temp_scale": "Skala temperatury",

M products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingShortcutsOptionWindow.cpp => products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingShortcutsOptionWindow.cpp +19 -1
@@ 15,8 15,26 @@ namespace gui
        : BellShortOptionWindow(app, name), startString{utils::translate("app_bell_onboarding_shortcuts_start")},
          skipString{utils::translate("app_bell_onboarding_shortcuts_skip")}
    {
        body->firstBox->setMinimumHeight(style::bell_shortcuts_layout::top_layout_h);
        body->firstBox->setMaximumHeight(style::bell_shortcuts_layout::top_layout_h);
        body->centerBox->setMinimumSize(style::bell_base_layout::center_layout_w,
                                        style::bell_shortcuts_layout::center_layout_h);
        body->centerBox->setMaximumSize(style::bell_base_layout::center_layout_w,
                                        style::bell_shortcuts_layout::center_layout_h);
        body->lastBox->setMinimumHeight(style::bell_shortcuts_layout::bottom_layout_h);
        body->lastBox->setMaximumHeight(style::bell_shortcuts_layout::bottom_layout_h);
        optionsList->setAlignment(Alignment(Alignment::Vertical::Center));
        optionsList->setMinimumSize(style::bell_options::default_text_width,
                                    style::bell_shortcuts_layout::center_layout_h);
        optionsList->setMaximumSize(style::bell_options::default_text_width,
                                    style::bell_shortcuts_layout::center_layout_h);

        addOptions(settingsOptionsList());
        setListTitle(utils::translate("app_bell_onboarding_shortcuts_question"));
        setListTitle(utils::translate("app_bell_onboarding_shortcuts_question"),
                     style::bell_shortcuts_layout::top_layout_h);

        body->resize();
        body->resizeItems();
    }

    std::list<Option> OnBoardingShortcutsOptionWindow::settingsOptionsList()

M products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingShortcutsOptionWindow.hpp => products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingShortcutsOptionWindow.hpp +7 -0
@@ 6,6 6,13 @@
#include <common/options/BellShortOptionWindow.hpp>
#include <apps-common/ApplicationCommon.hpp>

namespace style::bell_shortcuts_layout
{
    constexpr inline auto top_layout_h    = 153U;
    constexpr inline auto center_layout_h = 180U;
    constexpr inline auto bottom_layout_h = 51U;
} // namespace style::bell_shortcuts_layout

namespace gui
{
    class OnBoardingShortcutsOptionWindow : public BellShortOptionWindow

M products/BellHybrid/apps/common/include/common/options/BellShortOptionWindow.hpp => products/BellHybrid/apps/common/include/common/options/BellShortOptionWindow.hpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 12,12 12,12 @@ namespace gui
{
    class BellShortOptionWindow : public AppWindow, protected OptionsList<ListView>
    {
      private:
      protected:
        BellBaseLayout *body{};

      public:
        BellShortOptionWindow(app::ApplicationCommon *app, const std::string &name);
        void setListTitle(const std::string &title);
        void setListTitle(const std::string &title, gui::Length height = style::bell_base_layout::outer_layouts_h);

        void onBeforeShow(ShowMode mode, SwitchData *data) override;
        void onClose(CloseReason reason) override;

M products/BellHybrid/apps/common/src/options/BellShortOptionWindow.cpp => products/BellHybrid/apps/common/src/options/BellShortOptionWindow.cpp +2 -2
@@ 51,13 51,13 @@ namespace gui
        setFocusItem(optionsList);
    }

    void BellShortOptionWindow::setListTitle(const std::string &title)
    void BellShortOptionWindow::setListTitle(const std::string &title, gui::Length height)
    {
        auto titleBody = new TextFixedSize(body->firstBox);
        titleBody->drawUnderline(false);
        titleBody->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Top));
        titleBody->setFont(style::window::font::largelight);
        titleBody->setMinimumSize(style::bell_base_layout::outer_layouts_w, style::bell_base_layout::outer_layouts_h);
        titleBody->setMinimumSize(style::bell_base_layout::outer_layouts_w, height);
        titleBody->setEdges(RectangleEdge::None);
        titleBody->setEditMode(EditMode::Browse);
        titleBody->setRichText(title);

A tools/print_characters.py => tools/print_characters.py +53 -0
@@ 0,0 1,53 @@
#!/usr/bin/python3
# Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

import os
import sys

# https://pl.wikipedia.org/wiki/ASCII
ascii = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
# https://en.wikipedia.org/wiki/Latin_Extended-A
latin_extended_a = "ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ"
# https://en.wikipedia.org/wiki/Latin_Extended-B
latin_extended_b = "ƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴǵǶǷǸǹǺǻǼǽǾǿȀȁȂȃȄȅȆȇȈȉȊȋȌȍȎȏȐȑȒȓȔȕȖȗȘșȚțȜȝȞȟȠȡȢȣȤȥȦȧȨȩȪȫȬȭȮȯȰȱȲȳȴȵȶȷȸȹȺȻȼȽȾȿɀɁɂɃɄɅɆɇɈɉɊɋɌɍɎɏ"
# https://en.wikipedia.org/wiki/Latin_Extended-C
latin_extended_c = "ⱠⱡⱢⱣⱤⱥⱦⱧⱨⱩⱪⱫⱬⱭⱮⱯⱰⱱⱲⱳⱴⱵⱶⱷⱸⱹⱺⱻⱼⱽⱾⱿ"

# https://www.gt-pressura.com/
gt_basic_latin = "ABCDEFGHIJKLMNNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
gt_extended_latin = "ÁĂÂÄẠÆǼÀĀĄÅÃĆČÇĈĊĎĐÉĔĚÊËĖẸÈĒĘẼĞǦĜĢĠĦĤÍĬÎÏİỊÌIJĪĮĨJĴĶĹĽĻĿŁŃŇŅƝÑŊÓŎÔÖỌŒÒŐŌǪØǾÕŔŘŖŚŠŞŜȘŦŤŢȚÞÚŬÛÜỤÙŰŪŲŮŨẂŴẄẀÝŶŸỲȲỸŹŽŻẞƏáăâäạæǽàāąåãćčçĉċďđéĕěêëėẹèēęẽğǧĝģġħĥíĭîïịıìijīįĩjĵȷķĸĺľļŀłńʼnňņɲñŋóŏôöọœòőōǫøǿõŕřŗśšşŝșŧťţțþúŭûüụùűūųůũẃŵẅẁýŷÿỳȳỹźžżßðə"
gt_symbols = "([{,;:.…-‘’“”‚„‹›·–—•«»)]}!¡?¿/'\"ʼ&@©℀℗℅®™¶§†‡*#№∅+−±×÷=°≈≠≥≤ℓ●○❶❷❸❹❺❻❼❽❾①②③④⑤⑥⑦⑧⑨$¢£¥€₿₩₫₮₴₸₹₺₽₿ƒ¤↑↗→↘↓↙←↖↔↕⇵↩↪↰↱↲↳↴⬐↺↻"

ignore = "\r\n\t"

if len(sys.argv) == 2 and sys.argv[1] == "--help":
    print("print_characters.py --help")
    print("    Prints help")
    print("print_characters.py")
    print("    Prints basic, latin and symbols characters from gt_pressura")
    print("print_characters.py FILES...")
    print("    FILES - e.g. directory/*.txt")
    exit()

chars = set()

if len(sys.argv) < 2:
    for c in (ascii + gt_basic_latin + gt_extended_latin + gt_symbols):
        chars.add(c)
else:
    for c in ascii:
        chars.add(c)

    for filename in sys.argv[1:]:
        f = open(filename)
        str = f.read()
        for i in range(len(str)):
            c = str[i]
            if ignore.find(c) == -1:
                chars.add(c)
        f.close()

for c in sorted(chars):
    print(c, end = '')
print("")