Skip to content

Commit

Permalink
update localisation same as adf (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-alfresco authored Nov 12, 2021
1 parent e508760 commit 291c68a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class CreateComponentsSheet : BottomSheetDialogFragment(), MavericksView {

private fun setupComponents() {
withState(viewModel) { state ->
binding.title.text = state.parent.category.name
when (state.parent.category.component?.selector) {
ChipComponentType.TEXT.component -> {
binding.textComponent.componentParent.visibility = View.VISIBLE
Expand All @@ -60,20 +61,17 @@ class CreateComponentsSheet : BottomSheetDialogFragment(), MavericksView {
binding.textComponent.nameInputLayout.hint = state.parent.category.component?.settings?.placeholder
binding.textComponent.nameInput.setText(state.parent.selectedName)
binding.textComponent.nameInput.setSelection(state.parent.selectedName.length)
binding.title.text = getString(R.string.title_text_filter)
}

ChipComponentType.CHECK_LIST.component -> {
viewModel.buildCheckListModel()
binding.checkListComponent.componentParent.visibility = View.VISIBLE
binding.title.text = getString(R.string.title_file_type)
}
ChipComponentType.RADIO.component -> {
viewModel.buildSingleDataModel()
if (state.parent.selectedName.isEmpty())
viewModel.copyDefaultComponentData()
binding.radioListComponent.radioParent.visibility = View.VISIBLE
binding.title.text = getString(R.string.title_file_type)
}
ChipComponentType.NUMBER_RANGE.component -> {
viewModel.buildSingleDataModel()
Expand All @@ -86,7 +84,6 @@ class CreateComponentsSheet : BottomSheetDialogFragment(), MavericksView {
binding.numberRangeComponent.toInput.setText(fromToArray[1].trim())
binding.numberRangeComponent.fromInput.setSelection(fromToArray[0].trim().length)
}
binding.title.text = getString(R.string.title_number_range)
}
ChipComponentType.SLIDER.component -> {
viewModel.fromValue = "0"
Expand All @@ -107,11 +104,9 @@ class CreateComponentsSheet : BottomSheetDialogFragment(), MavericksView {
if (state.parent.selectedName.isNotEmpty()) {
binding.sliderComponent.slider.value = state.parent.selectedName.toFloat()
}
binding.title.text = getString(R.string.title_slider)
}
ChipComponentType.DATE_RANGE.component -> {
binding.dateRangeComponent.componentParent.visibility = View.VISIBLE
binding.title.text = getString(R.string.title_created_date_range)

binding.dateRangeComponent.fromInput.inputType = 0
binding.dateRangeComponent.fromInput.isCursorVisible = false
Expand Down
10 changes: 2 additions & 8 deletions search/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@

<string name="advance_search_title">Erweiterte Suche</string>
<string name="default_search">Standard</string>
<string name="folder">Ordner</string>
<string name="title_text_filter">Textfilter</string>
<string name="title_file_type">Dateityp</string>
<string name="title_number_range">Zahlenbereich</string>
<string name="title_slider">Größe (MB)</string>
<string name="title_choose_date">Daten auswählen</string>
<string name="component_action_reset">Zurücksetzen</string>
<string name="component_action_apply">Anwenden</string>
<string name="component_action_cancel">Abbrechen</string>
Expand All @@ -32,6 +26,6 @@
<string name="app.search.radio.document">Dokument</string>
<string name="component_number_range_empty">Erforderlicher Wert</string>
<string name="component_number_range_invalid_input">Der „Von“ Wert muss kleiner als der „Bis“ Wert sein</string>
<string name="hint_number_range_from">Von</string>
<string name="hint_number_range_to">Bis</string>
<string name="hint_range_from">Von</string>
<string name="hint_range_to">Bis</string>
</resources>
10 changes: 2 additions & 8 deletions search/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@

<string name="advance_search_title">Búsqueda avanzada</string>
<string name="default_search">Predeterminado</string>
<string name="folder">Carpeta</string>
<string name="title_text_filter">Filtro de texto</string>
<string name="title_file_type">Tipo de fichero</string>
<string name="title_number_range">Rango de tamaño</string>
<string name="title_slider">Tamaño (MB)</string>
<string name="title_choose_date">Elegir fechas</string>
<string name="component_action_reset">Re&amp;stablecer</string>
<string name="component_action_apply">Aplicar</string>
<string name="component_action_cancel">Cancelar</string>
Expand All @@ -32,6 +26,6 @@
<string name="app.search.radio.document">Documento</string>
<string name="component_number_range_empty">Valor requerido</string>
<string name="component_number_range_invalid_input">El valor De debe ser menor que el valor A</string>
<string name="hint_number_range_from">De</string>
<string name="hint_number_range_to">A</string>
<string name="hint_range_from">De</string>
<string name="hint_range_to">A</string>
</resources>
10 changes: 2 additions & 8 deletions search/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@

<string name="advance_search_title">Recherche avancée</string>
<string name="default_search">Par défaut</string>
<string name="folder">Dossier</string>
<string name="title_text_filter">Filtre texte</string>
<string name="title_file_type">Type de fichier</string>
<string name="title_number_range">Gamme de taille</string>
<string name="title_slider">Taille (MB)</string>
<string name="title_choose_date">Choisir les dates</string>
<string name="component_action_reset">Réinitialiser</string>
<string name="component_action_apply">Appliquer</string>
<string name="component_action_cancel">Annuler</string>
Expand All @@ -32,6 +26,6 @@
<string name="app.search.radio.document">Document</string>
<string name="component_number_range_empty">Valeur requise</string>
<string name="component_number_range_invalid_input">La valeur De doit être inférieure à la valeur A</string>
<string name="hint_number_range_from">De</string>
<string name="hint_number_range_to">A</string>
<string name="hint_range_from">De</string>
<string name="hint_range_to">A</string>
</resources>
10 changes: 2 additions & 8 deletions search/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@

<string name="advance_search_title">Ricerca avanzata</string>
<string name="default_search">Predefinito</string>
<string name="folder">Cartella</string>
<string name="title_text_filter">Filtro testo</string>
<string name="title_file_type">Tipo di file</string>
<string name="title_number_range">Intervallo dimensioni</string>
<string name="title_slider">Dimensioni (MB)</string>
<string name="title_choose_date">Scegli date</string>
<string name="component_action_reset">Reimposta</string>
<string name="component_action_apply">Applica</string>
<string name="component_action_cancel">Annulla</string>
Expand All @@ -32,6 +26,6 @@
<string name="app.search.radio.document">Documento</string>
<string name="component_number_range_empty">Valore obbligatorio</string>
<string name="component_number_range_invalid_input">Il valore Da deve essere inferiore al valore A</string>
<string name="hint_number_range_from">Da</string>
<string name="hint_number_range_to">A</string>
<string name="hint_range_from">Da</string>
<string name="hint_range_to">A</string>
</resources>
10 changes: 2 additions & 8 deletions search/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@

<string name="advance_search_title">Geavanceerd zoeken</string>
<string name="default_search">Standaard</string>
<string name="folder">Map</string>
<string name="title_text_filter">Tekstfilter</string>
<string name="title_file_type">Bestandstype</string>
<string name="title_number_range">Getallenbereik</string>
<string name="title_slider">Grootte (MB)</string>
<string name="title_choose_date">Datums kiezen</string>
<string name="component_action_reset">Opnieuw instellen</string>
<string name="component_action_apply">Toepassen</string>
<string name="component_action_cancel">Annuleren</string>
Expand All @@ -32,6 +26,6 @@
<string name="app.search.radio.document">Document</string>
<string name="component_number_range_empty">Vereiste waarde</string>
<string name="component_number_range_invalid_input">Van-waarde moet kleiner zijn dan Tot-waarde</string>
<string name="hint_number_range_from">Van</string>
<string name="hint_number_range_to">Tot</string>
<string name="hint_range_from">Van</string>
<string name="hint_range_to">Tot</string>
</resources>
6 changes: 0 additions & 6 deletions search/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@

<string name="advance_search_title">Advance search</string>
<string name="default_search">Default</string>
<string name="folder">Folder</string>
<string name="title_text_filter">Text filter</string>
<string name="title_file_type">File type</string>
<string name="title_number_range">Number range</string>
<string name="title_slider">Size (MB)</string>
<string name="title_created_date_range">Created Date (range)</string>
<string name="component_action_reset">Reset</string>
<string name="component_action_apply">Apply</string>
<string name="component_action_cancel">Cancel</string>
Expand Down

0 comments on commit 291c68a

Please sign in to comment.