]> git.lyx.org Git - features.git/commitdiff
* FindReplace.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Sat, 23 Jan 2010 09:15:37 +0000 (09:15 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sat, 23 Jan 2010 09:15:37 +0000 (09:15 +0000)
- de-modularize message. It's impossible to properly translate such LEGO-strings.
  Also mark the scopes, due to their syntactic case.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33172 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/FindAndReplace.cpp

index f80f1a93fa7a881cf52d0dd31d6d6f71fbd5cb78..4f4649a2e431dae12955af67d4289edcd5822e1a 100644 (file)
@@ -274,28 +274,30 @@ static bool next_prev_buffer(Buffer * & buf, FindAndReplaceOptions const & opt)
 /** Find the finest question message to post to the user */
 docstring question_string(FindAndReplaceOptions const & opt)
 {
-       docstring cur_pos = opt.forward ? _("End") : _("Begin");
-       docstring new_pos = opt.forward ? _("begin") : _("end");
        docstring scope;
        switch (opt.scope) {
        case FindAndReplaceOptions::S_BUFFER:
-               scope = _("file");
+               scope = _("file[[scope]]");
                break;
        case FindAndReplaceOptions::S_DOCUMENT:
-               scope = _("master document");
+               scope = _("master document[[scope]]");
                break;
        case FindAndReplaceOptions::S_OPEN_BUFFERS:
-               scope = _("open files");
+               scope = _("open files[[scope]]");
                break;
        case FindAndReplaceOptions::S_ALL_MANUALS:
-               scope = _("manuals");
+               scope = _("manuals[[scope]]");
                break;
        }
-       docstring dir = opt.forward ? _("forward") : _("backwards");
-
-       return bformat(_("%1$s of %2$s reached while searching %3$s.\n\n"
-                         "Continue searching from %4$s?"),
-                     cur_pos, scope, dir, new_pos);
+       docstring message = opt.forward ?
+               bformat(_("End of %1$s reached while searching forward.\n"
+                         "Continue searching from begin?"),
+                       scope) : 
+               bformat(_("Beginning of %1$s reached while searching backwards.\n"
+                         "Continue searching from end?"),
+                       scope);
+
+       return message;
 }