Commit Graph

20 Commits

Author SHA1 Message Date
Adriaan de Groot
392b4d33a0 i18n: create the lang/<lang>/ directories in the build as-needed 2020-08-27 16:39:44 +02:00
Adriaan de Groot
49e925ef47 i18n: untangle translations in the executable
- there's no need for a macro that is going to be used once,
  especially if there's only one place it can be called.
- expand it in place and remove it from the installed CMake
  module
2020-08-27 15:34:17 +02:00
Adriaan de Groot
3529659629 i18n: compile the gettext translations at build time
- need gettext to build translations (TODO: find_program)
- compile the .mo files from .po as part of the build, writing
  to the build-directory only
2020-08-27 15:21:23 +02:00
Adriaan de Groot
242d5c6499 i18n: install Python translations from a sensible place
- put the installation code in lang/ rather than among the modules
- remove useless indirection through CMake macro
2020-08-27 13:59:23 +02:00
Adriaan de Groot
1cd9b93a22 REUSE: Giant boilerplate cleanup
- point to main Calamares site in the 'part of' headers instead
  of to github (this is the "this file is part of Calamares"
  opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
  this is the 3-paragraph summary of the GPL-3.0-or-later, which has
  a meaning entirely covered by the SPDX tag.
2020-08-26 02:28:38 +02:00
Adriaan de Groot
31d0b5b194 REUSE: (BSD-2-Clause) CMakeModules/
The intended license for the CMake modules is BSD-2-Clause;
there's no desire to restrict what can be done with these,
and CMake modules are generally 2-clause licensed.
2020-08-26 02:01:48 +02:00
Adriaan de Groot
afb0b36f58 CMake: simplify QRC generation
Use configure_file() to avoid stomping on timestamps: if the list
of translations doesn't change, we don't need to rebuild the
translated QRC.
2020-07-29 10:07:57 +02:00
Adriaan de Groot
bfa1f618c7 CMake: Improve RCC version-checking
Previously, we check for RCC support every single time CMake runs.
This is slightly wasteful, and it wasn't being done right anyway.
But it's moot because:

- Calamares supports back to Qt 5.9
- Qt 5.9's version of rcc (at least, 5.9.7) **does** support the
  command-line argument `--format-version 1`
- Everything newer does too.

Simplify translations a little, too: just use autorcc rather than
building things by hand.
2020-07-29 10:05:01 +02:00
Callum Farmer
0d4642ca6a [CMakeModules] Update SPDX identifiers.
Update CalamaresAddTest.cmake

Update CalamaresAddLibrary.cmake

Update CalamaresAddBrandingSubdirectory.cmake

Update CalamaresAddTranslations.cmake

Update CalamaresAddPlugin.cmake

Update CalamaresAddModuleSubdirectory.cmake
2020-06-03 12:28:58 +01:00
Adriaan de Groot
8fc94900d3 CMake: add the tz_ translation files to the i18n build 2019-12-11 06:39:57 -05:00
Adriaan de Groot
0ffb6ed67c CMake: fix checks for supported rcc format versions 2018-06-14 06:41:08 -04:00
Adriaan de Groot
7eae99223e CMake: check if rcc supports --format-version
- The new format was introduced in Qt 5.7, and Qt 5.9 introduced
   the --format-version flag to rcc to switch back to the reproducible
   format 1. For distro's with Qt 5.7, don't use the new flag.
 - Reported from Neptune Linux, #979
2018-06-14 06:11:39 -04:00
Adriaan de Groot
d4f0be02d3 i18n: make build reproducible
The RCC output files in version 2 contain a timestamp of the
source file, which changes per build. Drop down to version 1,
which just removes the timestamp.

See reproducible builds note 'timestamps in source generated by rcc'.

FIXES #917
2018-03-12 09:09:29 -04:00
Adriaan de Groot
42ba505ceb CMake: add license headers, copyright
Since we install the CMake files now, also put license headers in them.
These files are intended to help plugin and branding component authors
write them in a simple Calamares-idiomatic way.
2018-03-09 11:13:42 -05:00
Adriaan de Groot
39f5af1fcc Python-i18n: clean up filename handling a little (thanks Kevin) 2017-08-18 14:13:26 -04:00
Adriaan de Groot
40335d9f1e Python-i18n: install mo files into build tree 2017-08-18 13:06:44 -04:00
Adriaan de Groot
1dbe7c29e2 Python-i18n: prepare for move of API to libcalamares.utils, be less verbose 2017-08-15 12:30:19 +02:00
Adriaan de Groot
22c0ee5dbb Python-i18n: install gettext .mo files into system locale dir 2017-08-15 10:34:28 +02:00
Adriaan de Groot
b922d88b0f Python-i18n: add a gettext_path for python job modules 2017-08-10 15:39:24 -04:00
Adriaan de Groot
34c3bc6c85 CMake: shuffle translations macros into CMakeModules/ 2017-08-10 10:40:41 -04:00