Commit Graph

4579 Commits

Author SHA1 Message Date
Adriaan de Groot
fa5d40006c [locale] Fix interpretation of configured selector
- In GeoIP handler constructors that take a string (to configure the
   selector to use), interpret the empty string (which generally isn't
   a meaningful selector) as meaning "use the default".
 - Drop the no-argument constructors in favor of a default-argument
   which is empty.
2018-04-16 05:32:22 -04:00
Adriaan de Groot
352b385b12 [locale] Make the selector configurable via the config file 2018-04-16 05:32:22 -04:00
Adriaan de Groot
b1b59b27b2 [locale] Expand tests for alternate selectors
- Check that the alternate selectors are used
2018-04-16 05:32:22 -04:00
Adriaan de Groot
fe20416a54 [locale] Make the selector configurable
- GeoIP gets a string selector; the interpretation is up to derived classes.
 - GeoIPXML and GeoIPJSON use the selector to select an element by tag
   or an attribute, respectively.
2018-04-16 04:55:37 -04:00
Adriaan de Groot
79a6d7ccbd [locale] Make file and class consistent GeoIPXML
- Rename the class to match the filename.
2018-04-16 04:35:32 -04:00
Adriaan de Groot
2cd4461b57 [locale] Rename JSON handler
- The handler for JSON data should be called that, not named
   specially after the original provider it was implemented for.
 - Make filename and classname consistent, GeoIPJSON.
2018-04-16 04:32:49 -04:00
Philip
29acd744b8 [Merge] with upstream 2018-04-13 16:38:07 +02:00
Calamares CI
4161120385 i18n: [python] Automatic merge of Transifex translations 2018-04-13 10:25:38 -04:00
Calamares CI
8ba4de6d0a i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-04-13 10:25:38 -04:00
Calamares CI
ef2a15b45b i18n: [desktop] Automatic merge of Transifex translations 2018-04-13 10:25:37 -04:00
Calamares CI
4ed65c290d i18n: [calamares] Automatic merge of Transifex translations 2018-04-13 10:25:37 -04:00
Adriaan de Groot
ec113e3df3 [locale] Log GeoIP attempt URL, use possibly-modified form 2018-04-13 09:42:28 -04:00
Adriaan de Groot
d6f082752d [locale] On GeoIP failure, log URL 2018-04-13 09:36:39 -04:00
Adriaan de Groot
47b7040897 [locale] Adjust to Calamares 3.2 idiom 2018-04-13 09:24:59 -04:00
Adriaan de Groot
3ea5a06157 Merge branch '3.1.x-stable' 2018-04-13 08:50:17 -04:00
Adriaan de Groot
14fcc2fad6 [plasmalnf] Continue fighting with layout
- The screenshot stays one size, but different ThemeWidgets may overlap
   partially when you shrink the screen or have more than three / four
   themes listed.
 - Probably needs work in the surrounding container and overall better
   page-scrollbar support.
2018-04-13 08:44:02 -04:00
Adriaan de Groot
c9928c99c8 Merge remote-tracking branch 'origin/3.1.x-stable' into 3.1.x-stable 2018-04-12 17:13:34 -04:00
Adriaan de Groot
1340613ef5 [locale] Additional test application for GeoIP processing 2018-04-12 16:55:24 -04:00
Adriaan de Groot
76e37402b3 [locale] Extend tests with negative results 2018-04-12 16:23:54 -04:00
Adriaan de Groot
0c1453ff18 [locale] Fix string value handled by XML parser 2018-04-12 16:23:54 -04:00
Adriaan de Groot
eea421f499 [locale] Add tests for GeoIP handlers
- One sample JSON result
 - Two sample XML results
2018-04-12 16:23:54 -04:00
Adriaan de Groot
6b7c8a694a [locale] Make the style of GeoIP retrieval selectable
- Unchanged config files will continue to use the weird addition
   of /json, and interpret JSON data.
 - Allow to specify full URL with data format through one of
     geoipStyle: json
     geoipStyle: xml
 - XML support is optional
2018-04-12 14:37:38 -04:00
Adriaan de Groot
5b98e58ae7 [locale] Refactor GeoIP handlers
- Read the data in the caller of the handler, instead of in the callers
2018-04-12 12:22:43 -04:00
Adriaan de Groot
939cdff93b [locale] Add alternate GeoIP data format 2018-04-12 12:18:43 -04:00
Adriaan de Groot
aaae1507cd [locale] Convenience function for TZ splitting 2018-04-12 11:51:50 -04:00
Adriaan de Groot
3636226425 [locale] Document change to the way GeoIPURL is handled. 2018-04-12 10:18:15 -04:00
Adriaan de Groot
fe98b789f0 [locale] Document the settings in locale.conf
- The geoipUrl is weird, because it is not a complete URL.
   Document that, and what kind of data is expected.

FIXES #920
2018-04-12 10:15:19 -04:00
Adriaan de Groot
d5623af8ef [locale] Refactor geoip handling
- Configuration **must** be a complete URL. The implementation no
   longer appends /json to the URL.
2018-04-12 10:11:48 -04:00
Adriaan de Groot
c0d5a153d4 [locale] Refactor GeoIP handler
- Move GeoIP to its own cpp file
 - Provide a default implementation of the URL mangler
2018-04-12 09:54:22 -04:00
Adriaan de Groot
445f181cc3 [locale] Start refactoring geoip handling
- Introduce a handler interface for GeoIP providers
 - Move the implementation of FreeGeoIP into a struct of its own
2018-04-12 09:45:48 -04:00
Adriaan de Groot
fa933b9a16 [plasmalnf] Search for theme screenshots
- Search in branding dir, and ., for relative paths,
 - Absolute paths used as-is.
 - Document search as such.
2018-04-10 08:54:47 -04:00
Adriaan de Groot
bfb37e6b37 [plasmalnf] Avoid use of 'uint' 2018-04-09 11:39:45 -04:00
Adriaan de Groot
cb616ec1bb [plasmalnf] Keep fixed size of screenshots (relative to font size) 2018-04-09 11:39:05 -04:00
Adriaan de Groot
5ab01eba9f [plasmalnf] Don't even try to load an empty filename for screenshot.
- Avoid one attempt-to-load if the filename is empty, and one
   re-creating of the Pixmap.
2018-04-09 11:26:43 -04:00
Adriaan de Groot
06e43a7312 CI: Switch to stable Neon, to avoid all-builds-failing.
The dev-unstable Neon branch now has a too-new KPMCore for
this branch of Calamares.
2018-04-09 11:20:40 -04:00
Philip
031416a1de Merge upstream changes 2018-04-07 21:59:58 +02:00
Adriaan de Groot
00a5baa3d9 [libcalamares] Improve process logging
- Don't insert a space before the output of a process
 - To do this, suppress space and quoting on the output, and to do
   that move the labeling-output for warnings and errors into
   the constructor (so that an idiomatic .nospace() does the right thing).
2018-04-05 05:17:21 -04:00
Adriaan de Groot
b5c3fc8cf6 [libcalamares] Improve process logging
- Log output on crash
 - If debugging is on (-d) then also log output on success

FIXES #925
2018-04-05 04:51:51 -04:00
Adriaan de Groot
4d459f7fc0 [libcalamares] Move non-UI stuff from libcalamaresui
- Settings is just a settings class, no UI involved, so
   move to libcalamares where it can be used also from
   system helpers.
 - YAML utilities are useful at a lower level of the stack, too.
2018-04-05 04:31:13 -04:00
Adriaan de Groot
7e5c91aae6 [locale] Reduce debugging bla bla 2018-04-04 11:42:38 -04:00
Adriaan de Groot
032b33f56f [libcalamaresui] Improve logging.
- Put the (constant) 'Calamares will now quit' on its own debug line.
 - Tell the user what the search paths are if a module is not found
   (prompted by a mis-configuration in a Neon live image).
2018-04-04 11:25:28 -04:00
Adriaan de Groot
ddbb9eaebc Merge branch 'improve-logging' 2018-04-04 11:10:51 -04:00
Adriaan de Groot
9fe85e592f Merge branch '3.1.x-stable' 2018-04-04 11:10:34 -04:00
Adriaan de Groot
b8e6144553 [locale] Document how the locale entry in Global Storage works.
- Make the BCP47 value explicitly lower-case.
 - Add some constness and encapsulation.
 - Fix up documentation in the packages module explaining the
   format of the ${LOCALE} replacement (now forced to lower-case,
   but it is also only the language part, not e.g. en-UK).

FIXES #922
2018-04-03 13:07:36 -04:00
Adriaan de Groot
4c04260b97 [packages] Don't change the global package list.
- Count only the packages that will be changed, given the current
   locale settings.
 - Preserve global storage unchanged (don't remove any locale-packages).
2018-04-03 08:28:29 -04:00
Adriaan de Groot
36aede52ef [packages] Example configuration installs a localization package 2018-04-03 08:20:01 -04:00
Adriaan de Groot
fd1279dbe3 [welcome] Make the example configuration less strict 2018-04-03 08:19:45 -04:00
Adriaan de Groot
9cdb6734bf [packages] If locale is empty, pretend it is 'en'.
- Otherwise packages like vi-$LOCALE will be retained in the
   package list, which will cause install problems.
2018-04-03 08:02:16 -04:00
Adriaan de Groot
240efd30f1 [libcalamares] Add support for formatted, table-like output
- Use DebugRow for one-row-at-a-time output with continuations.
 - Use DebugList for one-item-per-line with continuations.
 - Use DebugMap for one-row-at-a-time output of a QVariantMap.
2018-03-30 17:18:45 -04:00
Adriaan de Groot
20e9c2c8e3 Merge branch '3.1.x-stable' 2018-03-29 17:35:36 -04:00