localize 24/ and fix issue with blanks in translated 'open' strings

This commit is contained in:
sonora 2016-07-05 01:38:53 +02:00
parent 277d0f3717
commit 341246becf
4 changed files with 10 additions and 8 deletions

View file

@ -1673,7 +1673,7 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su
<string name="shared_string_ellipsis"></string> <string name="shared_string_ellipsis"></string>
<string name="shared_string_selected">Ausgewählt</string> <string name="shared_string_selected">Ausgewählt</string>
<string name="shared_string_selected_lowercase">ausgewählt</string> <string name="shared_string_selected_lowercase">ausgewählt</string>
<string name="shared_string_is_open">Offen</string> <string name="shared_string_is_open">Jetzt offen</string>
<string name="rendering_attr_hideHouseNumbers_name">Hausnummern</string> <string name="rendering_attr_hideHouseNumbers_name">Hausnummern</string>
<string name="application_dir_change_warning3">Soll OsmAnd auch die Datendateien an den neuen Ort kopieren?</string> <string name="application_dir_change_warning3">Soll OsmAnd auch die Datendateien an den neuen Ort kopieren?</string>
@ -2175,4 +2175,5 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su
<string name="app_mode_train">Zug</string> <string name="app_mode_train">Zug</string>
<string name="coords_format">Koordinatenformat</string> <string name="coords_format">Koordinatenformat</string>
<string name="coords_format_descr">Format der geographischen Koordinaten</string> <string name="coords_format_descr">Format der geographischen Koordinaten</string>
<string name="shared_string_is_open_24_7">Offen 7x24h</string>
</resources> </resources>

View file

@ -9,6 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
--> -->
<string name="shared_string_is_open_24_7">Open 24/7</string>
<string name="storage_directory_card">Memory card</string> <string name="storage_directory_card">Memory card</string>
<string name="coords_format">Coordinate format</string> <string name="coords_format">Coordinate format</string>
<string name="coords_format_descr">Format for the geographical coordinates</string> <string name="coords_format_descr">Format for the geographical coordinates</string>
@ -408,7 +409,7 @@
<string name="shared_string_copy">Copy</string> <string name="shared_string_copy">Copy</string>
<string name="filter_poi_hint">Filter by name</string> <string name="filter_poi_hint">Filter by name</string>
<string name="search_poi_category_hint">Type to search all</string> <string name="search_poi_category_hint">Type to search all</string>
<string name="shared_string_is_open">Open</string> <string name="shared_string_is_open">Open now</string>
<string name="rendering_attr_OSMMapperAssistant_name">OSM mapper assistant</string> <string name="rendering_attr_OSMMapperAssistant_name">OSM mapper assistant</string>
<string name="agps_info">A-GPS info</string> <string name="agps_info">A-GPS info</string>
<string name="shared_string_manage">Manage</string> <string name="shared_string_manage">Manage</string>

View file

@ -361,8 +361,8 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
return true; return true;
} }
}); });
addFilter(optionsMenu, getString(R.string.shared_string_is_open).toLowerCase()); addFilter(optionsMenu, getString(R.string.shared_string_is_open));
addFilter(optionsMenu, "24/7"); addFilter(optionsMenu, getString(R.string.shared_string_is_open_24_7));
Map<String, PoiType> poiAdditionals = f.getPoiAdditionals(); Map<String, PoiType> poiAdditionals = f.getPoiAdditionals();
if(poiAdditionals != null) { if(poiAdditionals != null) {
TreeMap<String, PoiType> adds = new TreeMap<String, PoiType>(); TreeMap<String, PoiType> adds = new TreeMap<String, PoiType>();
@ -381,7 +381,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
private void addFilter(PopupMenu optionsMenu, final String value) { private void addFilter(PopupMenu optionsMenu, final String value) {
IconsCache iconsCache = getMyApplication().getIconsCache(); IconsCache iconsCache = getMyApplication().getIconsCache();
MenuItem item = optionsMenu.getMenu().add(getString(R.string.search_poi_filter) + " " + value) MenuItem item = optionsMenu.getMenu().add(getString(R.string.search_poi_filter) + ": " + value)
.setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_filter_dark)); .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_filter_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override @Override
@ -389,7 +389,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
if(searchFilterLayout.getVisibility() == View.GONE) { if(searchFilterLayout.getVisibility() == View.GONE) {
searchFilterLayout.setVisibility(View.VISIBLE); searchFilterLayout.setVisibility(View.VISIBLE);
} }
searchFilter.setText((searchFilter.getText().toString() + " " + value).trim()); searchFilter.setText((searchFilter.getText().toString() + " " + value.replace(' ', '_').toLowerCase()).trim());
return true; return true;
} }
}); });

View file

@ -356,11 +356,11 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable<PoiUIFilter>
} }
public String getNameToken24H() { public String getNameToken24H() {
return "24/7"; return app.getString(R.string.shared_string_is_open_24_7).replace(' ', '_').toLowerCase();
} }
public String getNameTokenOpen() { public String getNameTokenOpen() {
return app.getString(R.string.shared_string_is_open); return app.getString(R.string.shared_string_is_open).replace(' ', '_').toLowerCase();
} }
private ResultMatcher<Amenity> wrapResultMatcher(final ResultMatcher<Amenity> matcher) { private ResultMatcher<Amenity> wrapResultMatcher(final ResultMatcher<Amenity> matcher) {