Added russian translation. Minor visual fixes.

pull/30/head
Arty Bishop 2020-01-22 09:38:13 +00:00
rodzic 2fae9bfb34
commit aea01f303a
9 zmienionych plików z 216 dodań i 49 usunięć

Wyświetl plik

@ -23,6 +23,7 @@ import android.app.Application
import android.content.Context
import android.content.SharedPreferences
import android.location.Location
import android.util.Log
import androidx.core.content.edit
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
@ -48,6 +49,8 @@ import javax.inject.Inject
class MainViewModel(application: Application) : AndroidViewModel(application) {
private val tag = "MainViewModel"
private val app = application
private val keyHours = application.getString(R.string.pref_hours_ahead_key)
private val keyMinEl = application.getString(R.string.pref_min_el_key)
@ -217,10 +220,10 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
val tleList = ObjectInputStream(tleStream).readObject()
tleList as List<TLE>
} catch (exception: FileNotFoundException) {
_debugMessage.postValue(app.getString(R.string.err_no_tle_file))
Log.w(tag, app.getString(R.string.err_no_tle_file))
emptyList()
} catch (exception: IOException) {
_debugMessage.postValue(exception.toString())
Log.w(tag, exception.toString())
emptyList()
}
tleSelection = try {
@ -228,10 +231,10 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
val selectionList = ObjectInputStream(selectionStream).readObject()
selectionList as MutableList<Int>
} catch (exception: FileNotFoundException) {
_debugMessage.postValue(app.getString(R.string.err_no_selection_file))
Log.w(tag, app.getString(R.string.err_no_selection_file))
mutableListOf()
} catch (exception: IOException) {
_debugMessage.postValue(exception.toString())
Log.w(tag, exception.toString())
mutableListOf()
}
setGroundStationPosition()

Wyświetl plik

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
~
@ -35,8 +34,8 @@
<ImageView
android:id="@+id/pass_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_marginStart="8dp"
android:contentDescription="@string/placeholder"
app:layout_constraintBottom_toBottomOf="@+id/pass_satName"
@ -56,7 +55,7 @@
<TextView
android:id="@+id/pass_satId"
style="@style/CardPassName"
android:layout_marginTop="6dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:text="@string/pass_satId"
app:layout_constraintEnd_toEndOf="parent"

Wyświetl plik

@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program; if not, write to the Free Software Foundation, Inc.,
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_trans"
@ -24,21 +43,18 @@
<TextView
android:id="@+id/trans_downlink"
style="@style/CardTransText"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@string/trans_down_lowHigh"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toEndOf="@+id/trans_img_downlink"
app:layout_constraintTop_toBottomOf="@+id/trans_description" />
<TextView
android:id="@+id/trans_uplink"
style="@style/CardTransText"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@string/trans_up_lowHigh"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/trans_img_uplink"
app:layout_constraintTop_toBottomOf="@+id/trans_downlink" />
<TextView
@ -79,6 +95,9 @@
android:rotation="180"
app:layout_constraintBottom_toBottomOf="@+id/trans_downlink"
app:layout_constraintEnd_toStartOf="@+id/trans_downlink"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/trans_downlink"
app:srcCompat="@drawable/ic_arrow" />
@ -89,6 +108,9 @@
android:contentDescription="@string/placeholder"
app:layout_constraintBottom_toBottomOf="@+id/trans_uplink"
app:layout_constraintEnd_toStartOf="@+id/trans_uplink"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/trans_downlink"
app:srcCompat="@drawable/ic_arrow" />

Wyświetl plik

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
~

Wyświetl plik

@ -96,7 +96,7 @@
app:layout_constraintEnd_toStartOf="@+id/guide_right"
app:layout_constraintStart_toStartOf="@+id/guide_left"
app:layout_constraintTop_toTopOf="@+id/guide_center"
app:layout_constraintVertical_bias="0.25"
app:layout_constraintVertical_bias="0.32"
app:layout_constraintVertical_chainStyle="spread" />
<TextView

Wyświetl plik

@ -80,7 +80,7 @@
android:id="@+id/polar_no_trans"
style="@style/PolarViewText"
android:layout_marginTop="8dp"
android:text="@string/no_transmitters"
android:text="@string/no_trans"
android:visibility="invisible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"

Wyświetl plik

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program; if not, write to the Free Software Foundation, Inc.,
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<resources>
<string name="app_name">Look4Sat</string>
<string name="app_version">Версия: %s</string>
<string name="drawer_lat_text">Широта:</string>
<string name="drawer_lon_text">Долгота:</string>
<string name="update_loc">Обновить геопозицию</string>
<string name="update_loc_success">Геопозиция обновлена</string>
<string name="update_tle">Обновить файл TLE</string>
<string name="update_tle_success">Файл TLE обновлен</string>
<string name="update_trans">Обновить трансиверы</string>
<string name="update_trans_success">База трансиверов обновлена</string>
<string name="update_failure">Проверьте интернет-подключение</string>
<string name="exit_app">Выход</string>
<string name="menu_pass_list">Список пролетов</string>
<string name="menu_polar_view">Полярная система координат</string>
<string name="menu_map_view">Карта мира</string>
<string name="menu_settings">Настройки</string>
<string name="menu_about">О приложении</string>
<string name="dialog_select_sat">Выберите спутники для слежения…</string>
<string name="dialog_show_track">Показать трассу орбиты для…</string>
<string name="dialog_filter_passes">Фильтровать пролеты…</string>
<string name="pref_hours_ahead_hint">Количество часов</string>
<string name="pref_hours_ahead_summary">Показать пролеты за след. Х часов</string>
<string name="pref_hours_ahead_input_error">Введите значение между 1ч и 168ч</string>
<string name="pref_min_el_hint">Минимальная элевация</string>
<string name="pref_min_el_summary">Показать пролеты с элевацией более</string>
<string name="pref_min_el_input_error">Введите значение между 0° и 90°</string>
<string name="pref_gsp_title">Местоположение наземной станции</string>
<string name="pref_lat_title">Широта, град</string>
<string name="pref_lat_input_error">Введите значение между -90° и 90°</string>
<string name="pref_lon_title">Долгота, град</string>
<string name="pref_lon_input_error">Введите значение между -180° и 180°</string>
<string name="pref_alt_title">Высота, м</string>
<string name="pref_alt_input_error">Введите значение между -413м и 8850м</string>
<string name="pref_other_title">Другие настройки</string>
<string name="pref_refresh_rate_title">Частота обновления, мс</string>
<string name="pref_refresh_rate_input_error">Введите значение между 250мс и 10000мс</string>
<string name="no_mode">Модуляция: нет</string>
<string name="no_uplink">Исход. канал: нет</string>
<string name="no_downlink">Вход. канал: нет</string>
<string name="no_selected_sat">Не выбраны спутники</string>
<string name="no_trans">Не найдены трансиверы для этого спутника</string>
<string name="err_no_permissions">Отсутствуют необходимые разрешения</string>
<string name="err_sat_wont_pass">Некоторые спутники не пролетят над заданной точкой</string>
<string name="err_parse_tle">Ошибка обработки TLE</string>
<string name="err_update_tle">Пожалуйста, обновите ваш файл TLE</string>
<string name="err_enter_value">Пожалуйста, введите значение</string>
<string name="err_no_tle_file">Не найден файл TLE</string>
<string name="err_no_selection_file">Не найден файл выбранных спутников</string>
<string name="pass_aos_az">НПС — %2d°</string>
<string name="pass_maxEl">Элевация: %.1f°</string>
<string name="pass_los_az">%2d° — КПС</string>
<string name="polar_north">С</string>
<string name="polar_west">З</string>
<string name="polar_south">Ю</string>
<string name="polar_east">В</string>
<string name="pat_azimuth">Азимут: %.1f°</string>
<string name="pat_elevation">Элевация: %.1f°</string>
<string name="pat_latitude">Широта: %.1f°</string>
<string name="pat_longitude">Долгота: %.1f°</string>
<string name="pat_range">Расст.: %.0f км</string>
<string name="pat_altitude">Высота: %.0f км</string>
<string name="pat_timer_aos">НПС -%02d:%02d:%02d</string>
<string name="pat_timer_los">КПС -%02d:%02d:%02d</string>
<string name="trans_mode">Модуляция: %s</string>
<string name="trans_inverted">Инверсия: %s</string>
<string name="trans_up_low">Исход. канал: %.4f MHz</string>
<string name="trans_up_lowHigh">Исход. канал: %.4f - %.4f MHz</string>
<string name="trans_down_low">Вход. канал: %.4f MHz</string>
<string name="trans_down_lowHigh">Вход. канал: %.4f - %.4f MHz</string>
<string name="info_swipe_text">Проведите по экрану вниз, чтобы обновить список пролетов
для выбранных спутников</string>
<string name="info_main_text">Приложение Look4Sat использует набор двухстрочных элементов TLE
для вычисления траекторий движения и текущего местоположения спутников. Вы можете обновить
файл TLE при помощи кнопки в главном меню.</string>
<string name="info_select_text">Нажмите эту кнопку, чтобы выбрать спутники для слежения</string>
<string name="about_subtitle">Приложение для слежения за спутниками радио и погоды
для платформы Android</string>
<string name="about_thanks_to">Большое спасибо:</string>
<string name="about_thanks_list">— Вам за использование этого приложения!
\nЖелаю всегда чистого неба над головой!\n
\n— David A. B. Johnson, <a href="https://github.com/g4dpz">G4DPZ</a>, автору библиотеки
predict4java, которую приложение использует для вычисления орбит спутников по модели SGP4.\n
\n— <a href="https://github.com/davidmoten">Dave Moten</a> за создание форка и добавления
библиотеки в репозиторий maven, что значительно облегчило интеграцию в приложение.
Библиотека predict4java доступна по лицензии
<a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a>.\n
\n— Alexandru Csete, <a href="https://github.com/csete">OZ9AEC</a>, за его замечательную
программу Gpredict, которая вдохновила меня на создание Look4Sat.\n
\n— Ребятам из Square за создание библиотек OkHttp, Okio, Retrofit и за доступ
к ним по лицензии <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache-2.0</a>.\n
\n— Ребятам из Google и AOSP за создание самой лучшей мобильной ОС, доступной
на сегодняшний день. За их Google Play Services и за библиотеки Gson и Dagger2.\n
\nЭто программное обеспечение поставляется без каких либо гарантий. Подробности содержатся
в лицензии <a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a>.
</string>
<string name="btn_yes">Да</string>
<string name="btn_no">Нет</string>
<string name="btn_ok">Ок</string>
<string name="btn_cancel">Отмена</string>
<string name="btn_clear">Очистить</string>
<string name="map_gsp">СТЦ</string>
</resources>

Wyświetl plik

@ -21,7 +21,7 @@
<string name="app_name">Look4Sat</string>
<string name="app_version">Version: %s</string>
<string name="drawer_title">L∞king \n4Sat…</string>
<string name="drawer_title" translatable="false">L∞king \n4Sat…</string>
<string name="drawer_lat_text">Latitude: </string>
<string name="drawer_lon_text">Longitude: </string>
@ -29,10 +29,10 @@
<string name="update_loc_success">Location was updated</string>
<string name="update_tle">Update TLE file</string>
<string name="update_tle_success">TLE file was updated</string>
<string name="update_trans">Update transmitters DB</string>
<string name="update_trans_success">Transmitters database was updated</string>
<string name="update_trans">Update transceiver DB</string>
<string name="update_trans_success">Transceiver database was updated</string>
<string name="update_failure">Check your internet connection</string>
<string name="goto_github">GitHub</string>
<string name="goto_github" translatable="false">GitHub</string>
<string name="exit_app">Exit</string>
<string name="menu_pass_list">List of Passes</string>
@ -45,27 +45,27 @@
<string name="dialog_show_track">Show ground track for…</string>
<string name="dialog_filter_passes">Filter passes…</string>
<string name="pref_hours_ahead_key">hoursAhead</string>
<string name="pref_hours_ahead_key" translatable="false">hoursAhead</string>
<string name="pref_hours_ahead_hint">Hours ahead</string>
<string name="pref_hours_ahead_summary">Show passes that occur within X hours</string>
<string name="pref_hours_ahead_input_error">Set the value between 1h and 168h</string>
<string name="pref_min_el_key">minEl</string>
<string name="pref_min_el_key" translatable="false">minEl</string>
<string name="pref_min_el_hint">Minimum elevation</string>
<string name="pref_min_el_summary">Show passes with max elevation above</string>
<string name="pref_min_el_input_error">Set the value between 0° and 90°</string>
<string name="pref_gsp_title">Ground station position</string>
<string name="pref_lat_key">latitude</string>
<string name="pref_lat_key" translatable="false">latitude</string>
<string name="pref_lat_title">Latitude, deg</string>
<string name="pref_lat_input_error">Set the value between -90° and 90°</string>
<string name="pref_lon_key">longitude</string>
<string name="pref_lon_key" translatable="false">longitude</string>
<string name="pref_lon_title">Longitude, deg</string>
<string name="pref_lon_input_error">Set the value between -180° and 180°</string>
<string name="pref_alt_key">altitude</string>
<string name="pref_alt_key" translatable="false">altitude</string>
<string name="pref_alt_title">Altitude, m</string>
<string name="pref_alt_input_error">Set the value between -413m and 8850m</string>
<string name="pref_other_title">Other</string>
<string name="pref_refresh_rate_key">rate</string>
<string name="pref_refresh_rate_key" translatable="false">rate</string>
<string name="pref_refresh_rate_title">View refresh rate, ms</string>
<string name="pref_refresh_rate_input_error">Set the value between 250ms and 10000ms</string>
@ -73,7 +73,7 @@
<string name="no_uplink">Uplink: Null</string>
<string name="no_downlink">Downlink: Null</string>
<string name="no_selected_sat">No satellites were selected</string>
<string name="no_transmitters">No transmitters found for this Satellite</string>
<string name="no_trans">No transmitters found for this Satellite</string>
<string name="err_no_permissions">Missing permissions</string>
<string name="err_sat_wont_pass">Certain satellites shall not pass</string>
@ -83,29 +83,29 @@
<string name="err_no_tle_file">TLE file was not found</string>
<string name="err_no_selection_file">Selection file was not found</string>
<string name="pass_satName">%s</string>
<string name="pass_satId">Id: %d</string>
<string name="pass_satName" translatable="false">%s</string>
<string name="pass_satId" translatable="false">ID: %d</string>
<string name="pass_aos_az">AOS — %2d°</string>
<string name="pass_maxEl">MaxElev: %.1f°</string>
<string name="pass_los_az">%2d° — LOS</string>
<string name="pass_dateTime">MMM dd @ HH:mm:ss</string>
<string name="pass_dateTime" translatable="false">dd MMM @ HH:mm:ss</string>
<string name="polar_north">N</string>
<string name="polar_east">E</string>
<string name="polar_south">S</string>
<string name="polar_west">W</string>
<string name="polar_south">S</string>
<string name="polar_east">E</string>
<string name="pat_location">%.4f</string>
<string name="pat_location" translatable="false">%.4f</string>
<string name="pat_azimuth">Azimuth: %.1f°</string>
<string name="pat_elevation">Elevation: %.1f°</string>
<string name="pat_latitude">Latitude: %.1f°</string>
<string name="pat_longitude">Longitude: %.1f°</string>
<string name="pat_range">Range: %.0f km</string>
<string name="pat_range">Distance: %.0f km</string>
<string name="pat_altitude">Altitude: %.0f km</string>
<string name="pat_timer_aos">AOS -%02d:%02d:%02d</string>
<string name="pat_timer_los">LOS -%02d:%02d:%02d</string>
<string name="trans_description">%s</string>
<string name="trans_description" translatable="false">%s</string>
<string name="trans_mode">Mode: %s</string>
<string name="trans_inverted">Inverted: %s</string>
<string name="trans_up_low">Uplink: %.4f MHz</string>
@ -123,28 +123,28 @@
Press this button to select the satellites you wish to track</string>
<string name="about_subtitle">
Amateur radio &amp; weather satellites passes calculator for Android</string>
Amateur radio and weather satellites passes calculator for Android</string>
<string name="about_thanks_to">Big thanks:</string>
<string name="about_thanks_list">— To you for installing and using this app!
\nMay your sky always be clear! \n
\nMay your sky always be clear!\n
\n— To David A. B. Johnson, <a href="https://github.com/g4dpz">G4DPZ</a>, the author of
predict4java library which this app is using for all the SGP4 model calculations. \n
predict4java library which this app is using for all the SGP4 model calculations.\n
\n— To <a href="https://github.com/davidmoten">Dave Moten</a> for creating the mavenized fork
of predict4java which made it super easy to integrate the library in the app. Predict4java
is available under the
<a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a> license. \n
<a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a> license.\n
\n— To Alexandru Csete, <a href="https://github.com/csete">OZ9AEC</a>,
for his amazing Gpredict program which inspired the creation of Look4Sat. \n
for his amazing Gpredict program which inspired the creation of Look4Sat.\n
\n— To Guys from Square for creating an amazing set of libraries (OkHttp, Okio, Retrofit)
and for making them available under the
<a href="https://www.apache.org/licenses/LICENSE-2.0">Apache-2.0</a> license. \n
<a href="https://www.apache.org/licenses/LICENSE-2.0">Apache-2.0</a> license.\n
\n— To Guys from Google and AOSP for making the best mobile OS available nowadays, for their
Google Play Services, Gson and Dagger2 libs. \n
Google Play Services, Gson and Dagger2 libs.\n
\nThis application comes with absolutely no warranty. See the
<a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a> for details.
@ -157,5 +157,5 @@
<string name="btn_clear">Clear All</string>
<string name="map_gsp">GSP</string>
<string name="placeholder">Placeholder</string>
<string name="placeholder" translatable="false">Placeholder</string>
</resources>

Wyświetl plik

@ -65,7 +65,7 @@
</style>
<style name="DrawerHeader.ButtonText">
<item name="android:textSize">18sp</item>
<item name="android:textSize">17sp</item>
<item name="android:fontFamily">serif</item>
</style>
@ -88,13 +88,13 @@
<style name="CardPassText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">17sp</item>
<item name="android:textSize">16sp</item>
</style>
<style name="CardPassName">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">19sp</item>
<item name="android:textSize">18sp</item>
<item name="android:textColor">@color/themeAccent</item>
</style>