This commit is contained in:
Lukas Niemeier committed 2013-12-08 00:57:46 +01:00
1 parent 29f1892dce
commit 0c8cb26333
10 files changed
+115 -47

No files matched your search

@@ -81,11 +81,6 @@
<item>Steuerbord</item>
<item>Gate</item>
</string-array>
<string-array name="course_element_changers">
<item>Nach oben</item>
<item>Nach unten</item>
<item>Entfernen</item>
</string-array>
<string name="publish">Veröffentlichen</string>
<string name="unpublish">Zurücknehmen</string>
@@ -137,8 +132,6 @@
<string name="settings_category_regattas">Regatta Einstellungen (Speziell)</string>
<string name="settings_category_course_designer">Kursdesigner Einstellungen</string>
<string name="override_default_start_procedure_type_header">Standard Startprozedur überschreiben</string>
<string name="override_default_start_procedure_type_description">Aktivieren wenn Startprozedur der Rennen überschrieben werden soll.</string>
<string name="override_default_start_procedure_type_select_header">Standard Startprozedur (wenn überschrieben)</string>
<string name="override_default_start_procedure_type_select_description">Wenn Option "Standard Startprozedur überschreiben" aktiv ist, wird ausgewählte Startprozedur als Standard gewählt.</string>
@@ -185,9 +178,60 @@
<string name="loading_configuration">Lade Konfiguration&#8230;</string>
<string name="loading_configuration_failed">Fehler beim Laden der Konfiguration.</string>
<string name="loading_configuration_not_found">Für dieses Gerät existiert keine Konfiguration auf dem Server.</string>
<string name="loading_configuration_not_found">Für dieses Gerät existiert keine Konfiguration auf dem Server.</string>
<string name="loading_configuration_succeded">Konfiguration vom Server übernommen.</string>
<string name="auto_update_install">Installieren</string>
<string name="auto_update_install_anyway">Trotzdem installieren</string>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<string name="choose_xray_flag_down">Einzelrückruf entfernen</string>
<string name="login_type_officer_on_start_vessel">Als Startschiff-Wettfahrleiter einloggen</string>
<string name="login_type_officer_on_finish_vessel">Als Zielschiff-Wettfahrleiter einloggen</string>
<string name="login_type_shore_control">Als Shore-Control einloggen</string>
<string name="generic_error">Fehler</string>
<string name="gate_launch_stops_after">Gate Launch stoppt nach %dmin</string>
<string name="override_default_course_designer_type_select_header">Kursdesigner</string>
<string name="settings_course_designer_by_name_course_names_header">Kursnamen</string>
<string name="enter_new_item">Neues Element eingeben</string>
<string name="add">Hinzufügen</string>
<string name="there_are_no_items_yet_">Bisher keine Elemente.</string>
<string name="preference_racing_procedure_rrs26_startmode_flags_header">Startmodus Flaggen</string>
<string name="preference_racing_procedure_classflag_header">Klassenflagge</string>
<string name="preference_racing_procedure_hasxray_header">Einzelrückruf</string>
<string name="preference_racing_procedure_hasxray_description">Diese Option aktiviert den Einzelrückruf</string>
<string name="preference_racing_procedure_gatestart_haspathfinder_description">Diese Option aktiviert den Pathfinder</string>
<string name="preference_racing_procedure_gatestart_haspathfinder_header">Pathfinder</string>
<string name="preference_racing_procedure_gatestart_hasadditionalgolfdowntime_description">Diese Option aktiviert das Wählen der zusätzlichen Golfflaggenzeit.</string>
<string name="preference_racing_procedure_gatestart_hasadditionalgolfdowntime_header">Zusätzliche Golfflaggenzeit.</string>
<string name="device_identifier">Gerätename</string>
<string name="synchronize_connection_settings_header">Synchronisiere mit Server</string>
<string name="synchronize_connection_settings_description">Zur Synchronisierung der Gerätekonfiguration vom Server per QR-Code hier klicken.</string>
<string name="update_app_header">Update erzwingen</string>
<string name="update_app_description">Erzwingt ein Update. Es ist besser die Synchronisierung zu nutzen.</string>
<string name="options_menu_info">Technische Informationen</string>
<string name="gate_launch">Gate Launch</string>
<string name="golf_down">Golf</string>
<string name="preference_regatta_specific_title">Regattakonfiguration - %1$s</string>
<string name="preference_regatta_specific_save_title">Speichere %1$s Konfiguration</string>
<string name="preference_regatta_specific_save_description">Hier klicken um Regattakonfiguration für 1$s zu speichern.</string>
<string name="auto_update">Auto-Update</string>
<string name="auto_update_checking_version">Prüfe Versionsinformation auf Server&#8230;</string>
<string name="auto_update_downloading_version">Versuche Versionsinformation von %1$s zu erhalten</string>
<string name="auto_update_version_file_url_invalid">Link zur Versionsinformation ungültig.</string>
<string name="auto_update_click_install">Klicke \'Installieren\' um ein Update auf Version %1$d durchzuführen.</string>
<string name="auto_update_force_install">Es ist bereits die Server-Version installiert (Version %1$d).</string>
<string name="auto_update_already_up_to_date">Alles aktuell!</string>
<string name="auto_update_downloading_apk">Downloade APK vom Server&#8230;</string>
<string name="auto_update_apk_link_invalid">Der Downloadlink ist ungültig.</string>
<string name="auto_update_apk_file_error">Konnte Zieldatei nicht erstellen.</string>
<string name="auto_update_error">Fehler beim Update.</string>
<string name="auto_update_completed">Auto-Update erfolgreich</string>
<string name="auto_update_completed_text">Update erfolgreich ausgeführt. Es sollte erneut mit dem Server synchronisiert werden.</string>
<string name="auto_update_completed_take_me_there">Bring' mich hin</string>
<string name="wind_gps_is_disabled">GPS ist ausgeschaltet, soll es aktiviert werde?</string>
<string name="rrs26_start_mode_changed_to">Startmodus Flagge verändert zu %1$s</string>
<string name="preference_there_are_no_regattas">Bisher keine Regatta geladen.</string>
<string name="configure_regatta">Konfiguriere Regatta %1$s</string>
</resources>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="empty_array"/>
<resources xmlns:tools="http://schemas.android.com/tools">
<string-array name="empty_array" tools:ignore="UnusedResources"/>
<string name="running_on_course">(on course %s)</string>
<string name="course_design_number_waypoints">Course has %s waypoints</string>
@@ -131,8 +131,6 @@
<string name="settings_general_language_header">Select Language</string>
<string name="settings_general_language_description">Select the language. You might need to restart the app to have changes applied.</string>
<string name="override_default_start_procedure_type_header">Override default start procedure type</string>
<string name="override_default_start_procedure_type_description">Check the box if races should use the start procedure type defined below as a default.</string>
<string name="override_default_start_procedure_type_select_header">Default start procedure type when overriden</string>
<string name="override_default_start_procedure_type_select_description">Races will use selected start procedure type as a default. For this option to be active override checkbox has to be enabled.</string>
@@ -168,13 +166,13 @@
<string name="today">Today</string>
<string name="start">Start</string>
<string name="application_information">Application Information</string>
<string name="application_identifier">Identifier</string>
<string name="application_version">Version</string>
<string name="application_install_date">Install Date</string>
<string name="persistence_information">Persistence Status</string>
<string name="persistence_waiting_events">Waiting events</string>
<string name="persistence_waiting_clear_events">Clear events</string>
<string name="application_information" translatable="false">Application Information</string>
<string name="application_identifier" translatable="false">Identifier</string>
<string name="application_install_date" translatable="false">Install Date</string>
<string name="persistence_information" translatable="false">Persistence Status</string>
<string name="persistence_waiting_clear_events" translatable="false">Clear events</string>
<string name="persistence_waiting_events" translatable="false">Waiting events</string>
<string name="application_version" translatable="false">Version</string>
<string name="generic_error">Error</string>
@@ -198,8 +196,6 @@
<string name="settings_category_regatta_defaults">Regatta Configuration (default)</string>
<string name="settings_category_regattas">Regatta Configuration (specific)</string>
<string name="settings_category_course_designer">Course Designer Configuration</string>
<string name="override_default_course_designer_type_header">Override Course Designer type</string>
<string name="override_default_course_designer_type_description">Use configured Course Designer instead of race\'s.</string>
<string name="override_default_course_designer_type_select_header">Course Designer type</string>
<string name="settings_course_designer_by_name_course_names_header">Course Names</string>
@@ -231,4 +227,22 @@
<string name="preference_regatta_specific_title">Regatta Configuration - %1$s</string>
<string name="preference_regatta_specific_save_title">Save %1$s configuration</string>
<string name="preference_regatta_specific_save_description">This will save the shown configuration for all races of %1$s.</string>
<string name="auto_update">Auto-Update</string>
<string name="auto_update_checking_version">Checking for version information on server&#8230;</string>
<string name="auto_update_downloading_version">Trying to download auto-update info from %1$s</string>
<string name="auto_update_version_file_url_invalid">The version file link was not valid.</string>
<string name="auto_update_click_install">Click \'Install\' to perform the update to version %1$d.</string>
<string name="auto_update_force_install">You already have installed the version offered by the server (version %1$d).</string>
<string name="auto_update_already_up_to_date">You are already up to date!</string>
<string name="auto_update_downloading_apk">Downloading APK from server&#8230;</string>
<string name="auto_update_apk_link_invalid">The download link was not valid.</string>
<string name="auto_update_apk_file_error">The download file couldn\'t be created.</string>
<string name="auto_update_error">Error while trying to auto-update.</string>
<string name="auto_update_completed">Auto-Update completed</string>
<string name="auto_update_completed_text">The automatic update has been completed. You should now re-synchronize your connection settings with the server.</string>
<string name="auto_update_completed_take_me_there">Take me there</string>
<string name="wind_gps_is_disabled">Your GPS seems to be disabled, do you want to enable it?</string>
<string name="rrs26_start_mode_changed_to">Start mode flag changed to %1$s</string>
<string name="preference_there_are_no_regattas">There are no regattas loaded.</string>
<string name="configure_regatta">Configure regatta %1$s</string>
</resources>
@@ -150,7 +150,7 @@ public class WindActivity extends SessionActivity implements CompassDirectionLis
private void buildAlertMessageNoGps() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Your GPS seems to be disabled, do you want to enable it?")
builder.setMessage(R.string.wind_gps_is_disabled)
.setCancelable(false)
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
@@ -26,6 +26,7 @@ import com.mobeta.android.dslv.DragSortController;
import com.mobeta.android.dslv.DragSortListView;
import com.sap.sailing.domain.base.Competitor;
import com.sap.sailing.domain.base.CompetitorStore;
import com.sap.sailing.domain.base.SharedDomainFactory;
import com.sap.sailing.domain.common.MaxPointsReason;
import com.sap.sailing.domain.common.Named;
import com.sap.sailing.domain.common.impl.MillisecondsTimePoint;
@@ -171,7 +172,14 @@ public class PositioningFragment extends RaceDialogFragment {
private void loadCompetitors() {
getActivity().setProgressBarIndeterminateVisibility(true);
// invalidate all competitors of this race
ReadonlyDataManager dataManager = OnlineDataManager.create(getActivity());
SharedDomainFactory domainFactory = dataManager.getDataStore().getDomainFactory();
for (Competitor competitor : getRace().getCompetitors()) {
domainFactory.getCompetitorStore().allowCompetitorResetToDefaults(competitor);
}
Loader<?> competitorLoaders = getLoaderManager().initLoader(0, null,
dataManager.createCompetitorsLoader(getRace(), new LoadClient<Collection<Competitor>>() {
@@ -5,15 +5,14 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import android.content.Context;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceScreen;
import com.sap.sailing.domain.base.racegroup.RaceGroup;
import com.sap.sailing.domain.common.impl.NaturalComparator;
import com.sap.sailing.racecommittee.app.R;
import com.sap.sailing.racecommittee.app.data.DataManager;
import com.sap.sailing.racecommittee.app.data.ReadonlyDataManager;
import com.sap.sailing.racecommittee.app.ui.activities.SettingsActivity;
@@ -31,7 +30,7 @@ public class RegattaSpecificPreferenceFragment extends BasePreferenceFragment {
Set<RaceGroup> raceGroups = getRaceGroups(context);
if (raceGroups.isEmpty()) {
Preference preference = new Preference(context);
preference.setTitle("There are no regattas loaded.");
preference.setTitle(R.string.preference_there_are_no_regattas);
screen.addPreference(preference);
} else {
List<RaceGroup> sortedGroups = new ArrayList<RaceGroup>(raceGroups);
@@ -52,7 +51,7 @@ public class RegattaSpecificPreferenceFragment extends BasePreferenceFragment {
private void addPreference(PreferenceScreen screen, final RaceGroup raceGroup) {
Preference preference = new Preference(screen.getContext());
preference.setTitle(String.format("Configure regatta %s", raceGroup.getName()));
preference.setTitle(getString(R.string.configure_regatta, raceGroup.getName()));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
@@ -132,7 +132,7 @@ public class SetStartTimeRaceFragment extends RaceFragment {
if (startDate.get(Calendar.YEAR) == today.get(Calendar.YEAR)
&& startDate.get(Calendar.DAY_OF_YEAR) == today.get(Calendar.DAY_OF_YEAR)) {
btSetDate.setText("Today");
btSetDate.setText(R.string.today);
} else {
String dateString = DateFormat.getDateFormat(getActivity()).format(startDate.getTime());
btSetDate.setText(dateString);
@@ -2,11 +2,11 @@ package com.sap.sailing.racecommittee.app.ui.fragments.raceinfo.running;
import android.view.View;
import android.widget.Toast;
import com.sap.sailing.domain.racelog.state.racingprocedure.impl.BaseRacingProcedureChangedListener;
import com.sap.sailing.domain.racelog.state.racingprocedure.rrs26.RRS26ChangedListener;
import com.sap.sailing.domain.racelog.state.racingprocedure.rrs26.RRS26RacingProcedure;
import com.sap.sailing.domain.racelog.state.racingprocedure.rrs26.ReadonlyRRS26RacingProcedure;
import com.sap.sailing.racecommittee.app.R;
public class RRS26RunningRaceFragment extends BaseRunningRaceFragment<RRS26RacingProcedure> {
@@ -33,8 +33,7 @@ public class RRS26RunningRaceFragment extends BaseRunningRaceFragment<RRS26Racin
@Override
public void onStartmodeChanged(ReadonlyRRS26RacingProcedure racingProcedure) {
// that's a little bit late, isn't it?
Toast.makeText(getActivity(),
String.format("Start mode flag changed to %s", racingProcedure.getStartModeFlag()),
Toast.makeText(getActivity(), getString(R.string.rrs26_start_mode_changed_to, racingProcedure.getStartModeFlag()),
Toast.LENGTH_SHORT).show();
int viewMode = racingProcedure.hasIndividualRecall() ? View.VISIBLE : View.GONE;
@@ -4,7 +4,6 @@ import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -12,9 +11,9 @@ import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import com.sap.sailing.racecommittee.app.AppConstants;
import com.sap.sailing.racecommittee.app.AppPreferences;
import com.sap.sailing.racecommittee.app.R;
import com.sap.sailing.racecommittee.app.logging.ExLog;
import com.sap.sailing.racecommittee.app.ui.activities.SettingsActivity;
import com.sap.sailing.racecommittee.app.ui.fragments.preference.GeneralPreferenceFragment;
@@ -83,10 +82,10 @@ public class AutoUpdater {
}
};
builder.setTitle("Auto-Update completed")
builder.setTitle(R.string.auto_update_completed)
.setMessage(
"The automatic update has been completed. You should now re-synchronize your connection settings with the server.")
.setPositiveButton("Take me there", okListener)
R.string.auto_update_completed_text)
.setPositiveButton(R.string.auto_update_completed_take_me_there, okListener)
.setNegativeButton(android.R.string.cancel, cancelListener).create().show();
}
@@ -42,7 +42,7 @@ public class AutoUpdaterChecker {
this.state = new AutoUpdaterStateImpl(forceUpdate);
this.dialog = new ProgressDialog(context);
dialog.setTitle("Auto-Update");
dialog.setTitle(context.getString(R.string.auto_update));
dialog.setCancelable(true);
dialog.setButton(context.getString(android.R.string.cancel), new DialogInterface.OnClickListener() {
@Override
@@ -70,12 +70,12 @@ public class AutoUpdaterChecker {
dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
dialog.setIndeterminate(true);
dialog.setMessage("Checking for version information on server...");
dialog.setMessage(context.getString(R.string.auto_update_checking_version));
dialog.show();
try {
URL versionUrl = composeVersionUrl();
ExLog.i(TAG, String.format("Trying to download auto-update info from %s", versionUrl.toString()));
ExLog.i(TAG, context.getString(R.string.auto_update_downloading_version, versionUrl.toString()));
final AutoUpdaterVersionDownloader downloader = new AutoUpdaterVersionDownloader(this);
downloader.execute(versionUrl);
@@ -87,7 +87,7 @@ public class AutoUpdaterChecker {
});
} catch (MalformedURLException e) {
onError();
Toast.makeText(context, "The version file link was not valid.", Toast.LENGTH_LONG).show();
Toast.makeText(context, R.string.auto_update_version_file_url_invalid, Toast.LENGTH_LONG).show();
}
}
@@ -118,11 +118,11 @@ public class AutoUpdaterChecker {
}
};
String messageFormat = needsUpdate ? "Click 'Install' to perform the update to version %d." : "You already have installed the version offered by the server (version %d).";
String messageFormat = needsUpdate ? context.getString(R.string.auto_update_click_install) : context.getString(R.string.auto_update_force_install);
AlertDialog.Builder updateDialog = new AlertDialog.Builder(context);
updateDialog
.setTitle("Auto-Update")
.setTitle(R.string.auto_update)
.setMessage(String.format(messageFormat, serverVersion))
.setPositiveButton(context.getString(needsUpdate ? R.string.auto_update_install : android.R.string.ok), needsUpdate ? updateListener : dismissListener)
.setNegativeButton(context.getString(needsUpdate ? android.R.string.cancel : R.string.auto_update_install_anyway), needsUpdate ? dismissListener : updateListener)
@@ -131,12 +131,12 @@ public class AutoUpdaterChecker {
updateDialog.show();
} else {
dialog.dismiss();
Toast.makeText(context, "You are already up to date!", Toast.LENGTH_LONG).show();
Toast.makeText(context, R.string.auto_update_already_up_to_date, Toast.LENGTH_LONG).show();
}
}
private void downloadUpdate(String apkFileName) {
dialog.setMessage("Downloading APK from server...");
dialog.setMessage(context.getString(R.string.auto_update_downloading_apk));
try {
File target = updater.createApkTargetFile();
@@ -154,10 +154,10 @@ public class AutoUpdaterChecker {
});
} catch (MalformedURLException e) {
onError();
Toast.makeText(context, "The download link was not valid.", Toast.LENGTH_LONG).show();
Toast.makeText(context, R.string.auto_update_apk_link_invalid, Toast.LENGTH_LONG).show();
} catch (IOException e) {
onError();
Toast.makeText(context, "The download file couldn't be created.", Toast.LENGTH_LONG).show();
Toast.makeText(context, R.string.auto_update_apk_file_error, Toast.LENGTH_LONG).show();
}
}
@@ -180,8 +180,8 @@ public class AutoUpdaterChecker {
dialog.dismiss();
AlertDialog.Builder errorDialog = new AlertDialog.Builder(context);
errorDialog
.setTitle("Auto-Update")
.setMessage("Error while trying to auto-update.")
.setTitle(R.string.auto_update)
.setMessage(R.string.auto_update_error)
.setIcon(context.getResources().getDrawable(android.R.drawable.ic_dialog_alert))
.setPositiveButton(context.getString(android.R.string.ok), new OnClickListener() {
@Override
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="IconDuplicatesConfig" severity="ignore" />
<issue id="UnusedResources" severity="ignore" />
</lint>