Localize rule folder name

This commit is contained in:
M66B 2020-06-06 09:49:25 +02:00
parent a98e258a48
commit 0352d69e84
1 changed files with 5 additions and 3 deletions

View File

@ -471,7 +471,7 @@ public class FragmentRule extends FragmentBase {
if (folders.size() > 0)
Collections.sort(folders, folders.get(0).getComparator(null));
for (EntityFolder folder : folders)
data.folders.add(new AccountFolder(account, folder));
data.folders.add(new AccountFolder(account, folder, context));
}
}
@ -1061,16 +1061,18 @@ public class FragmentRule extends FragmentBase {
private class AccountFolder {
EntityAccount account;
EntityFolder folder;
String name;
public AccountFolder(EntityAccount account, EntityFolder folder) {
public AccountFolder(EntityAccount account, EntityFolder folder, Context context) {
this.account = account;
this.folder = folder;
this.name = account.name + "/" + Helper.localizeFolderName(context, folder.name);
}
@NonNull
@Override
public String toString() {
return account.name + "/" + folder.name;
return name;
}
}