Open
Description
Problem Statement
The current implementation of the Query Total block, while functional, poses challenges for cross-language feasibility and localization. The main issues include:
- String Concatenation: The use of concatenated strings such as "Displaying," "of," or "result found" is difficult to translate accurately across languages. This approach fails to accommodate grammatical and linguistic differences.
- Pluralization: Singular and plural forms are not well-supported. Some languages have multiple plural forms, while others use only one, making the current implementation inadequate for proper localization.
- Customizable Labels: The absence of an intuitive way to allow users to customize labels while maintaining translation accuracy.
- Flexibility in Text Placement: Prefixes, suffixes, or other linguistic structures vary across languages, requiring more dynamic handling of text positioning.
Discussed Solutions
-
Dynamic Placeholder System (Proposed in the PR [Query-Total Block] Add editable text and visibility toggle for total count in Query Total block #67994):
- Introduce a single text box with support for placeholders (e.g.,
{range}
,{total}
, etc.). - Allow users to define text like
Displaying {range} of {total} results
, where{range}
and{total}
are dynamically replaced at runtime.
- Introduce a single text box with support for placeholders (e.g.,
-
Reordering Text Segments:
- Instead of relying on multiple static text boxes, implement a draggable interface where placeholders can be rearranged to fit language-specific structures (e.g.,
{prefix} {range} {suffix}
).
- Instead of relying on multiple static text boxes, implement a draggable interface where placeholders can be rearranged to fit language-specific structures (e.g.,
References
- Original PR for context.
- [Query-Total Block] Add editable text and visibility toggle for total count in Query Total block #67994 (comment)
- [Query-Total Block] Add editable text and visibility toggle for total count in Query Total block #67994 (comment)
- [Query-Total Block] Add editable text and visibility toggle for total count in Query Total block #67994 (comment)
This issue aims to improve the Query Total block while making the text editable & ensuring cross language support.
CC:- @swissspidy @fabiankaegy