| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This is still not great code but at least somewhat an improvement. Tests
were expanded to showcase the new behavior.
I think, ideally, we would append opening/closing tags to the ancestor
`p` or `li` node's cdata as soon as we encounter the start/end of an
`em` or `code` element. This would then also handle empty elements
correctly.
|
| |
|
|
|
|
| |
Fixes: https://github.com/hughsie/appstream-glib/issues/445
|
|
|
|
|
|
| |
Always store the AppStream metadata version as a string and compare it
like any other version.
This allows to have 0.10 > 0.8 for instance.
|
|
|
|
| |
Some appstream-data packages add <em> and </em> or <code> and </code> to the files. Not all package manager can handle that. An example would be pamac from Manjaro
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoiding storing identical strings is a clever measure to keep the
appstream file small and clean, but it ignores translation differences
between languages and their specific locales.
Applications tend to "fallback" from missing locales by picking a
translation of the same language but from a different locale.
For instance, when missing a "pt_BR" translation, some apps will
pick the "pt" translation instead. That usually works but there
are some cases when it doesn't, such as for international words:
Brazilian Portuguese (pt_BR) tends to use them, while European
Portuguese (pt) has a translation for everything.
This way, "GNOME Boxes" gets translated to "Caixas GNOME" in
European Portuguese (pt) but the same "GNOME Boxes" name is
expected in Brazilian Portuguese (pt_BR).
This was initially reported as a Flatpak issue in
https://lists.freedesktop.org/archives/flatpak/2019-May/001578.html
Because OP was seeing the wrong translations in Flathub and
GNOME Software.
Original commit was done by @felipeborges in his personal branch at
github, commit 54f97aadcd2c00f3d95b472db6e4dda1c0c9865b
|
|
|
|
|
|
| |
It segfaulted when building the error message as data_c->name was invalid.
data_c was a valid tag, so only the data_c->tag union member was active.
Fix the crash by calling the proper function instead and add a test case.
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Richard Hughes <richard@hughsie.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes: https://github.com/hughsie/lvfs-website/issues/33
|
|
|
|
|
|
|
|
| |
Using GObject Introspection we were creating an object using GLib.Bytes.new(buf)
where buf was a python str object. This created a GBytes object with no
trailing NUL char but we were expecting a NUL-terminated string when both doing
fnmatch() and also processing the XML. Support this by guarding fnmatch and
also by using the string length when using the GMarkupParseContext.
|
| |
|
|
|
|
| |
Some distros helpfully force this on for some reason.
|
|
|
|
|
|
|
| |
These were renamed to …_format_kind in 0.9.6.
This is a bit of a technicality, but the functions were formally part of
the ABI before 0.9.6, and so should be retained to keep strict
compatibility.
|
| |
|
|
|
|
| |
No code changes, and ensure we don't break API/ABI by using #define's.
|
| |
|
|
|
|
|
| |
Translators sometimes leave extra whitespace, so if we're parsing without
AS_NODE_FROM_XML_FLAG_LITERAL_TEXT then just swallow the trailing spaces.
|
| |
|
|
|
|
| |
This reduces the number of common duplicate strings like 'C'.
|
|
|
|
| |
Saves 0.02Mb RSS.
|
|
|
|
| |
This speeds up parsing to as good as pre-refcounted string time.
|
|
|
|
|
| |
This drops the RSS by ~1Mb and has the potential to do much more drastic
things if this is used in GNOME Software.
|
|
|
|
|
| |
If we're ignoring the non-native languages when parsing (but keeping the tree)
then make sure we don't try exporting null text tags from the empty tree nodes.
|
|
|
|
| |
This saves another 100k of RSS.
|
|
|
|
| |
This saves yet another 1Mb of RSS when loading the Fedora AppStream file.
|
|
|
|
| |
This saves about 1Mb of RSS when loading the Fedora AppStream file.
|
|
|
|
|
| |
This makes things a bit quicker to load and saves over 5Mb RSS on the giant
Fedora AppStream file.
|
|
|
|
|
|
|
| |
This adds an optional flag that allows the node parser to ignore any nodes that
do not match the native languages of the user. This increases startup speed of
gnome-software by ~40ms but also drops the RSS by a massive 12Mb for the Fedora
AppStream file.
|
| |
|
| |
|
| |
|
|
|
|
| |
Also, fix the 'Since' tags on the API not in the 0.5.* branch.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This is used all over the place both in and out of tree.
|
|
|
|
| |
as-utils.c was getting much too big anyway. No API changes.
|
| |
|
| |
|