Refactored translation functionality.
This commit is contained in:
parent
5b04bf969d
commit
2c70301b84
2 changed files with 2 additions and 17 deletions
|
@ -204,7 +204,7 @@ public class DownloadActivityType {
|
|||
}
|
||||
final String bn = getBasename(indexItem);
|
||||
final String lc = bn.toLowerCase();
|
||||
String std = getStandardMapName(ctx, lc);
|
||||
String std = FileNameTranslationHelper.getStandardMapName(ctx, lc);
|
||||
if (std != null) {
|
||||
return std;
|
||||
}
|
||||
|
@ -218,21 +218,6 @@ public class DownloadActivityType {
|
|||
return osmandRegions.getLocaleName(bn);
|
||||
}
|
||||
|
||||
private String getStandardMapName(Context ctx, String basename) {
|
||||
if(basename.equals("world-ski")) {
|
||||
return ctx.getString(R.string.index_item_world_ski);
|
||||
} else if(basename.equals("world_altitude_correction_ww15mgh")) {
|
||||
return ctx.getString(R.string.index_item_world_altitude_correction);
|
||||
} else if(basename.equals("world_basemap")) {
|
||||
return ctx.getString(R.string.index_item_world_basemap);
|
||||
} else if(basename.equals("world_bitcoin_payments")) {
|
||||
return ctx.getString(R.string.index_item_world_bitcoin_payments);
|
||||
} else if(basename.equals("world_seamarks")) {
|
||||
return ctx.getString(R.string.index_item_world_seamarks);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getTargetFileName(IndexItem item) {
|
||||
String fileName = item.fileName;
|
||||
// if(fileName.endsWith(IndexConstants.VOICE_INDEX_EXT_ZIP) ||
|
||||
|
|
|
@ -178,7 +178,7 @@ public class FileNameTranslationHelper {
|
|||
return null;
|
||||
}
|
||||
|
||||
private static String getStandardMapName(Context ctx, String basename) {
|
||||
public static String getStandardMapName(Context ctx, String basename) {
|
||||
if (basename.equals("world-ski")) {
|
||||
return ctx.getString(R.string.index_item_world_ski);
|
||||
} else if (basename.equals("world_altitude_correction_ww15mgh")) {
|
||||
|
|
Loading…
Reference in a new issue