I introduced a regression in c14b9e67 for pasting images:
If an image is on the clipboard both as PNG and HTML with just an url,
but no plain text, pasting would fail. The reason for this was that
text contents was detected (the HTML code), nd preferred, but actually
pasting it resulted in an empty string, since the HTML import could not
handle the url This error was not checked.
The solution is first to try text paste if both text and image content
is present, and then try image paste if the text failed.
The main part of the fix (unicodesymbols) is from Jürgen. This commit fixes
tree problems:
- \; etc. were also used in text mode, but are math only
- all of those glyphs need to be forced with utf8
- actually, \; etc. are not the correct macros, since the encoded spaces are
breakable, but the math spaces are all protected. The sapce symbols are not
defined in the utf8 encodings.
When calling the default converter (convert) we pass the format on the
command line. In LyX we have various pdf, pdf2, pdf3, etc. formats all
representing PDF. We need to strip to trailing digit in the format string
otherwise the format is not understood by convert.
LyX, lyx2lyx and tex2lyx produce now all the same version indicator consisting
only of the major and minor version. It is not decided yet whether future
development versions will add a -dev suffix, but for 2.1.0 this change fixes
the inconsistencies.
In [19024f72\lyxgit] this line was removed. Later this caused that floats were converted to strings using ','s instead of '.'s. Readding this line fixes this.
The path to the lyx binary is either <build_dir>/bin (CMake) or
<build_dir>/src (autotools). This means the po directory can be found one
directory up.
Since 00387b2a38 it is possible to construct a dummy Messages object
which does not translate at all. With the old gettext implementation, a
Messages object without a defined language would have used a language from
an environment variable. Therefore, the duplicate definition of _() is no
longer needed. This gettext removal was really a good idea!
This is done by handling explicitly a dummy Message object, where no parsing of mo file is attempted. This avoids in turn that the lyxerr object is used during initialization of a global dummy Message object.
With gettext, we have been forced to install .mo files at the right place in order to read them. Now that we have our code, the situation changes.
* Add new method Package::messages_file(code), when returns the right path, depending on whether we are running in place.
* In Messages class use that intead of the existing one.
Get the default language by a mix of QLocale and LyXRC::gui_language
Known limitations:
* encoding is supposed to be UTF-8 (the charset parameter is checked);
* context is not handled (implemented differently in LyX);
* plural forms not implemented (not used for now in LyX);.
* tThe byte endianness of the machine on which the .mo file have been
built is expected to be the same as the one of the machine where this
code is run.