Localised the units used in the cache dialog and toast.

This commit is contained in:
PhotonQyv 2017-08-08 22:01:59 +01:00
parent 0814dcf538
commit bb94fe4dd7
3 changed files with 5 additions and 3 deletions

View File

@ -533,7 +533,7 @@ public class MainActivity extends AppCompatActivity
}
}
final float finalCacheSize = cacheSize;
builder.setMessage(getString(R.string.cache_message, String.format("%s Mo", String.format(Locale.getDefault(), "%.2f", cacheSize))))
builder.setMessage(getString(R.string.cache_message, String.format("%s %s", String.format(Locale.getDefault(), "%.2f", cacheSize), getString(R.string.cache_units))))
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// continue with delete
@ -544,7 +544,7 @@ public class MainActivity extends AppCompatActivity
Helper.deleteDir(dir);
}
} catch (Exception ignored) {}
Toast.makeText(MainActivity.this, getString(R.string.toast_cache_clear,String.format("%s Mo", String.format(Locale.getDefault(), "%.2f", finalCacheSize))), Toast.LENGTH_LONG).show();
Toast.makeText(MainActivity.this, getString(R.string.toast_cache_clear,String.format("%s %s", String.format(Locale.getDefault(), "%.2f", finalCacheSize), getString(R.string.cache_units))), Toast.LENGTH_LONG).show();
dialog.dismiss();
}
})

View File

@ -328,6 +328,7 @@
<!-- CACHE -->
<string name="cache_title">Nettoyage du cache</string>
<string name="cache_message">Il y a %1$s de données en cache.\n\nSouhaitez-vous les supprimer ?</string>
<string name="cache_units">Mo</string>
<string name="toast_cache_clear">Le cache a été nettoyé ! %1$s ont été libérés</string>
<!-- PRIVACY -->

View File

@ -331,7 +331,8 @@
<string name="settings_popup_notification">For unread notifications?</string>
<!-- CACHE -->
<string name="cache_title">Clear cache</string>
<string name="cache_message">There are %1$s data in cache.\n\nWould you like to delete them?</string>
<string name="cache_message">There are %1$s of data in cache.\n\nWould you like to delete them?</string>
<string name="cache_units">Mb</string>
<string name="toast_cache_clear">Cache was cleared! %1$s were released</string>
<!-- PRIVACY -->