rename core strings

This commit is contained in:
Milos Kozak 2021-02-22 18:04:30 +01:00
parent aaa1ecea8d
commit 07bf16b07b
26 changed files with 31 additions and 31 deletions

View file

@ -202,7 +202,7 @@ class CarbsDialog : DialogFragmentWithDate() {
}
val notes = binding.notesLayout.notes.text.toString()
if (notes.isNotEmpty())
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes)
actions.add(resourceHelper.gs(R.string.notes_label) + ": " + notes)
if (eventTimeChanged)
actions.add(resourceHelper.gs(R.string.time) + ": " + dateUtil.dateAndTimeString(eventTime))

View file

@ -184,7 +184,7 @@ class CareDialog : DialogFragmentWithDate() {
}
val notes = binding.notesLayout.notes.text.toString()
if (notes.isNotEmpty()) {
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes)
actions.add(resourceHelper.gs(R.string.notes_label) + ": " + notes)
json.put("notes", notes)
}
eventTime -= eventTime % 1000

View file

@ -117,7 +117,7 @@ class FillDialog : DialogFragmentWithDate() {
actions.add(resourceHelper.gs(R.string.record_insulin_cartridge_change).formatColor(resourceHelper, R.color.actionsConfirm))
val notes = binding.notesLayout.notes.text.toString()
if (notes.isNotEmpty())
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes)
actions.add(resourceHelper.gs(R.string.notes_label) + ": " + notes)
eventTime -= eventTime % 1000
if (eventTimeChanged)

View file

@ -172,7 +172,7 @@ class InsulinDialog : DialogFragmentWithDate() {
val notes = binding.notesLayout.notes.text.toString()
if (notes.isNotEmpty())
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes)
actions.add(resourceHelper.gs(R.string.notes_label) + ": " + notes)
if (insulinAfterConstraints > 0 || eatingSoonChecked) {
activity?.let { activity ->

View file

@ -118,7 +118,7 @@ class ProfileSwitchDialog : DialogFragmentWithDate() {
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_timeshift_label) + ": " + resourceHelper.gs(R.string.format_hours, timeShift.toDouble()))
val notes = binding.notesLayout.notes.text.toString()
if (notes.isNotEmpty())
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes)
actions.add(resourceHelper.gs(R.string.notes_label) + ": " + notes)
if (eventTimeChanged)
actions.add(resourceHelper.gs(R.string.time) + ": " + dateUtil.dateAndTimeString(eventTime))

View file

@ -350,7 +350,7 @@ class SmsCommunicatorPlugin @Inject constructor(
}
})
} else
sendSMS(Sms(receivedSms.phoneNumber, resourceHelper.gs(R.string.smscommunicator_loopisdisabled)))
sendSMS(Sms(receivedSms.phoneNumber, resourceHelper.gs(R.string.loopisdisabled)))
receivedSms.processed = true
}
@ -377,7 +377,7 @@ class SmsCommunicatorPlugin @Inject constructor(
if (loopPlugin.isSuspended) String.format(resourceHelper.gs(R.string.loopsuspendedfor), loopPlugin.minutesToEndOfSuspend())
else resourceHelper.gs(R.string.smscommunicator_loopisenabled)
} else
resourceHelper.gs(R.string.smscommunicator_loopisdisabled)
resourceHelper.gs(R.string.loopisdisabled)
sendSMS(Sms(receivedSms.phoneNumber, reply))
receivedSms.processed = true
}

View file

@ -151,7 +151,7 @@ class TreatmentsCareportalFragment : DaggerFragment() {
val careportalEvent = v.tag as CareportalEvent
activity?.let { activity ->
val text = resourceHelper.gs(R.string.eventtype) + ": " + translator.translate(careportalEvent.eventType) + "\n" +
resourceHelper.gs(R.string.careportal_newnstreatment_notes_label) + ": " + careportalEvent.notes + "\n" +
resourceHelper.gs(R.string.notes_label) + ": " + careportalEvent.notes + "\n" +
resourceHelper.gs(R.string.date) + ": " + dateUtil.dateAndTimeString(careportalEvent.date)
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.removerecord), text, Runnable {
uel.log("REMOVED CAREP", text)

View file

@ -65,7 +65,7 @@
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:paddingStart="10dp"
android:text="@string/overview_quickwizard_item_remove_button"
android:text="@string/remove_button"
android:textAlignment="viewEnd"
android:textColor="@android:color/holo_orange_light" />

View file

@ -279,7 +279,7 @@
android:layout_gravity="center_horizontal"
android:labelFor="@+id/notes"
android:padding="10dp"
android:text="@string/careportal_newnstreatment_notes_label"
android:text="@string/notes_label"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="bold" />
@ -289,7 +289,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:autofillHints="@string/careportal_newnstreatment_notes_label"
android:autofillHints="@string/notes_label"
android:gravity="start"
android:inputType="text|textCapSentences"
android:textAppearance="?android:attr/textAppearanceSmall" />

View file

@ -391,7 +391,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:width="86dp"
android:text="@string/careportal_newnstreatment_notes_label"
android:text="@string/notes_label"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView

View file

@ -87,7 +87,7 @@
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:paddingStart="10dp"
android:text="@string/overview_quickwizard_item_remove_button"
android:text="@string/remove_button"
android:textAlignment="viewEnd"
android:textColor="@android:color/holo_orange_light" />

View file

@ -125,7 +125,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/overview_quickwizard_item_remove_button" />
android:text="@string/remove_button" />
</LinearLayout>
</LinearLayout>

View file

@ -163,7 +163,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:text="@string/overview_quickwizard_item_remove_button"
android:text="@string/remove_button"
android:textAlignment="viewEnd"
android:textColor="@android:color/holo_orange_light" />

View file

@ -95,7 +95,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:text="@string/overview_quickwizard_item_remove_button"
android:text="@string/remove_button"
android:textAlignment="viewEnd"
android:textColor="@android:color/holo_orange_light" />

View file

@ -176,7 +176,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/overview_quickwizard_item_remove_button"
android:text="@string/remove_button"
android:textAlignment="viewEnd"
android:textColor="@android:color/holo_orange_light" />

View file

@ -111,7 +111,7 @@
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:paddingStart="10dp"
android:text="@string/overview_quickwizard_item_remove_button"
android:text="@string/remove_button"
android:textAlignment="viewEnd"
android:textColor="@android:color/holo_orange_light" />

View file

@ -197,7 +197,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/overview_quickwizard_item_remove_button"
android:text="@string/remove_button"
android:textAlignment="viewEnd"
android:textColor="@android:color/holo_orange_light" />

View file

@ -139,7 +139,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:text="@string/overview_quickwizard_item_remove_button"
android:text="@string/remove_button"
android:textAlignment="viewEnd"
android:textColor="@android:color/holo_orange_light" />

View file

@ -186,7 +186,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
`when`(resourceHelper.gs(R.string.smscommunicator_tt_set)).thenReturn("Target %1\$s for %2\$d minutes set successfully")
`when`(resourceHelper.gs(R.string.smscommunicator_tt_canceled)).thenReturn("Temp Target canceled successfully")
`when`(resourceHelper.gs(R.string.loopsuspendedfor)).thenReturn("Suspended (%1\$d m)")
`when`(resourceHelper.gs(R.string.smscommunicator_loopisdisabled)).thenReturn("Loop is disabled")
`when`(resourceHelper.gs(R.string.loopisdisabled)).thenReturn("Loop is disabled")
`when`(resourceHelper.gs(R.string.smscommunicator_loopisenabled)).thenReturn("Loop is enabled")
`when`(resourceHelper.gs(R.string.wrongformat)).thenReturn("Wrong format")
`when`(resourceHelper.gs(ArgumentMatchers.eq(R.string.wrongTbrDuration), ArgumentMatchers.any())).thenAnswer { i: InvocationOnMock -> "TBR duration must be a multiple of " + i.arguments[1] + " minutes and greater than 0." }

View file

@ -185,7 +185,7 @@ class AutomationPlugin @Inject constructor(
if (config.APS) {
if (loopPlugin.isSuspended || !(loopPlugin as PluginBase).isEnabled()) {
aapsLogger.debug(LTag.AUTOMATION, "Loop deactivated")
executionLog.add(resourceHelper.gs(R.string.smscommunicator_loopisdisabled))
executionLog.add(resourceHelper.gs(R.string.loopisdisabled))
userEventsEnabled = false
}
val enabled = constraintChecker.isAutomationEnabled()

View file

@ -56,7 +56,7 @@ class ActionLoopSuspend(injector: HasAndroidInjector) : Action(injector) {
override fun generateDialog(root: LinearLayout) {
LayoutBuilder()
.add(LabelWithElement(injector, resourceHelper.gs(R.string.careportal_newnstreatment_duration_min_label), "", minutes))
.add(LabelWithElement(injector, resourceHelper.gs(R.string.duration_min_label), "", minutes))
.build(root)
}

View file

@ -44,7 +44,7 @@ class ActionProfileSwitchPercent(injector: HasAndroidInjector) : Action(injector
override fun generateDialog(root: LinearLayout) {
LayoutBuilder()
.add(LabelWithElement(injector, resourceHelper.gs(R.string.percent_u), "", pct))
.add(LabelWithElement(injector, resourceHelper.gs(R.string.careportal_newnstreatment_duration_min_label), "", duration))
.add(LabelWithElement(injector, resourceHelper.gs(R.string.duration_min_label), "", duration))
.build(root)
}

View file

@ -49,7 +49,7 @@ class ActionStartTempTarget(injector: HasAndroidInjector) : Action(injector) {
val unitResId = if (value.units == Constants.MGDL) R.string.mgdl else R.string.mmol
LayoutBuilder()
.add(LabelWithElement(injector, resourceHelper.gs(R.string.careportal_temporarytarget) + "\n[" + resourceHelper.gs(unitResId) + "]", "", value))
.add(LabelWithElement(injector, resourceHelper.gs(R.string.careportal_newnstreatment_duration_min_label), "", duration))
.add(LabelWithElement(injector, resourceHelper.gs(R.string.duration_min_label), "", duration))
.build(root)
}

View file

@ -19,7 +19,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:contentDescription="@string/overview_quickwizard_item_remove_button" />
android:contentDescription="@string/remove_button" />
<LinearLayout
android:id="@+id/automation_layoutText"

View file

@ -12,7 +12,7 @@
android:layout_gravity="center_horizontal"
android:width="120dp"
android:padding="10dp"
android:text="@string/careportal_newnstreatment_notes_label"
android:text="@string/notes_label"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="bold" />

View file

@ -115,13 +115,13 @@
<string name="exit">Exit</string>
<string name="serial_number">Serial number</string>
<string name="removerecord">Remove record</string>
<string name="smscommunicator_loopisdisabled">Loop is disabled</string>
<string name="loopisdisabled">Loop is disabled</string>
<string name="alarm">Alarm</string>
<string name="disableloop">Disable loop</string>
<string name="enableloop">Enable loop</string>
<string name="resumeloop">Resume loop</string>
<string name="suspendloop">Suspend loop</string>
<string name="careportal_newnstreatment_duration_min_label">Duration [min]</string>
<string name="duration_min_label">Duration [min]</string>
<string name="notification">Notification</string>
<string name="noprofile">No profile loaded from NS yet</string>
<string name="exists">exists</string>
@ -134,8 +134,8 @@
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="loading">Loading …</string>
<string name="event_time_label">Event time</string>
<string name="careportal_newnstreatment_notes_label">Notes</string>
<string name="overview_quickwizard_item_remove_button">Remove</string>
<string name="notes_label">Notes</string>
<string name="remove_button">Remove</string>
<string name="addnew">Add new</string>
<!-- Constraints-->