Merge branch 'upgrade-arrow-rtl' into 'master'
Fix version upgrade string for RTL languages In right-to-left languages _forward_ is the direction to the left, so leftwards arrow should be used to indicate upgrade:  For left-to-right languages it remains the same:  Closes #609. See merge request !235
This commit is contained in:
commit
7ef4e4245b
6
F-Droid/res/values-ldrtl/donottranslate.xml
Normal file
6
F-Droid/res/values-ldrtl/donottranslate.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="upgrade_from_to">%1$s ← %2$s</string>
|
||||
|
||||
</resources>
|
@ -20,6 +20,7 @@ public abstract class AppListAdapter extends CursorAdapter {
|
||||
|
||||
private LayoutInflater mInflater;
|
||||
private DisplayImageOptions displayImageOptions;
|
||||
private String upgradeFromTo;
|
||||
|
||||
public AppListAdapter(Context context, Cursor c) {
|
||||
super(context, c);
|
||||
@ -45,7 +46,7 @@ public abstract class AppListAdapter extends CursorAdapter {
|
||||
mInflater = (LayoutInflater) context.getSystemService(
|
||||
Context.LAYOUT_INFLATER_SERVICE);
|
||||
displayImageOptions = Utils.getImageLoadingOptions().build();
|
||||
|
||||
upgradeFromTo = context.getResources().getString(R.string.upgrade_from_to);
|
||||
}
|
||||
|
||||
protected abstract boolean showStatusUpdate();
|
||||
@ -122,7 +123,8 @@ public abstract class AppListAdapter extends CursorAdapter {
|
||||
final String installedVersionString = app.installedVersionName;
|
||||
|
||||
if (app.canAndWantToUpdate() && showStatusUpdate()) {
|
||||
return installedVersionString + " → " + app.getSuggestedVersion();
|
||||
return String.format(upgradeFromTo,
|
||||
installedVersionString, app.getSuggestedVersion());
|
||||
}
|
||||
|
||||
if (app.installedVersionCode > 0 && showStatusInstalled()) {
|
||||
|
@ -9,6 +9,7 @@
|
||||
<string name="license_gplv3_later">GNU General Public License version\u00A03 or later</string>
|
||||
|
||||
<string name="https">https://</string>
|
||||
<string name="upgrade_from_to">%1$s → %2$s</string>
|
||||
|
||||
<string-array name="updateIntervalValues">
|
||||
<item>0</item>
|
||||
|
@ -28,6 +28,8 @@ for d in glob.glob(os.path.join('src', 'main', 'res', 'values-*')):
|
||||
continue
|
||||
if re.match('^v[0-9]+$', lang):
|
||||
continue
|
||||
if lang == 'ldrtl':
|
||||
continue
|
||||
if os.path.islink(d):
|
||||
continue
|
||||
trans.add(lang)
|
||||
|
Loading…
x
Reference in New Issue
Block a user