From 2a8d217777a84affbb6808b55b263df7a284f0e8 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 13 Feb 2021 18:24:04 +0200 Subject: [PATCH] translatable text for template element value from the pattern --- .../ui/templates/TemplateDetailsAdapter.java | 36 +++++++++++-------- app/src/main/res/values-bg/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java index e472049b..1f371f35 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java @@ -334,6 +334,10 @@ class TemplateDetailsAdapter extends RecyclerView.Adapter selectHeaderDetailSource(v, HeaderDetail.DATE_YEAR)); - b.templateDetailsYearSource.setOnClickListener(v -> selectHeaderDetailSource(v, - HeaderDetail.DATE_YEAR)); + b.templateDetailsYearSourceLabel.setOnClickListener( + v -> selectHeaderDetailSource(v, HeaderDetail.DATE_YEAR)); + b.templateDetailsYearSource.setOnClickListener( + v -> selectHeaderDetailSource(v, HeaderDetail.DATE_YEAR)); if (header.hasLiteralDateMonth()) { b.templateDetailsMonthSource.setText(R.string.template_details_source_literal); @@ -365,7 +370,7 @@ class TemplateDetailsAdapter extends RecyclerView.Adapter selectHeaderDetailSource(v, @@ -382,7 +387,7 @@ class TemplateDetailsAdapter extends RecyclerView.Adapter selectHeaderDetailSource(v, HeaderDetail.DATE_DAY)); @@ -395,9 +400,9 @@ class TemplateDetailsAdapter extends RecyclerView.Adapter selectHeaderDetailSource(v, HeaderDetail.DESCRIPTION)); @@ -410,7 +415,7 @@ class TemplateDetailsAdapter extends RecyclerView.AdapterМакетът „%1$s“ е изтрит Връщане Резултат от прилагането на шаблона + Група %1$d (%2$s) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6c812855..9536e3bc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -228,4 +228,5 @@ Template \'%1$s\' deleted Undo Pattern match result + Group %1$d (%2$s) -- 2.39.5