Merge pull request #2651 from philipwhiuk/pluraliseRemoteSearchDownload

Pluralisation of remote search download
This commit is contained in:
Vincent Breitmoser 2017-08-21 16:56:47 +02:00 committed by GitHub
commit 74b5b01b3d
2 changed files with 11 additions and 5 deletions

View file

@ -1340,10 +1340,10 @@ public class MessageListFragment extends Fragment implements OnItemClickListener
public void remoteSearchServerQueryComplete(String folderName, int numResults, int maxResults) {
handler.progress(true);
if (maxResults != 0 && numResults > maxResults) {
handler.updateFooter(context.getString(R.string.remote_search_downloading_limited,
maxResults, numResults));
handler.updateFooter(context.getResources().getQuantityString(R.plurals.remote_search_downloading_limited,
maxResults, maxResults, numResults));
} else {
handler.updateFooter(context.getString(R.string.remote_search_downloading, numResults));
handler.updateFooter(context.getResources().getQuantityString(R.plurals.remote_search_downloading, numResults));
}
fragmentListener.setMessageListProgress(Window.PROGRESS_START);
}

View file

@ -1058,8 +1058,14 @@ Please submit bug reports, contribute new features and ask questions at
<string name="account_settings_remote_search_num_label">Server search limit</string>
<string name="account_settings_remote_search_num_summary">Search will stop after finding <xliff:g id="num_results">%s</xliff:g> results.</string>
<string name="remote_search_sending_query">Sending query to server</string>
<string name="remote_search_downloading">Fetching %d results</string>
<string name="remote_search_downloading_limited">Fetching %1$d of %2$d results</string>
<plurals name="remote_search_downloading">
<item quantity="one">Fetching %d result</item>
<item quantity="other">Fetching %d results</item>
</plurals>
<plurals name="remote_search_downloading_limited">
<item quantity="one">Fetching %1$d of %2$d results</item>
<item quantity="other">Fetching %1$d of %2$d results</item>
</plurals>
<string name="remote_search_error">Remote search failed</string>
<string name="account_settings_search">Search</string>