multilanguage for DashClock Extension
This commit is contained in:
parent
f0c0aa4d93
commit
9ddd335b05
@ -198,4 +198,5 @@
|
|||||||
<string name="mark_num_headlines_as_read">Mark %1$d article(s) as read?</string>
|
<string name="mark_num_headlines_as_read">Mark %1$d article(s) as read?</string>
|
||||||
<string name="prefs_confirm_headlines_catchup">Confirm marking articles as read</string>
|
<string name="prefs_confirm_headlines_catchup">Confirm marking articles as read</string>
|
||||||
<string name="author_formatted">by %1$s</string>
|
<string name="author_formatted">by %1$s</string>
|
||||||
|
<string name="n_unread_articles">%1$d unread articles</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -6,7 +6,6 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import com.google.android.apps.dashclock.api.DashClockExtension;
|
import com.google.android.apps.dashclock.api.DashClockExtension;
|
||||||
import com.google.android.apps.dashclock.api.ExtensionData;
|
import com.google.android.apps.dashclock.api.ExtensionData;
|
||||||
@ -53,7 +52,6 @@ public class DashClock extends DashClockExtension {
|
|||||||
super(context);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected void onPostExecute(JsonElement result) {
|
protected void onPostExecute(JsonElement result) {
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
try {
|
try {
|
||||||
@ -61,7 +59,7 @@ public class DashClock extends DashClockExtension {
|
|||||||
if (content != null) {
|
if (content != null) {
|
||||||
m_sessionId = content.get("session_id").getAsString();
|
m_sessionId = content.get("session_id").getAsString();
|
||||||
|
|
||||||
Log.d(TAG, "Authenticated!");
|
// Log.d(TAG, "Authenticated!");
|
||||||
|
|
||||||
ApiRequest req = new ApiRequest(m_context) {
|
ApiRequest req = new ApiRequest(m_context) {
|
||||||
protected void onPostExecute(JsonElement result) {
|
protected void onPostExecute(JsonElement result) {
|
||||||
@ -85,7 +83,7 @@ public class DashClock extends DashClockExtension {
|
|||||||
updatedData.icon(R.drawable.dashclock);
|
updatedData.icon(R.drawable.dashclock);
|
||||||
updatedData.status(String.valueOf(m_unreadCount));
|
updatedData.status(String.valueOf(m_unreadCount));
|
||||||
|
|
||||||
updatedData.expandedTitle(m_unreadCount + " unread articles");
|
updatedData.expandedTitle(getString(R.string.n_unread_articles, m_unreadCount));
|
||||||
//updatedData.expandedBody(getString(R.string.app_name));
|
//updatedData.expandedBody(getString(R.string.app_name));
|
||||||
|
|
||||||
updatedData.clickIntent(new Intent().setClassName("org.fox.ttrss",
|
updatedData.clickIntent(new Intent().setClassName("org.fox.ttrss",
|
||||||
|
Loading…
Reference in New Issue
Block a user