android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
- android:title="@string/action_settings"/>
+ android:title="@string/weather_preferences_action_settings"/>
</menu>
<item
android:id="@+id/weather_menu_settings"
android:menuCategory="system"
- android:title="@string/action_settings"
- android:titleCondensed="@string/action_settings"
+ android:title="@string/weather_preferences_action_settings"
+ android:titleCondensed="@string/weather_preferences_action_settings"
android:checked="false"
android:visible="true"
android:checkable="false"
android:checkable="false"
android:enabled="true"
android:checked="false"
- android:title="@string/action_map"
- android:titleCondensed="@string/action_map">
+ android:title="@string/weather_map_action_map"
+ android:titleCondensed="@string/weather_map_action_map">
</item>
<item>half day</item>
<item>one day</item>
</string-array>
- <string-array name="weather_preferences_units_value">
+ <string-array name="weather_preferences_temperature">
<item>@string/weather_preferences_temperature_celsius</item>
<item>@string/weather_preferences_temperature_fahrenheit</item>
<item>@string/weather_preferences_temperature_kelvin</item>
</string-array>
- <string-array name="weather_preferences_units_human_value">
+ <string-array name="weather_preferences_temperature_human_value">
<item>@string/weather_preferences_temperature_celsius_human_value</item>
<item>@string/weather_preferences_temperature_fahrenheit_human_value</item>
<item>@string/weather_preferences_temperature_kelvin_human_value</item>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<string name="app_name">Weather Information</string>
- <string name="action_settings">Settings</string>
- <string name="action_map">Select Location</string>
- <string name="uri_api_weather_today">http://api.openweathermap.org/data/{0}/weather?lat={1}&lon={2}&cnt=1</string>
- <string name="uri_api_weather_forecast">http://api.openweathermap.org/data/{0}/forecast/daily?lat={1}&lon={2}&cnt={3}&mode=json</string>
- <string name="api_version">2.5</string>
+ <string name="icon_weather_description">Icon weather</string>
+
+
+ <!-- Activities Current, Overview and Specific -->
<string name="text_field_sun_rise">SUN RISE</string>
<string name="text_field_sun_set">SUN SET</string>
<string name="text_field_feels_like">FEELS LIKE</string>
<string name="text_field_snow">SNOW</string>
<string name="text_field_pressure">PRESSURE</string>
<string name="text_field_humidity">HUMIDITY</string>
- <string name="button_ok">OK</string>
- <string name="icon_weather_description">Icon weather</string>
- <string name="weather_preferences_actionbar_title">Settings</string>
+ <string name="text_units_mm3h">mm 3h</string>
+ <string name="text_units_percent">%</string>
+ <string name="text_field_remote_error">No data available</string>
+
+
+ <!-- Preferences Acitivity -->
+ <string name="weather_preferences_action_settings">Settings</string>
<string name="weather_preferences_units">Units</string>
<string name="weather_preferences_temperature_key">weather_preferences_temperature</string>
<string name="weather_preferences_temperature">Temperature</string>
<string name="weather_preferences_pressure_standard_atm">atm</string>
<string name="weather_preferences_pressure_human_value_pascal">pascal</string>
<string name="weather_preferences_pressure_human_value_standard_atm">standard atmosphere</string>
+
+
+ <!-- Widget Preferences Activity -->
+ <string name="widget_preferences_action_settings">Settings</string>
<string name="widget_preferences_units">Units</string>
- <string name="widget_preferences_units_key">widget_preferences_units</string>
+ <string name="widget_preferences_temperature_key">widget_preferences_temperature</string>
<string name="widget_preferences_refresh_interval_key">widget_preferences_refresh_interval</string>
<string name="widget_preferences_refresh_interval">Refresh interval</string>
+
+
+ <!-- Map Activity -->
+ <string name="weather_map_action_map">Select Location</string>
<string name="city_not_found">city not found</string>
<string name="country_not_found">country not found</string>
<string name="progress_dialog_generic_message">Please wait…</string>
- <string name="title_section1">Section 1</string>
- <string name="title_section2">Section 2</string>
- <string name="title_section3">Section 3</string>
<string name="weather_map_button_savelocation">Save Location</string>
<string name="weather_map_button_getlocation">Get Location</string>
- <string name="text_units_mm3h">mm 3h</string>
- <string name="text_units_percent">%</string>
- <string name="text_field_remote_error">No data available</string>
+
+
+ <!-- DO NOT TRANSLATE -->
+ <string name="uri_api_weather_today">http://api.openweathermap.org/data/{0}/weather?lat={1}&lon={2}&cnt=1</string>
+ <string name="uri_api_weather_forecast">http://api.openweathermap.org/data/{0}/forecast/daily?lat={1}&lon={2}&cnt={3}&mode=json</string>
+ <string name="api_version">2.5</string>
</resources>
android:defaultValue="300000"
android:summary="five minutes" />
<PreferenceCategory android:title="@string/widget_preferences_units">
- <ListPreference android:key="@string/widget_preferences_units_key"
+ <ListPreference android:key="@string/widget_preferences_temperature_key"
android:title="@string/weather_preferences_temperature"
android:summary="celsius"
- android:entries="@array/weather_preferences_units_human_value"
- android:entryValues="@array/weather_preferences_units_value"
+ android:entries="@array/weather_preferences_temperature_human_value"
+ android:entryValues="@array/weather_preferences_temperature"
android:selectable="true"
android:persistent="true"
android:defaultValue="ÂșC" />
<ListPreference android:key="@string/weather_preferences_temperature_key"
android:title="@string/weather_preferences_temperature"
android:summary="@string/weather_preferences_temperature_celsius_human_value"
- android:entries="@array/weather_preferences_units_human_value"
- android:entryValues="@array/weather_preferences_units_value"
+ android:entries="@array/weather_preferences_temperature_human_value"
+ android:entryValues="@array/weather_preferences_temperature"
android:selectable="true"
android:persistent="true"
android:defaultValue="@string/weather_preferences_temperature_celsius" />
UnitsConversor tempUnitsConversor;
String keyPreference = this.getResources().getString(R.string.weather_preferences_temperature_key);
String unitsPreferenceValue = sharedPreferences.getString(keyPreference, "");
- String[] values = this.getResources().getStringArray(R.array.weather_preferences_units_value);
+ String[] values = this.getResources().getStringArray(R.array.weather_preferences_temperature);
if (unitsPreferenceValue.equals(values[0])) {
tempSymbol = values[0];
tempUnitsConversor = new UnitsConversor(){
super.onResume();
final ActionBar actionBar = this.getActionBar();
- actionBar.setTitle(this.getString(R.string.weather_preferences_actionbar_title));
+ actionBar.setTitle(this.getString(R.string.weather_preferences_action_settings));
}
}
UnitsConversor tempUnitsConversor;
String keyPreference = this.getResources().getString(R.string.weather_preferences_temperature_key);
String unitsPreferenceValue = sharedPreferences.getString(keyPreference, "");
- String[] values = this.getResources().getStringArray(R.array.weather_preferences_units_value);
+ String[] values = this.getResources().getStringArray(R.array.weather_preferences_temperature);
if (unitsPreferenceValue.equals(values[0])) {
tempSymbol = values[0];
tempUnitsConversor = new UnitsConversor(){
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
-import de.example.exampletdd.R;
public class ErrorDialogFragment extends DialogFragment {
return new AlertDialog.Builder(this.getActivity())
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(title)
- .setPositiveButton(R.string.button_ok,
+ .setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog,
UnitsConversor tempUnitsConversor;
String keyPreference = this.getResources().getString(R.string.weather_preferences_temperature_key);
String unitsPreferenceValue = sharedPreferences.getString(keyPreference, "");
- String[] values = this.getResources().getStringArray(R.array.weather_preferences_units_value);
+ String[] values = this.getResources().getStringArray(R.array.weather_preferences_temperature);
if (unitsPreferenceValue.equals(values[0])) {
tempSymbol = values[0];
tempUnitsConversor = new UnitsConversor(){
String keyPreference = this.getResources().getString(
R.string.weather_preferences_temperature_key);
final String unitsPreferenceValue = sharedPreferences.getString(keyPreference, "");
- String[] values = this.getResources().getStringArray(R.array.weather_preferences_units_value);
+ String[] values = this.getResources().getStringArray(R.array.weather_preferences_temperature);
if (unitsPreferenceValue.equals(values[0])) {
symbol = values[0];
unitsConversor = new UnitsConversor(){
// Temperature units
- String[] values = this.getResources().getStringArray(R.array.weather_preferences_units_value);
- String[] humanValues = this.getResources().getStringArray(R.array.weather_preferences_units_human_value);
+ String[] values = this.getResources().getStringArray(R.array.weather_preferences_temperature);
+ String[] humanValues = this.getResources().getStringArray(R.array.weather_preferences_temperature_human_value);
String keyPreference = this.getActivity().getApplicationContext().getString(
R.string.weather_preferences_temperature_key);
Preference connectionPref = this.findPreference(keyPreference);
final SharedPreferences sharedPreferences, final String key) {
// Temperature units
- String[] values = this.getResources().getStringArray(R.array.weather_preferences_units_value);
- String[] humanValues = this.getResources().getStringArray(R.array.weather_preferences_units_human_value);
+ String[] values = this.getResources().getStringArray(R.array.weather_preferences_temperature);
+ String[] humanValues = this.getResources().getStringArray(R.array.weather_preferences_temperature_human_value);
String keyValue = this.getActivity().getApplicationContext().getString(
R.string.weather_preferences_temperature_key);
if (key.equals(keyValue)) {
String keyPreference = this.getResources().getString(
R.string.weather_preferences_temperature_key);
String unitsPreferenceValue = sharedPreferences.getString(keyPreference, "");
- String[] values = this.getResources().getStringArray(R.array.weather_preferences_units_value);
+ String[] values = this.getResources().getStringArray(R.array.weather_preferences_temperature);
if (unitsPreferenceValue.equals(values[0])) {
tempSymbol = values[0];
tempUnitsConversor = new UnitsConversor(){
super.onResume();
final ActionBar actionBar = this.getActionBar();
- actionBar.setTitle(this.getString(R.string.weather_preferences_actionbar_title));
+ actionBar.setTitle(this.getString(R.string.widget_preferences_action_settings));
}
}
this.addPreferencesFromResource(R.xml.appwidget_preferences);
// Temperature units
- String[] values = this.getResources().getStringArray(R.array.weather_preferences_units_value);
- String[] humanValues = this.getResources().getStringArray(R.array.weather_preferences_units_human_value);
+ String[] values = this.getResources().getStringArray(R.array.weather_preferences_temperature);
+ String[] humanValues = this.getResources().getStringArray(R.array.weather_preferences_temperature_human_value);
String keyPreference = this.getActivity().getApplicationContext().getString(
R.string.weather_preferences_temperature_key);
Preference connectionPref = this.findPreference(keyPreference);
public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, final String key) {
// Temperature units
- String[] values = this.getResources().getStringArray(R.array.weather_preferences_units_value);
- String[] humanValues = this.getResources().getStringArray(R.array.weather_preferences_units_human_value);
+ String[] values = this.getResources().getStringArray(R.array.weather_preferences_temperature);
+ String[] humanValues = this.getResources().getStringArray(R.array.weather_preferences_temperature_human_value);
String keyValue = this.getActivity().getApplicationContext().getString(
R.string.weather_preferences_temperature_key);
if (key.equals(keyValue)) {