Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove untranslatable string from strings.xml #2969

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class UpdateBroadcastReceiver : BroadcastReceiver() {
oldData.command,
oldData.label,
oldData.widgetLabel
?: context.getString(R.string.item_update_widget_text, oldData.label, oldData.mappedState),
?: "%1\$s: %2\$s".format(oldData.label, oldData.mappedState),
oldData.mappedState,
oldData.icon,
oldData.theme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1545,11 +1545,7 @@ class PreferencesActivity : AbstractBaseActivity() {
updateItemAndStatePrefSummary()

if (namePref.text.isNullOrEmpty()) {
namePref.text = preferenceManager.context.getString(
R.string.item_update_widget_text,
itemAndStatePref.label,
itemAndStatePref.mappedState
)
namePref.text = "%1\$s: %2\$s".format(itemAndStatePref.label, itemAndStatePref.mappedState)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ class WidgetListFragment : Fragment(), WidgetAdapter.ItemClickListener,
widget.item?.name ?: return,
state,
widgetLabel,
getString(R.string.item_update_widget_text, widgetLabel, mappedState),
"%1\$s: %2\$s".format(widgetLabel, mappedState),
mappedState,
widget.icon,
context.getPrefs().getStringOrFallbackIfEmpty(PrefKeys.LAST_WIDGET_THEME, "dark"),
Expand Down
2 changes: 0 additions & 2 deletions mobile/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,6 @@
<string name="item_update_widget_content_description">Widget for changing Item state</string>
<string name="item_update_widget_content_description_edit">Edit widget</string>
<string name="item_update_widget">Widget</string>
<!-- %1$s: Item label, %2$s: Action, e.g. "Lights: On" -->
<string name="item_update_widget_text">%1$s: %2$s</string>
mueller-ma marked this conversation as resolved.
Show resolved Hide resolved
<string name="item_update_widget_item_picker_title">Select an Item</string>
<string name="widget_show_state">Append current state to name</string>
<string name="widget_show_state_summary">The state is updated on the schedule that can be set in the settings under \"Send device information to server\"</string>
Expand Down