Skip to content

Commit

Permalink
Fixed FAQ link in README.md and refactored two strings to strings.xml (
Browse files Browse the repository at this point in the history
…#47)

* Update README.md

Fixed FAQ link

* Moved strings to strings.xml
  • Loading branch information
alex193a authored Jan 6, 2024
1 parent 1b5a26d commit 6e745a5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To help translate APatch or improve existing translations, please use [Weblate](
## More Information
- [FAQ](doc/en/faq.md)
- [FAQ](docs/en/faq.md)
## Credits
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/me/bmax/apatch/ui/screen/APM.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fun APModuleScreen(navigator: DestinationsNavigator) {
horizontalAlignment = Alignment.CenterHorizontally) {
Row {
Text(
text = "Android Patch Not Installed",
text = stringResource(id = R.string.apm_not_installed),
style = MaterialTheme.typography.titleMedium
)
}
Expand Down
10 changes: 9 additions & 1 deletion app/src/main/java/me/bmax/apatch/ui/screen/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,15 @@ fun FloatButton(navigator: DestinationsNavigator) {
}
},
icon = { Icon(Icons.Filled.Key, "") },
text = { Text(text = if(state != APApplication.State.UNKNOWN_STATE) "Clear Key" else "SuperKey" )},
text = {
Text(
text = if (state != APApplication.State.UNKNOWN_STATE) {
stringResource(id = R.string.clear_super_key)
} else {
stringResource(id = R.string.super_key)
}
)
},
)
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<string name="safe_mode">Safe mode</string>

<string name="super_key">SuperKey</string>
<string name="clear_super_key">Clear Key</string>
<string name="home_patch_set_key_title">Set SuperKey</string>
<string name="home_patch_set_key_desc">Only credential for KernelPatch</string>
<string name="home_patch_next_step">Next Step</string>
Expand Down Expand Up @@ -86,6 +87,7 @@
<string name="su_refresh">Refresh</string>

<string name="apm">APModule</string>
<string name="apm_not_installed">Android Patch Not Installed</string>
<string name="apm_failed_to_enable">Failed to enable module: %s</string>
<string name="apm_failed_to_disable">Failed to disable module: %s</string>
<string name="apm_empty">No module installed</string>
Expand Down

0 comments on commit 6e745a5

Please sign in to comment.