Adriaan de Groot
998790d69c
[libcalamares] Warnings--
2020-03-24 23:52:57 +01:00
Adriaan de Groot
4aeb774812
[libcalamares] POD don't bother with const&
2020-03-24 23:52:20 +01:00
Adriaan de Groot
177d6fe861
[libcalamares] Apply coding style
2020-03-24 22:57:36 +01:00
Camilo Higuita
e02077d58e
some models need to be updated to work with locale qml view step
2020-03-24 10:04:14 -05:00
Adriaan de Groot
e49fb74847
[libcalamares] Fix more tests
2020-02-21 17:58:55 +01:00
Adriaan de Groot
81752b6f7c
[libcalamares] Document how TranslatedString context works
...
- Support re-using class-specific tr() calls in a standard way
- Document this in the netinstall.conf which uses it
2020-02-19 14:23:34 +01:00
Adriaan de Groot
0ef28f6a50
[libcalamares] Translatable config strings use tr()-infrastructure
...
- Allow TranslatedString to get a context parameter; if it has
one, it will try to use the regular tr()-infrastructure
**as fallback** for the translations from the config file itself.
- This makes it possible to offer -- and translate -- some "standard"
phrases in the module, while allowing the config file the knob
to change strings. Using one of the standard strings gets translations
for "free", while introducing something entirely new means sourcing
translations for it as well.
2020-02-19 14:04:35 +01:00
Adriaan de Groot
ca13d1670e
[libcalamares] Merge more from Camilo
...
- Complete the model for locales
2020-02-12 13:40:59 +01:00
Adriaan de Groot
684c5f477c
[libcalamares] Moc warnings--
...
- don't have a NOTIFY CONSTANT property
- the data is constant, so drop NOTIFY
- remove redundant signals
- remove setLabels() now it's only needed from one constructor
2020-02-11 16:40:36 +01:00
Adriaan de Groot
b4b1bf5de2
[libcalamares] Call delegated constructor
2020-02-11 16:39:39 +01:00
Adriaan de Groot
df5a0d25bc
[libcalamares] Handle empty locale names quickly
2020-02-11 16:37:49 +01:00
Adriaan de Groot
27bc64e63f
[libcalamares] C++ style, warnings--
2020-02-11 15:36:30 +01:00
Adriaan de Groot
241cb04f06
[libcalamares] Coding style
2020-02-11 15:25:28 +01:00
Camilo Higuita
1b3d32ca79
make label item from LabelModel qobject based and expose properties
2020-02-11 15:24:29 +01:00
Adriaan de Groot
2dff2d9d70
[libcalamares] TZRegion is hard to copy
...
- delete the copy and move constructors
- adjust tests (which were just interested in simple tr() behavior) to use TZZone instead
2020-01-07 10:41:14 +01:00
Adriaan de Groot
1b62b2f66c
[libcalamares] Reduce warnings (extra ;, empty statement ..)
2020-01-07 10:19:22 +01:00
Adriaan de Groot
0e7982ec37
[libcalamares] Don't force Hindi on India.
...
FIXES #1284
2019-12-11 18:33:24 +01:00
Adriaan de Groot
4945408911
[libcalamares] Remove debugging cruft
2019-12-11 08:45:35 -05:00
Adriaan de Groot
daa76080f1
[libcalamares] Add meaningful aliases for key()
2019-12-11 07:00:42 -05:00
Adriaan de Groot
93ae44e214
[libcalamares] Split translatable timezone data
...
- Hide the one file from lupdate by giving it a weird suffix
- Call lupdate a second time for the timezone translations
- While here, adjust so that the options precede the directories
they are supposed to affect
I don't want to give the translation teams 444 new strings all
at once (about 90% of which don't need translation).
2019-12-10 22:44:10 +00:00
Adriaan de Groot
08dc9011d6
[libcalamares] Off-by-one folded the world in half
...
- Dropped the sign from longitudes, wrapping the west onto the east
2019-12-10 17:11:10 +01:00
Adriaan de Groot
1880eb5148
[libcalamares] Add accessors for TZZone
2019-12-10 16:10:16 +00:00
Adriaan de Groot
3f57b929ee
[libcalamares] Make the zoneTab region list static
...
- there's only one zone.tab, it won't change during a run,
load it only once (this allows for a single global list).
2019-12-11 01:43:53 +10:00
Adriaan de Groot
a39c77dfaf
[libcalamares] Store region name in each zone as well
2019-12-11 01:11:51 +10:00
Adriaan de Groot
c75e870073
[libcalamares] CStringList::find() convenience function
...
- search for a key and return a type-cast pointer to the result
- while here, simplify some other code
- the find() function could be done with std::find_if but doesn't
get any shorter or more elegant
2019-12-10 15:54:43 +01:00
Adriaan de Groot
6092172f8d
[libcalamares] Regions and zones change to QList<Base*>
...
- By using QList< CStringPair* > consistently, we can save
a bunch of model code at the cost of an occasional dynamic_cast;
it's fairly rare for there to be a need for the derived pointer.
2019-12-10 15:32:15 +01:00
Adriaan de Groot
fc8364ea54
[libcalamares] Store zones with each region
...
- move operator< to base class
- add each zone to the list held by the region
- sort zones at the end
2019-12-10 14:06:22 +00:00
Adriaan de Groot
1a8439069e
[libcalamares] Extend TZ with location and country
2019-12-10 15:36:53 +02:00
Adriaan de Groot
f4509f3380
[libcalamares] Move loading to TZRegion
...
- don't make the model load files, provide convenience functions
for loading in the value classes
- create model from lists of value pointers
2019-12-10 10:48:39 -01:00
Adriaan de Groot
da277fa7ba
[libcalamares] Drop superfluous enum
2019-12-10 17:42:32 +06:30
Adriaan de Groot
9a5e614172
[libcalamares] Build the TZRegion list in one pass
...
- read the file and create the regions on-the-fly, then sort the
resulting list (instead of building a string list and then
building the regions afterwards)
2019-12-10 17:24:33 +06:30
Adriaan de Groot
01bba7b466
[libcalamares] Make explicit when a model comes from a file
2019-12-09 23:36:05 -11:00
Adriaan de Groot
2625bb18df
[libcalamares] TZRegionModel gets a data role
2019-12-10 11:27:02 +02:00
Adriaan de Groot
97235e9b3d
[libcalamares] Switch CStringPair key to QString
...
- the key is used in various places as a key for Qt data structures,
so it's more convenient to have QString than a bare char*
2019-12-10 10:11:08 +01:00
Adriaan de Groot
1d17cf5c77
[libcalamares] Accessors for key and complete region data
2019-12-09 17:20:46 -04:00
Adriaan de Groot
b29b89579e
[libcalamares] Present TZ regions in consistent order
2019-12-09 15:55:04 -05:00
Adriaan de Groot
b2c2255f6a
[libcalamares] Add a model of timezone regions
2019-12-09 21:46:10 +01:00
Adriaan de Groot
94fe4d2fda
[libcalamares] Avoid weak vtables in string-pair implementation
2019-11-26 12:30:59 +01:00
Adriaan de Groot
fc7f49b610
[libcalamares] Expand tests for TimeZone translations
2019-11-26 12:28:41 +01:00
Adriaan de Groot
71f3614eb7
[libcalamares] Add TimeZone support to build
...
- Add to CMakeLists.txt
- Test basic scenarios
2019-11-26 11:20:33 +01:00
Adriaan de Groot
3af2754022
[libcalamares] Implement translatable-pair-of-char*
...
- This is base functionality for a translatable model of
TimeZone names that is scraped from zone.tab
2019-11-26 11:18:35 +01:00
Adriaan de Groot
abd3c4171b
[libcalamares] Prevent CI coding-style fixes to generated code
2019-11-26 11:08:21 +01:00
Adriaan de Groot
733fb43b5e
[libcalamares] Sort the dummy zone names
2019-11-26 10:45:36 +01:00
Adriaan de Groot
c3fdb38097
[libcalamares] Stub of class for TimeZone model management
...
- Intent is to move out of locale module
2019-11-25 20:51:45 +01:00
Adriaan de Groot
2034dd62a4
[libcalamares]: Timezone information for translation/extraction
...
SEE #1259
2019-11-19 18:07:13 +01:00
Adriaan de Groot
3ee384f36c
[libcalamares] Extract zone.tab data for translations
2019-11-19 18:07:13 +01:00
Andrius Štikonas
490c14d93d
QLatin1Literal->QLatin1String.
2019-09-21 20:44:33 +01:00
Adriaan de Groot
9053b9cecf
[libcalamares] Fix Qt 5.9 compatibility
...
- not really sure why I went for the Qt 5.10 STL-style iterators
FIXES #1236
2019-08-30 06:20:45 -04:00
Adriaan de Groot
7b699bfc76
[libcalamares] Access list of locale Ids
...
- Make it easier to obtain locale-ids (from CALAMARES_TRANSLATION_LANGUAGES)
so avoid splitting that string multiple times.
2019-08-20 05:26:26 -04:00
Adriaan de Groot
6b659b6f48
[libcalamares] Apply current coding standard to locale/
2019-08-07 23:42:33 +02:00