Fix small issues

This commit is contained in:
Victor Shcherb 2015-11-15 19:53:19 +01:00
parent 9ce44d20fe
commit e5af5635c3
6 changed files with 163 additions and 15 deletions

View file

@ -8,6 +8,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:id="@+id/messageEditTextLabel"
android:text="@string/osb_comment_dialog_message"/> android:text="@string/osb_comment_dialog_message"/>
<EditText <EditText

View file

@ -1686,4 +1686,144 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu
<string name="delete_change">Suprimeix les modificacions</string> <string name="delete_change">Suprimeix les modificacions</string>
<string name="successfully_uploaded_pattern">S\'ha pujat amb èxit {0}/{1}</string> <string name="successfully_uploaded_pattern">S\'ha pujat amb èxit {0}/{1}</string>
<string name="try_again">Torna a provar-ho</string> <string name="try_again">Torna a provar-ho</string>
<string name="error_message_pattern" <string name="error_message_pattern">Error: {0}</string>
<string name="no_updates_available">No hi ha actualitzacions disponibles</string>
<string name="we_really_care_about_your_opinion">Valorem molt la vostra opinió i ens és important disposar dels vostres comentaris.</string>
<string name="rendering_value_boldOutline_name">Contorn destacat</string>
<string name="traffic_warning_hazard">Perill informat</string>
<string name="dahboard_options_dialog_title">Configura el tauler</string>
<string name="shared_string_card_was_hidden">La tarja era amagada</string>
<string name="shared_string_undo">Desfés</string>
<string name="shared_string_skip">Omet</string>
<string name="app_name_osmand">OsmAnd</string>
<string name="offline_maps_and_navigation">Mapes fora de línia\ni navegació</string>
<string name="commit_poi">Publica els PDI</string>
<string name="routing_attr_avoid_shuttle_train_name">Evita tren llançadora</string>
<string name="routing_attr_avoid_shuttle_train_description">Evita tren llançadora</string>
<string name="plugin_settings">Connectors</string>
<string name="tab_title_basic">Bàsic</string>
<string name="tab_title_advanced">Estès</string>
<string name="building_number">Nombre de finca</string>
<string name="next_proceed">Següent</string>
<string name="opening_at">Obert a les</string>
<string name="closing_at">Tanquen a les</string>
<string name="av_locations">Ubicacions</string>
<string name="av_locations_descr">Fitxer GPX amb posicions comentades</string>
<string name="contact_info">Informació de contacte</string>
<string name="description">Descripció</string>
<string name="add_opening_hours">Afegeix l\'horari de servei</string>
<string name="poi_dialog_poi_type">Tipus de PDI</string>
<string name="please_specify_poi_type">Especifiqueu el tipus de PDI.</string>
<string name="number_of_rows_in_dash">Nombre de files al tauler %1$s</string>
<string name="poi_action_delete">Suprimeix</string>
<string name="working_days">Dies laborables</string>
<string name="recent_places">Llocs recents</string>
<string name="favourites">Preferits</string>
<string name="saved_at_time">S\'ha desat correctament a: %1$s</string>
<string name="poi_deleted_localy">El PDI s\'eliminara un cop pugeu els vostres canvis</string>
<string name="show_gpx">Mostra GPX</string>
<string name="favourites_edit_dialog_title">Detalls del preferit</string>
<string name="simulate_your_location_stop_descr">Atura la simulació de la vostra posició</string>
<string name="simulate_your_location_descr">Simula utilitzant un GPX enregistrat o una ruta calculada</string>
<string name="address_unknown">L\'adreça encara no es coneix</string>
<string name="favourites_context_menu_add">Afegeix un preferit</string>
<string name="show_on_start">Mostra a l\'inici</string>
<string name="count_of_lines">Recompte de línies</string>
<string name="are_you_sure">N\'esteu segur?</string>
<string name="unsaved_changes_will_be_lost">Es perdran tots els canvis no desats. Voleu continuar?</string>
<string name="downloads_left_template">%1$s baixades pendents</string>
<string name="roads">Carreteres</string>
<string name="shared_string_trip_recording">Enregistrament de trajectes</string>
<string name="shared_string_navigation">Navegació</string>
<string name="osmand_running_in_background">Execució en procés de fons</string>
<string name="favorite_category_add_new">Afegeix nova categoria</string>
<string name="favorite_category_select">Selecciona categoria</string>
<string name="default_speed_system_descr">Defineix el sistema de mesura de velocitat</string>
<string name="default_speed_system">Mesura de velocitat</string>
<string name="nm">mm</string>
<string name="si_nm">Milles marines</string>
<string name="si_kmh">Quilòmetres per hora</string>
<string name="si_mph">Milles per hora</string>
<string name="si_m_s">Metres per segon</string>
<string name="si_min_km">Minuts per quilòmetre</string>
<string name="si_min_m">Minuts per milla</string>
<string name="si_nm_h">Millesmarines per hora (nusos)</string>
<string name="nm_h">mmh</string>
<string name="min_mile">min/m</string>
<string name="min_km">min/km</string>
<string name="m_s">m/s</string>
<string name="srtm_plugin_disabled">Corbes de nivell desactivades</string>
<string name="show_free_version_banner">Mostra bàner de la versió gratuïta</string>
<string name="show_free_version_banner_description">Encara que tinguéssiu una versió de pagament també podríeu veure el bàner de la versió gratuïta</string>
<string name="downloading_number_of_files">Baixada - %1$d fitxer</string>
<string name="hillshade_layer_disabled">Capa d\'ombrejat desactivada</string>
<string name="buy">Compra</string>
<string name="regions">Regions</string>
<string name="region_maps">Mapes de regions</string>
<string name="world_maps">Mapes del món</string>
<string name="later">Mes tard</string>
<string name="get_full_version">Versió completa</string>
<string name="downloads">Baixades</string>
<string name="activate_seamarks_plugin">Activeu el connector de cartes marines</string>
<string name="activate_srtm_plugin">Activeu el connector de corbes de nivell</string>
<string name="favorite_category_dublicate_message">El nom de categoria especificat ja existeix. Definiu un altre nom.</string>
<string name="favorite_category_name">Nom de categoria</string>
<string name="favorite_category_add_new_title">Afegeix una nova categoria</string>
<string name="confirm_download_roadmaps">N\'esteu segur de baixar un mapa de carreteres quan teniu disponible un mapa complet?</string>
<string name="value_downloaded_from_max">%1$.1f de %2$.1f MB</string>
<string name="file_size_in_mb">%.1f MB</string>
<string name="update_all">Actualitzeu tot (%1$s MB)</string>
<string name="free_downloads_used">Baixades gratuïtes realitzades</string>
<string name="free_downloads_used_description">Podeu veure quantes baixades gratuïtes heu fet</string>
<string name="simulate_initial_startup_descr">Configura el senyalitzador de primera engegada de l\'aplicació, mantenint la resta de paràmetres sense canvis</string>
<string name="simulate_initial_startup">Simula l\'engegada inicial de l\'aplicació</string>
<string name="share_geo">geo:</string>
<string name="share_menu_location">Comparteix la posició</string>
<string name="shared_string_send">Envia</string>
<string name="application_dir_description">Trieu on voleu desar els fitxers de mapes.</string>
<string name="shared_string_qr_code">Codi QR</string>
<string name="map_downloaded">Mapa baixat</string>
<string name="map_downloaded_descr">S\'ha baixat el mapa de %1$s. Torneu al mapa per començar a utilitzar-lo.</string>
<string name="go_to_map">Vés al mapa</string>
<string name="world_map_download_descr">El mapa base mundial (que abasta el món sencer però amb poca ampliació) no es troba o està malmès. Considereu baixar-lo per una operació completa.</string>
<string name="show_on_start_description">Si es desactiva s\'engega amb la pantalla del mapa</string>
<string name="enter_country_name">Indiqueu el nom del país</string>
<string name="shared_string_upload">Pujada</string>
<string name="osm_edit_created_poi">S\'ha creat un PDI a OSM</string>
<string name="new_version">Versió nova</string>
<string name="begin_with_osmand_menu_group">Primeres passes a OsmAnd</string>
<string name="features_menu_group">Característiques</string>
<string name="help_us_to_improve_menu_group">Ajudeu-nos a millorar OsmAnd</string>
<string name="other_menu_group">Altres</string>
<string name="plugins_menu_group">Connectors</string>
<string name="first_usage_item">Primera utilització</string>
<string name="first_usage_item_description">Com baixar mapes, fixar la configuració bàsica</string>
<string name="navigation_item_description">confifuració de la navegació</string>
<string name="planning_trip_item">Planeja un viatge</string>
<string name="faq_item">PMF</string>
<string name="faq_item_description">Preguntes més freqüents</string>
<string name="map_viewing_item">Visualització del mapa</string>
<string name="search_on_the_map_item">Cerca al mapa</string>
<string name="instalation_troubleshooting_item">Instal·lació i solució de problemes</string>
<string name="techical_articles_item">Articles tècnics</string>
<string name="versions_item">Versions</string>
<string name="feedback">Comentaris</string>
<string name="contact_us">Contacteu-nos</string>
<string name="map_legend">Llegenda del mapa</string>
<string name="shared_string_update">Actualitza</string>
<string name="rendering_attr_hideProposed_name">Amaga proposta d\'objectes</string>
<string name="read_more">Llegiu-ne més</string>
<string name="whats_new">Què hi ha de nou a</string>
<string name="share_osm_edits_subject">Edicions OSM compartides via OsmAnd</string>
<string name="lang_nds">Baix alemany</string>
<string name="lang_mk">Macedònic</string>
<string name="lang_fy">Frisó</string>
<string name="lang_als">Albanès (Tosc)</string>
<string name="save_poi_without_poi_type_message">Confirmeu desar el PDI sense indicar el tipus?</string>
<string name="context_menu_item_delete_waypoint">Voleu suprimir la fita GPX?</string>
<string name="context_menu_item_edit_waypoint">Edita la fita GPX</string>
<string name="shared_string_location">Localització</string>
<string name="poi_context_menu_modify_osm_change">Modifica el canvi OSM</string>
</resources>

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
<resources>
<string name="layer_map_appearance">Configurar pantalla</string> <string name="layer_map_appearance">Configurar pantalla</string>
<string name="show_lanes">Mostrar carriles</string> <string name="show_lanes">Mostrar carriles</string>

View file

@ -28,7 +28,7 @@
<string name="osb_comment_dialog_author">Author name</string> <string name="osb_comment_dialog_author">Author name</string>
<string name="osb_comment_dialog_error">Exception occurred: comment was not added</string> <string name="osb_comment_dialog_error">Exception occurred: comment was not added</string>
<string name="osb_comment_dialog_success">Comment was successfully added</string> <string name="osb_comment_dialog_success">Comment was successfully added</string>
<string name="shared_string_commit">Commit</string>
<string name="context_menu_item_delete_waypoint">Delete GPX waypoint?</string> <string name="context_menu_item_delete_waypoint">Delete GPX waypoint?</string>
<string name="context_menu_item_edit_waypoint">Edit GPX waypoint</string> <string name="context_menu_item_edit_waypoint">Edit GPX waypoint</string>

View file

@ -53,12 +53,8 @@ public class EditPOIMenuController extends MenuController {
@Override @Override
public void uploadEnded(Map<OsmPoint, String> loadErrorsMap) { public void uploadEnded(Map<OsmPoint, String> loadErrorsMap) {
super.uploadEnded(loadErrorsMap); super.uploadEnded(loadErrorsMap);
for (OsmPoint osmPoint : loadErrorsMap.keySet()) {
if (loadErrorsMap.get(osmPoint) == null) {
getMapActivity().getContextMenu().close(); getMapActivity().getContextMenu().close();
} }
}
}
}; };
OpenstreetmapRemoteUtil remotepoi = new OpenstreetmapRemoteUtil(getMapActivity()); OpenstreetmapRemoteUtil remotepoi = new OpenstreetmapRemoteUtil(getMapActivity());
OsmBugsRemoteUtil remotebug = new OsmBugsRemoteUtil(getMapActivity().getMyApplication()); OsmBugsRemoteUtil remotebug = new OsmBugsRemoteUtil(getMapActivity().getMyApplication());

View file

@ -32,6 +32,7 @@ public class SendPoiDialogFragment extends DialogFragment {
final OsmPoint[] poi = (OsmPoint[]) getArguments().getSerializable(OPENSTREETMAP_POINT); final OsmPoint[] poi = (OsmPoint[]) getArguments().getSerializable(OPENSTREETMAP_POINT);
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
View view = getActivity().getLayoutInflater().inflate(R.layout.send_poi_dialog, null); View view = getActivity().getLayoutInflater().inflate(R.layout.send_poi_dialog, null);
final View messageEditTextLabel = (EditText) view.findViewById(R.id.messageEditTextLabel);
final EditText messageEditText = (EditText) view.findViewById(R.id.messageEditText); final EditText messageEditText = (EditText) view.findViewById(R.id.messageEditText);
final EditText userNameEditText = (EditText) view.findViewById(R.id.userNameEditText); final EditText userNameEditText = (EditText) view.findViewById(R.id.userNameEditText);
final EditText passwordEditText = (EditText) view.findViewById(R.id.passwordEditText); final EditText passwordEditText = (EditText) view.findViewById(R.id.passwordEditText);
@ -42,6 +43,16 @@ public class SendPoiDialogFragment extends DialogFragment {
.getSettings(); .getSettings();
userNameEditText.setText(settings.USER_NAME.get()); userNameEditText.setText(settings.USER_NAME.get());
passwordEditText.setText(settings.USER_PASSWORD.get()); passwordEditText.setText(settings.USER_PASSWORD.get());
boolean hasOsmPOI = false;
for(OsmPoint p : poi) {
if(p instanceof OpenstreetmapPoint) {
hasOsmPOI = true;
break;
}
}
messageEditTextLabel.setVisibility(hasOsmPOI ? View.VISIBLE :View.GONE);
messageEditText.setVisibility(hasOsmPOI ? View.VISIBLE :View.GONE);
closeChangeSetCheckBox.setVisibility(hasOsmPOI ? View.VISIBLE :View.GONE);
final ProgressDialogPoiUploader progressDialogPoiUploader; final ProgressDialogPoiUploader progressDialogPoiUploader;
if (poiUploader != null) { if (poiUploader != null) {
@ -50,7 +61,7 @@ public class SendPoiDialogFragment extends DialogFragment {
progressDialogPoiUploader = (ProgressDialogPoiUploader) getParentFragment(); progressDialogPoiUploader = (ProgressDialogPoiUploader) getParentFragment();
} }
builder.setTitle(R.string.commit_poi) builder.setTitle(R.string.shared_string_commit)
.setView(view) .setView(view)
.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
@Override @Override
@ -58,13 +69,14 @@ public class SendPoiDialogFragment extends DialogFragment {
comment = messageEditText.getText().toString(); comment = messageEditText.getText().toString();
settings.USER_NAME.set(userNameEditText.getText().toString()); settings.USER_NAME.set(userNameEditText.getText().toString());
settings.USER_PASSWORD.set(passwordEditText.getText().toString()); settings.USER_PASSWORD.set(passwordEditText.getText().toString());
if (comment.length() > 0) {
for (OsmPoint osmPoint : poi) { for (OsmPoint osmPoint : poi) {
if (osmPoint.getGroup() == OsmPoint.Group.POI) { if (osmPoint.getGroup() == OsmPoint.Group.POI) {
((OpenstreetmapPoint) osmPoint) ((OpenstreetmapPoint) osmPoint).setComment(comment);
.setComment(comment);
break; break;
} }
} }
}
progressDialogPoiUploader.showProgressDialog(poi, progressDialogPoiUploader.showProgressDialog(poi,
closeChangeSetCheckBox.isChecked()); closeChangeSetCheckBox.isChecked());
} }