Adriaan de Groot
a1fb83bdc4
i18n: fix typo and code-style
2021-07-26 11:16:26 +02:00
Adriaan de Groot
53fb16437f
i18n: factor out special cases
...
- allow special Locale or special Name for a translation (or both)
2021-07-25 23:38:09 +02:00
Adriaan de Groot
0e977a7e42
i18n: introduce special case for ca@valencia
2021-07-25 23:18:05 +02:00
Adriaan de Groot
740f1e7fe5
i18n: simplify Label handling of sr@latin
2021-07-25 23:13:44 +02:00
Adriaan de Groot
f0a25bd397
[libcalamares] Avoid warnings from deprecated country codes.
...
The Qt documentation does not mention @since for these values,
so we're going to let CI catch them.
2021-06-15 11:41:17 +02:00
Adriaan de Groot
cfbe722350
[libcalamares] Test the translated string with real translations
...
- introduce a bogus translation context, load translations,
and check that the context-enabled translator does its job.
2021-04-18 13:19:55 +02:00
Adriaan de Groot
d72e42f7ba
[libcalamares] Extend (configuration) translated string with context
...
Make it possible to pass in a context for strings not-from-config
maps, to allow programmatically set, but translatable, strings.
2021-04-17 14:41:08 +02:00
Adriaan de Groot
f045e4f00e
[libcalamares] Switch default language in Belarus
...
*If* the distro has GeoIP enabled and auto-selects the language for
Calamares, then Belarus now selects Russian, rather the Belarusian.
This is based on some personal input, mostly, and Wikipedia census data.
FIXES #1634
2021-02-07 22:35:32 +01:00
Adriaan de Groot
a955791766
Apply coding style globally again
2020-10-12 14:27:01 +02:00
Adriaan de Groot
2126be6d6d
Warnings-- (~T() override)
...
Consistently use
~T() override;
in class declarations (so no virtual in front, and avoid
warnings due to the missing override in back).
2020-09-22 22:40:52 +02:00
Adriaan de Groot
e0ba5a6ba2
[libcalamares] Convenience functions for localeConf GS entry
2020-09-03 20:21:37 +02:00
Adriaan de Groot
a2180936ef
CI: apply coding style across the entire codebase again
2020-08-26 02:28:43 +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
92a6cbc773
REUSE: (CC0-1.0) generated files & PD files
...
- the translations generated from public-domain files are CC0-1.0
- the files derived from Unicode tables are close to CC0-1.0,
possibly except that there is a FileCopyrightText line
2020-08-26 02:22:49 +02:00
Adriaan de Groot
665c2d53ab
[libcalamares] Fix Doxygen comment for TZ locations
2020-08-12 09:58:48 +02:00
Adriaan de Groot
a873badf87
[libcalamares] Update SPDX identifiers in locale/
2020-08-10 09:43:13 +02:00
Adriaan de Groot
296146e4f8
[libcalamares] update SPDX licensing on generated files
...
- the scripts are BSD-2-clause,
- the generated files are CC0 (I'm not *100%* sure about the
derived file CountryData_p.cpp, which lists countries and
country codes -- it **is** extracted from CLDR data which
is not CC0)
2020-08-10 09:32:50 +02:00
Adriaan de Groot
e2bf62a64b
[libcalamares] Repair test for old Qt
...
- Qt 5.11 and early 5.12 just don't support Esperanto at all
2020-08-09 22:35:10 +02:00
Adriaan de Groot
5e5701363c
[libcalamares] Test the spot-patch for Johannesburg
...
- Add a note about notation, degrees-minutes
2020-08-09 00:35:19 +10:00
Adriaan de Groot
e35992cf0b
[libcalamares] Add spot-patches to timezone data
...
- for the purposes of Calamares's nearest-location selection algorithm
for timezone selection, introduce spot patches: alternate markers
on the map to indicate "things close to here belong in this timezone".
- hide the implementation detail in the find() methods.
2020-08-09 00:21:31 +10:00
Adriaan de Groot
028d424c73
[libcalamares] Expand testing of TZ location lookup
...
- Cape Town is in South Africa, so one might expect it to get South
Africa's timezone -- which is Africa/Johannesburg -- but Windhoek
is closer, so it gets that.
- Port Elisabeth is similar: Maseru lies between it an Johannesburg,
so it gets the wrong timezone, too.
These both illustrate how the limited resolution of the map, together
with the "closest location" lookup, can give poor results. For most
of South Africa, the "wrong" timezone is closer than the right one.
2020-08-09 00:21:31 +10:00
Adriaan de Groot
6a33e72b58
[libcalamares] Refactor test to be data-driven
...
- this test is going to get a lot more cases, so prepare for that
2020-08-09 00:21:30 +10:00
Adriaan de Groot
00626fd96c
[libcalamares] Refactor timezone loading
...
- load from a TextStream. This is prep-work for alternate TZ data
sources.
2020-08-09 00:21:30 +10:00
Adriaan de Groot
2f871acbfd
[libcalamares] Expose distanceFunc-find for timezones
2020-08-08 13:45:32 +02:00
Adriaan de Groot
0fda1dcf7d
[libcalamares] Refactor finding-TZ algorithm
...
- introduce a distance function and use that, rather than coding it
inside the find() function. This is prep-work for unifying the
find() calls, based on various coordinate systems.
2020-08-08 13:26:39 +02:00
Adriaan de Groot
21f97db8fd
[libcalamares] Offer translation lookup of regions
2020-08-06 16:09:41 +02:00
Adriaan de Groot
296337d45d
[libcalamares] Implement nearest-TZ lookup
...
- This version, based on lat+lon lookup, handles wrap-around the
globe at -180 W (which is very close to +180 E)
- Test wrap-around-the-globe lookups
2020-08-06 14:27:44 +02:00
Adriaan de Groot
9e274aac07
[libcalamares] Make ZonesModel more QML-friendly
...
- expose TZ lookup (as a QObject*, which QML needs)
- C++ code should use find(), which is safer
2020-08-06 14:27:09 +02:00
Adriaan de Groot
ab69e7c83a
[libcalamares] Add API for geographical lookup
...
- find a zone given lat, lon -- with a failing test and a bogus
implementation.
2020-08-06 01:52:50 +02:00
Adriaan de Groot
d814a3dba8
[libcalamares] Sort the models before use
...
- zones and regions alphabetically by key
2020-08-06 01:34:55 +02:00
Adriaan de Groot
37c211fd14
[libcalamares] Add an iterator for the full zones model
2020-08-06 01:34:55 +02:00
Adriaan de Groot
7ea2ad7dc6
[libcalamares] Add accessors for TZ data and region in the model
...
It's convenient when e.g. QComboBox::currentData() gets the key
"automatically", and the default role for that method is UserRole,
so let the value of KeyRole overlap.
2020-08-06 01:34:44 +02:00
Adriaan de Groot
245d4a8ef7
[libcalamares] Add a find() to ZonesModel
...
- Look up TZ data by region and zone name.
2020-08-06 01:33:25 +02:00
Adriaan de Groot
478a275764
[libcalamares] Make TimeZoneData public
...
- Also make it a QObject so we can add properties and make it useful
for QML consumption.
2020-08-06 01:33:21 +02:00
Adriaan de Groot
10fb5b95c7
[libcalamares] Split out CStringPair into TranslatableString
...
The (renamed) class TranslatableString keeps a key value
(e.g. New_York) and a human-readable version around; the
human-readable one is passed through QObject::tr() for translation
on-the-fly.
2020-08-05 17:52:41 +02:00
Adriaan de Groot
3e32335511
[libcalamares] Introduce a filtering model per-region
2020-08-05 17:14:13 +02:00
Adriaan de Groot
1afdcc9c82
[libcalamares] Give zones data, too
...
- while here, fix bug in TimeZoneData that didn't munge names
(so it reported "New_York")
2020-08-05 16:45:41 +02:00
Adriaan de Groot
33e39b92fb
[libcalamares] Satisfy test, return region names
2020-08-05 16:36:00 +02:00
Adriaan de Groot
609ea8350c
[libcalamares] Failing test: there is data in the regions model
2020-08-05 16:25:45 +02:00
Adriaan de Groot
82cc652f55
[libcalamares] Re-done zones loading
...
- just make one big list of zones, one short list of regions
- the models are non-functional right now
2020-08-05 16:21:05 +02:00
Adriaan de Groot
ca40d2e2d9
[libcalamares] Introduce a failing test for the number of regions
2020-08-05 15:17:09 +02:00
Adriaan de Groot
fce05acf1e
[libcalamares] Rip out all the TZ models
...
- The models are overly complicated: **overall** there is just one
list of timezones, and we need various views on that list.
Start over with an empty model of regions.
2020-08-05 15:11:52 +02:00
Adriaan de Groot
3f1b31e352
[libcalamares] Explicit tests for Interlingue
...
- The language code "ie" is not recognized,
- "ia" is, and it seems to be the post-war variant of
Interlingue, so we may want to rename / relabel.
The testEsperanto test -- now split into scripts and
esperanto -- would have picked "ie" out of the list
because it does map to C locale.
2020-08-04 13:26:37 +02:00
Adriaan de Groot
b27bc11975
[libcalamares] Merge locale tests files
...
- No need for a separate .h in most test cases
2020-08-04 12:59:55 +02:00
Adriaan de Groot
682146aa9b
[libcalamares] Expand dox on TimeZone pairs
2020-07-24 12:15:32 +02:00
Adriaan de Groot
192263cf9d
[libcalamares][modules] Use compatibility for QString::split()
...
- Use the compatibility value, which has an enum value suitable
for the Qt version in use.
2020-06-23 11:13:55 +02:00
Callum Farmer
0c4dc71d5c
[libcalamares] Update SPDX identifiers.
...
Update CppJob.h
Update CalamaresConfig.h.in
Update DllMacro.h
Update GlobalStorage.cpp
Update GlobalStorage.h
Update Job.cpp
Update Job.h
Update JobExample.cpp
Update JobExample.h
Update JobQueue.cpp
Update CalamaresConfig.h.in
Update CppJob.cpp
Update CppJob.h
Update DllMacro.h
Update GlobalStorage.cpp
Update GlobalStorage.h
Update Job.cpp
Update Job.h
Update JobExample.cpp
Update JobExample.h
Update JobQueue.h
Update ProcessJob.cpp
Update ProcessJob.h
Update PythonHelper.cpp
Update PythonJob.cpp
Update PythonJob.h
Update PythonHelper.h
Update PythonJobApi.cpp
Update PythonJobApi.h
Update Settings.cpp
Update Settings.h
Update GeoIPJSON.cpp
Update GeoIPJSON.h
Update GeoIPTests.cpp
Update GeoIPTests.h
Update GeoIPXML.cpp
Update GeoIPXML.h
Update Handler.cpp
Update Handler.h
Update Interface.cpp
Update Interface.h
Update test_geoip.cpp
Update CountryData_p.cpp
Update Label.cpp
Update Label.h
Update LabelModel.cpp
Update LabelModel.h
Update CountryData_p.cpp
Update CountryData_p.cpp
Update Lookup.cpp
Update Lookup.h
Update Tests.cpp
Update Tests.h
Update TimeZone.cpp
Update TimeZone.h
Update TranslatableConfiguration.cpp
Update TranslatableConfiguration.h
Update ZoneData_p.cxxtr
Update cldr-extractor.py
Update zone-extractor.py
Update Actions.h
Update Actions.h
Update Descriptor.h
Update InstanceKey.cpp
Update Module.cpp
Update Module.h
Update Requirement.cpp
Update RequirementsChecker.h
Update RequirementsModel.cpp
Update RequirementsModel.h
Update Tests.cpp
Update Manager.cpp
Update Manager.h
Update Tests.cpp
Update FileSystem.cpp
Update FileSystem.h
Update KPMManager.cpp
Update KPMManager.h
Update KPMTests.cpp
Update FileSystem.cpp
Update FileSystem.cpp
Update FileSystem.h
Update KPMManager.cpp
Update KPMManager.h
Update Mount.cpp
Update Mount.h
Update PartitionIterator.cpp
Update PartitionIterator.h
Update PartitionIterator.h
Update PartitionQuery.cpp
Update PartitionQuery.h
Update PartitionSize.cpp
Update PartitionSize.h
Update Sync.cpp
Update Sync.h
Update Tests.cpp
Update Tests.h
Update BoostPython.h
Update CalamaresUtilsSystem.cpp
Update CalamaresUtilsSystem.h
Update CommandList.cpp
Update CommandList.h
Update Dirs.cpp
Update Dirs.h
Update Entropy.cpp
Update Entropy.h
Update Entropy.cpp
Update Logger.cpp
Update Logger.h
Update NamedEnum.h
Update NamedSuffix.h
Update PluginFactory.cpp
Update PluginFactory.h
Update RAII.h
Update RAII.h
Update Retranslator.cpp
Update Retranslator.h
Update String.cpp
Update String.h
Update TestPaths.cpp
Update Tests.cpp
Update Tests.h
Update UMask.cpp
Update UMask.h
Update Units.h
Update Variant.cpp
Update Variant.h
Update Yaml.cpp
Update Yaml.h
Update moc-warnings.h
2020-06-03 12:52:53 +01:00
Adriaan de Groot
d348977d07
[libcalamares] Fix tests
...
- the test checks that the default locale is C or en_US .. let's just
make it so instead of relying on the environment. This fixes tests
on my dev-laptop, which happens to be set to en_NL (with volapuk
date format).
2020-04-21 13:41:04 +02:00
Adriaan de Groot
e3b4689cab
[libcalamares] Warnings--
...
- It's the perennial struggle between Qt index types and STL ones
2020-03-25 00:42:42 +01:00
Adriaan de Groot
998790d69c
[libcalamares] Warnings--
2020-03-24 23:52:57 +01:00