|
21 | 21 |
|
22 | 22 | import androidx.annotation.Nullable; |
23 | 23 |
|
| 24 | +import android.content.Context; |
24 | 25 | import android.util.Log; |
25 | 26 |
|
26 | 27 | import com.baato.baatolibrary.models.NavResponse; |
@@ -108,18 +109,18 @@ private enum Profile { |
108 | 109 | /** |
109 | 110 | * Converts a GHResponse into a json that follows the Mapbox API specification |
110 | 111 | */ |
111 | | - public static ObjectNode convertFromGHResponse(NavResponse ghResponsee, String type) { |
| 112 | + public static ObjectNode convertFromGHResponse(NavResponse ghResponsee, String type, Context context) { |
112 | 113 | ghResponse = ghResponsee; |
113 | 114 | mtrMap = new NavigateResponseConverterTranslationMap(locale.getLanguage()).doImport(); |
114 | | - trMap = new BaatoTranslationMap().doImport("locale/"); |
| 115 | + trMap = new BaatoTranslationMap().doImport(context); |
115 | 116 | return navConverter(type); |
116 | 117 | } |
117 | | - public static ObjectNode convertFromGHResponse(NavResponse ghResponsee, String type, Locale localevar) { |
| 118 | + public static ObjectNode convertFromGHResponse(NavResponse ghResponsee, String type, Locale localevar, Context context) { |
118 | 119 | ObjectNode json = JsonNodeFactory.instance.objectNode(); |
119 | 120 | ghResponse = ghResponsee; |
120 | 121 | locale = localevar; |
121 | 122 | mtrMap = new NavigateResponseConverterTranslationMap(locale.getLanguage()).doImport(); |
122 | | - trMap = new BaatoTranslationMap().doImport("locale/"); |
| 123 | + trMap = new BaatoTranslationMap().doImport(context); |
123 | 124 | return navConverter(type); |
124 | 125 | // if (ghResponse.hasErrors()) |
125 | 126 | // throw new IllegalStateException("If the response has errors, you should use the method NavigateResponseConverter#convertFromGHResponseError"); |
|
0 commit comments