Loading ...
Sorry, an error occurred while loading the content.

Re: [PATCH] (5/7) Consistency and refactoring

Expand Messages
  • Bram Moolenaar
    ... This patch causes test 86 to fail: 1025c1025
    Message 1 of 25 , Jun 23, 2013
    • 0 Attachment
      ZyX wrote:

      > # HG changeset patch
      > # User ZyX <kp-pav@...>
      > # Date 1371375798 -14400
      > # Sun Jun 16 13:43:18 2013 +0400
      > # Branch python-fixes
      > # Node ID 81c6385adb920b486a9f3b912de3b7e86e57569d
      > # Parent abcf5d9458ee826516c1051cfd14d279b1097174
      > Make exception messages more verbose

      This patch causes test 86 to fail:

      1025c1025
      < fd(self=[]):TypeError:('unable to convert list to vim dictionary',)
      ---
      > fd(self=[]):TypeError:('unable to convert object to vim dictionary',)

      I'll change the .ok file to work around it, but pleae check the cause of
      the failure.


      --
      "Time flies like an arrow". So I put an arrow on my desk, now
      awaiting one of these time flies showing up.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • ZyX
      ... I do not understand. `_()` was moved into the macros. How is PyErr_SET_STRING(exc, message ) different from PyErr_SetString(exc, _( message )) if macros
      Message 2 of 25 , Jun 23, 2013
      • 0 Attachment
        On Sunday, June 23, 2013 3:27:39 PM UTC+4, Bram Moolenaar wrote:
        > ZyX wrote:
        >
        > > # HG changeset patch
        > > # User ZyX <kp-pav@...>
        > > # Date 1371238936 -14400
        > > # Fri Jun 14 23:42:16 2013 +0400
        > > # Branch python-fixes
        > > # Node ID abcf5d9458ee826516c1051cfd14d279b1097174
        > > # Parent b9d4dfa09951d4fb75972df34802675edf24a17e
        > > Make macros do translation of exception messages
        > >
        > > Reason: it will be easy to delete/restore translating
        >
        > Unfortunately this breaks all translations. E.g.:
        >
        > @@ -120,7 +122,7 @@
        > }
        > else
        > {
        > - PyErr_SetString(PyExc_TypeError, _("object must be string"));
        > + PyErr_SET_STRING(PyExc_TypeError, "object must be string");
        > return NULL;
        > }
        >
        > This string will not be translated. It should have been:
        >
        > + PyErr_SET_STRING(PyExc_TypeError, N_("object must be string"));
        >
        > The N_() macro marks a string as translatable.
        >
        > I'll include this patch now, since otherwise there will be problems with
        > all following patches. But please fix this ASAP.

        I do not understand. `_()` was moved into the macros. How is PyErr_SET_STRING(exc, "message") different from PyErr_SetString(exc, _("message")) if macros `PyErr_SET_STRING(exc, msg)` is defined to `PyErr_SetString(exc, _(msg))`?

        If I need to have `N_()` there (in the macros definition) I will write a patch, but I won't write `PyErr_SET_STRING(exc, N_(msg))`. It is the very intention: move all _() out of the code to the macros in case I find some better argument to not ever translate any exception messages then I have currently.

        ---

        Just tested: translations do work. Steps to reproduce:

        src/vim -u NONE -N -c 'lang ru_RU.UTF-8' -c 'py import vim' -c 'py b=vim.current.buffer' -c 'bw!' -c 'py print b.name' a

        . If this locale is supported it prints "vim.error: попытка сослаться на уничтоженный буфер" in place of "vim.error: attempt to refer to deleted buffer".

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Bram Moolenaar
        ... Please follow my instructions. gettext searches the source code for _() and N_() , nothing else. After patch 7.3.1229 existing translations will work,
        Message 3 of 25 , Jun 23, 2013
        • 0 Attachment
          ZyX wrote:

          > > > # HG changeset patch
          > > > # User ZyX <kp-pav@...>
          > > > # Date 1371238936 -14400
          > > > # Fri Jun 14 23:42:16 2013 +0400
          > > > # Branch python-fixes
          > > > # Node ID abcf5d9458ee826516c1051cfd14d279b1097174
          > > > # Parent b9d4dfa09951d4fb75972df34802675edf24a17e
          > > > Make macros do translation of exception messages
          > > >
          > > > Reason: it will be easy to delete/restore translating
          > >
          > > Unfortunately this breaks all translations. E.g.:
          > >
          > > @@ -120,7 +122,7 @@
          > > }
          > > else
          > > {
          > > - PyErr_SetString(PyExc_TypeError, _("object must be string"));
          > > + PyErr_SET_STRING(PyExc_TypeError, "object must be string");
          > > return NULL;
          > > }
          > >
          > > This string will not be translated. It should have been:
          > >
          > > + PyErr_SET_STRING(PyExc_TypeError, N_("object must be string"));
          > >
          > > The N_() macro marks a string as translatable.
          > >
          > > I'll include this patch now, since otherwise there will be problems with
          > > all following patches. But please fix this ASAP.
          >
          > I do not understand. `_()` was moved into the macros. How is
          > PyErr_SET_STRING(exc, "message") different from PyErr_SetString(exc,
          > _("message")) if macros `PyErr_SET_STRING(exc, msg)` is defined to
          > `PyErr_SetString(exc, _(msg))`?
          >
          > If I need to have `N_()` there (in the macros definition) I will write
          > a patch, but I won't write `PyErr_SET_STRING(exc, N_(msg))`. It is the
          > very intention: move all _() out of the code to the macros in case I
          > find some better argument to not ever translate any exception messages
          > then I have currently.
          >
          > ---
          >
          > Just tested: translations do work. Steps to reproduce:
          >
          > src/vim -u NONE -N -c 'lang ru_RU.UTF-8' -c 'py import vim' -c 'py b=vim.current.buffer' -c 'bw!' -c 'py print b.name' a
          >
          > . If this locale is supported it prints "vim.error: попытка сослаться
          > на уничтоженный буфер" in place of "vim.error: attempt to refer to
          > deleted buffer".

          Please follow my instructions. gettext searches the source code for
          "_()" and "N_()", nothing else. After patch 7.3.1229 existing
          translations will work, but the next time the translations are updated
          they will be gone.

          You can see the effect by running "make ru" in src/po.

          --
          A cow comes flying over the battlements, lowing aggressively. The cow
          lands on GALAHAD'S PAGE, squashing him completely.
          "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ an exciting new programming language -- http://www.Zimbu.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • ZyX
          ... # HG changeset patch # User ZyX # Date 1371991354 -14400 # Sun Jun 23 16:42:34 2013 +0400 # Branch python-fixes # Node ID
          Message 4 of 25 , Jun 23, 2013
          • 0 Attachment
            > Please follow my instructions. gettext searches the source code for
            > "_()" and "N_()", nothing else. After patch 7.3.1229 existing
            > translations will work, but the next time the translations are updated
            > they will be gone.
            >
            > You can see the effect by running "make ru" in src/po.

            # HG changeset patch
            # User ZyX <kp-pav@...>
            # Date 1371991354 -14400
            # Sun Jun 23 16:42:34 2013 +0400
            # Branch python-fixes
            # Node ID 3c21dc7cfad1f22855bd64b2a4a79d75cd36b1e3
            # Parent 8b539b192fd5eae19f61bd3d55a28811ea5bae0c
            Use N_() to mark strings for translation

            diff --git a/src/if_py_both.h b/src/if_py_both.h
            --- a/src/if_py_both.h
            +++ b/src/if_py_both.h
            @@ -37,16 +37,17 @@
            : obj->ob_type->tp_name)

            #define RAISE_NO_EMPTY_KEYS PyErr_SET_STRING(PyExc_ValueError, \
            - "empty keys are not allowed")
            -#define RAISE_LOCKED(type) PyErr_SET_VIM(_(type " is locked"))
            -#define RAISE_LOCKED_DICTIONARY RAISE_LOCKED("dictionary")
            -#define RAISE_LOCKED_LIST RAISE_LOCKED("list")
            -#define RAISE_UNDO_FAIL PyErr_SET_VIM("cannot save undo information")
            -#define RAISE_LINE_FAIL(act) PyErr_SET_VIM("cannot " act " line")
            + N_("empty keys are not allowed"))
            +#define RAISE_LOCKED_DICTIONARY PyErr_SET_VIM(N_("dictionary is locked"))
            +#define RAISE_LOCKED_LIST PyErr_SET_VIM(N_("list is locked"))
            +#define RAISE_UNDO_FAIL PyErr_SET_VIM(N_("cannot save undo information"))
            +#define RAISE_DELETE_LINE_FAIL PyErr_SET_VIM(N_("cannot delete line"))
            +#define RAISE_INSERT_LINE_FAIL PyErr_SET_VIM(N_("cannot insert line"))
            +#define RAISE_REPLACE_LINE_FAIL PyErr_SET_VIM(N_("cannot replace line"))
            #define RAISE_KEY_ADD_FAIL(key) \
            - PyErr_VIM_FORMAT("failed to add key '%s' to dictionary", key)
            + PyErr_VIM_FORMAT(N_("failed to add key '%s' to dictionary"), key)
            #define RAISE_INVALID_INDEX_TYPE(idx) \
            - PyErr_FORMAT(PyExc_TypeError, "index must be int or slice, not %s", \
            + PyErr_FORMAT(PyExc_TypeError, N_("index must be int or slice, not %s"), \
            Py_TYPE_NAME(idx));

            #define INVALID_BUFFER_VALUE ((buf_T *)(-1))
            @@ -140,9 +141,9 @@
            {
            PyErr_FORMAT(PyExc_TypeError,
            #if PY_MAJOR_VERSION < 3
            - "expected str() or unicode() instance, but got %s"
            + N_("expected str() or unicode() instance, but got %s")
            #else
            - "expected bytes() or str() instance, but got %s"
            + N_("expected bytes() or str() instance, but got %s")
            #endif
            , Py_TYPE_NAME(obj));
            return NULL;
            @@ -192,11 +193,11 @@
            {
            PyErr_FORMAT(PyExc_TypeError,
            #if PY_MAJOR_VERSION < 3
            - "expected int(), long() or something supporting "
            - "coercing to long(), but got %s"
            + N_("expected int(), long() or something supporting "
            + "coercing to long(), but got %s")
            #else
            - "expected int() or something supporting coercing to int(), "
            - "but got %s"
            + N_("expected int() or something supporting coercing to int(), "
            + "but got %s")
            #endif
            , Py_TYPE_NAME(obj));
            return -1;
            @@ -207,13 +208,13 @@
            if (*result > INT_MAX)
            {
            PyErr_SET_STRING(PyExc_OverflowError,
            - "value is too large to fit into C int type");
            + N_("value is too large to fit into C int type"));
            return -1;
            }
            else if (*result < INT_MIN)
            {
            PyErr_SET_STRING(PyExc_OverflowError,
            - "value is too small to fit into C int type");
            + N_("value is too small to fit into C int type"));
            return -1;
            }
            }
            @@ -223,7 +224,7 @@
            if (*result <= 0)
            {
            PyErr_SET_STRING(PyExc_ValueError,
            - "number must be greater then zero");
            + N_("number must be greater then zero"));
            return -1;
            }
            }
            @@ -232,7 +233,7 @@
            if (*result < 0)
            {
            PyErr_SET_STRING(PyExc_ValueError,
            - "number must be greater or equal to zero");
            + N_("number must be greater or equal to zero"));
            return -1;
            }
            }
            @@ -326,7 +327,7 @@
            if (valObject == NULL)
            {
            PyErr_SET_STRING(PyExc_AttributeError,
            - "can't delete OutputObject attributes");
            + N_("can't delete OutputObject attributes"));
            return -1;
            }

            @@ -337,7 +338,7 @@
            return 0;
            }

            - PyErr_FORMAT(PyExc_AttributeError, "invalid attribute: %s", name);
            + PyErr_FORMAT(PyExc_AttributeError, N_("invalid attribute: %s"), name);
            return -1;
            }

            @@ -786,7 +787,7 @@

            if (our_tv == NULL)
            {
            - PyErr_SET_VIM("invalid expression");
            + PyErr_SET_VIM(N_("invalid expression"));
            return NULL;
            }

            @@ -837,7 +838,7 @@

            if (our_tv == NULL)
            {
            - PyErr_SET_VIM("invalid expression");
            + PyErr_SET_VIM(N_("invalid expression"));
            return NULL;
            }

            @@ -909,7 +910,7 @@
            if (VimTryEnd())
            return NULL;

            - PyErr_SET_VIM("failed to change directory");
            + PyErr_SET_VIM(N_("failed to change directory"));
            return NULL;
            }

            @@ -1087,15 +1088,15 @@
            if (!PyTuple_Check(find_module_result))
            {
            PyErr_FORMAT(PyExc_TypeError,
            - "expected 3-tuple as imp.find_module() result, but got %s",
            + N_("expected 3-tuple as imp.find_module() result, but got %s"),
            Py_TYPE_NAME(find_module_result));
            return NULL;
            }
            if (PyTuple_GET_SIZE(find_module_result) != 3)
            {
            PyErr_FORMAT(PyExc_TypeError,
            - "expected 3-tuple as imp.find_module() result, but got "
            - "tuple of size %d",
            + N_("expected 3-tuple as imp.find_module() result, but got "
            + "tuple of size %d"),
            (int) PyTuple_GET_SIZE(find_module_result));
            return NULL;
            }
            @@ -1105,7 +1106,7 @@
            || !(description = PyTuple_GET_ITEM(find_module_result, 2)))
            {
            PyErr_SET_STRING(PyExc_RuntimeError,
            - "internal error: imp.find_module returned tuple with NULL");
            + N_("internal error: imp.find_module returned tuple with NULL"));
            return NULL;
            }

            @@ -1485,7 +1486,7 @@
            if (valObject == NULL)
            {
            PyErr_SET_STRING(PyExc_AttributeError,
            - "cannot delete vim.Dictionary attributes");
            + N_("cannot delete vim.Dictionary attributes"));
            return -1;
            }

            @@ -1493,7 +1494,8 @@
            {
            if (self->dict->dv_lock == VAR_FIXED)
            {
            - PyErr_SET_STRING(PyExc_TypeError, "cannot modify fixed dictionary");
            + PyErr_SET_STRING(PyExc_TypeError,
            + N_("cannot modify fixed dictionary"));
            return -1;
            }
            else
            @@ -1510,7 +1512,7 @@
            }
            else
            {
            - PyErr_FORMAT(PyExc_AttributeError, "cannot set attribute %s", name);
            + PyErr_FORMAT(PyExc_AttributeError, N_("cannot set attribute %s"), name);
            return -1;
            }
            }
            @@ -1644,7 +1646,7 @@
            (*dii)->ht->ht_used != (*dii)->ht_used)
            {
            PyErr_SET_STRING(PyExc_RuntimeError,
            - "hashtab changed during iteration");
            + N_("hashtab changed during iteration"));
            return NULL;
            }

            @@ -1915,8 +1917,8 @@
            Py_DECREF(iterator);
            Py_DECREF(fast);
            PyErr_FORMAT(PyExc_ValueError,
            - "expected sequence element of size 2, "
            - "but got sequence of size %d",
            + N_("expected sequence element of size 2, "
            + "but got sequence of size %d"),
            (int) PySequence_Fast_GET_SIZE(fast));
            return NULL;
            }
            @@ -2159,7 +2161,7 @@
            if (kwargs)
            {
            PyErr_SET_STRING(PyExc_TypeError,
            - "list constructor does not accept keyword arguments");
            + N_("list constructor does not accept keyword arguments"));
            return NULL;
            }

            @@ -2214,14 +2216,14 @@

            if (index >= ListLength(self))
            {
            - PyErr_SET_STRING(PyExc_IndexError, "list index out of range");
            + PyErr_SET_STRING(PyExc_IndexError, N_("list index out of range"));
            return NULL;
            }
            li = list_find(self->list, (long) index);
            if (li == NULL)
            {
            /* No more suitable format specifications in python-2.3 */
            - PyErr_VIM_FORMAT("internal error: failed to get vim list item %d",
            + PyErr_VIM_FORMAT(N_("internal error: failed to get vim list item %d"),
            (int) index);
            return NULL;
            }
            @@ -2340,7 +2342,7 @@
            }
            if (index > length || (index == length && obj == NULL))
            {
            - PyErr_SET_STRING(PyExc_IndexError, "list index out of range");
            + PyErr_SET_STRING(PyExc_IndexError, N_("list index out of range"));
            return -1;
            }

            @@ -2361,7 +2363,7 @@
            if (list_append_tv(l, &tv) == FAIL)
            {
            clear_tv(&tv);
            - PyErr_SET_VIM("failed to add item to list");
            + PyErr_SET_VIM(N_("failed to add item to list"));
            return -1;
            }
            }
            @@ -2402,7 +2404,8 @@
            li = list_find(l, (long) first);
            if (li == NULL)
            {
            - PyErr_VIM_FORMAT("internal error: no vim list item %d", (int)first);
            + PyErr_VIM_FORMAT(N_("internal error: no vim list item %d"),
            + (int)first);
            return -1;
            }
            if (last > first)
            @@ -2435,7 +2438,7 @@
            if (list_insert_tv(l, &v, li) == FAIL)
            {
            clear_tv(&v);
            - PyErr_SET_VIM("internal error: failed to add item to list");
            + PyErr_SET_VIM(N_("internal error: failed to add item to list"));
            return -1;
            }
            clear_tv(&v);
            @@ -2491,7 +2494,7 @@
            if (valObject == NULL)
            {
            PyErr_SET_STRING(PyExc_AttributeError,
            - "cannot delete vim.List attributes");
            + N_("cannot delete vim.List attributes"));
            return -1;
            }

            @@ -2499,7 +2502,7 @@
            {
            if (self->list->lv_lock == VAR_FIXED)
            {
            - PyErr_SET_STRING(PyExc_TypeError, "cannot modify fixed list");
            + PyErr_SET_STRING(PyExc_TypeError, N_("cannot modify fixed list"));
            return -1;
            }
            else
            @@ -2516,7 +2519,7 @@
            }
            else
            {
            - PyErr_FORMAT(PyExc_AttributeError, "cannot set attribute %s", name);
            + PyErr_FORMAT(PyExc_AttributeError, N_("cannot set attribute %s"), name);
            return -1;
            }
            }
            @@ -2552,7 +2555,7 @@
            if (!translated_function_exists(name))
            {
            PyErr_FORMAT(PyExc_ValueError,
            - "unnamed function %s does not exist", name);
            + N_("unnamed function %s does not exist"), name);
            return NULL;
            }
            self->name = vim_strsave(name);
            @@ -2563,7 +2566,8 @@
            vim_strchr(name, AUTOLOAD_CHAR) == NULL))
            == NULL)
            {
            - PyErr_FORMAT(PyExc_ValueError, "function %s does not exist", name);
            + PyErr_FORMAT(PyExc_ValueError,
            + N_("function %s does not exist"), name);
            return NULL;
            }

            @@ -2579,7 +2583,7 @@
            if (kwargs)
            {
            PyErr_SET_STRING(PyExc_TypeError,
            - "function constructor does not accept keyword arguments");
            + N_("function constructor does not accept keyword arguments"));
            return NULL;
            }

            @@ -2656,7 +2660,7 @@
            else if (error != OK)
            {
            ret = NULL;
            - PyErr_VIM_FORMAT("failed to run function %s", (char *)name);
            + PyErr_VIM_FORMAT(N_("failed to run function %s"), (char *)name);
            }
            else
            ret = ConvertToPyObject(&rettv);
            @@ -2809,13 +2813,13 @@
            else
            {
            PyErr_SET_STRING(PyExc_RuntimeError,
            - "unable to get option value");
            + N_("unable to get option value"));
            return NULL;
            }
            }
            else
            {
            - PyErr_SET_VIM("internal error: unknown option type");
            + PyErr_SET_VIM(N_("internal error: unknown option type"));
            return NULL;
            }
            }
            @@ -2858,7 +2862,7 @@
            {
            if (VimTryEnd())
            return -1;
            - PyErr_SET_VIM("problem while switching windows");
            + PyErr_SET_VIM(N_("problem while switching windows"));
            return -1;
            }
            set_ret = set_option_value_err(key, numval, stringval, opt_flags);
            @@ -2915,15 +2919,15 @@
            if (self->opt_type == SREQ_GLOBAL)
            {
            PyErr_FORMAT(PyExc_ValueError,
            - "unable to unset global option %s", key);
            + N_("unable to unset global option %s"), key);
            Py_XDECREF(todecref);
            return -1;
            }
            else if (!(flags & SOPT_GLOBAL))
            {
            PyErr_FORMAT(PyExc_ValueError,
            - "unable to unset option %s "
            - "which does not have global value", key);
            + N_("unable to unset option %s "
            + "which does not have global value"), key);
            Py_XDECREF(todecref);
            return -1;
            }
            @@ -3001,7 +3005,7 @@
            {
            if (self->tab == INVALID_TABPAGE_VALUE)
            {
            - PyErr_SET_VIM("attempt to refer to deleted tab page");
            + PyErr_SET_VIM(N_("attempt to refer to deleted tab page"));
            return -1;
            }

            @@ -3145,7 +3149,7 @@
            if (n == 0)
            return TabPageNew(tp);

            - PyErr_SET_STRING(PyExc_IndexError, "no such tab page");
            + PyErr_SET_STRING(PyExc_IndexError, N_("no such tab page"));
            return NULL;
            }

            @@ -3166,7 +3170,7 @@
            {
            if (self->win == INVALID_WINDOW_VALUE)
            {
            - PyErr_SET_VIM("attempt to refer to deleted window");
            + PyErr_SET_VIM(N_("attempt to refer to deleted window"));
            return -1;
            }

            @@ -3332,7 +3336,7 @@

            if (strcmp(name, "buffer") == 0)
            {
            - PyErr_SET_STRING(PyExc_TypeError, "readonly attribute: buffer");
            + PyErr_SET_STRING(PyExc_TypeError, N_("readonly attribute: buffer"));
            return -1;
            }
            else if (strcmp(name, "cursor") == 0)
            @@ -3345,7 +3349,7 @@

            if (lnum <= 0 || lnum > self->win->w_buffer->b_ml.ml_line_count)
            {
            - PyErr_SET_VIM("cursor position outside buffer");
            + PyErr_SET_VIM(N_("cursor position outside buffer"));
            return -1;
            }

            @@ -3508,7 +3512,7 @@
            if (n == 0)
            return WindowNew(w, self->tabObject? self->tabObject->tab: curtab);

            - PyErr_SET_STRING(PyExc_IndexError, "no such window");
            + PyErr_SET_STRING(PyExc_IndexError, N_("no such window"));
            return NULL;
            }

            @@ -3562,7 +3566,7 @@
            --len;
            else
            {
            - PyErr_SET_VIM("string cannot contain newlines");
            + PyErr_SET_VIM(N_("string cannot contain newlines"));
            Py_XDECREF(bytes);
            return NULL;
            }
            @@ -3700,7 +3704,7 @@
            if (u_savedel((linenr_T)n, 1L) == FAIL)
            RAISE_UNDO_FAIL;
            else if (ml_delete((linenr_T)n, FALSE) == FAIL)
            - RAISE_LINE_FAIL("delete");
            + RAISE_DELETE_LINE_FAIL;
            else
            {
            if (buf == savebuf)
            @@ -3739,7 +3743,7 @@
            }
            else if (ml_replace((linenr_T)n, (char_u *)save, FALSE) == FAIL)
            {
            - RAISE_LINE_FAIL("replace");
            + RAISE_REPLACE_LINE_FAIL;
            vim_free(save);
            }
            else
            @@ -3806,7 +3810,7 @@
            {
            if (ml_delete((linenr_T)lo, FALSE) == FAIL)
            {
            - RAISE_LINE_FAIL("delete");
            + RAISE_DELETE_LINE_FAIL;
            break;
            }
            }
            @@ -3878,7 +3882,7 @@
            for (i = 0; i < old_len - new_len; ++i)
            if (ml_delete((linenr_T)lo, FALSE) == FAIL)
            {
            - RAISE_LINE_FAIL("delete");
            + RAISE_DELETE_LINE_FAIL;
            break;
            }
            extra -= i;
            @@ -3894,7 +3898,7 @@
            if (ml_replace((linenr_T)(lo+i), (char_u *)array[i], FALSE)
            == FAIL)
            {
            - RAISE_LINE_FAIL("replace");
            + RAISE_REPLACE_LINE_FAIL;
            break;
            }
            }
            @@ -3912,7 +3916,7 @@
            if (ml_append((linenr_T)(lo + i - 1),
            (char_u *)array[i], 0, FALSE) == FAIL)
            {
            - RAISE_LINE_FAIL("insert");
            + RAISE_INSERT_LINE_FAIL;
            break;
            }
            vim_free(array[i]);
            @@ -3991,7 +3995,7 @@
            if (u_save((linenr_T)n, (linenr_T)(n+1)) == FAIL)
            RAISE_UNDO_FAIL;
            else if (ml_append((linenr_T)n, (char_u *)str, 0, FALSE) == FAIL)
            - RAISE_LINE_FAIL("insert");
            + RAISE_INSERT_LINE_FAIL;
            else
            appended_lines_mark((linenr_T)n, 1L);

            @@ -4048,7 +4052,7 @@
            if (ml_append((linenr_T)(n + i),
            (char_u *)array[i], 0, FALSE) == FAIL)
            {
            - RAISE_LINE_FAIL("insert");
            + RAISE_INSERT_LINE_FAIL;

            /* Free the rest of the lines */
            while (i < size)
            @@ -4101,7 +4105,7 @@
            {
            if (self->buf == INVALID_BUFFER_VALUE)
            {
            - PyErr_SET_VIM("attempt to refer to deleted buffer");
            + PyErr_SET_VIM(N_("attempt to refer to deleted buffer"));
            return -1;
            }

            @@ -4122,7 +4126,7 @@

            if (n < 0 || n > end - start)
            {
            - PyErr_SET_STRING(PyExc_IndexError, "line number out of range");
            + PyErr_SET_STRING(PyExc_IndexError, N_("line number out of range"));
            return NULL;
            }

            @@ -4178,7 +4182,7 @@

            if (n < 0 || n > end - start)
            {
            - PyErr_SET_STRING(PyExc_IndexError, "line number out of range");
            + PyErr_SET_STRING(PyExc_IndexError, N_("line number out of range"));
            return -1;
            }

            @@ -4262,7 +4266,7 @@

            if (n < 0 || n > max)
            {
            - PyErr_SET_STRING(PyExc_IndexError, "line number out of range");
            + PyErr_SET_STRING(PyExc_IndexError, N_("line number out of range"));
            return NULL;
            }

            @@ -4545,7 +4549,7 @@

            if (ren_ret == FAIL)
            {
            - PyErr_SET_VIM("failed to rename buffer");
            + PyErr_SET_VIM(N_("failed to rename buffer"));
            return -1;
            }
            return 0;
            @@ -4581,7 +4585,7 @@
            if (pmark[0] == '\0' || pmark[1] != '\0')
            {
            PyErr_SET_STRING(PyExc_ValueError,
            - "mark name must be a single character");
            + N_("mark name must be a single character"));
            Py_XDECREF(todecref);
            return NULL;
            }
            @@ -4599,7 +4603,7 @@

            if (posp == NULL)
            {
            - PyErr_SET_VIM("invalid mark name");
            + PyErr_SET_VIM(N_("invalid mark name"));
            return NULL;
            }

            @@ -4824,7 +4828,7 @@
            if (valObject->ob_type != &BufferType)
            {
            PyErr_FORMAT(PyExc_TypeError,
            - "expected vim.Buffer object, but got %s",
            + N_("expected vim.Buffer object, but got %s"),
            Py_TYPE_NAME(valObject));
            return -1;
            }
            @@ -4838,7 +4842,7 @@
            {
            if (VimTryEnd())
            return -1;
            - PyErr_VIM_FORMAT("failed to switch to buffer %d", count);
            + PyErr_VIM_FORMAT(N_("failed to switch to buffer %d"), count);
            return -1;
            }

            @@ -4851,7 +4855,7 @@
            if (valObject->ob_type != &WindowType)
            {
            PyErr_FORMAT(PyExc_TypeError,
            - "expected vim.Window object, but got %s",
            + N_("expected vim.Window object, but got %s"),
            Py_TYPE_NAME(valObject));
            return -1;
            }
            @@ -4863,7 +4867,7 @@
            if (!count)
            {
            PyErr_SET_STRING(PyExc_ValueError,
            - "failed to find window in the current tab page");
            + N_("failed to find window in the current tab page"));
            return -1;
            }

            @@ -4874,7 +4878,7 @@
            if (VimTryEnd())
            return -1;
            PyErr_SET_STRING(PyExc_RuntimeError,
            - "did not switch to the specified window");
            + N_("did not switch to the specified window"));
            return -1;
            }

            @@ -4885,7 +4889,7 @@
            if (valObject->ob_type != &TabPageType)
            {
            PyErr_FORMAT(PyExc_TypeError,
            - "expected vim.TabPage object, but got %s",
            + N_("expected vim.TabPage object, but got %s"),
            Py_TYPE_NAME(valObject));
            return -1;
            }
            @@ -4900,7 +4904,7 @@
            if (VimTryEnd())
            return -1;
            PyErr_SET_STRING(PyExc_RuntimeError,
            - "did not switch to the specified tab page");
            + N_("did not switch to the specified tab page"));
            return -1;
            }

            @@ -5383,7 +5387,7 @@
            else
            {
            PyErr_FORMAT(PyExc_TypeError,
            - "unable to convert %s to vim dictionary",
            + N_("unable to convert %s to vim dictionary"),
            Py_TYPE_NAME(obj));
            ret = -1;
            }
            @@ -5511,7 +5515,7 @@
            else
            {
            PyErr_FORMAT(PyExc_TypeError,
            - "unable to convert %s to vim structure",
            + N_("unable to convert %s to vim structure"),
            Py_TYPE_NAME(obj));
            return -1;
            }
            @@ -5523,7 +5527,7 @@
            {
            if (tv == NULL)
            {
            - PyErr_SET_VIM("internal error: NULL reference passed");
            + PyErr_SET_VIM(N_("internal error: NULL reference passed"));
            return NULL;
            }
            switch (tv->v_type)
            @@ -5548,7 +5552,7 @@
            Py_INCREF(Py_None);
            return Py_None;
            default:
            - PyErr_SET_VIM("internal error: invalid value type");
            + PyErr_SET_VIM(N_("internal error: invalid value type"));
            return NULL;
            }
            }

            --
            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Bram Moolenaar
            ... After including this patch test 86 and 87 fail. Test 87 has only a ... +++ testdir/test87.ok 2013-06-23 14:43:28.000000000 +0200 @@ -1175,6 +1175,9 @@
            Message 5 of 25 , Jun 23, 2013
            • 0 Attachment
              ZyX wrote:

              > Wrong patch. Correct one:
              >
              > # HG changeset patch
              > # User ZyX <kp-pav@...>
              > # Date 1371441247 -14400
              > # Mon Jun 17 07:54:07 2013 +0400
              > # Branch python-fixes
              > # Node ID 42e166b5c6ff07cd7810780b1d3704b8ce61bac0
              > # Parent 4a00cd941a883917f6d740f9f06aca7baadcb45e
              > Add NUMBER_UNSIGNED to WindowSetattr(, "width"|"height")
              > And more tests
              >
              > Note: in ee('import failing') it was expected to raise NotImplementedError, but
              > actually raises ImportError

              After including this patch test 86 and 87 fail. Test 87 has only a
              small diff:

              --- testdir/test87.failed 2013-06-23 14:45:47.000000000 +0200
              +++ testdir/test87.ok 2013-06-23 14:43:28.000000000 +0200
              @@ -1175,6 +1175,9 @@
              3,xx
              before
              after
              +pythonx/topmodule/__init__.py
              +pythonx/topmodule/submodule/__init__.py
              +pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
              vim.command("throw 'abcN'"):(<class 'vim.error'>, error('abcN',))
              Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
              vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))


              Test 86 has very many differences. Here are a few typical examples:

              --- testdir/test86.failed 2013-06-23 14:44:51.000000000 +0200
              +++ testdir/test86.ok 2013-06-23 14:43:28.000000000 +0200
              @@ -550,7 +550,7 @@
              d["a"] = {"abcF" : {u"": 1}}:ValueError:('empty keys are not allowed',)
              d["a"] = {"abcF" : FailingMapping()}:NotImplementedError:()
              d["a"] = {"abcF" : FailingMappingKey()}:NotImplementedError:()
              -d["a"] = {"abcF" : FailingNumber()}:TypeError:("long() argument must be a string or a number, not 'FailingNumber'",)
              +d["a"] = {"abcF" : FailingNumber()}:TypeError:('long() argument must be a string or a number',)
              <<< Finished
              >>> Testing StringToChars using d["a"] = Mapping({%s : 1})
              d["a"] = Mapping({1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)


              @@ -652,7 +652,7 @@
              d.update(Mapping({"abcG" : {u"": 1}})):ValueError:('empty keys are not allowed',)
              d.update(Mapping({"abcG" : FailingMapping()})):NotImplementedError:()
              d.update(Mapping({"abcG" : FailingMappingKey()})):NotImplementedError:()
              -d.update(Mapping({"abcG" : FailingNumber()})):TypeError:("long() argument must be a string or a number, not 'FailingNumber'",)
              +d.update(Mapping({"abcG" : FailingNumber()})):TypeError:('long() argument must be a string or a number',)
              <<< Finished
              >>> Testing *Iter* using d.update(%s)
              d.update(FailingIter()):NotImplementedError:()


              @@ -824,11 +824,371 @@
              ll[1:100] = "abcJ":error:('list is locked',)
              >>> Testing *Iter* using l[:] = %s
              l[:] = FailingIter():NotImplementedError:()
              +l[:] = FailingIterNext():NotImplementedError:()
              +<<< Finished
              +>>> Testing StringToChars using l[:] = [{%s : 1}]
              +l[:] = [{1 : 1}]:TypeError:('expected str() or unicode() instance, but got int',)
              +l[:] = [{u"\0" : 1}]:TypeError:('expected string without null bytes',)
              +l[:] = [{"\0" : 1}]:TypeError:('expected string without null bytes',)
              +<<< Finished
              +>>> Testing StringToChars using l[:] = [{"abcF" : {%s : 1}}]
              +l[:] = [{"abcF" : {1 : 1}}]:TypeError:('expected str() or unicode() instance, but got int',)
              +l[:] = [{"abcF" : {u"\0" : 1}}]:TypeError:('expected string without null bytes',)
              +l[:] = [{"abcF" : {"\0" : 1}}]:TypeError:('expected string without null bytes',)
              [...]


              I suspect following patches won't apply cleanly without this one, thus I
              will stop here. Please start a new sequence of patches against
              7.3.1233.

              --
              ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away!
              Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd
              cow or goose hitting them still. The KNIGHTS crouch down under cover.
              "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ an exciting new programming language -- http://www.Zimbu.org ///
              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

              --
              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • ZyX
              The tests are fixed in next patch. To make them work with the patch you refer to you have to run tests with python-2.3. -- -- You received this message from
              Message 6 of 25 , Jun 23, 2013
              • 0 Attachment
                The tests are fixed in next patch. To make them work with the patch you refer to you have to run tests with python-2.3.

                --
                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_dev" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • ZyX
                ... This should be fixed with the following diff. Though with hg export --git (“fixed” version of the patch) it should not be necessary as empty files do
                Message 7 of 25 , Jun 23, 2013
                • 0 Attachment
                  > --- testdir/test87.failed 2013-06-23 14:45:47.000000000 +0200
                  > +++ testdir/test87.ok 2013-06-23 14:43:28.000000000 +0200
                  > @@ -1175,6 +1175,9 @@
                  > 3,xx
                  > before
                  > after
                  > +pythonx/topmodule/__init__.py
                  > +pythonx/topmodule/submodule/__init__.py
                  > +pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
                  > vim.command("throw 'abcN'"):(<class 'vim.error'>, error('abcN',))
                  > Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
                  > vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))


                  This should be fixed with the following diff. Though with hg export --git (“fixed” version of the patch) it should not be necessary as empty files do appear in its output.

                  # HG changeset patch
                  # User ZyX <kp-pav@...>
                  # Date 1371993246 -14400
                  # Sun Jun 23 17:14:06 2013 +0400
                  # Branch python-fixes
                  # Node ID bec8c9e957010b4a87424de12456d7e98df8776c
                  # Parent 3c21dc7cfad1f22855bd64b2a4a79d75cd36b1e3
                  Use 2-bytes files with a comment in place of empty files

                  diff --git a/src/testdir/pythonx/topmodule/__init__.py b/src/testdir/pythonx/topmodule/__init__.py
                  --- a/src/testdir/pythonx/topmodule/__init__.py
                  +++ b/src/testdir/pythonx/topmodule/__init__.py
                  @@ -0,0 +1,1 @@
                  +#
                  diff --git a/src/testdir/pythonx/topmodule/submodule/__init__.py b/src/testdir/pythonx/topmodule/submodule/__init__.py
                  --- a/src/testdir/pythonx/topmodule/submodule/__init__.py
                  +++ b/src/testdir/pythonx/topmodule/submodule/__init__.py
                  @@ -0,0 +1,1 @@
                  +#
                  diff --git a/src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py b/src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py
                  --- a/src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py
                  +++ b/src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py
                  @@ -0,0 +1,1 @@
                  +#
                  diff --git a/src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py b/src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
                  --- a/src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
                  +++ b/src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
                  @@ -0,0 +1,1 @@
                  +#

                  --
                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  ---
                  You received this message because you are subscribed to the Google Groups "vim_dev" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                • Bram Moolenaar
                  ... Thanks for the quick fix. -- A KNIGHT rides into shot and hacks him to the ground. He rides off. We stay for a moment on the glade. A MIDDLE-AGED LADY in
                  Message 8 of 25 , Jun 23, 2013
                  • 0 Attachment
                    ZyX wrote:

                    > > Please follow my instructions. gettext searches the source code for
                    > > "_()" and "N_()", nothing else. After patch 7.3.1229 existing
                    > > translations will work, but the next time the translations are updated
                    > > they will be gone.
                    > >
                    > > You can see the effect by running "make ru" in src/po.
                    >
                    > # HG changeset patch
                    > # User ZyX <kp-pav@...>
                    > # Date 1371991354 -14400
                    > # Sun Jun 23 16:42:34 2013 +0400
                    > # Branch python-fixes
                    > # Node ID 3c21dc7cfad1f22855bd64b2a4a79d75cd36b1e3
                    > # Parent 8b539b192fd5eae19f61bd3d55a28811ea5bae0c
                    > Use N_() to mark strings for translation

                    Thanks for the quick fix.

                    --
                    A KNIGHT rides into shot and hacks him to the ground. He rides off.
                    We stay for a moment on the glade. A MIDDLE-AGED LADY in a C. & A.
                    twin-set emerges from the trees and looks in horror at the body of her
                    HUSBAND.
                    MRS HISTORIAN: FRANK!
                    "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                    /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                    \\\ an exciting new programming language -- http://www.Zimbu.org ///
                    \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                    --
                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php

                    ---
                    You received this message because you are subscribed to the Google Groups "vim_dev" group.
                    To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                    For more options, visit https://groups.google.com/groups/opt_out.
                  • Bram Moolenaar
                    ... Thanks. When I apply both patches 9 and 10 , plus this one then the tests are passing. I ll send this out as one big patch. -- press CTRL-ALT-DEL for
                    Message 9 of 25 , Jun 23, 2013
                    • 0 Attachment
                      ZyX wrote:

                      > > --- testdir/test87.failed 2013-06-23 14:45:47.000000000 +0200
                      > > +++ testdir/test87.ok 2013-06-23 14:43:28.000000000 +0200
                      > > @@ -1175,6 +1175,9 @@
                      > > 3,xx
                      > > before
                      > > after
                      > > +pythonx/topmodule/__init__.py
                      > > +pythonx/topmodule/submodule/__init__.py
                      > > +pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
                      > > vim.command("throw 'abcN'"):(<class 'vim.error'>, error('abcN',))
                      > > Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
                      > > vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))
                      >
                      >
                      > This should be fixed with the following diff. Though with hg export
                      > --git (“fixed” version of the patch) it should not be necessary as
                      > empty files do appear in its output.

                      Thanks. When I apply both patches "9" and "10", plus this one then the
                      tests are passing. I'll send this out as one big patch.

                      --
                      press CTRL-ALT-DEL for more information

                      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                      \\\ an exciting new programming language -- http://www.Zimbu.org ///
                      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                      --
                      --
                      You received this message from the "vim_dev" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php

                      ---
                      You received this message because you are subscribed to the Google Groups "vim_dev" group.
                      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                      For more options, visit https://groups.google.com/groups/opt_out.
                    • ZyX
                      After make ru I find many incorrect fuzzy-matched translations in src/po/ru.po. Am not sure whether the following is the right fix though. # HG changeset
                      Message 10 of 25 , Jun 23, 2013
                      • 0 Attachment
                        After "make ru" I find many incorrect fuzzy-matched translations in src/po/ru.po. Am not sure whether the following is the right fix though.

                        # HG changeset patch
                        # User ZyX <kp-pav@...>
                        # Date 1371999908 -14400
                        # Sun Jun 23 19:05:08 2013 +0400
                        # Branch python-fixes
                        # Node ID 6d47c9fe0c735245337578a76d3ece1c5a4a1b52
                        # Parent bec8c9e957010b4a87424de12456d7e98df8776c
                        Translation update: replace fuzzy-matched strings found after `make ru` with proper ones

                        diff --git a/src/po/ru.po b/src/po/ru.po
                        --- a/src/po/ru.po
                        +++ b/src/po/ru.po
                        @@ -6573,110 +6573,126 @@
                        msgid "Need encryption key for \"%s\""
                        msgstr "Требуется ключ шифрования для \"%s\""

                        +msgid "empty keys are not allowed"
                        +msgstr "пустые ключи не допустимы"
                        +
                        +msgid "dictionary is locked"
                        +msgstr "словарь заблокирован"
                        +
                        +msgid "list is locked"
                        +msgstr "список заблокирован"
                        +
                        +#, c-format
                        +msgid "failed to add key '%s' to dictionary"
                        +msgstr "не удалось добавить ключ <<%s>> к словарю"
                        +
                        msgid "can't delete OutputObject attributes"
                        msgstr "невозможно удалить атрибуты OutputObject"

                        -msgid "softspace must be an integer"
                        -msgstr "значение softspace должно быть целым числом"
                        -
                        -msgid "invalid attribute"
                        -msgstr "неправильный атрибут"
                        -
                        -msgid "writelines() requires list of strings"
                        -msgstr "writelines() требует указания списка строк"
                        +#, c-format
                        +msgid "invalid attribute: %s"
                        +msgstr "неправильный атрибут: %s"

                        msgid "E264: Python: Error initialising I/O objects"
                        msgstr "E264: Python: Ошибка инициализации объектов I/O"

                        -msgid "no such buffer"
                        -msgstr "нет такого буфера"
                        -
                        -msgid "empty keys are not allowed"
                        -msgstr "пустые ключи не допустимы"
                        -
                        -msgid "failed to add key to dictionary"
                        -msgstr "невозможно добавить ключ к словарю"
                        -
                        -msgid "Cannot delete DictionaryObject attributes"
                        -msgstr "Невозможно удалить атрибуты DictionaryObject"
                        -
                        -msgid "Cannot modify fixed dictionary"
                        -msgstr "Невозможно изменить фиксированный словарь"
                        -
                        -msgid "Only boolean objects are allowed"
                        -msgstr "Разрешено использовать только логические объекты"
                        -
                        -msgid "Cannot set this attribute"
                        -msgstr "Невозможно установить этот атрибут"
                        -
                        -msgid "no such key in dictionary"
                        -msgstr "нет такого ключа в словаре"
                        -
                        -msgid "dict is locked"
                        -msgstr "словарь заблокирован"
                        -
                        -msgid "internal error: failed to get vim list item"
                        -msgstr "внутренняя ошибка: не удалось получить элемент списка VIM"
                        -
                        -msgid "list is locked"
                        -msgstr "список заблокирован"
                        -
                        -msgid "Failed to add item to list"
                        -msgstr "Невозможно добавить элемент в список"
                        -
                        -msgid "internal error: no vim list item"
                        -msgstr "внутренняя ошибка: нет элемента списка VIM"
                        -
                        -msgid "can only assign lists to slice"
                        -msgstr "назначение выборки возможно только для списков"
                        +msgid "failed to change directory"
                        +msgstr "не удалось изменить текущий каталог"
                        +
                        +msgid "cannot delete vim.Dictionary attributes"
                        +msgstr "невозможно удалить атрибуты vim.Dictionary"
                        +
                        +msgid "cannot modify fixed dictionary"
                        +msgstr "невозможно изменить фиксированный словарь"
                        +
                        +#, c-format
                        +msgid "cannot set attribute %s"
                        +msgstr "невозможно установить аттрибут %s"
                        +
                        +msgid "list index out of range"
                        +msgstr "номер элемента за пределами диапазона"
                        +
                        +#, c-format
                        +msgid "internal error: failed to get vim list item %d"
                        +msgstr "внутренняя ошибка: не удалось получить элемент %d списка VIM"
                        +
                        +msgid "failed to add item to list"
                        +msgstr "не удалось добавить элемент в список"
                        +
                        +#, c-format
                        +msgid "internal error: no vim list item %d"
                        +msgstr "внутренняя ошибка: нет элемента %d списка VIM"

                        msgid "internal error: failed to add item to list"
                        msgstr "внутренняя ошибка: не удалось добавить элемент в список"

                        -msgid "can only concatenate with lists"
                        -msgstr "можно объединить только списки"
                        -
                        -msgid "Cannot modify fixed list"
                        -msgstr "Невозможно изменить фиксированный список"
                        -
                        -msgid "'self' argument must be a dictionary"
                        -msgstr "параметр 'self' должен быть словарём"
                        -
                        -msgid "failed to run function"
                        -msgstr "невозможно выполнить функцию"
                        +msgid "cannot delete vim.List attributes"
                        +msgstr "невозможно удалить атрибуты vim.List"
                        +
                        +msgid "cannot modify fixed list"
                        +msgstr "невозможно изменить фиксированный список"
                        +
                        +#, c-format
                        +msgid "unnamed function %s does not exist"
                        +msgstr "анонимная функция %s не существует"
                        +
                        +#, c-format
                        +msgid "function %s does not exist"
                        +msgstr "функция %s не существует"
                        +
                        +#, c-format
                        +msgid "failed to run function %s"
                        +msgstr "не удалось выполнить функцию %s"
                        +
                        +msgid "unable to get option value"
                        +msgstr "не удалось получить значение настройки"
                        +
                        +msgid "internal error: unknown option type"
                        +msgstr "внутренняя ошибка: неизвестный тип настройки"
                        +
                        +msgid "attempt to refer to deleted tab page"
                        +msgstr "попытка сослаться на уничтоженную вкладку"
                        +
                        +msgid "no such tab page"
                        +msgstr "нет такой вкладки"

                        msgid "attempt to refer to deleted window"
                        msgstr "попытка сослаться на закрытое окно"

                        -msgid "readonly attribute"
                        -msgstr "атрибут доступен только для чтения"
                        +msgid "readonly attribute: buffer"
                        +msgstr "атрибут buffer доступен только для чтения"

                        msgid "cursor position outside buffer"
                        msgstr "позиция курсора находится вне буфера"

                        -#, c-format
                        -msgid "<window object (deleted) at %p>"
                        -msgstr "<объект окна (удален) в %p>"
                        -
                        -#, c-format
                        -msgid "<window object (unknown) at %p>"
                        -msgstr "<объект окна (неизвестен) в %p>"
                        -
                        -#, c-format
                        -msgid "<window %d>"
                        -msgstr "<окно %d>"
                        -
                        msgid "no such window"
                        msgstr "нет такого окна"

                        msgid "attempt to refer to deleted buffer"
                        msgstr "попытка сослаться на уничтоженный буфер"

                        -msgid "unable to convert to vim structure"
                        -msgstr "невозможно преобразовать в структуру VIM"
                        -
                        -msgid "NULL reference passed"
                        -msgstr "передана ссылка на NULL"
                        +msgid "failed to rename buffer"
                        +msgstr "не удалось переименовать буфер"
                        +
                        +msgid "failed to run the code"
                        +msgstr "невозможно выполнить функцию"
                        +
                        +msgid "E858: Eval did not return a valid python object"
                        +msgstr "E858: Eval не возвратил допустимого объекта Python"
                        +
                        +msgid "E859: Failed to convert returned python object to vim value"
                        +msgstr "E859: Не удалось преобразовать возвращённый объект Python в значение VIM"
                        +
                        +#, c-format
                        +msgid "unable to convert %s to vim dictionary"
                        +msgstr "невозможно преобразовать %s в словарь Vim"
                        +
                        +#, c-format
                        +msgid "unable to convert %s to vim structure"
                        +msgstr "невозможно преобразовать %s в структуру Vim"
                        +
                        +msgid "internal error: NULL reference passed"
                        +msgstr "внутренняя ошибка: передана ссылка на NULL"

                        msgid "internal error: invalid value type"
                        msgstr "внутренняя ошибка: неправильный тип значения"

                        --
                        --
                        You received this message from the "vim_dev" maillist.
                        Do not top-post! Type your reply below the text you are replying to.
                        For more information, visit http://www.vim.org/maillist.php

                        ---
                        You received this message because you are subscribed to the Google Groups "vim_dev" group.
                        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                        For more options, visit https://groups.google.com/groups/opt_out.
                      • Bram Moolenaar
                        ... Sergey Alyoshin was maintaining the Russian translations. Sergey, are you OK with including this? -- He was not in the least bit scared to be mashed into a
                        Message 11 of 25 , Jun 23, 2013
                        • 0 Attachment
                          ZyX wrote:

                          > After "make ru" I find many incorrect fuzzy-matched translations in
                          > src/po/ru.po. Am not sure whether the following is the right fix
                          > though.
                          >
                          > # HG changeset patch
                          > # User ZyX <kp-pav@...>
                          > # Date 1371999908 -14400
                          > # Sun Jun 23 19:05:08 2013 +0400
                          > # Branch python-fixes
                          > # Node ID 6d47c9fe0c735245337578a76d3ece1c5a4a1b52
                          > # Parent bec8c9e957010b4a87424de12456d7e98df8776c
                          > Translation update: replace fuzzy-matched strings found after `make
                          > ru` with proper ones

                          Sergey Alyoshin was maintaining the Russian translations.

                          Sergey, are you OK with including this?

                          --
                          He was not in the least bit scared to be mashed into a pulp
                          Or to have his eyes gouged out and his elbows broken;
                          To have his kneecaps split and his body burned away
                          And his limbs all hacked and mangled, brave Sir Robin.
                          "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

                          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                          \\\ an exciting new programming language -- http://www.Zimbu.org ///
                          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                          --
                          --
                          You received this message from the "vim_dev" maillist.
                          Do not top-post! Type your reply below the text you are replying to.
                          For more information, visit http://www.vim.org/maillist.php

                          ---
                          You received this message because you are subscribed to the Google Groups "vim_dev" group.
                          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                          For more options, visit https://groups.google.com/groups/opt_out.
                        Your message has been successfully submitted and would be delivered to recipients shortly.