Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Makefile
.libs
.dirstamp
*.la
.cache
compile_commands.json

# make dist generated files
/README
Expand Down Expand Up @@ -57,6 +59,9 @@ Makefile
/manual/aspell.html/
/manual/aspell.info
/manual/texinfo.tex
/manual/mdate-sh
/manual/stamp-vti
/manual/version.texi
/missing
/myspell/Makefile.in
/po/Makefile.in
Expand Down
15 changes: 11 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ optfiles = \
modules/filter/html-filter.info\
modules/filter/context-filter.info\
modules/filter/nroff-filter.info\
modules/filter/texinfo-filter.info
modules/filter/texinfo-filter.info\
modules/filter/po-filter.info

### Add all your aspell mode files ###
fltfiles = \
Expand All @@ -196,7 +197,8 @@ fltfiles = \
modules/filter/modes/url.amf \
modules/filter/modes/comment.amf \
modules/filter/modes/nroff.amf\
modules/filter/modes/texinfo.amf
modules/filter/modes/texinfo.amf \
modules/filter/modes/po.amf

if COMPILE_IN_FILTERS

Expand All @@ -212,7 +214,8 @@ libaspell_la_SOURCES +=\
modules/filter/markdown.cpp\
modules/filter/context.cpp\
modules/filter/nroff.cpp\
modules/filter/texinfo.cpp
modules/filter/texinfo.cpp\
modules/filter/po.cpp

else # not COMPILE_IN_FILTERS

Expand All @@ -223,7 +226,7 @@ filter_ldflags = -module -avoid-version
### must look like lib<filtername>-filter.la see development manual
filter_LTLIBRARIES = email-filter.la tex-filter.la\
sgml-filter.la markdown-filter.la context-filter.la\
nroff-filter.la texinfo-filter.la
nroff-filter.la texinfo-filter.la po-filter.la

email_filter_la_SOURCES = modules/filter/email.cpp
email_filter_la_LIBADD = libaspell.la
Expand Down Expand Up @@ -253,6 +256,10 @@ texinfo_filter_la_SOURCES = modules/filter/texinfo.cpp
texinfo_filter_la_LIBADD = libaspell.la
texinfo_filter_la_LDFLAGS = ${filter_ldflags}

po_filter_la_SOURCES = modules/filter/po.cpp
po_filter_la_LIBADD = libaspell.la
po_filter_la_LDFLAGS = ${filter_ldflags}

### Before this line add the corresponding <yourfilterlibrary>_SOURCES and
### <yourfilterlibrary>_LIBADD lines. The later at least has to look
### like <yourfilterlibrary>_LIBADD = ${top_builddir}/lib/libaspell.la
Expand Down
18 changes: 18 additions & 0 deletions manual/aspell.texi
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,24 @@ The Texinfo filter will also skip over the @samp{\input texinfo} line.

@end table

@subsubsection PO gettext Filter

The @option{po} filter allows you to spell check GNU @code{gettext}
@code{po} files. It will skip the header section, @code{msgid},
@code{msgid_plural}, @code{msgctxt}, translator comments, extracted comments,
references, flags and previous untranslated strings.

The filter is tailored to translators. We offer an option to review the
msgid and mssgid strings, but not the other strings.

@table @b
@item maintainer-mode
@i{(boolean)}
In this case, spellchecks only @code{msgid} and @code{msgid_plural}, filtering
out any other content from the file.

@end table

@subsubsection Nroff Filter

The @option{nroff} filter mode allows you to check the spelling of
Expand Down
10 changes: 10 additions & 0 deletions modules/filter/modes/po.amf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MODE po

ASPELL >=0.60.1

MAGIC /<noregex>/po

DESCRIPTION mode for checking gettext .po files

FILTER url
FILTER po
15 changes: 15 additions & 0 deletions modules/filter/po-filter.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# gettext po filter option file

#This Filter is usable with the following version(s) of Aspell
ASPELL >=0.51

#This line will be printed when typing `aspell help po'
DESCRIPTION filter to deal with gettext .po files

STATIC filter

OPTION maintainer-mode
TYPE bool
DESCRIPTION review only msgids
DEFAULT false
ENDOPTION
Loading