Files
crosspoint-reader-mod/lib/I18n/translations/russian.yaml

342 lines
16 KiB
YAML
Raw Normal View History

feat: User-Interface I18n System (#728) **What is the goal of this PR?** This PR introduces Internationalization (i18n) support, enabling users to switch the UI language dynamically. **What changes are included?** - Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage language state and string retrieval. - Data Structures: - `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported language. - `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access. - `lib/I18n/translations.csv`: single source of truth. - Documentation: Added `docs/i18n.md` detailing the workflow for developers and translators. - New Settings activity: `src/activities/settings/LanguageSelectActivity.h/cpp` This implementation (building on concepts from #505) prioritizes performance and memory efficiency. The core approach is to store all localized strings for each language in dedicated arrays and access them via enums. This provides O(1) access with zero runtime overhead, and avoids the heap allocations, hashing, and collision handling required by `std::map` or `std::unordered_map`. The main trade-off is that enums and string arrays must remain perfectly synchronized—any mismatch would result in incorrect strings being displayed in the UI. To eliminate this risk, I added a Python script that automatically generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which will serve as the single source of truth for all translations. The full design and workflow are documented in `docs/i18n.md`. - [x] Python script `generate_i18n.py` to auto-generate C++ files from CSV - [x] Populate translations.csv with initial translations. Currently available translations: English, Español, Français, Deutsch, Čeština, Português (Brasil), Русский, Svenska. Thanks, community! **Status:** EDIT: ready to be merged. As a proof of concept, the SPANISH strings currently mirror the English ones, but are fully uppercased. --- Did you use AI tools to help write this code? _**< PARTIALLY >**_ I used AI for the black work of replacing strings with I18n references across the project, and for generating the documentation. EDIT: also some help with merging changes from master. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
_language_name: "Русский"
_language_code: "RUSSIAN"
_order: "6"
STR_CROSSPOINT: "CrossPoint"
STR_BOOTING: "Загрузка"
STR_SLEEPING: "Спящий режим"
STR_ENTERING_SLEEP: "Переход в сон..."
STR_BROWSE_FILES: "Обзор файлов"
STR_FILE_TRANSFER: "Передача файлов"
STR_SETTINGS_TITLE: "Настройки"
STR_CALIBRE_LIBRARY: "Библиотека Calibre"
STR_CONTINUE_READING: "Продолжить чтение"
STR_NO_OPEN_BOOK: "Нет открытой книги"
STR_START_READING: "Начать чтение ниже"
STR_BOOKS: "Книги"
STR_NO_BOOKS_FOUND: "Книги не найдены"
STR_SELECT_CHAPTER: "Выберите главу"
STR_NO_CHAPTERS: "Глав нет"
STR_END_OF_BOOK: "Конец книги"
STR_EMPTY_CHAPTER: "Пустая глава"
STR_INDEXING: "Индексация..."
STR_MEMORY_ERROR: "Ошибка памяти"
STR_PAGE_LOAD_ERROR: "Ошибка загрузки страницы"
STR_EMPTY_FILE: "Пустой файл"
STR_OUT_OF_BOUNDS: "Выход за пределы"
STR_LOADING: "Загрузка..."
STR_LOAD_XTC_FAILED: "Не удалось загрузить XTC"
STR_LOAD_TXT_FAILED: "Не удалось загрузить TXT"
STR_LOAD_EPUB_FAILED: "Не удалось загрузить EPUB"
STR_SD_CARD_ERROR: "Ошибка SD-карты"
STR_WIFI_NETWORKS: "Wi-Fi сети"
STR_NO_NETWORKS: "Сети не найдены"
STR_NETWORKS_FOUND: "Найдено сетей: %zu"
STR_SCANNING: "Сканирование..."
STR_CONNECTING: "Подключение..."
STR_CONNECTED: "Подключено!"
STR_CONNECTION_FAILED: "Ошибка подключения"
STR_CONNECTION_TIMEOUT: "Тайм-аут подключения"
STR_FORGET_NETWORK: "Забыть сеть?"
STR_SAVE_PASSWORD: "Сохранить пароль?"
STR_REMOVE_PASSWORD: "Удалить сохранённый пароль?"
STR_PRESS_OK_SCAN: "Нажмите OK для повторного поиска"
STR_PRESS_ANY_CONTINUE: "Нажмите любую кнопку"
STR_SELECT_HINT: "ВЛЕВО/ВПРАВО: выбор | OK: подтвердить"
STR_HOW_CONNECT: "Как вы хотите подключиться?"
STR_JOIN_NETWORK: "Подключиться к сети"
STR_CREATE_HOTSPOT: "Создать точку доступа"
STR_JOIN_DESC: "Подключение к существующей сети Wi-Fi"
STR_HOTSPOT_DESC: "Создать сеть Wi-Fi для подключения других"
STR_STARTING_HOTSPOT: "Запуск точки доступа..."
STR_HOTSPOT_MODE: "Режим точки доступа"
STR_CONNECT_WIFI_HINT: "Подключите устройство к этой сети Wi-Fi"
STR_OPEN_URL_HINT: "Откройте этот адрес в браузере"
STR_OR_HTTP_PREFIX: "или http://"
STR_SCAN_QR_HINT: "или отсканируйте QR-код:"
STR_CALIBRE_WIRELESS: "Calibre по Wi-Fi"
STR_CALIBRE_WEB_URL: "Web-адрес Calibre"
STR_CONNECT_WIRELESS: "Подключить как беспроводное устройство"
STR_NETWORK_LEGEND: "* = Защищена | + = Сохранена"
STR_MAC_ADDRESS: "MAC-адрес:"
STR_CHECKING_WIFI: "Проверка Wi-Fi..."
STR_ENTER_WIFI_PASSWORD: "Введите пароль Wi-Fi"
STR_ENTER_TEXT: "Введите текст"
STR_TO_PREFIX: "к "
STR_CALIBRE_DISCOVERING: "Поиск Calibre..."
STR_CALIBRE_CONNECTING_TO: "Подключение к "
STR_CALIBRE_CONNECTED_TO: "Подключено к "
STR_CALIBRE_WAITING_COMMANDS: "Ожидание команд..."
STR_CONNECTION_FAILED_RETRYING: "(Ошибка подключения"
STR_CALIBRE_DISCONNECTED: "Соединение с Calibre разорвано"
STR_CALIBRE_WAITING_TRANSFER: "Ожидание передачи..."
STR_CALIBRE_TRANSFER_HINT: "Если передача не удаётся"
STR_CALIBRE_RECEIVING: "Получение:"
STR_CALIBRE_RECEIVED: "Получено:"
STR_CALIBRE_WAITING_MORE: "Ожидание следующих файлов..."
STR_CALIBRE_FAILED_CREATE_FILE: "Не удалось создать файл"
STR_CALIBRE_PASSWORD_REQUIRED: "Требуется пароль"
STR_CALIBRE_TRANSFER_INTERRUPTED: "Передача прервана"
STR_CALIBRE_INSTRUCTION_1: "1) Установите плагин CrossPoint Reader"
STR_CALIBRE_INSTRUCTION_2: "2) Подключитесь к той же сети Wi-Fi"
STR_CALIBRE_INSTRUCTION_3: "3) В Calibre выберите: «Отправить на устройство»"
STR_CALIBRE_INSTRUCTION_4: "Не закрывайте этот экран во время отправки"
STR_CAT_DISPLAY: "Экран"
STR_CAT_READER: "Чтение"
STR_CAT_CONTROLS: "Управление"
STR_CAT_SYSTEM: "Система"
STR_CAT_CLOCK: "Часы"
feat: User-Interface I18n System (#728) **What is the goal of this PR?** This PR introduces Internationalization (i18n) support, enabling users to switch the UI language dynamically. **What changes are included?** - Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage language state and string retrieval. - Data Structures: - `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported language. - `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access. - `lib/I18n/translations.csv`: single source of truth. - Documentation: Added `docs/i18n.md` detailing the workflow for developers and translators. - New Settings activity: `src/activities/settings/LanguageSelectActivity.h/cpp` This implementation (building on concepts from #505) prioritizes performance and memory efficiency. The core approach is to store all localized strings for each language in dedicated arrays and access them via enums. This provides O(1) access with zero runtime overhead, and avoids the heap allocations, hashing, and collision handling required by `std::map` or `std::unordered_map`. The main trade-off is that enums and string arrays must remain perfectly synchronized—any mismatch would result in incorrect strings being displayed in the UI. To eliminate this risk, I added a Python script that automatically generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which will serve as the single source of truth for all translations. The full design and workflow are documented in `docs/i18n.md`. - [x] Python script `generate_i18n.py` to auto-generate C++ files from CSV - [x] Populate translations.csv with initial translations. Currently available translations: English, Español, Français, Deutsch, Čeština, Português (Brasil), Русский, Svenska. Thanks, community! **Status:** EDIT: ready to be merged. As a proof of concept, the SPANISH strings currently mirror the English ones, but are fully uppercased. --- Did you use AI tools to help write this code? _**< PARTIALLY >**_ I used AI for the black work of replacing strings with I18n references across the project, and for generating the documentation. EDIT: also some help with merging changes from master. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
STR_SLEEP_SCREEN: "Экран сна"
STR_SLEEP_COVER_MODE: "Режим обложки сна"
STR_STATUS_BAR: "Строка состояния"
STR_HIDE_BATTERY: "Скрыть % батареи"
STR_EXTRA_SPACING: "Доп. интервал абзаца"
STR_TEXT_AA: "Сглаживание текста"
STR_SHORT_PWR_BTN: "Короткое нажатие PWR"
STR_ORIENTATION: "Ориентация чтения"
STR_FRONT_BTN_LAYOUT: "Боковые кнопки"
STR_SIDE_BTN_LAYOUT: "Боковые кнопки"
STR_LONG_PRESS_SKIP: "Долгое нажатие - смена главы"
STR_FONT_FAMILY: "Шрифт чтения"
STR_EXT_READER_FONT: "Внешний шрифт чтения"
STR_EXT_CHINESE_FONT: "Шрифт CJK"
STR_EXT_UI_FONT: "Шрифт интерфейса"
STR_FONT_SIZE: "Размер шрифта интерфейса"
STR_LINE_SPACING: "Межстрочный интервал"
STR_ASCII_LETTER_SPACING: "Интервал букв ASCII"
STR_ASCII_DIGIT_SPACING: "Интервал цифр ASCII"
STR_CJK_SPACING: "Интервал CJK"
STR_COLOR_MODE: "Цветовой режим"
STR_SCREEN_MARGIN: "Поля экрана"
STR_PARA_ALIGNMENT: "Выравнивание абзаца"
STR_HYPHENATION: "Перенос слов"
STR_TIME_TO_SLEEP: "Сон через"
feat: User-Interface I18n System (#728) **What is the goal of this PR?** This PR introduces Internationalization (i18n) support, enabling users to switch the UI language dynamically. **What changes are included?** - Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage language state and string retrieval. - Data Structures: - `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported language. - `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access. - `lib/I18n/translations.csv`: single source of truth. - Documentation: Added `docs/i18n.md` detailing the workflow for developers and translators. - New Settings activity: `src/activities/settings/LanguageSelectActivity.h/cpp` This implementation (building on concepts from #505) prioritizes performance and memory efficiency. The core approach is to store all localized strings for each language in dedicated arrays and access them via enums. This provides O(1) access with zero runtime overhead, and avoids the heap allocations, hashing, and collision handling required by `std::map` or `std::unordered_map`. The main trade-off is that enums and string arrays must remain perfectly synchronized—any mismatch would result in incorrect strings being displayed in the UI. To eliminate this risk, I added a Python script that automatically generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which will serve as the single source of truth for all translations. The full design and workflow are documented in `docs/i18n.md`. - [x] Python script `generate_i18n.py` to auto-generate C++ files from CSV - [x] Populate translations.csv with initial translations. Currently available translations: English, Español, Français, Deutsch, Čeština, Português (Brasil), Русский, Svenska. Thanks, community! **Status:** EDIT: ready to be merged. As a proof of concept, the SPANISH strings currently mirror the English ones, but are fully uppercased. --- Did you use AI tools to help write this code? _**< PARTIALLY >**_ I used AI for the black work of replacing strings with I18n references across the project, and for generating the documentation. EDIT: also some help with merging changes from master. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
STR_REFRESH_FREQ: "Частота обновления"
STR_CALIBRE_SETTINGS: "Настройки Calibre"
STR_KOREADER_SYNC: "Синхронизация KOReader"
STR_CHECK_UPDATES: "Проверить обновления"
STR_LANGUAGE: "Язык"
STR_SELECT_WALLPAPER: "Выбрать обои"
STR_CLEAR_READING_CACHE: "Очистить кэш чтения"
STR_CALIBRE: "Calibre"
STR_USERNAME: "Имя пользователя"
STR_PASSWORD: "Пароль"
STR_SYNC_SERVER_URL: "URL сервера синхронизации"
STR_DOCUMENT_MATCHING: "Сопоставление документов"
STR_AUTHENTICATE: "Авторизация"
STR_KOREADER_USERNAME: "Имя пользователя KOReader"
STR_KOREADER_PASSWORD: "Пароль KOReader"
STR_FILENAME: "Имя файла"
STR_BINARY: "Бинарный"
STR_SET_CREDENTIALS_FIRST: "Сначала укажите данные"
STR_WIFI_CONN_FAILED: "Не удалось подключиться к Wi-Fi"
STR_AUTHENTICATING: "Авторизация..."
STR_AUTH_SUCCESS: "Авторизация успешна!"
STR_KOREADER_AUTH: "Авторизация KOReader"
STR_SYNC_READY: "Синхронизация KOReader готова"
STR_AUTH_FAILED: "Ошибка авторизации"
STR_DONE: "Готово"
STR_CLEAR_CACHE_WARNING_1: "Будут удалены все данные кэша книг."
STR_CLEAR_CACHE_WARNING_2: "Весь прогресс чтения будет потерян!"
STR_CLEAR_CACHE_WARNING_3: "Книги потребуется переиндексировать"
STR_CLEAR_CACHE_WARNING_4: "при повторном открытии."
STR_CLEARING_CACHE: "Очистка кэша..."
STR_CACHE_CLEARED: "Кэш очищен"
STR_ITEMS_REMOVED: "элементов удалено"
STR_FAILED_LOWER: "ошибка"
STR_CLEAR_CACHE_FAILED: "Не удалось очистить кэш"
STR_CHECK_SERIAL_OUTPUT: "Проверьте вывод по UART для деталей"
STR_DARK: "Тёмный"
STR_LIGHT: "Светлый"
STR_CUSTOM: "Свой"
STR_COVER: "Обложка"
STR_NONE_OPT: "Нет"
STR_FIT: "Вписать"
STR_CROP: "Обрезать"
STR_NO_PROGRESS: "Без прогресса"
STR_FULL_OPT: "Полная"
STR_NEVER: "Никогда"
STR_IN_READER: "В режиме чтения"
STR_ALWAYS: "Всегда"
STR_IGNORE: "Игнорировать"
STR_SLEEP: "Сон"
STR_PAGE_TURN: "Перелистывание"
STR_PORTRAIT: "Портрет"
STR_LANDSCAPE_CW: "Ландшафт (CW)"
STR_INVERTED: "Инверсия"
STR_LANDSCAPE_CCW: "Ландшафт (CCW)"
STR_FRONT_LAYOUT_BCLR: "Наз, Ок, Лев, Прав"
STR_FRONT_LAYOUT_LRBC: "Лев, Прав, Наз, Ок"
STR_FRONT_LAYOUT_LBCR: "Лев, Наз, Ок, Прав"
feat: User-Interface I18n System (#728) **What is the goal of this PR?** This PR introduces Internationalization (i18n) support, enabling users to switch the UI language dynamically. **What changes are included?** - Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage language state and string retrieval. - Data Structures: - `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported language. - `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access. - `lib/I18n/translations.csv`: single source of truth. - Documentation: Added `docs/i18n.md` detailing the workflow for developers and translators. - New Settings activity: `src/activities/settings/LanguageSelectActivity.h/cpp` This implementation (building on concepts from #505) prioritizes performance and memory efficiency. The core approach is to store all localized strings for each language in dedicated arrays and access them via enums. This provides O(1) access with zero runtime overhead, and avoids the heap allocations, hashing, and collision handling required by `std::map` or `std::unordered_map`. The main trade-off is that enums and string arrays must remain perfectly synchronized—any mismatch would result in incorrect strings being displayed in the UI. To eliminate this risk, I added a Python script that automatically generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which will serve as the single source of truth for all translations. The full design and workflow are documented in `docs/i18n.md`. - [x] Python script `generate_i18n.py` to auto-generate C++ files from CSV - [x] Populate translations.csv with initial translations. Currently available translations: English, Español, Français, Deutsch, Čeština, Português (Brasil), Русский, Svenska. Thanks, community! **Status:** EDIT: ready to be merged. As a proof of concept, the SPANISH strings currently mirror the English ones, but are fully uppercased. --- Did you use AI tools to help write this code? _**< PARTIALLY >**_ I used AI for the black work of replacing strings with I18n references across the project, and for generating the documentation. EDIT: also some help with merging changes from master. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
STR_PREV_NEXT: "Назад/Вперёд"
STR_NEXT_PREV: "Вперёд/Назад"
STR_BOOKERLY: "Bookerly"
STR_NOTO_SANS: "Noto Sans"
STR_OPEN_DYSLEXIC: "Open Dyslexic"
STR_SMALL: "Маленький"
STR_MEDIUM: "Средний"
STR_LARGE: "Большой"
STR_X_LARGE: "Очень большой"
STR_TIGHT: "Узкий"
STR_NORMAL: "Обычный"
STR_WIDE: "Широкий"
STR_JUSTIFY: "По ширине"
STR_ALIGN_LEFT: "По левому краю"
STR_CENTER: "По центру"
STR_ALIGN_RIGHT: "По правому краю"
STR_MIN_1: "1 мин"
STR_MIN_5: "5 мин"
STR_MIN_10: "10 мин"
STR_MIN_15: "15 мин"
STR_MIN_30: "30 мин"
STR_PAGES_1: "1 стр."
STR_PAGES_5: "5 стр."
STR_PAGES_10: "10 стр."
STR_PAGES_15: "15 стр."
STR_PAGES_30: "30 стр."
STR_UPDATE: "Обновление"
STR_CHECKING_UPDATE: "Проверка обновлений..."
STR_NEW_UPDATE: "Доступно новое обновление!"
STR_CURRENT_VERSION: "Текущая версия:"
STR_NEW_VERSION: "Новая версия:"
STR_UPDATING: "Обновление..."
STR_NO_UPDATE: "Обновлений нет"
STR_UPDATE_FAILED: "Ошибка обновления"
STR_UPDATE_COMPLETE: "Обновление завершено"
STR_POWER_ON_HINT: "Удерживайте кнопку питания для включения"
STR_EXTERNAL_FONT: "Пользовательский шрифт"
feat: User-Interface I18n System (#728) **What is the goal of this PR?** This PR introduces Internationalization (i18n) support, enabling users to switch the UI language dynamically. **What changes are included?** - Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage language state and string retrieval. - Data Structures: - `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported language. - `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access. - `lib/I18n/translations.csv`: single source of truth. - Documentation: Added `docs/i18n.md` detailing the workflow for developers and translators. - New Settings activity: `src/activities/settings/LanguageSelectActivity.h/cpp` This implementation (building on concepts from #505) prioritizes performance and memory efficiency. The core approach is to store all localized strings for each language in dedicated arrays and access them via enums. This provides O(1) access with zero runtime overhead, and avoids the heap allocations, hashing, and collision handling required by `std::map` or `std::unordered_map`. The main trade-off is that enums and string arrays must remain perfectly synchronized—any mismatch would result in incorrect strings being displayed in the UI. To eliminate this risk, I added a Python script that automatically generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which will serve as the single source of truth for all translations. The full design and workflow are documented in `docs/i18n.md`. - [x] Python script `generate_i18n.py` to auto-generate C++ files from CSV - [x] Populate translations.csv with initial translations. Currently available translations: English, Español, Français, Deutsch, Čeština, Português (Brasil), Русский, Svenska. Thanks, community! **Status:** EDIT: ready to be merged. As a proof of concept, the SPANISH strings currently mirror the English ones, but are fully uppercased. --- Did you use AI tools to help write this code? _**< PARTIALLY >**_ I used AI for the black work of replacing strings with I18n references across the project, and for generating the documentation. EDIT: also some help with merging changes from master. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
STR_BUILTIN_DISABLED: "Встроенный (отключён)"
STR_NO_ENTRIES: "Записи не найдены"
STR_DOWNLOADING: "Загрузка..."
STR_DOWNLOAD_FAILED: "Ошибка загрузки"
STR_ERROR_MSG: "Ошибка:"
STR_UNNAMED: "Без имени"
STR_NO_SERVER_URL: "URL сервера не настроен"
STR_FETCH_FEED_FAILED: "Не удалось получить ленту"
STR_PARSE_FEED_FAILED: "Не удалось обработать ленту"
STR_NETWORK_PREFIX: "Сеть:"
STR_IP_ADDRESS_PREFIX: "IP-адрес:"
STR_SCAN_QR_WIFI_HINT: "или отсканируйте QR-код для подключения к Wi-Fi."
STR_ERROR_GENERAL_FAILURE: "Ошибка: Общая ошибка"
STR_ERROR_NETWORK_NOT_FOUND: "Ошибка: Сеть не найдена"
STR_ERROR_CONNECTION_TIMEOUT: "Ошибка: Тайм-аут соединения"
STR_SD_CARD: "SD-карта"
STR_BACK: "« Назад"
STR_EXIT: "« Выход"
STR_HOME: "« Главная"
STR_SAVE: "« Сохранить"
STR_SELECT: "Выбрать"
STR_TOGGLE: "Выбор"
STR_CONFIRM: "Подтв."
STR_CANCEL: "Отмена"
STR_CONNECT: "Подкл."
STR_OPEN: "Открыть"
STR_DOWNLOAD: "Скачать"
STR_RETRY: "Повторить"
STR_YES: "Да"
STR_NO: "Нет"
STR_STATE_ON: "ВКЛ"
STR_STATE_OFF: "ВЫКЛ"
STR_SET: "Установлено"
STR_NOT_SET: "Не установлено"
STR_DIR_LEFT: "Влево"
STR_DIR_RIGHT: "Вправо"
STR_DIR_UP: "Вверх"
STR_DIR_DOWN: "Вниз"
STR_CAPS_ON: "CAPS"
STR_CAPS_OFF: "caps"
STR_OK_BUTTON: "OK"
STR_ON_MARKER: "[ВКЛ]"
STR_SLEEP_COVER_FILTER: "Фильтр экрана сна"
feat: User-Interface I18n System (#728) **What is the goal of this PR?** This PR introduces Internationalization (i18n) support, enabling users to switch the UI language dynamically. **What changes are included?** - Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage language state and string retrieval. - Data Structures: - `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported language. - `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access. - `lib/I18n/translations.csv`: single source of truth. - Documentation: Added `docs/i18n.md` detailing the workflow for developers and translators. - New Settings activity: `src/activities/settings/LanguageSelectActivity.h/cpp` This implementation (building on concepts from #505) prioritizes performance and memory efficiency. The core approach is to store all localized strings for each language in dedicated arrays and access them via enums. This provides O(1) access with zero runtime overhead, and avoids the heap allocations, hashing, and collision handling required by `std::map` or `std::unordered_map`. The main trade-off is that enums and string arrays must remain perfectly synchronized—any mismatch would result in incorrect strings being displayed in the UI. To eliminate this risk, I added a Python script that automatically generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which will serve as the single source of truth for all translations. The full design and workflow are documented in `docs/i18n.md`. - [x] Python script `generate_i18n.py` to auto-generate C++ files from CSV - [x] Populate translations.csv with initial translations. Currently available translations: English, Español, Français, Deutsch, Čeština, Português (Brasil), Русский, Svenska. Thanks, community! **Status:** EDIT: ready to be merged. As a proof of concept, the SPANISH strings currently mirror the English ones, but are fully uppercased. --- Did you use AI tools to help write this code? _**< PARTIALLY >**_ I used AI for the black work of replacing strings with I18n references across the project, and for generating the documentation. EDIT: also some help with merging changes from master. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
STR_FILTER_CONTRAST: "Контраст"
STR_STATUS_BAR_FULL_PERCENT: "Полная + %"
STR_STATUS_BAR_FULL_BOOK: "Полная + шкала книги"
STR_STATUS_BAR_BOOK_ONLY: "Только шкала книги"
STR_STATUS_BAR_FULL_CHAPTER: "Полная + шкала главы"
STR_UI_THEME: "Тема интерфейса"
STR_THEME_CLASSIC: "Классическая"
STR_THEME_LYRA: "Lyra"
STR_SUNLIGHT_FADING_FIX: "Компенсация выцветания"
STR_REMAP_FRONT_BUTTONS: "Переназначить передние кнопки"
STR_OPDS_BROWSER: "OPDS браузер"
STR_COVER_CUSTOM: "Обложка + Свой"
STR_RECENTS: "Недавние"
STR_MENU_RECENT_BOOKS: "Недавние книги"
STR_NO_RECENT_BOOKS: "Нет недавних книг"
STR_CALIBRE_DESC: "Использовать беспроводную передачу Calibre"
STR_FORGET_AND_REMOVE: "Забыть сеть и удалить сохранённый пароль?"
STR_FORGET_BUTTON: "Забыть сеть"
STR_CALIBRE_STARTING: "Запуск Calibre..."
STR_CALIBRE_SETUP: "Настройка"
STR_CALIBRE_STATUS: "Статус"
STR_CLEAR_BUTTON: "Очистить"
STR_DEFAULT_VALUE: "По умолчанию"
STR_REMAP_PROMPT: "Назначьте роль для каждой кнопки"
STR_UNASSIGNED: "Не назначено"
STR_ALREADY_ASSIGNED: "Уже назначено"
STR_REMAP_RESET_HINT: "Боковая кнопка вверх: сбросить по умолчанию"
STR_REMAP_CANCEL_HINT: "Боковая кнопка вниз: отменить переназначение"
STR_HW_BACK_LABEL: "Назад (1-я кнопка)"
STR_HW_CONFIRM_LABEL: "Подтвердить (2-я кнопка)"
STR_HW_LEFT_LABEL: "Влево (3-я кнопка)"
STR_HW_RIGHT_LABEL: "Вправо (4-я кнопка)"
STR_GO_TO_PERCENT: "Перейти к %"
STR_GO_HOME_BUTTON: "На главную"
STR_SYNC_PROGRESS: "Синхронизировать прогресс"
STR_DELETE_CACHE: "Удалить кэш книги"
STR_CHAPTER_PREFIX: "Глава:"
STR_PAGES_SEPARATOR: "стр. |"
STR_BOOK_PREFIX: "Книга:"
STR_KBD_SHIFT: "shift"
STR_KBD_SHIFT_CAPS: "SHIFT"
STR_KBD_LOCK: "LOCK"
STR_CALIBRE_URL_HINT: "Для Calibre добавьте /opds к URL"
STR_PERCENT_STEP_HINT: "Влево/Вправо: 1% Вверх/Вниз: 10%"
STR_SYNCING_TIME: "Синхронизация времени..."
STR_CALC_HASH: "Расчёт хэша документа..."
STR_HASH_FAILED: "Не удалось вычислить хэш документа"
STR_FETCH_PROGRESS: "Получение удалённого прогресса..."
STR_UPLOAD_PROGRESS: "Отправка прогресса..."
STR_NO_CREDENTIALS_MSG: "Данные для входа не настроены"
STR_KOREADER_SETUP_HINT: "Настройте аккаунт KOReader в настройках"
STR_PROGRESS_FOUND: "Прогресс найден!"
STR_REMOTE_LABEL: "Удалённый:"
STR_LOCAL_LABEL: "Локальный:"
STR_PAGE_OVERALL_FORMAT: "Страница %d, %.2f%% всего"
STR_PAGE_TOTAL_OVERALL_FORMAT: "Страница %d/%d"
STR_DEVICE_FROM_FORMAT: "От: %s"
STR_APPLY_REMOTE: "Применить удалённый прогресс"
STR_UPLOAD_LOCAL: "Отправить локальный прогресс"
STR_NO_REMOTE_MSG: "Удалённый прогресс не найден"
STR_UPLOAD_PROMPT: "Отправить текущую позицию?"
STR_UPLOAD_SUCCESS: "Прогресс отправлен!"
STR_SYNC_FAILED_MSG: "Ошибка синхронизации"
STR_SECTION_PREFIX: "Раздел"
STR_UPLOAD: "Отправить"
STR_BOOK_S_STYLE: "Стиль книги"
STR_EMBEDDED_STYLE: "Встроенный стиль"
STR_OPDS_SERVER_URL: "URL OPDS сервера"
STR_CHOOSE_SOMETHING: "Выберите что-нибудь для чтения"
STR_CLOCK: "Часы"
STR_CLOCK_AMPM: "AM/PM"
STR_CLOCK_24H: "24 часа"
STR_SET_TIME: "Установить время"
STR_CLOCK_SIZE: "Clock Size"
STR_CLOCK_SIZE_SMALL: "Small"
STR_CLOCK_SIZE_MEDIUM: "Medium"
STR_CLOCK_SIZE_LARGE: "Large"
STR_TIMEZONE: "Timezone"
STR_TZ_UTC: "UTC"
STR_TZ_EASTERN: "Eastern"
STR_TZ_CENTRAL: "Central"
STR_TZ_MOUNTAIN: "Mountain"
STR_TZ_PACIFIC: "Pacific"
STR_TZ_ALASKA: "Alaska"
STR_TZ_HAWAII: "Hawaii"
STR_TZ_CUSTOM: "Custom"
STR_SET_UTC_OFFSET: "Set UTC Offset"
STR_INDEXING_DISPLAY: "Отображение индексации"
STR_INDEXING_POPUP: "Popup"
STR_INDEXING_STATUS_TEXT: "Текст в строке"
STR_INDEXING_STATUS_ICON: "Иконка в строке"