Localized provider documentation

This commit is contained in:
M66B
2023-02-18 18:02:58 +01:00
parent a804a2dcde
commit 1d59293ddc
2 changed files with 14 additions and 7 deletions

View File

@@ -217,6 +217,8 @@ public class EmailProvider implements Parcelable {
private static List<EmailProvider> parseProfiles(XmlPullParser xml) {
List<EmailProvider> result = null;
String lang = Locale.getDefault().getLanguage();
try {
EmailProvider provider = null;
int eventType = xml.getEventType();
@@ -256,7 +258,9 @@ public class EmailProvider implements Parcelable {
provider.maxtls = xml.getAttributeValue(null, "maxtls");
provider.link = xml.getAttributeValue(null, "link");
String documentation = xml.getAttributeValue(null, "documentation");
String documentation = xml.getAttributeValue(null, "documentation." + lang);
if (documentation == null)
documentation = xml.getAttributeValue(null, "documentation");
if (documentation != null)
provider.documentation = new StringBuilder(documentation);