weblate
weblate copied to clipboard
Clarify two different lookups related to “state”
Describe the problem
There are two different lookups related to “state”: state:TEXT
and is:TEXT
.
It is confusing.
Describe the solution you'd like
Clarify these two different lookups in the documentation.
Describe alternatives you've considered
No response
Screenshots
No response
Additional context
No response
state
looks only at state, while is
can handle additional lookups.
For example:
-
is:translated
is same asstate:>=translated
-
is:untranslated
is same asstate:<translated
-
is:pending
is not looking at string state at all
https://docs.weblate.org/en/latest/user/search.html#fields
state:TEXT
State search (approved
,translated
,needs-editing
,empty
,read-only
), supports Field operators.
is:TEXT Search for string states (
pending
,translated
,untranslated
).
The description of these two fields in the documentation is quite simple and similar. More detailed explanations are needed.
This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.
You can learn about how to get started in our contributors documentation.
Hi, I would like to work on this.
Any contributors are welcome!
Thank you for your report; the issue you have reported has just been fixed.
- In case you see a problem with the fix, please comment on this issue.
- In case you see a similar problem, please open a separate issue.
- If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.
@nijel
I still have questions about the is:TEXT
lookup.
According to the source code: https://github.com/WeblateOrg/weblate/blob/bda83e3c28f135e88af5b122770bbb146c690059/weblate/utils/search.py#L192-L202
-
is:read-only
is same asstate:read-only
-
is:approved
is same asstate:approved
-
is:needs-editing
is same asstate:needs-editing
-
is:translated
is same asstate:>=translated
-
is:untranslated
is same asstate:<translated
I still wonder why the logic of is:read-only
, is:approved
and is:needs-editing
is different from is:translated
and is:untranslated
.
And why the is:TEXT
was created as a lookup different from the state:TEXT
in the begining.
It provides additional queries. It's not uncommon to build a query language with more ways to query the same thing – it makes it easier for a user to write the query. For example, GitHub has this as well: https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests#search-by-open-or-closed-state
I still think it is necessary to detail the function of every available is:TEXT
lookup in the documentation. Since the logic of the is:TEXT
lookup is currently inconsistent (as listed above).
https://github.com/WeblateOrg/weblate/commit/59961d62189378ecbc0d809c4a091432f6d09ead#diff-3eb290919f61bddd29299720477d0001574593aa098ddaf1e41011adb8ebfc3aR50 is not enough and the documentation is still unclear.
Okay reopening.