Localize Android native autofill component (#993)

This commit is contained in:
Leendert de Borst
2025-07-11 12:00:30 +02:00
committed by Leendert de Borst
parent cb5cd1006c
commit 5b6a80a7b1
3 changed files with 17 additions and 5 deletions

View File

@@ -87,7 +87,7 @@ class AutofillService : AutofillService() {
try {
val responseBuilder = FillResponse.Builder()
val presentation = RemoteViews(packageName, R.layout.autofill_dataset_item_logo)
presentation.setTextViewText(R.id.text, "Failed to retrieve, open app")
presentation.setTextViewText(R.id.text, getString(R.string.autofill_failed_to_retrieve))
val dataSetBuilder = Dataset.Builder(presentation)
@@ -347,7 +347,7 @@ class AutofillService : AutofillService() {
val presentation = RemoteViews(packageName, R.layout.autofill_dataset_item_logo)
presentation.setTextViewText(
R.id.text,
"No match found, create new?",
getString(R.string.autofill_no_match_found),
)
val dataSetBuilder = Dataset.Builder(presentation)
@@ -391,7 +391,7 @@ class AutofillService : AutofillService() {
val openAppPresentation = RemoteViews(packageName, R.layout.autofill_dataset_item_logo)
openAppPresentation.setTextViewText(
R.id.text,
"Open app",
getString(R.string.autofill_open_app),
)
val dataSetBuilder = Dataset.Builder(openAppPresentation)
@@ -436,7 +436,7 @@ class AutofillService : AutofillService() {
val presentation = RemoteViews(packageName, R.layout.autofill_dataset_item_logo)
presentation.setTextViewText(
R.id.text,
"Vault locked",
getString(R.string.autofill_vault_locked),
)
val dataSetBuilder = Dataset.Builder(presentation)
@@ -474,7 +474,7 @@ class AutofillService : AutofillService() {
val presentation = RemoteViews(packageName, R.layout.autofill_dataset_item_logo)
presentation.setTextViewText(
R.id.text,
"Failed to retrieve, open app",
getString(R.string.autofill_failed_to_retrieve),
)
val dataSetBuilder = Dataset.Builder(presentation)

View File

@@ -2,4 +2,10 @@
<string name="app_name">AliasVault</string>
<string name="autofill_service_description">AliasVault AutoFill</string>
<string name="aliasvault_icon">AliasVault pictogram</string>
<!-- AutofillService strings -->
<string name="autofill_failed_to_retrieve">Ophalen mislukt, open app</string>
<string name="autofill_no_match_found">Geen match gevonden, nieuwe maken?</string>
<string name="autofill_open_app">Open app</string>
<string name="autofill_vault_locked">Kluis vergrendeld</string>
</resources>

View File

@@ -5,4 +5,10 @@
<string name="expo_splash_screen_status_bar_translucent" translatable="false">false</string>
<string name="autofill_service_description" translatable="true">AliasVault AutoFill</string>
<string name="aliasvault_icon">AliasVault icon</string>
<!-- AutofillService strings -->
<string name="autofill_failed_to_retrieve">Failed to retrieve, open app</string>
<string name="autofill_no_match_found">No match found, create new?</string>
<string name="autofill_open_app">Open app</string>
<string name="autofill_vault_locked">Vault locked</string>
</resources>