[android] added "Empty Model" message localization.

This commit is contained in:
rachytski 2012-02-06 18:55:24 +04:00 committed by Alex Zolotarev
parent b3d9e4cb03
commit 28e0f2afaa
10 changed files with 30 additions and 8 deletions

View file

@ -2,7 +2,9 @@
#include "VideoTimer.hpp"
#include "../core/jni_helper.hpp"
#include "../core/jni_string.hpp"
#include "../core/render_context.hpp"
#include "../jni/jni_thread.hpp"
#include "../../../../../indexer/drawing_rules.hpp"
@ -46,6 +48,12 @@ namespace android
m_work.Storage().ReInitCountries(false);
}
void Framework::SetEmptyModelMessage(jstring s)
{
std::string emptyModelMsg = jni::ToString(jni::GetCurrentThreadJNIEnv(), s);
m_work.GetInformationDisplay().setEmptyModelMessage(emptyModelMsg.c_str());
}
Framework::~Framework()
{
delete m_videoTimer;

View file

@ -39,6 +39,8 @@ namespace android
Framework(JavaVM * jvm);
~Framework();
void SetEmptyModelMessage(jstring emptyModelMsg);
storage::Storage & Storage();
void OnLocationStatusChanged(int/* == location::TLocationStatus*/ newStatus);

View file

@ -62,6 +62,7 @@ extern "C"
g_framework = new android::Framework(g_jvm);
}
g_framework->SetEmptyModelMessage(emptyModelMessage);
}
////////////////////////////////////////////////////////////////////////////////////////////

View file

@ -20,4 +20,5 @@
<string name="miles">Meilen</string>
<string name="kilometres">Kilometer</string>
<string name="close">Schließen</string>
<string name="empty_model">Um die Karte dieses Ortes\nherunterzuladen, berühren Sie\n bitte die Taste in der unteren\n Hälfte des Bildschirms</string>
</resources>

View file

@ -20,4 +20,5 @@
<string name="miles">Milla</string>
<string name="kilometres">Kilómetros</string>
<string name="close">Cerrar</string>
<string name="empty_model">Para poder ver detalles\n de esta zona debes descargar\nel mapa de este país. Pulse el botón\nbajo la pantalla para descargar.</string>
</resources>

View file

@ -20,4 +20,5 @@
<string name="miles">Milles</string>
<string name="kilometres">Kilomètres</string>
<string name="close">Fermer</string>
<string name="empty_model">Pour scharger cette carte,\ntoucher le bouton au bas de l`écran</string>
</resources>

View file

@ -24,4 +24,5 @@
<string name="close">Закрыть</string>
<string name="external_storage_is_not_available">Загруженные карты недоступны</string>
<string name="disconnect_usb_cable">Отключите USB кабель или вставьте SD-карту</string>
<string name="empty_model">Чтобы загрузить карту\nэтого места, нажмите на\nкнопку загрузки внизу экрана</string>
</resources>

View file

@ -24,4 +24,5 @@
<string name="close">Close</string>
<string name="external_storage_is_not_available">External storage memory is not available</string>
<string name="disconnect_usb_cable">Please disconnect USB cable or insert memory card to use MapsWithMe</string>
<string name="empty_model">Nothing found. Have you tried\ndownloading maps of the countries?\nJust click the download button\nat the bottom of the screen.</string>
</resources>

View file

@ -177,7 +177,8 @@ public class MWMActivity extends NvEventQueueActivity implements
extStoragePath,
getTmpPath(),
extTmpPath,
getSettingsPath());
getSettingsPath(),
getString(R.string.empty_model));
checkMeasurementSystem();
@ -375,9 +376,15 @@ public class MWMActivity extends NvEventQueueActivity implements
private native void nativeStorageConnected();
private native void nativeStorageDisconnected();
private native void nativeInit(int densityDpi, int screenWidth, int screenHeight,
String apkPath,
String storagePath, String tmpPath, String extTmpPath, String settingsPath);
private native void nativeInit(int densityDpi,
int screenWidth,
int screenHeight,
String apkPath,
String storagePath,
String tmpPath,
String extTmpPath,
String settingsPath,
String emptyModelMessage);
private native void nativeDestroy();
private native void nativeLocationStatusChanged(int newStatus);
private native void nativeLocationUpdated(long time, double lat, double lon, float accuracy);

View file

@ -123,10 +123,6 @@ Framework::Framework()
m_informationDisplay.enableRuler(true);
m_informationDisplay.setRulerParams(m_minRulerWidth, m_metresMinWidth, m_metresMaxWidth);
double const visScale = GetPlatform().VisualScale();
m_navigator.SetMinScreenParams(
static_cast<unsigned>(m_minRulerWidth * visScale), m_metresMinWidth);
#ifndef OMIM_PRODUCTION
m_informationDisplay.enableDebugInfo(true);
#endif
@ -720,6 +716,9 @@ void Framework::SetRenderPolicy(RenderPolicy * renderPolicy)
m_informationDisplay.enableLog(isVisualLogEnabled, renderPolicy->GetWindowHandle().get());
m_informationDisplay.setVisualScale(GetPlatform().VisualScale());
m_navigator.SetMinScreenParams(static_cast<unsigned>(m_minRulerWidth * GetPlatform().VisualScale()),
m_metresMinWidth);
yg::gl::RenderContext::initParams();
}