Removed array from strings.

This commit is contained in:
GaidamakUA 2016-01-18 14:46:53 +02:00
parent f3dcfb25c5
commit 141c567df8
30 changed files with 68 additions and 70 deletions

View file

@ -122,7 +122,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="right"
android:entries="@array/update_frequencies_array"
android:paddingLeft="0dp"/>
</LinearLayout>
@ -148,7 +147,6 @@
style="@style/OsmandLightTheme.Spinner"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:entries="@array/update_times_of_day"
android:gravity="right"
android:paddingLeft="0dp"/>
</LinearLayout>

View file

@ -2088,7 +2088,7 @@
<string name="daily">Штодзённа</string>
<string name="weekly">Штотыднёва</string>
<string name="morning">Раніца</string>
<string name="Night">Ноч</string>
<string name="night">Ноч</string>
<string name="shared_string_type">Тып</string>
<string name="starting_point">Пачатковы пункт</string>
<string name="shared_string_undo_all">ВЯРНУЦЬ УСЁ</string>

View file

@ -2039,7 +2039,7 @@
<string name="daily">Всеки ден</string>
<string name="weekly">Всяка седмица</string>
<string name="morning">Сутрин</string>
<string name="Night">През нощта</string>
<string name="night">През нощта</string>
<string name="switch_start_finish">Размяна на началната с крайна точка</string>
<string name="rendering_attr_hideIcons_name">Скриване на POI иконите</string>
<string name="item_removed">Изтрито</string>

View file

@ -1906,7 +1906,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu
<string name="daily">Cada dia</string>
<string name="weekly">Cada setmana</string>
<string name="morning">Matí</string>
<string name="Night">Nit</string>
<string name="night">Nit</string>
<string name="switch_start_finish">Intercanvi entre punts origen i destinació</string>
<string name="rendering_attr_hideIcons_name">Amaga les icones dels PDI</string>
<string name="item_removed">Element suprimit</string>

View file

@ -1910,6 +1910,6 @@
<string name="daily">Každý den</string>
<string name="weekly">Jednou týdně</string>
<string name="morning">Ráno</string>
<string name="Night">V noci</string>
<string name="night">V noci</string>
<string name="select_month_and_country">Vyberte měsíc a krajinu</string>
</resources>

View file

@ -2216,7 +2216,7 @@
<string name="daily">Daglig</string>
<string name="weekly">Ugentlig</string>
<string name="morning">Morgen</string>
<string name="Night">Aften</string>
<string name="night">Aften</string>
<string name="shared_string_not_selected">Ikke markeret</string>
<string name="select_month_and_country">Vælg måned og land</string>

View file

@ -1992,7 +1992,7 @@
<string name="daily">Täglich</string>
<string name="weekly">Wöchentlich</string>
<string name="morning">Morgens</string>
<string name="Night">Nachts</string>
<string name="night">Nachts</string>
<string name="shared_string_not_selected">Nicht ausgewählt</string>
<string name="select_month_and_country">Wähle Monat und Land</string>

View file

@ -2036,7 +2036,7 @@
<string name="daily">Diario</string>
<string name="weekly">Semanal</string>
<string name="morning">Por la mañana</string>
<string name="Night">Por la noche</string>
<string name="night">Por la noche</string>
<string name="shared_string_not_selected">No seleccionado</string>
<string name="select_month_and_country">Elige mes y país</string>

View file

@ -2034,7 +2034,7 @@
<string name="daily">Cada día</string>
<string name="weekly">Cada semana</string>
<string name="morning">Por la mañana</string>
<string name="Night">Por la noche</string>
<string name="night">Por la noche</string>
<string name="shared_string_not_selected">No seleccionado</string>
<string name="select_month_and_country">Seleccione mes y país</string>

View file

@ -2096,7 +2096,7 @@
<string name="daily">Quotidien</string>
<string name="weekly">Hebdomadaire</string>
<string name="morning">Matin</string>
<string name="Night">Nuit</string>
<string name="night">Nuit</string>
<string name="select_month_and_country">Choisissez un mois et un pays</string>
<string name="item_removed">Élément supprimé</string>

View file

@ -2019,6 +2019,6 @@
<string name="daily">Cada día</string>
<string name="weekly">Cada semana</string>
<string name="morning">Mañá</string>
<string name="Night">Noite</string>
<string name="night">Noite</string>
<string name="select_month_and_country">Seleccione o mes e o país</string>
</resources>

View file

@ -2075,6 +2075,6 @@
<string name="daily">Naponta</string>
<string name="weekly">Hetente</string>
<string name="morning">Reggel</string>
<string name="Night">Este</string>
<string name="night">Este</string>
<string name="select_month_and_country">Hónap és ország kiválasztása</string>
</resources>

View file

@ -2129,7 +2129,7 @@
<string name="daily">Giornaliero</string>
<string name="weekly">Settimanale</string>
<string name="morning">Mattina</string>
<string name="Night">Notte</string>
<string name="night">Notte</string>
<string name="shared_string_not_selected">Non selezionato</string>
<string name="shared_string_type">Tipo</string>

View file

@ -66,7 +66,7 @@
<string name="available_maps">Nexeyen kû hane</string>
<string name="rendering_category_details">Berfireh</string>
<string name="rendering_category_hide">Veşera</string>
<string name="Night">şev</string>
<string name="night">şev</string>
<string name="morning">Beyanî</string>
<string name="daily">Rojane</string>
<string name="weekly">Hefteyî</string>

View file

@ -2091,5 +2091,5 @@
<string name="daily">Kasdien</string>
<string name="weekly">Kas savaitę</string>
<string name="morning">Rytą</string>
<string name="Night">Naktį</string>
<string name="night">Naktį</string>
</resources>

View file

@ -2154,7 +2154,7 @@
<string name="daily">Elke dag</string>
<string name="weekly">Elke week</string>
<string name="morning">\'s ochtends</string>
<string name="Night">\'s avonds</string>
<string name="night">\'s avonds</string>
<string name="shared_string_not_selected">Niet geselecteerd</string>
<string name="select_month_and_country">Kies maand en kaart</string>

View file

@ -2080,6 +2080,6 @@
<string name="daily">Dzienny</string>
<string name="weekly">Tygodniowo</string>
<string name="morning">Rano</string>
<string name="Night">Noc</string>
<string name="night">Noc</string>
<string name="select_month_and_country">Wybierz miesiąc i kraj</string>
</resources>

View file

@ -1983,7 +1983,7 @@
<string name="daily">Diariamente</string>
<string name="weekly">Semanalmente</string>
<string name="morning">Pela manhã</string>
<string name="Night">À noite</string>
<string name="night">À noite</string>
<string name="shared_string_not_selected">Nada selecionado</string>
<string name="select_month_and_country">Selecione o mês e o país</string>
<string name="shared_string_type">Tipo</string>

View file

@ -1917,7 +1917,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="available_maps">Mapas disponíveis</string>
<string name="select_voice_provider">Escolher orientação por voz</string>
<string name="select_voice_provider_descr">Escolher ou fazer download de \'orientação por voz\' para a sua linguagem</string>
<string name="Night">Noite</string>
<string name="night">Noite</string>
<string name="dashboard_or_drawer_description">Há uma nova opção para controlar principalmente o aplicativo através do painel flexível (Dashboard) ou um menu estático. A sua escolha pode sempre ser alterada nas configurações do painel.</string>
<string name="dashboard_or_drawer_title">Dashboard ou menu de controle</string>
<string name="update">Actualizar em cada</string>

View file

@ -1894,6 +1894,6 @@
<string name="update_time">Время обновления</string>
<string name="number_of_contributors">Количество участников</string>
<string name="number_of_edits">Количество правок</string>
<string name="Night">Ночь</string>
<string name="night">Ночь</string>
<string name="morning">Утро</string>
</resources>

View file

@ -2071,7 +2071,7 @@
<string name="daily">Cada die</string>
<string name="weekly">Cada chida</string>
<string name="morning">Mangianu</string>
<string name="Night">Note</string>
<string name="night">Note</string>
<string name="updates_size">Mannària agiornamentos</string>
<string name="select_month_and_country">Ischerta mese e istadu</string>

View file

@ -1912,7 +1912,7 @@
<string name="daily">Každý deň</string>
<string name="weekly">Raz za týždeň</string>
<string name="morning">Ráno</string>
<string name="Night">V noci</string>
<string name="night">V noci</string>
<string name="shared_string_type">Typ</string>
<string name="starting_point">Východzí bod</string>

View file

@ -2074,7 +2074,7 @@
<string name="daily">Dnevno</string>
<string name="weekly">Tedensko</string>
<string name="morning">Zjutraj</string>
<string name="Night">Zvečer</string>
<string name="night">Zvečer</string>
<string name="rec_split">Razdelilnik posnetkov</string>
<string name="rec_split_title">Uporabi razdelilnik posnetkov</string>
<string name="rec_split_desc">Prepiši starejše posnetke, ko velikost posnetka preseže omejitev</string>

View file

@ -745,7 +745,7 @@
<string name="rec_split_clip_length_desc">Сваки одсечак снимка неће бити дужи од одабраног времена</string>
<string name="rec_split_storage_size">Величина оставе</string>
<string name="rec_split_storage_size_desc">Величина заузећа свих снимљених одсечака</string>
<string name="Night">Ноћ</string>
<string name="night">Ноћ</string>
<string name="shared_string_go">Иди</string>
<string name="shared_string_not_selected">Није означено</string>
<string name="osmand_parking_hour">h</string>

View file

@ -2052,7 +2052,7 @@
<string name="updates_size">Uppdateringar: %s</string>
<string name="last_map_change">Senaste kartändring: %s</string>
<string name="Night">Natt</string>
<string name="night">Natt</string>
<string name="hourly">Varje timma</string>
<string name="daily">Varje dag</string>
<string name="weekly">Varje vecka</string>

View file

@ -2022,7 +2022,7 @@
<string name="daily">Günlük</string>
<string name="weekly">Haftalık</string>
<string name="morning">Sabah</string>
<string name="Night">Gece</string>
<string name="night">Gece</string>
<string name="updates_size">Güncelleme boyutu</string>
<string name="select_month_and_country">Ayı ve ülke seçin</string>

View file

@ -2062,7 +2062,7 @@
<string name="daily">每日</string>
<string name="weekly">每週</string>
<string name="morning">早上</string>
<string name="Night">夜間</string>
<string name="night">夜間</string>
<string name="shared_string_not_selected">未選取</string>
<string name="select_month_and_country">選擇月份與國家</string>

View file

@ -40,15 +40,6 @@
<string name="no_microphone_permission">App have no permission to access microphone.</string>
<string name="route_distance">Distance:</string>
<string name="route_duration">Time:</string>
<string-array name="update_frequencies_array">
<item>Every Hour</item>
<item>Once a day</item>
<item>Weekly</item>
</string-array>
<string-array name="update_times_of_day">
<item>Morning</item>
<item>Night</item>
</string-array>
<string name="rendering_attr_horseRoutes_name">Horse routes</string>
<string name="no_address_found">No address determined</string>
<string name="shared_string_near">Near</string>
@ -2158,7 +2149,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="daily">Daily</string>
<string name="weekly">Weekly</string>
<string name="morning">Morning</string>
<string name="Night">Night</string>
<string name="night">Night</string>
<string name="select_month_and_country">Select month and country</string>
<string name="number_of_contributors">Number of contributors</string>
<string name="number_of_edits">Number of edits</string>

View file

@ -126,7 +126,7 @@ public class LiveUpdatesHelper {
public static enum TimeOfDay {
MORNING(R.string.morning),
NIGHT(R.string.Night);
NIGHT(R.string.night);
private final int localizedId;
TimeOfDay(int localizedId) {

View file

@ -1,32 +1,5 @@
package net.osmand.plus.liveupdates;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.DEFAULT_LAST_CHECK;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.formatDateTime;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getNameToDisplay;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getPendingIntent;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceDownloadViaWiFi;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceForLocalIndex;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLastCheck;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceTimeOfDayToUpdate;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceUpdateFrequency;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.setAlarmForPendingIntent;
import java.io.File;
import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.LocalIndexInfo;
import net.osmand.plus.download.AbstractDownloadActivity;
import net.osmand.plus.download.DownloadActivity;
import net.osmand.plus.liveupdates.LiveUpdatesHelper.TimeOfDay;
import net.osmand.plus.liveupdates.LiveUpdatesHelper.UpdateFrequency;
import net.osmand.plus.resources.IncrementalChangesManager;
import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
import android.app.AlarmManager;
import android.app.Dialog;
import android.app.PendingIntent;
@ -45,6 +18,33 @@ import android.widget.CheckBox;
import android.widget.Spinner;
import android.widget.TextView;
import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.LocalIndexInfo;
import net.osmand.plus.download.AbstractDownloadActivity;
import net.osmand.plus.download.DownloadActivity;
import net.osmand.plus.liveupdates.LiveUpdatesHelper.TimeOfDay;
import net.osmand.plus.liveupdates.LiveUpdatesHelper.UpdateFrequency;
import net.osmand.plus.resources.IncrementalChangesManager;
import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
import java.io.File;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.DEFAULT_LAST_CHECK;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.formatDateTime;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getNameToDisplay;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getPendingIntent;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceDownloadViaWiFi;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceForLocalIndex;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLastCheck;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceTimeOfDayToUpdate;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceUpdateFrequency;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.setAlarmForPendingIntent;
public class LiveUpdatesSettingsDialogFragment extends DialogFragment {
private static final Log LOG = PlatformUtil.getLog(LiveUpdatesAlarmReceiver.class);
private static final String LOCAL_INDEX = "local_index";
@ -92,14 +92,23 @@ public class LiveUpdatesSettingsDialogFragment extends DialogFragment {
sizeTextView.setText(getUpdatesSize(fileNameWithoutExtension, changesManager));
TimeOfDay[] timeOfDays = TimeOfDay.values();
String[] timeOfDaysStrings = new String[timeOfDays.length];
for (int i = 0; i < timeOfDays.length; i++) {
timeOfDaysStrings[i] = getString(timeOfDays[i].getLocalizedId());
}
updateTimesOfDaySpinner.setAdapter(new ArrayAdapter<String>(getActivity(),
R.layout.action_spinner_item,
getResources().getStringArray(R.array.update_times_of_day)));
R.layout.action_spinner_item, timeOfDaysStrings));
updateTimesOfDaySpinner.setSelection(timeOfDayPreference.get());
UpdateFrequency[] updateFrequencies = UpdateFrequency.values();
String[] updateFrequenciesStrings = new String[updateFrequencies.length];
for (int i = 0; i < updateFrequencies.length; i++) {
updateFrequenciesStrings[i] = getString(updateFrequencies[i].getLocalizedId());
}
updateFrequencySpinner.setAdapter(new ArrayAdapter<String>(getActivity(),
R.layout.action_spinner_item,
getResources().getStringArray(R.array.update_frequencies_array)));
R.layout.action_spinner_item, updateFrequenciesStrings));
updateFrequencySpinner.setSelection(updateFrequencyPreference.get());
updateFrequencySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override