From: kenstir Date: Sun, 22 Nov 2015 02:24:14 +0000 (-0500) Subject: Use string formatter to compose AppBar subtitle: "username" for cwmars_app (because... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8dd5b3b743f9d1430e8063151a8cdb16bc8d393a;p=working%2FEvergreen.git Use string formatter to compose AppBar subtitle: "username" for cwmars_app (because C/W MARS is in the title) and "C/W MARS - username" for hemlock_app. --- diff --git a/Open-ILS/src/Android/core/res/values/ou.xml b/Open-ILS/src/Android/core/res/values/ou.xml index 275ad0aad2..80b0b0c929 100644 --- a/Open-ILS/src/Android/core/res/values/ou.xml +++ b/Open-ILS/src/Android/core/res/values/ou.xml @@ -15,6 +15,8 @@ Evergreen EXAMPLE + + %1$s - %2$s https://demo.evergreencatalog.com diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/ActionBarUtils.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/ActionBarUtils.java index ecebd9b771..ec524ee781 100644 --- a/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/ActionBarUtils.java +++ b/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/ActionBarUtils.java @@ -2,6 +2,7 @@ package org.evergreen_ils.utils.ui; import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; +import org.evergreen_ils.R; import org.evergreen_ils.accountAccess.AccountAccess; import org.evergreen_ils.globals.AppPrefs; @@ -11,7 +12,9 @@ import org.evergreen_ils.globals.AppPrefs; public class ActionBarUtils { public static void initActionBarForActivity(ActionBarActivity activity, boolean isMainActivity) { ActionBar actionBar = activity.getSupportActionBar(); - actionBar.setSubtitle(AppPrefs.getString(AppPrefs.LIBRARY_NAME) + " - " + AccountAccess.userName); + actionBar.setSubtitle(String.format(activity.getString(R.string.ou_activity_subtitle), + AppPrefs.getString(AppPrefs.LIBRARY_NAME), + AccountAccess.userName)); if (!isMainActivity) { actionBar.setDisplayHomeAsUpEnabled(true); } diff --git a/Open-ILS/src/Android/cwmars_app/res/values/ou.xml b/Open-ILS/src/Android/cwmars_app/res/values/ou.xml index f4a0ecce76..8d28930acb 100644 --- a/Open-ILS/src/Android/cwmars_app/res/values/ou.xml +++ b/Open-ILS/src/Android/cwmars_app/res/values/ou.xml @@ -9,5 +9,6 @@ org.cwmars C/W MARS C/W MARS + %2$s https://bark.cwmars.org