Add a warning for gettext < 0.20

They do not recognize <developer_name>GnuCash Project</developer_name>
in gnucash.appdata (https://savannah.gnu.org/bugs/?50408)
This commit is contained in:
Frank H. Ellenberger 2020-01-29 05:44:42 +01:00
parent e6b3c56568
commit ec7e6c37d1
2 changed files with 7 additions and 3 deletions

View File

@ -272,11 +272,12 @@ find_library (REGEX_LIBRARY NAMES regex)
if (ALLOW_OLD_GETTEXT)
find_package (Gettext REQUIRED)
else (ALLOW_OLD_GETTEXT)
find_package (Gettext 0.19.6)
find_package (Gettext 0.20)
if (NOT GETTEXT_FOUND)
message (FATAL_ERROR "Note the build can be configured with an older version of gettext by setting ALLOW_OLD_GETTEXT=ON but then some files will not be translated:
- gnucash.desktop (requires at least gettext 0.19)
- gnucash.appdata.xml (requires at least gettext 0.19.6)")
- gnucash.appdata.xml (requires at least gettext 0.19.6)
- tag developer_name from gnucash.appdata.xml (requires at least gettext 0.20)")
endif (NOT GETTEXT_FOUND)
endif (ALLOW_OLD_GETTEXT)
@ -286,6 +287,9 @@ endif ()
if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.19.6)
message (WARNING "Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.19.6 in order to handle translation of the gnucash.appdata file. The build will be configured with an untranslated gnucash.appdata file.")
endif ()
if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.20)
message (WARNING "Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.20 in order to handle the translation of 'GnuCash Project' from the gnucash.appdata file. That message will be missing in gnucash.pot.")
endif ()
find_path (LIBINTL_INCLUDE_PATH NAMES libintl.h
PATHS /usr/include /opt/gnome/include)

View File

@ -63,7 +63,7 @@ Libraries/Deps
guile 2.2.0 or 2.0.0 Must be built with regex
support enabled
libxml2 2.5.10
gettext 0.19.6 Can use older if you pass
gettext 0.20 Can use older if you pass
-DALLOW_OLD_GETTEXT to cmake;
doesn't include all file types
when building gnucash.pot.