Skip to content

Commit

Permalink
Fixed app_name not found in project
Browse files Browse the repository at this point in the history
  • Loading branch information
MohitMaliFtechiz committed Nov 23, 2023
1 parent 3510d2a commit 6104afe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ import org.json.JSONException
import org.kiwix.kiwixmobile.core.BuildConfig
import org.kiwix.kiwixmobile.core.NightModeConfig
import org.kiwix.kiwixmobile.core.R
import com.tonyodev.fetch2.R.string
import org.kiwix.kiwixmobile.core.StorageObserver
import org.kiwix.kiwixmobile.core.base.BaseFragment
import org.kiwix.kiwixmobile.core.base.FragmentActivityExtensions
Expand Down Expand Up @@ -993,7 +994,7 @@ abstract class CoreReaderFragment :
}

private fun getValidTitle(zimFileTitle: String?): String =
if (isAdded && isInvalidTitle(zimFileTitle)) getString(R.string.app_name)
if (isAdded && isInvalidTitle(zimFileTitle)) getString(string.app_name)
else zimFileTitle.toString()

private fun isInvalidTitle(zimFileTitle: String?): Boolean =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import android.content.Context
import android.content.Intent
import android.widget.RemoteViews
import org.kiwix.kiwixmobile.core.R
import com.tonyodev.fetch2.R.string
import kotlin.reflect.KClass

abstract class CoreSearchWidget : AppWidgetProvider() {
Expand All @@ -36,7 +37,7 @@ abstract class CoreSearchWidget : AppWidgetProvider() {
appWidgetManager: AppWidgetManager,
appWidgetIds: IntArray
) {
val appName = context.getString(R.string.app_name)
val appName = context.getString(string.app_name)
appWidgetIds.forEach { appWidgetId ->
val views = RemoteViews(context.packageName, R.layout.kiwix_search_widget)
views.setTextViewText(R.id.search_widget_text, "Search $appName")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import android.speech.RecognizerIntent
import androidx.appcompat.app.AppCompatActivity
import kotlinx.coroutines.channels.Channel
import org.kiwix.kiwixmobile.core.R
import com.tonyodev.fetch2.R.string
import org.kiwix.kiwixmobile.core.base.SideEffect
import org.kiwix.kiwixmobile.core.search.viewmodel.Action
import org.kiwix.kiwixmobile.core.search.viewmodel.Action.StartSpeechInputFailed
Expand All @@ -41,7 +42,7 @@ data class StartSpeechInput(private val actions: Channel<Action>) : SideEffect<U
putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault())
putExtra(
RecognizerIntent.EXTRA_PROMPT,
activity.getString(R.string.speech_prompt_text, activity.getString(R.string.app_name))
activity.getString(R.string.speech_prompt_text, activity.getString(string.app_name))
)
},
REQ_CODE_SPEECH_INPUT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package org.kiwix.kiwixmobile.core.utils.dialog
import android.app.Activity
import android.view.View
import org.kiwix.kiwixmobile.core.R
import com.tonyodev.fetch2.R.string

@Suppress("LongParameterList")
sealed class KiwixDialog(
Expand Down Expand Up @@ -184,7 +185,7 @@ sealed class KiwixDialog(
listOf(
String.format(
activity.getString(R.string.rate_dialog_msg),
activity.getString(R.string.app_name)
activity.getString(string.app_name)
)
),
icon
Expand Down

0 comments on commit 6104afe

Please sign in to comment.