All the .mo files had a dependency on the target directory, which meant that
every change to the timestamp of that directory caused all the files to be
remade; and each file remade caused a change to the directory's timestamp ...
Since CMake 3.0, "cmake -E make_directory" has been deprecated in favor of
"file(MAKE_DIRECTORY ...)", so use that instead of the custom command. This
means the directories are created when the cmake config is generated, instead
of during the subsequent make steps.
Note: the mo-update target which builds the .mo files is only run when the
build is configured with ENABLE_NLS=ON. Both before and after this change,
none of the .mo files are rebuilt when ENABLE_NLS=OFF.
This whole textdomain is dedicated to localized strings revolving around the
game's AI engine and the AI demos/test scenarios, with around 370 strings in
it.
Other than a few strings near the start of the catalogue template, none of these
have any value for regular players since they are sourced from AI demos and
test scenarios in data/ai/micro_ais/ and data/ai/scenarios/. None of them will
be displayed to people who aren't tinkering with WML or contributing to AI
development as part of the Wesnoth dev team, and some of the language used in
them is very technical in nature.
This commit leaves the "#textdomain wesnoth-ai" lines in the AI demos, but
drops the .po and .pot catalogues for wesnoth-ai. The few strings that are
seen by regular players move to the wesnoth-lib textdomain.
This creates an empty template catalogue so SCons will generate the
template catalogue and the translation catalogues on a subsequent
pot-update (if there isn't a pot file at all SCons won't attempt to do
anything with the textdomain at all).
[ci skip]
* GNUInstallDirs is the only Kitware-supported
way to change the default directories. Most
distributions have hooks for changing these
directories, which makes integrating wesnoth
easier and more consistent with the rest of
the CMake ecosystem.
* Make build system perfectly out-of-source
compatible. The build system should never
touch files in the source tree.
The LINGUAS used are a global thing, so it makes more sense to use
them, the LANGUAGES was used for testing, but since things seem stable
now use the proper way.
so far only the stuff in po/ is done, what has to be done next is add
the textdomain to the respective file and run a pot-update
the current po files are based on the files from the textdomain
'wesnoth' since this is where the strings currently reside, after the
pot-update only the relevant strings will be left
The last change caused a lot of files be updated with the only change
the pot-update header. In the Wesnoth wiki there was a hint to use
msgattrib to cleanup the changes poedit makes. Using this on the file
seems to give the wanted output, proper files and no "dummy" updates.
Ivanovic please test this change.
It seems when updating a po file it's not automatically line wrapped.
Use the same trick as autotools by writing to a temp file and move that
to the original.