mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Simplify POTFILES.in generation
As part of this also: - Drop POTFILIES.ignore. Relevant lines have been moved to POTFILES.skip - Remove skip lines for scm file links. With intltool out of the way these are never picked up any more.
This commit is contained in:
parent
c29b9c9cbf
commit
f111e5958d
@ -27,7 +27,7 @@ FOREACH(lingua ${ALL_LINGUAS})
|
||||
ENDFOREACH()
|
||||
|
||||
SET_LOCAL_DIST(po_DIST_local ${po_SOURCES} CMakeLists.txt ChangeLog Makevars
|
||||
POTFILES.ignore POTFILES.in POTFILES.skip README gnucash-pot.cmake)
|
||||
POTFILES.in POTFILES.skip README gnucash-pot.cmake)
|
||||
SET(po_DIST ${po_DIST_local} ${po_glossary_DIST} PARENT_SCOPE)
|
||||
|
||||
FOREACH(lingua ${ALL_LINGUAS})
|
||||
@ -71,46 +71,37 @@ ENDFUNCTION()
|
||||
|
||||
|
||||
FUNCTION(MAKE_GNUCASH_POTFILES)
|
||||
|
||||
SET(IGNORE_PATTERNS "gw-" "test" "experimental" "python-bindings" "swig-.*\\.c")
|
||||
|
||||
# Create a list of candidate translation files
|
||||
FILE(GLOB_RECURSE FILES_IN RELATIVE ${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/*.c ${CMAKE_SOURCE_DIR}/*.cpp ${CMAKE_SOURCE_DIR}/*.glade ${CMAKE_SOURCE_DIR}/*.desktop.in
|
||||
${CMAKE_SOURCE_DIR}/*.keys.in ${CMAKE_SOURCE_DIR}/*.gschema.xml.in ${CMAKE_SOURCE_DIR}/*.scm)
|
||||
file (GLOB_RECURSE FILES_IN RELATIVE ${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/*.c ${CMAKE_SOURCE_DIR}/*.cpp
|
||||
${CMAKE_SOURCE_DIR}/*.glade ${CMAKE_SOURCE_DIR}/*.desktop.in.in
|
||||
${CMAKE_SOURCE_DIR}/*.gschema.xml.in ${CMAKE_SOURCE_DIR}/*.appdata.xml.in
|
||||
${CMAKE_SOURCE_DIR}/*.keys.in ${CMAKE_SOURCE_DIR}/*.scm
|
||||
${CMAKE_SOURCE_DIR}/*/qofbookslots.h
|
||||
)
|
||||
|
||||
# Only consider files in the common, libgnucash, and gnucash/ directories. Also check against list of ignore patterns
|
||||
SET(FILES "")
|
||||
FOREACH(path ${FILES_IN})
|
||||
STRING(REGEX MATCH "^(bindings/|common/|borrowed/|libgnucash/|gnucash/)" IS_SRC ${path})
|
||||
IF (IS_SRC)
|
||||
SET(IS_IGNORED FALSE)
|
||||
FOREACH(pattern ${IGNORE_PATTERNS})
|
||||
STRING(REGEX MATCH ${pattern} YES_IGNORE ${path})
|
||||
IF (YES_IGNORE)
|
||||
SET(IS_IGNORED TRUE)
|
||||
ENDIF()
|
||||
ENDFOREACH(pattern)
|
||||
IF (NOT IS_IGNORED)
|
||||
LIST(APPEND FILES ${path})
|
||||
ENDIF(NOT IS_IGNORED)
|
||||
ENDIF(IS_SRC)
|
||||
ENDFOREACH(path)
|
||||
# Only consider files in a selection of the source directories and
|
||||
# additionally check against list of ignore patterns
|
||||
set (GOOD_FILES "")
|
||||
foreach (path ${FILES_IN})
|
||||
if (${path} MATCHES "^(bindings/|borrowed/|common/|doc/|libgnucash/|gnucash/)"
|
||||
AND
|
||||
NOT ${path} MATCHES "gw-|test|experimental|python-bindings|swig-.*\\.c")
|
||||
list (APPEND GOOD_FILES ${path})
|
||||
endif ()
|
||||
endforeach (path)
|
||||
|
||||
# Read in list of paths to skip from POTFILES.{skip,ignore}
|
||||
# Remove the paths that we have marked as explicitly skipped
|
||||
READ_FILE_REMOVING_COMMENTS(SKIP_LINES POTFILES.skip)
|
||||
READ_FILE_REMOVING_COMMENTS(IGNORE_LINES POTFILES.ignore)
|
||||
|
||||
# Remove the paths that are skipped or ignored
|
||||
FOREACH(path ${SKIP_LINES} ${IGNORE_LINES})
|
||||
list(REMOVE_ITEM FILES ${path})
|
||||
ENDFOREACH()
|
||||
foreach (path ${SKIP_LINES})
|
||||
list(REMOVE_ITEM GOOD_FILES ${path})
|
||||
endforeach ()
|
||||
|
||||
|
||||
# CMake sorting is different from UNIX sorting. Use perl to
|
||||
# sort POTFILES.in universally. This may no longer be needed
|
||||
# now we have dropped autotools support.
|
||||
STRING(REPLACE ";" "\n" SORT_IN "${FILES}")
|
||||
STRING(REPLACE ";" "\n" SORT_IN "${GOOD_FILES}")
|
||||
SET(SORT_IN "${SORT_IN}\n")
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in.in "${SORT_IN}")
|
||||
|
||||
@ -120,13 +111,6 @@ FUNCTION(MAKE_GNUCASH_POTFILES)
|
||||
)
|
||||
STRING(REPLACE "\n" ";" POTFILES "${POTFILES_IN}")
|
||||
|
||||
# These are manually added, because they're not picked up by the generation script
|
||||
list(APPEND POTFILES
|
||||
"gnucash/gnome/gnucash.appdata.xml.in"
|
||||
"gnucash/gnome/gnucash.desktop.in.in"
|
||||
"libgnucash/engine/qofbookslots.h"
|
||||
"doc/tip_of_the_day.list.c")
|
||||
|
||||
# Write out the final list.
|
||||
# intltool-update insists that this file be in the source directory. :-(
|
||||
SET(POTFILES_IN_PATH ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in)
|
||||
|
@ -1,10 +0,0 @@
|
||||
# Work around the intltool-0.35.5 / automake-1.10 failures
|
||||
# due to "missing" files. These files may be distributed.
|
||||
gnucash/gnome/gnucash.desktop.in.in
|
||||
gnucash/gnome/gnucash.desktop.in
|
||||
libgnucash/engine/iso-4217-currencies.c
|
||||
# The features in import-export/qif are still unused.
|
||||
gnucash/import-export/qif/qif-defaults.c
|
||||
gnucash/import-export/qif/qif-parse.c
|
||||
# This file is autogenerated, so it's only in the tree after an in-source build:
|
||||
gnucash/gnome-utils/gnc-warnings.c
|
@ -33,6 +33,7 @@ borrowed/libc/libc-missing-noop.c
|
||||
borrowed/libc/setenv.c
|
||||
borrowed/libc/strfmon.c
|
||||
borrowed/libc/strptime.c
|
||||
doc/tip_of_the_day.list.c
|
||||
gnucash/gnome/assistant-acct-period.c
|
||||
gnucash/gnome/assistant-hierarchy.c
|
||||
gnucash/gnome/assistant-loan.c
|
||||
@ -84,6 +85,8 @@ gnucash/gnome/gnc-plugin-register2.c
|
||||
gnucash/gnome/gnc-plugin-register.c
|
||||
gnucash/gnome/gnc-split-reg2.c
|
||||
gnucash/gnome/gnc-split-reg.c
|
||||
gnucash/gnome/gnucash.appdata.xml.in
|
||||
gnucash/gnome/gnucash.desktop.in.in
|
||||
gnucash/gnome/gtkbuilder/assistant-acct-period.glade
|
||||
gnucash/gnome/gtkbuilder/assistant-hierarchy.glade
|
||||
gnucash/gnome/gtkbuilder/assistant-loan.glade
|
||||
@ -667,6 +670,7 @@ libgnucash/engine/kvp-value.cpp
|
||||
libgnucash/engine/policy.c
|
||||
libgnucash/engine/qof-backend.cpp
|
||||
libgnucash/engine/qofbook.cpp
|
||||
libgnucash/engine/qofbookslots.h
|
||||
libgnucash/engine/qofchoice.cpp
|
||||
libgnucash/engine/qofclass.cpp
|
||||
libgnucash/engine/qofevent.cpp
|
||||
@ -704,7 +708,3 @@ libgnucash/tax/us/txf-help-de_DE.scm
|
||||
libgnucash/tax/us/txf-help.scm
|
||||
libgnucash/tax/us/txf.scm
|
||||
libgnucash/tax/us/us.scm
|
||||
gnucash/gnome/gnucash.appdata.xml.in
|
||||
gnucash/gnome/gnucash.desktop.in.in
|
||||
libgnucash/engine/qofbookslots.h
|
||||
doc/tip_of_the_day.list.c
|
||||
|
103
po/POTFILES.skip
103
po/POTFILES.skip
@ -1,106 +1,15 @@
|
||||
# These are files that we don't want to translate, because they are
|
||||
# not distributed.
|
||||
libgnucash/backend/xml/gncmod-backend-xml.c
|
||||
libgnucash/backend/xml/gncmod-backend-xml.cpp
|
||||
gnucash/gnome-utils/gnc-tree-model-selection.c
|
||||
|
||||
# This file is only an example for programmers and never called:
|
||||
libgnucash/gnc-module/example/gnc-plugin.example.c
|
||||
|
||||
# Skip softlinks to scm files. These softlinks are created in builddir
|
||||
# for testing purposes, intltool-extract isn't smart enough to ignore
|
||||
# them when bulddir and srcdir are the same, and both intltool-extract
|
||||
# and intltool-update use absolute paths to the srcdir when it's not
|
||||
# the same as builddir which messes up the file names in gnucash.pot.
|
||||
# The features in import-export/qif are still unused.
|
||||
gnucash/import-export/qif/qif-defaults.c
|
||||
gnucash/import-export/qif/qif-parse.c
|
||||
|
||||
libgnucash/app-utils/gnucash/app-utils.scm
|
||||
libgnucash/app-utils/gnucash/gettext.scm
|
||||
libgnucash/app-utils/test/test-load-app-utils-module.scm
|
||||
libgnucash/core-utils/gnucash/core-utils.scm
|
||||
libgnucash/engine/gnucash/business-core.scm
|
||||
libgnucash/engine/gnucash/engine.scm
|
||||
libgnucash/gnc-module/gnucash/gnc-module.scm
|
||||
gnucash/gnome-utils/gnucash/gnome-utils.scm
|
||||
gnucash/import-export/qif-imp/gnucash/import-export/qif-import.scm
|
||||
gnucash/import-export/qif-imp/qif-import/qif-dialog-utils.scm
|
||||
gnucash/import-export/qif-imp/qif-import/qif-file.scm
|
||||
gnucash/import-export/qif-imp/qif-import/qif-guess-map.scm
|
||||
gnucash/import-export/qif-imp/qif-import/qif-import.scm
|
||||
gnucash/import-export/qif-imp/qif-import/qif-merge-groups.scm
|
||||
gnucash/import-export/qif-imp/qif-import/qif-objects.scm
|
||||
gnucash/import-export/qif-imp/qif-import/qif-parse.scm
|
||||
gnucash/import-export/qif-imp/qif-import/qif-to-gnc.scm
|
||||
gnucash/import-export/qif-imp/qif-import/qif-utils.scm
|
||||
gnucash/report/business-reports/gnucash/report/aging.scm
|
||||
gnucash/report/business-reports/gnucash/report/balsheet-eg.eguile.scm
|
||||
gnucash/report/business-reports/gnucash/report/balsheet-eg.scm
|
||||
gnucash/report/business-reports/gnucash/report/business-reports.scm
|
||||
gnucash/report/business-reports/gnucash/report/customer-summary.scm
|
||||
gnucash/report/business-reports/gnucash/report/easy-invoice.scm
|
||||
gnucash/report/business-reports/gnucash/report/fancy-invoice.scm
|
||||
gnucash/report/business-reports/gnucash/report/invoice.scm
|
||||
gnucash/report/business-reports/gnucash/report/job-report.scm
|
||||
gnucash/report/business-reports/gnucash/report/owner-report.scm
|
||||
gnucash/report/business-reports/gnucash/report/payables.scm
|
||||
gnucash/report/business-reports/gnucash/report/receipt.eguile.scm
|
||||
gnucash/report/business-reports/gnucash/report/receipt.scm
|
||||
gnucash/report/business-reports/gnucash/report/receivables.scm
|
||||
gnucash/report/business-reports/gnucash/report/taxinvoice.eguile.scm
|
||||
gnucash/report/business-reports/gnucash/report/taxinvoice.scm
|
||||
gnucash/report/locale-specific/us/gnucash/report/locale-specific/de_DE.scm
|
||||
gnucash/report/locale-specific/us/gnucash/report/locale-specific/us.scm
|
||||
gnucash/report/locale-specific/us/gnucash/report/taxtxf-de_DE.scm
|
||||
gnucash/report/locale-specific/us/gnucash/report/taxtxf.scm
|
||||
gnucash/report/report-gnome/gnucash/report/report-gnome.scm
|
||||
gnucash/report/report-system/gnucash/report/eguile-gnc.scm
|
||||
gnucash/report/report-system/gnucash/report/eguile-html-utilities.scm
|
||||
gnucash/report/report-system/gnucash/report/eguile-utilities.scm
|
||||
gnucash/report/report-system/gnucash/report/report-system.scm
|
||||
gnucash/report/report-system/gnucash/report/report-system/collectors.scm
|
||||
gnucash/report/report-system/gnucash/report/report-system/list-extras.scm
|
||||
gnucash/report/report-system/gnucash/report/report-system/report-collectors.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/account-piecharts.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/account-summary.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/advanced-portfolio.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/average-balance.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/balance-sheet.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/budget-balance-sheet.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/budget-barchart.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/budget-flow.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/budget-income-statement.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/budget.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/cash-flow.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/cashflow-barchart.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/category-barchart.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/daily-reports.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/equity-statement.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/general-journal.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/general-ledger.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/income-gst-statement.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/income-statement.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/net-barchart.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/net-linechart.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/portfolio.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/price-scatter.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/register.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/sx-summary.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/transaction.scm
|
||||
gnucash/report/standard-reports/gnucash/report/standard-reports/trial-balance.scm
|
||||
gnucash/report/stylesheets/gnucash/report/stylesheet-easy.scm
|
||||
gnucash/report/stylesheets/gnucash/report/stylesheet-fancy.scm
|
||||
gnucash/report/stylesheets/gnucash/report/stylesheet-footer.scm
|
||||
gnucash/report/stylesheets/gnucash/report/stylesheet-head-or-tail.scm
|
||||
gnucash/report/stylesheets/gnucash/report/stylesheet-plain.scm
|
||||
gnucash/report/stylesheets/gnucash/report/stylesheets.scm
|
||||
gnucash/report/utility-reports/gnucash/report/hello-world.scm
|
||||
gnucash/report/utility-reports/gnucash/report/utility-reports.scm
|
||||
gnucash/report/utility-reports/gnucash/report/view-column.scm
|
||||
gnucash/report/utility-reports/gnucash/report/welcome-to-gnucash.scm
|
||||
libgnucash/scm/build-config.scm
|
||||
libgnucash/scm/build-config.scm.in
|
||||
libgnucash/scm/gnucash/main.scm
|
||||
libgnucash/scm/gnucash/price-quotes.scm
|
||||
libgnucash/scm/gnucash/printf.scm
|
||||
libgnucash/tax/us/gnucash/tax/de_DE.scm
|
||||
libgnucash/tax/us/gnucash/tax/us.scm
|
||||
# These files are autogenerated, and hence not distributed
|
||||
gnucash/gnome-utils/gnc-warnings.c
|
||||
libgnucash/engine/iso-4217-currencies.c
|
||||
|
Loading…
Reference in New Issue
Block a user