forked from organicmaps/organicmaps
Localize building levels in place view.
To make it clearer what this field is about and what the numerical value means. For #4452. Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>
This commit is contained in:
parent
6940375538
commit
9edf452d27
3 changed files with 17 additions and 1 deletions
|
@ -662,6 +662,13 @@ public class Utils
|
|||
return brand;
|
||||
}
|
||||
|
||||
public static String getLocalizedLevel(@NonNull Context context, @Nullable String level)
|
||||
{
|
||||
if (TextUtils.isEmpty(level))
|
||||
return "";
|
||||
return context.getString(R.string.level_value_generic, level);
|
||||
}
|
||||
|
||||
private static class SupportInfoWithLogsCallback implements LogsManager.OnZipCompletedListener
|
||||
{
|
||||
@NonNull
|
||||
|
|
|
@ -405,7 +405,8 @@ public class PlacePageView extends Fragment implements View.OnClickListener,
|
|||
refreshMetadataOrHide(Framework.nativeGetActiveObjectFormattedCuisine(), mCuisine, mTvCuisine);
|
||||
refreshWiFi();
|
||||
refreshMetadataOrHide(mMapObject.getMetadata(Metadata.MetadataType.FMD_FLATS), mEntrance, mTvEntrance);
|
||||
refreshMetadataOrHide(mMapObject.getMetadata(Metadata.MetadataType.FMD_LEVEL), mLevel, mTvLevel);
|
||||
final String level = Utils.getLocalizedLevel(getContext(), mMapObject.getMetadata(Metadata.MetadataType.FMD_LEVEL));
|
||||
refreshMetadataOrHide(level, mLevel, mTvLevel);
|
||||
|
||||
final String cap = mMapObject.getMetadata(Metadata.MetadataType.FMD_CAPACITY);
|
||||
refreshMetadataOrHide(!TextUtils.isEmpty(cap) ? getString(R.string.capacity, cap) : "", mCapacity, mTvCapacity);
|
||||
|
|
|
@ -14612,6 +14612,14 @@
|
|||
zh-Hans = 楼层
|
||||
zh-Hant = 樓層
|
||||
|
||||
[level_value_generic]
|
||||
tags = android,ios
|
||||
comment = Building level
|
||||
en = Level: %s
|
||||
de = Stock: %s
|
||||
fr = Niveau : %s
|
||||
ru = Этаж: %s
|
||||
|
||||
[please_note]
|
||||
tags = ios
|
||||
en = Please note
|
||||
|
|
Loading…
Add table
Reference in a new issue