Commit graph

66 commits

Author SHA1 Message Date
Gunter Labes
0fbe71cca8
Simplify pot generation
Use a standard sed invocation and avoid rewriting the file.
2024-08-05 21:49:23 +02:00
Gunter Labes
cf52b6bdd0 Fix mismatch between what gettext.w.o and wesnoth consider core textdomains
wesnoth-anl is pretty much an extraction of wesnoth-multiplayer which is core.
2024-04-09 21:10:27 +02:00
Ivo Julca
a56c3bdf83 build: Add wesnoth-tools domain 2023-06-14 09:58:56 +02:00
Ivo Julca
4d2cb1ce7f Build: Update scripts for .pot, .po files to support Python files
- Rewrites some of the commands to use Python.
- Also implements wmlxgettext --force-po, similar to xgettext.
2023-06-14 09:58:56 +02:00
Tahsin Jahin Khalid
2657730316 [WoF] update CMakeLists.txt to accept WoF 2022-04-29 16:52:12 -05:00
Steve Cotton
295abbb911 CMake: update the .po files before generating stats about them 2021-11-24 13:10:08 +01:00
Celtic Minstrel
f539deea1b Remove the wesnoth-test textdomain 2021-06-19 12:10:02 -05:00
Steve Cotton
eab006f02c CMake: avoid unnecessarily remaking all .mo files on each build
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.
2021-02-13 11:43:28 +01:00
Steve Cotton
a42600ffbe Remove the wesnoth-ai textdoman, move a few strings to wesnoth-lib (#4669)
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.
2020-10-01 10:29:39 +02:00
Iris Morelle
ee37e9fdd4 WC: Set up wesnoth-wc 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]
2020-08-27 22:40:06 -04:00
pentarctagon
388e4c00d9 Fix for newer cmake minimum version and some translation targets. 2020-07-30 13:17:22 -05:00
Pentarctagon
d4adce6c86 Explicitly use python3 in translations.
Ubuntu 20.04 no longer has the python link or python2 by default.
2020-05-03 22:46:19 -05:00
Iris Morelle
e8cc784ac2 Remove WoV's translation catalogues
Fixes #4699.
2020-01-11 11:03:45 -03:00
nemaara
73f2429041 Remove left over wesnoth-aoi translation things 2019-12-01 20:33:07 -05:00
Steve Cotton
c61b9b3b3f WoV: Set up for translations
The untranslated .po files have to be included, otherwise the build breaks.
2019-08-27 20:56:27 +02:00
loonycyborg
83da28b4aa No longer install .mo files for manual and manpages textdomains
But still build them just to check those po files for errors.
This fixes #3522
2019-03-30 15:40:03 +03:00
Celtic Minstrel
42c48d1483 Move wmlxgettext to the data/tools directory so that it's automatically included in official packages
(cherry-picked from commit 59e78e5565)
2018-10-07 03:24:58 +00:00
Victor Sergienko
c2a56b403e Hide minor translations (<80%) from language selection menu. (#2552)
@CelticMinstrel suggests we only use non-campaign textdomains without manpages.
2018-03-13 22:51:36 -04:00
Charles Dang
3a90f86674 Addressed more whitespace issues from #2613
[ci skip]
2018-03-12 03:48:59 +11:00
Charles Dang
471c9e876a Addressed a large chunk of the whitespace issues from #2613
[ci skip]
2018-03-09 11:37:00 +11:00
Gregory A Lundberg
5d7f268b59 Partially revert 321c350
Accidental revert of PR 2212 (whose commit is completely gone).
2017-11-20 10:52:06 -06:00
David Seifert
0e57d0840a Use GNUInstallDirs to specify directories
* 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.
2017-11-20 07:44:46 +02:00
Celtic Minstrel
f26fbe9aba Prevent gettext from checking format strings, since we don't use the printf family of functions 2017-05-29 22:50:35 -04:00
Nils Kneuper
f12bf3345f add wesnoth-sota to CMake list (allow compilation + pot-update) 2017-03-23 19:30:25 +01:00
aquileia
e1021b0ff6 po: Update cmake to use '-o' for output
The new Python wmlxgettext doesn't use UTF-8 for stdout
2016-05-03 21:30:30 +02:00
Espreon
3f20785d02 Split all of the AI-related strings (except for the AI controller's) into a new 'wesnoth-ai' textdomain. Includes a pot-update for 'wesnoth' as a side effect. 2013-05-22 22:19:43 -04:00
Mark de Wever
b29345492e When merging pot files use --previous.
Untested, Ivanovic please test whether it really works.
2011-03-27 22:05:48 +00:00
Nils Kneuper
dfd9b70697 try to use the same checks in the old makefiles for the po4a domains...
...as used by scons. (makefiles are probably not used anymore)

add the checks to the cmake mo stuff, too
2011-03-20 15:34:34 +00:00
Mark de Wever
68b92330dc Don't clean pot-update files.
Avoids deleting the pot files and the POTFILES.in.
2011-01-16 10:31:34 +00:00
Mark de Wever
14ad071a40 Polish the pot-update cmake target. 2011-01-16 10:31:31 +00:00
Mark de Wever
6554bc6897 Remove the cmake dummy target update-po4a.
The command did nothing at all.
2011-01-16 10:31:28 +00:00
Mark de Wever
2b9ddcea2c Formatting cleanup of cmake files. 2011-01-16 10:31:25 +00:00
Mark de Wever
4e4f42d60c Remove an unused cmake file. 2011-01-16 10:31:22 +00:00
Mark de Wever
4997fe436c Use the global LINUGAS instead of local LANGUAGES.
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.
2011-01-08 11:44:32 +00:00
Mark de Wever
14db2d8b01 Move pot-update dependencies in a separate file.
This allows to move the po4a update tools in the same file and keep the
dependencies better together.
2011-01-02 18:50:00 +00:00
Nils Kneuper
2f8d25ca7e create textdomain wesnoth-help (part1)
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
2010-12-22 11:34:44 +00:00
Nils Kneuper
8d20b1bca7 import the Dead Water translations from wescamp...
...(using http://svn.berlios.de/viewcvs/wescamp-i18n/branches/1.8/Dead_Water/)
2010-04-06 19:42:18 +00:00
Nils Kneuper
3e944bedcd patch by Mordante to extract strings marked with VGETTEXT...
...and not just with vgettext
2010-03-14 17:43:06 +00:00
Mark de Wever
87d012e7ab Renamed the cmake foo2 targets to foo. 2009-10-19 18:24:33 +00:00
Mark de Wever
71d9b8a349 Let po-update2-xx update all domains.
Ivanovic discovered it didn't update the manual and manpages.
2009-10-13 20:48:42 +00:00
Mark de Wever
9359184556 Improve po-update to avoid nop updates.
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.
2009-10-11 07:08:49 +00:00
Nils Kneuper
9415dd1cc1 read langcodes from LINGUAS file instead of hardcoded ones in build system 2009-09-26 11:32:09 +00:00
Nils Kneuper
a844d18f78 add vietnamese in the list of langs to work on in the cmake recipe
@ mordante: it would be *great* if the content of LINGUAS was used for this set!
2009-09-23 19:59:26 +00:00
Mark de Wever
0049016ded Fix the linewrapping when updating a po file.
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.
2009-09-16 19:41:31 +00:00
Nils Kneuper
b6988b50bd add wesnoth-dm to cmake recipe...
...(was working for most things, but not for make install...)
2009-07-28 10:32:39 +00:00
Mark de Wever
efc75a7d39 Add a bug entry to the pot files for cmake. 2009-07-14 19:23:57 +00:00
Mark de Wever
4a65d01607 Remove some old cmake translation targets. 2009-06-15 17:46:08 +00:00
Mark de Wever
e111adb9b8 Add po update targets per language.
This is needed for maintenance and thus are the targets only available
if the maintenance target is enabled.
2009-06-12 17:45:04 +00:00
Mark de Wever
c3cf4d1dc7 Add mo update targets per language.
This is needed for maintenance and thus are the targets only available
if the maintenance target is enabled.
2009-06-12 17:44:58 +00:00
Mark de Wever
e80dd12059 Entirely switch to the new mo-update.
Stikonas discovered the old way was still there, also added a proper
install target for the new code.
2009-06-05 17:44:38 +00:00