gettext-lint-0.4/0000755000175000017500000000000010563030230012437 5ustar joaojoaogettext-lint-0.4/doc/0000755000175000017500000000000010563030230013204 5ustar joaojoaogettext-lint-0.4/doc/.cvsignore0000644000175000017500000000002510144240736015212 0ustar joaojoaoMakefile Makefile.in gettext-lint-0.4/doc/Makefile.am0000644000175000017500000000116610470721554015261 0ustar joaojoaoman_MANS = POFileConsistency.1 POFileChecker.1 POFileSpell.1 \ POFileFill.1 POFileEquiv.1 POFileStatus.1 POFileClean.1 \ POFileGlossary.1 EXTRA_DIST = $(man_MANS) docbook = POFileConsistency.xml POFileChecker.xml POFileSpell.xml \ POFileFill.xml POFileEquiv.xml POFileStatus.xml POFileClean.xml \ POFileGlossary.xml docbook: docbook2man docbook2html docbook2man: for I in $(docbook); do \ xsltproc \ /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl $$I; \ done docbook2html: for I in $(docbook); do \ xsltproc \ /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl $$I > \ $${I%%.xml}.html; \ done gettext-lint-0.4/doc/POFileChecker.10000644000175000017500000000335710470721554015716 0ustar joaojoao.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "POFILECHECKER" "1" "08/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" POFileChecker \- searches for common mistakes in PO/POT files .SH "SYNOPSIS" .HP 14 \fBPOFileChecker\fR [\fIOPTION\fR] [\fI...\fR] [\fIFILE\fR] [\fI...\fR] .SH "INTRODUCTION" .PP POFileChecker searches for common mistakes in PO/POT files. .SH "COMMAND LINE OPTIONS" .TP \fB\-\-help\fR or \fB\-h\fR show usage instructions .TP \fB\-\-pot\fR or \fB\-t\fR check a pot file, not a po file .TP \fB\-\-ignore\-fuzzy\fR or \fB\-i\fR don't check validity of fuzzy entries .SH "PO FILE HEADER DIRECTIVES" .PP POFileChecker recognizes several PO file header directives. As with all gettext lint tools, these directives are all prefixed with X\-POFile. .TP X\-POFile\-Allow: \fInumber\fR number of errors to ignore; if number of detected errors is diffent than this they will all be reported; a file with 0 errors but an error allowance greater than zero will also be reported .TP X\-POFile\-CheckAccelerator: \fI1|0\fR enable or disable checking accelerators, enabled by default .TP X\-POFile\-CheckEndPontuation: \fI1|0\fR enable or disable checking ending pontuation, enabled by default .TP X\-POFile\-LineLength: \fInumber\fR check that the line length doesn't exceed \fInumber\fR chars; disable by default .SH "MORE INFORMATION" .PP gettext\-lint web page: http://gettext\-lint.sourceforge.net/ .SH "AUTHOR" Pedro Morais. .br gettext-lint-0.4/doc/POFileChecker.html0000644000175000017500000000644510470721554016523 0ustar joaojoaoPOFileChecker

Name

POFileChecker — searches for common mistakes in PO/POT files

Synopsis

POFileChecker [OPTION] [...] [FILE] [...]

Introduction

POFileChecker searches for common mistakes in PO/POT files.

Command Line Options

--help or -h
show usage instructions
--pot or -t
check a pot file, not a po file
--ignore-fuzzy or -i
don't check validity of fuzzy entries

PO File Header Directives

POFileChecker recognizes several PO file header directives. As with all gettext lint tools, these directives are all prefixed with X-POFile.

X-POFile-Allow: number
number of errors to ignore; if number of detected errors is diffent than this they will all be reported; a file with 0 errors but an error allowance greater than zero will also be reported
X-POFile-CheckAccelerator: 1|0
enable or disable checking accelerators, enabled by default
X-POFile-CheckEndPontuation: 1|0
enable or disable checking ending pontuation, enabled by default
X-POFile-LineLength: number
check that the line length doesn't exceed number chars; disable by default

More Information

gettext-lint web page: http://gettext-lint.sourceforge.net/

gettext-lint-0.4/doc/POFileChecker.xml0000644000175000017500000000740210153663162016347 0ustar joaojoao POFileChecker Manual 2004 Pedro Morais
morais@kde.org
POFileChecker 1 POFileChecker searches for common mistakes in PO/POT files POFileChecker OPTION ... FILE ... Introduction POFileChecker searches for common mistakes in PO/POT files. Command Line Options or show usage instructions or check a pot file, not a po file or don't check validity of fuzzy entries PO File Header Directives POFileChecker recognizes several PO file header directives. As with all gettext lint tools, these directives are all prefixed with X-POFile. X-POFile-Allow: number number of errors to ignore; if number of detected errors is diffent than this they will all be reported; a file with 0 errors but an error allowance greater than zero will also be reported X-POFile-CheckAccelerator: 1|0 enable or disable checking accelerators, enabled by default X-POFile-CheckEndPontuation: 1|0 enable or disable checking ending pontuation, enabled by default X-POFile-LineLength: number check that the line length doesn't exceed number chars; disable by default More Information gettext-lint web page: http://gettext-lint.sourceforge.net/
gettext-lint-0.4/doc/POFileClean.10000644000175000017500000000166610470721554015375 0ustar joaojoao.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "POFILECLEAN" "1" "08/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" POFileClean \- resets the msgstr for situations where it's just a copy of msgid .SH "SYNOPSIS" .HP 12 \fBPOFileClean\fR [\fIOPTION\fR] [\fI...\fR] [\fITARGET\ FILE\fR] [\fIFILE\fR] [\fI...\fR] .SH "INTRODUCTION" .PP POFileClean resets the msgstr for situations where it's just a copy of msgid. .SH "COMMAND LINE OPTIONS" .TP \fB\-\-help\fR or \fB\-h\fR show usage instructions .SH "MORE INFORMATION" .PP gettext\-lint web page: http://gettext\-lint.sourceforge.net/ .SH "AUTHOR" Pedro Morais. .br gettext-lint-0.4/doc/POFileClean.html0000644000175000017500000000305410470721554016172 0ustar joaojoaoPOFileClean

Name

POFileClean — resets the msgstr for situations where it's just a copy of msgid

Synopsis

POFileClean [OPTION] [...] [TARGET FILE] [FILE] [...]

Introduction

POFileClean resets the msgstr for situations where it's just a copy of msgid.

Command Line Options

--help or -h
show usage instructions

More Information

gettext-lint web page: http://gettext-lint.sourceforge.net/

gettext-lint-0.4/doc/POFileClean.xml0000644000175000017500000000342510451271121016015 0ustar joaojoao POFileClean Manual 2004 Pedro Morais
morais@kde.org
POFileClean 1 POFileClean resets the msgstr for situations where it's just a copy of msgid POFileClean OPTION ... TARGET FILE FILE ... Introduction POFileClean resets the msgstr for situations where it's just a copy of msgid. Command Line Options or show usage instructions More Information gettext-lint web page: http://gettext-lint.sourceforge.net/
gettext-lint-0.4/doc/POFileConsistency.10000644000175000017500000000541610470721554016651 0ustar joaojoao.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "POFILECONSISTENCY" "1" "08/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" POFileConsistency \- checks consistency in a collection of PO files .SH "SYNOPSIS" .HP 18 \fBPOFileConsistency\fR [\fIOPTION\fR] [\fI...\fR] [\fIFILE\fR] [\fI...\fR] .SH "INTRODUCTION" .PP POFileConsistency checks consistency in a collection of PO files. .SH "COMMAND LINE OPTIONS" .TP \fB\-\-help\fR or \fB\-h\fR show usage instructions .TP \fB\-\-interactive\fR or \fB\-i\fR interactive mode, iterate though the inconsistencies using a text mode interface; see the Interactive Mode section .TP \fB\-\-equivalent=\fR\fIfile\fR or \fB\-e \fR\fIfile\fR load a file with a list of equivalent msgstr for a given msgid; can be used multiple times .TP \fB\-\-only\-empty\fR or \fB\-o\fR only report inconsistencies with at least one of the translations empty .TP \fB\-\-match=\fR\fIstring\fR or \fB\-m \fR\fIstring\fR only report inconsistencies if at least one of the files involved contain the given string .TP \fB\-\-strip\-chars=\fR\fIchars\fR or \fB\-r \fR\fIchars\fR remove each of the chars from both msgid and msgstr before checking inconsistencies .SH "INTERACTIVE MODE" .PP In interactive mode you iterate through each of the inconsistencies found. In each prompt you can press Enter to ignore this inconsistency, a number of a possible translation (1, 2, ...) to change all the translations to that text, 0 to input a text to use in all the translations, l to add the exception to each of the PO files, or, if you are using at least one equivalents file, a to add the exception to the first of those files. .SH "PO FILE HEADER DIRECTIVES" .PP POFileConsistency recognizes several PO file header directives. As with all gettext lint tools, these directives are all prefixed with \fIX\-POFile\fR. .TP X\-POFile\-IgnoreConsistency: \fImsgid\fR remove the given msgid from the list of messages to check .TP X\-POFile\-ConsistencyAlias: \fIstring1\fR \fIstring2\fR replace all ocorrences of \fIstring1\fR with \fIstring2\fR before checking consistency .SH "CONSISTENCY EQUIVALENTS FILE FORMAT" .PP This files consists of a series of empty line separated blocks. For example: .sp .nf msgid 1 possible translation 1 possible translation 2 ... possible translation n msgid 2 possible translation 1 possible translation 2 ... possible translation n .fi .SH "MORE INFORMATION" .PP gettext\-lint web page: http://gettext\-lint.sourceforge.net/ .SH "AUTHOR" Pedro Morais. .br gettext-lint-0.4/doc/POFileConsistency.html0000644000175000017500000001244710470721554017457 0ustar joaojoaoPOFileConsistency

Name

POFileConsistency — checks consistency in a collection of PO files

Synopsis

POFileConsistency [OPTION] [...] [FILE] [...]

Introduction

POFileConsistency checks consistency in a collection of PO files.

Command Line Options

--help or -h
show usage instructions
--interactive or -i
interactive mode, iterate though the inconsistencies using a text mode interface; see the Interactive Mode section
--equivalent=file or -e file
load a file with a list of equivalent msgstr for a given msgid; can be used multiple times
--only-empty or -o
only report inconsistencies with at least one of the translations empty
--match=string or -m string
only report inconsistencies if at least one of the files involved contain the given string
--strip-chars=chars or -r chars
remove each of the chars from both msgid and msgstr before checking inconsistencies

Interactive Mode

In interactive mode you iterate through each of the inconsistencies found. In each prompt you can press Enter to ignore this inconsistency, a number of a possible translation (1, 2, ...) to change all the translations to that text, 0 to input a text to use in all the translations, l to add the exception to each of the PO files, or, if you are using at least one equivalents file, a to add the exception to the first of those files.

PO File Header Directives

POFileConsistency recognizes several PO file header directives. As with all gettext lint tools, these directives are all prefixed with X-POFile.

X-POFile-IgnoreConsistency: msgid
remove the given msgid from the list of messages to check
X-POFile-ConsistencyAlias: string1 string2
replace all ocorrences of string1 with string2 before checking consistency

Consistency Equivalents File Format

This files consists of a series of empty line separated blocks. For example:

msgid 1
possible translation 1
possible translation 2
...
possible translation n

msgid 2
possible translation 1
possible translation 2
...
possible translation n

More Information

gettext-lint web page: http://gettext-lint.sourceforge.net/

gettext-lint-0.4/doc/POFileConsistency.xml0000644000175000017500000001301010274512574017300 0ustar joaojoao POFileConsistency Manual 2004 Pedro Morais
morais@kde.org
POFileConsistency 1 POFileConsistency checks consistency in a collection of PO files POFileConsistency OPTION ... FILE ... Introduction POFileConsistency checks consistency in a collection of PO files. Command Line Options or show usage instructions or interactive mode, iterate though the inconsistencies using a text mode interface; see the Interactive Mode section file or file load a file with a list of equivalent msgstr for a given msgid; can be used multiple times or only report inconsistencies with at least one of the translations empty string or string only report inconsistencies if at least one of the files involved contain the given string chars or chars remove each of the chars from both msgid and msgstr before checking inconsistencies Interactive Mode In interactive mode you iterate through each of the inconsistencies found. In each prompt you can press Enter to ignore this inconsistency, a number of a possible translation (1, 2, ...) to change all the translations to that text, 0 to input a text to use in all the translations, l to add the exception to each of the PO files, or, if you are using at least one equivalents file, a to add the exception to the first of those files. PO File Header Directives POFileConsistency recognizes several PO file header directives. As with all gettext lint tools, these directives are all prefixed with X-POFile. X-POFile-IgnoreConsistency: msgid remove the given msgid from the list of messages to check X-POFile-ConsistencyAlias: string1 string2 replace all ocorrences of string1 with string2 before checking consistency Consistency Equivalents File Format This files consists of a series of empty line separated blocks. For example: msgid 1 possible translation 1 possible translation 2 ... possible translation n msgid 2 possible translation 1 possible translation 2 ... possible translation n More Information gettext-lint web page: http://gettext-lint.sourceforge.net/
gettext-lint-0.4/doc/POFileEquiv.10000644000175000017500000000215210470721554015433 0ustar joaojoao.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "POFILEEQUIV" "1" "08/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" POFileEquiv \- glossary generator .SH "SYNOPSIS" .HP 12 \fBPOFileEquiv\fR [\fIOPTION\fR] [\fI...\fR] [\fIFILE\fR] [\fI...\fR] .SH "INTRODUCTION" .PP POFileEquiv tries to generate a glossary based on a large enough sample of translations .SH "COMMAND LINE OPTIONS" .TP \fB\-\-help\fR or \fB\-h\fR show usage instructions .TP \fB\-\-max\fR or \fB\-m\fR maximum number of translations to consider .TP \fB\-\-occurences\fR or \fB\-o\fR minimum number of occurences of a translation .TP \fB\-\-ratio\fR or \fB\-r\fR minimum ratio to best match to include a word .SH "MORE INFORMATION" .PP gettext\-lint web page: http://gettext\-lint.sourceforge.net/ .SH "AUTHOR" Pedro Morais. .br gettext-lint-0.4/doc/POFileEquiv.html0000644000175000017500000000406410470721554016243 0ustar joaojoaoPOFileEquiv

Name

POFileEquiv — glossary generator

Synopsis

POFileEquiv [OPTION] [...] [FILE] [...]

Introduction

POFileEquiv tries to generate a glossary based on a large enough sample of translations

Command Line Options

--help or -h
show usage instructions
--max or -m
maximum number of translations to consider
--occurences or -o
minimum number of occurences of a translation
--ratio or -r
minimum ratio to best match to include a word

More Information

gettext-lint web page: http://gettext-lint.sourceforge.net/

gettext-lint-0.4/doc/POFileEquiv.xml0000644000175000017500000000462510470721554016102 0ustar joaojoao POFileEquiv Manual 2004 Pedro Morais
morais@kde.org
POFileEquiv 1 POFileEquiv glossary generator POFileEquiv OPTION ... FILE ... Introduction POFileEquiv tries to generate a glossary based on a large enough sample of translations Command Line Options or show usage instructions or maximum number of translations to consider or minimum number of occurences of a translation or minimum ratio to best match to include a word More Information gettext-lint web page: http://gettext-lint.sourceforge.net/
gettext-lint-0.4/doc/POFileFill.10000644000175000017500000000164710470721554015240 0ustar joaojoao.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "POFILEFILL" "1" "08/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" POFileFill \- fill a file with entries already translated in other files .SH "SYNOPSIS" .HP 11 \fBPOFileFill\fR [\fIOPTION\fR] [\fI...\fR] [\fITARGET\ FILE\fR] [\fIFILE\fR] [\fI...\fR] .SH "INTRODUCTION" .PP POFileFill fills a file with entries already translated in other files. .SH "COMMAND LINE OPTIONS" .TP \fB\-\-help\fR or \fB\-h\fR show usage instructions .SH "MORE INFORMATION" .PP gettext\-lint web page: http://gettext\-lint.sourceforge.net/ .SH "AUTHOR" Pedro Morais. .br gettext-lint-0.4/doc/POFileFill.html0000644000175000017500000000303510470721554016035 0ustar joaojoaoPOFileFill

Name

POFileFill — fill a file with entries already translated in other files

Synopsis

POFileFill [OPTION] [...] [TARGET FILE] [FILE] [...]

Introduction

POFileFill fills a file with entries already translated in other files.

Command Line Options

--help or -h
show usage instructions

More Information

gettext-lint web page: http://gettext-lint.sourceforge.net/

gettext-lint-0.4/doc/POFileFill.xml0000644000175000017500000000340510151211624015656 0ustar joaojoao POFileFill Manual 2004 Pedro Morais
morais@kde.org
POFileFill 1 POFileFill fill a file with entries already translated in other files POFileFill OPTION ... TARGET FILE FILE ... Introduction POFileFill fills a file with entries already translated in other files. Command Line Options or show usage instructions More Information gettext-lint web page: http://gettext-lint.sourceforge.net/
gettext-lint-0.4/doc/POFileGlossary.10000644000175000017500000000174210470725454016154 0ustar joaojoao.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "POFILEGLOSSARY" "1" "08/17/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" POFileGlossary \- checks a collection of PO files against a glossary .SH "SYNOPSIS" .HP 15 \fBPOFileGlossary\fR [\fIOPTION\fR] [\fI...\fR] [\fIGLOSSARY\fR] [\fIFILE\fR] [\fI...\fR] .SH "INTRODUCTION" .PP POFileGlossary checks a collection of PO files against a glossary .SH "COMMAND LINE OPTIONS" .TP \fB\-\-help\fR or \fB\-h\fR show usage instructions .SH "GLOSSARY FILE FORMAT" .PP Glossary files are in XML format. .SH "MORE INFORMATION" .PP gettext\-lint web page: http://gettext\-lint.sourceforge.net/ .SH "AUTHOR" Pedro Morais. .br gettext-lint-0.4/doc/POFileGlossary.html0000644000175000017500000000324110470725454016754 0ustar joaojoaoPOFileGlossary

Name

POFileGlossary — checks a collection of PO files against a glossary

Synopsis

POFileGlossary [OPTION] [...] [GLOSSARY] [FILE] [...]

Introduction

POFileGlossary checks a collection of PO files against a glossary

Command Line Options

--help or -h
show usage instructions

Glossary File Format

Glossary files are in XML format.

More Information

gettext-lint web page: http://gettext-lint.sourceforge.net/

gettext-lint-0.4/doc/POFileGlossary.xml0000644000175000017500000000362010470725455016612 0ustar joaojoao POFileGlossary Manual 2006 Pedro Morais
morais@kde.org
POFileGlossary 1 POFileGlossary checks a collection of PO files against a glossary POFileGlossary OPTION ... GLOSSARY FILE ... Introduction POFileGlossary checks a collection of PO files against a glossary Command Line Options or show usage instructions Glossary File Format Glossary files are in XML format. More Information gettext-lint web page: http://gettext-lint.sourceforge.net/
gettext-lint-0.4/doc/POFileSpell.10000644000175000017500000000501710470721554015424 0ustar joaojoao.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "POFILESPELL" "1" "08/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" POFileSpell \- checks the spelling in a collection of PO files .SH "SYNOPSIS" .HP 12 \fBPOFileSpell\fR [\fIOPTION\fR] [\fI...\fR] [\fIFILE\fR] [\fI...\fR] .SH "INTRODUCTION" .PP POFileSpell checks the spelling in a collection of PO files. .SH "COMMAND LINE OPTIONS" .TP \fB\-\-help\fR or \fB\-h\fR show usage instructions .TP \fB\-\-interactive\fR or \fB\-i\fR interactive mode, iterate through the spelling errors using a text mode interface; see the Interactive Mode section .TP \fB\-\-overview\fR or \fB\-o\fR generate an overview file, grouping by error and not by file .TP \fB\-\-dict=\fR\fIfile\fR or \fB\-d \fR\fIfile\fR load a file with a list of words to consider correct; can be used multiple times .TP \fB\-\-batch\-add=\fR\fIfile\fR load a file with a list of words to add to the X\-POFile\-SpellExtra section of each of the target PO files; can be used multiple times; when used, the actual spelling process is not run .TP \fB\-\-command=\fR\fIcommand\fR the command used for actually spell checking the text, by default \fBaspell \-\-encoding=utf\-8 \-l\fR; if you want to use \fBispell\fR, try something like \fB\-\-comand="ispell \-l"\fR or \fB\-\-comand="iconv \-t iso\-8859\-1 | ispell \-l"\fR .SH "INTERACTIVE MODE" .PP In interactive mode you iterate through each of the errors found. In each prompt you can press a to add the word to a file's \fIX\-POFile\-SpellExtra\fR entry, n to ignore all further errors from this file, Enter to ignore this error or, if you are using one or more dictionary files, the number of the file (1, 2, ...) to add the word to that dictionary file. .SH "PO FILE HEADER DIRECTIVES" .PP POFileSpell recognizes one PO file header directive. As with all gettext lint tools, this directive is prefixed with \fIX\-POFile\fR. .TP X\-POFile\-SpellExtra: \fIword\fR adds the word to the file's list of accepted words .SH "DICTIONARY FILE FORMAT" .PP Dictionary files are just lists of words, one on each line. For example: .sp .nf word 1 word 2 ... word n .fi .SH "MORE INFORMATION" .PP gettext\-lint web page: http://gettext\-lint.sourceforge.net/ .SH "AUTHOR" Pedro Morais. .br gettext-lint-0.4/doc/POFileSpell.html0000644000175000017500000001142410470721554016227 0ustar joaojoaoPOFileSpell

Name

POFileSpell — checks the spelling in a collection of PO files

Synopsis

POFileSpell [OPTION] [...] [FILE] [...]

Introduction

POFileSpell checks the spelling in a collection of PO files.

Command Line Options

--help or -h
show usage instructions
--interactive or -i
interactive mode, iterate through the spelling errors using a text mode interface; see the Interactive Mode section
--overview or -o
generate an overview file, grouping by error and not by file
--dict=file or -d file
load a file with a list of words to consider correct; can be used multiple times
--batch-add=file
load a file with a list of words to add to the X-POFile-SpellExtra section of each of the target PO files; can be used multiple times; when used, the actual spelling process is not run
--command=command
the command used for actually spell checking the text, by default aspell --encoding=utf-8 -l; if you want to use ispell, try something like --comand="ispell -l" or --comand="iconv -t iso-8859-1 | ispell -l"

Interactive Mode

In interactive mode you iterate through each of the errors found. In each prompt you can press a to add the word to a file's X-POFile-SpellExtra entry, n to ignore all further errors from this file, Enter to ignore this error or, if you are using one or more dictionary files, the number of the file (1, 2, ...) to add the word to that dictionary file.

PO File Header Directives

POFileSpell recognizes one PO file header directive. As with all gettext lint tools, this directive is prefixed with X-POFile.

X-POFile-SpellExtra: word
adds the word to the file's list of accepted words

Dictionary File Format

Dictionary files are just lists of words, one on each line. For example:

word 1
word 2
...
word n

More Information

gettext-lint web page: http://gettext-lint.sourceforge.net/

gettext-lint-0.4/doc/POFileSpell.xml0000644000175000017500000001174710274506122016065 0ustar joaojoao POFileSpell Manual 2004 Pedro Morais
morais@kde.org
POFileSpell 1 POFileSpell checks the spelling in a collection of PO files POFileSpell OPTION ... FILE ... Introduction POFileSpell checks the spelling in a collection of PO files. Command Line Options or show usage instructions or interactive mode, iterate through the spelling errors using a text mode interface; see the Interactive Mode section or generate an overview file, grouping by error and not by file file or file load a file with a list of words to consider correct; can be used multiple times file load a file with a list of words to add to the X-POFile-SpellExtra section of each of the target PO files; can be used multiple times; when used, the actual spelling process is not run command the command used for actually spell checking the text, by default aspell --encoding=utf-8 -l; if you want to use ispell, try something like or Interactive Mode In interactive mode you iterate through each of the errors found. In each prompt you can press a to add the word to a file's X-POFile-SpellExtra entry, n to ignore all further errors from this file, Enter to ignore this error or, if you are using one or more dictionary files, the number of the file (1, 2, ...) to add the word to that dictionary file. PO File Header Directives POFileSpell recognizes one PO file header directive. As with all gettext lint tools, this directive is prefixed with X-POFile. X-POFile-SpellExtra: word adds the word to the file's list of accepted words Dictionary File Format Dictionary files are just lists of words, one on each line. For example: word 1 word 2 ... word n More Information gettext-lint web page: http://gettext-lint.sourceforge.net/
gettext-lint-0.4/doc/POFileStatus.10000644000175000017500000000266610470721554015637 0ustar joaojoao.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "POFILESTATUS" "1" "08/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" POFileStatus \- validator and status reporting .SH "SYNOPSIS" .HP 13 \fBPOFileStatus\fR [\fIOPTION\fR] [\fI...\fR] [\fIFILE\fR] [\fI...\fR] .SH "INTRODUCTION" .PP POFileStatus validates files using msgfmt and reports its status. .SH "COMMAND LINE OPTIONS" .TP \fB\-\-help\fR or \fB\-h\fR show usage instructions .TP \fB\-\-show\-all\fR or \fB\-a\fR show all files, even if 100% translated .TP \fB\-\-break\-path\fR or \fB\-b\fR all file path componentes to the output; for example, for the file \fIdir\fR/\fIfile.po\fR the attributes \fIname\-1="dir"\fR and \fIname\-2="file.po"\fR would be added .TP \fB\-\-pot\-dir=\fR\fIdir\fR or \fB\-p \fR\fIdir\fR use this pot templates dir to check if a po file is obsolete or if a pot file is completely untranslated .TP \fB\-\-pot\-exclude=\fR\fIpat\fR or \fB\-p \fR\fIpat\fR exclude pot files that match this pattern; can be used multiple times .SH "MORE INFORMATION" .PP gettext\-lint web page: http://gettext\-lint.sourceforge.net/ .SH "AUTHOR" Pedro Morais. .br gettext-lint-0.4/doc/POFileStatus.html0000644000175000017500000000555510470721554016443 0ustar joaojoaoPOFileStatus

Name

POFileStatus — validator and status reporting

Synopsis

POFileStatus [OPTION] [...] [FILE] [...]

Introduction

POFileStatus validates files using msgfmt and reports its status.

Command Line Options

--help or -h
show usage instructions
--show-all or -a
show all files, even if 100% translated
--break-path or -b
all file path componentes to the output; for example, for the file dir/file.po the attributes name-1="dir" and name-2="file.po" would be added
--pot-dir=dir or -p dir
use this pot templates dir to check if a po file is obsolete or if a pot file is completely untranslated
--pot-exclude=pat or -p pat
exclude pot files that match this pattern; can be used multiple times

More Information

gettext-lint web page: http://gettext-lint.sourceforge.net/

gettext-lint-0.4/doc/POFileStatus.xml0000644000175000017500000000620310151211625016253 0ustar joaojoao POFileStatus Manual 2004 Pedro Morais
morais@kde.org
POFileStatus 1 POFileStatus validator and status reporting POFileStatus OPTION ... FILE ... Introduction POFileStatus validates files using msgfmt and reports its status. Command Line Options or show usage instructions or show all files, even if 100% translated or all file path componentes to the output; for example, for the file dir/file.po the attributes name-1="dir" and name-2="file.po" would be added dir or dir use this pot templates dir to check if a po file is obsolete or if a pot file is completely untranslated pat or pat exclude pot files that match this pattern; can be used multiple times More Information gettext-lint web page: http://gettext-lint.sourceforge.net/
gettext-lint-0.4/doc/Makefile.in0000644000175000017500000002307710563030215015265 0ustar joaojoao# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ man_MANS = POFileConsistency.1 POFileChecker.1 POFileSpell.1 \ POFileFill.1 POFileEquiv.1 POFileStatus.1 POFileClean.1 \ POFileGlossary.1 EXTRA_DIST = $(man_MANS) docbook = POFileConsistency.xml POFileChecker.xml POFileSpell.xml \ POFileFill.xml POFileEquiv.xml POFileStatus.xml POFileClean.xml \ POFileGlossary.xml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-exec-am: install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-info-am uninstall-man uninstall-man1 docbook: docbook2man docbook2html docbook2man: for I in $(docbook); do \ xsltproc \ /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl $$I; \ done docbook2html: for I in $(docbook); do \ xsltproc \ /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl $$I > \ $${I%%.xml}.html; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gettext-lint-0.4/etc/0000755000175000017500000000000010563030230013212 5ustar joaojoaogettext-lint-0.4/etc/.cvsignore0000644000175000017500000000002510137512275015222 0ustar joaojoaoMakefile Makefile.in gettext-lint-0.4/etc/Makefile.am0000644000175000017500000000030110147350771015255 0ustar joaojoaoEXTRA_DIST = report.xsl report.css count.xsl install-data-local: @$(NORMAL-INSTALL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \ $(INSTALL_DATA) $(EXTRA_DIST) $(DESTDIR)$(pkgdatadir) gettext-lint-0.4/etc/count.xsl0000644000175000017500000000103510137512275015104 0ustar joaojoao gettext-lint-0.4/etc/report.css0000644000175000017500000000007010147350772015252 0ustar joaojoaotable { border: solid 1px; } td { border: solid 1px; } gettext-lint-0.4/etc/report.xsl0000644000175000017500000002252310274521747015302 0ustar joaojoao <xsl:apply-templates select="current()" mode="title"/> Report PO File Status Report

file fuzzy untranslated
obsolete totally untranslated PO File Checker Report

file message line problem
POT File Checker Report

file message line problem
PO File Spell Report

file errors
PO File Spell Overview Report

number of files error
PO File Consistency Report

msgid file msgstr

PO File Glossary

original translation
, problems found 1 problem found no problems found
gettext-lint-0.4/etc/Makefile.in0000644000175000017500000001670010563030215015266 0ustar joaojoao# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = etc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = report.xsl report.css count.xsl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu etc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-data-local install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am install-data-local: @$(NORMAL-INSTALL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \ $(INSTALL_DATA) $(EXTRA_DIST) $(DESTDIR)$(pkgdatadir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gettext-lint-0.4/.cvsignore0000644000175000017500000000026210137512275014452 0ustar joaojoaoconfig.cache config.h config.h.in config.log config.status stamp-h stamp-h.in ABOUT-NLS NEWS ChangeLog configure Makefile.in Makefile aclocal.m4 *-*.tar.gz *.spec autom4te.cache gettext-lint-0.4/AUTHORS0000644000175000017500000000017410137512275013524 0ustar joaojoaoPedro Morais José Nuno Pires Patches contributed by: João Neves gettext-lint-0.4/COPYING0000644000175000017500000004313110137512275013507 0ustar joaojoao GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. gettext-lint-0.4/ChangeLog0000644000175000017500000000002210137512445014215 0ustar joaojoaoSee the file NEWS gettext-lint-0.4/Makefile.am0000644000175000017500000000044210144242713014501 0ustar joaojoaoSUBDIRS = src etc doc EXTRA_DIST = $(PACKAGE).spec RPMDIR = $(shell [ -z "$$RPMDIR" ] && echo "../rpm" || echo "$$RPMDIR") rpm: dist mkdir -p $(RPMDIR)/BUILD $(RPMDIR)/RPMS $(RPMDIR)/SRPMS $(RPMDIR)/SPECS rpmbuild --define="_topdir $(shell pwd)/$(RPMDIR)" --clean -ta $(distdir).tar.gz gettext-lint-0.4/NEWS0000644000175000017500000000220510274515121013143 0ustar joaojoao* Version 0.3.2 (2005-08-06): - add to local file ignore list command in POFileConsistency interactive mode - add --batch-add option to POFileSpell * Version 0.3.1 (2005-02-10): - add replace command in POFileSpell interactive mode - merge POTFileChecker into POFileChecker (run with --pot) * Version 0.3.0 (2004-11-25): - convert argument parsing to getopt, should be much more flexible now - add man pages - add a default CSS for the reports, report.css - POFileSpellShell replaced by POFileSpell -i option - POFileConsistencyShell replaced by POFileConsistency -i option - POFileConsistency: allow muliple consistency equivalents files * Version 0.2.0 (2004-11-04): - add POFileFill, a tool to translate a file based on existing translations. - add POFileSpell, a tool to spell check files. - add POFileSpellCheck, related to POFileSpell as POFileConsistencyShell is to POFileConsistency. * Version 0.1.2 (2004-02-03): - fix installs with prefix different than /usr. * Version 0.1.1 (2004-02-02): - add POFileConsistencyShell, an interactive tool that makes fixing inconsistencies really easy. * Version 0.1.0 (2004-01-24): - initial release. gettext-lint-0.4/README0000644000175000017500000000247710467723042013346 0ustar joaojoaogettext lint tools Pedro Morais José Nuno Pires João Neves (c) Copyright 2003 - 2006 Distributable under the terms of the GPL - see COPYING This packages includes the following tools: POFileStatus - validator and status reporting POFileChecker - searches for common mistakes in PO/POT files POFileConsistency - consistency checker POFileEquiv - glossary generator POFileSpell - spell checker POFileFill - fill a file with entries already translated in other files POFileClean - remove translations for a PO file POFileGlossary - create a glossary from PO files All the commands produce XML output; you can feed this output to report.xsl (probably located on /usr/share/gettext-lint/report.xsl) to generate HTML reports. For example: POFileChecker $(find /path/to/po/files -name "*.po") | xsltproc /usr/share/gettext-lint/report.xsl - > report.html The included XSL can receive the parameter 'css' with the name of a stylesheet to reference in the resulting HTML. For example: POFileChecker $(find /path/to/po/files -name "*.po") | xsltproc -param css "'/usr/share/gettext-lint/report.css'" /usr/share/gettext-lint/report.xsl - > report.html You can also run POFileSpell and POFileConsistency in interactive mode, following a series of prompts. The -i option chooses this mode. gettext-lint-0.4/acconfig.h0000644000175000017500000000030310137512275014370 0ustar joaojoao#undef ENABLE_NLS #undef HAVE_CATGETS #undef HAVE_GETTEXT #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY #undef HAVE_LIBSM #undef PACKAGE_LOCALE_DIR #undef PACKAGE_DATA_DIR #undef PACKAGE_SOURCE_DIR gettext-lint-0.4/autogen.sh0000755000175000017500000000007710137512274014456 0ustar joaojoao#!/bin/sh aclocal && automake -a && autoconf && ./configure $* gettext-lint-0.4/configure.in0000644000175000017500000000053310467723042014766 0ustar joaojoaoAC_INIT(gettext-lint, 0.4.0, morais@kde.org) AM_INIT_AUTOMAKE AM_PATH_PYTHON(2.0) AC_OUTPUT([ Makefile gettext-lint.spec etc/Makefile doc/Makefile src/Makefile src/POFileChecker src/POFileConsistency src/POFileEquiv src/POFileFill src/POFileSpell src/POFileStatus src/POFileClean src/POFileGlossary ], [chmod +x $(ls src/PO*.in | sed s/.in//g)]) gettext-lint-0.4/doap.rdf0000644000175000017500000000312510151071764014072 0ustar joaojoao gettext lint tools gettext-lint 2004-01-24 The gettext lint tools is a collection of tools for checking the validity and consistency of PO and POT files. Collection of tools for checking the validity and consistency of PO and POT files. python Pedro Morais 90325b33fb3a59b2d9844902225705e9d66c949f :pserver:anonymous@cvs.sourceforge.net:/cvsroot/gettext-lint gettext-lint gettext-lint-0.4/gettext-lint.spec.in0000644000175000017500000000240210470725643016366 0ustar joaojoaoName: gettext-lint Summary: Gettext linting tools. Version: @VERSION@ Release: 1 Vendor: Pedro Morais License: GPL URL: http://gettext-lint.sourceforge.net/ Source: http://dl.sourceforge.net/gettext-lint/gettext-lint-%version.tar.gz Group: Development/Tools Packager: Pedro Morais Requires: python >= 2.0 gettext BuildArchitectures: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description The gettext lint tools are a collection of tools for checking the validity, consistency and spelling of PO and POT files. An experimental glossary building tool is also included. %prep %setup -q %build %configure %{__make} %{?_smp_mflags} %install %makeinstall %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_bindir}/POFileChecker %{_bindir}/POFileConsistency %{_bindir}/POFileEquiv %{_bindir}/POFileFill %{_bindir}/POFileSpell %{_bindir}/POFileStatus %{_bindir}/POFileClean %{_bindir}/POFileGlossary %{_mandir}/man1/POFileChecker.1* %{_mandir}/man1/POFileConsistency.1* %{_mandir}/man1/POFileEquiv.1* %{_mandir}/man1/POFileFill.1* %{_mandir}/man1/POFileSpell.1* %{_mandir}/man1/POFileStatus.1* %{_mandir}/man1/POFileClean.1* %{_mandir}/man1/POFileGlossary.1* %{_datadir}/%{name} %doc COPYING README NEWS AUTHORS gettext-lint-0.4/src/0000755000175000017500000000000010563030230013226 5ustar joaojoaogettext-lint-0.4/src/test/0000755000175000017500000000000010563030172014212 5ustar joaojoaogettext-lint-0.4/src/test/.cvsignore0000644000175000017500000000000410137512275016212 0ustar joaojoaotmp gettext-lint-0.4/src/test/1.po0000644000175000017500000000003610137512275014717 0ustar joaojoaomsgid "test1" msgstr "teste1" gettext-lint-0.4/src/test/2.po0000644000175000017500000000003010137512275014712 0ustar joaojoaomsgid "test1" msgstr "" gettext-lint-0.4/src/test/2.result.po0000644000175000017500000000003610137512275016235 0ustar joaojoaomsgid "test1" msgstr "teste1" gettext-lint-0.4/src/test/3.po0000644000175000017500000000006110137512275014717 0ustar joaojoaomsgid "test1" msgstr "" msgid "test2" msgstr "" gettext-lint-0.4/src/test/3.result.po0000644000175000017500000000006710137512275016242 0ustar joaojoaomsgid "test1" msgstr "teste1" msgid "test2" msgstr "" gettext-lint-0.4/src/test/Makefile0000644000175000017500000000122610147353751015664 0ustar joaojoaoall: test1 test2 test1: @mkdir -p tmp @cp 2.po tmp/ python ../POFileFill.in tmp/2.po 1.po @diff -u tmp/2.po 2.result.po test2: @mkdir -p tmp @cp 3.po tmp/ python ../POFileFill.in tmp/3.po 1.po @diff -u tmp/3.po 3.result.po spell1: @mkdir -p tmp @cp spell1.po spell1.dict tmp python ../POFileSpell.in -i --dict=tmp/spell1.dict tmp/spell1.po spell2: @mkdir -p tmp @cp spell2.po tmp python ../POFileSpell.in -i tmp/spell2.po spell3: @mkdir -p tmp @cp spell3.po tmp python ../POFileSpell.in -i tmp/spell3.po check1: @mkdir -p tmp python ../POFileChecker.in check1.po > tmp/check1.result.xml @diff -u tmp/check1.result.xml check1.result.xml gettext-lint-0.4/src/test/check1.po0000644000175000017500000000066610147351514015724 0ustar joaojoaomsgid "" msgstr "" "Project-Id-Version: check1\n" "PO-Revision-Date: 2004-10-23 04:02+0100\n" "Last-Translator: Someone \n" "Language-Team: Somelanguage \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "test1..." msgstr "teste" msgid "test1." msgstr "teste1" msgid "test2..." msgstr "teste2..." msgid "test2." msgstr "teste2." gettext-lint-0.4/src/test/check1.result.xml0000644000175000017500000000027310147351514017415 0ustar joaojoao missing ... missing . gettext-lint-0.4/src/test/error.po0000644000175000017500000000006510137512275015712 0ustar joaojoaomsgid "test1" msgstr " msgid "test2." msgstr "test" gettext-lint-0.4/src/test/spell1.dict0000644000175000017500000000001010137512275016254 0ustar joaojoaoícones gettext-lint-0.4/src/test/spell1.po0000644000175000017500000000052310137512275015760 0ustar joaojoaomsgid "" msgstr "" "Project-Id-Version: spell1\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: Someone \n" "Language-Team: Somelanguage \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "test1" msgstr "certo wrong" gettext-lint-0.4/src/test/spell2.po0000644000175000017500000000062710137512275015766 0ustar joaojoaomsgid "" msgstr "" "Project-Id-Version: spell2\n" "PO-Revision-Date: 2004-10-23 04:02+0100\n" "Last-Translator: Someone \n" "Language-Team: Somelanguage \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-POFile-SpellExtra: one two three\n" "X-POFile-SpellExtra: four\n" msgid "test1" msgstr "certo wrong" gettext-lint-0.4/src/test/spell3.po0000644000175000017500000000071010137512275015760 0ustar joaojoaomsgid "" msgstr "" "Project-Id-Version: spell3\n" "PO-Revision-Date: 2004-10-23 04:02+0100\n" "Last-Translator: Someone \n" "Language-Team: Somelanguage \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-POFile-SpellExtra: one two three\n" "X-POFile-SpellExtra: four xxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx\n" msgid "test1" msgstr "certo wrong" gettext-lint-0.4/src/.cvsignore0000644000175000017500000000020610470707656015250 0ustar joaojoaoMakefile Makefile.in *.pyc POFileChecker POFileConsistency POFileEquiv POFileFill POFileSpell POFileStatus POFileClean POFileGlossary gettext-lint-0.4/src/Equivalent.py0000644000175000017500000000252610150644714015734 0ustar joaojoao# -*- coding: utf-8 -*- # Equivalents file class # # Pedro Morais # José Nuno Pires # (c) Copyright 2003, 2004 # Distributable under the terms of the GPL - see COPYING class Equivalent: def __init__(self): self.map = None def read_lines(self, filename): try: file = open(filename) lines = file.readlines() file.close() return lines except IOError: return None def parse(self, filename, strip = ''): lines = self.read_lines(filename) if lines == None: return 0 if self.map == None: self.map = {} msgid = None list = [] for i in lines: i = i.strip() for k in strip: i = i.replace(k, '') if len(i) == 0: if msgid != None and len(list) > 0: self.map[msgid] = list msgid = None list = [] elif msgid == None: msgid = i else: list.append(i) if msgid != None and len(list) > 0: self.map[msgid] = list return 1 def check(self, msgid, result): if self.map == None or not self.map.has_key(msgid): return 0 eq = self.map[msgid] for i in result: if not(i in eq): return 0 return 1 gettext-lint-0.4/src/Glossary.py0000644000175000017500000000201510467722455015425 0ustar joaojoao#!/usr/bin/python # -*- coding: UTF-8 -*- from xml.dom.ext.reader import Sax2 from xml import xpath class Glossary: def __init__(self, filename): f = open(filename,'r') self.dict = {} # create Reader object reader = Sax2.Reader() # parse the document doc = reader.fromStream(f) nodes = xpath.Evaluate('word', doc.documentElement) for node in nodes: key = xpath.Evaluate('original/child::text()',node) values = xpath.Evaluate('translation/term/child::text()',node) key = key[0].nodeValue try: a = self.dict[key] except KeyError: self.dict[key] = [] for value in values: self.dict[key].append(value.nodeValue) def __getitem__(self, k): return self.dict[k] def __setitem__(self, k, x): self.dict[k] = x def __delitem__(self,k): del self.dict[k] def __len__(self): return len(self.dict) gettext-lint-0.4/src/Makefile.am0000644000175000017500000000057610467722455015316 0ustar joaojoaobin_SCRIPTS = \ POFileChecker \ POFileConsistency \ POFileEquiv \ POFileFill \ POFileSpell \ POFileStatus \ POFileClean \ POFileGlossary EXTRA_DIST = *.py PO*.in install-data-local: $(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \ $(INSTALL_DATA) *.py $(DESTDIR)$(pkgdatadir) pychecker: @for i in *.py; do pychecker -Q $$i; done clean: rm -f *~ *.pyc *.pyo gettext-lint-0.4/src/POFile.py0000644000175000017500000004321710563027407014741 0ustar joaojoao# -*- coding: utf-8 -*- # PO file classes # # Pedro Morais # José Nuno Pires # João Miguel Neves # (c) Copyright 2003, 2004 # Distributable under the terms of the GPL - see COPYING import string import capitalization class POFile: def __init__(self, filename): self.filename = filename self.fuzzy = None self.untranslated = None self.translated = None self.validateError = None self.data = [] self.errors = [] self.spellErrors = [] self.glossaryErrors = [] self.ignoreConsistency = [] self.consistencyAlias = [] self.allowCount = None self.enableCheckAccelerator = 1 self.enableCheckCapitalization = 0 self.accelerator = '&' self.enableCheckEndPontuation = 1 self.enableCheckLineLength = 0 self.ignoreFuzzy = 0 self.spellExtra = [] self.spellCommand = 'cat' def getRatio(self): if self.translated == None: return None total = self.translated if self.fuzzy: total = total + self.fuzzy if self.untranslated: total = total + self.untranslated return float(self.translated) / float(total) def isFullyTranslated(self): return self.translated and not(self.fuzzy) and not(self.untranslated) def validate(self): import os command = "msgfmt --statistics -o /dev/null %s 2>&1" % self.filename output = os.popen(command).read() self.translated = self.__vextract(output, " translated") if self.translated == None: self.validateError = output self.fuzzy = self.__vextract(output, " fuzzy") self.untranslated = self.__vextract(output, " untranslated") return self.validateError == None def __vextract(self, output, token): end = output.find(token) if end == -1: return None start = output.rfind(" ", 0, end) + 1 return int(output[start:end]) def read_lines(self): try: pofile = open(self.filename) lines = pofile.readlines() pofile.close() return lines except IOError: return None def parse(self): lines = self.read_lines() if lines == None: return 0 current = "" msgid = "" mode = 0 self.data = [] line = 0 msgidline = 0 message = 0 mode1fuzzy = 0 fuzzy = 0 for i in lines: line = line + 1 l = i.strip() if len(l) == 0: continue if i[0] == '#': if i.startswith('#, fuzzy'): fuzzy = 1 continue if i[:6] == "msgid " or i[:6] == "msgid\t": if mode == 2: self.data.append((msgidline, message, msgid, current, mode1fuzzy)) current = "" mode = 1 msgidline = line message = message + 1 mode1fuzzy = fuzzy fuzzy = 0 l = l[6:] if i[:7] == "msgstr " or i[:7] == "msgstr\t": if mode == 1: msgid = current current = "" mode = 2 l = l[7:] if mode: current = current + l[1:-1] if mode == 2: self.data.append((msgidline, message, msgid, current, mode1fuzzy)) return 1 def replace(self, number, text, removeFuzzy, output): prepare = self.prepare_replace(number) if prepare == None: return 0 if output != None: self.execute_replace(prepare, text, removeFuzzy, output) return 1 def prepare_replace(self, number): lines = self.read_lines() if lines == None: return None line = 0 message = 0 headline = None fuzzyline = None fuzzylinetmp = None for i in lines: line = line + 1 l = i.strip() if len(l) == 0 or i[0] == '#': if i.startswith('#, fuzzy'): fuzzylinetmp = line if headline: line = line - 1 break elif i[:6] == "msgid " or i[:6] == "msgid\t": message = message + 1 fuzzyline = fuzzylinetmp fuzzylinetmp = None elif i[:7] == "msgstr " or i[:7] == "msgstr\t": if message == number: headline = line if not(headline): return None return (headline, line + 1, lines, fuzzyline) def execute_replace(self, prepare, text, removeFuzzy, output, breaknewlines = 0): headline, tailline, lines, fuzzyline = prepare line = 0 for i in lines[:headline - 1]: line = line + 1 if removeFuzzy and fuzzyline != None and fuzzyline == line: i = i.replace(', fuzzy', '') if i != '#\n': output.write(i) else: output.write(i) for i in self.consistencyAlias: text = text.replace(i[1], i[0]) if breaknewlines and text.find('\\n') >= 0: output.write('msgstr ""\n') for i in text.split('\\n'): if len(i): output.write('"%s\\n"\n' % i) else: output.write('msgstr "%s"\n' % text) for i in lines[tailline - 1:]: output.write(i) def append_header_string(self, line, key, list): x = self.get_header_string(line, key) if x != None: list.append(x) def append_header_strings(self, line, key, list): x = self.get_header_string(line, key) if x != None: for i in x.split(" "): list.append(i) def get_header_string(self, line, key, current = None): if line.startswith("X-POFile-%s: " % key): return line[len("X-POFile-%s: " % key):] return current def get_header_int(self, line, key, current = None): x = self.get_header_string(line, key) if x == None: return current try: return int(x) except: return current def parseHeader(self): if len(self.data) > 0: headerLines = self.data[0][3].split('\\n') for i in headerLines: self.allowCount = self.get_header_int( i, "Allow", self.allowCount) self.enableCheckAccelerator = self.get_header_int( i, "CheckAccelerator", self.enableCheckAccelerator) self.enableCheckEndPontuation = self.get_header_int( i, "CheckEndPontuation", self.enableCheckEndPontuation) self.enableCheckLineLength = self.get_header_int( i, "CheckLineLength", self.enableCheckLineLength) self.append_header_string(i, "IgnoreConsistency", self.ignoreConsistency) self.append_header_strings(i, "SpellExtra", self.spellExtra) if i.startswith("X-POFile-ConsistencyAlias: "): s = i[len("X-POFile-ConsistencyAlias: "):].split(" ") if len(s) == 2: self.consistencyAlias.append(s) def toWordList(self, s): s = s.replace('\\n', ' ').replace('\\t', ' ').replace(',', ' ').replace('.', ' ').replace('?', ' ').replace('!', ' ').replace(':', ' ').replace(';', ' ').replace('(', ' ').replace(')', ' ').replace('/', ' ').replace('&&', ' ').replace('&', '').replace('', ' ').replace('\\"', " ") l = s.split() if l == None or len(l) < 1: return l ret = {} for i in l: ret[i.lower()] = i.lower() return ret.values() def findEquiv(self, minLength, equiv): for l, m, i, s, fuzzy in self.data: if len(i) == 0 or len(s) == 0: continue si = self.toWordList(i) if len(si) == 0: continue ss = self.toWordList(s) if len(ss) == 0: continue for word in si: if self.trueStringLen(word) > minLength: countMap = {} if equiv.has_key(word): countMap = equiv[word] for corr in ss: if self.trueStringLen(corr) > minLength: count = 0 if countMap.has_key(corr): count = countMap[corr] countMap[corr] = count + 1 equiv[word] = countMap return equiv def __read_lines_thread(self, child_out): self.read_lines_buffer = child_out.readlines() return 0 def spell(self, dict = {}): from popen2 import popen4 from threading import Thread child_out, child_in = popen4(self.spellCommand) read_lines_thread = Thread(target=self.__read_lines_thread, args=(child_out,)); read_lines_thread.start() x = self.getCleanMsgstr() child_in.write(x) child_in.close() read_lines_thread.join() words = self.read_lines_buffer child_out.close() wse = dict.copy() for word in self.spellExtra: wse[word] = word ws = {} for word in words: word = word[:-1] if not wse.has_key(word): ws[word] = word self.spellErrors = ws.keys() return 1 def glossary(self, glossary): self.glossaryErrors = [] msg = 0 for line, message, msgid, msgstr, fuzzy in self.data: msg = msg + 1 words = msgid.split(' ') # Should cover more cases than this. for word in words: error = 0 # If it's not on the glossary, then it's not wrong. try: lword = word.lower() if (glossary[lword]): error = 1 translations = glossary[lword] for translation in translations: if (msgstr.decode('utf-8').lower().find(translation.lower()) > -1): error = 0 break except KeyError: pass if (error == 1): self.glossaryErrors.append((line, msg, word)) return 1 def consistency(self, map, strip): if self.parse() == 0: return 0 self.parseHeader() for line, message, msgid, msgstr, fuzzy in self.data: if self.ignoreFuzzy and fuzzy: msgstr = '' if len(msgid) > 0 and not(msgid in self.ignoreConsistency): for i in strip: msgstr = msgstr.replace(i, '') msgid = msgid.replace(i, '') for i in self.consistencyAlias: msgstr = msgstr.replace(i[0], i[1]) msgid = msgid.replace(i[0], i[1]) cmsgid = map.get(msgid) add = (self.filename, message) if cmsgid == None: map[msgid] = { msgstr: [add,] } else: cmsgstr = cmsgid.get(msgstr) if cmsgstr == None: cmsgid[msgstr] = [add,] else: cmsgstr.append(add) return 1 def check(self): self.errors = [] msg = 0 for l, m, i, s, fuzzy in self.data: msg = msg + 1 if len(i) == 0 or len(s) == 0: continue if fuzzy and self.ignoreFuzzy: continue if self.enableCheckAccelerator: self.checkAccelerator(i, s, l, msg, self.accelerator) if self.enableCheckCapitalization: self.checkCapitalization(i, s, l, msg) if self.enableCheckEndPontuation: self.checkEndPontuation(i, s, l, msg) if len(s) > 1 and s[:2] == "_:": self.errors.append((l, msg, '_: on msgstr')) if s[-1] == "<" and i[-1] != '<': self.errors.append((l, msg, '< trailling msgstr')) if i.count('\\n') == 0 and s.count('\\n') > 0: self.errors.append((l, msg, 'extra \\n')) if self.enableCheckLineLength: self.checkLineLength(s, l, msg, self.enableCheckLineLength, single_lines = 1) def checkAccelerator(self, i, s, pos, msg, acc): if i.count(acc) == 1 and i.count(acc + ' ') == 0 and s.count(acc) == 0: self.errors.append((pos, msg, 'missing %s acelerator' % acc)) if i.count(acc) == 1 and i.count(acc + ' ') == 0 and s.count(acc) > 1: self.errors.append((pos, msg, 'extra %s acelerator' % acc)) if i.count(acc) == 0 and s.count(acc) == 1: self.errors.append((pos, msg, 'extra %s acelerator' % acc)) def checkCapitalization(self, i, s, pos, msg): if i.startswith("_: NAME OF TRANSLATORS"): return if i.startswith("_: EMAIL OF TRANSLATORS"): return ic = capitalization.capitalization(i, (), ('to',)) if ic != capitalization.CAP_UNKNOWN: sc = capitalization.capitalization(s, (), ('de', 'do', 'da', 'dos', 'das', 'o', 'a', 'e', 'os', 'as', 'pelo', 'para')) if sc != ic: self.errors.append((pos, msg, 'capitalization error')) def checkEndPontuation(self, i, s, pos, msg): if i[-1] == ':' and s[-1] != ':': self.errors.append((pos, msg, 'missing :')) if len(i) > 1 and len(s) > 1 and i[-2:] == ": " and s[-2:] != ": ": self.errors.append((pos, msg, 'missing : ')) if len(i) > 2 and len(s) > 2 and i[-3:] == "..." and s[-3:] != "...": self.errors.append((pos, msg, 'missing ...')) elif i[-1] == '.' and s[-1] != '.': self.errors.append((pos, msg, 'missing .')) def checkLineLength(self, line, pos, msg, limit, single_lines): linesplit = line.split('\\n') if len(linesplit) > 1: il = 0 for f in linesplit: il = il + 1 if len(f) > limit: lenf = self.trueStringLen(f) if lenf > limit: self.errors.append((pos, msg, '%d > %d chars [line %d]' % (lenf, limit, il))) elif single_lines: f = linesplit[0] if len(f) > limit: lenf = self.trueStringLen(f) if lenf > limit: self.errors.append((pos, msg, '%d > %d chars' % (lenf, limit))) def trueStringLen(self, f): unicode = 0 for i in f: if ord(i) > 127: unicode = unicode + 1 return len(f) - unicode / 2 def getMsgstr(self): msgstr = '' for l, m, i, s, fuzzy in self.data: if i != "": msgstr = msgstr + s + '\n' return msgstr def searchWordInText(self, wordToFind, textToSearch, context, index): x = textToSearch.find(wordToFind, index) if x < 0: return (x, None) lwf = len(wordToFind) lts = len(textToSearch) if x > 0 and textToSearch[x - 1] in string.letters: return (x, None) if x < lts - lwf - 1 and textToSearch[x + lwf] in string.letters: return (x, None) xa, ea = x - context, '...' if xa < 0: xa, ea = 0, '' xb, eb = x + lwf + context, '...' if xb > lts: xb, eb = lts, '' return (x, ea + textToSearch[xa:xb] + eb) def searchInMsgstr(self, text, context = 10): r = [] for l, m, i, s, fuzzy in self.data: if i != "": index = -1 while 1: index, ctx = self.searchWordInText(text, s, context, index + 1) if index < 0: break if ctx != None: r.append((l, m, ctx)) return r def getCleanMsgstr(self): s = self.getMsgstr() space = ('\\n', '\\t') empty = ('&', '_') import re s = re.sub('&[^;]*;', ' ', s) s = re.sub('<[^>]*>', ' ', s) s = re.sub('<[^>]*/>', ' ', s) s = re.sub(']*>', ' ', s) for t in space: s = s.replace(t, ' ') for t in empty: s = s.replace(t, '') return s def getTmp(self): msgstr = '' htmltags = ('ol', 'p', 'qt', 'br', 'li', 'ul', 'strong', 'b', 'i', 'em') for l, m, i, s, fuzzy in self.data: if i != "": s = s.replace('\\n', ' ').replace('&', '') for t in htmltags: s = (s.replace('<%s>' % t, ' '). replace('' % t, ' '). replace('<%s/>' % t, ' ')) msgstr = msgstr + s + ' ' return msgstr def getErrors(self): return self.errors def hasErrors(self): return len(self.errors) > 0 class POTFile(POFile): def __init__(self, filename): POFile.__init__(self, filename) def check(self): self.errors = [] for l, m, i, s, fuzzy in self.data: if len(i) == 0: continue req = capitalization.requiredCapitalization(i) cap = capitalization.capitalization(i) if req != capitalization.CAP_UNKNOWN and req != cap: self.errors.append((l, m, 'wrong capitalization - %s' % i)) gettext-lint-0.4/src/POFileChecker.in0000755000175000017500000000455510153663163016211 0ustar joaojoao#!@PYTHON@ # -*- mode: Python; coding: utf-8; -*- # PO file checker # # Pedro Morais # José Nuno Pires # (c) Copyright 2003, 2004 # Distributable under the terms of the GPL - see COPYING import sys import getopt if not "@prefix@/share/@PACKAGE@" in sys.path: sys.path.append("@prefix@/share/@PACKAGE@") import POFile from util import Output def usage(code = -1): w = sys.stderr.write w('Usage: POFileChecker [OPTION] ...\n') w('\n') w('Options:\n') w(' -h, --help show this help\n') w(' -t, --pot pot file mode\n') w(' -f, --ignore-fuzzy don\'t check fuzzy translations\n') sys.exit(code) try: opts, args = getopt.getopt(sys.argv[1:], "htf", ["help", "pot", "ignore-fuzzy"]) except getopt.GetoptError: usage() ignoreFuzzy = 0 potMode = 0 for o, a in opts: if o in ("-h", "--help"): usage(0) if o in ("-f", "--ignore-fuzzy"): ignoreFuzzy = 1 if o in ("-t", "--pot"): potMode = 1 if len(args) < 1: usage() if potMode: out = Output("pot-file-checker") for filename in args: pot = POFile.POTFile(filename) if pot.parse() == 0: sys.stderr.write('error parsing file %s\n' % filename) else: pot.check() if len(pot.errors) > 0: out.opentag('file', {'name': filename}) for l, m, e in pot.errors: out.opentag('error', {'line': str(l), 'message': str(m)}, body = e, close = 1) out.closetag() out.finish() else: out = Output("po-file-checker") for filename in args: po = POFile.POFile(filename) if po.parse() == 0: sys.stderr.write('error parsing file %s\n' % filename) else: po.ignoreFuzzy = ignoreFuzzy po.parseHeader() po.check() if po.allowCount == None: po.allowCount = 0 if len(po.errors) != po.allowCount: out.opentag('file', {'name': filename, 'allow': str(po.allowCount)}) for l, m, e in po.errors: out.opentag('error', {'line': str(l), 'message': str(m)}, body = e, close = 1) out.closetag() out.finish() gettext-lint-0.4/src/POFileClean.in0000644000175000017500000000260510451271121015644 0ustar joaojoao#!@PYTHON@ # -*- mode: Python; coding: utf-8; -*- # Resets the msgstr for situations where it's just a copy of msgid # # Pedro Morais # José Nuno Pires # João Miguel Neves # (c) Copyright 2003 - 2006 # Distributable under the terms of the GPL - see COPYING import sys import getopt if not "@prefix@/share/@PACKAGE@" in sys.path: sys.path.append("@prefix@/share/@PACKAGE@") from POFile import POFile def usage(code = -1): w = sys.stderr.write w('Usage: POFileClean