21 Commits (a4fadcd9be71fec09b5de17f5d12ec46dd25cd5e)

Author SHA1 Message Date
Adriaan de Groot 6b6267e3a4 i18n: check for gettext rather than just calling msgfmt
- *secretly* this is already done in the KF5 i18n modules,
  so the resizefs was already requiring FindGettext.
- we don't actually use the gettext modules' CMake macros,
  so explain why in the module.
4 years ago
Adriaan de Groot 392b4d33a0 i18n: create the lang/<lang>/ directories in the build as-needed 4 years ago
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
4 years ago
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
4 years ago
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
4 years ago
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.
4 years ago
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.
4 years ago
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.
4 years ago
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.
4 years ago
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
5 years ago
Adriaan de Groot 8fc94900d3 CMake: add the tz_ translation files to the i18n build 5 years ago
Adriaan de Groot 0ffb6ed67c CMake: fix checks for supported rcc format versions 7 years ago
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
7 years ago
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
7 years ago
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.
7 years ago
Adriaan de Groot 39f5af1fcc Python-i18n: clean up filename handling a little (thanks Kevin) 7 years ago
Adriaan de Groot 40335d9f1e Python-i18n: install mo files into build tree 7 years ago
Adriaan de Groot 1dbe7c29e2 Python-i18n: prepare for move of API to libcalamares.utils, be less verbose 7 years ago
Adriaan de Groot 22c0ee5dbb Python-i18n: install gettext .mo files into system locale dir 7 years ago
Adriaan de Groot b922d88b0f Python-i18n: add a gettext_path for python job modules 8 years ago
Adriaan de Groot 34c3bc6c85 CMake: shuffle translations macros into CMakeModules/ 8 years ago