0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-12-03 16:27:26 +00:00

EN-UI: Make legend translateable

This commit is contained in:
Marvin W 2021-01-09 14:39:08 +01:00
parent 65032fbb3c
commit 2f29b93a99
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
3 changed files with 6 additions and 2 deletions

View file

@ -163,7 +163,7 @@ class DotChartView : View {
canvas.drawMyRect(subLeft, subTop.toFloat(), perWidth.toFloat(), perHeight.toFloat(), grayBoxColor) canvas.drawMyRect(subLeft, subTop.toFloat(), perWidth.toFloat(), perHeight.toFloat(), grayBoxColor)
val strNoRecords = "No records" val strNoRecords = context.getString(R.string.pref_exposure_rpis_histogram_legend_no_records)
fontPaint.textAlign = Paint.Align.LEFT fontPaint.textAlign = Paint.Align.LEFT
fontPaint.getTextBounds(strNoRecords, 0, strNoRecords.length, fontTempRect) fontPaint.getTextBounds(strNoRecords, 0, strNoRecords.length, fontTempRect)
canvas.drawText(strNoRecords, (subLeft + perWidth + 4 * d).toFloat(), (subTop + perHeight / 2.0 + fontTempRect.height() / 2.0).toFloat(), fontPaint) canvas.drawText(strNoRecords, (subLeft + perWidth + 4 * d).toFloat(), (subTop + perHeight / 2.0 + fontTempRect.height() / 2.0).toFloat(), fontPaint)
@ -172,7 +172,7 @@ class DotChartView : View {
canvas.drawMyRect((subLeft + (perWidth + innerPadding) * 2 + 12 * d + fontTempRect.width()).toFloat(), subTop.toFloat(), perWidth.toFloat(), perHeight.toFloat(), accentColor and (128 shl 24 or 0xffffff)) canvas.drawMyRect((subLeft + (perWidth + innerPadding) * 2 + 12 * d + fontTempRect.width()).toFloat(), subTop.toFloat(), perWidth.toFloat(), perHeight.toFloat(), accentColor and (128 shl 24 or 0xffffff))
canvas.drawMyRect((subLeft + (perWidth + innerPadding) * 3 + 12 * d + fontTempRect.width()).toFloat(), subTop.toFloat(), perWidth.toFloat(), perHeight.toFloat(), accentColor) canvas.drawMyRect((subLeft + (perWidth + innerPadding) * 3 + 12 * d + fontTempRect.width()).toFloat(), subTop.toFloat(), perWidth.toFloat(), perHeight.toFloat(), accentColor)
val strRecords = "0 / $averageValue / $maxValue IDs per hour" val strRecords = context.getString(R.string.pref_exposure_rpis_histogram_legend_records, 0, averageValue, maxValue)
canvas.drawText(strRecords, (subLeft + (perWidth + innerPadding) * 3 + 16 * d + fontTempRect.width() + perWidth).toFloat(), (subTop + perHeight / 2.0 + fontTempRect.height() / 2.0).toFloat(), fontPaint) canvas.drawText(strRecords, (subLeft + (perWidth + innerPadding) * 3 + 16 * d + fontTempRect.width() + perWidth).toFloat(), (subTop + perHeight / 2.0 + fontTempRect.height() / 2.0).toFloat(), fontPaint)
} }
} }

View file

@ -30,6 +30,8 @@
<string name="pref_exposure_app_api_usage_title">Nutzung der API in den letzten 14 Tagen</string> <string name="pref_exposure_app_api_usage_title">Nutzung der API in den letzten 14 Tagen</string>
<string name="pref_exposure_app_api_usage_summary_line"><xliff:g example="12">%1$d</xliff:g> Aufrufe von <xliff:g example="provideDiagnosisKeys">%2$s</xliff:g></string> <string name="pref_exposure_app_api_usage_summary_line"><xliff:g example="12">%1$d</xliff:g> Aufrufe von <xliff:g example="provideDiagnosisKeys">%2$s</xliff:g></string>
<string name="prefcat_exposure_rpis_histogram_title"><xliff:g example="230">%1$d</xliff:g> gesammelte IDs</string> <string name="prefcat_exposure_rpis_histogram_title"><xliff:g example="230">%1$d</xliff:g> gesammelte IDs</string>
<string name="pref_exposure_rpis_histogram_legend_no_records">Keine Daten</string>
<string name="pref_exposure_rpis_histogram_legend_records"><xliff:g example="0">%1$d</xliff:g> / <xliff:g example="5">%2$d</xliff:g> / <xliff:g example="50">%3$d</xliff:g> IDs pro Stunde</string>
<string name="pref_exposure_rpi_delete_all_title">Löschen</string> <string name="pref_exposure_rpi_delete_all_title">Löschen</string>
<string name="pref_exposure_rpi_delete_all_summary">Alle gesammelten IDs löschen</string> <string name="pref_exposure_rpi_delete_all_summary">Alle gesammelten IDs löschen</string>
<string name="pref_exposure_rpi_delete_all_warning">Nach dem Löschen der gesammelten IDs kannst du nicht mehr informiert werden, falls einer deiner Kontakte der letzten 14 Tage positiv getested wurde.</string> <string name="pref_exposure_rpi_delete_all_warning">Nach dem Löschen der gesammelten IDs kannst du nicht mehr informiert werden, falls einer deiner Kontakte der letzten 14 Tage positiv getested wurde.</string>

View file

@ -40,6 +40,8 @@
<string name="pref_exposure_app_api_usage_title">API usage in the last 14 days</string> <string name="pref_exposure_app_api_usage_title">API usage in the last 14 days</string>
<string name="pref_exposure_app_api_usage_summary_line"><xliff:g example="12">%1$d</xliff:g> calls to <xliff:g example="provideDiagnosisKeys">%2$s</xliff:g></string> <string name="pref_exposure_app_api_usage_summary_line"><xliff:g example="12">%1$d</xliff:g> calls to <xliff:g example="provideDiagnosisKeys">%2$s</xliff:g></string>
<string name="prefcat_exposure_rpis_histogram_title"><xliff:g example="230">%1$d</xliff:g> IDs collected</string> <string name="prefcat_exposure_rpis_histogram_title"><xliff:g example="230">%1$d</xliff:g> IDs collected</string>
<string name="pref_exposure_rpis_histogram_legend_no_records">No records</string>
<string name="pref_exposure_rpis_histogram_legend_records"><xliff:g example="0">%1$d</xliff:g> / <xliff:g example="5">%2$d</xliff:g> / <xliff:g example="50">%3$d</xliff:g> IDs per hour</string>
<string name="pref_exposure_rpi_delete_all_title">Delete</string> <string name="pref_exposure_rpi_delete_all_title">Delete</string>
<string name="pref_exposure_rpi_delete_all_summary">Delete all collected IDs</string> <string name="pref_exposure_rpi_delete_all_summary">Delete all collected IDs</string>
<string name="pref_exposure_rpi_delete_all_warning">Deleting collected IDs will make it impossible to notify you in case any of your contacts of the last 14 days is diagnosed.</string> <string name="pref_exposure_rpi_delete_all_warning">Deleting collected IDs will make it impossible to notify you in case any of your contacts of the last 14 days is diagnosed.</string>