Transifex

  • Documentation
  • Projects & Content
  • Search Strings

Search Strings

Search Strings allows you to filter (text) and illustrate key string results across all your projects and languages in one instance via your organization’s page. Simplistic in its use and just with a few clicks indicate from the selected pool of strings and switch to the editor with one click to conduct all your edits in an organized, efficient manner.

GS1111.png#asset:6727

How it works

  • Enter TX and click on the top menu bar the “Search Strings” option.

  • Enter the text in the search field and hit “enter” or click “search”. This will automatically search for the source text and fetch all the strings that include any words entered in the search field.

  • If you wish to further filter the results, click in the “Filters” box below to set your search criteria per project/ source language/target language/resource/text/status/user/date or key.

  • Subsequently, a table is generated including all the string results (with a threshold up to 4,000 entries) and a sorting option (which must be performed prior to searching) that can sort the strings based on:

    • last activity (fetches the most recent reviewed strings)
    • project (segments strings per project)
    • relevance (sorts by text relevance)
    • appearance order (illustrates string sequence based on how they appear in the resource file

  •  The “Items per page” on the top left side of the table can display up to 100 entries.

  • Pagination is displayed on the right top of the table pagination1.png#asset:9801 and by clicking the pagination2.png#asset:9802  icon you can navigate to the next or previous page.

  • By clicking on a string,  the below window will slide from the right containing valuable info regarding the specific string. 

    GS2_200218_101405.png#asset:6725

  • You can open the string in the editor either by clicking on the “Open in Editor” button below or by directly clicking on theopenineditor.png#asset:9804icon. The editor opens in a new tab.

Specifics & Conditions

  • For optimal performance the search fetches up to 4,000 entries, when exceeded the entries are displayed as 4,000+. In case the threshold of search results is reached, a message will appear "Please refine your search criteria".
  • Only one sorting can be performed at a time, eg. sort by source language and then sort by project name will result in removing the first sorting by source language.
  • Sorting can be performed before searching for strings.
  • Default sorting is by “Project” if only filters have been used.
  • If text search is also used then results are by default sorted by “Relevance”.

Full Text Search

Search strings performs “full-text search” which means it analyzes the language of both the saved content and the query to find matches.

What happens when you search for "..." and why is not returning the expected results?

The “…” query is thus meaningless to search strings. We avoid to perform such a query so the user doesn't have to experience an infinite loop.

The use of the API could be a work around to find all offending translations.
Here is a snippet of code doing this using the Python API SDK:

python -m venv transifex_api
source ./transifex_api/bin/activate
python -m pip install transifex-python
import itertools
from transifex.api import transifex_api

transifex_api.setup(auth=API_TOKEN)
organization = transifex_api.Organization.get(slug=ORGANIZATION_SLUG)
for project in organization.fetch('projects').all():
    for resource, language in itertools.product(
            project.fetch('resources').all(),
            project.fetch('languages').all()):
        for translation in (transifex_api.ResourceTranslation.
                            filter(resource=resource,
                                   language=language,
                                   translated="true").
                            all()):
            if any(("..." in string
                    for string in translation.strings.values())):
                print(f"Project: {project.slug}, "
                      f"Resource: {resource.slug}, "
                      f"Language: {language.code}, "
                      f"Text: {translation.strings['other']}")