Commit Graph

116 Commits

Author SHA1 Message Date
Guillaume Munch
654f213a2f separator-convert.sh
Lyx files converted from 2.1 to 2.2 contain parbeak and latexpar separators that
would not appear if the lyx file was written in 2.2 from scratch. The script
removes latexpar separators and transforms parbreak separators into plain
separators. Then it displays a diff of the resulting pdf files (requires
diffpdf) for manual control. All lyx files shipped with lyx should be updated in
this way. See #10068.

example usage:
cd lib/doc
../development/tools/separator-convert.sh Math.lyx
2016-05-08 22:14:46 +01:00
Georg Baum
05ef47f47c Update fuzzy translations without -o
This is what the polib version does already. If a translation is marked
fuzzy then it is not used, so if the other file contains a non-fuzzy
translation we do not throw away useful information if we overtake it.
2016-05-07 10:21:24 +02:00
Georg Baum
499ffc3c13 Merge fuzzy translations correctly
If the -o option is given, we may overwrite existing translations with
translations from the other .po file. In this case, we have to delete or set
the fuzzy flag accoring to the updated translation.
2016-05-07 10:21:12 +02:00
Georg Baum
6a4503ac33 Make mergepo.py python3 compatible
This follows the same recipe (by José) as 262ae8264a for po/lyx_pot.py.
2016-05-07 10:21:00 +02:00
Georg Baum
bc53fc53f8 polib has more names than UTF-8 for utf8
In case of id.po it returns utf-8.
2016-05-07 10:20:38 +02:00
Georg Baum
5dcc89d257 Remove date from LFUNs.lyx as discussed.
Also update format to 506.
2016-02-11 21:22:07 +01:00
Georg Baum
51d4036d16 Generate LFUNs.lyx in updatedocs
As suggested by Guillaume.
2016-01-16 11:08:22 +01:00
Georg Baum
4c3b8bf7c7 Update LFUNs.lyx to current format 2016-01-15 21:31:57 +01:00
Guillaume Munch
a8ad43d4fd Check that we have bash before running updatelfuns.sh
Also set executable bits on the devel scripts.
2016-01-11 16:26:13 +00:00
Georg Baum
1d18d94998 Update to current format 2016-01-03 10:31:30 +01:00
Georg Baum
9aa43290db Add option to skip null translations
he.po in branch contains a number of translations where the translation is
identical with the original text (e.g. for encoding names) which look suspicios
to me. Therefore I did not want to merge these and leave the decision to the
translator. No information is lost, since these "translations" can easily be
recreated from the original texts by copy-paste.
2015-12-06 11:27:48 +01:00
Georg Baum
a6b5c72820 Add option to overwrite existing translations
This is useful if you know that the translation of a particular language has
not been updated at all in master, but the stable version has been worked on.
2015-12-03 21:02:47 +01:00
Georg Baum
be7df4a13c Handle escaped characters correctly
Some characters (like ") are escaped in .po files. These are handled correctly
by polib, but the self written parser did not yet take them into account.
2015-12-03 20:56:51 +01:00
Georg Baum
2041920ce0 Parse obsolete entries correctly
We need to remove the #~ prefix of each line, since it is re-added after
wrapping, and because otherwise the comparison with entries from polib
does not work.
2015-12-03 20:52:43 +01:00
Georg Baum
99b3928e6f Use a proper command line parser
Now it is possible to specify the target directory, and the command line syntax
follows the standard rules: It uses options for optional arguments, and one
positional argument for the single required argument.
2015-12-03 20:25:06 +01:00
Georg Baum
124be71cb9 Fix merging of obsolete entries
Thanks Kornel for spotting this.
2015-11-29 20:16:59 +01:00
Georg Baum
4db3169fbc Add utility to merge po files
Surprisingly I could not find a tool that merges updated translations into a
.po file in a way that

a) merges only missing translations (does not overwrite existing ones)
b) produces a minimal diff so that there is a chance to manually check the result

Therefore I wrote my own. You can use it for a single language

python development/tools/mergepo.py ../lyx-2.1/po fr

or for all languages:

python development/tools/mergepo.py ../lyx-2.1/po

The python code is not the most elegant one, but it works. What is missing is
a command line switch to merge changed translations as well. This is useful
for languages that have not yet received any translation update in the
development branch, only in the stable branch: In this case we know that
translations that are not identical in both branches should be overtaken from
the stabkle one.
2015-11-29 18:14:06 +01:00
Scott Kostyshak
09bdea3c02 updatedocs.py: remove an extra parenthesis 2015-11-27 02:37:27 -05:00
Georg Baum
3ab58d155c Add experimental mode to save files with LyX
Thanks Scott for the idea to modify the document. This seems to work, but I am
not surer whether it is safe in all cases, so better warn if this is used.
2015-11-15 17:23:42 +01:00
Georg Baum
1da21bec71 Reduce whitespace differences to LyX
LyX writes an empty line between \end_layout and \begin_layout, so we should
do so as well.
2015-11-15 17:23:42 +01:00
Scott Kostyshak
08d3456a71 updatedocs.py now updates templates and examples
development/MacOSX/ReadMe files are also updated.
2015-11-13 13:19:23 -05:00
Georg Baum
392f63fa0f Update LFUNs.lyx to current format
gen_lfuns.py does now produce the current file format, and and LFUNs.lyx was
re-created with the updated script.
There is one difference if you compare this version of LFUNs.lyx with the old
version updated by lyx2lyx: All occurences of LyX, TeX etc. in the lfun
descriptions are no longer output as logos. I do consider this as a feature,
since the old version did also output the TeX part of BibTeX as a logo, as well
as places where the names were part of some syntax, e.g. lyx::LyXRC::LyXRCTags.
2015-11-11 21:48:20 +01:00
Georg Baum
1fc3d051b1 Set \origin correctly when upgrading docs
lyx2lyx did not yet know about /systemlyxdir/ and set \origin to the path
where my git tree lives instead. This path is not usable except on my machine,
so better write something more usable instead.
This is a special command line switch of lyx2lyx, so it does not interfere
with normal usage. I did not try to deduce the systemlyxdir from lyx2lyx to
be on the safe side.
2015-11-11 21:35:12 +01:00
Georg Baum
0b222f1b11 Exclude old files in attic 2015-11-11 20:50:40 +01:00
Georg Baum
051ebbcf40 Add utility to update documentation files
updatedocs.py is a small script that updates all documentation files to the
current format.
2015-11-11 20:41:28 +01:00
Georg Baum
f110ef2f41 Convert updatelayouts.sh to python
This makes the script usable on windows and speeds it up by an order of
magnitude, since no new process needs to be forked for each layout file.
It also does not conevrt .old files again.
2014-11-16 12:43:52 +01:00
Juergen Spitzmueller
6708c011d7 Add a script to automatically generate SVG math images from a LyX template.
This is an adaptation of Georg's generate_symbols_images script, but it uses dvisvgm instead of dvipng.
2014-10-15 16:14:05 +02:00
Richard Heck
c7ecd10c45 Modify update-po script to commit gmo files, as well. 2014-04-21 12:26:21 -04:00
Jean-Marc Lasgouttes
2b1791641f Fix various typos in LFUNs.lyx 2014-02-13 14:20:43 +01:00
Jean-Marc Lasgouttes
4ec02b46b5 Improve autotools support for generating LFUNs.lyx
The tqrget now works properly when out of source directory qnd uses the $(PYTHON) variable. Also, the use of the error() function has been fixed in the gen_lfun.py script.
2014-02-13 13:28:41 +01:00
Juergen Spitzmueller
ea25b62b1b again update FUNs.lyx 2014-02-13 10:44:12 +01:00
Juergen Spitzmueller
f1531b2f90 LFUNs.lyx improvements 2014-02-13 09:55:40 +01:00
Juergen Spitzmueller
2a0247ee30 Some improvements to the LFUNS generation script 2014-02-10 08:35:49 +01:00
Richard Heck
94956d391a Update build script.
(cherry picked from commit ef0fc5732f)
2014-01-31 09:44:06 -05:00
Georg Baum
bbdff9996f Make sty file parser fit for mdsymbol.sty
Now it is able to generate a lib/symbols section from mdsymbol.sty.
2013-12-11 21:07:59 +01:00
Georg Baum
ca546a8b7e Fix indentation for 'python -tt' 2013-11-19 21:37:33 +01:00
Pavel Sanda
8c23318a99 * header_check.sh: filter headers; we should suspect only .h files. 2013-05-15 03:46:04 -07:00
Pavel Sanda
392124e03e * header_check.sh: fix error order 2013-05-15 03:43:11 -07:00
Pavel Sanda
ee0c031d2d * header_check.sh: forgot on exec flag 2013-05-15 00:07:40 -07:00
Pavel Sanda
5ea35e2d62 * header_check.sh: more tweaks 2013-05-15 00:02:16 -07:00
Pavel Sanda
b1d8bdf670 * header_check.sh: Apply new changes from Scott.
I see lot of errors like:
The following string was expected to be '.cpp' or '.h':
 LyX.cpp: In member function 'void lyx::LyX::printError(const lyx::ErrorItem&)':
Warning: the error was not parsed correctly.
The following string was expected to be '.cpp' or '.h':
 LyX.cpp: In function 'void lyx::error_handler(int)':
2013-05-14 23:59:42 -07:00
Pavel Sanda
9d478d5587 Comment. 2013-05-03 21:45:59 -07:00
Scott Kostyshak
33b0cff2f3 header_check.sh: allow exclusion of common headers
Continuing to address #6305
2013-05-03 01:59:57 -04:00
Scott Kostyshak
6adae69810 Script for finding unneeded headers
The script does the following:

  All .cpp and .h files in the current directory and subdirectories
  are checked to see which include statements could be omitted without
  causing a build error.

Many of these omissions would not be desired. For example, currently
if you don't include Undo.h in Undo.cpp, there is no error because
Undo.h is included in Cursor.h which is included in Undo.cpp. But
clearly we do want to include Undo.h in Undo.cpp.

See #6305.
2013-05-02 02:40:48 -04:00
Georg Baum
45052f56ab Handle text-only wasy symbols correctly.
Some macros defined by wasysym.sty work only in text mode: They either
produce an error in math mode, or wrong output. These symbols are now marked
as text symbols, so that no \ensuremath is created for LaTeX export if they
appear inside \text{}, and the correct images are created.
2013-01-10 21:22:54 +01:00
Georg Baum
c10044ddc0 Add consistency checks.
development/tools/generate_symbols_images.py now checks for each symbol in
lib/symbols whether its image is listed in lib/Makefile.am and whether it has
a toolbar entry in lib/ui/stdtoolbars.inc.
2013-01-08 21:51:09 +01:00
Georg Baum
a98f7ad02d Fine tune image generation 2012-12-31 18:22:05 +01:00
Georg Baum
8838648858 Add script for automatic toolbar image creation.
Manually created toolbar images are needed in many cases, but for simple
symbols automatically generated ones are better than nothing.
2012-12-16 14:44:18 +01:00
Georg Baum
f67cf6f4bb Add support for stmaryrd.sty (bug #8434)
The stmaryrd package adds support for lots of math symbols, using a font
designed to accompany the computer modern fonts. The changes in detail:

- Fix generate_symbols_list.py to work with stmaryrd.sty. It loooks like it
  was automatically translated from a perl version and never used.
- Generate the new symbols in lib/symbols using generate_symbols_list.py and
  add some manual adjustments
- Generate stmary10.ttf by a simple ttf export from stmary10.sfd with fontforge
- Add license info for stmary10.ttf
- Create a test file with all symbols from stmaryrd.sty. Actually it would be
  nice to have this for the other fonts as well.
- The mechanics: lyx2lyx, tex2lyx, font machinery etc.
2012-12-15 13:10:31 +01:00
Pavel Sanda
f6a0356a5f * tools/lyx-fedora update from Kayvan. 2012-11-09 10:59:04 +01:00