Skip to content
Permalink
8bed31719c
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
270 lines (222 sloc) 10.6 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"../../../docbook-xml-4.5/docbookx.dtd">
<chapter id="chapter.searches">
<title>Searches<indexterm class="singular">
<primary>Searches</primary>
</indexterm></title>
<section id="search.window">
<title>Search window<indexterm class="singular">
<primary>Shortcuts</primary>
<secondary>Search - Ctrl+F</secondary>
</indexterm></title>
<para>Open the Search window with <keycombo>
<keycap>Ctrl</keycap>
<keycap>F</keycap>
</keycombo> and enter the word or phrase you wish to search for in the
<emphasis>Search for</emphasis> box.</para>
<para>Alternatively, in the Editor window, select a word or phrase in the
editing field (target text of the current segment) and hit <keycombo>
<keycap>Ctrl</keycap>
<keycap>F</keycap>
</keycombo>. The word or phrase is entered in the <emphasis>Search
for</emphasis> box automatically. You can have several Search windows open
at the same time, but close them when they are no longer needed so that
they do not clutter your desktop.</para>
<para>Click the dropdown arrow of the <emphasis>Search for</emphasis> box
to access the last 10 searches.</para>
</section>
<section id="using.wild.cards">
<title>Using wild cards<indexterm class="singular">
<primary>Searches</primary>
<secondary>Using wild cards</secondary>
</indexterm></title>
<para>In both exact and keyword searches, the wild card search characters
'*' and '?' can be used. They have the meaning, familiar to Word
users:</para>
<itemizedlist>
<listitem>
<para>'*' matches zero or more characters, from the current position
in a given word to its end. The search term <literal>'run*'</literal>
for example would match words <literal>'run'</literal>,
<literal>'runs'</literal> and <literal>'running'</literal>.</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>'?' matches any single character. For instance,
<literal>'run?'</literal> would match the word
<literal>'runs'</literal> and <literal>'runn'</literal> in the word
<literal>'running'</literal>.</para>
</listitem>
</itemizedlist>
<para>The matches will be displayed in bold blue. Note that '*' and '?'
have special meaning in regular expressions, so wild card search, as
described here, applies to exact and keyword search only (see
below).</para>
</section>
<section id="search.methoids">
<title>Search methods and options<indexterm class="singular">
<primary>Searches</primary>
<secondary>Methods and options</secondary>
</indexterm></title>
<para>Select the method using the radio buttons. The following search
methods are available:</para>
<variablelist>
<varlistentry>
<term>exact search</term>
<listitem>
<para>Search for segments containing the exact string you specified.
An exact search looks for a phrase, i.e. if several words are
entered, they are found only if they occur in exactly that sequence.
Searching for <literal>open file</literal> will thus find all
occurrences of the string <emphasis><literal>open
file</literal></emphasis>, but not <emphasis><literal>file
opened</literal></emphasis> or <emphasis><literal>open input
file</literal></emphasis>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>keyword search</term>
<listitem>
<para>Search for segments containing all keywords you specified, in
any order. Select keyword search to search for any number of
individual full words, in any order. OmegaT displays a list of all
segments containing all of the words specified. Keyword searches are
similar to a search "with all of the words" in an Internet search
engine such as Google (AND logic). Using keyword search with
<emphasis><literal>open file</literal></emphasis> will thus find all
occurrences of the string <emphasis><literal>open
file</literal>,</emphasis> as well as <emphasis><literal>file
opened</literal>, <literal>open input file</literal>, <literal>file
may not be safe to open</literal></emphasis>, etc.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">regular expressions</emphasis></term>
<listitem>
<para>The search string will be treated as a regular expression. The
search string - [a-zA-Z]+[öäüqwß] - in the example above for
instance looks for words in the target segment, containing
questionable characters from German keyboard. Regular expressions
are a powerful way to look for instances of a string. See more in
the chapter<link linkend="chapter.regexp"> Regular
Expressions.</link></para>
</listitem>
</varlistentry>
</variablelist>
<para>Additionally to one of the methods above you can select the
following:</para>
<itemizedlist>
<listitem>
<para><emphasis role="bold">case sensitive</emphasis>: the search will
be performed for the exact string specified; i.e. capitalization is
observed.</para>
</listitem>
<listitem>
<para><emphasis role="bold">Space matches nbsp</emphasis>: when this
option is checked, a space character put in search entry can match
either a normal space character or a non-breacking space (\u00A)
character.</para>
</listitem>
<listitem>
<para><emphasis role="bold">in source: </emphasis>search in the source
segments</para>
</listitem>
<listitem>
<para><emphasis role="bold">in translations: </emphasis>search in the
target segments</para>
</listitem>
<listitem>
<para><emphasis role="bold">in notes: </emphasis>search in notes to
segments</para>
</listitem>
<listitem>
<para><emphasis role="bold">in comments: </emphasis>search in comments
to segments</para>
</listitem>
<listitem>
<para><emphasis role="bold">Translated or untranslated:
</emphasis>search in both translated and untranslated segments.</para>
</listitem>
<listitem>
<para><emphasis role="bold">Translated: </emphasis>search only in
translated segments.</para>
</listitem>
<listitem>
<para><emphasis role="bold">Untranslated: </emphasis>search only in
untranslated segments.</para>
</listitem>
<listitem>
<para><emphasis role="bold">Display: all matching segments:
</emphasis>if checked, all the segments are displayed one by one, even
if they are present several times in the same document or in different
documents.</para>
</listitem>
<listitem>
<para><emphasis role="bold">Display: file names: </emphasis>if
checked, the name of the file where each segment is found is
displayed above each result.</para>
</listitem>
<listitem>
<para><emphasis role="bold">Search in Project</emphasis>: check
<emphasis>Memory</emphasis> to include the project memory
(project_save.tmx file) in the search. Check
<emphasis>TMs</emphasis> to include the translation memories located
in the <filename>tm</filename> folder in the search. Check
<emphasis>Glossaries</emphasis> to include the glossaries located in
the <filename>glossary</filename> folder in the search.</para>
</listitem>
<listitem>
<para><emphasis role="bold">Search in Files: </emphasis>search in a
single file or a folder containing a set of files. When searching
through files (as opposed to translation memories), OmegaT restricts
the search to files in source file formats. Consequently, although
OmegaT is quite able to handle<filename> tmx</filename> files, it does
not include them in the Search files search.</para>
</listitem>
</itemizedlist>
<para>If you click on the button <guibutton>Advanced options</guibutton>
additional criteria (author of the translation, date translated etc) as
shown in the above image can be selected.</para>
</section>
<section id="search.result.display">
<title>Search results display</title>
<para>Pressing the search button after entering a string in the search
field displays all the segments in the project that include the entered
string. As <application>OmegaT</application> handles identical segments as
one single entity, only the first unique segment is shown. The segments
are displayed in order of appearance in the project. Translated segments
are displayed with the original text at the top and the translated text at
the bottom, untranslated segments are displayed as the source only.</para>
<para>Clicking on a segment opens it in the Editor for modifications. You
can then switch back to the Search window for the next segment found, for
instance to check and, if necessary, correct the terminology.</para>
<para>You may have several Search windows open at the same time. You can
quickly see their contents by looking at their title: it will contain the
search term used.</para>
</section>
<section id="search.filter">
<title>Filter entries in editor according to search</title>
<para>For easier navigation in the search result set, you can apply the
search to the editor. Press the <emphasis role="bold">Filter</emphasis>
button on the bottom to limit the shown entries in the editor window to
those that match the current search. You can use normal navigation to go
to e.g. the next (untranslated) segment that matches the search
criteria.</para>
<para>NB:</para>
<itemizedlist>
<listitem>
A search may be limited to 1000 items, so if you search on a common phrase, the editor then shows only those 1000 matching entries, and not all entries that match the search criteria.
</listitem>
<listitem>
A file might have no matching entries, so it will show empty.
</listitem>
<listitem>
If a search removes duplicates, those duplicates will not be in the Editor.
</listitem>
</itemizedlist>
<para>To remove a filter, press the <emphasis role="bold">Remove
filter</emphasis> button, or reload a project.</para>
</section>
</chapter>