Commit Graph

106 Commits

Author SHA1 Message Date
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
Richard Heck
3f4b4d7676 Add lyx-fedora script, which builds a LyX RPM from the git sources
on Fedora.
2012-11-03 22:13:36 -04:00
Richard Heck
d49a4e5c5e Updates to lyx-build script. 2012-11-03 22:11:05 -04:00
Richard Heck
c3fe0fd7e2 Port changes to update-po.sh script to trunk. 2012-07-02 17:49:08 -04:00
Richard Heck
5451b6b4e0 Update distribution build script for git.
(cherry picked from commit 082db5e769)
2012-06-25 09:36:29 -04:00
Richard Heck
15a2216dab Update update-po.sh script.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40290 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-26 23:49:36 +00:00
Richard Heck
84359f46ce Script for building a maintenance distribution.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40278 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-25 17:45:26 +00:00
Richard Heck
019f8415f3 Updates to update-po script.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40063 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-29 19:03:43 +00:00
Richard Heck
f69348f48a Port script updates.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39148 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-20 14:47:21 +00:00
Richard Heck
ed9b6f935b Port changes to update-po.sh.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39109 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-16 15:35:46 +00:00
Richard Heck
7ea412465c Updates to check-po script.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39108 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-16 15:35:42 +00:00