mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
parent
d1a395689a
commit
a5dc7f79c1
2 changed files with 13 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ import android.widget.Adapter;
|
|||
import android.widget.AdapterView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
import fr.free.nrw.commons.CommonsApplication;
|
||||
import fr.free.nrw.commons.HandlerService;
|
||||
|
|
@ -216,7 +217,15 @@ public class ContributionsActivity
|
|||
((CursorAdapter)contributionsList.getAdapter()).swapCursor(cursor);
|
||||
}
|
||||
|
||||
getSupportActionBar().setSubtitle(getResources().getQuantityString(R.plurals.contributions_subtitle, cursor.getCount(), cursor.getCount()));
|
||||
if (cursor.getCount() == 0
|
||||
&& Locale.getDefault().getISO3Language().equals(Locale.ENGLISH.getISO3Language())) {
|
||||
//cursor count is zero and language is english -
|
||||
// we need to set the message for 0 case explicitly.
|
||||
getSupportActionBar().setSubtitle(getResources()
|
||||
.getString(R.string.contributions_subtitle_zero));
|
||||
} else {
|
||||
getSupportActionBar().setSubtitle(getResources().getQuantityString(R.plurals.contributions_subtitle, cursor.getCount(), cursor.getCount()));
|
||||
}
|
||||
|
||||
contributionsList.clearSyncMessage();
|
||||
notifyAndMigrateDataSetObservers();
|
||||
|
|
|
|||
|
|
@ -50,8 +50,10 @@
|
|||
<string name="categories_search_text_hint">Search categories</string>
|
||||
<string name="menu_save_categories">Save</string>
|
||||
<string name="refresh_button">Refresh</string>
|
||||
<string name="contributions_subtitle_zero">No uploads yet</string>
|
||||
<plurals name="contributions_subtitle">
|
||||
<item quantity="zero">No uploads yet</item>
|
||||
<!--zero is not used in english. Category mentioned here for easy reference in future-->
|
||||
<item quantity="zero">@string/contributions_subtitle_zero</item>
|
||||
<item quantity="one">%d upload</item>
|
||||
<item quantity="other">%d uploads</item>
|
||||
</plurals>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue