Commit Graph

67 Commits

Author SHA1 Message Date
Mike Alexander
2d3e80ea08 Compatibility with XCode's "new build system"
With XCode 14 or newer CMake tries to use the "new build system" which has a
requirement that if two targets depend on the same generated file one of them
must depend on the other.  This commit adds reduntant dependencies to satisfy
this requirement.
2022-10-09 01:10:06 -04:00
Simon Arlott
07dcaf116a L10N:new en_AU, en_NZ 2022-06-25 15:22:06 +02:00
Frank H. Ellenberger
c272bc45d9 I18N: Add POTFILES.ignore
assistant-stock-transaction needs polishing before
translation
2022-06-21 00:26:19 +02:00
Frank H. Ellenberger
0b258e35de Goodbye Translationproject! 2021-12-21 03:05:56 +01:00
Frank H. Ellenberger
227159d812 L10N:pt: move from translationproject to weblate 2021-12-17 03:33:22 +01:00
Frank H. Ellenberger
2e6ff09746 Drop Makevars - an autotools artefact for gettext
It offered only a subset of the parameters we are using in
po/CMakeLists.txt and the duplicate definition was confusing
2021-06-30 17:39:36 +02:00
Frank H. Ellenberger
66d4e6d6b0 Language zh_CN moves from TP to weblate 2021-04-09 04:01:02 +02:00
Geert Janssens
0c15dc175c Fix building based on unix makefiles
There are a few subtle differences between unix makefiles and ninja
that sometimes go uncaught as the core devs usually use ninja.
This commit fixes two:
- don't depend directly on files in other source/binary directories.
  Use a custom target to depend on instead
- recursively create target directories, as make doesn't automatically
2021-03-23 16:33:56 +01:00
Geert Janssens
09ff2e5483 Eliminate redundant mo files
They were generated fist in builddir/po to then be copied
to builddir/share/locale/...
The intermediate in builddir/po is redundant.
2021-03-23 15:41:08 +01:00
Frank H. Ellenberger
7c7d2b1323 L10N: tr is now marked external at TP
Before we got a request from weblate.
2021-02-10 00:17:49 +01:00
Frank H. Ellenberger
89af57102b ja left the Translation Project 2020-12-26 22:32:02 +01:00
Frank H. Ellenberger
93f500bd4d Move pt translation to Translation Project
https://lists.gnucash.org/pipermail/gnucash-devel/2020-November/045581.html
2020-11-27 16:56:19 +01:00
John Ralls
b8ccb71ca5 Add new languages Estonian and Indonesian to GC_LINGUAS. 2020-09-27 11:45:20 -07:00
Frank H. Ellenberger
5de41abc9e L10N🆔 Internal fixes
on the headers of both catalogs,
 mark id as new in LINGUAS
2020-09-17 20:11:23 +02:00
Frank H. Ellenberger
7f64cceeea Merge L10N_et into maint ...
Fix the copyright line and update from a fresh pot:
487 translated messages, 11 fuzzy translations, 5031 untranslated
messages.
2020-09-12 00:55:13 +02:00
triyanwn
bc7533c6f1 Indonesian translation for GnuCash 2020-09-05 11:43:46 +07:00
Frank H. Ellenberger
d9b652de45 L10N:et: Create Estonian translation
Only filled with common parts from GOffice and GTK
2020-08-29 06:18:55 +02:00
Geert Janssens
809ea8dbf9 Mark Dutch translation as non-TP managed 2020-08-18 15:30:03 +02:00
Frank H. Ellenberger
5bf009a9b5 I18N: update LINGUAS
TP has no longer an az team, all NEW_LINGUAS were reported.
2020-07-05 19:34:01 +02:00
c-holtermann
41dc6ddbe2 implement gettext localization for python
make gnc_path_get_localedir() and GETTEXT_PACKAGE available for python
to access locales. Import gettext module to provide _ as translator
method. Provide null _-method returning english text in case of missing gettext.
Make a lot of messages translatable by adding _-method. Include python
files to create .pot-files.
2020-05-28 18:41:34 +02:00
John Ralls
c12ae077f7 Exclude mock files from translation. 2020-05-24 13:45:32 -07:00
Geert Janssens
8243496ed0 Rework our gettext tests
- only abort configuration if gettext is older than 0.18.1 (required for string extraction from scheme files)
- otherwise always continue but disable a few other build steps depending on the gettext version
- use feature variables to more clearly convey what is enabled or disabled
2020-02-08 13:19:23 +01:00
Geert Janssens
90e95ba8ef CMake - remove parameter repetition in else() and endif() statements - part 2
This follows Professional CMake's recommended practises
I missed plenty of these in my first commit. This one should fix
these remaining occurrences.
2020-02-06 16:16:36 +01:00
Geert Janssens
d8a304c2c9 Housekeeping - reduce the number of PACKAGE and VERSION related cmake variables
This starts by setting the gnucash version number in the 'project' call.
This will result in a number of variables set by cmake. The remainder
of this commit is to reuse the auto-generated
PROJECT_NAME, PROJECT_VERSION, PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH and PROJECT_VERSION_TWEAK
instead of all the various instances of PACKAGE, GNUCASH_MAJOR_VERSION
and so on.

One parameter is worth mentioning - GETTEXT_PACKAGE
GnuCash is not using this directly (any more) but it has to be set before
including gi18n-lib.h.
2020-01-17 18:15:27 +01:00
Christian Stimming
d9345c1691 Minor translation improvements
- Glossary needs "aging" as term
- Header gnc-commodity.h contains translatable strings
2019-12-30 00:39:11 +01:00
Geert Janssens
54dae108a6 Properly mark the renamed appdata.xml.in.in for translation 2019-08-26 19:01:38 +02:00
Geert Janssens
8447f42674 Bug 797126 - It is annoying to run cmake to get an updated mo file
Add missing dependency in order to make the po-gmo and po-gmo-build targets acually work.
2019-05-27 14:50:36 +02:00
Geert Janssens
b7479e8fb0 Bump minimum cmake version to 3.5
This version is available for all supported platforms and distros
(CentOS can have a version via EPEL, which is required anyway)

Advantages:
- one cmake version for all platforms
- we can drop all conditions based on cmake version
2019-05-25 12:04:51 +02:00
Frank H. Ellenberger
b4ae45d556 Drop po/ChangeLog
It is no longer required by make dist.
Probably it was a requirement of IntlTool.
2019-04-26 18:13:27 +02:00
Frank H. Ellenberger
e3e11afcb5 [L12N] Romanian is now maintained by Translation Project
https://lists.gnucash.org/pipermail/gnucash-devel/2019-April/043701.html
2019-04-16 20:06:02 +02:00
Frank H. Ellenberger
33a376bddf add hr.po's to CMakeLists.txt 2019-02-22 22:37:14 +01:00
Geert Janssens
67174dd0b1 Prevent temporary editor files from being picked up for POTFILES.in generation
Aparently cmake's file glob also picks up hidden files and doesn't have
an easy way to avoid that.
2018-11-04 13:07:36 +01:00
Frank H. Ellenberger
295f8e38d8 Update LINGUAS explanation to the last version we had in autotools 2018-10-17 07:33:38 +02:00
Geert Janssens
a9f35ed7ae Lowercase cmake commands
A huge bikeshed fest but it distracted me enough to do it anyway.
2018-05-03 23:18:15 +02:00
Geert Janssens
13e6880b34 Bug 745941 - Review of po Headers / make pot 2018-03-01 18:31:49 +01:00
Geert Janssens
f111e5958d 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.
2018-02-28 13:40:20 +01:00
Geert Janssens
02c69a7933 Handle situation where gettext 0.19.6 is not available
By default we require gettext 0.19.6 as this is needed to generate a translated version of gnucash.desktop and gnucash.appdata.xml.
However this version is not available on some platforms (most notably our own ubuntu 14.04LTS travis instance).
By setting ALLOW_OLD_GETTEXT=ON, the build configuration falls back to generating untranslated versions of said files instead.
2018-02-27 22:38:27 +01:00
Geert Janssens
ba799feb2a Drop intltool in favour or using modern gettext
This requires at least gettext 0.19.6, and will break our ubuntu 14.04LTS test instance on Travis.
The next commit will work around this.
2018-02-27 22:30:06 +01:00
Geert Janssens
61a21d12c6 Look for user editable config files in gnc_userconfig_dir instead of gnc_userdata_dir
At present these are
- log.conf
- config-user.scm (previously config.user-2.0)

Implement one-time migration of these files to the proper directory if they previously exist
Look for a log.conf file in gnc_userconfig_dir instead of gnc_userdata_dir

Note this commit also uses boost::locale::translate for the first time.
We may need to fine-tune our use, but in the current state strings marked
for translation using that function are already picked up for gnucash.pot.
2018-02-24 20:39:26 +01:00
John Ralls
f4965ae2ac Move direct check dependencies to the originating CMakeLists.txt.
Removing transitive dependencies from being declared direct.
2018-02-18 22:16:27 -08:00
Geert Janssens
ff24970f5f Add GENERATE_SWIG_WRAPPERS option to control the generation of swig wrappers independently of whether we're building from git
The swig wrappers don't really depend on git (but rather on swig) and there can be
situations the builder wants to generate the wrappers also from a tar ball.
2018-01-31 16:16:59 +01:00
Geert Janssens
99ebeb6b5d gnucash.pot target improvements
- add simple target called 'pot' so translators can run 'make pot'
- make gnucash.pot depend on all files with translatable strings. So whenever
  one of these files is changed the potfile will automatically be regenerated
  (if the current target depends on it, like 'pot' or 'dist')

Note the default target (make without anything) does not depend on gnucash.pot
so the potfile will not automatically be (re)generated when building that target.
2018-01-29 21:51:38 +01:00
Geert Janssens
4317d8a8f6 Improve handling of generated distributable files
- the two dist_add_... macros now both take a list of file names
as argument so more files can be added at once to the dist tarball.
- dist_add_generated now creates the right target by itself. There's
  no need to pass one any more
- make the swig generated *.py module files explicit output files
- change a couple of custom_targets into custom_commands. The only
  reason they were defined as targets was to ensure they got built
  before the dist tarball. This is now properly handled by the
  dist_add_... macros.
- correctly handle dependency on swig-runtime.h (using OBJECT_DEPENDS
  was not the way to do it according to that property's help page)
2018-01-29 19:46:44 +01:00
Geert Janssens
3dff4e5211 Fix make dist on a clean checkout
cmake with unix makefiles fails to resolve dist dependencies
added from COPY_FROM_BUILD if these dependencies aren't built yet.

This commit replaces the COPY_FROM_BUILD based logic with two new functions
'dist_add_configured' and 'dist_add_generated' to indicate which files should
be included in the dist tarball. The latter also adds a target level dependency
to the dist tarball custom command. Hence the former should
be used for files that get generated during a cmake run while the latter
should be used for files generated as the result of a 'make/ninja-build' run
(like files for which an add_custom_command rule exists).

Note: this commit also temporarily disables the dist target when building
from a tarball (and hence it won't be tested in distcheck either). This
will be handled in a future commit.
2018-01-29 19:46:44 +01:00
Geert Janssens
1258a2adfd Make potfile generation a custom target, and make the dist target depend on it 2018-01-29 19:46:44 +01:00
Geert Janssens
85bfbd8e82 Some minor cleanups after the autotools removal
This includes removal of the now unused make-gnucash-potfiles.in,
checking for CMakeLists.txt rather than Makefile.am in gnc-vcs-info,
upating the HACKING file,
and generally updating references to autotools.

I have kept "Makefile.*" exclude patterns in our CMakeLists.txt files
because they may still be lingering in the source directory from
previous autogen.sh runs. At some point these should probably be
removed as well still, together with the gitignore references to them.
2018-01-26 18:22:48 +01:00
John Ralls
9b0a8723a4 More GNUInstallDirs path fixes. 2017-12-01 13:56:52 -08:00
Geert Janssens
545b24fe97 Merge branch maint into unstable
Resolved conflicts:
2017-10-05 16:29:36 +02:00
Geert Janssens
e56cb37813 Additional changes to use commit date rather than build date
This effectively replaces the use of GNUCASH_BUILD_DATE with GNUCASH_SCM_REV_DATE.
The latter is extracted from the current commit if building from some kind of vcs
(currently only works correctly for svn and git). The info extracted while building
from vcs is then also added to the dist tarball so it's available when building
from tarball as well (via the file libgnucash/core-utils/gnc-vcs-info.h).

The same date is also used to set the date in gnucash' man page document.
A practical detail: I have changed the substitution variables in the man page template
from @- -@ to ${} so we could leverage CONFIGURE_FILE in cmake. The necessary
related adjustments have also been made to Makefile.am's substitution rules.
2017-10-05 15:51:55 +02:00
Geert Janssens
7650d76582 Fix gnucash.pot generation from cmake build.
intltool-update should be run from the build directory, not the source directory.
If run from the source directory it will omit glade messages that have a context attribute
so all msgids with a msgctxt comment would be missing.
2017-10-03 22:56:35 +02:00