translation into russian

change settings layout

git-svn-id: https://osmand.googlecode.com/svn/trunk@166 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Olga.shcherb 2010-06-16 11:01:19 +00:00
parent 42426f041f
commit 881d88ef40
6 changed files with 233 additions and 121 deletions

View file

@ -14,9 +14,8 @@
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_width="140dip"
android:layout_height="90dip"
android:drawableLeft="@drawable/map"/>
android:drawableLeft="@drawable/map" android:layout_width="150dip"/>
<Button
android:id="@+id/SearchButton"
@ -24,9 +23,8 @@
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_width="140dip"
android:layout_height="90dip"
android:drawableLeft="@drawable/find"/>
android:drawableLeft="@drawable/find" android:layout_width="150dip"/>
</TableRow>
<TableRow>
<Button
@ -35,7 +33,7 @@
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_width="140dip"
android:layout_width="150dip"
android:layout_height="90dip"
android:drawableLeft="@drawable/favorites"/>
<Button
@ -44,7 +42,7 @@
android:background="@drawable/btn_orange"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_width="140dip"
android:layout_width="150dip"
android:layout_height="90dip"
android:drawableLeft="@drawable/settings"/>
</TableRow>

View file

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="osm_settings_descr">Упраление слоем open street bugs, установка osm логина </string>
<string name="monitor_preferences_descr">Включение мониторинга, установка интервала сохранения</string>
<string name="search_settings_descr">Настройка параметров поиска</string>
<string name="map_preferences_descr">Настройка источника, параметров карты, доступа в Интернет</string>
<string name="search_settings">Поиск</string>
<string name="osm_settings">Osm</string>
<string name="auto_zoom_map_descr">Автоматически измемять масштаб карты при изменении скорости</string>
<string name="auto_zoom_map">Масштаб</string>
<string name="additional_settings">Дополнительные настройки</string>
<string name="settings_preset_descr">Выбор режима работы приложения</string>
<string name="settings_preset">Режим работы</string>
<string name="settings">Настройки</string>
<string name="save_current_track_descr">Сохранить текущий путь на SD</string>
<string name="save_current_track">Сохранить путь</string>
<string name="save_track_interval_descr">Указать интервал между сохранениями пути</string>
<string name="save_track_interval">Интервал сохранения</string>
<string name="monitor_preferences">Мониторинг</string>
<string name="save_track_to_gpx_descrp">Сохранять путь в gpx формате в папку track</string>
<string name="save_track_to_gpx">Мониторить</string>
<string name="navigate_to">Перейти к</string>
<string name="update_tile">Обновить карту</string>
<string name="reload_tile">Обновить часть карты</string>
<string name="user_name_descr">Указать имя пользователя для работы с OSM</string>
<string name="user_name">Имя пользователя</string>
<string name="mark_point">Цель</string>
<string name="show_osm_bugs_descr">Показывать слой Open Street Bugs</string>
<string name="show_osm_bugs">Open Street Bugs</string>
<string name="favourites_activity">Список избранных точек</string>
<string name="add_to_favourite">Добавить к избранным</string>
<string name="use_english_names_descr">Использовать местные или английские названия</string>
<string name="use_english_names">Английские названия</string>
<string name="app_settings">Настройки приложения</string>
<string name="search_address">Искать адрес</string>
<string name="choose_building">Выберите здание</string>
<string name="choose_street">Выберите улицу</string>
<string name="choose_city">Выберите город</string>
<string name="ChooseCountry">Выберите страну</string>
<string name="position_on_map_descr">Установить расположение текущей позиции на карте</string>
<string name="position_on_map">Текущая позиция</string>
<string name="map_specify_point">Перейти к точке</string>
<string name="show_view_angle_descr">Показывать угол обзора в соответствии с компасом</string>
<string name="show_view_angle">Угол обзора</string>
<string name="stop_navigation">Снять отметку</string>
<string name="navigate_to_point">Отметить точку</string>
<string name="map_view_3d_descr">Вклюсить 3D вид для карты</string>
<string name="map_view_3d">3D вид</string>
<string name="rotate_map_to_bearing_descr">Вращать карту при изменении направления движения</string>
<string name="rotate_map_to_bearing">Вращать карту</string>
<string name="show_poi_over_map_description">Показывать слой POI</string>
<string name="show_poi_over_map">POI</string>
<string name="map_tile_source_descr">Загружать недостающие части карты из:</string>
<string name="map_tile_source">Источник данных</string>
<string name="map_source">Источник карты</string>
<string name="use_internet">Интернет</string>
<string name="show_location">Показать место</string>
<string name="map_preferences">Карта</string>
<string name="settings_activity">Настройки</string>
<string name="show_gps_coordinates_text">Показать gps координаты на карте</string>
<string name="use_internet_to_download_tile">Использовать Интернет для загрузки недостающих частей карты</string>
<string name="hello">Hello World, StartActivity!</string>
<string name="app_name">OsmAnd</string>
<string name="exit_Button">Выход</string>
<string name="map_Button">Карта</string>
<string name="settings_Button">Настройки</string>
<string name="favorites_Button">Избранное</string>
<string name="search_button">Поиск</string>
<color name="menu_background">#FF9030</color>
<string name="search_activity">Поиск</string>
<color name="color_white">#FFFFFF</color>
<color name="color_red">#FF0000</color>
<string name="searchpoi_activity">Choose poi</string>
<string name="search_POI_level_btn">Find more</string>
<string name="incremental_search_city">Search city incrementally. In order to find villages input more than 3 first symbols.</string>
<string name="incremental_search_street">Search street incrementally</string>
<string name="incremental_search_building">Search building incrementally</string>
<string name="choose_available_region">Choose region</string>
<string name="choose_intersected_street">Choose intersected street</string>
<string name="Closest_Amenities">Closest amenities</string>
<string name="app_mode_default">По умолчанию</string>
<string name="app_mode_car">Автомобиль</string>
<string name="app_mode_bicycle">Велосипед</string>
<string name="app_mode_pedestrian">Пешеход</string>
<string name="position_on_map_center">В центре</string>
<string name="position_on_map_bottom">Внизу</string>
</resources>

View file

@ -79,4 +79,10 @@
<string name="choose_available_region">Choose region</string>
<string name="choose_intersected_street">Choose intersected street</string>
<string name="Closest_Amenities">Closest amenities</string>
<string name="app_mode_default">Default</string>
<string name="app_mode_car">Car</string>
<string name="app_mode_bicycle">Bicycle</string>
<string name="app_mode_pedestrian">Pedestrian</string>
<string name="position_on_map_center">Center</string>
<string name="position_on_map_bottom">Bottom</string>
</resources>

View file

@ -7,11 +7,11 @@
<PreferenceScreen android:title="@string/map_preferences" android:summary="@string/map_preferences_descr">
<CheckBoxPreference android:key="use_internet_to_download_tiles" android:title="@string/use_internet" android:summary="@string/use_internet_to_download_tile"></CheckBoxPreference>
<CheckBoxPreference android:key="show_poi_over_map" android:title="@string/show_poi_over_map" android:summary="@string/show_poi_over_map_description"></CheckBoxPreference>
<ListPreference android:title="@string/map_tile_source" android:summary="@string/map_tile_source_descr" android:key="map_tile_sources"></ListPreference>
<CheckBoxPreference android:key="show_poi_over_map" android:title="@string/show_poi_over_map" android:summary="@string/show_poi_over_map_description"></CheckBoxPreference>
<CheckBoxPreference android:title="@string/auto_zoom_map" android:summary="@string/auto_zoom_map_descr" android:key="auto_zoom_map"></CheckBoxPreference>
<CheckBoxPreference android:key="rotate_map_to_bearing" android:title="@string/rotate_map_to_bearing" android:summary="@string/rotate_map_to_bearing_descr"></CheckBoxPreference>
<CheckBoxPreference android:key="show_view_angle" android:title="@string/show_view_angle" android:summary="@string/show_view_angle_descr"></CheckBoxPreference>
<CheckBoxPreference android:key="rotate_map_to_bearing" android:title="@string/rotate_map_to_bearing" android:summary="@string/rotate_map_to_bearing_descr"></CheckBoxPreference>
<ListPreference android:key="position_on_map" android:title="@string/position_on_map" android:summary="@string/position_on_map_descr"></ListPreference>
</PreferenceScreen>

View file

@ -14,19 +14,24 @@ import com.osmand.osm.LatLon;
public class OsmandSettings {
public enum ApplicationMode {
DEFAULT("Default"),
CAR("Car"),
BICYCLE("Bicycle"),
PEDESTRIAN("Pedestrian");
/*
* DEFAULT("Default"), CAR("Car"), BICYCLE("Bicycle"), PEDESTRIAN("Pedestrian");
*/
private final String name;
ApplicationMode(String name){
this.name = name;
DEFAULT(R.string.app_mode_default),
CAR(R.string.app_mode_car),
BICYCLE(R.string.app_mode_bicycle),
PEDESTRIAN(R.string.app_mode_pedestrian);
private final int key;
ApplicationMode(int key) {
this.key = key;
}
@Override
public String toString() {
return name;
public static String toHumanString(ApplicationMode m, Context ctx){
return ctx.getResources().getString(m.key);
}
}
// These settings are stored in SharedPreferences
@ -37,6 +42,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String USE_INTERNET_TO_DOWNLOAD_TILES = "use_internet_to_download_tiles";
public static boolean isUsingInternetToDownloadTiles(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(USE_INTERNET_TO_DOWNLOAD_TILES, true);
@ -44,6 +50,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String SHOW_POI_OVER_MAP = "show_poi_over_map";
public static boolean isShowingPoiOverMap(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(SHOW_POI_OVER_MAP, false);
@ -51,6 +58,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String USER_NAME = "user_name";
public static String getUserName(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getString(USER_NAME, "NoName");
@ -63,6 +71,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String APPLICATION_MODE = "application_mode";
public static ApplicationMode getApplicationMode(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
String s = prefs.getString(APPLICATION_MODE, ApplicationMode.DEFAULT.name());
@ -83,6 +92,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String SAVE_TRACK_TO_GPX = "save_track_to_gpx";
public static boolean isSavingTrackToGpx(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(SAVE_TRACK_TO_GPX, false);
@ -90,14 +100,15 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String SAVE_TRACK_INTERVAL = "save_track_interval";
public static int getSavingTrackInterval(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getInt(SAVE_TRACK_INTERVAL, 5);
}
// this value string is synchronized with settings_pref.xml preference name
public static final String SHOW_OSM_BUGS = "show_osm_bugs";
public static boolean isShowingOsmBugs(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(SHOW_OSM_BUGS, false);
@ -105,6 +116,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String SHOW_VIEW_ANGLE = "show_view_angle";
public static boolean isShowingViewAngle(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(SHOW_VIEW_ANGLE, true);
@ -112,6 +124,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String AUTO_ZOOM_MAP = "auto_zoom_map";
public static boolean isAutoZoomEnabled(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(AUTO_ZOOM_MAP, false);
@ -119,6 +132,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String ROTATE_MAP_TO_BEARING = "rotate_map_to_bearing";
public static boolean isRotateMapToBearing(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(ROTATE_MAP_TO_BEARING, false);
@ -126,6 +140,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String POSITION_ON_MAP = "position_on_map";
public static int getPositionOnMap(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getInt(POSITION_ON_MAP, CENTER_CONSTANT);
@ -133,6 +148,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String MAP_VIEW_3D = "map_view_3d";
public static boolean isMapView3D(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(MAP_VIEW_3D, false);
@ -140,6 +156,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public static final String USE_ENGLISH_NAMES = "use_english_names";
public static boolean usingEnglishNames(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(USE_ENGLISH_NAMES, false);
@ -150,9 +167,9 @@ public class OsmandSettings {
return prefs.edit().putBoolean(USE_ENGLISH_NAMES, useEnglishNames).commit();
}
// this value string is synchronized with settings_pref.xml preference name
public static final String MAP_TILE_SOURCES = "map_tile_sources";
public static ITileSource getMapTileSource(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
String tileName = prefs.getString(MAP_TILE_SOURCES, null);
@ -181,6 +198,7 @@ public class OsmandSettings {
public static final String LAST_KNOWN_MAP_LON = "last_known_map_lon";
public static final String IS_MAP_SYNC_TO_GPS_LOCATION = "is_map_sync_to_gps_location";
public static final String LAST_KNOWN_MAP_ZOOM = "last_known_map_zoom";
public static LatLon getLastKnownMapLocation(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
float lat = prefs.getFloat(LAST_KNOWN_MAP_LAT, 0);
@ -210,6 +228,7 @@ public class OsmandSettings {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.edit().putBoolean(IS_MAP_SYNC_TO_GPS_LOCATION, value).commit();
}
public static boolean isMapSyncToGpsLocation(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.getBoolean(IS_MAP_SYNC_TO_GPS_LOCATION, true);
@ -227,7 +246,6 @@ public class OsmandSettings {
edit.commit();
}
public final static String POINT_NAVIGATE_LAT = "point_navigate_lat";
public final static String POINT_NAVIGATE_LON = "point_navigate_lon";
@ -264,8 +282,8 @@ public class OsmandSettings {
public static boolean setLastSearchedRegion(Context ctx, String region) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
Editor edit = prefs.edit().putString(LAST_SEARCHED_REGION, region).putLong(LAST_SEARCHED_CITY, -1).
putString(LAST_SEARCHED_STREET,"").putString(LAST_SEARCHED_BUILDING, "");
Editor edit = prefs.edit().putString(LAST_SEARCHED_REGION, region).putLong(LAST_SEARCHED_CITY, -1).putString(LAST_SEARCHED_STREET,
"").putString(LAST_SEARCHED_BUILDING, "");
if (prefs.contains(LAST_SEARCHED_INTERSECTED_STREET)) {
edit.putString(LAST_SEARCHED_INTERSECTED_STREET, "");
}
@ -279,8 +297,8 @@ public class OsmandSettings {
public static boolean setLastSearchedCity(Context ctx, Long cityId) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
Editor edit = prefs.edit().putLong(LAST_SEARCHED_CITY, cityId).putString(LAST_SEARCHED_STREET, "").
putString(LAST_SEARCHED_BUILDING, "");
Editor edit = prefs.edit().putLong(LAST_SEARCHED_CITY, cityId).putString(LAST_SEARCHED_STREET, "").putString(
LAST_SEARCHED_BUILDING, "");
if (prefs.contains(LAST_SEARCHED_INTERSECTED_STREET)) {
edit.putString(LAST_SEARCHED_INTERSECTED_STREET, "");
}
@ -311,7 +329,6 @@ public class OsmandSettings {
return prefs.edit().putString(LAST_SEARCHED_BUILDING, building).remove(LAST_SEARCHED_INTERSECTED_STREET).commit();
}
public static String getLastSearchedIntersectedStreet(Context ctx) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
if (!prefs.contains(LAST_SEARCHED_INTERSECTED_STREET)) {
@ -331,6 +348,7 @@ public class OsmandSettings {
}
public static final String SELECTED_POI_FILTER_FOR_MAP = "selected_poi_filter_for_map";
public static boolean setPoiFilterForMap(Context ctx, String filterId) {
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
return prefs.edit().putString(SELECTED_POI_FILTER_FOR_MAP, filterId).commit();

View file

@ -5,6 +5,7 @@ import java.util.List;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.Resources;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
@ -76,7 +77,6 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
tileSourcePreference =(ListPreference) screen.findPreference(OsmandSettings.MAP_TILE_SOURCES);
tileSourcePreference.setOnPreferenceChangeListener(this);
}
@Override
@ -94,7 +94,9 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
saveTrackToGpx.setChecked(OsmandSettings.isSavingTrackToGpx(this));
useEnglishNames.setChecked(OsmandSettings.usingEnglishNames(this));
autoZoom.setChecked(OsmandSettings.isAutoZoomEnabled(this));
String[] e = new String[] { "Center", "Bottom" };
Resources resources = this.getResources();
String[] e = new String[] {resources.getString(R.string.position_on_map_center),
resources.getString(R.string.position_on_map_bottom)};
positionOnMap.setEntryValues(e);
positionOnMap.setEntries(e);
positionOnMap.setValueIndex(OsmandSettings.getPositionOnMap(this));
@ -108,7 +110,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
String[] values = new String[presets.length];
String[] valueEntries = new String[presets.length];
for(int i=0; i<presets.length; i++){
values[i] = presets[i].toString();
values[i] = ApplicationMode.toHumanString(presets[i], this);
valueEntries[i] = presets[i].name();
}
applicationMode.setEntries(values);