Commit Graph

12 Commits

Author SHA1 Message Date
192338bbc3 Run pylint on find-german-comments
I ran pylint and corrected the following errors:

* W: 39,0: Unnecessary semicolon
* W:177,0: Bad indentation. Found 19 spaces, expected 20
* W:178,0: Bad indentation. Found 19 spaces, expected 20
* W:213,0: Unnecessary semicolon
* W: 65,8:Parser.get_comments: Unused variable 'linenum'
* C:190,28:Parser.check_file: Operator not preceded by a space
* C:192,24:Parser.check_file: Operator not followed by a space
* C:196,24:Parser.check_file: Comma not followed by a space
* W:223,33:Parser.check_source_files: Redefining built-in 'dir'

Change-Id: Idd4986fecb7b3a2af87d1062b7d08c6c87b9f80f
Reviewed-on: https://gerrit.libreoffice.org/10475
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-23 08:02:07 +00:00
e81212315b find-german-comments -l crashed for a too long path name
In calculating how many tabs to use for the display,
when the path was more than 40 characters (like for
dbaccess/source/ui/relationdesign/RelationTableView.cxx)
it returned '1, 0' for the number of tabs --
and python didn't like that. Return 1 instead.

Change-Id: If370ffe03b4aff67ca59094dd38863986ca39519
Reviewed-on: https://gerrit.libreoffice.org/9239
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-05-03 10:42:16 +00:00
6efd972591 Speed up find-german-comments
Instead of recreating a text_cat sub-process for every string, start a
single text-cat process (with the -s flag, "per line") and reuse that.

Testing on svl/source shows a speed-up of 7.5 x, down from 45.6s to 6.1s!

To avoid blocking on the pipes set autoflush in text-cat, and use
read_line instead of read on the find-german-comments side.

Change-Id: Ic6c00fc3c1e7cbcbbfff65512bf54ad11f900697
Reviewed-on: https://gerrit.libreoffice.org/9226
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-05-02 09:13:13 +00:00
4cd629645c Make starmath german-comment-free.
Change-Id: I48b5c6afe861704abe978cb07ecd9df6e39d7b7c
2014-04-28 11:53:22 +02:00
8eb41a5c0d bin/find-german-comments: fix duplicated "basctl" key in dictionary
Change-Id: I12b9d5816c685b2374e6d659436e46965f29cd3a
2014-04-28 11:06:57 +02:00
751c076f3b bin/find-german-comments: fix duplicated "sw" key in dictionary
Change-Id: I2a0a14c905ec1ba1408b625894ba0b8a02e17aa7
2014-04-28 10:54:14 +02:00
14e06df21d whitelist directories with no German to speed up the count.
Change-Id: Ic8d5861fda5b21df43447eb7bc4dc9a416ce1afb
2014-04-28 10:50:21 +01:00
05175da8b4 fix error in bin/find-german-comments
Change-Id: Ice848243654b1bc8923ba65fe87c61e8087c0d8a
2014-01-02 18:39:08 +01:00
299e6381ef Add a new option to bin/find-german-comments
The new option "-L" allows to print out potential candidates for translation
combined with the number of lines found like "-l" - but only if there was a
positive result (i.e., a file that needs checking).
This leads to a much more compact representation helping people to find the
few files that still need translations.

Change-Id: Iad554eb6ce5b062e96774d9488c54105679b7c4b
2013-08-09 23:10:17 +02:00
21c646a8e8 Add options to bin/find-german-comments to help weed out false positives 2012-03-14 08:58:27 +01:00
aedb86399d Add option to only list filenames
This adds the argument -f (--filenames-only), which only prints the
filenames of files containing German comments.
I personally scan the whole file for German strings anyway, as we do
not find German strings with less than 4 chars. So there's not so
much use in printing the found strings.
2012-03-07 11:20:27 +10:30
7be59837a9 move find-german-comments from build repo to bootstrap/bin 2011-01-06 13:30:56 +01:00