diff -Nru appstream-0.9.4/CMakeLists.txt appstream-0.12.0/CMakeLists.txt --- appstream-0.9.4/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -# CMakeLists for the AppStream Project -project(appstream) -cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) - -set(CMAKE_BUILD_TYPE "Debug") - -set(AS_VERSION_MAJOR "0") -set(AS_VERSION_MINOR "9") -set(AS_VERSION_PATCH "4") -set(AS_VERSION "${AS_VERSION_MAJOR}.${AS_VERSION_MINOR}.${AS_VERSION_PATCH}") -set(APPSTREAM_LIB_API_LEVEL "3") - -# Don't allow in-tree building -if(${CMAKE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR}) - message(STATUS "Please do an out-of-tree build:") - message(STATUS "rm -f CMakeCache.txt && mkdir build && cd build; cmake .. && make") - message(FATAL_ERROR "In-tree-build detected!") -endif(${CMAKE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR}) - -# -# Options -# -option(L18N "Enable localization" ON) -option(VAPI "Create and install a Vala API file" OFF) -option(QT "Build libappstream-qt" OFF) -option(MAINTAINER "Enable maintainer mode" OFF) -option(DOCUMENTATION "Enable target to build documentation" OFF) -option(APT_SUPPORT "Enable integration with APT on Debian" OFF) - -if(APT_SUPPORT) - add_definitions ("-DAPT_SUPPORT") -endif() - -# -# Default paths -# -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX - "/usr" CACHE PATH "Default install prefix" FORCE) -endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - -# Special case for /etc and /var when prefix is /usr -if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") - set(CMAKE_INSTALL_SYSCONFDIR "/etc" CACHE PATH "read-only single-machine data (etc)") - set(CMAKE_INSTALL_LOCALSTATEDIR "/var" CACHE PATH "modifiable single-machine data (var)") -endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") -include(GNUInstallDirs) -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/data/cmake/) - -message(STATUS "Compiling AppStream version ${AS_VERSION}") - -add_custom_target(distclean - "make clean" -) - -# -# l18n -# -find_package (Gettext REQUIRED) - -# -# Configure files -# -set (GETTEXT_PACKAGE "appstream") -set (VERSION "${AS_VERSION}") -configure_file(config.h.in ${CMAKE_BINARY_DIR}/config.h) - -# -# Enable testing -# -enable_testing() - -# -# Custom C flags -# -set(MAINTAINER_CFLAGS "") -if(MAINTAINER) - set(MAINTAINER_CFLAGS "-Werror -Wall -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self") - if (CMAKE_COMPILER_IS_GNUCC) - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion - OUTPUT_VARIABLE GCC_VERSION) - if (GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9) - set(MAINTAINER_CFLAGS ${MAINTAINER_CFLAGS} "-fdiagnostics-color=auto") - endif() - endif() -endif(MAINTAINER) -add_definitions(${MAINTAINER_CFLAGS}) - -# we do always enable this to never run into the missing-include-trap again -add_definitions("-Werror=implicit-function-declaration") - -# enable C++11 -set(CMAKE_CXX_STANDARD "11") - -find_package(PkgConfig REQUIRED) - -add_subdirectory(src) -add_subdirectory(tools) -add_subdirectory(data) -add_subdirectory(contrib) -add_subdirectory(po) -add_subdirectory(docs) -add_subdirectory(tests) -if(QT) - add_subdirectory(qt) -endif() diff -Nru appstream-0.9.4/config.h.in appstream-0.12.0/config.h.in --- appstream-0.9.4/config.h.in 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/config.h.in 2018-04-04 15:53:56.000000000 +0000 @@ -33,4 +33,10 @@ /* Version number of package */ #define VERSION "@VERSION@" -#endif /*CONFIG_H*/ +/* Set if we have APT support */ +#cmakedefine HAVE_APT_SUPPORT + +/* Set if we have stemming support */ +#cmakedefine HAVE_STEMMING + +#endif /* CONFIG_H */ diff -Nru appstream-0.9.4/contrib/apt-conf/50appstream appstream-0.12.0/contrib/apt-conf/50appstream --- appstream-0.9.4/contrib/apt-conf/50appstream 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/contrib/apt-conf/50appstream 2018-04-04 15:53:56.000000000 +0000 @@ -12,6 +12,18 @@ KeepCompressedAs "gz"; }; + # Small icons for GUI components described in the DEP-11 + # YAML metadata. + deb::DEP-11-icons-small { + MetaKey "$(COMPONENT)/dep11/icons-48x48.tar"; + ShortDescription "icons-48x48"; + Description "$(RELEASE)/$(COMPONENT) DEP-11 48x48 Icons"; + + KeepCompressed "true"; + KeepCompressedAs "gz"; + DefaultEnabled "false"; + }; + # Normal-sized icons for GUI components described in the DEP-11 # YAML metadata. deb::DEP-11-icons { @@ -21,11 +33,23 @@ KeepCompressed "true"; KeepCompressedAs "gz"; + DefaultEnabled "false"; }; # Icons suitable for HiDPI displays, for GUI components described in # the DEP-11 YAML metadata. deb::DEP-11-icons-hidpi { + MetaKey "$(COMPONENT)/dep11/icons-64x64@2.tar"; + ShortDescription "icons-64x64@2"; + Description "$(RELEASE)/$(COMPONENT) DEP-11 64x64@2 Icons"; + + KeepCompressed "true"; + KeepCompressedAs "gz"; + DefaultEnabled "false"; + }; + + # Larger icons that are often used on HiDPI displays as fallback. + deb::DEP-11-icons-large { MetaKey "$(COMPONENT)/dep11/icons-128x128.tar"; ShortDescription "icons-128x128"; Description "$(RELEASE)/$(COMPONENT) DEP-11 128x128 Icons"; @@ -34,9 +58,20 @@ KeepCompressedAs "gz"; DefaultEnabled "false"; }; + + # Even larger icons that are used on HiDPI displays. + deb::DEP-11-icons-large-hidpi { + MetaKey "$(COMPONENT)/dep11/icons-128x128@2.tar"; + ShortDescription "icons-128x128@2"; + Description "$(RELEASE)/$(COMPONENT) DEP-11 128x128@2 Icons"; + + KeepCompressed "true"; + KeepCompressedAs "gz"; + DefaultEnabled "false"; + }; }; # Refresh AppStream cache when APT's cache is updated (i.e. apt update) APT::Update::Post-Invoke-Success { - "if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi"; + "if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi"; }; diff -Nru appstream-0.9.4/contrib/apt-conf/60icons appstream-0.12.0/contrib/apt-conf/60icons --- appstream-0.9.4/contrib/apt-conf/60icons 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/contrib/apt-conf/60icons 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,16 @@ +## This file enables the download of small-size 64x64px +## icons for use in software centers like GNOME Software +## and Plasma Discover. +## +## The icons are required for software centers to function +## correctly. Applications without an icon will not be +## displayed at all. + +Acquire::IndexTargets { + deb::DEP-11-icons-small { + DefaultEnabled "true"; + }; + deb::DEP-11-icons { + DefaultEnabled "true"; + }; +}; diff -Nru appstream-0.9.4/contrib/apt-conf/60icons-hidpi appstream-0.12.0/contrib/apt-conf/60icons-hidpi --- appstream-0.9.4/contrib/apt-conf/60icons-hidpi 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/contrib/apt-conf/60icons-hidpi 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,9 @@ +## This file enables the download of 64x64px icons +## suitable for HiDPI displays for use in software +## centers like GNOME Software and Plasma Discover. + +Acquire::IndexTargets { + deb::DEP-11-icons-hidpi { + DefaultEnabled "true"; + }; +}; diff -Nru appstream-0.9.4/contrib/apt-conf/60icons-large appstream-0.12.0/contrib/apt-conf/60icons-large --- appstream-0.9.4/contrib/apt-conf/60icons-large 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/contrib/apt-conf/60icons-large 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,12 @@ +## This file enables the download of large 128x128px +## icons for use in software centers like GNOME Software +## and Plasma Discover. +## +## The icons speed up usage of the software centers, +## and would otherwise be downloaded on-deman for each user. + +Acquire::IndexTargets { + deb::DEP-11-icons-large { + DefaultEnabled "true"; + }; +}; diff -Nru appstream-0.9.4/contrib/apt-conf/60icons-large-hidpi appstream-0.12.0/contrib/apt-conf/60icons-large-hidpi --- appstream-0.9.4/contrib/apt-conf/60icons-large-hidpi 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/contrib/apt-conf/60icons-large-hidpi 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,9 @@ +## This file enables the download of 128x128px icons +## suitable for HiDPI displays for use in software +## centers like GNOME Software and Plasma Discover. + +Acquire::IndexTargets { + deb::DEP-11-icons-hidpi { + DefaultEnabled "true"; + }; +}; diff -Nru appstream-0.9.4/contrib/apt-conf/CMakeLists.txt appstream-0.12.0/contrib/apt-conf/CMakeLists.txt --- appstream-0.9.4/contrib/apt-conf/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/contrib/apt-conf/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ - -install(FILES 50appstream DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/apt/apt.conf.d/) diff -Nru appstream-0.9.4/contrib/apt-conf/meson.build appstream-0.12.0/contrib/apt-conf/meson.build --- appstream-0.9.4/contrib/apt-conf/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/contrib/apt-conf/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,3 @@ +# Meson definition for apt-conf + +install_data ('50appstream', install_dir: '/etc/apt/apt.conf.d/') diff -Nru appstream-0.9.4/contrib/CMakeLists.txt appstream-0.12.0/contrib/CMakeLists.txt --- appstream-0.9.4/contrib/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/contrib/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - -add_subdirectory(its) -if(VAPI) - add_subdirectory(vapi) -endif() -if(APT_SUPPORT) - add_subdirectory(apt-conf) -endif() diff -Nru appstream-0.9.4/contrib/its/CMakeLists.txt appstream-0.12.0/contrib/its/CMakeLists.txt --- appstream-0.9.4/contrib/its/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/contrib/its/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# Gettext ITS information for MetaInfo files - -install(FILES metainfo.its metainfo.loc DESTINATION share/gettext/its) diff -Nru appstream-0.9.4/contrib/its/metainfo.its appstream-0.12.0/contrib/its/metainfo.its --- appstream-0.9.4/contrib/its/metainfo.its 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/contrib/its/metainfo.its 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ - - - - - diff -Nru appstream-0.9.4/contrib/its/metainfo.loc appstream-0.12.0/contrib/its/metainfo.loc --- appstream-0.9.4/contrib/its/metainfo.loc 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/contrib/its/metainfo.loc 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -Nru appstream-0.9.4/contrib/meson/update-linguas.sh appstream-0.12.0/contrib/meson/update-linguas.sh --- appstream-0.9.4/contrib/meson/update-linguas.sh 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/contrib/meson/update-linguas.sh 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,8 @@ +#!/bin/sh + +find ${MESON_SOURCE_ROOT}/po \ + -type f \ + -iname "*.po" \ + -printf '%f\n' \ + | grep -oP '.*(?=[.])' | sort \ + > ${MESON_SOURCE_ROOT}/po/LINGUAS diff -Nru appstream-0.9.4/contrib/meson.build appstream-0.12.0/contrib/meson.build --- appstream-0.9.4/contrib/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/contrib/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,8 @@ +# Meson definition for AppStream contrib + +if get_option('vapi') and get_option('gir') + subdir('vapi/') +endif +if get_option('apt-support') + subdir('apt-conf/') +endif diff -Nru appstream-0.9.4/contrib/vapi/appstream.deps appstream-0.12.0/contrib/vapi/appstream.deps --- appstream-0.9.4/contrib/vapi/appstream.deps 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/contrib/vapi/appstream.deps 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1 @@ +gio-2.0 diff -Nru appstream-0.9.4/contrib/vapi/CMakeLists.txt appstream-0.12.0/contrib/vapi/CMakeLists.txt --- appstream-0.9.4/contrib/vapi/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/contrib/vapi/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# Vala API - -set(APPSTREAM_VAPI_FILE "${CMAKE_CURRENT_BINARY_DIR}/appstream.vapi") - -find_program (VAPIGEN vapigen) -mark_as_advanced (VAPIGEN) -if (VAPIGEN STREQUAL "VAPIGEN-NOTFOUND") - message (FATAL_ERROR "Vapigen was not found. Please install it in order to generate Vala API files!") -endif (VAPIGEN STREQUAL "VAPIGEN-NOTFOUND") - -add_custom_command (OUTPUT ${APPSTREAM_VAPI_FILE} - COMMAND ${VAPIGEN} --metadatadir=${CMAKE_CURRENT_SOURCE_DIR} -d . --vapidir=${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR}/src/AppStream-1.0.gir - --library=appstream - --pkg glib-2.0 --pkg gio-2.0 --pkg gobject-2.0 - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS appstream ${CMAKE_BINARY_DIR}/src/AppStream-1.0.typelib - VERBATIM -) -add_custom_target(vapi ALL DEPENDS ${APPSTREAM_VAPI_FILE}) - -install(FILES ${APPSTREAM_VAPI_FILE} DESTINATION share/vala/vapi) diff -Nru appstream-0.9.4/contrib/vapi/meson.build appstream-0.12.0/contrib/vapi/meson.build --- appstream-0.9.4/contrib/vapi/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/contrib/vapi/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,11 @@ +# Meson definition for AppStream VAPI + +glib.generate_vapi ('appstream', + sources: [as_gir], + packages: ['glib-2.0', + 'gio-2.0', + 'gobject-2.0'], + install: true, + metadata_dirs: ['.'], + vapi_dirs: ['.'] +) diff -Nru appstream-0.9.4/data/appstream.conf appstream-0.12.0/data/appstream.conf --- appstream-0.9.4/data/appstream.conf 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/appstream.conf 2018-04-04 15:53:56.000000000 +0000 @@ -7,6 +7,18 @@ [general] +# +# Set this value to have AppStream always prefer data from a local metainfo file +# over data provided from a network source. +# This option is only useful in case one wants to test how data from local +# metainfo files looks like in the software center prior to making a release +# containing the new metadata. +# +#PreferLocalMetainfoData=true + +# +# Distribution specific settings +# [debian] ScreenshotUrl=http://screenshots.debian.net diff -Nru appstream-0.9.4/data/categories.xml appstream-0.12.0/data/categories.xml --- appstream-0.9.4/data/categories.xml 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/categories.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,551 +0,0 @@ - - - - Accessories - Utility.directory - - - Utility - - Accessibility - - - - - - Universal Access - Utility-Accessibility.directory - preferences-desktop-accessibility - - - Accessibility - - Settings - - - - - - Developer Tools - applications-development - Development.directory - - Development - emacs.desktop - - - Debugging - applications-debugging - - Debugging - - - - Graphic Interface Design - applications-interfacedesign - - GUIDesigner - - - - - IDEs - applications-ide - - IDE - - - - - - - Localization - preferences-desktop-locale - - - Translation - - - - - - - - Profiling - applications-profiling - - Profiling - - - - - - Version Control - applications-versioncontrol - - - - RevisionControl - - - - - Web Development - applications-internet - kde-development-webdevelopment.directory - - - WebDevelopment - - - - - - Education - Education.directory - applications-education - - - Education - - Science - - - - - - Science & Engineering - applications-science - kde-science.directory - - - Science - Engineering - - - - Astronomy - applications-astronomy - - Astronomy - - - - Biology - applications-biology - - Biology - - - - Chemistry - applications-science - - Chemistry - - - - Computer Science & Robotics - computer - - - ArtificialIntelligence - ComputerScience - Robotics - - - - - Electronics - cpu - - Electronics - - - - Engineering - applications-engineering - - Engineering - - - - Geography - applications-geography - - Geography - - - - Geology - applications-geology - - - Geology - Geoscience - - - - - Mathematics - applications-mathematics - kde-edu-mathematics.directory - - - DataVisualization - Math - NumericalAnalysis - - - - - - Physics - applications-physics - - Physics - - - - - Fonts - preferences-desktop-font - fonts - - - Games - kde-games.directory - applications-games - - - Game - - - - Arcade - applications-arcade - kde-games-arcade.directory - - ArcadeGame - - - - Board Games - applications-boardgames - kde-games-board.directory - - BoardGame - - - - Card Games - applications-cardgames - kde-games-card.directory - - CardGame - - - - Puzzles - applications-puzzles - kde-games-logic.directory - - LogicGame - - - - Role Playing - meeting-attending - - RolePlaying - - - - Simulation - input-gaming - - Simulation - - - - Sports - SportsGames.directory - applications-toys - - SportsGame - - - - - Graphics - applications-graphics - Graphics.directory - - - Graphics - - - - 3D - applications-3D - - - 3DGraphics - - - - - Drawing - applications-drawing - - - VectorGraphics - - - - - Painting & Editing - preferences-desktop-color - - - RasterGraphics - - - - - Photography - camera-photo - - - Photography - - - - - Publishing - applications-publishing - - - Publishing - - - - - Scanning & OCR - scanner - - - Scanning - OCR - - - - - Viewers - layer-visible-on - - - Viewer - - - - - - Internet - kde-internet.directory - applications-internet - - - Network - - - - Chat - applications-chat - - - InstantMessaging - - - - - File Sharing - preferences-system-network-sharing - - - FileTransfer - - - - - Mail - view-pim-mail - - - Email - - - - - Web Browsers - applications-webbrowsers - - - WebBrowser - - - - - - Multimedia - kde-multimedia.directory - applications-multimedia - - - AudioVideo - - - - - Office - kde-office.directory - applications-office - - - Office - - - - - Themes & Tweaks - preferences-other - - Settings - - - - - - - - - - - diff -Nru appstream-0.9.4/data/cmake/COPYING-CMAKE-SCRIPTS appstream-0.12.0/data/cmake/COPYING-CMAKE-SCRIPTS --- appstream-0.9.4/data/cmake/COPYING-CMAKE-SCRIPTS 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/cmake/COPYING-CMAKE-SCRIPTS 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -Nru appstream-0.9.4/data/cmake/documentation.cmake appstream-0.12.0/data/cmake/documentation.cmake --- appstream-0.9.4/data/cmake/documentation.cmake 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/cmake/documentation.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -# Copyright (C) 2009 Julian Andres Klode . -# Licensed under GPLv2 or later. - -macro(add_debiandoc target sourcefiles installdest) - foreach(file ${sourcefiles}) - get_filename_component(relfile ${file} NAME) - string(REPLACE ".sgml" "" manual ${relfile}) - get_filename_component(absolute ${file} ABSOLUTE) - - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${manual}.html - COMMAND debiandoc2html ${absolute} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS ${file} - ) - set(commands ${commands} ${CMAKE_CURRENT_BINARY_DIR}/${manual}.html) - if (NOT ${installdest} EQUAL "" ) - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${manual}.html - DESTINATION ${installdest}) - endif (NOT ${installdest} EQUAL "" ) - endforeach(file ${sourcefiles}) - - add_custom_target(${target} ALL DEPENDS ${commands}) -endmacro(add_debiandoc target sourcefiles installdest) - - -macro(add_po4a type master po target deps) - add_custom_command(OUTPUT ${target} - COMMAND po4a-translate --keep 0 -f ${type} -m ${master} - -p ${po} -l ${target} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${deps} ${master} ${po}) -endmacro(add_po4a type master po target deps) - - -# Macro for XML man pages. -macro(add_xml_manpages target manpages translations entities) - foreach(manpage ${manpages}) - string(LENGTH ${manpage} manpage_length) - math(EXPR manpage_length ${manpage_length}-1) - string(SUBSTRING ${manpage} ${manpage_length} 1 section) - get_filename_component(manpage_name "${manpage}" NAME) - - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${manpage_name} - COMMAND xmlto man ${CMAKE_CURRENT_SOURCE_DIR}/${manpage}.xml - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${manpage}.xml - ) - - - set(commands ${commands} ${CMAKE_CURRENT_BINARY_DIR}/${manpage_name}) - - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${manpage_name} - DESTINATION share/man/man${section}) - - # Add the translations for the manpage. - foreach(translation ${translations}) - set(entities) - # transdir = shortcut to the output directory for translations. - set(transdir ${CMAKE_CURRENT_BINARY_DIR}/${translation}) - - foreach(entity ${entities}) - add_custom_command(OUTPUT ${transdir}/${entity} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${CMAKE_COMMAND} -E make_directory ${transdir} - COMMAND ${CMAKE_COMMAND} -E copy ${entity} ${transdir}) - set(ent_cmds ${ent_cmds} ${transdir}/${entity}) - endforeach(entity ${entities}) - - - - add_po4a(docbook ${manpage}.xml po/${translation}.po - ${transdir}/${manpage}.xml "${ent_cmds}") - - - add_custom_command(OUTPUT ${transdir}/${manpage} - COMMAND xmlto -o ${transdir} man ${transdir}/${manpage}.xml - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${transdir}/${manpage}.xml) - - set(nls-cmd ${nls-cmd} ${transdir}/${manpage}) - install(FILES ${transdir}/${manpage} - DESTINATION share/man/${translation}/man${section}) - - endforeach(translation ${translations}) - endforeach(manpage ${manpages}) - - add_custom_target(${target} ALL DEPENDS ${commands}) - # Sort the list of the translations. - #list(SORT nls-cmd) - add_custom_target(nls-${target} ALL DEPENDS ${nls-cmd}) -endmacro(add_xml_manpages manpages) - - -macro(add_manpages target manpages translations) - foreach(man ${manpages}) - string(LENGTH ${man} manpage_length) - math(EXPR manpage_length ${manpage_length}-1) - string(SUBSTRING ${man} ${manpage_length} 1 section) - install(FILES ${man} DESTINATION share/man/man${section}) - - if (USE_NLS) - foreach(translation ${translations}) - set(transdir ${CMAKE_CURRENT_BINARY_DIR}/${translation}) - add_po4a(man ${man} po/${translation}.po ${transdir}/${man} "") - install(FILES ${transdir}/${man} - DESTINATION share/man/${translation}/man${section}) - set(files ${files} ${transdir}/${man}) - endforeach(translation ${translations}) - endif(USE_NLS) - endforeach(man ${manpages}) - add_custom_target(${target} ALL DEPENDS ${files}) -endmacro(add_manpages target manpages translations) diff -Nru appstream-0.9.4/data/cmake/FindGI.cmake appstream-0.12.0/data/cmake/FindGI.cmake --- appstream-0.9.4/data/cmake/FindGI.cmake 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/cmake/FindGI.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -# - try to find gobject-introspection -# -# Once done this will define -# -# INTROSPECTION_FOUND - system has gobject-introspection -# INTROSPECTION_SCANNER - the gobject-introspection scanner, g-ir-scanner -# INTROSPECTION_COMPILER - the gobject-introspection compiler, g-ir-compiler -# INTROSPECTION_GENERATE - the gobject-introspection generate, g-ir-generate -# INTROSPECTION_GIRDIR -# INTROSPECTION_TYPELIBDIR -# INTROSPECTION_CFLAGS -# INTROSPECTION_LIBS -# -# Copyright (C) 2010, Pino Toscano, -# 2011, Matthias Klumpp -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname) - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${_varname} gobject-introspection-1.0 - OUTPUT_VARIABLE _result - RESULT_VARIABLE _null - ) - - if (_null) - else() - string(REGEX REPLACE "[\r\n]" " " _result "${_result}") - string(REGEX REPLACE " +$" "" _result "${_result}") - separate_arguments(_result) - set(${_outvar} ${_result} CACHE INTERNAL "") - endif() -endmacro(_GIR_GET_PKGCONFIG_VAR) - -find_package(PkgConfig) -if(PKG_CONFIG_FOUND) - if(PACKAGE_FIND_VERSION_COUNT GREATER 0) - set(_gir_version_cmp ">=${PACKAGE_FIND_VERSION}") - endif() - pkg_check_modules(_pc_gir gobject-introspection-1.0${_gir_version_cmp}) - if(_pc_gir_FOUND) - set(INTROSPECTION_FOUND TRUE) - _gir_get_pkgconfig_var(INTROSPECTION_SCANNER "g_ir_scanner") - _gir_get_pkgconfig_var(INTROSPECTION_COMPILER "g_ir_compiler") - _gir_get_pkgconfig_var(INTROSPECTION_GENERATE "g_ir_generate") - _gir_get_pkgconfig_var(INTROSPECTION_GIRDIR "girdir") - _gir_get_pkgconfig_var(INTROSPECTION_TYPELIBDIR "typelibdir") - set(INTROSPECTION_CFLAGS "${_pc_gir_CFLAGS}") - set(INTROSPECTION_LIBS "${_pc_gir_LIBS}") - endif() -endif() - -mark_as_advanced( - INTROSPECTION_SCANNER - INTROSPECTION_COMPILER - INTROSPECTION_GENERATE - INTROSPECTION_GIRDIR - INTROSPECTION_TYPELIBDIR - INTROSPECTION_CFLAGS - INTROSPECTION_LIBS -) - -function(find_gir id name) - set(valid_args REQUIRED) - # repack the arguments - set(ARGS) - set(ESSENTIAL FALSE) - foreach(arg ${ARGN}) - if (arg STREQUAL "REQUIRED") - set(ESSENTIAL TRUE) - endif() - endforeach() - - if (NOT ${id}_GI) - - find_file(${id}_GI "${name}.gir" PATHS ${INTROSPECTION_GIRDIR}) - - if (ESSENTIAL AND NOT ${id}_GI}) - message(FATAL_ERROR "GIR for ${name} was not found! Please install the introspection data!") - else (ARGS_REQUIRED) - set(${id}_FOUND TRUE) - endif (ESSENTIAL AND NOT ${id}_GI}) - - endif (NOT ${id}_GI) - -endfunction() diff -Nru appstream-0.9.4/data/cmake/FindGLIB2.cmake appstream-0.12.0/data/cmake/FindGLIB2.cmake --- appstream-0.9.4/data/cmake/FindGLIB2.cmake 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/cmake/FindGLIB2.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -# - Try to find the GLIB2 libraries -# Once done this will define -# -# GLIB2_FOUND - system has glib2 -# GLIB2_INCLUDE_DIR - the glib2 include directory -# GLIB2_LIBRARIES - glib2 library - -# Copyright (c) 2008 Laurent Montel, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) - # Already in cache, be silent - set(GLIB2_FIND_QUIETLY TRUE) -endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) - -find_package(PkgConfig) -pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0) - -find_path(GLIB2_MAIN_INCLUDE_DIR - NAMES glib.h - HINTS ${PC_LibGLIB2_INCLUDEDIR} - PATH_SUFFIXES glib-2.0) - -find_library(GLIB2_LIBRARY - NAMES glib-2.0 - HINTS ${PC_LibGLIB2_LIBDIR} -) - -set(GLIB2_LIBRARIES ${GLIB2_LIBRARY}) - -# search the glibconfig.h include dir under the same root where the library is found -get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) - -find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h - PATH_SUFFIXES glib-2.0/include - HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}) - -set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}") - -# not sure if this include dir is optional or required -# for now it is optional -if(GLIB2_INTERNAL_INCLUDE_DIR) - set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}") -endif(GLIB2_INTERNAL_INCLUDE_DIR) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR) - -mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES) diff -Nru appstream-0.9.4/data/cmake/FindGtkDoc.cmake appstream-0.12.0/data/cmake/FindGtkDoc.cmake --- appstream-0.9.4/data/cmake/FindGtkDoc.cmake 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/cmake/FindGtkDoc.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -# CMake macros to find the GtkDoc documentation system - -# Output variables: -# -# GTKDOC_FOUND ... set to 1 if GtkDoc was foung -# -# If GTKDOC_FOUND == 1: -# -# GTKDOC_SCAN_EXE ... the location of the gtkdoc-scan executable -# GTKDOC_SCANGOBJ_EXE ... the location of the gtkdoc-scangobj executable -# GTKDOC_MKTMPL_EXE ... the location of the gtkdoc-mktmpl executable -# GTKDOC_MKDB_EXE ... the location of the gtkdoc-mkdb executable -# GTKDOC_MKHTML_EXE ... the location of the gtkdoc-mkhtml executable -# GTKDOC_FIXXREF_EXE ... the location of the gtkdoc-fixxref executable - -set(GTKDOC_FOUND 1) - -find_program(GTKDOC_SCAN_EXE gtkdoc-scan PATH "${GLIB_PREFIX}/bin") -if(NOT GTKDOC_SCAN_EXE) -message(STATUS "gtkdoc-scan not found") - set(GTKDOC_FOUND 0) -endif(NOT GTKDOC_SCAN_EXE) - -find_program(GTKDOC_SCANGOBJ_EXE gtkdoc-scangobj PATH "${GLIB_PREFIX}/bin") -if(NOT GTKDOC_SCANGOBJ_EXE) -message(STATUS "gtkdoc-scangobj not found") - set(GTKDOC_FOUND 0) -endif(NOT GTKDOC_SCANGOBJ_EXE) - -get_filename_component(_this_dir ${CMAKE_CURRENT_LIST_FILE} PATH) -find_file(GTKDOC_SCANGOBJ_WRAPPER GtkDocScanGObjWrapper.cmake PATH ${_this_dir}) -if(NOT GTKDOC_SCANGOBJ_WRAPPER) -message(STATUS "GtkDocScanGObjWrapper.cmake not found") - set(GTKDOC_FOUND 0) -endif(NOT GTKDOC_SCANGOBJ_WRAPPER) - -find_program(GTKDOC_MKTMPL_EXE gtkdoc-mktmpl PATH "${GLIB_PREFIX}/bin") -if(NOT GTKDOC_MKTMPL_EXE) -message(STATUS "gtkdoc-mktmpl not found") - set(GTKDOC_FOUND 0) -endif(NOT GTKDOC_MKTMPL_EXE) - -find_program(GTKDOC_MKDB_EXE gtkdoc-mkdb PATH "${GLIB_PREFIX}/bin") -if(NOT GTKDOC_MKDB_EXE) -message(STATUS "gtkdoc-mkdb not found") - set(GTKDOC_FOUND 0) -endif(NOT GTKDOC_MKDB_EXE) - -find_program(GTKDOC_MKHTML_EXE gtkdoc-mkhtml PATH "${GLIB_PREFIX}/bin") -if(NOT GTKDOC_MKHTML_EXE) -message(STATUS "gtkdoc-mkhtml not found") - set(GTKDOC_FOUND 0) -endif(NOT GTKDOC_MKHTML_EXE) - -find_program(GTKDOC_FIXXREF_EXE gtkdoc-fixxref PATH "${GLIB_PREFIX}/bin") -if(NOT GTKDOC_FIXXREF_EXE) -message(STATUS "gtkdoc-fixxref not found") - set(GTKDOC_FOUND 0) -endif(NOT GTKDOC_FIXXREF_EXE) - -# vim:sw=4:ts=4:et:autoindent diff -Nru appstream-0.9.4/data/cmake/GObjectIntrospectionMacros.cmake appstream-0.12.0/data/cmake/GObjectIntrospectionMacros.cmake --- appstream-0.9.4/data/cmake/GObjectIntrospectionMacros.cmake 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/cmake/GObjectIntrospectionMacros.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -# Copyright (C) 2010, Pino Toscano, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -macro(_gir_list_prefix _outvar _listvar _prefix) - set(${_outvar}) - foreach(_item IN LISTS ${_listvar}) - list(APPEND ${_outvar} ${_prefix}${_item}) - endforeach() -endmacro(_gir_list_prefix) - -macro(gir_add_introspections introspections_girs) - - set(_gir_girs) - set(_gir_typelibs) - - foreach(gir IN LISTS ${introspections_girs}) - - set(_gir_name "${gir}") - - ## Transform the gir filename to something which can reference through a variable - ## without automake/make complaining, eg Gtk-2.0.gir -> Gtk_2_0_gir - string(REPLACE "-" "_" _gir_name "${_gir_name}") - string(REPLACE "." "_" _gir_name "${_gir_name}") - - # Namespace and Version is either fetched from the gir filename - # or the _NAMESPACE/_VERSION variable combo - set(_gir_namespace "${${_gir_name}_NAMESPACE}") - if (_gir_namespace STREQUAL "") - string(REGEX REPLACE "([^-]+)-.*" "\\1" _gir_namespace "${gir}") - endif () - set(_gir_version "${${_gir_name}_VERSION}") - if (_gir_version STREQUAL "") - string(REGEX REPLACE ".*-([^-]+).gir" "\\1" _gir_version "${gir}") - endif () - - # _PROGRAM is an optional variable which needs it's own --program argument - set(_gir_program "${${_gir_name}_PROGRAM}") - if (NOT _gir_program STREQUAL "") - set(_gir_program "--program=${_gir_program}") - endif () - - # Variables which provides a list of things - _gir_list_prefix(_gir_libraries ${_gir_name}_LIBS "--library=") - _gir_list_prefix(_gir_packages ${_gir_name}_PACKAGES "--pkg=") - _gir_list_prefix(_gir_includes ${_gir_name}_INCLUDES "--include=") - _gir_list_prefix(_gir_export_packages ${_gir_name}_EXPORT_PACKAGES "--pkg-export=") - - # Reuse the LIBTOOL variable from by automake if it's set - set(_gir_libtool "--no-libtool") - - add_custom_command( - COMMAND ${INTROSPECTION_SCANNER} - ${INTROSPECTION_SCANNER_ARGS} - --namespace=${_gir_namespace} - --nsversion=${_gir_version} - ${_gir_libtool} - ${_gir_program} - ${_gir_libraries} - ${_gir_packages} - ${_gir_includes} - ${_gir_export_packages} - ${${_gir_name}_SCANNERFLAGS} - ${${_gir_name}_CFLAGS} - ${${_gir_name}_FILES} - --output ${CMAKE_CURRENT_BINARY_DIR}/${gir} - DEPENDS ${${_gir_name}_FILES} - ${${_gir_name}_LIBS} - OUTPUT ${gir} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - ) - list(APPEND _gir_girs ${CMAKE_CURRENT_BINARY_DIR}/${gir}) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${gir} DESTINATION share/gir-1.0) - - string(REPLACE ".gir" ".typelib" _typelib "${gir}") - add_custom_command( - COMMAND ${INTROSPECTION_COMPILER} - ${INTROSPECTION_COMPILER_ARGS} - --includedir=. - ${CMAKE_CURRENT_BINARY_DIR}/${gir} - -o ${CMAKE_CURRENT_BINARY_DIR}/${_typelib} - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${gir} - OUTPUT ${_typelib} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - list(APPEND _gir_typelibs ${CMAKE_CURRENT_BINARY_DIR}/${_typelib}) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_typelib} DESTINATION lib${LIB_SUFFIX}/girepository-1.0) - - endforeach() - - add_custom_target(gir-girs ALL DEPENDS ${_gir_girs}) - add_custom_target(gir-typelibs ALL DEPENDS ${_gir_typelibs}) - -endmacro(gir_add_introspections) diff -Nru appstream-0.9.4/data/cmake/GtkDocScanGObjWrapper.cmake appstream-0.12.0/data/cmake/GtkDocScanGObjWrapper.cmake --- appstream-0.9.4/data/cmake/GtkDocScanGObjWrapper.cmake 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/cmake/GtkDocScanGObjWrapper.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -if(NOT APPLE) - # We use pkg-config to fing glib et al - find_package(PkgConfig) - # Find glib et al - pkg_check_modules(GLIB REQUIRED glib-2.0 gobject-2.0) - -foreach(_flag ${EXTRA_CFLAGS} ${GLIB_CFLAGS}) - set(ENV{CFLAGS} "$ENV{CFLAGS} \"${_flag}\"") -endforeach(_flag) - -foreach(_flag ${EXTRA_LDFLAGS} ${GLIB_LDFLAGS}) - set(ENV{LDFLAGS} "$ENV{LDFLAGS} \"${_flag}\"") -endforeach(_flag) - -foreach(_flag ${EXTRA_LDPATH}) - if(ENV{LD_LIBRARY_PATH}) - set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:\"${_flag}\"") - else(ENV{LD_LIBRARY_PATH}) - set(ENV{LD_LIBRARY_PATH} "${_flag}") - endif(ENV{LD_LIBRARY_PATH}) -endforeach(_flag) - -message(STATUS "Executing gtkdoc-scangobj with:") -message(STATUS " CFLAGS: $ENV{CFLAGS}") -message(STATUS " LDFLAGS: $ENV{LDFLAGS}") -message(STATUS " LDPATH: $ENV{LD_LIBRARY_PATH}") - -execute_process(COMMAND ${GTKDOC_SCANGOBJ_EXE} - "--module=${doc_prefix}" - "--types=${output_types}" - "--output-dir=${output_dir}" - WORKING_DIRECTORY "${output_dir}" - RESULT_VARIABLE _scan_result) - -if(_scan_result EQUAL 0) - message(STATUS "Scan succeeded.") -else(_scan_result EQUAL 0) - message(SEND_ERROR "Scan failed.") -endif(_scan_result EQUAL 0) - -endif(NOT APPLE) diff -Nru appstream-0.9.4/data/cmake/StandardOptionParsing.cmake appstream-0.12.0/data/cmake/StandardOptionParsing.cmake --- appstream-0.9.4/data/cmake/StandardOptionParsing.cmake 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/cmake/StandardOptionParsing.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -# CMake macros to parse options - -macro(parse_options _list_names _list_variables) - list(LENGTH ${_list_names} _list_names_length) - list(LENGTH ${_list_variables} _list_variables_length) - #message(STATUS "${_list_names} => ${_list_names_length}") - #message(STATUS "${_list_variables} => ${_list_variables_length}") - - if(NOT _list_names_length EQUAL _list_variables_length) - message(SEND_ERROR "names list must have same length as var list") - endif(NOT _list_names_length EQUAL _list_variables_length) - - set(_list_length ${_list_names_length}) - - # Set each list to be empty initially - foreach(_idx RANGE -${_list_length} -1) - list(GET ${_list_variables} ${_idx} _variable) - set(${_variable} "") - endforeach(_idx RANGE ${_list_length}) - - set(_current_list "") - foreach(_arg ${ARGN}) - set(_skip_arg 0) - - foreach(_idx RANGE -${_list_length} -1) - list(GET ${_list_names} ${_idx} _name) - if(_arg STREQUAL _name) - set(_current_list "${_arg}") - set(_skip_arg 1) - endif(_arg STREQUAL _name) - endforeach(_idx RANGE -${_list_length} -1) - - if(NOT _current_list) - message(SEND_ERROR "Error parsing args (unknown argument '${_arg}').") - set(_skip_arg 1) - endif(NOT _current_list) - - if(NOT _skip_arg) - #message(STATUS "list: '${_current_list}', arg: '${_arg}'") - foreach(_idx RANGE -${_list_length} -1) - list(GET ${_list_names} ${_idx} _name) - if(_current_list STREQUAL _name) - list(GET ${_list_variables} ${_idx} _variable) - list(APPEND ${_variable} "${_arg}") - endif(_current_list STREQUAL _name) - endforeach(_idx RANGE -${_list_length} -1) - endif(NOT _skip_arg) - endforeach(_arg ${ARGN}) -endmacro(parse_options) diff -Nru appstream-0.9.4/data/cmake/UseGtkDoc.cmake appstream-0.12.0/data/cmake/UseGtkDoc.cmake --- appstream-0.9.4/data/cmake/UseGtkDoc.cmake 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/cmake/UseGtkDoc.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,237 +0,0 @@ -# CMake macros to use the GtkDoc documentation system - -include(StandardOptionParsing) -find_package(GtkDoc) - -# gtk_doc_add_module(doc_prefix sourcedir -# [XML xmlfile] -# [FIXXREFOPTS fixxrefoption1...] -# [IGNOREHEADERS header1...] -# [DEPENDS depend1...] ) -# -# sourcedir must be the *full* path to the source directory. -# -# If omitted, sgmlfile defaults to the auto generated ${doc_prefix}/${doc_prefix}-docs.xml. -macro(gtk_doc_add_module _doc_prefix _doc_sourcedir) - set(_list_names "DEPENDS" "XML" "FIXXREFOPTS" "IGNOREHEADERS" - "CFLAGS" "LDFLAGS" "LDPATH" "SUFFIXES" "OUTPUT_DIR") - set(_list_variables "_depends" "_xml_file" "_fixxref_opts" "_ignore_headers" - "_extra_cflags" "_extra_ldflags" "_extra_ldpath" "_suffixes" "_output_dir") - parse_options(_list_names _list_variables ${ARGN}) - - list(LENGTH _xml_file _xml_file_length) - - - if(_suffixes) - set(_doc_source_suffixes "") - foreach(_suffix ${_suffixes}) - if(_doc_source_suffixes) - set(_doc_source_suffixes "${_doc_source_suffixes},${_suffix}") - else(_doc_source_suffixes) - set(_doc_source_suffixes "${_suffix}") - endif(_doc_source_suffixes) - endforeach(_suffix) - else(_suffixes) - set(_doc_source_suffixes "h") - endif(_suffixes) - - # set(_do_all ALL) - - set(_opts_valid 1) - if(NOT _xml_file_length LESS 2) - message(SEND_ERROR "Must have at most one sgml file specified.") - set(_opts_valid 0) - endif(NOT _xml_file_length LESS 2) - - if(_opts_valid) - # a directory to store output. - if(NOT _output_dir) - set(_output_dir "${CMAKE_CURRENT_BINARY_DIR}/${_doc_prefix}") - endif() - set(_output_dir_stamp "${_output_dir}/dir.stamp") - - # set default sgml file if not specified - set(_default_xml_file "${_output_dir}/${_doc_prefix}-docs.xml") - get_filename_component(_default_xml_file ${_default_xml_file} ABSOLUTE) - - # a directory to store html output. - set(_output_html_dir "${_output_dir}/html") - set(_output_html_dir_stamp "${_output_dir}/html_dir.stamp") - - # The output files - set(_output_decl_list "${_output_dir}/${_doc_prefix}-decl-list.txt") - set(_output_decl "${_output_dir}/${_doc_prefix}-decl.txt") - set(_output_overrides "${_output_dir}/${_doc_prefix}-overrides.txt") - set(_output_sections "${_output_dir}/${_doc_prefix}-sections.txt") - set(_output_types "${_output_dir}/${_doc_prefix}.types") - - set(_output_signals "${_output_dir}/${_doc_prefix}.signals") - - set(_output_unused "${_output_dir}/${_doc_prefix}-unused.txt") - set(_output_undeclared "${_output_dir}/${_doc_prefix}-undeclared.txt") - set(_output_undocumented "${_output_dir}/${_doc_prefix}-undocumented.txt") - set(_output_tmpl_dir "${_output_dir}/tmpl") - set(_output_tmpl_stamp "${_output_dir}/tmpl.stamp") - - set(_output_xml_dir "${_output_dir}/xml") - set(_output_sgml_stamp "${_output_dir}/sgml.stamp") - - set(_output_html_stamp "${_output_dir}/html.stamp") - - # add a command to create output directory - add_custom_command( - OUTPUT "${_output_dir_stamp}" "${_output_dir}" - COMMAND ${CMAKE_COMMAND} -E make_directory "${_output_dir}" - COMMAND ${CMAKE_COMMAND} -E touch ${_output_dir_stamp} - VERBATIM) - - set(_ignore_headers_opt "") - if(_ignore_headers) - set(_ignore_headers_opt "--ignore-headers=") - foreach(_header ${_ignore_headers}) - set(_ignore_headers_opt "${_ignore_headers_opt}${_header} ") - endforeach(_header ${_ignore_headers}) - endif(_ignore_headers) - - # add a command to scan the input - add_custom_command( - OUTPUT - "${_output_decl_list}" - "${_output_decl}" - "${_output_decl}.bak" - "${_output_overrides}" - "${_output_sections}" - "${_output_types}" - "${_output_types}.bak" - DEPENDS - "${_output_dir}" - ${_depends} - COMMAND ${GTKDOC_SCAN_EXE} - "--module=${_doc_prefix}" - "${_ignore_headers_opt}" - "--rebuild-sections" - "--rebuild-types" - "--source-dir=${_doc_sourcedir}" - WORKING_DIRECTORY "${_output_dir}" - VERBATIM) - - # add a command to scan the input via gtkdoc-scangobj - # This is such a disgusting hack! - add_custom_command( - OUTPUT - "${_output_signals}" - DEPENDS - "${_output_types}" - COMMAND ${CMAKE_COMMAND} - -D "GTKDOC_SCANGOBJ_EXE:STRING=${GTKDOC_SCANGOBJ_EXE}" - -D "doc_prefix:STRING=${_doc_prefix}" - -D "output_types:STRING=${_output_types}" - -D "output_dir:STRING=${_output_dir}" - -D "EXTRA_CFLAGS:STRING=${_extra_cflags}" - -D "EXTRA_LDFLAGS:STRING=${_extra_ldflags}" - -D "EXTRA_LDPATH:STRING=${_extra_ldpath}" - -P ${GTKDOC_SCANGOBJ_WRAPPER} - WORKING_DIRECTORY "${_output_dir}" - VERBATIM) - - # add a command to make the templates - add_custom_command( - OUTPUT - "${_output_unused}" - "${_output_undeclared}" - "${_output_undocumented}" - "${_output_tmpl_dir}" - "${_output_tmpl_stamp}" - DEPENDS - "${_output_types}" - "${_output_signals}" - "${_output_sections}" - "${_output_overrides}" - ${_depends} - COMMAND ${CMAKE_COMMAND} -E remove_directory ${_output_tmpl_dir} - COMMAND ${GTKDOC_MKTMPL_EXE} - "--module=${_doc_prefix}" - WORKING_DIRECTORY "${_output_dir}" - VERBATIM) - - set(_copy_xml_if_needed "") - if(_xml_file) - get_filename_component(_xml_file ${_xml_file} ABSOLUTE) - set(_copy_xml_if_needed - COMMAND ${CMAKE_COMMAND} -E copy "${_xml_file}" "${_default_xml_file}") - endif(_xml_file) - - set(_remove_xml_if_needed "") - if(_xml_file) - set(_remove_xml_if_needed - COMMAND ${CMAKE_COMMAND} -E remove ${_default_xml_file}) - endif(_xml_file) - - # add a command to make the database - add_custom_command( - OUTPUT - "${_output_sgml_stamp}" - "${_default_xml_file}" - DEPENDS - "${_output_tmpl_stamp}" - ${_depends} - ${_remove_xml_if_needed} - COMMAND ${CMAKE_COMMAND} -E remove_directory ${_output_xml_dir} - COMMAND ${GTKDOC_MKDB_EXE} - "--module=${_doc_prefix}" - "--source-dir=${_doc_sourcedir}" - "--source-suffixes=${_doc_source_suffixes}" - "--output-format=xml" - "--main-sgml-file=${_default_xml_file}" - ${_copy_xml_if_needed} - WORKING_DIRECTORY "${_output_dir}" - VERBATIM) - - # make sure sections info is found by gtkdoc later - add_custom_command( - OUTPUT - "${_output_html_dir}/${_doc_prefix}-sections.txt" - DEPENDS - "${_output_html_dir_stamp}" - "${_output_sgml_stamp}" - "${_output_tmpl_stamp}" - "${_xml_file}" - ${_depends} - COMMAND ${CMAKE_COMMAND} -E copy "${_output_dir}/${_doc_prefix}-sections.txt" "${_output_html_dir}/${_doc_prefix}-sections.txt" - WORKING_DIRECTORY "${_output_dir}" - VERBATIM) - - # add a command to create html directory - add_custom_command( - OUTPUT "${_output_html_dir_stamp}" "${_output_html_dir}" - COMMAND ${CMAKE_COMMAND} -E make_directory ${_output_html_dir} - COMMAND ${CMAKE_COMMAND} -E touch ${_output_html_dir_stamp} - VERBATIM) - - # add a command to output HTML - add_custom_command( - OUTPUT - "${_output_html_stamp}" - DEPENDS - "${_output_html_dir_stamp}" - "${_output_sgml_stamp}" - "${_output_tmpl_stamp}" - "${_xml_file}" - "${_output_html_dir}/${_doc_prefix}-sections.txt" - ${_depends} - ${_copy_xml_if_needed} - COMMAND ${GTKDOC_MKHTML_EXE} - "${_doc_prefix}" - "${_default_xml_file}" - COMMAND ${GTKDOC_FIXXREF_EXE} - "--module=${_doc_prefix}" - "--module-dir=." - ${_fixxref_opts} - ${_remove_xml_if_needed} - WORKING_DIRECTORY "${_output_html_dir}" - VERBATIM) - - add_custom_target(doc-${_doc_prefix} ${_do_all} - DEPENDS "${_output_html_stamp}") - endif(_opts_valid) -endmacro(gtk_doc_add_module) diff -Nru appstream-0.9.4/data/CMakeLists.txt appstream-0.12.0/data/CMakeLists.txt --- appstream-0.9.4/data/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/data/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -# CMakeLists for UAI data directory - -find_program (LC_INTLTOOL_MERGE intltool-merge) -mark_as_advanced (LC_INTLTOOL_MERGE) - -if (LC_INTLTOOL_MERGE STREQUAL "LC_INTLTOOL_MERGE-NOTFOUND") - message (FATAL_ERROR "Intltool was not found! Please install it to continue!") -endif (LC_INTLTOOL_MERGE STREQUAL "LC_INTLTOOL_MERGE-NOTFOUND") - -install(FILES appstream.conf - DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} -) - -install(FILES categories.xml - DESTINATION share/app-info/ -) diff -Nru appstream-0.9.4/data/desktop-environments.txt appstream-0.12.0/data/desktop-environments.txt --- appstream-0.9.4/data/desktop-environments.txt 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/data/desktop-environments.txt 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,10 @@ +# List of desktop environments +GNOME +KDE +Plasma +LXQt +MATE +Unity +XFCE +Cinnamon +Pantheon diff -Nru appstream-0.9.4/data/iana-filtered-tld-list.txt appstream-0.12.0/data/iana-filtered-tld-list.txt --- appstream-0.9.4/data/iana-filtered-tld-list.txt 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/data/iana-filtered-tld-list.txt 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,691 @@ +# IANA TLDs we recognize for AppStream IDs. +# Derived from the full list at https://data.iana.org/TLD/tlds-alpha-by-domain.txt +# Last updated on 2018-03-07 +aaa +aarp +abb +abc +able +ac +aco +ad +adac +ads +ae +aeg +aero +af +afl +ag +ai +aig +aigo +akdn +al +ally +am +amex +anz +ao +aol +app +aq +ar +arab +army +arpa +art +arte +as +asda +asia +at +au +audi +auto +aw +aws +ax +axa +az +ba +baby +band +bank +bar +bb +bbc +bbt +bbva +bcg +bcn +bd +be +beer +best +bet +bf +bg +bh +bi +bid +bike +bing +bio +biz +bj +blog +blue +bm +bms +bmw +bn +bnl +bo +bofa +bom +bond +boo +book +bot +box +br +bs +bt +buy +buzz +bv +bw +by +bz +bzh +ca +cab +cafe +cal +call +cam +camp +car +care +cars +casa +case +cash +cat +cba +cbn +cbre +cbs +cc +cd +ceb +ceo +cern +cf +cfa +cfd +cg +ch +chat +ci +citi +city +ck +cl +club +cm +cn +co +com +cool +coop +cr +crs +csc +cu +cv +cw +cx +cy +cyou +cz +dad +data +date +day +dclk +dds +de +deal +dell +desi +dev +dhl +diet +dish +diy +dj +dk +dm +dnp +do +docs +dog +doha +dot +dtv +duck +duns +dvag +dvr +dz +eat +ec +eco +edu +ee +eg +er +erni +es +esq +et +eu +eus +fage +fail +fan +fans +farm +fast +fi +fiat +fido +film +fire +fish +fit +fj +fk +flir +fly +fm +fo +foo +food +ford +fox +fr +free +frl +ftr +fun +fund +fyi +ga +gal +game +gap +gb +gbiz +gd +gdn +ge +gea +gent +gf +gg +ggee +gh +gi +gift +gl +gle +gm +gmbh +gmo +gmx +gn +gold +golf +goo +goog +gop +got +gov +gp +gq +gr +gs +gt +gu +guge +guru +gw +gy +hair +haus +hbo +hdfc +help +here +hgtv +hiv +hk +hkt +hm +hn +host +hot +how +hr +hsbc +ht +hu +ibm +icbc +ice +icu +id +ie +ieee +ifm +il +im +imdb +immo +in +info +ing +ink +int +io +iq +ir +is +ist +it +itau +itv +iwc +java +jcb +jcp +je +jeep +jio +jlc +jll +jm +jmp +jnj +jo +jobs +jot +joy +jp +jprs +kddi +ke +kfh +kg +kh +ki +kia +kim +kiwi +km +kn +kp +kpmg +kpn +kr +krd +kred +kw +ky +kz +la +land +lat +law +lb +lc +lds +lego +lgbt +li +lidl +life +like +limo +link +live +lk +llc +loan +loft +lol +love +lpl +lr +ls +lt +ltd +ltda +lu +luxe +lv +ly +ma +maif +man +map +mba +mc +md +me +med +meet +meme +men +menu +meo +mg +mh +mil +mini +mint +mit +mk +ml +mlb +mls +mm +mma +mn +mo +mobi +moda +moe +moi +mom +moto +mov +mp +mq +mr +ms +msd +mt +mtn +mtr +mu +mv +mw +mx +my +mz +na +nab +name +navy +nba +nc +ne +nec +net +new +news +next +nf +nfl +ng +ngo +nhk +ni +nico +nike +nl +no +now +np +nr +nra +nrw +ntt +nu +nyc +nz +obi +off +ollo +om +one +ong +onl +ooo +open +org +ott +ovh +pa +page +pars +pay +pccw +pe +pet +pf +pg +ph +phd +pics +pid +pin +ping +pink +pk +pl +play +plus +pm +pn +pnc +pohl +porn +post +pr +pro +prod +prof +pru +ps +pt +pub +pw +pwc +py +qa +qpon +qvc +raid +re +read +red +reit +ren +rent +rest +rich +ril +rio +rip +rmit +ro +room +rs +rsvp +ru +ruhr +run +rw +rwe +sa +safe +sale +sap +sapo +sarl +sas +save +saxo +sb +sbi +sbs +sc +sca +scb +scor +scot +sd +se +seat +seek +ses +sew +sex +sexy +sfr +sg +sh +shaw +shia +shop +show +si +silk +sina +site +sj +sk +ski +skin +sky +sl +sm +sn +sncf +so +sohu +song +sony +soy +spot +sr +srl +srt +st +star +stc +su +surf +sv +sx +sy +sz +tab +talk +tax +taxi +tc +tci +td +tdk +team +tech +tel +teva +tf +tg +th +thd +tiaa +tips +tj +tjx +tk +tl +tm +tn +to +top +town +toys +tr +trv +tt +tube +tui +tv +tvs +tw +tz +ua +ubs +ug +uk +uno +uol +ups +us +uy +uz +va +vana +vc +ve +vet +vg +vi +vig +vin +vip +visa +viva +vivo +vn +vote +voto +vu +wang +wed +weir +wf +wien +wiki +win +wine +wme +work +wow +ws +wtc +wtf +xbox +xin +xxx +xyz +ye +yoga +you +yt +yun +za +zara +zero +zip +zm +zone +zw diff -Nru appstream-0.9.4/data/its/metainfo.its appstream-0.12.0/data/its/metainfo.its --- appstream-0.9.4/data/its/metainfo.its 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/data/its/metainfo.its 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,11 @@ + + + + + diff -Nru appstream-0.9.4/data/its/metainfo.loc appstream-0.12.0/data/its/metainfo.loc --- appstream-0.9.4/data/its/metainfo.loc 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/data/its/metainfo.loc 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,9 @@ + + + + + + + + + diff -Nru appstream-0.9.4/data/meson.build appstream-0.12.0/data/meson.build --- appstream-0.9.4/data/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/data/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,16 @@ +# Meson definition for AppStream data + +install_data ('its/metainfo.its', install_dir: 'share/gettext/its') +install_data ('its/metainfo.loc', install_dir: 'share/gettext/its') + +i18n.merge_file ( + input: 'org.freedesktop.appstream.cli.metainfo.xml', + output: 'org.freedesktop.appstream.cli.metainfo.xml', + type: 'xml', + data_dirs: [meson.current_source_dir()], + po_dir: join_paths (source_root, 'po'), + install: true, + install_dir: join_paths (get_option ('datadir'), 'metainfo') +) + +install_data ('appstream.conf', install_dir: '/etc') diff -Nru appstream-0.9.4/data/org.freedesktop.appstream.cli.metainfo.xml appstream-0.12.0/data/org.freedesktop.appstream.cli.metainfo.xml --- appstream-0.9.4/data/org.freedesktop.appstream.cli.metainfo.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/data/org.freedesktop.appstream.cli.metainfo.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,31 @@ + + + + org.freedesktop.appstream.cli + FSFAP + GPL-2.0+ + + AppStream CLI + An utility to work with AppStream metadata + + +

+ AppStream is a cross-distribution specification to provide metadata about software components. +

+

+ This tool allows for reading, writing, validating and transformation of AppStream XML or YAML metadata. + It also gives access to the system metadata pool, for example to query for software that provides a + specific MIME-type, and installing it by its software component identifier. +

+
+ + https://www.freedesktop.org/wiki/Distributions/AppStream/ + https://www.freedesktop.org/software/appstream/docs/chap-AppStream-ManualPages.html + + Freedesktop + + appstream + + appstreamcli + +
diff -Nru appstream-0.9.4/data/spdx-license-ids.txt appstream-0.12.0/data/spdx-license-ids.txt --- appstream-0.9.4/data/spdx-license-ids.txt 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/data/spdx-license-ids.txt 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,398 @@ +# The list of licenses recognized by SPDX, v3.0 +# Source: http://spdx.org/licenses/ +0BSD +389-exception +AAL +ADSL +AFL-1.1 +AFL-1.2 +AFL-2.0 +AFL-2.1 +AFL-3.0 +AGPL-1.0 +AGPL-3.0 +AGPL-3.0-only +AGPL-3.0-or-later +AMDPLPA +AML +AMPAS +ANTLR-PD +APAFML +APL-1.0 +APSL-1.0 +APSL-1.1 +APSL-1.2 +APSL-2.0 +Abstyles +Adobe-2006 +Adobe-Glyph +Afmparse +Aladdin +Apache-1.0 +Apache-1.1 +Apache-2.0 +Artistic-1.0 +Artistic-1.0-Perl +Artistic-1.0-cl8 +Artistic-2.0 +Autoconf-exception-2.0 +Autoconf-exception-3.0 +BSD-1-Clause +BSD-2-Clause +BSD-2-Clause-FreeBSD +BSD-2-Clause-NetBSD +BSD-2-Clause-Patent +BSD-3-Clause +BSD-3-Clause-Attribution +BSD-3-Clause-Clear +BSD-3-Clause-LBNL +BSD-3-Clause-No-Nuclear-License +BSD-3-Clause-No-Nuclear-License-2014 +BSD-3-Clause-No-Nuclear-Warranty +BSD-4-Clause +BSD-4-Clause-UC +BSD-Protection +BSD-Source-Code +BSL-1.0 +Bahyph +Barr +Beerware +Bison-exception-2.2 +BitTorrent-1.0 +BitTorrent-1.1 +Bootloader-exception +Borceux +CATOSL-1.1 +CC-BY-1.0 +CC-BY-2.0 +CC-BY-2.5 +CC-BY-3.0 +CC-BY-4.0 +CC-BY-NC-1.0 +CC-BY-NC-2.0 +CC-BY-NC-2.5 +CC-BY-NC-3.0 +CC-BY-NC-4.0 +CC-BY-NC-ND-1.0 +CC-BY-NC-ND-2.0 +CC-BY-NC-ND-2.5 +CC-BY-NC-ND-3.0 +CC-BY-NC-ND-4.0 +CC-BY-NC-SA-1.0 +CC-BY-NC-SA-2.0 +CC-BY-NC-SA-2.5 +CC-BY-NC-SA-3.0 +CC-BY-NC-SA-4.0 +CC-BY-ND-1.0 +CC-BY-ND-2.0 +CC-BY-ND-2.5 +CC-BY-ND-3.0 +CC-BY-ND-4.0 +CC-BY-SA-1.0 +CC-BY-SA-2.0 +CC-BY-SA-2.5 +CC-BY-SA-3.0 +CC-BY-SA-4.0 +CC0-1.0 +CDDL-1.0 +CDDL-1.1 +CDLA-Permissive-1.0 +CDLA-Sharing-1.0 +CECILL-1.0 +CECILL-1.1 +CECILL-2.0 +CECILL-2.1 +CECILL-B +CECILL-C +CLISP-exception-2.0 +CNRI-Jython +CNRI-Python +CNRI-Python-GPL-Compatible +CPAL-1.0 +CPL-1.0 +CPOL-1.02 +CUA-OPL-1.0 +Caldera +ClArtistic +Classpath-exception-2.0 +Condor-1.1 +Crossword +CrystalStacker +Cube +D-FSL-1.0 +DOC +DSDP +DigiRule-FOSS-exception +Dotseqn +ECL-1.0 +ECL-2.0 +EFL-1.0 +EFL-2.0 +EPL-1.0 +EPL-2.0 +EUDatagrid +EUPL-1.0 +EUPL-1.1 +EUPL-1.2 +Entessa +ErlPL-1.1 +Eurosym +FLTK-exception +FSFAP +FSFUL +FSFULLR +FTL +Fair +Fawkes-Runtime-exception +Font-exception-2.0 +Frameworx-1.0 +FreeImage +GCC-exception-2.0 +GCC-exception-3.1 +GFDL-1.1 +GFDL-1.1-only +GFDL-1.1-or-later +GFDL-1.2 +GFDL-1.2-only +GFDL-1.2-or-later +GFDL-1.3 +GFDL-1.3-only +GFDL-1.3-or-later +GL2PS +GPL-1.0 +GPL-1.0+ +GPL-1.0-only +GPL-1.0-or-later +GPL-2.0 +GPL-2.0+ +GPL-2.0-only +GPL-2.0-or-later +GPL-2.0-with-GCC-exception +GPL-2.0-with-autoconf-exception +GPL-2.0-with-bison-exception +GPL-2.0-with-classpath-exception +GPL-2.0-with-font-exception +GPL-3.0 +GPL-3.0+ +GPL-3.0-only +GPL-3.0-or-later +GPL-3.0-with-GCC-exception +GPL-3.0-with-autoconf-exception +Giftware +Glide +Glulxe +HPND +HaskellReport +IBM-pibs +ICU +IJG +IPA +IPL-1.0 +ISC +ImageMagick +Imlib2 +Info-ZIP +Intel +Intel-ACPI +Interbase-1.0 +JSON +JasPer-2.0 +LAL-1.2 +LAL-1.3 +LGPL-2.0 +LGPL-2.0+ +LGPL-2.0-only +LGPL-2.0-or-later +LGPL-2.1 +LGPL-2.1+ +LGPL-2.1-only +LGPL-2.1-or-later +LGPL-3.0 +LGPL-3.0+ +LGPL-3.0-only +LGPL-3.0-or-later +LGPLLR +LPL-1.0 +LPL-1.02 +LPPL-1.0 +LPPL-1.1 +LPPL-1.2 +LPPL-1.3a +LPPL-1.3c +LZMA-exception +Latex2e +Leptonica +LiLiQ-P-1.1 +LiLiQ-R-1.1 +LiLiQ-Rplus-1.1 +Libpng +Libtool-exception +Linux-syscall-note +MIT +MIT-CMU +MIT-advertising +MIT-enna +MIT-feh +MITNFA +MPL-1.0 +MPL-1.1 +MPL-2.0 +MPL-2.0-no-copyleft-exception +MS-PL +MS-RL +MTLL +MakeIndex +MirOS +Motosoto +Multics +Mup +NASA-1.3 +NBPL-1.0 +NCSA +NGPL +NLOD-1.0 +NLPL +NOSL +NPL-1.0 +NPL-1.1 +NPOSL-3.0 +NRL +NTP +Naumen +Net-SNMP +NetCDF +Newsletr +Nokia +Nokia-Qt-exception-1.1 +Noweb +Nunit +OCCT-PL +OCCT-exception-1.0 +OCLC-2.0 +ODbL-1.0 +OFL-1.0 +OFL-1.1 +OGTSL +OLDAP-1.1 +OLDAP-1.2 +OLDAP-1.3 +OLDAP-1.4 +OLDAP-2.0 +OLDAP-2.0.1 +OLDAP-2.1 +OLDAP-2.2 +OLDAP-2.2.1 +OLDAP-2.2.2 +OLDAP-2.3 +OLDAP-2.4 +OLDAP-2.5 +OLDAP-2.6 +OLDAP-2.7 +OLDAP-2.8 +OML +OPL-1.0 +OSET-PL-2.1 +OSL-1.0 +OSL-1.1 +OSL-2.0 +OSL-2.1 +OSL-3.0 +OpenSSL +PDDL-1.0 +PHP-3.0 +PHP-3.01 +Plexus +PostgreSQL +Python-2.0 +QPL-1.0 +Qhull +Qwt-exception-1.0 +RHeCos-1.1 +RPL-1.1 +RPL-1.5 +RPSL-1.0 +RSA-MD +RSCPL +Rdisc +Ruby +SAX-PD +SCEA +SGI-B-1.0 +SGI-B-1.1 +SGI-B-2.0 +SISSL +SISSL-1.2 +SMLNJ +SMPPL +SNIA +SPL-1.0 +SWL +Saxpath +Sendmail +SimPL-2.0 +Sleepycat +Spencer-86 +Spencer-94 +Spencer-99 +StandardML-NJ +SugarCRM-1.1.3 +TCL +TCP-wrappers +TMate +TORQUE-1.1 +TOSL +UPL-1.0 +Unicode-DFS-2015 +Unicode-DFS-2016 +Unicode-TOU +Unlicense +VOSTROM +VSL-1.0 +Vim +W3C +W3C-19980720 +W3C-20150513 +WTFPL +Watcom-1.0 +Wsuipa +WxWindows-exception-3.1 +X11 +XFree86-1.1 +XSkat +Xerox +Xnet +YPL-1.0 +YPL-1.1 +ZPL-1.1 +ZPL-2.0 +ZPL-2.1 +Zed +Zend-2.0 +Zimbra-1.3 +Zimbra-1.4 +Zlib +bzip2-1.0.5 +bzip2-1.0.6 +curl +diffmark +dvipdfm +eCos-2.0 +eCos-exception-2.0 +eGenix +freertos-exception-2.0 +gSOAP-1.3b +gnu-javamail-exception +gnuplot +i2p-gpl-java-exception +iMatix +libtiff +mif-exception +mpich2 +openvpn-openssl-exception +psfrag +psutils +u-boot-exception-2.0 +wxWindows +xinetd +xpp +zlib-acknowledgement diff -Nru appstream-0.9.4/data/update-data.py appstream-0.12.0/data/update-data.py --- appstream-0.9.4/data/update-data.py 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/data/update-data.py 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 +# +# Copyright (C) 2015 Matthias Klumpp +# Licensed under LGPL-2.0+ + +# +# Script to download updated static data from the web and process it for AppStream to use. +# + +import os +import requests +import subprocess +from datetime import date +from tempfile import TemporaryDirectory + +def get_tld_list(fname, url): + print("Getting TLD list from IANA...") + + data_result = list() + r = requests.get(url) + raw_data = str(r.content, 'utf-8') + for line in raw_data.split('\n'): + line = line.strip() + if not line: + continue + if line.startswith('#'): + continue + + # filter out internationalized names, we don't support them for AppStream IDs + if line.startswith('XN--'): + continue + + # we disallow the very long names (usually brands) + # FIXME: Do we really want to impose this restriction just to keep the TLD + # pool small? + if len(line) > 4: + continue + + data_result.append(line.lower()) + + data_result.sort() + with open(fname, 'w') as f: + f.write("# IANA TLDs we recognize for AppStream IDs.\n") + f.write("# Derived from the full list at {}\n".format(url)) + f.write("# Last updated on {}\n".format(date.today().isoformat())) + + f.write("\n".join(data_result)) + f.write('\n') + + +def get_spdx_id_list(fname, git_url, with_deprecated=True): + print("Updating list of SPDX license IDs...") + tdir = TemporaryDirectory(prefix="spdx_master-") + + subprocess.check_call(['git', 'clone', git_url, tdir.name]) + last_tag_name = subprocess.check_output(['git', 'describe', '--abbrev=0', '--tags'], cwd=tdir.name) + last_tag_name = str(last_tag_name.strip(), 'utf-8') + + licenses_text_dir = os.path.join(tdir.name, 'text') + + id_list = list() + # get SPDX license-IDs from filenames + for spdx_fname in os.listdir(licenses_text_dir): + if not spdx_fname.endswith('.txt'): + continue + raw_id = os.path.splitext(spdx_fname)[0] + # check if this is actually an SPDX ID file + if ' ' in raw_id: + continue + if raw_id.startswith('deprecated_'): + if with_deprecated: + raw_id = raw_id[11:] + else: + continue + id_list.append(raw_id) + + id_list.sort() + with open(fname, 'w') as f: + f.write("# The list of licenses recognized by SPDX, {}\n".format(last_tag_name)) + f.write("# Source: http://spdx.org/licenses/\n") + + f.write("\n".join(id_list)) + f.write('\n') + +def main(): + get_tld_list ("iana-filtered-tld-list.txt", "https://data.iana.org/TLD/tlds-alpha-by-domain.txt") + get_spdx_id_list ("spdx-license-ids.txt", "https://github.com/spdx/license-list-data.git") + + print("All done.") + +if __name__ == '__main__': + main() diff -Nru appstream-0.9.4/data/xdg-category-names.txt appstream-0.12.0/data/xdg-category-names.txt --- appstream-0.9.4/data/xdg-category-names.txt 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/data/xdg-category-names.txt 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,141 @@ +# FreeDesktop Menu Categories +# See https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry +2DGraphics +3DGraphics +Accessibility +ActionGame +Adult +AdventureGame +Amusement +ArcadeGame +Archiving +Art +ArtificialIntelligence +Astronomy +Audio +AudioVideo +AudioVideoEditing +Biology +BlocksGame +BoardGame +Building +Calculator +Calendar +CardGame +Chart +Chat +Chemistry +Clock +Compression +ComputerScience +ConsoleOnly +Construction +ContactManagement +Core +Database +DataVisualization +Debugger +DesktopSettings +Development +Dialup +Dictionary +DiscBurning +Documentation +Economy +Education +Electricity +Electronics +Email +Emulator +Engineering +Feed +FileManager +Filesystem +FileTools +FileTransfer +Finance +FlowChart +Game +Geography +Geology +Geoscience +GNOME +Graphics +GTK +GUIDesigner +HamRadio +HardwareSettings +History +Humanities +IDE +ImageProcessing +InstantMessaging +IRCClient +Java +KDE +KidsGame +Languages +Literature +LogicGame +Maps +Math +MedicalSoftware +Midi +Mixer +Monitor +Motif +Music +Network +News +NumericalAnalysis +OCR +Office +P2P +PackageManager +ParallelComputing +PDA +Photography +Physics +Player +Presentation +Printing +Profiling +ProjectManagement +Publishing +Qt +RasterGraphics +Recorder +RemoteAccess +RevisionControl +Robotics +RolePlaying +Scanning +Science +Security +Sequencer +Settings +Shooter +Simulation +Spirituality +Sports +SportsGame +Spreadsheet +StrategyGame +System +Telephony +TelephonyTools +TerminalEmulator +TextEditor +TextTools +Translation +Tuner +TV +Utility +VectorGraphics +Video +VideoConference +Viewer +WebBrowser +WebDevelopment +WordProcessor +XFCE diff -Nru appstream-0.9.4/debian/appstream-doc.doc-base.appstream appstream-0.12.0/debian/appstream-doc.doc-base.appstream --- appstream-0.9.4/debian/appstream-doc.doc-base.appstream 2015-08-28 21:16:10.000000000 +0000 +++ appstream-0.12.0/debian/appstream-doc.doc-base.appstream 2017-08-30 18:08:12.000000000 +0000 @@ -1,11 +1,11 @@ Document: appstream Title: AppStream Documentation Author: Matthias Klumpp et al. -Abstract: AppStream is a cross-distribution effort for creating and sharing metadata about - software components available in the package repositories of a distribution. - It provides specifications for an unified software component metadata database, - screenshot services and various other things needed to make handling of software smarter. - Also, the AppStream data allows building application-centric software management tools. +Abstract: AppStream is a metadata specification, allowing to write metadata for + software projects in a general-purpose format. This allows software centers + to display useful information for not installed software, as well as + determining software the user might want to install (e.g. to open an + unknown file type or to make missing firmware available). Section: Help/Standards Format: HTML diff -Nru appstream-0.9.4/debian/appstream.install appstream-0.12.0/debian/appstream.install --- appstream-0.9.4/debian/appstream.install 2016-02-04 16:28:41.000000000 +0000 +++ appstream-0.12.0/debian/appstream.install 2018-04-04 16:29:30.000000000 +0000 @@ -1,7 +1,7 @@ etc/appstream.conf etc/apt/apt.conf.d/* usr/bin/* -usr/share/app-info/* usr/share/gettext/* usr/share/locale/* usr/share/man/man1/appstreamcli.1 +usr/share/metainfo/* diff -Nru appstream-0.9.4/debian/appstream.postinst appstream-0.12.0/debian/appstream.postinst --- appstream-0.9.4/debian/appstream.postinst 2015-09-08 18:41:34.000000000 +0000 +++ appstream-0.12.0/debian/appstream.postinst 2017-08-30 18:08:12.000000000 +0000 @@ -2,8 +2,9 @@ # postinst script for appstream set -e -# Force-upgrade the database, in case something has changed -appstreamcli refresh-index --force || true +# Force-upgrade the cache, to ensure it matches the installed +# version of AppStream and is present. +appstreamcli refresh-cache --force || true #DEBHELPER# diff -Nru appstream-0.9.4/debian/appstream.postrm appstream-0.12.0/debian/appstream.postrm --- appstream-0.9.4/debian/appstream.postrm 2015-12-12 18:25:00.000000000 +0000 +++ appstream-0.12.0/debian/appstream.postrm 2017-08-30 18:08:12.000000000 +0000 @@ -3,8 +3,8 @@ set -e if [ "$1" = "purge" ]; then - # remove the AppStream cache - rm -rf /var/cache/app-info/xapian + # remove the AppStream global cache + rm -rf /var/cache/app-info/gv rmdir /var/cache/app-info/ | true # remove the AppStream data diff -Nru appstream-0.9.4/debian/appstream.triggers appstream-0.12.0/debian/appstream.triggers --- appstream-0.9.4/debian/appstream.triggers 2015-08-28 21:16:10.000000000 +0000 +++ appstream-0.12.0/debian/appstream.triggers 2017-08-30 18:08:12.000000000 +0000 @@ -1,3 +1,3 @@ -interest /usr/share/app-info/icons -interest /usr/share/app-info/yaml -interest /usr/share/app-info/xml +interest-noawait /usr/share/app-info/icons +interest-noawait /usr/share/app-info/yaml +interest-noawait /usr/share/app-info/xml diff -Nru appstream-0.9.4/debian/apt-config-icons-hidpi.install appstream-0.12.0/debian/apt-config-icons-hidpi.install --- appstream-0.9.4/debian/apt-config-icons-hidpi.install 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/apt-config-icons-hidpi.install 2018-04-04 16:29:30.000000000 +0000 @@ -0,0 +1 @@ +contrib/apt-conf/60icons-hidpi /etc/apt/apt.conf.d/ diff -Nru appstream-0.9.4/debian/apt-config-icons.install appstream-0.12.0/debian/apt-config-icons.install --- appstream-0.9.4/debian/apt-config-icons.install 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/apt-config-icons.install 2018-04-04 16:29:30.000000000 +0000 @@ -0,0 +1 @@ +contrib/apt-conf/60icons /etc/apt/apt.conf.d/ diff -Nru appstream-0.9.4/debian/apt-config-icons-large-hidpi.install appstream-0.12.0/debian/apt-config-icons-large-hidpi.install --- appstream-0.9.4/debian/apt-config-icons-large-hidpi.install 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/apt-config-icons-large-hidpi.install 2018-04-04 16:30:00.000000000 +0000 @@ -0,0 +1 @@ +contrib/apt-conf/60icons-large-hidpi /etc/apt/apt.conf.d/ diff -Nru appstream-0.9.4/debian/apt-config-icons-large.install appstream-0.12.0/debian/apt-config-icons-large.install --- appstream-0.9.4/debian/apt-config-icons-large.install 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/apt-config-icons-large.install 2018-04-04 16:29:53.000000000 +0000 @@ -0,0 +1 @@ +contrib/apt-conf/60icons-large /etc/apt/apt.conf.d/ diff -Nru appstream-0.9.4/debian/changelog appstream-0.12.0/debian/changelog --- appstream-0.9.4/debian/changelog 2016-04-18 14:41:17.000000000 +0000 +++ appstream-0.12.0/debian/changelog 2019-12-14 00:06:15.000000000 +0000 @@ -1,6 +1,300 @@ +appstream (0.12.0-3ubuntu1~16.04.sav0) xenial; urgency=medium + + * Backport to Xenial + * debian/compat,control: Set compat level to 10 and debhelper BD to (>= 11~) + + -- Rob Savoury Fri, 13 Dec 2019 16:06:15 -0800 + +appstream (0.12.0-3ubuntu1) bionic; urgency=medium + + * cache-explicit-variants.patch: fix crash when upgrading from bionic + to cosmic (LP: #1792537) + + -- Olivier Tilloy Fri, 14 Sep 2018 10:59:05 +0200 + +appstream (0.12.0-3) unstable; urgency=medium + + * load-desktop-data.patch: Load desktop file data properly again + + -- Matthias Klumpp Fri, 06 Apr 2018 21:30:08 +0200 + +appstream (0.12.0-2) unstable; urgency=medium + + * Make autopkgtest work again + * Update d/copyright (Closes: #894856) + * icon config: Pull in non-HiDPI config for large icons + if large-icon HiDPI config is installed + + -- Matthias Klumpp Fri, 06 Apr 2018 14:12:26 +0200 + +appstream (0.12.0-1) unstable; urgency=medium + + * New upstream version: 0.12.0 + * Drop all patches: Applied upstream + * Update .symbols file + * d/rules: Drop obsolete --parallel flag + * Add APT config snippet packages for an easy way of enabling + icon downloads for different sizes and HiDPI. + + -- Matthias Klumpp Wed, 04 Apr 2018 18:36:26 +0200 + +appstream (0.11.8-3) unstable; urgency=medium + + * appstream-doc breaks older appstream package versions (Closes: #888301) + - The upstream NEWS file accidentally moved from appstream to + appstream-doc, and now that it is there it makes sense to + keep it in the -doc package. + + -- Matthias Klumpp Wed, 24 Jan 2018 20:50:20 +0100 + +appstream (0.11.8-2) unstable; urgency=medium + + * qt-define-locations-nodebug.patch: Allow finding the Qt library + for non-debug builds correctly again (Closes: #888144) + + -- Matthias Klumpp Wed, 24 Jan 2018 20:32:40 +0100 + +appstream (0.11.8-1) unstable; urgency=medium + + * New upstream version: 0.11.8 + * Update Vcs-* URLs for Salsa migration + * Bump dh compat level to 11 + + -- Matthias Klumpp Mon, 22 Jan 2018 23:58:02 +0100 + +appstream (0.11.7-1) unstable; urgency=medium + + * New upstream version: 0.11.7 + * Drop patches: Applied upstream + * Make appstream package suggest curl + * Bump standards version: No changes needed + * Update .symbols file + + -- Matthias Klumpp Sun, 22 Oct 2017 19:52:02 +0200 + +appstream (0.11.6-2) unstable; urgency=medium + + * fix-screenshot-validate-loop.patch: Fix endless loop when + validating screenshots + + -- Matthias Klumpp Sun, 08 Oct 2017 17:17:46 +0200 + +appstream (0.11.6-1) unstable; urgency=medium + + * New upstream version: 0.11.6 + + -- Matthias Klumpp Mon, 02 Oct 2017 22:18:42 +0200 + +appstream (0.11.5-1) unstable; urgency=medium + + * New upstream version 0.11.5 + - Makes Qt CMake file work on non-64bit-arches again (Closes: #874169) + * Bump standards version: No changes needed + + -- Matthias Klumpp Mon, 04 Sep 2017 18:22:14 +0200 + +appstream (0.11.4-1) unstable; urgency=medium + + * New upstream version: 0.11.4 + * Adjust packaging to use the Meson buildsystem + * Update .install files + * Update .symbols file + * Fail on missing files + * Trim & update build-dependencies + - xmlto is no longer needed + - itstool is no longer needed + - libgirepository1.0-dev >= 1.53, older versions have bugs + breaking the build. + + -- Matthias Klumpp Wed, 30 Aug 2017 19:56:48 +0200 + +appstream (0.11.3-1) unstable; urgency=medium + + * New upstream version: 0.11.3 + + -- Matthias Klumpp Fri, 04 Aug 2017 13:14:34 -0400 + +appstream (0.11.2-1) unstable; urgency=medium + + * New upstream version: 0.11.2 + * Update symbols file + + -- Matthias Klumpp Tue, 18 Jul 2017 20:36:34 +0200 + +appstream (0.11.1-1) unstable; urgency=medium + + * New upstream version: 0.11.1 + * Update .symbols file + * Fix autopkgtest + + -- Matthias Klumpp Sun, 02 Jul 2017 16:32:06 +0200 + +appstream (0.11.0-1) unstable; urgency=medium + + * New upstream version: 0.11.0 + * Drop appstream-index transitional package + * Drop all patches: Applied upstream + * Update symbols file + * Bump standards version: No changes needed + * Use noawait triggers for cache rebuilds + + -- Matthias Klumpp Sat, 24 Jun 2017 17:35:18 +0200 + +appstream (0.10.6-2) unstable; urgency=medium + + * vala-deps.patch: Add Vala dependency file + - Fixes Vala builds which don't explicitly depend on GIO already. + * yaml-serialize-crash.patch: Don't crash when serializing components + with a session DBus provides to YAML. + * no-cache-if-no-cpts.patch: Don't attempt (and fail) to create a cache + if there are no components at all to serialize. + * no-gvfsd-root.patch: Ensure gvfsd and friends don't get spawned as + root (or at all in case of ascli). (Closes: #852696) + + -- Matthias Klumpp Wed, 08 Mar 2017 20:48:26 +0100 + +appstream (0.10.6-1) unstable; urgency=medium + + * New upstream version: 0.10.6 + - APT will no longer download icons by default if + there are no GUI frontends available that use them (Closes: #847543) + - AppStream GUIs will need to tell APT that they require icons. + + -- Matthias Klumpp Sun, 22 Jan 2017 19:56:54 +0100 + +appstream (0.10.5-1) unstable; urgency=medium + + * New upstream version: 0.10.5 + - Uses fnmatch on modalias provides (Closes: #841160) + - More verbose error messages on cache update failures (Closes: #820774) + * Update symbols file + + -- Matthias Klumpp Thu, 22 Dec 2016 18:06:34 +0100 + +appstream (0.10.4-1) unstable; urgency=medium + + * New upstream version: 0.10.4 + * Bump debhelper compat level + + -- Matthias Klumpp Sun, 27 Nov 2016 19:14:15 +0100 + +appstream (0.10.3-1) unstable; urgency=medium + + * New upstream version: 0.10.3 + * Update Qt package name for API break + + -- Matthias Klumpp Tue, 01 Nov 2016 16:46:12 +0100 + +appstream (0.10.2-1) unstable; urgency=medium + + * New upstream version: 0.10.2 + * Update dependencies + - Drop intltool + - Add itstool, gettext + - Update minimum qtbase version + * Update symbols file + + -- Matthias Klumpp Mon, 10 Oct 2016 20:05:52 +0200 + +appstream (0.10.1-2) unstable; urgency=medium + + * Install metainfo file + + -- Matthias Klumpp Mon, 03 Oct 2016 21:12:00 +0200 + +appstream (0.10.1-1) unstable; urgency=medium + + * New upstream release: 0.10.1 + * Drop patches: Applied upstream + * Fix GIR package name and use GIR dh addon (Closes: #837684) + * Add more multiarch metadata + * Properly clean up the global cache on purge + + -- Matthias Klumpp Fri, 16 Sep 2016 14:28:38 +0200 + +appstream (0.10.0-2) unstable; urgency=medium + + * cache-serialization.patch: Correctly (de)serialize screenshot data + * yaml-screenshot-image-type.patch: Set correct image type when + reading YAML + * addons-find-target.patch: Fix addon/target associations + + -- Matthias Klumpp Wed, 31 Aug 2016 22:34:06 +0200 + +appstream (0.10.0-1) unstable; urgency=medium + + * New upstream release: 0.10.0 + * Refresh dependencies + * Build with stemming support + * Drop all patches: Applied upstream + * Update symbols file for ABI break + + -- Matthias Klumpp Tue, 30 Aug 2016 22:48:30 +0200 + +appstream (0.9.8-4) unstable; urgency=medium + + * cache-translate-urls.patch: Make cache aware of + 'translate' URLs (LP: #1614375) + + -- Matthias Klumpp Thu, 18 Aug 2016 20:28:56 +0200 + +appstream (0.9.8-3) unstable; urgency=medium + + * Fix cache update in postinst (Closes: #834136) + * unittest-32bit-fix.patch: Fix build on 32bit architectures + (Closes: #834124) + + -- Matthias Klumpp Tue, 16 Aug 2016 19:19:02 +0200 + +appstream (0.9.8-2) unstable; urgency=medium + + * unittest-arm-fix.patch: Resolve FTBFS on ARM due to + failing unittests + * Make libas-dev package depend on the GIR + + -- Matthias Klumpp Thu, 11 Aug 2016 20:02:18 +0200 + +appstream (0.9.8-1) unstable; urgency=medium + + * New upstream release: 0.9.8 + * Update symbols file + + -- Matthias Klumpp Wed, 10 Aug 2016 22:48:52 +0200 + +appstream (0.9.7-1) unstable; urgency=medium + + * New upstream release: 0.9.7 + * Update package descriptions + * Update .symbols file + + -- Matthias Klumpp Wed, 20 Jul 2016 16:58:46 +0200 + +appstream (0.9.6-1) unstable; urgency=medium + + * New upstream release: 0.9.6 + + -- Matthias Klumpp Thu, 12 May 2016 18:44:26 +0200 + +appstream (0.9.5-1) unstable; urgency=medium + + * New upstream release: 0.9.5 + * Drop patches: Applied upstream + * Update .symbols file + + -- Matthias Klumpp Mon, 02 May 2016 18:48:14 +0200 + +appstream (0.9.4-2) unstable; urgency=medium + + * Update .symbols file + * iconfinding-refactor.patch: Update iconfinding code, + resolves double-free issue (Closes: #822317) + + -- Matthias Klumpp Fri, 22 Apr 2016 17:08:14 +0200 + appstream (0.9.4-1) unstable; urgency=medium * New upstream release: 0.9.4 + - Closes: #820126 * Fix autopkgtest * Update .symbols file * Bump standards version: No changes needed diff -Nru appstream-0.9.4/debian/compat appstream-0.12.0/debian/compat --- appstream-0.9.4/debian/compat 2015-08-28 21:16:10.000000000 +0000 +++ appstream-0.12.0/debian/compat 2019-12-14 00:06:08.000000000 +0000 @@ -1 +1 @@ -9 +10 diff -Nru appstream-0.9.4/debian/control appstream-0.12.0/debian/control --- appstream-0.9.4/debian/control 2016-04-18 14:37:35.000000000 +0000 +++ appstream-0.12.0/debian/control 2019-12-14 00:06:15.000000000 +0000 @@ -2,51 +2,49 @@ Section: admin Priority: optional Maintainer: Matthias Klumpp -Build-Depends: cmake (>= 2.8), - debhelper (>= 9.0.0), +Build-Depends: debhelper (>= 11~), + gettext, + gobject-introspection, gtk-doc-tools, - intltool, - libgirepository1.0-dev (>= 1.32), + libgirepository1.0-dev (>= 1.53), libglib2.0-dev (>= 2.46), - libprotobuf-dev, - libxapian-dev (>= 1.2.12), + libstemmer-dev, libxml2-dev (>= 2.8.0), - libyaml-dev, - protobuf-compiler, - qtbase5-dev (>= 5.4), - valac, - xmlto -Standards-Version: 3.9.8 + libyaml-dev (>= 0.1.6), + meson (>= 0.42), + qtbase5-dev (>= 5.6), + valac +Standards-Version: 4.1.2 Homepage: http://www.freedesktop.org/wiki/Distributions/AppStream/ -Vcs-Git: https://anonscm.debian.org/git/pkg-packagekit/appstream.git -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-packagekit/appstream.git +Vcs-Git: https://salsa.debian.org/pkgutopia-team/appstream.git +Vcs-Browser: https://salsa.debian.org/pkgutopia-team/appstream Package: appstream Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} -Breaks: appstream-index (<< ${source:Version}) +Breaks: appstream-index (<< ${source:Version}), + gnome-software (<< 3.22.5-1), + plasma-discover (<< 5.8.5-3) Provides: appstream-index -Description: Software component index - AppStream is a cross-distribution effort for creating and sharing - metadata of software components available in the package repositories - of a distribution. - It provides specifications for an unified software component metadata format, - screenshot and icon services and various other metadata to describe software - in repositories. - The metadata can be used to show details about the actual software in software - management tools instead of just listing packages, making software management - intuitive and easy. - . - This package provides tools to generate, maintain and query the - AppStream database of installed and available software, and enables AppStream - integration in APT. +Suggests: apt-config-icons, + curl +Description: Software component metadata management + AppStream is a metadata specification, allowing to write metadata for + software projects in a standardized format. + It provides facilities to easily access and transform the data, as well + as a few additional services to allow building feature-rich software center + applications. + . + This package provides tools to generate, maintain and query the AppStream + data pool of installed and available software, and enables integration + with the APT package manager. . The 'appstreamcli' tool can be used for accessing the software component - database as well as for working with AppStream XML metadata directly, including + pool as well as for working with AppStream metadata directly, including validating it for compliance with the specification. -Package: libappstream3 +Package: libappstream4 Architecture: any Section: libs Multi-Arch: same @@ -54,103 +52,166 @@ Depends: ${misc:Depends}, ${shlibs:Depends} Description: Library to access AppStream services - AppStream is a cross-distribution effort for creating and sharing - metadata of software components available in the package repositories - of a distribution. - It provides specifications for an unified software component metadata format - and provides tools to read, write and validate the metadata. + AppStream is a metadata specification, allowing to write metadata for + software projects in a standardized format. This allows software centers + to display useful information for not installed software, as well as + determining software the user might want to install (e.g. to open an + unknown file type or to make missing firmware available). . This package contains a GObject-based library to access AppStream - services, like the software component metadata database. - It also contains functions for working with AppStream XML metadata. + services, like the software component metadata pool. + It also contains functions for reading, writing and transforming AppStream + metadata. Package: libappstream-dev Architecture: any Section: libdevel -Depends: libappstream3 (= ${binary:Version}), +Depends: gir1.2-appstream-1.0 (= ${binary:Version}), + libappstream4 (= ${binary:Version}), libglib2.0-dev (>= 2.46), ${misc:Depends} -Suggests: dep11-tools +Suggests: appstream-generator Description: Library to access AppStream services (development files) - AppStream is a cross-distribution effort for creating and sharing - metadata of software components available in the package repositories - of a distribution. - It provides specifications for an unified software component metadata format - and provides tools to read, write and validate the metadata. + AppStream is a metadata specification, allowing to write metadata for + software projects in a standardized format. This allows software centers + to display useful information for not installed software, as well as + determining software the user might want to install (e.g. to open an + unknown file type or to make missing firmware available). . This package contains development files necessary to develop - software-management tools which use the AppStream library. + software management tools which use the AppStream library. -Package: gir1.2-appstream +Package: gir1.2-appstream-1.0 Architecture: any Section: introspection -Depends: gir1.2-freedesktop (>= 1.32), - gir1.2-glib-2.0 (>= 1.46), - libappstream3 (= ${binary:Version}), +Depends: libappstream4 (= ${binary:Version}), + ${gir:Depends}, ${misc:Depends} +Breaks: gir1.2-appstream (<< 0.10.1) +Replaces: gir1.2-appstream (<< 0.10.1) Description: Library to access AppStream services (introspection data) - AppStream is a cross-distribution effort for creating and sharing - metadata of software components available in the package repositories - of a distribution. - It provides specifications for an unified software component metadata format - and provides tools to read, write and validate the metadata. + AppStream is a metadata specification, allowing to write metadata for + software projects in a standardized format. This allows software centers + to display useful information for not installed software, as well as + determining software the user might want to install (e.g. to open an + unknown file type or to make missing firmware available). . This package contains introspection data for the AppStream library. -Package: libappstreamqt1 +Package: libappstreamqt2 Architecture: any Section: libs Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} -Recommends: appstream (>= ${binary:Version}) Description: Qt5 library to access AppStream services - AppStream is a cross-distribution effort for creating and sharing - metadata of software components available in the package repositories - of a distribution. - It provides specifications for an unified software component metadata format - and provides tools to read, write and validate the metadata. + AppStream is a metadata specification, allowing to write metadata for + software projects in a standardized format. This allows software centers + to display useful information for not installed software, as well as + determining software the user might want to install (e.g. to open an + unknown file type or to make missing firmware available). . This package contains a Qt-based library to access AppStream - services, like the software component metadata database. + services, like the software component metadata pool. Package: libappstreamqt-dev Architecture: any +Multi-Arch: same Section: libdevel -Depends: libappstreamqt1 (= ${binary:Version}), +Depends: libappstreamqt2 (= ${binary:Version}), qtbase5-dev (>= 5.4), ${misc:Depends} Description: Qt5 library to access AppStream services (development files) - AppStream is a cross-distribution effort for creating and sharing - metadata of software components available in the package repositories - of a distribution. - It provides specifications for an unified software component metadata format - and provides tools to read, write and validate the metadata. + AppStream is a metadata specification, allowing to write metadata for + software projects in a standardized format. This allows software centers + to display useful information for not installed software, as well as + determining software the user might want to install (e.g. to open an + unknown file type or to make missing firmware available). . This package contains development files necessary to develop - software-management tools which use the Qt5-based AppStream library. + software management tools which use the Qt-based AppStream library. Package: appstream-doc Architecture: all +Multi-Arch: foreign Section: doc Depends: ${misc:Depends} Suggests: appstream +Breaks: appstream (<< 0.11.8) Description: Developer documentation for AppStream - AppStream is a cross-distribution effort for creating and sharing - metadata of software components available in the package repositories - of a distribution. - It provides specifications for an unified software component metadata format - and provides tools to read, write and validate the metadata. + AppStream is a metadata specification, allowing to write metadata for + software projects in a standardized format. This allows software centers + to display useful information for not installed software, as well as + determining software the user might want to install (e.g. to open an + unknown file type or to make missing firmware available). . This package provides developer documentation for AppStream. -Package: appstream-index +Package: apt-config-icons +Architecture: all +Multi-Arch: foreign +Section: misc +Depends: appstream, + ${misc:Depends} +Description: APT configuration snippet to enable icon downloads + This package contains an APT configuration snippet that enables the + download of an icon tarball containing application icons for display in + software centers. + Icons get downloaded directly from the archive via regular cache updates, + and match the software currently available in the respective archive suites. + . + This snippet enables icons of the default icon size set in the AppStream + specification for software centers, 64x64px. It also enables downloads + of smaller 48x48px icons. + +Package: apt-config-icons-hidpi +Architecture: all +Multi-Arch: foreign +Section: misc +Depends: apt-config-icons, + ${misc:Depends} +Description: APT configuration snippet to enable HiDPI icon downloads + This package contains an APT configuration snippet that enables the + download of an icon tarball containing application icons for display in + software centers. + Icons get downloaded directly from the archive via regular cache updates, + and match the software currently available in the respective archive suites. + . + This snippet enables icons in the size of 64x64@2, that are suitable for + HiDPI displays. + +Package: apt-config-icons-large +Architecture: all +Multi-Arch: foreign +Section: misc +Depends: apt-config-icons, + ${misc:Depends} +Description: APT configuration snippet to enable large icon downloads + This package contains an APT configuration snippet that enables the + download of an icon tarball containing application icons for display in + software centers. + Icons get downloaded directly from the archive via regular cache updates, + and match the software currently available in the respective archive suites. + . + This snippet enables icon tarball downloads in large, 128x128px size. + If these bigger icons are not downloaded by APT, a software center may + decide to fetch them on-demand from a web location. + +Package: apt-config-icons-large-hidpi Architecture: all -Section: oldlibs -Priority: extra -Depends: appstream (>= ${source:Version}), - ${misc:Depends} -Description: Transitional package (appstream-index -> appstream) - Transitional dummy package replacing appstream-index with - appstream. +Multi-Arch: foreign +Section: misc +Depends: apt-config-icons-large, + ${misc:Depends} +Description: APT configuration snippet to enable large HiDPI icon downloads + This package contains an APT configuration snippet that enables the + download of an icon tarball containing application icons for display in + software centers. + Icons get downloaded directly from the archive via regular cache updates, + and match the software currently available in the respective archive suites. + . + This snippet enables icon tarball downloads in large, 128x128@2 size that + are also suitable for HiDPI displays. + If these bigger icons are not downloaded by APT, a software center may + decide to fetch them on-demand from a web location. diff -Nru appstream-0.9.4/debian/copyright appstream-0.12.0/debian/copyright --- appstream-0.9.4/debian/copyright 2016-02-28 16:21:53.000000000 +0000 +++ appstream-0.12.0/debian/copyright 2018-04-04 22:40:12.000000000 +0000 @@ -1,12 +1,69 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: AppStream Upstream-Contact: Matthias Klumpp -Source: http://www.freedesktop.org/wiki/Distributions/AppStream/ +Source: https://www.freedesktop.org/wiki/Distributions/AppStream/ Files: * -Copyright: Matthias Klumpp +Copyright: 2012-2018, Matthias Klumpp + Richard Hughes License: GPL-2+ and LGPL-2.1+ +Files: ./src/* +Copyright: 2012-2018, Matthias Klumpp +License: LGPL-2.1+ + +Files: ./qt/* +Copyright: 2016-2018, Aleix Pol Gonzalez + 2014-2018, Matthias Klumpp + 2014, Sune Vuorela +License: LGPL-2.1+ + +Files: ./tools/* +Copyright: 2012-2018, Matthias Klumpp +License: GPL-2+ + +Files: data/* +Copyright: 2014-2016, Matthias Klumpp +License: GPL-2+ and LGPL-2.1+ + +Files: qt/contentrating.cpp + qt/contentrating.h + qt/launchable.cpp + qt/launchable.h + qt/metadata.cpp + qt/metadata.h + qt/translation.cpp + qt/translation.h +Copyright: 2017, Jan Grulich + 2016, Matthias Klumpp +License: LGPL-2.1+ + +Files: src/as-category.c + src/as-screenshot.c + src/as-screenshot.h + src/as-spdx.c + src/as-utils.c +Copyright: 2014-2016, Richard Hughes + 2012-2017, Matthias Klumpp +License: LGPL-2.1+ + +Files: src/as-content-rating.c + src/as-content-rating.h +Copyright: 2016, Richard Hughes +License: LGPL-2.1+ + +Files: src/as-image.c + src/as-release.c +Copyright: 2014-2016, Matthias Klumpp + 2014, Richard Hughes +License: LGPL-2.1+ + +Files: src/as-suggested.c + src/as-suggested.h +Copyright: 2017, Matthias Klumpp + 2016, Lucas Moura +License: LGPL-2.1+ + License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,78 +97,3 @@ . On Debian systems, the complete text of the GNU Lesser General Public License version 2.1 can be found in "/usr/share/common-licenses/LGPL-2.1". - -Files: ./src/appstream.h - ./src/as-cache-builder.c - ./src/as-cache-builder.h - ./src/as-category.c - ./src/as-category.h - ./src/as-component-private.h - ./src/as-component.c - ./src/as-component.h - ./src/as-data-pool.c - ./src/as-data-pool.h - ./src/as-database.c - ./src/as-database.h - ./src/as-distro-details.c - ./src/as-distro-details.h - ./src/as-enums.c - ./src/as-enums.h - ./src/as-icon.c - ./src/as-icon.h - ./src/as-image.c - ./src/as-image.h - ./src/as-menu-parser.c - ./src/as-menu-parser.h - ./src/as-metadata.c - ./src/as-metadata.h - ./src/as-provided.c - ./src/as-provided.h - ./src/as-release.c - ./src/as-release.h - ./src/as-screenshot.c - ./src/as-screenshot.h - ./src/as-settings-private.h - ./src/as-utils-private.h - ./src/as-utils.h - ./src/as-validator-issue.c - ./src/as-validator.c - ./src/as-validator.h - ./src/as-xmldata.c - ./src/as-xmldata.h - ./src/as-yamldata.c - ./src/as-yamldata.h - ./src/xapian/database-schema.hpp - ./src/xapian/database-cwrap.hpp - ./src/xapian/database-read.hpp - ./src/xapian/database-write.cpp - ./src/xapian/database-write.hpp -Copyright: 2012-2016, Matthias Klumpp -License: LGPL-2.1+ - -Files: ./qt/component.cpp - ./qt/component.h - ./qt/database.h - ./qt/image.cpp - ./qt/image.h - ./qt/provides.cpp - ./qt/provides.h - ./qt/screenshot.cpp - ./qt/screenshot.h -Copyright: 2014, Sune Vuorela - 2016, Matthias Klumpp -License: LGPL-2.1+ - -Files: ./tools/* -Copyright: 2012-2016, Matthias Klumpp -License: GPL-2+ - -Files: ./src/xapian/database-read.cpp -Copyright: 2009, Michael Vogt - 2012-2014, Matthias Klumpp -License: LGPL-2.1+ - -Files: ./qt/database.cpp -Copyright: 2012-2016, Matthias Klumpp - 2014, Sune Vuorela -License: LGPL-2.1+ diff -Nru appstream-0.9.4/debian/docs appstream-0.12.0/debian/docs --- appstream-0.9.4/debian/docs 2016-02-04 16:28:41.000000000 +0000 +++ appstream-0.12.0/debian/docs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -NEWS diff -Nru appstream-0.9.4/debian/gir1.2-appstream-1.0.install appstream-0.12.0/debian/gir1.2-appstream-1.0.install --- appstream-0.9.4/debian/gir1.2-appstream-1.0.install 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/gir1.2-appstream-1.0.install 2018-04-04 16:29:30.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/girepository-1.0/AppStream-*.typelib diff -Nru appstream-0.9.4/debian/gir1.2-appstream.install appstream-0.12.0/debian/gir1.2-appstream.install --- appstream-0.9.4/debian/gir1.2-appstream.install 2016-02-04 16:28:41.000000000 +0000 +++ appstream-0.12.0/debian/gir1.2-appstream.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/girepository-1.0/AppStream-*.typelib diff -Nru appstream-0.9.4/debian/libappstream3.install appstream-0.12.0/debian/libappstream3.install --- appstream-0.9.4/debian/libappstream3.install 2016-02-04 16:28:41.000000000 +0000 +++ appstream-0.12.0/debian/libappstream3.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/libappstream.so.* diff -Nru appstream-0.9.4/debian/libappstream3.symbols appstream-0.12.0/debian/libappstream3.symbols --- appstream-0.9.4/debian/libappstream3.symbols 2016-04-18 14:33:45.000000000 +0000 +++ appstream-0.12.0/debian/libappstream3.symbols 1970-01-01 00:00:00.000000000 +0000 @@ -1,336 +0,0 @@ -# SymbolsHelper-Confirmed: 0.9.4 amd64 -libappstream.so.3 libappstream3 #MINVER# - AS_APPSTREAM_METADATA_PATHS@Base 0.9.2 - (optional=templinst)_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z@Base 0.9.4 - (optional=templinst)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE19_M_emplace_back_auxIIRKS5_EEEvDpOT_@Base 0.9.4 - (optional=templinst)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE19_M_emplace_back_auxIJRKS5_EEEvDpOT_@Base 0.9.4 - (optional=templinst)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev@Base 0.9.4 - (optional=templinst)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev@Base 0.9.4 - (optional=templinst)_ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED0Ev@Base 0.9.4 - (optional=templinst)_ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED1Ev@Base 0.9.4 - (optional=templinst)_ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED2Ev@Base 0.9.4 - (optional=templinst)_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_@Base 0.9.4 - _ZTIN6Xapian10LogicErrorE@Base 0.9.2 - _ZTIN6Xapian18UnimplementedErrorE@Base 0.9.2 - _ZTIN6Xapian5ErrorE@Base 0.9.2 - _ZTSN6Xapian10LogicErrorE@Base 0.9.2 - _ZTSN6Xapian18UnimplementedErrorE@Base 0.9.2 - _ZTSN6Xapian5ErrorE@Base 0.9.2 - as_arch_compatible@Base 0.9.4 - as_bundle_kind_from_string@Base 0.9.2 - as_bundle_kind_to_string@Base 0.9.2 - as_cache_builder_error_quark@Base 0.9.2 - as_cache_builder_get_type@Base 0.9.2 - as_cache_builder_get_yml_data_origin@Base 0.9.2 - as_cache_builder_new@Base 0.9.2 - as_cache_builder_refresh@Base 0.9.2 - as_cache_builder_set_data_source_directories@Base 0.9.2 - as_cache_builder_setup@Base 0.9.2 - as_category_add_subcategory@Base 0.9.2 - as_category_complete@Base 0.9.2 - as_category_get_directory@Base 0.9.2 - as_category_get_excluded@Base 0.9.2 - as_category_get_icon@Base 0.9.2 - as_category_get_included@Base 0.9.2 - as_category_get_level@Base 0.9.2 - as_category_get_name@Base 0.9.2 - as_category_get_subcategories@Base 0.9.2 - as_category_get_summary@Base 0.9.2 - as_category_get_type@Base 0.9.2 - as_category_has_subcategory@Base 0.9.2 - as_category_new@Base 0.9.2 - as_category_remove_subcategory@Base 0.9.2 - as_category_set_directory@Base 0.9.2 - as_category_set_icon@Base 0.9.2 - as_category_set_level@Base 0.9.2 - as_category_set_name@Base 0.9.2 - as_category_set_summary@Base 0.9.2 - as_checksum_kind_from_string@Base 0.9.2 - as_checksum_kind_to_string@Base 0.9.2 - as_component_add_bundle_id@Base 0.9.2 - as_component_add_extends@Base 0.9.2 - as_component_add_extension@Base 0.9.2 - as_component_add_icon@Base 0.9.2 - as_component_add_language@Base 0.9.2 - as_component_add_provided@Base 0.9.2 - as_component_add_provided_item@Base 0.9.2 - as_component_add_release@Base 0.9.2 - as_component_add_screenshot@Base 0.9.2 - as_component_add_translation@Base 0.9.2 - as_component_add_url@Base 0.9.2 - as_component_complete@Base 0.9.2 - as_component_get_active_locale@Base 0.9.2 - as_component_get_architecture@Base 0.9.4 - as_component_get_bundle_id@Base 0.9.2 - as_component_get_bundles_table@Base 0.9.2 - as_component_get_categories@Base 0.9.2 - as_component_get_compulsory_for_desktops@Base 0.9.2 - as_component_get_description@Base 0.9.2 - as_component_get_description_table@Base 0.9.2 - as_component_get_developer_name@Base 0.9.2 - as_component_get_developer_name_table@Base 0.9.2 - as_component_get_extends@Base 0.9.2 - as_component_get_extensions@Base 0.9.2 - as_component_get_icon_by_size@Base 0.9.2 - as_component_get_icons@Base 0.9.2 - as_component_get_id@Base 0.9.2 - as_component_get_keywords@Base 0.9.2 - as_component_get_keywords_table@Base 0.9.2 - as_component_get_kind@Base 0.9.2 - as_component_get_language@Base 0.9.2 - as_component_get_languages@Base 0.9.2 - as_component_get_languages_map@Base 0.9.2 - as_component_get_name@Base 0.9.2 - as_component_get_name_table@Base 0.9.2 - as_component_get_origin@Base 0.9.2 - as_component_get_pkgnames@Base 0.9.2 - as_component_get_priority@Base 0.9.2 - as_component_get_project_group@Base 0.9.2 - as_component_get_project_license@Base 0.9.2 - as_component_get_provided@Base 0.9.2 - as_component_get_provided_for_kind@Base 0.9.2 - as_component_get_releases@Base 0.9.2 - as_component_get_screenshots@Base 0.9.2 - as_component_get_source_pkgname@Base 0.9.2 - as_component_get_summary@Base 0.9.2 - as_component_get_summary_table@Base 0.9.2 - as_component_get_translations@Base 0.9.2 - as_component_get_type@Base 0.9.2 - as_component_get_url@Base 0.9.2 - as_component_get_urls_table@Base 0.9.2 - as_component_has_bundle@Base 0.9.2 - as_component_has_category@Base 0.9.2 - as_component_has_install_candidate@Base 0.9.2 - as_component_has_package@Base 0.9.2 - as_component_is_compulsory_for_desktop@Base 0.9.2 - as_component_is_valid@Base 0.9.2 - as_component_kind_from_string@Base 0.9.2 - as_component_kind_get_type@Base 0.9.2 - as_component_kind_to_string@Base 0.9.2 - as_component_new@Base 0.9.2 - as_component_set_active_locale@Base 0.9.2 - as_component_set_architecture@Base 0.9.4 - as_component_set_bundles_table@Base 0.9.2 - as_component_set_categories@Base 0.9.2 - as_component_set_categories_from_str@Base 0.9.2 - as_component_set_compulsory_for_desktops@Base 0.9.2 - as_component_set_description@Base 0.9.2 - as_component_set_developer_name@Base 0.9.2 - as_component_set_id@Base 0.9.2 - as_component_set_keywords@Base 0.9.2 - as_component_set_kind@Base 0.9.2 - as_component_set_name@Base 0.9.2 - as_component_set_origin@Base 0.9.2 - as_component_set_pkgnames@Base 0.9.2 - as_component_set_priority@Base 0.9.2 - as_component_set_project_group@Base 0.9.2 - as_component_set_project_license@Base 0.9.2 - as_component_set_source_pkgname@Base 0.9.2 - as_component_set_summary@Base 0.9.2 - as_component_to_string@Base 0.9.2 - as_copy_file@Base 0.9.3 - as_data_pool_error_quark@Base 0.9.2 - as_data_pool_get_component_by_id@Base 0.9.2 - as_data_pool_get_components@Base 0.9.2 - as_data_pool_get_locale@Base 0.9.2 - as_data_pool_get_metadata_locations@Base 0.9.2 - as_data_pool_get_type@Base 0.9.2 - as_data_pool_new@Base 0.9.2 - as_data_pool_set_locale@Base 0.9.2 - as_data_pool_set_metadata_locations@Base 0.9.2 - as_data_pool_update@Base 0.9.2 - as_database_error_quark@Base 0.9.2 - as_database_find_components@Base 0.9.2 - as_database_get_all_components@Base 0.9.2 - as_database_get_component_by_id@Base 0.9.2 - as_database_get_components_by_kind@Base 0.9.2 - as_database_get_components_by_provided_item@Base 0.9.2 - as_database_get_location@Base 0.9.2 - as_database_get_type@Base 0.9.2 - as_database_new@Base 0.9.2 - as_database_open@Base 0.9.2 - as_database_set_location@Base 0.9.2 - as_description_markup_convert_simple@Base 0.9.2 - as_distro_details_get_bool@Base 0.9.2 - as_distro_details_get_id@Base 0.9.2 - as_distro_details_get_name@Base 0.9.2 - as_distro_details_get_str@Base 0.9.2 - as_distro_details_get_type@Base 0.9.2 - as_distro_details_get_version@Base 0.9.2 - as_distro_details_new@Base 0.9.2 - as_get_current_arch@Base 0.9.4 - as_get_current_locale@Base 0.9.2 - as_get_icon_repository_paths@Base 0.9.2 - as_get_system_categories@Base 0.9.2 - as_icon_get_filename@Base 0.9.2 - as_icon_get_height@Base 0.9.2 - as_icon_get_kind@Base 0.9.2 - as_icon_get_name@Base 0.9.2 - as_icon_get_type@Base 0.9.2 - as_icon_get_url@Base 0.9.2 - as_icon_get_width@Base 0.9.2 - as_icon_kind_from_string@Base 0.9.2 - as_icon_kind_to_string@Base 0.9.2 - as_icon_new@Base 0.9.2 - as_icon_set_filename@Base 0.9.2 - as_icon_set_height@Base 0.9.2 - as_icon_set_kind@Base 0.9.2 - as_icon_set_name@Base 0.9.2 - as_icon_set_url@Base 0.9.2 - as_icon_set_width@Base 0.9.2 - as_image_get_height@Base 0.9.2 - as_image_get_kind@Base 0.9.2 - as_image_get_type@Base 0.9.2 - as_image_get_url@Base 0.9.2 - as_image_get_width@Base 0.9.2 - as_image_kind_from_string@Base 0.9.2 - as_image_kind_to_string@Base 0.9.2 - as_image_new@Base 0.9.2 - as_image_set_height@Base 0.9.2 - as_image_set_kind@Base 0.9.2 - as_image_set_url@Base 0.9.2 - as_image_set_width@Base 0.9.2 - as_is_cruft_locale@Base 0.9.4 - as_iso8601_to_datetime@Base 0.9.2 - as_locale_strip_encoding@Base 0.9.4 - as_menu_parser_get_type@Base 0.9.2 - as_menu_parser_get_update_category_data@Base 0.9.2 - as_menu_parser_new@Base 0.9.2 - as_menu_parser_new_from_file@Base 0.9.2 - as_menu_parser_parse@Base 0.9.2 - as_menu_parser_set_update_category_data@Base 0.9.2 - as_metadata_add_component@Base 0.9.2 - as_metadata_clear_components@Base 0.9.2 - as_metadata_component_to_upstream_xml@Base 0.9.2 - as_metadata_components_to_distro_xml@Base 0.9.2 - as_metadata_components_to_distro_yaml@Base 0.9.3 - as_metadata_error_quark@Base 0.9.2 - as_metadata_get_architecture@Base 0.9.4 - as_metadata_get_component@Base 0.9.2 - as_metadata_get_components@Base 0.9.2 - as_metadata_get_locale@Base 0.9.2 - as_metadata_get_origin@Base 0.9.2 - as_metadata_get_parser_mode@Base 0.9.2 - as_metadata_get_type@Base 0.9.2 - as_metadata_get_update_existing@Base 0.9.3 - as_metadata_get_write_header@Base 0.9.3 - as_metadata_new@Base 0.9.2 - as_metadata_parse_file@Base 0.9.2 - as_metadata_parse_xml@Base 0.9.2 - as_metadata_parse_yaml@Base 0.9.2 - as_metadata_save_distro_xml@Base 0.9.2 - as_metadata_save_distro_yaml@Base 0.9.3 - as_metadata_save_upstream_xml@Base 0.9.2 - as_metadata_set_architecture@Base 0.9.4 - as_metadata_set_locale@Base 0.9.2 - as_metadata_set_origin@Base 0.9.2 - as_metadata_set_parser_mode@Base 0.9.2 - as_metadata_set_update_existing@Base 0.9.3 - as_metadata_set_write_header@Base 0.9.3 - as_provided_add_item@Base 0.9.2 - as_provided_get_items@Base 0.9.2 - as_provided_get_kind@Base 0.9.2 - as_provided_get_type@Base 0.9.2 - as_provided_has_item@Base 0.9.2 - as_provided_kind_from_string@Base 0.9.2 - as_provided_kind_to_l10n_string@Base 0.9.2 - as_provided_kind_to_string@Base 0.9.2 - as_provided_new@Base 0.9.2 - as_provided_set_kind@Base 0.9.2 - as_ptr_array_to_strv@Base 0.9.2 - as_release_add_location@Base 0.9.2 - as_release_get_active_locale@Base 0.9.2 - as_release_get_checksum@Base 0.9.2 - as_release_get_description@Base 0.9.2 - as_release_get_locations@Base 0.9.2 - as_release_get_size@Base 0.9.2 - as_release_get_timestamp@Base 0.9.2 - as_release_get_type@Base 0.9.2 - as_release_get_urgency@Base 0.9.2 - as_release_get_version@Base 0.9.2 - as_release_new@Base 0.9.2 - as_release_set_active_locale@Base 0.9.2 - as_release_set_checksum@Base 0.9.2 - as_release_set_description@Base 0.9.2 - as_release_set_size@Base 0.9.2 - as_release_set_timestamp@Base 0.9.2 - as_release_set_urgency@Base 0.9.2 - as_release_set_version@Base 0.9.2 - as_reset_umask@Base 0.9.3 - as_screenshot_add_image@Base 0.9.2 - as_screenshot_get_active_locale@Base 0.9.2 - as_screenshot_get_caption@Base 0.9.2 - as_screenshot_get_caption_table@Base 0.9.3 - as_screenshot_get_images@Base 0.9.2 - as_screenshot_get_kind@Base 0.9.2 - as_screenshot_get_type@Base 0.9.2 - as_screenshot_is_valid@Base 0.9.2 - as_screenshot_kind_from_string@Base 0.9.2 - as_screenshot_kind_to_string@Base 0.9.2 - as_screenshot_new@Base 0.9.2 - as_screenshot_set_active_locale@Base 0.9.2 - as_screenshot_set_caption@Base 0.9.2 - as_screenshot_set_kind@Base 0.9.2 - as_size_kind_from_string@Base 0.9.2 - as_size_kind_to_string@Base 0.9.2 - as_str_empty@Base 0.9.2 - as_str_replace@Base 0.9.2 - as_touch_location@Base 0.9.2 - as_translation_get_id@Base 0.9.2 - as_translation_get_kind@Base 0.9.2 - as_translation_get_type@Base 0.9.2 - as_translation_kind_from_string@Base 0.9.2 - as_translation_kind_to_string@Base 0.9.2 - as_translation_new@Base 0.9.2 - as_translation_set_id@Base 0.9.2 - as_translation_set_kind@Base 0.9.2 - as_urgency_kind_from_string@Base 0.9.2 - as_urgency_kind_to_string@Base 0.9.2 - as_url_kind_from_string@Base 0.9.2 - as_url_kind_to_string@Base 0.9.2 - as_utils_categories_from_str@Base 0.9.2 - as_utils_categories_from_strv@Base 0.9.2 - as_utils_delete_dir_recursive@Base 0.9.2 - as_utils_find_files@Base 0.9.2 - as_utils_find_files_matching@Base 0.9.2 - as_utils_is_root@Base 0.9.2 - as_utils_is_writable@Base 0.9.2 - as_validator_clear_issues@Base 0.9.2 - as_validator_get_issues@Base 0.9.2 - as_validator_get_type@Base 0.9.2 - as_validator_issue_get_importance@Base 0.9.2 - as_validator_issue_get_kind@Base 0.9.2 - as_validator_issue_get_location@Base 0.9.2 - as_validator_issue_get_message@Base 0.9.2 - as_validator_issue_get_type@Base 0.9.2 - as_validator_issue_new@Base 0.9.2 - as_validator_issue_set_importance@Base 0.9.2 - as_validator_issue_set_kind@Base 0.9.2 - as_validator_issue_set_location@Base 0.9.2 - as_validator_issue_set_message@Base 0.9.2 - as_validator_new@Base 0.9.2 - as_validator_validate_data@Base 0.9.2 - as_validator_validate_file@Base 0.9.2 - as_validator_validate_tree@Base 0.9.2 - as_xmldata_clear_error@Base 0.9.4 - as_xmldata_get_node_locale@Base 0.9.2 - as_xmldata_get_type@Base 0.9.2 - as_xmldata_initialize@Base 0.9.2 - as_xmldata_new@Base 0.9.2 - as_xmldata_parse_component_node@Base 0.9.2 - as_xmldata_parse_distro_data@Base 0.9.2 - as_xmldata_parse_upstream_data@Base 0.9.2 - as_xmldata_serialize_to_distro@Base 0.9.2 - as_xmldata_serialize_to_upstream@Base 0.9.2 - as_xmldata_set_parser_mode@Base 0.9.2 - as_xmldata_update_cpt_with_upstream_data@Base 0.9.3 - as_yaml_emit_localized_lists@Base 0.9.3 - as_yaml_emit_provides@Base 0.9.3 - as_yaml_emit_screenshots@Base 0.9.3 - as_yamldata_get_locale@Base 0.9.2 - as_yamldata_get_type@Base 0.9.2 - as_yamldata_initialize@Base 0.9.2 - as_yamldata_new@Base 0.9.2 - as_yamldata_parse_distro_data@Base 0.9.2 - as_yamldata_serialize_to_distro@Base 0.9.3 - as_yamldata_set_locale@Base 0.9.2 diff -Nru appstream-0.9.4/debian/libappstream4.install appstream-0.12.0/debian/libappstream4.install --- appstream-0.9.4/debian/libappstream4.install 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/libappstream4.install 2018-04-04 16:29:30.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libappstream.so.* diff -Nru appstream-0.9.4/debian/libappstream4.symbols appstream-0.12.0/debian/libappstream4.symbols --- appstream-0.9.4/debian/libappstream4.symbols 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/libappstream4.symbols 2018-04-04 16:05:47.000000000 +0000 @@ -0,0 +1,408 @@ +libappstream.so.4 libappstream4 #MINVER# + AS_APPSTREAM_METADATA_PATHS@Base 0.10.0 + as_bundle_get_id@Base 0.10.0 + as_bundle_get_kind@Base 0.10.0 + as_bundle_get_type@Base 0.10.0 + as_bundle_kind_from_string@Base 0.10.0 + as_bundle_kind_to_string@Base 0.10.0 + as_bundle_new@Base 0.10.0 + as_bundle_set_id@Base 0.10.0 + as_bundle_set_kind@Base 0.10.0 + as_cache_file_read@Base 0.10.0 + as_cache_file_save@Base 0.10.0 + as_category_add_child@Base 0.10.0 + as_category_add_component@Base 0.10.0 + as_category_add_desktop_group@Base 0.10.0 + as_category_get_children@Base 0.10.0 + as_category_get_components@Base 0.10.0 + as_category_get_desktop_groups@Base 0.10.0 + as_category_get_icon@Base 0.10.0 + as_category_get_id@Base 0.10.0 + as_category_get_name@Base 0.10.0 + as_category_get_summary@Base 0.10.0 + as_category_get_type@Base 0.10.0 + as_category_has_children@Base 0.10.0 + as_category_has_component@Base 0.10.0 + as_category_new@Base 0.10.0 + as_category_remove_child@Base 0.10.0 + as_category_set_icon@Base 0.10.0 + as_category_set_id@Base 0.10.0 + as_category_set_name@Base 0.10.0 + as_category_set_summary@Base 0.10.0 + as_checksum_get_kind@Base 0.10.0 + as_checksum_get_type@Base 0.10.0 + as_checksum_get_value@Base 0.10.0 + as_checksum_kind_from_string@Base 0.10.0 + as_checksum_kind_to_string@Base 0.10.0 + as_checksum_new@Base 0.10.0 + as_checksum_set_kind@Base 0.10.0 + as_checksum_set_value@Base 0.10.0 + as_component_add_addon@Base 0.10.0 + as_component_add_bundle@Base 0.10.0 + as_component_add_category@Base 0.10.0 + as_component_add_content_rating@Base 0.11.0 + as_component_add_extends@Base 0.10.0 + as_component_add_icon@Base 0.10.0 + as_component_add_language@Base 0.10.0 + as_component_add_launchable@Base 0.11.0 + as_component_add_provided@Base 0.10.0 + as_component_add_relation@Base 0.12.0 + as_component_add_release@Base 0.10.0 + as_component_add_screenshot@Base 0.10.0 + as_component_add_suggested@Base 0.10.0 + as_component_add_translation@Base 0.10.0 + as_component_add_url@Base 0.10.0 + as_component_get_active_locale@Base 0.10.0 + as_component_get_addons@Base 0.10.0 + as_component_get_bundle@Base 0.10.0 + as_component_get_bundles@Base 0.10.0 + as_component_get_categories@Base 0.10.0 + as_component_get_compulsory_for_desktops@Base 0.10.0 + as_component_get_content_rating@Base 0.11.0 + as_component_get_content_ratings@Base 0.11.0 + as_component_get_custom@Base 0.10.5 + as_component_get_custom_value@Base 0.10.5 + as_component_get_data_id@Base 0.10.0 + as_component_get_description@Base 0.10.0 + as_component_get_desktop_id@Base 0.10.0 + as_component_get_developer_name@Base 0.10.0 + as_component_get_extends@Base 0.10.0 + as_component_get_icon_by_size@Base 0.10.0 + as_component_get_icons@Base 0.10.0 + as_component_get_id@Base 0.10.0 + as_component_get_keywords@Base 0.10.0 + as_component_get_kind@Base 0.10.0 + as_component_get_language@Base 0.10.0 + as_component_get_languages@Base 0.10.0 + as_component_get_languages_table@Base 0.10.0 + as_component_get_launchable@Base 0.11.0 + as_component_get_launchables@Base 0.12.0 + as_component_get_merge_kind@Base 0.10.0 + as_component_get_metadata_license@Base 0.10.0 + as_component_get_name@Base 0.10.0 + as_component_get_origin@Base 0.10.0 + as_component_get_pkgname@Base 0.10.0 + as_component_get_pkgnames@Base 0.10.0 + as_component_get_priority@Base 0.10.2 + as_component_get_project_group@Base 0.10.0 + as_component_get_project_license@Base 0.10.0 + as_component_get_provided@Base 0.10.0 + as_component_get_provided_for_kind@Base 0.10.0 + as_component_get_recommends@Base 0.12.0 + as_component_get_releases@Base 0.10.0 + as_component_get_requires@Base 0.12.0 + as_component_get_screenshots@Base 0.10.0 + as_component_get_search_tokens@Base 0.10.0 + as_component_get_source_pkgname@Base 0.10.0 + as_component_get_suggested@Base 0.10.0 + as_component_get_summary@Base 0.10.0 + as_component_get_translations@Base 0.10.0 + as_component_get_type@Base 0.10.0 + as_component_get_url@Base 0.10.0 + as_component_get_value_flags@Base 0.10.0 + as_component_has_bundle@Base 0.10.0 + as_component_has_category@Base 0.10.0 + as_component_insert_custom_value@Base 0.10.5 + as_component_is_compulsory_for_desktop@Base 0.10.0 + as_component_is_ignored@Base 0.10.2 + as_component_is_member_of_category@Base 0.10.0 + as_component_is_valid@Base 0.10.0 + as_component_kind_from_string@Base 0.10.0 + as_component_kind_get_type@Base 0.10.0 + as_component_kind_to_string@Base 0.10.0 + as_component_new@Base 0.10.0 + as_component_search_matches@Base 0.10.0 + as_component_search_matches_all@Base 0.10.0 + as_component_set_active_locale@Base 0.10.0 + as_component_set_compulsory_for_desktop@Base 0.10.0 + as_component_set_data_id@Base 0.10.0 + as_component_set_description@Base 0.10.0 + as_component_set_developer_name@Base 0.10.0 + as_component_set_id@Base 0.10.0 + as_component_set_keywords@Base 0.10.0 + as_component_set_kind@Base 0.10.0 + as_component_set_merge_kind@Base 0.10.0 + as_component_set_metadata_license@Base 0.10.0 + as_component_set_name@Base 0.10.0 + as_component_set_origin@Base 0.10.0 + as_component_set_pkgnames@Base 0.10.0 + as_component_set_priority@Base 0.10.2 + as_component_set_project_group@Base 0.10.0 + as_component_set_project_license@Base 0.10.0 + as_component_set_source_pkgname@Base 0.10.0 + as_component_set_summary@Base 0.10.0 + as_component_set_value_flags@Base 0.10.0 + as_component_to_string@Base 0.10.0 + as_content_rating_get_kind@Base 0.11.0 + as_content_rating_get_minimum_age@Base 0.11.0 + as_content_rating_get_type@Base 0.11.0 + as_content_rating_get_value@Base 0.11.0 + as_content_rating_new@Base 0.11.0 + as_content_rating_set_kind@Base 0.11.0 + as_content_rating_set_value@Base 0.11.0 + as_content_rating_value_from_string@Base 0.11.0 + as_content_rating_value_to_string@Base 0.11.0 + as_context_get_all_locale_enabled@Base 0.11.1 + as_context_get_architecture@Base 0.11.1 + as_context_get_filename@Base 0.11.2 + as_context_get_format_version@Base 0.11.1 + as_context_get_locale@Base 0.11.1 + as_context_get_media_baseurl@Base 0.11.1 + as_context_get_origin@Base 0.11.1 + as_context_get_priority@Base 0.11.1 + as_context_get_style@Base 0.11.1 + as_context_get_type@Base 0.11.1 + as_context_has_media_baseurl@Base 0.11.1 + as_context_new@Base 0.11.1 + as_context_set_architecture@Base 0.11.1 + as_context_set_filename@Base 0.11.2 + as_context_set_format_version@Base 0.11.1 + as_context_set_locale@Base 0.11.1 + as_context_set_media_baseurl@Base 0.11.1 + as_context_set_origin@Base 0.11.1 + as_context_set_priority@Base 0.11.1 + as_context_set_style@Base 0.11.1 + as_copy_file@Base 0.10.0 + as_distro_details_get_bool@Base 0.10.0 + as_distro_details_get_id@Base 0.10.0 + as_distro_details_get_name@Base 0.10.0 + as_distro_details_get_str@Base 0.10.0 + as_distro_details_get_type@Base 0.10.0 + as_distro_details_get_version@Base 0.10.0 + as_distro_details_new@Base 0.10.0 + as_format_kind_from_string@Base 0.10.0 + as_format_kind_to_string@Base 0.10.0 + as_format_version_from_string@Base 0.10.0 + as_format_version_to_string@Base 0.10.0 + as_get_appstream_version@Base 0.11.7 + as_get_default_categories@Base 0.10.0 + as_icon_get_filename@Base 0.10.0 + as_icon_get_height@Base 0.10.0 + as_icon_get_kind@Base 0.10.0 + as_icon_get_name@Base 0.10.0 + as_icon_get_scale@Base 0.11.0 + as_icon_get_type@Base 0.10.0 + as_icon_get_url@Base 0.10.0 + as_icon_get_width@Base 0.10.0 + as_icon_kind_from_string@Base 0.10.0 + as_icon_kind_to_string@Base 0.10.0 + as_icon_new@Base 0.10.0 + as_icon_set_filename@Base 0.10.0 + as_icon_set_height@Base 0.10.0 + as_icon_set_kind@Base 0.10.0 + as_icon_set_name@Base 0.10.0 + as_icon_set_scale@Base 0.11.0 + as_icon_set_url@Base 0.10.0 + as_icon_set_width@Base 0.10.0 + as_image_get_height@Base 0.10.0 + as_image_get_kind@Base 0.10.0 + as_image_get_locale@Base 0.10.0 + as_image_get_type@Base 0.10.0 + as_image_get_url@Base 0.10.0 + as_image_get_width@Base 0.10.0 + as_image_kind_from_string@Base 0.10.0 + as_image_kind_to_string@Base 0.10.0 + as_image_new@Base 0.10.0 + as_image_set_height@Base 0.10.0 + as_image_set_kind@Base 0.10.0 + as_image_set_locale@Base 0.10.0 + as_image_set_url@Base 0.10.0 + as_image_set_width@Base 0.10.0 + as_is_spdx_license_expression@Base 0.10.0 + as_is_spdx_license_id@Base 0.10.0 + as_launchable_add_entry@Base 0.11.0 + as_launchable_get_entries@Base 0.11.0 + as_launchable_get_kind@Base 0.11.0 + as_launchable_get_type@Base 0.11.0 + as_launchable_kind_from_string@Base 0.11.0 + as_launchable_kind_to_string@Base 0.11.0 + as_launchable_new@Base 0.11.0 + as_launchable_set_kind@Base 0.11.0 + as_license_is_metadata_license@Base 0.10.0 + as_license_to_spdx_id@Base 0.10.0 + as_markup_convert_simple@Base 0.10.0 + as_merge_kind_from_string@Base 0.10.0 + as_merge_kind_to_string@Base 0.10.0 + as_metadata_add_component@Base 0.10.0 + as_metadata_clear_components@Base 0.10.0 + as_metadata_component_to_metainfo@Base 0.10.0 + as_metadata_components_to_collection@Base 0.10.0 + as_metadata_error_quark@Base 0.10.0 + as_metadata_get_architecture@Base 0.10.0 + as_metadata_get_component@Base 0.10.0 + as_metadata_get_components@Base 0.10.0 + as_metadata_get_format_style@Base 0.10.0 + as_metadata_get_format_version@Base 0.10.0 + as_metadata_get_locale@Base 0.10.0 + as_metadata_get_origin@Base 0.10.0 + as_metadata_get_type@Base 0.10.0 + as_metadata_get_update_existing@Base 0.10.0 + as_metadata_get_write_header@Base 0.10.0 + as_metadata_new@Base 0.10.0 + as_metadata_parse@Base 0.10.0 + as_metadata_parse_desktop_data@Base 0.10.2 + as_metadata_parse_file@Base 0.10.0 + as_metadata_save_collection@Base 0.10.0 + as_metadata_save_metainfo@Base 0.10.0 + as_metadata_set_architecture@Base 0.10.0 + as_metadata_set_format_style@Base 0.10.0 + as_metadata_set_format_version@Base 0.10.0 + as_metadata_set_locale@Base 0.10.0 + as_metadata_set_origin@Base 0.10.0 + as_metadata_set_update_existing@Base 0.10.0 + as_metadata_set_write_header@Base 0.10.0 + as_pool_add_component@Base 0.10.0 + as_pool_add_metadata_location@Base 0.10.0 + as_pool_clear@Base 0.10.0 + as_pool_clear_metadata_locations@Base 0.10.0 + as_pool_error_quark@Base 0.10.0 + as_pool_get_cache_flags@Base 0.10.0 + as_pool_get_components@Base 0.10.0 + as_pool_get_components_by_categories@Base 0.10.0 + as_pool_get_components_by_id@Base 0.10.0 + as_pool_get_components_by_kind@Base 0.10.0 + as_pool_get_components_by_launchable@Base 0.11.4 + as_pool_get_components_by_provided_item@Base 0.10.0 + as_pool_get_flags@Base 0.10.2 + as_pool_get_locale@Base 0.10.0 + as_pool_get_type@Base 0.10.0 + as_pool_load@Base 0.10.0 + as_pool_load_cache_file@Base 0.10.0 + as_pool_new@Base 0.10.0 + as_pool_refresh_cache@Base 0.10.0 + as_pool_save_cache_file@Base 0.10.0 + as_pool_search@Base 0.10.0 + as_pool_set_cache_flags@Base 0.10.0 + as_pool_set_flags@Base 0.10.2 + as_pool_set_locale@Base 0.10.0 + as_provided_add_item@Base 0.10.0 + as_provided_get_items@Base 0.10.0 + as_provided_get_kind@Base 0.10.0 + as_provided_get_type@Base 0.10.0 + as_provided_has_item@Base 0.10.0 + as_provided_kind_from_string@Base 0.10.0 + as_provided_kind_to_l10n_string@Base 0.10.0 + as_provided_kind_to_string@Base 0.10.0 + as_provided_new@Base 0.10.0 + as_provided_set_kind@Base 0.10.0 + as_relation_compare_from_string@Base 0.12.0 + as_relation_compare_to_string@Base 0.12.0 + as_relation_compare_to_symbols_string@Base 0.12.0 + as_relation_get_compare@Base 0.12.0 + as_relation_get_item_kind@Base 0.12.0 + as_relation_get_kind@Base 0.12.0 + as_relation_get_type@Base 0.12.0 + as_relation_get_value@Base 0.12.0 + as_relation_get_value_int@Base 0.12.0 + as_relation_get_version@Base 0.12.0 + as_relation_item_kind_from_string@Base 0.12.0 + as_relation_item_kind_to_string@Base 0.12.0 + as_relation_kind_from_string@Base 0.12.0 + as_relation_kind_to_string@Base 0.12.0 + as_relation_new@Base 0.12.0 + as_relation_set_compare@Base 0.12.0 + as_relation_set_item_kind@Base 0.12.0 + as_relation_set_kind@Base 0.12.0 + as_relation_set_value@Base 0.12.0 + as_relation_set_version@Base 0.12.0 + as_relation_version_compare@Base 0.12.0 + as_release_add_checksum@Base 0.10.0 + as_release_add_location@Base 0.10.0 + as_release_get_active_locale@Base 0.10.0 + as_release_get_checksum@Base 0.10.0 + as_release_get_checksums@Base 0.10.0 + as_release_get_description@Base 0.10.0 + as_release_get_kind@Base 0.12.0 + as_release_get_locations@Base 0.10.0 + as_release_get_size@Base 0.10.0 + as_release_get_timestamp@Base 0.10.0 + as_release_get_type@Base 0.10.0 + as_release_get_urgency@Base 0.10.0 + as_release_get_version@Base 0.10.0 + as_release_kind_from_string@Base 0.12.0 + as_release_kind_to_string@Base 0.12.0 + as_release_new@Base 0.10.0 + as_release_set_active_locale@Base 0.10.0 + as_release_set_description@Base 0.10.0 + as_release_set_kind@Base 0.12.0 + as_release_set_size@Base 0.10.0 + as_release_set_timestamp@Base 0.10.0 + as_release_set_urgency@Base 0.10.0 + as_release_set_version@Base 0.10.0 + as_release_vercmp@Base 0.10.0 + as_screenshot_add_image@Base 0.10.0 + as_screenshot_get_active_locale@Base 0.10.0 + as_screenshot_get_caption@Base 0.10.0 + as_screenshot_get_images@Base 0.10.0 + as_screenshot_get_images_all@Base 0.10.0 + as_screenshot_get_kind@Base 0.10.0 + as_screenshot_get_type@Base 0.10.0 + as_screenshot_is_valid@Base 0.10.0 + as_screenshot_kind_from_string@Base 0.10.0 + as_screenshot_kind_to_string@Base 0.10.0 + as_screenshot_new@Base 0.10.0 + as_screenshot_set_active_locale@Base 0.10.0 + as_screenshot_set_caption@Base 0.10.0 + as_screenshot_set_kind@Base 0.10.0 + as_size_kind_from_string@Base 0.10.0 + as_size_kind_to_string@Base 0.10.0 + as_spdx_license_detokenize@Base 0.10.0 + as_spdx_license_tokenize@Base 0.10.0 + as_stemmer_get@Base 0.10.0 + as_stemmer_get_type@Base 0.10.0 + as_stemmer_reload@Base 0.10.0 + as_stemmer_stem@Base 0.10.0 + as_suggested_add_id@Base 0.10.0 + as_suggested_get_ids@Base 0.10.0 + as_suggested_get_kind@Base 0.10.0 + as_suggested_get_type@Base 0.10.0 + as_suggested_is_valid@Base 0.10.0 + as_suggested_kind_from_string@Base 0.10.0 + as_suggested_kind_to_string@Base 0.10.0 + as_suggested_new@Base 0.10.0 + as_suggested_set_kind@Base 0.10.0 + as_translation_get_id@Base 0.10.0 + as_translation_get_kind@Base 0.10.0 + as_translation_get_type@Base 0.10.0 + as_translation_kind_from_string@Base 0.10.0 + as_translation_kind_to_string@Base 0.10.0 + as_translation_new@Base 0.10.0 + as_translation_set_id@Base 0.10.0 + as_translation_set_kind@Base 0.10.0 + as_urgency_kind_from_string@Base 0.10.0 + as_urgency_kind_to_string@Base 0.10.0 + as_url_kind_from_string@Base 0.10.0 + as_url_kind_to_string@Base 0.10.0 + as_utils_compare_versions@Base 0.10.0 + as_utils_find_files@Base 0.10.0 + as_utils_find_files_matching@Base 0.10.0 + as_utils_is_category_name@Base 0.10.0 + as_utils_is_desktop_environment@Base 0.10.0 + as_utils_is_tld@Base 0.10.0 + as_utils_is_writable@Base 0.10.0 + as_utils_locale_is_compatible@Base 0.10.0 + as_utils_sort_components_into_categories@Base 0.10.0 + as_validator_clear_issues@Base 0.10.0 + as_validator_get_check_urls@Base 0.11.7 + as_validator_get_issues@Base 0.10.0 + as_validator_get_type@Base 0.10.0 + as_validator_issue_get_cid@Base 0.10.0 + as_validator_issue_get_filename@Base 0.10.0 + as_validator_issue_get_importance@Base 0.10.0 + as_validator_issue_get_kind@Base 0.10.0 + as_validator_issue_get_line@Base 0.10.0 + as_validator_issue_get_location@Base 0.10.0 + as_validator_issue_get_message@Base 0.10.0 + as_validator_issue_get_type@Base 0.10.0 + as_validator_issue_new@Base 0.10.0 + as_validator_issue_set_cid@Base 0.10.0 + as_validator_issue_set_filename@Base 0.10.0 + as_validator_issue_set_importance@Base 0.10.0 + as_validator_issue_set_kind@Base 0.10.0 + as_validator_issue_set_line@Base 0.10.0 + as_validator_issue_set_message@Base 0.10.0 + as_validator_new@Base 0.10.0 + as_validator_set_check_urls@Base 0.11.7 + as_validator_validate_data@Base 0.10.0 + as_validator_validate_file@Base 0.10.0 + as_validator_validate_tree@Base 0.10.0 diff -Nru appstream-0.9.4/debian/libappstream-dev.install appstream-0.12.0/debian/libappstream-dev.install --- appstream-0.9.4/debian/libappstream-dev.install 2016-02-04 16:28:41.000000000 +0000 +++ appstream-0.12.0/debian/libappstream-dev.install 2018-04-04 16:29:30.000000000 +0000 @@ -1,4 +1,4 @@ -usr/include/AppStream/* +usr/include/appstream/* usr/lib/*/libappstream.so usr/lib/*/pkgconfig/appstream.pc usr/share/gir-1.0/AppStream-*.gir diff -Nru appstream-0.9.4/debian/libappstreamqt1.install appstream-0.12.0/debian/libappstreamqt1.install --- appstream-0.9.4/debian/libappstreamqt1.install 2016-02-04 16:28:41.000000000 +0000 +++ appstream-0.12.0/debian/libappstreamqt1.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/libAppstreamQt.so.* diff -Nru appstream-0.9.4/debian/libappstreamqt2.install appstream-0.12.0/debian/libappstreamqt2.install --- appstream-0.9.4/debian/libappstreamqt2.install 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/libappstreamqt2.install 2018-04-04 16:29:30.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libAppStreamQt.so.* diff -Nru appstream-0.9.4/debian/libappstreamqt-dev.install appstream-0.12.0/debian/libappstreamqt-dev.install --- appstream-0.9.4/debian/libappstreamqt-dev.install 2016-02-04 16:28:41.000000000 +0000 +++ appstream-0.12.0/debian/libappstreamqt-dev.install 2018-04-04 16:29:30.000000000 +0000 @@ -1,3 +1,3 @@ -usr/include/AppstreamQt/* -usr/lib/*/cmake/AppstreamQt/* -usr/lib/*/libAppstreamQt.so +usr/include/AppStreamQt/* +usr/lib/*/cmake/AppStreamQt/* +usr/lib/*/libAppStreamQt.so diff -Nru appstream-0.9.4/debian/patches/01_load-desktop-data.patch appstream-0.12.0/debian/patches/01_load-desktop-data.patch --- appstream-0.9.4/debian/patches/01_load-desktop-data.patch 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/patches/01_load-desktop-data.patch 2018-04-06 19:08:57.000000000 +0000 @@ -0,0 +1,50 @@ +From 7a0059253859eedce21c057e53d91bccd6f18d42 Mon Sep 17 00:00:00 2001 +From: Matthias Klumpp +Date: Fri, 6 Apr 2018 20:56:23 +0200 +Subject: [PATCH] Load data from desktop files properly again + +The previous code made absolutely zero logical sense, but at least it +was very consistent in its error. +--- + src/as-pool.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/as-pool.c b/src/as-pool.c +index f4846e55..2394ead7 100644 +--- a/src/as-pool.c ++++ b/src/as-pool.c +@@ -840,14 +840,14 @@ as_pool_load_metainfo_data (AsPool *pool) + + mi_cid_desktop = g_strdup_printf ("%s.desktop", mi_cid); + /* check with .desktop suffix too */ +- if (!g_hash_table_contains (priv->known_cids, mi_cid_desktop)) { ++ if (g_hash_table_contains (priv->known_cids, mi_cid_desktop)) { + g_debug ("Skipped: %s (already known)", fname); + continue; + } + } + + /* quickly check if we know the component already */ +- if (!g_hash_table_contains (priv->known_cids, mi_cid)) { ++ if (g_hash_table_contains (priv->known_cids, mi_cid)) { + g_debug ("Skipped: %s (already known)", fname); + continue; + } +@@ -926,7 +926,7 @@ as_pool_load_desktop_entries (AsPool *pool) + if (!as_flags_contains (priv->flags, AS_POOL_FLAG_READ_METAINFO)) { + g_autofree gchar *de_cid = g_path_get_basename (fname); + +- if (!g_hash_table_contains (priv->known_cids, de_cid)) { ++ if (g_hash_table_contains (priv->known_cids, de_cid)) { + g_debug ("Skipped: %s (already known)", fname); + continue; + } +@@ -934,7 +934,7 @@ as_pool_load_desktop_entries (AsPool *pool) + /* check without .desktop suffix too */ + if (g_str_has_suffix (de_cid, ".desktop")) { + de_cid[strlen (de_cid) - 8] = '\0'; +- if (!g_hash_table_contains (priv->known_cids, de_cid)) { ++ if (g_hash_table_contains (priv->known_cids, de_cid)) { + g_debug ("Skipped: %s (already known)", fname); + continue; + } diff -Nru appstream-0.9.4/debian/patches/02_cache-explicit-variants.patch appstream-0.12.0/debian/patches/02_cache-explicit-variants.patch --- appstream-0.9.4/debian/patches/02_cache-explicit-variants.patch 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/patches/02_cache-explicit-variants.patch 2018-09-14 08:59:05.000000000 +0000 @@ -0,0 +1,63 @@ +From 734e9da66bf12fcaa94c10465db2dcf8bb2b94cb Mon Sep 17 00:00:00 2001 +From: Matthias Klumpp +Date: Sun, 19 Aug 2018 16:21:15 +0200 +Subject: [PATCH] cache: Set explicit variant types for cases where they can + not be inferred + +This ensures we do not run into assertion failures in case no array or +dict elements exist from which the final variant type can be +automatically inferred. +This resolves #198 + +Bug: https://github.com/ximion/appstream/issues/198 +Bug-Ubuntu: https://launchpad.net/bugs/1792537 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906538 +Origin: https://github.com/ximion/appstream/commit/734e9da66bf12fcaa94c10465db2dcf8bb2b94cb + +--- + src/as-content-rating.c | 2 +- + src/as-release.c | 4 ++-- + src/as-screenshot.c | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +--- a/src/as-content-rating.c ++++ b/src/as-content-rating.c +@@ -499,7 +499,7 @@ as_content_rating_to_variant (AsContentR + GVariantBuilder rating_b; + guint j; + +- g_variant_builder_init (&values_b, G_VARIANT_TYPE_ARRAY); ++ g_variant_builder_init (&values_b, (const GVariantType *) "a{su}"); + for (j = 0; j < priv->keys->len; j++) { + AsContentRatingKey *key = (AsContentRatingKey*) g_ptr_array_index (priv->keys, j); + g_variant_builder_add (&values_b, "{su}", key->id, key->value); +--- a/src/as-release.c ++++ b/src/as-release.c +@@ -923,14 +923,14 @@ as_release_to_variant (AsRelease *releas + gboolean have_sizes = FALSE; + + /* build checksum info */ +- g_variant_builder_init (&checksum_b, G_VARIANT_TYPE_DICTIONARY); ++ g_variant_builder_init (&checksum_b, (const GVariantType *) "a{us}"); + for (j = 0; j < priv->checksums->len; j++) { + AsChecksum *cs = AS_CHECKSUM (g_ptr_array_index (priv->checksums, j)); + as_checksum_to_variant (cs, &checksum_b); + } + + /* build size info */ +- g_variant_builder_init (&sizes_b, G_VARIANT_TYPE_DICTIONARY); ++ g_variant_builder_init (&sizes_b, (const GVariantType *) "a{ut}"); + for (j = 0; j < AS_SIZE_KIND_LAST; j++) { + if (as_release_get_size (release, (AsSizeKind) j) > 0) { + g_variant_builder_add (&sizes_b, "{ut}", +--- a/src/as-screenshot.c ++++ b/src/as-screenshot.c +@@ -598,7 +598,7 @@ as_screenshot_to_variant (AsScreenshot * + if (priv->images->len == 0) + return FALSE; + +- g_variant_builder_init (&images_b, G_VARIANT_TYPE_ARRAY); ++ g_variant_builder_init (&images_b, (const GVariantType *) "aa{sv}"); + for (i = 0; i < priv->images->len; i++) + as_image_to_variant (AS_IMAGE (g_ptr_array_index (priv->images, i)), &images_b); + diff -Nru appstream-0.9.4/debian/patches/series appstream-0.12.0/debian/patches/series --- appstream-0.9.4/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/debian/patches/series 2018-09-14 08:59:05.000000000 +0000 @@ -0,0 +1,2 @@ +01_load-desktop-data.patch +02_cache-explicit-variants.patch diff -Nru appstream-0.9.4/debian/rules appstream-0.12.0/debian/rules --- appstream-0.9.4/debian/rules 2015-12-12 17:46:07.000000000 +0000 +++ appstream-0.12.0/debian/rules 2018-04-04 16:28:19.000000000 +0000 @@ -2,23 +2,15 @@ # -*- makefile -*- #export DH_VERBOSE=1 -AS_CONFIGURE_ARGS = -DQT=ON \ - -DDEP11=ON \ - -DAPT_SUPPORT=ON \ - -DVAPI=ON - - -# Define install target dir -INSTALLDIR = $(CURDIR)/debian/tmp +AS_CONFIGURE_ARGS = -Dqt=true \ + -Dapt-support=true \ + -Dvapi=true %: - dh $@ + dh $@ --with gir override_dh_auto_configure: dh_auto_configure -- $(AS_CONFIGURE_ARGS) -override_dh_auto_install: - dh_auto_install --destdir=$(INSTALLDIR) - -override_dh_install: - dh_install --list-missing +override_dh_missing: + dh_missing --fail-missing diff -Nru appstream-0.9.4/debian/tests/build appstream-0.12.0/debian/tests/build --- appstream-0.9.4/debian/tests/build 2016-04-18 14:27:01.000000000 +0000 +++ appstream-0.12.0/debian/tests/build 2018-04-04 22:32:26.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # autopkgtest check: Build and run a simple dummy program using the AppStream lib, # to verify that the headers and pkg-config file are installed correctly -# (c) 2014 Matthias Klumpp +# (c) 2014-2016 Matthias Klumpp set -e WORKDIR=$(mktemp -d) @@ -12,11 +12,12 @@ int main() { - AsComponent *cpt; - AsMetadata *metad; - gchar *xml_upstream; - gchar *xml_distro; - gchar **strv; + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(AsMetadata) metad = NULL; + g_autofree gchar *xml_metainfo = NULL; + g_autofree gchar *xml_collection = NULL; + g_auto(GStrv) strv = NULL; + GError *error = NULL; cpt = as_component_new (); as_component_set_kind (cpt, AS_COMPONENT_KIND_DESKTOP_APP); @@ -29,27 +30,29 @@ strv[0] = g_strdup ("foobar"); strv[1] = NULL; as_component_set_pkgnames (cpt, strv); - g_strfreev (strv); metad = as_metadata_new (); as_metadata_add_component (metad, cpt); - xml_upstream = as_metadata_component_to_upstream_xml (metad); - xml_distro = as_metadata_components_to_distro_xml (metad); - g_object_unref (metad); - g_debug ("Upstream XML: %s", xml_upstream); - g_debug ("Distro XML: %s", xml_distro); + xml_metainfo = as_metadata_component_to_metainfo (metad, AS_FORMAT_KIND_XML, &error); + g_assert_no_error (error); - g_assert_cmpstr (xml_upstream, ==, "\n" - "\n" + xml_collection = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_XML, &error); + g_assert_no_error (error); + + g_debug ("Metainfo XML: %s", xml_metainfo); + g_debug ("Collection XML: %s", xml_collection); + + g_assert_cmpstr (xml_metainfo, ==, "\n" + "\n" " org.example.Test.desktop\n" " Test\n" " It does things\n" " foobar\n" "\n"); - g_assert_cmpstr (xml_distro, ==, "\n" - "\n" - " \n" + g_assert_cmpstr (xml_collection, ==, "\n" + "\n" + " \n" " org.example.Test.desktop\n" " Test\n" " It does things\n" @@ -57,9 +60,6 @@ " \n" "\n"); - g_free (xml_upstream); - g_free (xml_distro); - return 0; } EOF diff -Nru appstream-0.9.4/debian/tests/cache-refresh appstream-0.12.0/debian/tests/cache-refresh --- appstream-0.9.4/debian/tests/cache-refresh 2015-11-06 12:48:55.000000000 +0000 +++ appstream-0.12.0/debian/tests/cache-refresh 2017-08-30 18:08:12.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh -# autopkgtest check: Build the Xapian cache, ensure no errors happen while doing that. +# autopkgtest check: Build the data cache, ensure no errors happen while doing that. # (c) 2015 Matthias Klumpp set -e export G_DEBUG=fatal-warnings -appstreamcli refresh-index --force --verbose +appstreamcli refresh-cache --force --verbose echo "run: OK" diff -Nru appstream-0.9.4/debian/watch appstream-0.12.0/debian/watch --- appstream-0.9.4/debian/watch 2015-08-28 21:16:10.000000000 +0000 +++ appstream-0.12.0/debian/watch 2017-10-22 17:59:12.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -http://www.freedesktop.org/software/appstream/releases/AppStream-([\d\.]+)\.(?:tar\.xz|txz|tar\.bz2|tbz2|tar\.gz|tgz) +https://www.freedesktop.org/software/appstream/releases/AppStream-([\d\.]+)\.(?:tar\.xz|txz|tar\.bz2|tbz2|tar\.gz|tgz) diff -Nru appstream-0.9.4/docs/api/appstream.args appstream-0.12.0/docs/api/appstream.args --- appstream-0.9.4/docs/api/appstream.args 2015-12-09 22:10:02.000000000 +0000 +++ appstream-0.12.0/docs/api/appstream.args 1970-01-01 00:00:00.000000000 +0000 @@ -1,260 +0,0 @@ - -AsCategory::directory -gchar* - -rw -directory -directory. -NULL - - - -AsCategory::excluded -gpointer - -r -excluded -excluded. - - - - -AsCategory::icon -gchar* - -rw -icon -icon. -NULL - - - -AsCategory::included -gpointer - -r -included -included. - - - - -AsCategory::level -gint - -rw -level -level. -0 - - - -AsCategory::name -gchar* - -rw -name -name. -NULL - - - -AsCategory::subcategories -gpointer - -r -subcategories -subcategories. - - - - -AsCategory::summary -gchar* - -r -summary -summary. -NULL - - - -AsComponent::categories -GStrv - -rw -categories -categories. - - - - -AsComponent::description -gchar* - -rw -description -description. -NULL - - - -AsComponent::developer-name -gchar* - -rw -developer-name -developer-name. -NULL - - - -AsComponent::icons -gpointer - -r -icons -icons. - - - - -AsComponent::id -gchar* - -rw -id -id. -NULL - - - -AsComponent::keywords -GStrv - -rw -keywords -keywords. - - - - -AsComponent::kind -AsComponentKind - -rw -kind -kind. -AS_COMPONENT_KIND_UNKNOWN - - - -AsComponent::name -gchar* - -rw -name -name. -NULL - - - -AsComponent::pkgnames -GStrv - -rw -pkgnames -pkgnames. - - - - -AsComponent::project-group -gchar* - -rw -project-group -project-group. -NULL - - - -AsComponent::project-license -gchar* - -rw -project-license -project-license. -NULL - - - -AsComponent::screenshots -GPtrArray* - -r -screenshots -screenshots. - - - - -AsComponent::summary -gchar* - -rw -summary -summary. -NULL - - - -AsComponent::urls -GHashTable* - -r -urls -urls. - - - - -AsDistroDetails::id -gchar* - -r -id -id. -NULL - - - -AsDistroDetails::name -gchar* - -r -name -name. -NULL - - - -AsDistroDetails::version -gchar* - -r -version -version. -NULL - - - -AsMenuParser::update-category-data -gboolean - -rw -update-category-data -update-category-data. -FALSE - - diff -Nru appstream-0.9.4/docs/api/appstream-decl-list.txt appstream-0.12.0/docs/api/appstream-decl-list.txt --- appstream-0.9.4/docs/api/appstream-decl-list.txt 2016-04-15 01:15:56.000000000 +0000 +++ appstream-0.12.0/docs/api/appstream-decl-list.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,452 +0,0 @@ -
-as-cache-builder -AsCacheBuilder -AS_TYPE_CACHE_BUILDER -AsCacheBuilderClass -AS_CACHE_BUILDER_ERROR -as_cache_builder_error_quark -AsCacheBuilderError -as_cache_builder_new -as_cache_builder_setup -as_cache_builder_refresh -as_cache_builder_set_data_source_directories -AsCacheBuilder -
- -
-as-category -AsCategory -AS_TYPE_CATEGORY -AsCategoryClass -as_category_new -as_category_complete -as_category_get_directory -as_category_set_directory -as_category_get_name -as_category_set_name -as_category_get_summary -as_category_set_summary -as_category_get_icon -as_category_set_icon -as_category_has_subcategory -as_category_add_subcategory -as_category_remove_subcategory -as_category_get_included -as_category_get_excluded -as_category_get_subcategories -as_category_get_level -as_category_set_level -AsCategory -
- -
-as-component -AsComponent -AS_TYPE_COMPONENT -AsComponentClass -AsComponentKind -as_component_kind_to_string -as_component_kind_from_string -as_component_new -as_component_is_valid -as_component_to_string -as_component_get_active_locale -as_component_set_active_locale -as_component_get_kind -as_component_set_kind -as_component_get_id -as_component_set_id -as_component_get_origin -as_component_set_origin -as_component_get_pkgnames -as_component_set_pkgnames -as_component_get_source_pkgname -as_component_set_source_pkgname -as_component_get_name -as_component_set_name -as_component_get_summary -as_component_set_summary -as_component_get_description -as_component_set_description -as_component_get_project_license -as_component_set_project_license -as_component_get_project_group -as_component_set_project_group -as_component_get_developer_name -as_component_set_developer_name -as_component_get_compulsory_for_desktops -as_component_set_compulsory_for_desktops -as_component_is_compulsory_for_desktop -as_component_get_categories -as_component_set_categories -as_component_has_category -as_component_get_screenshots -as_component_add_screenshot -as_component_get_keywords -as_component_set_keywords -as_component_get_icons -as_component_get_icon_by_size -as_component_add_icon -as_component_add_provided -as_component_get_provided_for_kind -as_component_get_provided -as_component_get_url -as_component_add_url -as_component_get_releases -as_component_add_release -as_component_get_extends -as_component_add_extends -as_component_get_extensions -as_component_add_extension -as_component_get_languages -as_component_get_language -as_component_add_language -as_component_get_translations -as_component_add_translation -as_component_has_bundle -as_component_get_bundle_id -as_component_add_bundle_id -AsComponent - -AS_TYPE_COMPONENT_KIND -as_component_kind_get_type -
- -
-as-data-pool -AsDataPool -AS_TYPE_DATA_POOL -AsDataPoolClass -AsDataPoolError -AS_DATA_POOL_ERROR -as_data_pool_error_quark -as_data_pool_new -as_data_pool_get_locale -as_data_pool_set_locale -as_data_pool_update -as_data_pool_get_components -as_data_pool_get_component_by_id -as_data_pool_get_metadata_locations -as_data_pool_set_metadata_locations -AsDataPool -
- -
-as-database -AsDatabase -AS_TYPE_DATABASE -AsDatabaseClass -AsDatabaseError -AS_DATABASE_ERROR -as_database_new -as_database_error_quark -as_database_open -as_database_get_location -as_database_set_location -as_database_find_components -as_database_get_all_components -as_database_get_component_by_id -as_database_get_components_by_provided_item -as_database_get_components_by_kind -AsDatabase -
- -
-as-distro-details -AsDistroDetails -AS_TYPE_DISTRO_DETAILS -AsDistroDetailsClass -as_distro_details_new -as_distro_details_get_id -as_distro_details_get_name -as_distro_details_get_version -as_distro_details_get_str -as_distro_details_get_bool -as_get_icon_repository_paths -AsDistroDetails -
- -
-as-enums -AsUrlKind -as_url_kind_to_string -as_url_kind_from_string -AsBundleKind -as_bundle_kind_to_string -as_bundle_kind_from_string -AsUrgencyKind -as_urgency_kind_to_string -as_urgency_kind_from_string -
- -
-as-icon -AsIcon -AS_TYPE_ICON -AsIconClass -AsIconKind -as_icon_kind_from_string -as_icon_kind_to_string -as_icon_new -as_icon_get_kind -as_icon_set_kind -as_icon_get_name -as_icon_set_name -as_icon_get_url -as_icon_set_url -as_icon_get_filename -as_icon_set_filename -as_icon_get_width -as_icon_set_width -as_icon_get_height -as_icon_set_height -AsIcon -
- -
-as-image -AsImage -AS_TYPE_IMAGE -AsImageClass -AsImageKind -as_image_kind_from_string -as_image_kind_to_string -as_image_new -as_image_get_url -as_image_set_url -as_image_get_width -as_image_set_width -as_image_get_height -as_image_set_height -as_image_get_kind -as_image_set_kind -AsImage -
- -
-as-menu-parser -AsMenuParser -AS_TYPE_MENU_PARSER -AsMenuParserClass -as_menu_parser_new -as_menu_parser_new_from_file -as_menu_parser_parse -as_menu_parser_get_update_category_data -as_menu_parser_set_update_category_data -as_get_system_categories -AsMenuParser -
- -
-as-metadata -AsMetadata -AS_TYPE_METADATA -AsMetadataClass -AsParserMode -AsMetadataError -AS_METADATA_ERROR -as_metadata_new -as_metadata_error_quark -as_metadata_parse_file -as_metadata_parse_xml -as_metadata_parse_yaml -as_metadata_get_component -as_metadata_get_components -as_metadata_clear_components -as_metadata_add_component -as_metadata_component_to_upstream_xml -as_metadata_save_upstream_xml -as_metadata_components_to_distro_xml -as_metadata_save_distro_xml -as_metadata_components_to_distro_yaml -as_metadata_save_distro_yaml -as_metadata_set_locale -as_metadata_get_locale -as_metadata_get_origin -as_metadata_set_origin -as_metadata_get_update_existing -as_metadata_set_update_existing -as_metadata_get_write_header -as_metadata_set_write_header -as_metadata_set_parser_mode -as_metadata_get_parser_mode -as_metadata_get_architecture -as_metadata_set_architecture -AsMetadata -
- -
-as-provided -AsProvided -AS_TYPE_PROVIDED -AsProvidedClass -AsProvidedKind -as_provided_kind_to_string -as_provided_kind_from_string -as_provided_kind_to_l10n_string -as_provided_new -as_provided_get_kind -as_provided_set_kind -as_provided_get_items -as_provided_add_item -as_provided_has_item -AsProvided -
- -
-as-release -AsRelease -AS_TYPE_RELEASE -AsReleaseClass -AsChecksumKind -as_checksum_kind_to_string -as_checksum_kind_from_string -AsSizeKind -as_size_kind_to_string -as_size_kind_from_string -as_release_new -as_release_get_version -as_release_set_version -as_release_get_timestamp -as_release_set_timestamp -as_release_get_description -as_release_set_description -as_release_get_active_locale -as_release_set_active_locale -as_release_get_locations -as_release_add_location -as_release_get_checksum -as_release_set_checksum -as_release_get_urgency -as_release_set_urgency -as_release_get_size -as_release_set_size -AsRelease -
- -
-as-screenshot -AsScreenshot -AS_TYPE_SCREENSHOT -AsScreenshotClass -AsScreenshotKind -as_screenshot_kind_from_string -as_screenshot_kind_to_string -as_screenshot_is_valid -as_screenshot_new -as_screenshot_get_kind -as_screenshot_set_kind -as_screenshot_get_caption -as_screenshot_set_caption -as_screenshot_get_images -as_screenshot_add_image -as_screenshot_get_active_locale -as_screenshot_set_active_locale -AsScreenshot -
- -
-as-screenshot-private -as_screenshot_get_caption_table -
- -
-as-translation -AsTranslation -AS_TYPE_TRANSLATION -AsTranslationClass -AsTranslationKind -as_translation_kind_to_string -as_translation_kind_from_string -as_translation_new -as_translation_get_kind -as_translation_set_kind -as_translation_get_id -as_translation_set_id -AsTranslation -
- -
-as-utils-private -as_utils_delete_dir_recursive -as_utils_categories_from_strv -as_utils_categories_from_str -as_utils_find_files_matching -as_utils_find_files -as_utils_is_root -as_utils_is_writable -as_str_replace -as_ptr_array_to_strv -as_touch_location -as_copy_file -as_reset_umask -as_is_cruft_locale -as_locale_strip_encoding -as_get_current_arch -as_arch_compatible -
- -
-as-validator -AsValidator -AS_TYPE_VALIDATOR -AsValidatorClass -as_validator_new -as_validator_clear_issues -as_validator_validate_file -as_validator_validate_data -as_validator_validate_tree -as_validator_get_issues -AsValidator -
- -
-as-validator-issue -AsValidatorIssue -AS_TYPE_VALIDATOR_ISSUE -AsValidatorIssueClass -AsIssueImportance -AsIssueKind -as_validator_issue_new -as_validator_issue_get_kind -as_validator_issue_set_kind -as_validator_issue_get_importance -as_validator_issue_set_importance -as_validator_issue_get_message -as_validator_issue_set_message -as_validator_issue_get_location -as_validator_issue_set_location -AsValidatorIssue -
- -
-as-xmldata -AsXMLData -AS_TYPE_XMLDATA -AsXMLDataClass -as_xmldata_new -as_xmldata_initialize -as_xmldata_parse_upstream_data -as_xmldata_parse_distro_data -as_xmldata_update_cpt_with_upstream_data -as_xmldata_serialize_to_upstream -as_xmldata_serialize_to_distro -as_xmldata_set_parser_mode -as_xmldata_parse_component_node -AsXMLData -
- -
-as-yamldata -AsYAMLData -AS_TYPE_YAMLDATA -AsYAMLDataClass -as_yamldata_new -as_yamldata_initialize -as_yamldata_parse_distro_data -as_yamldata_serialize_to_distro -as_yamldata_get_locale -as_yamldata_set_locale -AsYAMLData -
- diff -Nru appstream-0.9.4/docs/api/appstream-decl.txt appstream-0.12.0/docs/api/appstream-decl.txt --- appstream-0.9.4/docs/api/appstream-decl.txt 2016-04-15 01:15:56.000000000 +0000 +++ appstream-0.12.0/docs/api/appstream-decl.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,1970 +0,0 @@ - -AS_TYPE_YAMLDATA -#define AS_TYPE_YAMLDATA (as_yamldata_get_type ()) - - -AsYAMLDataClass -struct _AsYAMLDataClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -as_yamldata_new -AsYAMLData * -void - - -as_yamldata_initialize -void -AsYAMLData *ydt, const gchar *locale, const gchar *origin, const gchar *media_baseurl, const gchar *arch, gint priority - - -as_yamldata_parse_distro_data -GPtrArray * -AsYAMLData *ydt, const gchar *data, GError **error - - -as_yamldata_serialize_to_distro -gchar * -AsYAMLData *ydt, GPtrArray *cpts, gboolean write_header, gboolean add_timestamp, GError **error - - -as_yamldata_get_locale -const gchar * -AsYAMLData *ydt - - -as_yamldata_set_locale -void -AsYAMLData *ydt, const gchar *locale - - -AsYAMLData - - -as_screenshot_get_caption_table -GHashTable * -AsScreenshot *screenshot - - -AS_TYPE_IMAGE -#define AS_TYPE_IMAGE (as_image_get_type ()) - - -AsImageClass -struct _AsImageClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsImageKind -typedef enum { - AS_IMAGE_KIND_UNKNOWN, - AS_IMAGE_KIND_SOURCE, - AS_IMAGE_KIND_THUMBNAIL, - /*< private >*/ - AS_IMAGE_KIND_LAST -} AsImageKind; - - -as_image_kind_from_string -AsImageKind -const gchar *kind - - -as_image_kind_to_string -const gchar * -AsImageKind kind - - -as_image_new -AsImage * -void - - -as_image_get_url -const gchar * -AsImage *image - - -as_image_set_url -void -AsImage *image, const gchar *url - - -as_image_get_width -guint -AsImage *image - - -as_image_set_width -void -AsImage *image, guint width - - -as_image_get_height -guint -AsImage *image - - -as_image_set_height -void -AsImage *image, guint height - - -as_image_get_kind -AsImageKind -AsImage *image - - -as_image_set_kind -void -AsImage *image, AsImageKind kind - - -AsImage - - -as_utils_delete_dir_recursive -gboolean -const gchar* dirname - - -as_utils_categories_from_strv -GPtrArray * -gchar **categories_strv, GPtrArray *system_categories - - -as_utils_categories_from_str -GPtrArray * -const gchar *categories_str, GPtrArray *system_categories - - -as_utils_find_files_matching -GPtrArray * -const gchar *dir, const gchar *pattern, gboolean recursive, GError **error - - -as_utils_find_files -GPtrArray * -const gchar *dir, gboolean recursive, GError **error - - -as_utils_is_root -gboolean -void - - -as_utils_is_writable -gboolean -const gchar *path - - -as_str_replace -gchar * -const gchar *str, const gchar *old_str, const gchar *new_str - - -as_ptr_array_to_strv -gchar ** -GPtrArray *array - - -as_touch_location -gboolean -const gchar *fname - - -as_copy_file -gboolean -const gchar *source, const gchar *destination, GError **error - - -as_reset_umask -void -void - - -as_is_cruft_locale -gboolean -const gchar *locale - - -as_locale_strip_encoding -gchar * -gchar *locale - - -as_get_current_arch -gchar * -void - - -as_arch_compatible -gboolean -const gchar *arch1, const gchar *arch2 - - -AS_TYPE_VALIDATOR -#define AS_TYPE_VALIDATOR (as_validator_get_type ()) - - -AsValidatorClass -struct _AsValidatorClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -as_validator_new -AsValidator * -void - - -as_validator_clear_issues -void -AsValidator *validator - - -as_validator_validate_file -gboolean -AsValidator *validator, GFile* metadata_file - - -as_validator_validate_data -gboolean -AsValidator *validator, const gchar *metadata - - -as_validator_validate_tree -gboolean -AsValidator *validator, const gchar *root_dir - - -as_validator_get_issues -GList * -AsValidator *validator - - -AsValidator - - -AS_TYPE_TRANSLATION -#define AS_TYPE_TRANSLATION (as_translation_get_type ()) - - -AsTranslationClass -struct _AsTranslationClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsTranslationKind -typedef enum { - AS_TRANSLATION_KIND_UNKNOWN, - AS_TRANSLATION_KIND_GETTEXT, - AS_TRANSLATION_KIND_QT, - /*< private >*/ - AS_TRANSLATION_KIND_LAST -} AsTranslationKind; - - -as_translation_kind_to_string -const gchar * -AsTranslationKind kind - - -as_translation_kind_from_string -AsTranslationKind -const gchar *kind_str - - -as_translation_new -AsTranslation * -void - - -as_translation_get_kind -AsTranslationKind -AsTranslation *tr - - -as_translation_set_kind -void -AsTranslation *tr, AsTranslationKind kind - - -as_translation_get_id -const gchar * -AsTranslation *tr - - -as_translation_set_id -void -AsTranslation *tr, const gchar *id - - -AsTranslation - - -AS_TYPE_VALIDATOR_ISSUE -#define AS_TYPE_VALIDATOR_ISSUE (as_validator_issue_get_type ()) - - -AsValidatorIssueClass -struct _AsValidatorIssueClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsIssueImportance -typedef enum { - AS_ISSUE_IMPORTANCE_UNKNOWN, - AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_IMPORTANCE_WARNING, - AS_ISSUE_IMPORTANCE_INFO, - AS_ISSUE_IMPORTANCE_PEDANTIC, - /*< private >*/ - AS_ISSUE_IMPORTANCE_LAST -} AsIssueImportance; - - -AsIssueKind -typedef enum { - AS_ISSUE_KIND_UNKNOWN, - AS_ISSUE_KIND_MARKUP_INVALID, - AS_ISSUE_KIND_LEGACY, - AS_ISSUE_KIND_TAG_DUPLICATED, - AS_ISSUE_KIND_TAG_MISSING, - AS_ISSUE_KIND_TAG_UNKNOWN, - AS_ISSUE_KIND_TAG_NOT_ALLOWED, - AS_ISSUE_KIND_PROPERTY_MISSING, - AS_ISSUE_KIND_PROPERTY_INVALID, - AS_ISSUE_KIND_VALUE_MISSING, - AS_ISSUE_KIND_VALUE_WRONG, - AS_ISSUE_KIND_VALUE_ISSUE, - AS_ISSUE_KIND_FILE_MISSING, - AS_ISSUE_KIND_WRONG_NAME, - AS_ISSUE_KIND_READ_ERROR, - /*< private >*/ - AS_ISSUE_KIND_LAST -} AsIssueKind; - - -as_validator_issue_new -AsValidatorIssue * -void - - -as_validator_issue_get_kind -AsIssueKind -AsValidatorIssue *issue - - -as_validator_issue_set_kind -void -AsValidatorIssue *issue, AsIssueKind kind - - -as_validator_issue_get_importance -AsIssueImportance -AsValidatorIssue *issue - - -as_validator_issue_set_importance -void -AsValidatorIssue *issue, AsIssueImportance importance - - -as_validator_issue_get_message -const gchar * -AsValidatorIssue *issue - - -as_validator_issue_set_message -void -AsValidatorIssue *issue, const gchar *message - - -as_validator_issue_get_location -const gchar * -AsValidatorIssue *issue - - -as_validator_issue_set_location -void -AsValidatorIssue *issue, const gchar *location - - -AsValidatorIssue - - -AS_TYPE_CATEGORY -#define AS_TYPE_CATEGORY (as_category_get_type ()) - - -AsCategoryClass -struct _AsCategoryClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -as_category_new -AsCategory * -void - - -as_category_complete -void -AsCategory *cat - - -as_category_get_directory -const gchar * -AsCategory *cat - - -as_category_set_directory -void -AsCategory *cat, const gchar* value - - -as_category_get_name -const gchar * -AsCategory *cat - - -as_category_set_name -void -AsCategory *cat, const gchar *value - - -as_category_get_summary -const gchar * -AsCategory *cat - - -as_category_set_summary -void -AsCategory *cat, const gchar *value - - -as_category_get_icon -const gchar * -AsCategory *cat - - -as_category_set_icon -void -AsCategory *cat, const gchar* value - - -as_category_has_subcategory -gboolean -AsCategory *cat - - -as_category_add_subcategory -void -AsCategory *cat, AsCategory *subcat - - -as_category_remove_subcategory -void -AsCategory *cat, AsCategory *subcat - - -as_category_get_included -GList * -AsCategory *cat - - -as_category_get_excluded -GList * -AsCategory *cat - - -as_category_get_subcategories -GList * -AsCategory *cat - - -as_category_get_level -gint -AsCategory *cat - - -as_category_set_level -void -AsCategory *cat, gint value - - -AsCategory - - -AS_TYPE_DISTRO_DETAILS -#define AS_TYPE_DISTRO_DETAILS (as_distro_details_get_type ()) - - -AsDistroDetailsClass -struct _AsDistroDetailsClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -as_distro_details_new -AsDistroDetails * -void - - -as_distro_details_get_id -const gchar * -AsDistroDetails *distro - - -as_distro_details_get_name -const gchar * -AsDistroDetails *distro - - -as_distro_details_get_version -const gchar * -AsDistroDetails *distro - - -as_distro_details_get_str -gchar * -AsDistroDetails *distro, const gchar *key - - -as_distro_details_get_bool -gboolean -AsDistroDetails *distro, const gchar *key - - -as_get_icon_repository_paths -gchar ** -void - - -AsDistroDetails - - -AS_TYPE_SCREENSHOT -#define AS_TYPE_SCREENSHOT (as_screenshot_get_type ()) - - -AsScreenshotClass -struct _AsScreenshotClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsScreenshotKind -typedef enum { - AS_SCREENSHOT_KIND_UNKNOWN, - AS_SCREENSHOT_KIND_DEFAULT, - AS_SCREENSHOT_KIND_EXTRA, - /*< private >*/ - AS_SCREENSHOT_KIND_LAST -} AsScreenshotKind; - - -as_screenshot_kind_from_string -AsScreenshotKind -const gchar *kind - - -as_screenshot_kind_to_string -const gchar * -AsScreenshotKind kind - - -as_screenshot_is_valid -gboolean -AsScreenshot *screenshot - - -as_screenshot_new -AsScreenshot * -void - - -as_screenshot_get_kind -AsScreenshotKind -AsScreenshot *screenshot - - -as_screenshot_set_kind -void -AsScreenshot *screenshot, AsScreenshotKind kind - - -as_screenshot_get_caption -const gchar * -AsScreenshot *screenshot - - -as_screenshot_set_caption -void -AsScreenshot *screenshot, const gchar *caption, const gchar *locale - - -as_screenshot_get_images -GPtrArray * -AsScreenshot *screenshot - - -as_screenshot_add_image -void -AsScreenshot *screenshot, AsImage *image - - -as_screenshot_get_active_locale -gchar * -AsScreenshot *screenshot - - -as_screenshot_set_active_locale -void -AsScreenshot *screenshot, const gchar *locale - - -AsScreenshot - - -AS_TYPE_DATABASE -#define AS_TYPE_DATABASE (as_database_get_type ()) - - -AsDatabaseClass -struct _AsDatabaseClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsDatabaseError -typedef enum { - AS_DATABASE_ERROR_FAILED, - AS_DATABASE_ERROR_MISSING, - AS_DATABASE_ERROR_CLOSED, - AS_DATABASE_ERROR_TERM_INVALID, - /*< private >*/ - AS_DATABASE_ERROR_LAST -} AsDatabaseError; - - -AS_DATABASE_ERROR -#define AS_DATABASE_ERROR as_database_error_quark () - - -as_database_new -AsDatabase * -void - - -as_database_error_quark -GQuark -void - - -as_database_open -gboolean -AsDatabase *db, GError **error - - -as_database_get_location -const gchar * -AsDatabase *db - - -as_database_set_location -void -AsDatabase *db, const gchar *dir - - -as_database_find_components -GPtrArray * -AsDatabase *db, const gchar *term, const gchar *cats_str, GError **error - - -as_database_get_all_components -GPtrArray * -AsDatabase *db, GError **error - - -as_database_get_component_by_id -AsComponent * -AsDatabase *db, const gchar *cid, GError **error - - -as_database_get_components_by_provided_item -GPtrArray * -AsDatabase *db, AsProvidedKind kind, const gchar *item, GError **error - - -as_database_get_components_by_kind -GPtrArray * -AsDatabase *db, AsComponentKind kind, GError **error - - -AsDatabase - - -AS_TYPE_COMPONENT -#define AS_TYPE_COMPONENT (as_component_get_type ()) - - -AsComponentClass -struct _AsComponentClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsComponentKind -typedef enum { - AS_COMPONENT_KIND_UNKNOWN, - AS_COMPONENT_KIND_GENERIC, - AS_COMPONENT_KIND_DESKTOP_APP, - AS_COMPONENT_KIND_FONT, - AS_COMPONENT_KIND_CODEC, - AS_COMPONENT_KIND_INPUTMETHOD, - AS_COMPONENT_KIND_ADDON, - AS_COMPONENT_KIND_FIRMWARE, - /*< private >*/ - AS_COMPONENT_KIND_LAST -} AsComponentKind; - - -AS_TYPE_COMPONENT_KIND -#define AS_TYPE_COMPONENT_KIND (as_component_kind_get_type ()) - - -as_component_kind_get_type -GType -void - - -as_component_kind_to_string -const gchar * -AsComponentKind kind - - -as_component_kind_from_string -AsComponentKind -const gchar *kind_str - - -as_component_new -AsComponent * -void - - -as_component_is_valid -gboolean -AsComponent *cpt - - -as_component_to_string -gchar * -AsComponent *cpt - - -as_component_get_active_locale -gchar * -AsComponent *cpt - - -as_component_set_active_locale -void -AsComponent *cpt, const gchar *locale - - -as_component_get_kind -AsComponentKind -AsComponent *cpt - - -as_component_set_kind -void -AsComponent *cpt, AsComponentKind value - - -as_component_get_id -const gchar * -AsComponent *cpt - - -as_component_set_id -void -AsComponent *cpt, const gchar *value - - -as_component_get_origin -const gchar * -AsComponent *cpt - - -as_component_set_origin -void -AsComponent *cpt, const gchar *origin - - -as_component_get_pkgnames -gchar ** -AsComponent *cpt - - -as_component_set_pkgnames -void -AsComponent *cpt, gchar **value - - -as_component_get_source_pkgname -const gchar * -AsComponent *cpt - - -as_component_set_source_pkgname -void -AsComponent *cpt, const gchar* spkgname - - -as_component_get_name -const gchar * -AsComponent *cpt - - -as_component_set_name -void -AsComponent *cpt, const gchar *value, const gchar *locale - - -as_component_get_summary -const gchar * -AsComponent *cpt - - -as_component_set_summary -void -AsComponent *cpt, const gchar *value, const gchar *locale - - -as_component_get_description -const gchar * -AsComponent *cpt - - -as_component_set_description -void -AsComponent *cpt, const gchar *value, const gchar *locale - - -as_component_get_project_license -const gchar * -AsComponent *cpt - - -as_component_set_project_license -void -AsComponent *cpt, const gchar *value - - -as_component_get_project_group -const gchar * -AsComponent *cpt - - -as_component_set_project_group -void -AsComponent *cpt, const gchar *value - - -as_component_get_developer_name -const gchar * -AsComponent *cpt - - -as_component_set_developer_name -void -AsComponent *cpt, const gchar *value, const gchar *locale - - -as_component_get_compulsory_for_desktops -gchar ** -AsComponent *cpt - - -as_component_set_compulsory_for_desktops -void -AsComponent *cpt, gchar **value - - -as_component_is_compulsory_for_desktop -gboolean -AsComponent *cpt, const gchar *desktop - - -as_component_get_categories -gchar ** -AsComponent *cpt - - -as_component_set_categories -void -AsComponent *cpt, gchar **value - - -as_component_has_category -gboolean -AsComponent *cpt, const gchar *category - - -as_component_get_screenshots -GPtrArray * -AsComponent *cpt - - -as_component_add_screenshot -void -AsComponent *cpt, AsScreenshot *sshot - - -as_component_get_keywords -gchar ** -AsComponent *cpt - - -as_component_set_keywords -void -AsComponent *cpt, gchar **value, const gchar *locale - - -as_component_get_icons -GPtrArray * -AsComponent *cpt - - -as_component_get_icon_by_size -AsIcon * -AsComponent *cpt, guint width, guint height - - -as_component_add_icon -void -AsComponent *cpt, AsIcon *icon - - -as_component_add_provided -void -AsComponent *cpt, AsProvided *prov - - -as_component_get_provided_for_kind -AsProvided * -AsComponent *cpt, AsProvidedKind kind - - -as_component_get_provided -GList * -AsComponent *cpt - - -as_component_get_url -const gchar * -AsComponent *cpt, AsUrlKind url_kind - - -as_component_add_url -void -AsComponent *cpt, AsUrlKind url_kind, const gchar *url - - -as_component_get_releases -GPtrArray * -AsComponent *cpt - - -as_component_add_release -void -AsComponent *cpt, AsRelease* release - - -as_component_get_extends -GPtrArray * -AsComponent *cpt - - -as_component_add_extends -void -AsComponent *cpt, const gchar *cpt_id - - -as_component_get_extensions -GPtrArray * -AsComponent *cpt - - -as_component_add_extension -void -AsComponent *cpt, const gchar *cpt_id - - -as_component_get_languages -GList * -AsComponent *cpt - - -as_component_get_language -gint -AsComponent *cpt, const gchar *locale - - -as_component_add_language -void -AsComponent *cpt, const gchar *locale, gint percentage - - -as_component_get_translations -GPtrArray * -AsComponent *cpt - - -as_component_add_translation -void -AsComponent *cpt, AsTranslation *tr - - -as_component_has_bundle -gboolean -AsComponent *cpt - - -as_component_get_bundle_id -const gchar * -AsComponent *cpt, AsBundleKind bundle_kind - - -as_component_add_bundle_id -void -AsComponent *cpt, AsBundleKind bundle_kind, const gchar *id - - -AsComponent - - -AS_TYPE_ICON -#define AS_TYPE_ICON (as_icon_get_type ()) - - -AsIconClass -struct _AsIconClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsIconKind -typedef enum { - AS_ICON_KIND_UNKNOWN, - AS_ICON_KIND_CACHED, - AS_ICON_KIND_STOCK, - AS_ICON_KIND_LOCAL, - AS_ICON_KIND_REMOTE, - /*< private >*/ - AS_ICON_KIND_LAST -} AsIconKind; - - -as_icon_kind_from_string -AsIconKind -const gchar *kind_str - - -as_icon_kind_to_string -const gchar * -AsIconKind kind - - -as_icon_new -AsIcon * -void - - -as_icon_get_kind -AsIconKind -AsIcon *icon - - -as_icon_set_kind -void -AsIcon *icon, AsIconKind kind - - -as_icon_get_name -const gchar * -AsIcon *icon - - -as_icon_set_name -void -AsIcon *icon, const gchar *name - - -as_icon_get_url -const gchar * -AsIcon *icon - - -as_icon_set_url -void -AsIcon *icon, const gchar *url - - -as_icon_get_filename -const gchar * -AsIcon *icon - - -as_icon_set_filename -void -AsIcon *icon, const gchar *filename - - -as_icon_get_width -guint -AsIcon *icon - - -as_icon_set_width -void -AsIcon *icon, guint width - - -as_icon_get_height -guint -AsIcon *icon - - -as_icon_set_height -void -AsIcon *icon, guint height - - -AsIcon - - -AS_TYPE_METADATA -#define AS_TYPE_METADATA (as_metadata_get_type ()) - - -AsMetadataClass -struct _AsMetadataClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsParserMode -typedef enum { - AS_PARSER_MODE_UPSTREAM, - AS_PARSER_MODE_DISTRO, - /*< private >*/ - AS_PARSER_MODE_LAST -} AsParserMode; - - -AsMetadataError -typedef enum { - AS_METADATA_ERROR_FAILED, - AS_METADATA_ERROR_UNEXPECTED_FORMAT_KIND, - AS_METADATA_ERROR_NO_COMPONENT, - /*< private >*/ - AS_METADATA_ERROR_LAST -} AsMetadataError; - - -AS_METADATA_ERROR -#define AS_METADATA_ERROR as_metadata_error_quark () - - -as_metadata_new -AsMetadata * -void - - -as_metadata_error_quark -GQuark -void - - -as_metadata_parse_file -void -AsMetadata *metad, GFile *file, GError **error - - -as_metadata_parse_xml -void -AsMetadata *metad, const gchar *data, GError **error - - -as_metadata_parse_yaml -void -AsMetadata *metad, const gchar *data, GError **error - - -as_metadata_get_component -AsComponent * -AsMetadata *metad - - -as_metadata_get_components -GPtrArray * -AsMetadata *metad - - -as_metadata_clear_components -void -AsMetadata *metad - - -as_metadata_add_component -void -AsMetadata *metad, AsComponent *cpt - - -as_metadata_component_to_upstream_xml -gchar * -AsMetadata *metad - - -as_metadata_save_upstream_xml -void -AsMetadata *metad, const gchar *fname, GError **error - - -as_metadata_components_to_distro_xml -gchar * -AsMetadata *metad - - -as_metadata_save_distro_xml -void -AsMetadata *metad, const gchar *fname, GError **error - - -as_metadata_components_to_distro_yaml -gchar * -AsMetadata *metad - - -as_metadata_save_distro_yaml -void -AsMetadata *metad, const gchar *fname, GError **error - - -as_metadata_set_locale -void -AsMetadata *metad, const gchar *locale - - -as_metadata_get_locale -const gchar * -AsMetadata *metad - - -as_metadata_get_origin -const gchar * -AsMetadata *metad - - -as_metadata_set_origin -void -AsMetadata *metad, const gchar *origin - - -as_metadata_get_update_existing -gboolean -AsMetadata *metad - - -as_metadata_set_update_existing -void -AsMetadata *metad, gboolean update - - -as_metadata_get_write_header -gboolean -AsMetadata *metad - - -as_metadata_set_write_header -void -AsMetadata *metad, gboolean wheader - - -as_metadata_set_parser_mode -void -AsMetadata *metad, AsParserMode mode - - -as_metadata_get_parser_mode -AsParserMode -AsMetadata *metad - - -as_metadata_get_architecture -const gchar * -AsMetadata *metad - - -as_metadata_set_architecture -void -AsMetadata *metad, const gchar *arch - - -AsMetadata - - -AS_TYPE_MENU_PARSER -#define AS_TYPE_MENU_PARSER (as_menu_parser_get_type ()) - - -AsMenuParserClass -struct _AsMenuParserClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -as_menu_parser_new -AsMenuParser * -void - - -as_menu_parser_new_from_file -AsMenuParser * -const gchar *menu_file - - -as_menu_parser_parse -GList * -AsMenuParser *mp - - -as_menu_parser_get_update_category_data -gboolean -AsMenuParser *mp - - -as_menu_parser_set_update_category_data -void -AsMenuParser *mp, gboolean value - - -as_get_system_categories -GList * -void - - -AsMenuParser - - -AS_TYPE_RELEASE -#define AS_TYPE_RELEASE (as_release_get_type ()) - - -AsReleaseClass -struct _AsReleaseClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsChecksumKind -typedef enum { - AS_CHECKSUM_KIND_NONE, - AS_CHECKSUM_KIND_SHA1, - AS_CHECKSUM_KIND_SHA256, - /*< private >*/ - AS_CHECKSUM_KIND_LAST -} AsChecksumKind; - - -as_checksum_kind_to_string -const gchar * -AsChecksumKind kind - - -as_checksum_kind_from_string -AsChecksumKind -const gchar *kind_str - - -AsSizeKind -typedef enum { - AS_SIZE_KIND_UNKNOWN, - AS_SIZE_KIND_DOWNLOAD, - AS_SIZE_KIND_INSTALLED, - /*< private >*/ - AS_SIZE_KIND_LAST -} AsSizeKind; - - -as_size_kind_to_string -const gchar * -AsSizeKind size_kind - - -as_size_kind_from_string -AsSizeKind -const gchar *size_kind - - -as_release_new -AsRelease * -void - - -as_release_get_version -const gchar * -AsRelease *release - - -as_release_set_version -void -AsRelease *release, const gchar *version - - -as_release_get_timestamp -guint64 -AsRelease *release - - -as_release_set_timestamp -void -AsRelease *release, guint64 timestamp - - -as_release_get_description -const gchar * -AsRelease *release - - -as_release_set_description -void -AsRelease *release, const gchar *description, const gchar *locale - - -as_release_get_active_locale -gchar * -AsRelease *release - - -as_release_set_active_locale -void -AsRelease *release, const gchar *locale - - -as_release_get_locations -GPtrArray * -AsRelease *release - - -as_release_add_location -void -AsRelease *release, const gchar *location - - -as_release_get_checksum -const gchar * -AsRelease *release, AsChecksumKind kind - - -as_release_set_checksum -void -AsRelease *release, const gchar *checksum, AsChecksumKind kind - - -as_release_get_urgency -AsUrgencyKind -AsRelease *release - - -as_release_set_urgency -void -AsRelease *release, AsUrgencyKind urgency - - -as_release_get_size -guint64 -AsRelease *release, AsSizeKind kind - - -as_release_set_size -void -AsRelease *release, guint64 size, AsSizeKind kind - - -AsRelease - - -AS_TYPE_XMLDATA -#define AS_TYPE_XMLDATA (as_xmldata_get_type ()) - - -AsXMLDataClass -struct _AsXMLDataClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -as_xmldata_new -AsXMLData * -void - - -as_xmldata_initialize -void -AsXMLData *xdt, const gchar *locale, const gchar *origin, const gchar *media_baseurl, const gchar *arch, gint priority - - -as_xmldata_parse_upstream_data -AsComponent * -AsXMLData *xdt, const gchar *data, GError **error - - -as_xmldata_parse_distro_data -GPtrArray * -AsXMLData *xdt, const gchar *data, GError **error - - -as_xmldata_update_cpt_with_upstream_data -gboolean -AsXMLData *xdt, const gchar *data, AsComponent *cpt, GError **error - - -as_xmldata_serialize_to_upstream -gchar * -AsXMLData *xdt, AsComponent *cpt - - -as_xmldata_serialize_to_distro -gchar * -AsXMLData *xdt, GPtrArray *cpts, gboolean write_header - - -as_xmldata_set_parser_mode -void -AsXMLData *xdt, AsParserMode mode - - -as_xmldata_parse_component_node -void -AsXMLData *metad, xmlNode *node, AsComponent *cpt, GError **error - - -AsXMLData - - -AS_TYPE_CACHE_BUILDER -#define AS_TYPE_CACHE_BUILDER (as_cache_builder_get_type ()) - - -AsCacheBuilderClass -struct _AsCacheBuilderClass { - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AS_CACHE_BUILDER_ERROR -#define AS_CACHE_BUILDER_ERROR as_cache_builder_error_quark () - - -as_cache_builder_error_quark -GQuark -void - - -AsCacheBuilderError -typedef enum { - AS_CACHE_BUILDER_ERROR_FAILED, - AS_CACHE_BUILDER_ERROR_CACHE_INCOMPLETE, - AS_CACHE_BUILDER_ERROR_TARGET_NOT_WRITABLE, - /*< private >*/ - AS_CACHE_BUILDER_ERROR_LAST -} AsCacheBuilderError; - - -as_cache_builder_new -AsCacheBuilder * -void - - -as_cache_builder_setup -gboolean -AsCacheBuilder *builder, const gchar *dbpath, GError **error - - -as_cache_builder_refresh -gboolean -AsCacheBuilder *builder, gboolean force, GError **error - - -as_cache_builder_set_data_source_directories -void -AsCacheBuilder *self, gchar **dirs - - -AsCacheBuilder - - -AsUrlKind -typedef enum { - AS_URL_KIND_UNKNOWN, - AS_URL_KIND_HOMEPAGE, - AS_URL_KIND_BUGTRACKER, - AS_URL_KIND_FAQ, - AS_URL_KIND_HELP, - AS_URL_KIND_DONATION, - /*< private >*/ - AS_URL_KIND_LAST -} AsUrlKind; - - -as_url_kind_to_string -const gchar * -AsUrlKind url_kind - - -as_url_kind_from_string -AsUrlKind -const gchar *url_kind - - -AsBundleKind -typedef enum { - AS_BUNDLE_KIND_UNKNOWN, - AS_BUNDLE_KIND_LIMBA, - AS_BUNDLE_KIND_XDG_APP, - /*< private >*/ - AS_BUNDLE_KIND_LAST -} AsBundleKind; - - -as_bundle_kind_to_string -const gchar * -AsBundleKind bundle_kind - - -as_bundle_kind_from_string -AsBundleKind -const gchar *bundle_kind - - -AsUrgencyKind -typedef enum { - AS_URGENCY_KIND_UNKNOWN, - AS_URGENCY_KIND_LOW, - AS_URGENCY_KIND_MEDIUM, - AS_URGENCY_KIND_HIGH, - AS_URGENCY_KIND_CRITICAL, - /*< private >*/ - AS_URGENCY_KIND_LAST -} AsUrgencyKind; - - -as_urgency_kind_to_string -const gchar * -AsUrgencyKind urgency_kind - - -as_urgency_kind_from_string -AsUrgencyKind -const gchar *urgency_kind - - -AS_TYPE_PROVIDED -#define AS_TYPE_PROVIDED (as_provided_get_type ()) - - -AsProvidedClass -struct _AsProvidedClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsProvidedKind -typedef enum { - AS_PROVIDED_KIND_UNKNOWN, - AS_PROVIDED_KIND_LIBRARY, - AS_PROVIDED_KIND_BINARY, - AS_PROVIDED_KIND_MIMETYPE, - AS_PROVIDED_KIND_FONT, - AS_PROVIDED_KIND_MODALIAS, - AS_PROVIDED_KIND_PYTHON_2, - AS_PROVIDED_KIND_PYTHON, - AS_PROVIDED_KIND_DBUS_SYSTEM, - AS_PROVIDED_KIND_DBUS_USER, - AS_PROVIDED_KIND_FIRMWARE_RUNTIME, - AS_PROVIDED_KIND_FIRMWARE_FLASHED, - /*< private >*/ - AS_PROVIDED_KIND_LAST -} AsProvidedKind; - - -as_provided_kind_to_string -const gchar * -AsProvidedKind kind - - -as_provided_kind_from_string -AsProvidedKind -const gchar *kind_str - - -as_provided_kind_to_l10n_string -const gchar * -AsProvidedKind kind - - -as_provided_new -AsProvided * -void - - -as_provided_get_kind -AsProvidedKind -AsProvided *prov - - -as_provided_set_kind -void -AsProvided *prov, AsProvidedKind kind - - -as_provided_get_items -gchar ** -AsProvided *prov - - -as_provided_add_item -void -AsProvided *prov, const gchar *item - - -as_provided_has_item -gboolean -AsProvided *prov, const gchar *item - - -AsProvided - - -AS_TYPE_DATA_POOL -#define AS_TYPE_DATA_POOL (as_data_pool_get_type ()) - - -AsDataPoolClass -struct _AsDataPoolClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - - -AsDataPoolError -typedef enum { - AS_DATA_POOL_ERROR_FAILED, - /*< private >*/ - AS_DATA_POOL_ERROR_LAST -} AsDataPoolError; - - -AS_DATA_POOL_ERROR -#define AS_DATA_POOL_ERROR as_data_pool_error_quark () - - -as_data_pool_error_quark -GQuark -void - - -as_data_pool_new -AsDataPool * -void - - -as_data_pool_get_locale -const gchar * -AsDataPool *dpool - - -as_data_pool_set_locale -void -AsDataPool *dpool, const gchar *locale - - -as_data_pool_update -gboolean -AsDataPool *dpool, GError **error - - -as_data_pool_get_components -GList * -AsDataPool *dpool - - -as_data_pool_get_component_by_id -AsComponent * -AsDataPool *dpool, const gchar *id - - -as_data_pool_get_metadata_locations -GPtrArray * -AsDataPool *dpool - - -as_data_pool_set_metadata_locations -void -AsDataPool *dpool, gchar **dirs - - -AsDataPool - diff -Nru appstream-0.9.4/docs/api/appstream-docs.xml appstream-0.12.0/docs/api/appstream-docs.xml --- appstream-0.9.4/docs/api/appstream-docs.xml 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/appstream-docs.xml 2018-04-04 15:53:56.000000000 +0000 @@ -9,7 +9,7 @@ AppStream Library Reference Manual The latest version of this documentation can be found on-line at - freedesktop.org/software/appstream/docs/api/html. + freedesktop.org/software/appstream/docs/api. @@ -18,31 +18,40 @@ - + + + + + + + + - - - + - - + + - + + + + API Index diff -Nru appstream-0.9.4/docs/api/appstream.hierarchy appstream-0.12.0/docs/api/appstream.hierarchy --- appstream-0.9.4/docs/api/appstream.hierarchy 2016-02-28 03:43:11.000000000 +0000 +++ appstream-0.12.0/docs/api/appstream.hierarchy 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -GObject - AsCacheBuilder - AsCategory - AsComponent - AsDataPool - AsDatabase - AsDistroDetails - AsIcon - AsImage - AsMenuParser - AsMetadata - AsProvided - AsRelease - AsScreenshot - AsTranslation - AsValidator - AsValidatorIssue - AsXMLData - AsYAMLData -GInterface - GTypePlugin -GEnum - AsComponentKind diff -Nru appstream-0.9.4/docs/api/appstream-sections.txt appstream-0.12.0/docs/api/appstream-sections.txt --- appstream-0.9.4/docs/api/appstream-sections.txt 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/appstream-sections.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,452 +0,0 @@ -
-as-cache-builder -AsCacheBuilder -AS_TYPE_CACHE_BUILDER -AsCacheBuilderClass -AS_CACHE_BUILDER_ERROR -as_cache_builder_error_quark -AsCacheBuilderError -as_cache_builder_new -as_cache_builder_setup -as_cache_builder_refresh -as_cache_builder_set_data_source_directories -AsCacheBuilder -
- -
-as-category -AsCategory -AS_TYPE_CATEGORY -AsCategoryClass -as_category_new -as_category_complete -as_category_get_directory -as_category_set_directory -as_category_get_name -as_category_set_name -as_category_get_summary -as_category_set_summary -as_category_get_icon -as_category_set_icon -as_category_has_subcategory -as_category_add_subcategory -as_category_remove_subcategory -as_category_get_included -as_category_get_excluded -as_category_get_subcategories -as_category_get_level -as_category_set_level -AsCategory -
- -
-as-component -AsComponent -AS_TYPE_COMPONENT -AsComponentClass -AsComponentKind -as_component_kind_to_string -as_component_kind_from_string -as_component_new -as_component_is_valid -as_component_to_string -as_component_get_active_locale -as_component_set_active_locale -as_component_get_kind -as_component_set_kind -as_component_get_id -as_component_set_id -as_component_get_origin -as_component_set_origin -as_component_get_pkgnames -as_component_set_pkgnames -as_component_get_source_pkgname -as_component_set_source_pkgname -as_component_get_name -as_component_set_name -as_component_get_summary -as_component_set_summary -as_component_get_description -as_component_set_description -as_component_get_project_license -as_component_set_project_license -as_component_get_project_group -as_component_set_project_group -as_component_get_developer_name -as_component_set_developer_name -as_component_get_compulsory_for_desktops -as_component_set_compulsory_for_desktops -as_component_is_compulsory_for_desktop -as_component_get_categories -as_component_set_categories -as_component_has_category -as_component_get_screenshots -as_component_add_screenshot -as_component_get_keywords -as_component_set_keywords -as_component_get_icons -as_component_get_icon_by_size -as_component_add_icon -as_component_add_provided -as_component_get_provided_for_kind -as_component_get_provided -as_component_get_url -as_component_add_url -as_component_get_releases -as_component_add_release -as_component_get_extends -as_component_add_extends -as_component_get_extensions -as_component_add_extension -as_component_get_languages -as_component_get_language -as_component_add_language -as_component_get_translations -as_component_add_translation -as_component_has_bundle -as_component_get_bundle_id -as_component_add_bundle_id -AsComponent - -AS_TYPE_COMPONENT_KIND -as_component_kind_get_type -
- -
-as-data-pool -AsDataPool -AS_TYPE_DATA_POOL -AsDataPoolClass -AsDataPoolError -AS_DATA_POOL_ERROR -as_data_pool_error_quark -as_data_pool_new -as_data_pool_get_locale -as_data_pool_set_locale -as_data_pool_update -as_data_pool_get_components -as_data_pool_get_component_by_id -as_data_pool_get_metadata_locations -as_data_pool_set_metadata_locations -AsDataPool -
- -
-as-database -AsDatabase -AS_TYPE_DATABASE -AsDatabaseClass -AsDatabaseError -AS_DATABASE_ERROR -as_database_new -as_database_error_quark -as_database_open -as_database_get_location -as_database_set_location -as_database_find_components -as_database_get_all_components -as_database_get_component_by_id -as_database_get_components_by_provided_item -as_database_get_components_by_kind -AsDatabase -
- -
-as-distro-details -AsDistroDetails -AS_TYPE_DISTRO_DETAILS -AsDistroDetailsClass -as_distro_details_new -as_distro_details_get_id -as_distro_details_get_name -as_distro_details_get_version -as_distro_details_get_str -as_distro_details_get_bool -as_get_icon_repository_paths -AsDistroDetails -
- -
-as-enums -AsUrlKind -as_url_kind_to_string -as_url_kind_from_string -AsBundleKind -as_bundle_kind_to_string -as_bundle_kind_from_string -AsUrgencyKind -as_urgency_kind_to_string -as_urgency_kind_from_string -
- -
-as-icon -AsIcon -AS_TYPE_ICON -AsIconClass -AsIconKind -as_icon_kind_from_string -as_icon_kind_to_string -as_icon_new -as_icon_get_kind -as_icon_set_kind -as_icon_get_name -as_icon_set_name -as_icon_get_url -as_icon_set_url -as_icon_get_filename -as_icon_set_filename -as_icon_get_width -as_icon_set_width -as_icon_get_height -as_icon_set_height -AsIcon -
- -
-as-image -AsImage -AS_TYPE_IMAGE -AsImageClass -AsImageKind -as_image_kind_from_string -as_image_kind_to_string -as_image_new -as_image_get_url -as_image_set_url -as_image_get_width -as_image_set_width -as_image_get_height -as_image_set_height -as_image_get_kind -as_image_set_kind -AsImage -
- -
-as-menu-parser -AsMenuParser -AS_TYPE_MENU_PARSER -AsMenuParserClass -as_menu_parser_new -as_menu_parser_new_from_file -as_menu_parser_parse -as_menu_parser_get_update_category_data -as_menu_parser_set_update_category_data -as_get_system_categories -AsMenuParser -
- -
-as-metadata -AsMetadata -AS_TYPE_METADATA -AsMetadataClass -AsParserMode -AsMetadataError -AS_METADATA_ERROR -as_metadata_new -as_metadata_error_quark -as_metadata_parse_file -as_metadata_parse_xml -as_metadata_parse_yaml -as_metadata_get_component -as_metadata_get_components -as_metadata_clear_components -as_metadata_add_component -as_metadata_component_to_upstream_xml -as_metadata_save_upstream_xml -as_metadata_components_to_distro_xml -as_metadata_save_distro_xml -as_metadata_components_to_distro_yaml -as_metadata_save_distro_yaml -as_metadata_set_locale -as_metadata_get_locale -as_metadata_get_origin -as_metadata_set_origin -as_metadata_get_update_existing -as_metadata_set_update_existing -as_metadata_get_write_header -as_metadata_set_write_header -as_metadata_set_parser_mode -as_metadata_get_parser_mode -as_metadata_get_architecture -as_metadata_set_architecture -AsMetadata -
- -
-as-provided -AsProvided -AS_TYPE_PROVIDED -AsProvidedClass -AsProvidedKind -as_provided_kind_to_string -as_provided_kind_from_string -as_provided_kind_to_l10n_string -as_provided_new -as_provided_get_kind -as_provided_set_kind -as_provided_get_items -as_provided_add_item -as_provided_has_item -AsProvided -
- -
-as-release -AsRelease -AS_TYPE_RELEASE -AsReleaseClass -AsChecksumKind -as_checksum_kind_to_string -as_checksum_kind_from_string -AsSizeKind -as_size_kind_to_string -as_size_kind_from_string -as_release_new -as_release_get_version -as_release_set_version -as_release_get_timestamp -as_release_set_timestamp -as_release_get_description -as_release_set_description -as_release_get_active_locale -as_release_set_active_locale -as_release_get_locations -as_release_add_location -as_release_get_checksum -as_release_set_checksum -as_release_get_urgency -as_release_set_urgency -as_release_get_size -as_release_set_size -AsRelease -
- -
-as-screenshot -AsScreenshot -AS_TYPE_SCREENSHOT -AsScreenshotClass -AsScreenshotKind -as_screenshot_kind_from_string -as_screenshot_kind_to_string -as_screenshot_is_valid -as_screenshot_new -as_screenshot_get_kind -as_screenshot_set_kind -as_screenshot_get_caption -as_screenshot_set_caption -as_screenshot_get_images -as_screenshot_add_image -as_screenshot_get_active_locale -as_screenshot_set_active_locale -AsScreenshot -
- -
-as-screenshot-private -as_screenshot_get_caption_table -
- -
-as-translation -AsTranslation -AS_TYPE_TRANSLATION -AsTranslationClass -AsTranslationKind -as_translation_kind_to_string -as_translation_kind_from_string -as_translation_new -as_translation_get_kind -as_translation_set_kind -as_translation_get_id -as_translation_set_id -AsTranslation -
- -
-as-utils-private -as_utils_delete_dir_recursive -as_utils_categories_from_strv -as_utils_categories_from_str -as_utils_find_files_matching -as_utils_find_files -as_utils_is_root -as_utils_is_writable -as_str_replace -as_ptr_array_to_strv -as_touch_location -as_copy_file -as_reset_umask -as_is_cruft_locale -as_locale_strip_encoding -as_get_current_arch -as_arch_compatible -
- -
-as-validator -AsValidator -AS_TYPE_VALIDATOR -AsValidatorClass -as_validator_new -as_validator_clear_issues -as_validator_validate_file -as_validator_validate_data -as_validator_validate_tree -as_validator_get_issues -AsValidator -
- -
-as-validator-issue -AsValidatorIssue -AS_TYPE_VALIDATOR_ISSUE -AsValidatorIssueClass -AsIssueImportance -AsIssueKind -as_validator_issue_new -as_validator_issue_get_kind -as_validator_issue_set_kind -as_validator_issue_get_importance -as_validator_issue_set_importance -as_validator_issue_get_message -as_validator_issue_set_message -as_validator_issue_get_location -as_validator_issue_set_location -AsValidatorIssue -
- -
-as-xmldata -AsXMLData -AS_TYPE_XMLDATA -AsXMLDataClass -as_xmldata_new -as_xmldata_initialize -as_xmldata_parse_upstream_data -as_xmldata_parse_distro_data -as_xmldata_update_cpt_with_upstream_data -as_xmldata_serialize_to_upstream -as_xmldata_serialize_to_distro -as_xmldata_set_parser_mode -as_xmldata_parse_component_node -AsXMLData -
- -
-as-yamldata -AsYAMLData -AS_TYPE_YAMLDATA -AsYAMLDataClass -as_yamldata_new -as_yamldata_initialize -as_yamldata_parse_distro_data -as_yamldata_serialize_to_distro -as_yamldata_get_locale -as_yamldata_set_locale -AsYAMLData -
- diff -Nru appstream-0.9.4/docs/api/appstream.types appstream-0.12.0/docs/api/appstream.types --- appstream-0.9.4/docs/api/appstream.types 2016-04-15 01:15:56.000000000 +0000 +++ appstream-0.12.0/docs/api/appstream.types 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -as_cache_builder_get_type -as_category_get_type -as_component_get_type -as_component_kind_get_type -as_data_pool_get_type -as_database_get_type -as_distro_details_get_type -as_icon_get_type -as_image_get_type -as_menu_parser_get_type -as_metadata_get_type -as_provided_get_type -as_release_get_type -as_screenshot_get_type -as_translation_get_type -as_validator_get_type -as_validator_issue_get_type -as_xmldata_get_type -as_yamldata_get_type diff -Nru appstream-0.9.4/docs/api/appstream-undocumented.txt appstream-0.12.0/docs/api/appstream-undocumented.txt --- appstream-0.9.4/docs/api/appstream-undocumented.txt 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/appstream-undocumented.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,300 +0,0 @@ -60% symbol docs coverage. -363 symbols documented. -47 symbols incomplete. -246 not documented. - - -AS_CACHE_BUILDER_ERROR -AS_DATABASE_ERROR -AS_DATA_POOL_ERROR -AS_METADATA_ERROR -AS_TYPE_CACHE_BUILDER -AS_TYPE_CATEGORY -AS_TYPE_COMPONENT -AS_TYPE_DATABASE -AS_TYPE_DATA_POOL -AS_TYPE_DISTRO_DETAILS -AS_TYPE_ICON -AS_TYPE_IMAGE -AS_TYPE_MENU_PARSER -AS_TYPE_METADATA -AS_TYPE_PROVIDED -AS_TYPE_RELEASE -AS_TYPE_SCREENSHOT -AS_TYPE_TRANSLATION -AS_TYPE_VALIDATOR -AS_TYPE_VALIDATOR_ISSUE -AS_TYPE_XMLDATA -AS_TYPE_YAMLDATA -AsCacheBuilder -AsCacheBuilderClass -AsCategory -AsCategoryClass -AsComponent -AsComponentClass -AsDataPool -AsDataPoolClass -AsDatabase -AsDatabaseClass -AsDistroDetails -AsDistroDetailsClass -AsIcon -AsIconClass -AsImage -AsImageClass -AsIssueImportance (AS_ISSUE_IMPORTANCE_UNKNOWN) -AsMenuParser -AsMenuParserClass -AsMetadata -AsMetadataClass -AsProvided -AsProvidedClass -AsRelease -AsReleaseClass -AsScreenshot -AsScreenshotClass -AsTranslation -AsTranslationClass -AsValidator -AsValidatorClass -AsValidatorIssue -AsValidatorIssueClass -AsXMLData -AsXMLDataClass -AsYAMLData -AsYAMLDataClass -_as_xmldata_desc_lang_hashtable_to_nodes -_as_xmldata_lang_hashtable_to_nodes -_as_xmldata_serialize_image -as_arch_compatible (Returns) -as_cache_builder_appstream_data_changed -as_cache_builder_class_init -as_cache_builder_ctime_newer -as_cache_builder_error_quark -as_cache_builder_extract_icons -as_cache_builder_finalize -as_cache_builder_init -as_cache_builder_refresh (error) -as_cache_builder_set_data_source_directories (self) -as_cache_builder_setup (error, Returns) -as_category_class_init -as_category_complete (cat) -as_category_finalize -as_category_get_directory (Returns) -as_category_get_excluded -as_category_get_icon (Returns) -as_category_get_included -as_category_get_level -as_category_get_name (Returns) -as_category_get_property -as_category_get_subcategories -as_category_get_summary (Returns) -as_category_init -as_category_set_directory (value) -as_category_set_icon (value) -as_category_set_level -as_category_set_name (value) -as_category_set_property -as_component_class_init -as_component_finalize -as_component_get_categories -as_component_get_compulsory_for_desktops -as_component_get_icons -as_component_get_keywords -as_component_get_origin -as_component_get_property -as_component_get_source_pkgname -as_component_has_bundle -as_component_has_install_candidate -as_component_init -as_component_set_architecture -as_component_set_categories -as_component_set_origin -as_component_set_property -as_component_set_source_pkgname -as_copy_file (source, destination, error, Returns) -as_data_pool_class_init -as_data_pool_error_quark -as_data_pool_finalize -as_data_pool_init -as_data_pool_load_metadata -as_database_class_init -as_database_error_quark -as_database_finalize -as_database_get_location (Returns) -as_database_init -as_database_test_opened -as_distro_details_class_init -as_distro_details_finalize -as_distro_details_get_bool -as_distro_details_get_id -as_distro_details_get_name -as_distro_details_get_property -as_distro_details_get_str -as_distro_details_get_version -as_distro_details_init -as_distro_details_set_distro_id -as_distro_details_set_name -as_distro_details_set_property -as_distro_details_set_version -as_icon_class_init -as_icon_finalize -as_icon_get_filename -as_icon_get_height -as_icon_get_name -as_icon_get_width -as_icon_init -as_image_class_init -as_image_finalize -as_image_init -as_is_cruft_locale (locale, Returns) -as_locale_strip_encoding (locale, Returns) -as_menu_parser_class_init -as_menu_parser_extend_category_name_list -as_menu_parser_finalize -as_menu_parser_get_property -as_menu_parser_get_update_category_data -as_menu_parser_init -as_menu_parser_parse_category_entry -as_menu_parser_parse_menu_entry -as_menu_parser_set_property -as_menu_parser_set_update_category_data -as_metadata_add_component (metad, cpt) -as_metadata_class_init -as_metadata_clear_components -as_metadata_component_to_upstream_xml (metad) -as_metadata_components_to_distro_xml (metad) -as_metadata_components_to_distro_yaml (metad) -as_metadata_error_quark -as_metadata_finalize -as_metadata_get_architecture -as_metadata_get_components -as_metadata_get_origin -as_metadata_get_update_existing -as_metadata_get_write_header -as_metadata_init -as_metadata_init_xml -as_metadata_init_yaml -as_metadata_parse_xml (error) -as_metadata_reload_parsers -as_metadata_save_data -as_metadata_save_distro_xml (metad, error) -as_metadata_save_distro_yaml (metad, error) -as_metadata_save_upstream_xml (metad, error) -as_provided_add_item (item) -as_provided_class_init -as_provided_finalize -as_provided_init -as_ptr_array_to_strv -as_release_add_location (release) -as_release_class_init -as_release_finalize -as_release_get_active_locale (release, Returns) -as_release_get_checksum (release, kind) -as_release_get_locations (release) -as_release_init -as_release_set_active_locale (release, locale) -as_release_set_description (locale) -as_screenshot_class_init -as_screenshot_finalize -as_screenshot_get_active_locale (screenshot, Returns) -as_screenshot_get_caption_table (screenshot, Returns) -as_screenshot_init -as_screenshot_set_active_locale (screenshot, locale) -as_screenshot_set_caption (locale) -as_str_replace -as_touch_location (Returns) -as_translation_class_init -as_translation_finalize -as_translation_get_id (Returns) -as_translation_init -as_utils_find_files -as_utils_find_files_matching -as_utils_is_root -as_utils_is_writable (Returns) -as_validator_add_issue -as_validator_check_appear_once -as_validator_check_children_quick -as_validator_check_content -as_validator_check_description_tag -as_validator_check_nolocalized -as_validator_check_type_property -as_validator_class_init -as_validator_finalize -as_validator_init -as_validator_issue_class_init -as_validator_issue_finalize -as_validator_issue_init -as_validator_open_xml_document -as_validator_validate_component_node -as_validator_validate_data (Returns) -as_validator_validate_file (Returns) -as_validator_validate_tree (Returns) -as_xml_icon_set_size_from_node -as_xmldata_class_init -as_xmldata_clear_error -as_xmldata_dump_node_children -as_xmldata_finalize -as_xmldata_get_node_locale -as_xmldata_get_node_value -as_xmldata_init -as_xmldata_initialize (locale, origin, media_baseurl, arch, priority) -as_xmldata_new -as_xmldata_parse_component_node -as_xmldata_parse_components_node -as_xmldata_parse_upstream_description_tag -as_xmldata_process_screenshot -as_xmldata_process_screenshots_tag -as_xmldata_serialize_to_distro (cpts, write_header) -as_xmldata_serialize_to_distro_with_rootnode -as_xmldata_serialize_to_distro_without_rootnode -as_xmldata_set_parser_mode -as_xmldata_update_cpt_with_upstream_data (Returns) -as_yaml_emit_entry -as_yaml_emit_lang_hashtable_entries -as_yaml_emit_lang_hashtable_entries_long -as_yaml_emit_localized_entry -as_yaml_emit_localized_entry_with_func -as_yaml_emit_localized_lists -as_yaml_emit_long_entry -as_yaml_emit_long_localized_entry -as_yaml_emit_provides -as_yaml_emit_scalar -as_yaml_emit_scalar_key -as_yaml_emit_screenshots -as_yaml_emit_sequence -as_yaml_emit_sequence_from_strv -as_yaml_localized_list_helper -as_yaml_mapping_end -as_yaml_mapping_start -as_yaml_sequence_end -as_yaml_sequence_start -as_yaml_serialize_component -as_yamldata_class_init -as_yamldata_finalize -as_yamldata_free_node -as_yamldata_get_localized_node -as_yamldata_init -as_yamldata_initialize (locale, origin, media_baseurl, arch, priority) -as_yamldata_new -as_yamldata_parse_distro_data (error) -as_yamldata_process_component_node -as_yamldata_process_icon -as_yamldata_process_icons -as_yamldata_process_screenshots -as_yamldata_serialize_to_distro -dep11_list_to_string_array -dep11_print_unknown -dep11_process_image -dep11_process_provides -dep11_process_urls - -as-cache-builder:Long_Description -as-cache-builder:Short_Description -as-enums:Long_Description -as-icon:Long_Description -as-screenshot-private:Long_Description -as-screenshot-private:Short_Description -as-utils-private:Long_Description -as-utils-private:Short_Description -as-yamldata:Short_Description diff -Nru appstream-0.9.4/docs/api/html/annotation-glossary.html appstream-0.12.0/docs/api/html/annotation-glossary.html --- appstream-0.9.4/docs/api/html/annotation-glossary.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/annotation-glossary.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ - - - - -Annotation Glossary: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-Annotation Glossary

-

A

-
array
-

Parameter points to an array of items.

-

D

-
default
-

Default parameter value (for in case the shadows-to function has less parameters).

-

E

-
element-type
-

Generics and defining elements of containers and arrays.

-

N

-
nullable
-

NULL may be passed as the value in, out, in-out; or as a return value.

-

T

-
transfer container
-

Free data container after the code is done.

-
transfer full
-

Free data after the code is done.

-
transfer none
-

Don't free data after the code is done.

-
type
-

Override the parsed C type with given type.

-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/api-index-full.html appstream-0.12.0/docs/api/html/api-index-full.html --- appstream-0.9.4/docs/api/html/api-index-full.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/api-index-full.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,1567 +0,0 @@ - - - - -API Index: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-API Index

-

A

-
-as_arch_compatible, function in as-utils-private -
-
-

B

-
-AsBundleKind, enum in as-enums -
-
-
-as_bundle_kind_from_string, function in as-enums -
-
-
-as_bundle_kind_to_string, function in as-enums -
-
-

C

-
-AsCacheBuilder, struct in AsCacheBuilder -
-
-
-AsCacheBuilderClass, struct in AsCacheBuilder -
-
-
-AsCacheBuilderError, enum in AsCacheBuilder -
-
-
-AS_CACHE_BUILDER_ERROR, macro in AsCacheBuilder -
-
-
-as_cache_builder_error_quark, function in AsCacheBuilder -
-
-
-as_cache_builder_new, function in AsCacheBuilder -
-
-
-as_cache_builder_refresh, function in AsCacheBuilder -
-
-
-as_cache_builder_setup, function in AsCacheBuilder -
-
-
-as_cache_builder_set_data_source_directories, function in AsCacheBuilder -
-
-
-AsCategory, struct in AsCategory -
-
-
-AsCategory:directory, object property in AsCategory -
-
-
-AsCategory:excluded, object property in AsCategory -
-
-
-AsCategory:icon, object property in AsCategory -
-
-
-AsCategory:included, object property in AsCategory -
-
-
-AsCategory:level, object property in AsCategory -
-
-
-AsCategory:name, object property in AsCategory -
-
-
-AsCategory:subcategories, object property in AsCategory -
-
-
-AsCategory:summary, object property in AsCategory -
-
-
-AsCategoryClass, struct in AsCategory -
-
-
-as_category_add_subcategory, function in AsCategory -
-
-
-as_category_complete, function in AsCategory -
-
-
-as_category_get_directory, function in AsCategory -
-
-
-as_category_get_excluded, function in AsCategory -
-
-
-as_category_get_icon, function in AsCategory -
-
-
-as_category_get_included, function in AsCategory -
-
-
-as_category_get_level, function in AsCategory -
-
-
-as_category_get_name, function in AsCategory -
-
-
-as_category_get_subcategories, function in AsCategory -
-
-
-as_category_get_summary, function in AsCategory -
-
-
-as_category_has_subcategory, function in AsCategory -
-
-
-as_category_new, function in AsCategory -
-
-
-as_category_remove_subcategory, function in AsCategory -
-
-
-as_category_set_directory, function in AsCategory -
-
-
-as_category_set_icon, function in AsCategory -
-
-
-as_category_set_level, function in AsCategory -
-
-
-as_category_set_name, function in AsCategory -
-
-
-as_category_set_summary, function in AsCategory -
-
-
-AsChecksumKind, enum in AsRelease -
-
-
-as_checksum_kind_from_string, function in AsRelease -
-
-
-as_checksum_kind_to_string, function in AsRelease -
-
-
-AsComponent, struct in AsComponent -
-
-
-AsComponent:categories, object property in AsComponent -
-
-
-AsComponent:description, object property in AsComponent -
-
-
-AsComponent:developer-name, object property in AsComponent -
-
-
-AsComponent:icons, object property in AsComponent -
-
-
-AsComponent:id, object property in AsComponent -
-
-
-AsComponent:keywords, object property in AsComponent -
-
-
-AsComponent:kind, object property in AsComponent -
-
-
-AsComponent:name, object property in AsComponent -
-
-
-AsComponent:pkgnames, object property in AsComponent -
-
-
-AsComponent:project-group, object property in AsComponent -
-
-
-AsComponent:project-license, object property in AsComponent -
-
-
-AsComponent:screenshots, object property in AsComponent -
-
-
-AsComponent:summary, object property in AsComponent -
-
-
-AsComponent:urls, object property in AsComponent -
-
-
-AsComponentClass, struct in AsComponent -
-
-
-AsComponentKind, enum in AsComponent -
-
-
-as_component_add_bundle_id, function in AsComponent -
-
-
-as_component_add_extends, function in AsComponent -
-
-
-as_component_add_extension, function in AsComponent -
-
-
-as_component_add_icon, function in AsComponent -
-
-
-as_component_add_language, function in AsComponent -
-
-
-as_component_add_provided, function in AsComponent -
-
-
-as_component_add_release, function in AsComponent -
-
-
-as_component_add_screenshot, function in AsComponent -
-
-
-as_component_add_translation, function in AsComponent -
-
-
-as_component_add_url, function in AsComponent -
-
-
-as_component_get_active_locale, function in AsComponent -
-
-
-as_component_get_bundle_id, function in AsComponent -
-
-
-as_component_get_categories, function in AsComponent -
-
-
-as_component_get_compulsory_for_desktops, function in AsComponent -
-
-
-as_component_get_description, function in AsComponent -
-
-
-as_component_get_developer_name, function in AsComponent -
-
-
-as_component_get_extends, function in AsComponent -
-
-
-as_component_get_extensions, function in AsComponent -
-
-
-as_component_get_icons, function in AsComponent -
-
-
-as_component_get_icon_by_size, function in AsComponent -
-
-
-as_component_get_id, function in AsComponent -
-
-
-as_component_get_keywords, function in AsComponent -
-
-
-as_component_get_kind, function in AsComponent -
-
-
-as_component_get_language, function in AsComponent -
-
-
-as_component_get_languages, function in AsComponent -
-
-
-as_component_get_name, function in AsComponent -
-
-
-as_component_get_origin, function in AsComponent -
-
-
-as_component_get_pkgnames, function in AsComponent -
-
-
-as_component_get_project_group, function in AsComponent -
-
-
-as_component_get_project_license, function in AsComponent -
-
-
-as_component_get_provided, function in AsComponent -
-
-
-as_component_get_provided_for_kind, function in AsComponent -
-
-
-as_component_get_releases, function in AsComponent -
-
-
-as_component_get_screenshots, function in AsComponent -
-
-
-as_component_get_source_pkgname, function in AsComponent -
-
-
-as_component_get_summary, function in AsComponent -
-
-
-as_component_get_translations, function in AsComponent -
-
-
-as_component_get_url, function in AsComponent -
-
-
-as_component_has_bundle, function in AsComponent -
-
-
-as_component_has_category, function in AsComponent -
-
-
-as_component_is_compulsory_for_desktop, function in AsComponent -
-
-
-as_component_is_valid, function in AsComponent -
-
-
-as_component_kind_from_string, function in AsComponent -
-
-
-as_component_kind_to_string, function in AsComponent -
-
-
-as_component_new, function in AsComponent -
-
-
-as_component_set_active_locale, function in AsComponent -
-
-
-as_component_set_categories, function in AsComponent -
-
-
-as_component_set_compulsory_for_desktops, function in AsComponent -
-
-
-as_component_set_description, function in AsComponent -
-
-
-as_component_set_developer_name, function in AsComponent -
-
-
-as_component_set_id, function in AsComponent -
-
-
-as_component_set_keywords, function in AsComponent -
-
-
-as_component_set_kind, function in AsComponent -
-
-
-as_component_set_name, function in AsComponent -
-
-
-as_component_set_origin, function in AsComponent -
-
-
-as_component_set_pkgnames, function in AsComponent -
-
-
-as_component_set_project_group, function in AsComponent -
-
-
-as_component_set_project_license, function in AsComponent -
-
-
-as_component_set_source_pkgname, function in AsComponent -
-
-
-as_component_set_summary, function in AsComponent -
-
-
-as_component_to_string, function in AsComponent -
-
-
-as_copy_file, function in as-utils-private -
-
-

D

-
-AsDatabase, struct in AsDatabase -
-
-
-AsDatabaseClass, struct in AsDatabase -
-
-
-AsDatabaseError, enum in AsDatabase -
-
-
-AS_DATABASE_ERROR, macro in AsDatabase -
-
-
-as_database_error_quark, function in AsDatabase -
-
-
-as_database_find_components, function in AsDatabase -
-
-
-as_database_get_all_components, function in AsDatabase -
-
-
-as_database_get_components_by_kind, function in AsDatabase -
-
-
-as_database_get_components_by_provided_item, function in AsDatabase -
-
-
-as_database_get_component_by_id, function in AsDatabase -
-
-
-as_database_get_location, function in AsDatabase -
-
-
-as_database_new, function in AsDatabase -
-
-
-as_database_open, function in AsDatabase -
-
-
-as_database_set_location, function in AsDatabase -
-
-
-AsDataPool, struct in AsDataPool -
-
-
-AsDataPoolClass, struct in AsDataPool -
-
-
-AsDataPoolError, enum in AsDataPool -
-
-
-AS_DATA_POOL_ERROR, macro in AsDataPool -
-
-
-as_data_pool_error_quark, function in AsDataPool -
-
-
-as_data_pool_get_components, function in AsDataPool -
-
-
-as_data_pool_get_component_by_id, function in AsDataPool -
-
-
-as_data_pool_get_locale, function in AsDataPool -
-
-
-as_data_pool_get_metadata_locations, function in AsDataPool -
-
-
-as_data_pool_new, function in AsDataPool -
-
-
-as_data_pool_set_locale, function in AsDataPool -
-
-
-as_data_pool_set_metadata_locations, function in AsDataPool -
-
-
-as_data_pool_update, function in AsDataPool -
-
-
-AsDistroDetails, struct in AsDistroDetails -
-
-
-AsDistroDetails:id, object property in AsDistroDetails -
-
-
-AsDistroDetails:name, object property in AsDistroDetails -
-
-
-AsDistroDetails:version, object property in AsDistroDetails -
-
-
-AsDistroDetailsClass, struct in AsDistroDetails -
-
-
-as_distro_details_get_bool, function in AsDistroDetails -
-
-
-as_distro_details_get_id, function in AsDistroDetails -
-
-
-as_distro_details_get_name, function in AsDistroDetails -
-
-
-as_distro_details_get_str, function in AsDistroDetails -
-
-
-as_distro_details_get_version, function in AsDistroDetails -
-
-
-as_distro_details_new, function in AsDistroDetails -
-
-

G

-
-as_get_current_arch, function in as-utils-private -
-
-
-as_get_icon_repository_paths, function in AsDistroDetails -
-
-
-as_get_system_categories, function in AsMenuParser -
-
-

I

-
-AsIcon, struct in AsIcon -
-
-
-AsIconClass, struct in AsIcon -
-
-
-AsIconKind, enum in AsIcon -
-
-
-as_icon_get_filename, function in AsIcon -
-
-
-as_icon_get_height, function in AsIcon -
-
-
-as_icon_get_kind, function in AsIcon -
-
-
-as_icon_get_name, function in AsIcon -
-
-
-as_icon_get_url, function in AsIcon -
-
-
-as_icon_get_width, function in AsIcon -
-
-
-as_icon_kind_from_string, function in AsIcon -
-
-
-as_icon_kind_to_string, function in AsIcon -
-
-
-as_icon_new, function in AsIcon -
-
-
-as_icon_set_filename, function in AsIcon -
-
-
-as_icon_set_height, function in AsIcon -
-
-
-as_icon_set_kind, function in AsIcon -
-
-
-as_icon_set_name, function in AsIcon -
-
-
-as_icon_set_url, function in AsIcon -
-
-
-as_icon_set_width, function in AsIcon -
-
-
-AsImage, struct in AsImage -
-
-
-AsImageClass, struct in AsImage -
-
-
-AsImageKind, enum in AsImage -
-
-
-as_image_get_height, function in AsImage -
-
-
-as_image_get_kind, function in AsImage -
-
-
-as_image_get_url, function in AsImage -
-
-
-as_image_get_width, function in AsImage -
-
-
-as_image_kind_from_string, function in AsImage -
-
-
-as_image_kind_to_string, function in AsImage -
-
-
-as_image_new, function in AsImage -
-
-
-as_image_set_height, function in AsImage -
-
-
-as_image_set_kind, function in AsImage -
-
-
-as_image_set_url, function in AsImage -
-
-
-as_image_set_width, function in AsImage -
-
-
-AsIssueImportance, enum in AsValidatorIssue -
-
-
-AsIssueKind, enum in AsValidatorIssue -
-
-
-as_is_cruft_locale, function in as-utils-private -
-
-

L

-
-as_locale_strip_encoding, function in as-utils-private -
-
-

M

-
-AsMenuParser, struct in AsMenuParser -
-
-
-AsMenuParser:update-category-data, object property in AsMenuParser -
-
-
-AsMenuParserClass, struct in AsMenuParser -
-
-
-as_menu_parser_get_update_category_data, function in AsMenuParser -
-
-
-as_menu_parser_new, function in AsMenuParser -
-
-
-as_menu_parser_new_from_file, function in AsMenuParser -
-
-
-as_menu_parser_parse, function in AsMenuParser -
-
-
-as_menu_parser_set_update_category_data, function in AsMenuParser -
-
-
-AsMetadata, struct in AsMetadata -
-
-
-AsMetadataClass, struct in AsMetadata -
-
-
-AsMetadataError, enum in AsMetadata -
-
-
-as_metadata_add_component, function in AsMetadata -
-
-
-as_metadata_clear_components, function in AsMetadata -
-
-
-as_metadata_components_to_distro_xml, function in AsMetadata -
-
-
-as_metadata_components_to_distro_yaml, function in AsMetadata -
-
-
-as_metadata_component_to_upstream_xml, function in AsMetadata -
-
-
-AS_METADATA_ERROR, macro in AsMetadata -
-
-
-as_metadata_error_quark, function in AsMetadata -
-
-
-as_metadata_get_architecture, function in AsMetadata -
-
-
-as_metadata_get_component, function in AsMetadata -
-
-
-as_metadata_get_components, function in AsMetadata -
-
-
-as_metadata_get_locale, function in AsMetadata -
-
-
-as_metadata_get_origin, function in AsMetadata -
-
-
-as_metadata_get_parser_mode, function in AsMetadata -
-
-
-as_metadata_get_update_existing, function in AsMetadata -
-
-
-as_metadata_get_write_header, function in AsMetadata -
-
-
-as_metadata_new, function in AsMetadata -
-
-
-as_metadata_parse_file, function in AsMetadata -
-
-
-as_metadata_parse_xml, function in AsMetadata -
-
-
-as_metadata_parse_yaml, function in AsMetadata -
-
-
-as_metadata_save_distro_xml, function in AsMetadata -
-
-
-as_metadata_save_distro_yaml, function in AsMetadata -
-
-
-as_metadata_save_upstream_xml, function in AsMetadata -
-
-
-as_metadata_set_architecture, function in AsMetadata -
-
-
-as_metadata_set_locale, function in AsMetadata -
-
-
-as_metadata_set_origin, function in AsMetadata -
-
-
-as_metadata_set_parser_mode, function in AsMetadata -
-
-
-as_metadata_set_update_existing, function in AsMetadata -
-
-
-as_metadata_set_write_header, function in AsMetadata -
-
-

P

-
-AsParserMode, enum in AsMetadata -
-
-
-AsProvided, struct in AsProvided -
-
-
-AsProvidedClass, struct in AsProvided -
-
-
-AsProvidedKind, enum in AsProvided -
-
-
-as_provided_add_item, function in AsProvided -
-
-
-as_provided_get_items, function in AsProvided -
-
-
-as_provided_get_kind, function in AsProvided -
-
-
-as_provided_has_item, function in AsProvided -
-
-
-as_provided_kind_from_string, function in AsProvided -
-
-
-as_provided_kind_to_l10n_string, function in AsProvided -
-
-
-as_provided_kind_to_string, function in AsProvided -
-
-
-as_provided_new, function in AsProvided -
-
-
-as_provided_set_kind, function in AsProvided -
-
-
-as_ptr_array_to_strv, function in as-utils-private -
-
-

R

-
-AsRelease, struct in AsRelease -
-
-
-AsReleaseClass, struct in AsRelease -
-
-
-as_release_add_location, function in AsRelease -
-
-
-as_release_get_active_locale, function in AsRelease -
-
-
-as_release_get_checksum, function in AsRelease -
-
-
-as_release_get_description, function in AsRelease -
-
-
-as_release_get_locations, function in AsRelease -
-
-
-as_release_get_size, function in AsRelease -
-
-
-as_release_get_timestamp, function in AsRelease -
-
-
-as_release_get_urgency, function in AsRelease -
-
-
-as_release_get_version, function in AsRelease -
-
-
-as_release_new, function in AsRelease -
-
-
-as_release_set_active_locale, function in AsRelease -
-
-
-as_release_set_checksum, function in AsRelease -
-
-
-as_release_set_description, function in AsRelease -
-
-
-as_release_set_size, function in AsRelease -
-
-
-as_release_set_timestamp, function in AsRelease -
-
-
-as_release_set_urgency, function in AsRelease -
-
-
-as_release_set_version, function in AsRelease -
-
-
-as_reset_umask, function in as-utils-private -
-
-

S

-
-AsScreenshot, struct in AsScreenshot -
-
-
-AsScreenshotClass, struct in AsScreenshot -
-
-
-AsScreenshotKind, enum in AsScreenshot -
-
-
-as_screenshot_add_image, function in AsScreenshot -
-
-
-as_screenshot_get_active_locale, function in AsScreenshot -
-
-
-as_screenshot_get_caption, function in AsScreenshot -
-
-
-as_screenshot_get_caption_table, function in as-screenshot-private -
-
-
-as_screenshot_get_images, function in AsScreenshot -
-
-
-as_screenshot_get_kind, function in AsScreenshot -
-
-
-as_screenshot_is_valid, function in AsScreenshot -
-
-
-as_screenshot_kind_from_string, function in AsScreenshot -
-
-
-as_screenshot_kind_to_string, function in AsScreenshot -
-
-
-as_screenshot_new, function in AsScreenshot -
-
-
-as_screenshot_set_active_locale, function in AsScreenshot -
-
-
-as_screenshot_set_caption, function in AsScreenshot -
-
-
-as_screenshot_set_kind, function in AsScreenshot -
-
-
-AsSizeKind, enum in AsRelease -
-
-
-as_size_kind_from_string, function in AsRelease -
-
-
-as_size_kind_to_string, function in AsRelease -
-
-
-as_str_replace, function in as-utils-private -
-
-

T

-
-as_touch_location, function in as-utils-private -
-
-
-AsTranslation, struct in AsTranslation -
-
-
-AsTranslationClass, struct in AsTranslation -
-
-
-AsTranslationKind, enum in AsTranslation -
-
-
-as_translation_get_id, function in AsTranslation -
-
-
-as_translation_get_kind, function in AsTranslation -
-
-
-as_translation_kind_from_string, function in AsTranslation -
-
-
-as_translation_kind_to_string, function in AsTranslation -
-
-
-as_translation_new, function in AsTranslation -
-
-
-as_translation_set_id, function in AsTranslation -
-
-
-as_translation_set_kind, function in AsTranslation -
-
-
-AS_TYPE_CACHE_BUILDER, macro in AsCacheBuilder -
-
-
-AS_TYPE_CATEGORY, macro in AsCategory -
-
-
-AS_TYPE_COMPONENT, macro in AsComponent -
-
-
-AS_TYPE_DATABASE, macro in AsDatabase -
-
-
-AS_TYPE_DATA_POOL, macro in AsDataPool -
-
-
-AS_TYPE_DISTRO_DETAILS, macro in AsDistroDetails -
-
-
-AS_TYPE_ICON, macro in AsIcon -
-
-
-AS_TYPE_IMAGE, macro in AsImage -
-
-
-AS_TYPE_MENU_PARSER, macro in AsMenuParser -
-
-
-AS_TYPE_METADATA, macro in AsMetadata -
-
-
-AS_TYPE_PROVIDED, macro in AsProvided -
-
-
-AS_TYPE_RELEASE, macro in AsRelease -
-
-
-AS_TYPE_SCREENSHOT, macro in AsScreenshot -
-
-
-AS_TYPE_TRANSLATION, macro in AsTranslation -
-
-
-AS_TYPE_VALIDATOR, macro in AsValidator -
-
-
-AS_TYPE_VALIDATOR_ISSUE, macro in AsValidatorIssue -
-
-
-AS_TYPE_XMLDATA, macro in AsXMLData -
-
-
-AS_TYPE_YAMLDATA, macro in AsYAMLData -
-
-

U

-
-AsUrgencyKind, enum in as-enums -
-
-
-as_urgency_kind_from_string, function in as-enums -
-
-
-as_urgency_kind_to_string, function in as-enums -
-
-
-AsUrlKind, enum in as-enums -
-
-
-as_url_kind_from_string, function in as-enums -
-
-
-as_url_kind_to_string, function in as-enums -
-
-
-as_utils_categories_from_str, function in as-utils-private -
-
-
-as_utils_categories_from_strv, function in as-utils-private -
-
-
-as_utils_delete_dir_recursive, function in as-utils-private -
-
-
-as_utils_find_files, function in as-utils-private -
-
-
-as_utils_find_files_matching, function in as-utils-private -
-
-
-as_utils_is_root, function in as-utils-private -
-
-
-as_utils_is_writable, function in as-utils-private -
-
-

V

-
-AsValidator, struct in AsValidator -
-
-
-AsValidatorClass, struct in AsValidator -
-
-
-AsValidatorIssue, struct in AsValidatorIssue -
-
-
-AsValidatorIssueClass, struct in AsValidatorIssue -
-
-
-as_validator_clear_issues, function in AsValidator -
-
-
-as_validator_get_issues, function in AsValidator -
-
-
-as_validator_issue_get_importance, function in AsValidatorIssue -
-
-
-as_validator_issue_get_kind, function in AsValidatorIssue -
-
-
-as_validator_issue_get_location, function in AsValidatorIssue -
-
-
-as_validator_issue_get_message, function in AsValidatorIssue -
-
-
-as_validator_issue_new, function in AsValidatorIssue -
-
-
-as_validator_issue_set_importance, function in AsValidatorIssue -
-
-
-as_validator_issue_set_kind, function in AsValidatorIssue -
-
-
-as_validator_issue_set_location, function in AsValidatorIssue -
-
-
-as_validator_issue_set_message, function in AsValidatorIssue -
-
-
-as_validator_new, function in AsValidator -
-
-
-as_validator_validate_data, function in AsValidator -
-
-
-as_validator_validate_file, function in AsValidator -
-
-
-as_validator_validate_tree, function in AsValidator -
-
-

X

-
-AsXMLData, struct in AsXMLData -
-
-
-AsXMLDataClass, struct in AsXMLData -
-
-
-as_xmldata_initialize, function in AsXMLData -
-
-
-as_xmldata_new, function in AsXMLData -
-
-
-as_xmldata_parse_component_node, function in AsXMLData -
-
-
-as_xmldata_parse_distro_data, function in AsXMLData -
-
-
-as_xmldata_parse_upstream_data, function in AsXMLData -
-
-
-as_xmldata_serialize_to_distro, function in AsXMLData -
-
-
-as_xmldata_serialize_to_upstream, function in AsXMLData -
-
-
-as_xmldata_set_parser_mode, function in AsXMLData -
-
-
-as_xmldata_update_cpt_with_upstream_data, function in AsXMLData -
-
-

Y

-
-AsYAMLData, struct in AsYAMLData -
-
-
-AsYAMLDataClass, struct in AsYAMLData -
-
-
-as_yamldata_get_locale, function in AsYAMLData -
-
-
-as_yamldata_initialize, function in AsYAMLData -
-
-
-as_yamldata_new, function in AsYAMLData -
-
-
-as_yamldata_parse_distro_data, function in AsYAMLData -
-
-
-as_yamldata_serialize_to_distro, function in AsYAMLData -
-
-
-as_yamldata_set_locale, function in AsYAMLData -
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/appstream-as-enums.html appstream-0.12.0/docs/api/html/appstream-as-enums.html --- appstream-0.9.4/docs/api/html/appstream-as-enums.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/appstream-as-enums.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,440 +0,0 @@ - - - - -as-enums: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

as-enums

-

as-enums — Some enums used by various other modules

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -as_url_kind_to_string () -
-AsUrlKind - -as_url_kind_from_string () -
const gchar * - -as_bundle_kind_to_string () -
-AsBundleKind - -as_bundle_kind_from_string () -
const gchar * - -as_urgency_kind_to_string () -
-AsUrgencyKind - -as_urgency_kind_from_string () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
enumAsUrlKind
enumAsBundleKind
enumAsUrgencyKind
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-
-
-

Functions

-
-

as_url_kind_to_string ()

-
const gchar *
-as_url_kind_to_string (AsUrlKind url_kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

url_kind

the AsUrlKind.

 
-
-
-

Returns

-

string version of url_kind -

-
-
-
-
-

as_url_kind_from_string ()

-
AsUrlKind
-as_url_kind_from_string (const gchar *url_kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

url_kind

the string.

 
-
-
-

Returns

-

a AsUrlKind or AS_URL_KIND_UNKNOWN for unknown

-
-
-
-
-

as_bundle_kind_to_string ()

-
const gchar *
-as_bundle_kind_to_string (AsBundleKind bundle_kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

bundle_kind

the AsBundleKind.

 
-
-
-

Returns

-

string version of bundle_kind -

-
-

Since: 0.8.0

-
-
-
-

as_bundle_kind_from_string ()

-
AsBundleKind
-as_bundle_kind_from_string (const gchar *bundle_kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

bundle_kind

the string.

 
-
-
-

Returns

-

a AsBundleKind or AS_BUNDLE_KIND_UNKNOWN for unknown

-
-
-
-
-

as_urgency_kind_to_string ()

-
const gchar *
-as_urgency_kind_to_string (AsUrgencyKind urgency_kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

urgency_kind

the AsUrgencyKind.

 
-
-
-

Returns

-

string version of urgency_kind -

-
-

Since: 0.6.5

-
-
-
-

as_urgency_kind_from_string ()

-
AsUrgencyKind
-as_urgency_kind_from_string (const gchar *urgency_kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

urgency_kind

the string.

 
-
-
-

Returns

-

a AsUrgencyKind or AS_URGENCY_KIND_UNKNOWN for unknown

-
-

Since: 0.6.5

-
-
-
-

Types and Values

-
-

enum AsUrlKind

-

The URL type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_URL_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_URL_KIND_HOMEPAGE

-

Project homepage

-
 

AS_URL_KIND_BUGTRACKER

-

Bugtracker

-
 

AS_URL_KIND_FAQ

-

FAQ page

-
 

AS_URL_KIND_HELP

-

Help manual

-
 

AS_URL_KIND_DONATION

-

Page with information about how to donate to the project

-
 
-
-
-
-
-

enum AsBundleKind

-

The bundle type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_BUNDLE_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_BUNDLE_KIND_LIMBA

-

A Limba bundle

-
 

AS_BUNDLE_KIND_XDG_APP

-

An xdg-app bundle

-
 
-
-
-
-
-

enum AsUrgencyKind

-

The urgency of an AsRelease

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_URGENCY_KIND_UNKNOWN

-

Urgency is unknown or not set

-
 

AS_URGENCY_KIND_LOW

-

Low urgency

-
 

AS_URGENCY_KIND_MEDIUM

-

Medium urgency

-
 

AS_URGENCY_KIND_HIGH

-

High urgency

-
 

AS_URGENCY_KIND_CRITICAL

-

Critical urgency

-
 
-
-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/appstream.devhelp2 appstream-0.12.0/docs/api/html/appstream.devhelp2 --- appstream-0.9.4/docs/api/html/appstream.devhelp2 2016-04-18 14:19:34.000000000 +0000 +++ appstream-0.12.0/docs/api/html/appstream.devhelp2 1970-01-01 00:00:00.000000000 +0000 @@ -1,426 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru appstream-0.9.4/docs/api/html/appstream-sections.txt appstream-0.12.0/docs/api/html/appstream-sections.txt --- appstream-0.9.4/docs/api/html/appstream-sections.txt 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/html/appstream-sections.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,452 +0,0 @@ -
-as-cache-builder -AsCacheBuilder -AS_TYPE_CACHE_BUILDER -AsCacheBuilderClass -AS_CACHE_BUILDER_ERROR -as_cache_builder_error_quark -AsCacheBuilderError -as_cache_builder_new -as_cache_builder_setup -as_cache_builder_refresh -as_cache_builder_set_data_source_directories -AsCacheBuilder -
- -
-as-category -AsCategory -AS_TYPE_CATEGORY -AsCategoryClass -as_category_new -as_category_complete -as_category_get_directory -as_category_set_directory -as_category_get_name -as_category_set_name -as_category_get_summary -as_category_set_summary -as_category_get_icon -as_category_set_icon -as_category_has_subcategory -as_category_add_subcategory -as_category_remove_subcategory -as_category_get_included -as_category_get_excluded -as_category_get_subcategories -as_category_get_level -as_category_set_level -AsCategory -
- -
-as-component -AsComponent -AS_TYPE_COMPONENT -AsComponentClass -AsComponentKind -as_component_kind_to_string -as_component_kind_from_string -as_component_new -as_component_is_valid -as_component_to_string -as_component_get_active_locale -as_component_set_active_locale -as_component_get_kind -as_component_set_kind -as_component_get_id -as_component_set_id -as_component_get_origin -as_component_set_origin -as_component_get_pkgnames -as_component_set_pkgnames -as_component_get_source_pkgname -as_component_set_source_pkgname -as_component_get_name -as_component_set_name -as_component_get_summary -as_component_set_summary -as_component_get_description -as_component_set_description -as_component_get_project_license -as_component_set_project_license -as_component_get_project_group -as_component_set_project_group -as_component_get_developer_name -as_component_set_developer_name -as_component_get_compulsory_for_desktops -as_component_set_compulsory_for_desktops -as_component_is_compulsory_for_desktop -as_component_get_categories -as_component_set_categories -as_component_has_category -as_component_get_screenshots -as_component_add_screenshot -as_component_get_keywords -as_component_set_keywords -as_component_get_icons -as_component_get_icon_by_size -as_component_add_icon -as_component_add_provided -as_component_get_provided_for_kind -as_component_get_provided -as_component_get_url -as_component_add_url -as_component_get_releases -as_component_add_release -as_component_get_extends -as_component_add_extends -as_component_get_extensions -as_component_add_extension -as_component_get_languages -as_component_get_language -as_component_add_language -as_component_get_translations -as_component_add_translation -as_component_has_bundle -as_component_get_bundle_id -as_component_add_bundle_id -AsComponent - -AS_TYPE_COMPONENT_KIND -as_component_kind_get_type -
- -
-as-data-pool -AsDataPool -AS_TYPE_DATA_POOL -AsDataPoolClass -AsDataPoolError -AS_DATA_POOL_ERROR -as_data_pool_error_quark -as_data_pool_new -as_data_pool_get_locale -as_data_pool_set_locale -as_data_pool_update -as_data_pool_get_components -as_data_pool_get_component_by_id -as_data_pool_get_metadata_locations -as_data_pool_set_metadata_locations -AsDataPool -
- -
-as-database -AsDatabase -AS_TYPE_DATABASE -AsDatabaseClass -AsDatabaseError -AS_DATABASE_ERROR -as_database_new -as_database_error_quark -as_database_open -as_database_get_location -as_database_set_location -as_database_find_components -as_database_get_all_components -as_database_get_component_by_id -as_database_get_components_by_provided_item -as_database_get_components_by_kind -AsDatabase -
- -
-as-distro-details -AsDistroDetails -AS_TYPE_DISTRO_DETAILS -AsDistroDetailsClass -as_distro_details_new -as_distro_details_get_id -as_distro_details_get_name -as_distro_details_get_version -as_distro_details_get_str -as_distro_details_get_bool -as_get_icon_repository_paths -AsDistroDetails -
- -
-as-enums -AsUrlKind -as_url_kind_to_string -as_url_kind_from_string -AsBundleKind -as_bundle_kind_to_string -as_bundle_kind_from_string -AsUrgencyKind -as_urgency_kind_to_string -as_urgency_kind_from_string -
- -
-as-icon -AsIcon -AS_TYPE_ICON -AsIconClass -AsIconKind -as_icon_kind_from_string -as_icon_kind_to_string -as_icon_new -as_icon_get_kind -as_icon_set_kind -as_icon_get_name -as_icon_set_name -as_icon_get_url -as_icon_set_url -as_icon_get_filename -as_icon_set_filename -as_icon_get_width -as_icon_set_width -as_icon_get_height -as_icon_set_height -AsIcon -
- -
-as-image -AsImage -AS_TYPE_IMAGE -AsImageClass -AsImageKind -as_image_kind_from_string -as_image_kind_to_string -as_image_new -as_image_get_url -as_image_set_url -as_image_get_width -as_image_set_width -as_image_get_height -as_image_set_height -as_image_get_kind -as_image_set_kind -AsImage -
- -
-as-menu-parser -AsMenuParser -AS_TYPE_MENU_PARSER -AsMenuParserClass -as_menu_parser_new -as_menu_parser_new_from_file -as_menu_parser_parse -as_menu_parser_get_update_category_data -as_menu_parser_set_update_category_data -as_get_system_categories -AsMenuParser -
- -
-as-metadata -AsMetadata -AS_TYPE_METADATA -AsMetadataClass -AsParserMode -AsMetadataError -AS_METADATA_ERROR -as_metadata_new -as_metadata_error_quark -as_metadata_parse_file -as_metadata_parse_xml -as_metadata_parse_yaml -as_metadata_get_component -as_metadata_get_components -as_metadata_clear_components -as_metadata_add_component -as_metadata_component_to_upstream_xml -as_metadata_save_upstream_xml -as_metadata_components_to_distro_xml -as_metadata_save_distro_xml -as_metadata_components_to_distro_yaml -as_metadata_save_distro_yaml -as_metadata_set_locale -as_metadata_get_locale -as_metadata_get_origin -as_metadata_set_origin -as_metadata_get_update_existing -as_metadata_set_update_existing -as_metadata_get_write_header -as_metadata_set_write_header -as_metadata_set_parser_mode -as_metadata_get_parser_mode -as_metadata_get_architecture -as_metadata_set_architecture -AsMetadata -
- -
-as-provided -AsProvided -AS_TYPE_PROVIDED -AsProvidedClass -AsProvidedKind -as_provided_kind_to_string -as_provided_kind_from_string -as_provided_kind_to_l10n_string -as_provided_new -as_provided_get_kind -as_provided_set_kind -as_provided_get_items -as_provided_add_item -as_provided_has_item -AsProvided -
- -
-as-release -AsRelease -AS_TYPE_RELEASE -AsReleaseClass -AsChecksumKind -as_checksum_kind_to_string -as_checksum_kind_from_string -AsSizeKind -as_size_kind_to_string -as_size_kind_from_string -as_release_new -as_release_get_version -as_release_set_version -as_release_get_timestamp -as_release_set_timestamp -as_release_get_description -as_release_set_description -as_release_get_active_locale -as_release_set_active_locale -as_release_get_locations -as_release_add_location -as_release_get_checksum -as_release_set_checksum -as_release_get_urgency -as_release_set_urgency -as_release_get_size -as_release_set_size -AsRelease -
- -
-as-screenshot -AsScreenshot -AS_TYPE_SCREENSHOT -AsScreenshotClass -AsScreenshotKind -as_screenshot_kind_from_string -as_screenshot_kind_to_string -as_screenshot_is_valid -as_screenshot_new -as_screenshot_get_kind -as_screenshot_set_kind -as_screenshot_get_caption -as_screenshot_set_caption -as_screenshot_get_images -as_screenshot_add_image -as_screenshot_get_active_locale -as_screenshot_set_active_locale -AsScreenshot -
- -
-as-screenshot-private -as_screenshot_get_caption_table -
- -
-as-translation -AsTranslation -AS_TYPE_TRANSLATION -AsTranslationClass -AsTranslationKind -as_translation_kind_to_string -as_translation_kind_from_string -as_translation_new -as_translation_get_kind -as_translation_set_kind -as_translation_get_id -as_translation_set_id -AsTranslation -
- -
-as-utils-private -as_utils_delete_dir_recursive -as_utils_categories_from_strv -as_utils_categories_from_str -as_utils_find_files_matching -as_utils_find_files -as_utils_is_root -as_utils_is_writable -as_str_replace -as_ptr_array_to_strv -as_touch_location -as_copy_file -as_reset_umask -as_is_cruft_locale -as_locale_strip_encoding -as_get_current_arch -as_arch_compatible -
- -
-as-validator -AsValidator -AS_TYPE_VALIDATOR -AsValidatorClass -as_validator_new -as_validator_clear_issues -as_validator_validate_file -as_validator_validate_data -as_validator_validate_tree -as_validator_get_issues -AsValidator -
- -
-as-validator-issue -AsValidatorIssue -AS_TYPE_VALIDATOR_ISSUE -AsValidatorIssueClass -AsIssueImportance -AsIssueKind -as_validator_issue_new -as_validator_issue_get_kind -as_validator_issue_set_kind -as_validator_issue_get_importance -as_validator_issue_set_importance -as_validator_issue_get_message -as_validator_issue_set_message -as_validator_issue_get_location -as_validator_issue_set_location -AsValidatorIssue -
- -
-as-xmldata -AsXMLData -AS_TYPE_XMLDATA -AsXMLDataClass -as_xmldata_new -as_xmldata_initialize -as_xmldata_parse_upstream_data -as_xmldata_parse_distro_data -as_xmldata_update_cpt_with_upstream_data -as_xmldata_serialize_to_upstream -as_xmldata_serialize_to_distro -as_xmldata_set_parser_mode -as_xmldata_parse_component_node -AsXMLData -
- -
-as-yamldata -AsYAMLData -AS_TYPE_YAMLDATA -AsYAMLDataClass -as_yamldata_new -as_yamldata_initialize -as_yamldata_parse_distro_data -as_yamldata_serialize_to_distro -as_yamldata_get_locale -as_yamldata_set_locale -AsYAMLData -
- diff -Nru appstream-0.9.4/docs/api/html/AsCategory.html appstream-0.12.0/docs/api/html/AsCategory.html --- appstream-0.9.4/docs/api/html/AsCategory.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsCategory.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,768 +0,0 @@ - - - - -AsCategory: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsCategory

-

AsCategory — Representation of a XDG category

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsCategory * - -as_category_new () -
-void - -as_category_complete () -
const gchar * - -as_category_get_directory () -
-void - -as_category_set_directory () -
const gchar * - -as_category_get_name () -
-void - -as_category_set_name () -
const gchar * - -as_category_get_summary () -
-void - -as_category_set_summary () -
const gchar * - -as_category_get_icon () -
-void - -as_category_set_icon () -
-gboolean - -as_category_has_subcategory () -
-void - -as_category_add_subcategory () -
-void - -as_category_remove_subcategory () -
-GList * - -as_category_get_included () -
-GList * - -as_category_get_excluded () -
-GList * - -as_category_get_subcategories () -
-gint - -as_category_get_level () -
-void - -as_category_set_level () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gchar *directoryRead / Write
gpointerexcludedRead
-gchar *iconRead / Write
gpointerincludedRead
gintlevelRead / Write
-gchar *nameRead / Write
gpointersubcategoriesRead
-gchar *summaryRead
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineAS_TYPE_CATEGORY
structAsCategoryClass
 AsCategory
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsCategory
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object represents an XDG category, as defined at: -http://standards.freedesktop.org/menu-spec/menu-spec-1.0.htmlcategory-registry

-

The AsCategory object does not support all aspects of a menu. It's main purpose -is to be used in software-centers to show information about application-groups, -which are use to thematically group applications.

-

You can use AsMenuParser to get a set of supported default categories.

-

See also: AsMenuParser

-
-
-

Functions

-
-

as_category_new ()

-
AsCategory *
-as_category_new (void);
-

Creates a new AsCategory.

-
-

Returns

-

a new AsCategory.

-

[transfer full]

-
-
-
-
-

as_category_complete ()

-
void
-as_category_complete (AsCategory *cat);
-

Update incomplete category data with information from -"/usr/share/desktop-directories".

-
-
-
-

as_category_get_directory ()

-
const gchar *
-as_category_get_directory (AsCategory *cat);
-

Get associated XDG directory name for this category, -in case one exists in "/usr/share/desktop-directories/".

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_set_directory ()

-
void
-as_category_set_directory (AsCategory *cat,
-                           const gchar *value);
-

Set associated XDG directory name for this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_get_name ()

-
const gchar *
-as_category_get_name (AsCategory *cat);
-

Get the name of this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_set_name ()

-
void
-as_category_set_name (AsCategory *cat,
-                      const gchar *value);
-

Set the name of this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_get_summary ()

-
const gchar *
-as_category_get_summary (AsCategory *cat);
-

Get the summary (short description) of this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_set_summary ()

-
void
-as_category_set_summary (AsCategory *cat,
-                         const gchar *value);
-

Get the summary (short description) of this category.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cat

An instance of AsCategory.

 

value

A new short summary of this category.

 
-
-
-
-
-

as_category_get_icon ()

-
const gchar *
-as_category_get_icon (AsCategory *cat);
-

Get the stock icon name for this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_set_icon ()

-
void
-as_category_set_icon (AsCategory *cat,
-                      const gchar *value);
-

Set the stock icon name for this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_has_subcategory ()

-
gboolean
-as_category_has_subcategory (AsCategory *cat);
-

Test for sub-categories.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-

Returns

-

TRUE if this category has any subcategory

-
-
-
-
-

as_category_add_subcategory ()

-
void
-as_category_add_subcategory (AsCategory *cat,
-                             AsCategory *subcat);
-

Add a subcategory to this category.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cat

An instance of AsCategory.

 

subcat

A subcategory to add.

 
-
-
-
-
-

as_category_remove_subcategory ()

-
void
-as_category_remove_subcategory (AsCategory *cat,
-                                AsCategory *subcat);
-

Drop a subcategory from this AsCategory.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cat

An instance of AsCategory.

 

subcat

A subcategory to remove.

 
-
-
-
-
-

as_category_get_included ()

-
GList *
-as_category_get_included (AsCategory *cat);
-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-

Returns

-

A list of category names.

-

[element-type utf8][transfer none]

-
-
-
-
-

as_category_get_excluded ()

-
GList *
-as_category_get_excluded (AsCategory *cat);
-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-

Returns

-

A list of category names.

-

[element-type utf8][transfer none]

-
-
-
-
-

as_category_get_subcategories ()

-
GList *
-as_category_get_subcategories (AsCategory *cat);
-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-

Returns

-

A list of subcategories.

-

[element-type AsCategory][transfer none]

-
-
-
-
-

as_category_get_level ()

-
gint
-as_category_get_level (AsCategory *cat);
-
-
-
-

as_category_set_level ()

-
void
-as_category_set_level (AsCategory *cat,
-                       gint value);
-
-
-
-

Types and Values

-
-

AS_TYPE_CATEGORY

-
#define AS_TYPE_CATEGORY (as_category_get_type ())
-
-

-

-
-
-
-

struct AsCategoryClass

-
struct AsCategoryClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

AsCategory

-
typedef struct _AsCategory AsCategory;
-

-

-
-
-
-

Property Details

-
-

The “directory” property

-
  “directory”                gchar *
-

directory.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “excluded” property

-
  “excluded”                 gpointer
-

excluded.

-

Flags: Read

-
-
-
-

The “icon” property

-
  “icon”                     gchar *
-

icon.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “included” property

-
  “included”                 gpointer
-

included.

-

Flags: Read

-
-
-
-

The “level” property

-
  “level”                    gint
-

level.

-

Flags: Read / Write

-

Default value: 0

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

name.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “subcategories” property

-
  “subcategories”            gpointer
-

subcategories.

-

Flags: Read

-
-
-
-

The “summary” property

-
  “summary”                  gchar *
-

summary.

-

Flags: Read

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsComponent.html appstream-0.12.0/docs/api/html/AsComponent.html --- appstream-0.9.4/docs/api/html/AsComponent.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsComponent.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,2706 +0,0 @@ - - - - -AsComponent: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsComponent

-

AsComponent — Object representing a software component

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -as_component_kind_to_string () -
-AsComponentKind - -as_component_kind_from_string () -
-AsComponent * - -as_component_new () -
-gboolean - -as_component_is_valid () -
-gchar * - -as_component_to_string () -
-gchar * - -as_component_get_active_locale () -
-void - -as_component_set_active_locale () -
-AsComponentKind - -as_component_get_kind () -
-void - -as_component_set_kind () -
const gchar * - -as_component_get_id () -
-void - -as_component_set_id () -
const gchar * - -as_component_get_origin () -
-void - -as_component_set_origin () -
-gchar ** - -as_component_get_pkgnames () -
-void - -as_component_set_pkgnames () -
const gchar * - -as_component_get_source_pkgname () -
-void - -as_component_set_source_pkgname () -
const gchar * - -as_component_get_name () -
-void - -as_component_set_name () -
const gchar * - -as_component_get_summary () -
-void - -as_component_set_summary () -
const gchar * - -as_component_get_description () -
-void - -as_component_set_description () -
const gchar * - -as_component_get_project_license () -
-void - -as_component_set_project_license () -
const gchar * - -as_component_get_project_group () -
-void - -as_component_set_project_group () -
const gchar * - -as_component_get_developer_name () -
-void - -as_component_set_developer_name () -
-gchar ** - -as_component_get_compulsory_for_desktops () -
-void - -as_component_set_compulsory_for_desktops () -
-gboolean - -as_component_is_compulsory_for_desktop () -
-gchar ** - -as_component_get_categories () -
-void - -as_component_set_categories () -
-gboolean - -as_component_has_category () -
-GPtrArray * - -as_component_get_screenshots () -
-void - -as_component_add_screenshot () -
-gchar ** - -as_component_get_keywords () -
-void - -as_component_set_keywords () -
-GPtrArray * - -as_component_get_icons () -
-AsIcon * - -as_component_get_icon_by_size () -
-void - -as_component_add_icon () -
-void - -as_component_add_provided () -
-AsProvided * - -as_component_get_provided_for_kind () -
-GList * - -as_component_get_provided () -
const gchar * - -as_component_get_url () -
-void - -as_component_add_url () -
-GPtrArray * - -as_component_get_releases () -
-void - -as_component_add_release () -
-GPtrArray * - -as_component_get_extends () -
-void - -as_component_add_extends () -
-GPtrArray * - -as_component_get_extensions () -
-void - -as_component_add_extension () -
-GList * - -as_component_get_languages () -
-gint - -as_component_get_language () -
-void - -as_component_add_language () -
-GPtrArray * - -as_component_get_translations () -
-void - -as_component_add_translation () -
-gboolean - -as_component_has_bundle () -
const gchar * - -as_component_get_bundle_id () -
-void - -as_component_add_bundle_id () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GStrvcategoriesRead / Write
-gchar *descriptionRead / Write
-gchar *developer-nameRead / Write
gpointericonsRead
-gchar *idRead / Write
GStrvkeywordsRead / Write
AsComponentKindkindRead / Write
-gchar *nameRead / Write
GStrvpkgnamesRead / Write
-gchar *project-groupRead / Write
-gchar *project-licenseRead / Write
-GPtrArray *screenshotsRead
-gchar *summaryRead / Write
-GHashTable *urlsRead
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_COMPONENT
structAsComponentClass
enumAsComponentKind
 AsComponent
-
-
-

Object Hierarchy

-
    GEnum
-    ╰── AsComponentKind
-    GObject
-    ╰── AsComponent
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object represents an Appstream software component which is associated -to a package in the distribution's repositories. -A component can be anything, ranging from an application to a font, a codec or -even a non-visual software project providing libraries and python-modules for -other applications to use.

-

The type of the component is stored as AsComponentKind and can be queried to -find out which kind of component we're dealing with.

-

See also: AsProvidesKind, AsDatabase

-
-
-

Functions

-
-

as_component_kind_to_string ()

-
const gchar *
-as_component_kind_to_string (AsComponentKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsComponentKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_component_kind_from_string ()

-
AsComponentKind
-as_component_kind_from_string (const gchar *kind_str);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind_str

the string.

 
-
-
-

Returns

-

a AsComponentKind or AS_COMPONENT_KIND_UNKNOWN for unknown

-
-
-
-
-

as_component_new ()

-
AsComponent *
-as_component_new (void);
-

Creates a new AsComponent.

-
-

Returns

-

a new AsComponent.

-

[transfer full]

-
-
-
-
-

as_component_is_valid ()

-
gboolean
-as_component_is_valid (AsComponent *cpt);
-

Check if the essential properties of this Component are -populated with useful data.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

TRUE if the component data was validated successfully.

-
-
-
-
-

as_component_to_string ()

-
gchar *
-as_component_to_string (AsComponent *cpt);
-

Returns a string identifying this component. -(useful for debugging)

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

A descriptive string.

-

[transfer full]

-
-
-
-
-

as_component_get_active_locale ()

-
gchar *
-as_component_get_active_locale (AsComponent *cpt);
-

Get the current active locale for this component, which -is used to get localized messages.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the current active locale.

-
-
-
-
-

as_component_set_active_locale ()

-
void
-as_component_set_active_locale (AsComponent *cpt,
-                                const gchar *locale);
-

Set the current active locale for this component, which -is used to get localized messages. -If the AsComponent was fetched from a localized database, usually only -one locale is available.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

locale

the locale, or NULL. e.g. "en_GB".

[nullable]
-
-
-
-
-

as_component_get_kind ()

-
AsComponentKind
-as_component_get_kind (AsComponent *cpt);
-

Returns the AsComponentKind of this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the kind of this.

-
-
-
-
-

as_component_set_kind ()

-
void
-as_component_set_kind (AsComponent *cpt,
-                       AsComponentKind value);
-

Sets the AsComponentKind of this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the AsComponentKind.

 
-
-
-
-
-

as_component_get_id ()

-
const gchar *
-as_component_get_id (AsComponent *cpt);
-

Set the unique identifier for this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the unique identifier.

-
-
-
-
-

as_component_set_id ()

-
void
-as_component_set_id (AsComponent *cpt,
-                     const gchar *value);
-

Set the unique identifier for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the unique identifier.

 
-
-
-
-
-

as_component_get_origin ()

-
const gchar *
-as_component_get_origin (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-
-
-

as_component_set_origin ()

-
void
-as_component_set_origin (AsComponent *cpt,
-                         const gchar *origin);
-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

origin

the origin.

 
-
-
-
-
-

as_component_get_pkgnames ()

-
gchar **
-as_component_get_pkgnames (AsComponent *cpt);
-

Get a list of package names which this component consists of. -This usually is just one package name.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

String array of package names.

-

[transfer none]

-
-
-
-
-

as_component_set_pkgnames ()

-
void
-as_component_set_pkgnames (AsComponent *cpt,
-                           gchar **value);
-

Set a list of package names this component consists of. -(This should usually be just one package name)

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

.

[array zero-terminated=1]
-
-
-
-
-

as_component_get_source_pkgname ()

-
const gchar *
-as_component_get_source_pkgname (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the source package name.

-
-
-
-
-

as_component_set_source_pkgname ()

-
void
-as_component_set_source_pkgname (AsComponent *cpt,
-                                 const gchar *spkgname);
-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

spkgname

the source package name.

 
-
-
-
-
-

as_component_get_name ()

-
const gchar *
-as_component_get_name (AsComponent *cpt);
-

A human-readable name for this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the name.

-
-
-
-
-

as_component_set_name ()

-
void
-as_component_set_name (AsComponent *cpt,
-                       const gchar *value,
-                       const gchar *locale);
-

Set a human-readable name for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

A valid AsComponent

 

value

The name

 

locale

The locale the used for this value, or NULL to use the current active one.

[nullable]
-
-
-
-
-

as_component_get_summary ()

-
const gchar *
-as_component_get_summary (AsComponent *cpt);
-

Get a short description of this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the summary.

-
-
-
-
-

as_component_set_summary ()

-
void
-as_component_set_summary (AsComponent *cpt,
-                          const gchar *value,
-                          const gchar *locale);
-

Set a short description for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

A valid AsComponent

 

value

The summary

 

locale

The locale the used for this value, or NULL to use the current active one.

[nullable]
-
-
-
-
-

as_component_get_description ()

-
const gchar *
-as_component_get_description (AsComponent *cpt);
-

Get the localized long description of this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the description.

-
-
-
-
-

as_component_set_description ()

-
void
-as_component_set_description (AsComponent *cpt,
-                              const gchar *value,
-                              const gchar *locale);
-

Set long description for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

A valid AsComponent

 

value

The long description

 

locale

The locale the used for this value, or NULL to use the current active one.

[nullable]
-
-
-
-
-

as_component_get_project_license ()

-
const gchar *
-as_component_get_project_license (AsComponent *cpt);
-

Get the license of the project this component belongs to.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the license.

-
-
-
-
-

as_component_set_project_license ()

-
void
-as_component_set_project_license (AsComponent *cpt,
-                                  const gchar *value);
-

Set the project license.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the project license.

 
-
-
-
-
-

as_component_get_project_group ()

-
const gchar *
-as_component_get_project_group (AsComponent *cpt);
-

Get the component's project group.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the project group.

-
-
-
-
-

as_component_set_project_group ()

-
void
-as_component_set_project_group (AsComponent *cpt,
-                                const gchar *value);
-

Set the component's project group.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the project group.

 
-
-
-
-
-

as_component_get_developer_name ()

-
const gchar *
-as_component_get_developer_name (AsComponent *cpt);
-

Get the component's developer or development team name.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the developer name.

-
-
-
-
-

as_component_set_developer_name ()

-
void
-as_component_set_developer_name (AsComponent *cpt,
-                                 const gchar *value,
-                                 const gchar *locale);
-

Set the the component's developer or development team name.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the developer or developer team name

 

locale

the locale, or NULL. e.g. "en_GB".

[nullable]
-
-
-
-
-

as_component_get_compulsory_for_desktops ()

-
gchar **
-as_component_get_compulsory_for_desktops
-                               (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

A list of desktops where this component is compulsory.

-

[transfer none]

-
-
-
-
-

as_component_set_compulsory_for_desktops ()

-
void
-as_component_set_compulsory_for_desktops
-                               (AsComponent *cpt,
-                                gchar **value);
-

Set a list of desktops where this component is compulsory.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the array of desktop ids.

[array zero-terminated=1]
-
-
-
-
-

as_component_is_compulsory_for_desktop ()

-
gboolean
-as_component_is_compulsory_for_desktop
-                               (AsComponent *cpt,
-                                const gchar *desktop);
-

Check if this component is compulsory for the given desktop.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent object

 

desktop

the desktop-id to test for

 
-
-
-

Returns

-

TRUE if compulsory, FALSE otherwise.

-
-
-
-
-

as_component_get_categories ()

-
gchar **
-as_component_get_categories (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

String array of categories.

-

[transfer none]

-
-
-
-
-

as_component_set_categories ()

-
void
-as_component_set_categories (AsComponent *cpt,
-                             gchar **value);
-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the categories name.

[array zero-terminated=1]
-
-
-
-
-

as_component_has_category ()

-
gboolean
-as_component_has_category (AsComponent *cpt,
-                           const gchar *category);
-

Check if component is in the specified category.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent object

 

category

the specified category to check

 
-
-
-

Returns

-

TRUE if the component is in the specified category.

-
-
-
-
-

as_component_get_screenshots ()

-
GPtrArray *
-as_component_get_screenshots (AsComponent *cpt);
-

Get a list of associated screenshots.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

an array of AsScreenshot instances.

-

[element-type AsScreenshot][transfer none]

-
-
-
-
-

as_component_add_screenshot ()

-
void
-as_component_add_screenshot (AsComponent *cpt,
-                             AsScreenshot *sshot);
-

Add an AsScreenshot to this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

sshot

The AsScreenshot to add

 
-
-
-
-
-

as_component_get_keywords ()

-
gchar **
-as_component_get_keywords (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

String array of keywords.

-

[transfer none]

-
-
-
-
-

as_component_set_keywords ()

-
void
-as_component_set_keywords (AsComponent *cpt,
-                           gchar **value,
-                           const gchar *locale);
-

Set keywords for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

String-array of keywords.

[array zero-terminated=1]

locale

Locale of the values, or NULL to use current locale.

[nullable]
-
-
-
-
-

as_component_get_icons ()

-
GPtrArray *
-as_component_get_icons (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance

 
-
-
-

Returns

-

A GPtrArray of all icons for this component.

-

[element-type AsIcon][transfer none]

-
-
-
-
-

as_component_get_icon_by_size ()

-
AsIcon *
-as_component_get_icon_by_size (AsComponent *cpt,
-                               guint width,
-                               guint height);
-

Gets an icon matching the size constraints. -The icons are not filtered by type, and the first icon -which matches the size is returned. -If you want more control over which icons you use for displaying, -use the as_component_get_icons() function to get a list of all icons.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

an AsComponent instance

 

width

The icon width in pixels.

 

height

the icon height in pixels.

 
-
-
-

Returns

-

An icon matching the given width/height, or NULL if not found.

-

[transfer none]

-
-
-
-
-

as_component_add_icon ()

-
void
-as_component_add_icon (AsComponent *cpt,
-                       AsIcon *icon);
-

Add an icon to this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent instance

 

icon

the valid AsIcon instance to add.

 
-
-
-
-
-

as_component_add_provided ()

-
void
-as_component_add_provided (AsComponent *cpt,
-                           AsProvided *prov);
-

Add a set of provided items to this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

prov

a AsProvided instance.

 
-
-

Since: 0.6.2

-
-
-
-

as_component_get_provided_for_kind ()

-
AsProvided *
-as_component_get_provided_for_kind (AsComponent *cpt,
-                                    AsProvidedKind kind);
-

Get an AsProvided object for the given interface type, -containing information about the public interfaces (mimetypes, firmware, DBus services, ...) -this component provides.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

kind

kind of the provided item, e.g. AS_PROVIDED_KIND_MIMETYPE

 
-
-
-

Returns

-

AsProvided containing the items this component provides, or NULL.

-

[transfer none]

-
-
-
-
-

as_component_get_provided ()

-
GList *
-as_component_get_provided (AsComponent *cpt);
-

Get a list of AsProvided objects associated with this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

A list of AsProvided objects.

-

[transfer container][element-type AsProvided]

-
-
-
-
-

as_component_get_url ()

-
const gchar *
-as_component_get_url (AsComponent *cpt,
-                      AsUrlKind url_kind);
-

Gets a URL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

url_kind

the URL kind, e.g. AS_URL_KIND_HOMEPAGE.

 
-
-
-

Returns

-

string, or NULL if unset.

-

[nullable]

-
-

Since: 0.6.2

-
-
-
-

as_component_add_url ()

-
void
-as_component_add_url (AsComponent *cpt,
-                      AsUrlKind url_kind,
-                      const gchar *url);
-

Adds some URL data to the component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

url_kind

the URL kind, e.g. AS_URL_KIND_HOMEPAGE

 

url

the full URL.

 
-
-

Since: 0.6.2

-
-
-
-

as_component_get_releases ()

-
GPtrArray *
-as_component_get_releases (AsComponent *cpt);
-

Get an array of the AsRelease items this component -provides.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

A list of releases.

-

[element-type AsRelease][transfer none]

-
-
-
-
-

as_component_add_release ()

-
void
-as_component_add_release (AsComponent *cpt,
-                          AsRelease *release);
-

Add an AsRelease to this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

release

The AsRelease to add

 
-
-
-
-
-

as_component_get_extends ()

-
GPtrArray *
-as_component_get_extends (AsComponent *cpt);
-

Returns a string list of IDs of components which -are extended by this addon.

-

See as_component_get_extends() for the reverse.

-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance.

 
-
-
-

Returns

-

A GPtrArray or NULL if not set.

-

[element-type utf8][transfer none]

-
-

Since: 0.7.0

-
-
-
-

as_component_add_extends ()

-
void
-as_component_add_extends (AsComponent *cpt,
-                          const gchar *cpt_id);
-

Add a reference to the extended component

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

cpt_id

The id of a component which is extended by this component

 
-
-

Since: 0.7.0

-
-
-
-

as_component_get_extensions ()

-
GPtrArray *
-as_component_get_extensions (AsComponent *cpt);
-

Returns a string list of IDs of components which -are addons extending this component in functionality.

-

This is the reverse of as_component_get_extends()

-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance.

 
-
-
-

Returns

-

A GPtrArray or NULL if not set.

-

[element-type utf8][transfer none]

-
-

Since: 0.9.2

-
-
-
-

as_component_add_extension ()

-
void
-as_component_add_extension (AsComponent *cpt,
-                            const gchar *cpt_id);
-

Add a reference to the extension enhancing this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

cpt_id

The id of a component extending this component.

 
-
-

Since: 0.9.2

-
-
-
-

as_component_get_languages ()

-
GList *
-as_component_get_languages (AsComponent *cpt);
-

Get a list of all languages.

-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance.

 
-
-
-

Returns

-

list of locales.

-

[transfer container][element-type utf8]

-
-

Since: 0.7.0

-
-
-
-

as_component_get_language ()

-
gint
-as_component_get_language (AsComponent *cpt,
-                           const gchar *locale);
-

Gets the translation coverage in percent for a specific locale

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent instance.

 

locale

the locale, or NULL. e.g. "en_GB".

[nullable]
-
-
-

Returns

-

a percentage value, -1 if locale was not found

-
-

Since: 0.7.0

-
-
-
-

as_component_add_language ()

-
void
-as_component_add_language (AsComponent *cpt,
-                           const gchar *locale,
-                           gint percentage);
-

Adds a language to the component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

an AsComponent instance.

 

locale

the locale, or NULL. e.g. "en_GB".

[nullable]

percentage

the percentage completion of the translation, 0 for locales with unknown amount of translation

 
-
-

Since: 0.7.0

-
-
-
-

as_component_get_translations ()

-
GPtrArray *
-as_component_get_translations (AsComponent *cpt);
-

Get a GPtrArray of AsTranslation objects describing the -translation systems and translation-ids (e.g. Gettext domains) used -by this software component.

-

Only set for metainfo files.

-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance.

 
-
-
-

Returns

-

An array of AsTranslation objects.

-

[transfer none][element-type AsTranslation]

-
-

Since: 0.9.2

-
-
-
-

as_component_add_translation ()

-
void
-as_component_add_translation (AsComponent *cpt,
-                              AsTranslation *tr);
-

Assign an AsTranslation object describing the translation system used -by this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent instance.

 

tr

an AsTranslation instance.

 
-
-

Since: 0.9.2

-
-
-
-

as_component_has_bundle ()

-
gboolean
-as_component_has_bundle (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

TRUE if this component has a bundle-id associated.

-
-
-
-
-

as_component_get_bundle_id ()

-
const gchar *
-as_component_get_bundle_id (AsComponent *cpt,
-                            AsBundleKind bundle_kind);
-

Gets a bundle identifier string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

bundle_kind

the bundle kind, e.g. AS_BUNDLE_KIND_LIMBA.

 
-
-
-

Returns

-

string, or NULL if unset.

-

[nullable]

-
-

Since: 0.8.0

-
-
-
-

as_component_add_bundle_id ()

-
void
-as_component_add_bundle_id (AsComponent *cpt,
-                            AsBundleKind bundle_kind,
-                            const gchar *id);
-

Adds a bundle identifier to the component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

bundle_kind

the URL kind, e.g. AS_BUNDLE_KIND_LIMBA

 

id

The bundle identification string

 
-
-

Since: 0.8.0

-
-
-
-

Types and Values

-
-

AS_TYPE_COMPONENT

-
#define AS_TYPE_COMPONENT (as_component_get_type ())
-
-

-

-
-
-
-

struct AsComponentClass

-
struct AsComponentClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsComponentKind

-

The type of an AsComponent.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_COMPONENT_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_COMPONENT_KIND_GENERIC

-

A generic (= without specialized type) component

-
 

AS_COMPONENT_KIND_DESKTOP_APP

-

An application with a .desktop-file

-
 

AS_COMPONENT_KIND_FONT

-

A font

-
 

AS_COMPONENT_KIND_CODEC

-

A multimedia codec

-
 

AS_COMPONENT_KIND_INPUTMETHOD

-

An input-method provider

-
 

AS_COMPONENT_KIND_ADDON

-

An extension of existing software, which does not run standalone

-
 

AS_COMPONENT_KIND_FIRMWARE

-

Firmware

-
 
-
-
-
-
-

AsComponent

-
typedef struct _AsComponent AsComponent;
-

-

-
-
-
-

Property Details

-
-

The “categories” property

-
  “categories”               GStrv
-

string array of categories

-

Flags: Read / Write

-
-
-
-

The “description” property

-
  “description”              gchar *
-

the description

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “developer-name” property

-
  “developer-name”           gchar *
-

the developer name

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “icons” property

-
  “icons”                    gpointer
-

hash map of icon urls and sizes

-

[type GList(AsIcon)]

-

Flags: Read

-
-
-
-

The “id” property

-
  “id”                       gchar *
-

the unique identifier

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “keywords” property

-
  “keywords”                 GStrv
-

string array of keywords

-

Flags: Read / Write

-
-
-
-

The “kind” property

-
  “kind”                     AsComponentKind
-

the AsComponentKind of this component

-

Flags: Read / Write

-

Default value: AS_COMPONENT_KIND_UNKNOWN

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

the name

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “pkgnames” property

-
  “pkgnames”                 GStrv
-

string array of packages name

-

Flags: Read / Write

-
-
-
-

The “project-group” property

-
  “project-group”            gchar *
-

the project group

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “project-license” property

-
  “project-license”          gchar *
-

the project license

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “screenshots” property

-
  “screenshots”              GPtrArray *
-

screenshots.

-

Flags: Read

-
-
-
-

The “summary” property

-
  “summary”                  gchar *
-

the summary

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “urls” property

-
  “urls”                     GHashTable *
-

urls.

-

Flags: Read

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsDatabase.html appstream-0.12.0/docs/api/html/AsDatabase.html --- appstream-0.9.4/docs/api/html/AsDatabase.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsDatabase.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,585 +0,0 @@ - - - - -AsDatabase: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsDatabase

-

AsDatabase — Read-only access to the AppStream component database

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsDatabase * - -as_database_new () -
-GQuark - -as_database_error_quark () -
-gboolean - -as_database_open () -
const gchar * - -as_database_get_location () -
-void - -as_database_set_location () -
-GPtrArray * - -as_database_find_components () -
-GPtrArray * - -as_database_get_all_components () -
-AsComponent * - -as_database_get_component_by_id () -
-GPtrArray * - -as_database_get_components_by_provided_item () -
-GPtrArray * - -as_database_get_components_by_kind () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_DATABASE
structAsDatabaseClass
enumAsDatabaseError
#defineAS_DATABASE_ERROR
 AsDatabase
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsDatabase
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object provides access to the Appstream Xapian database of available software components. -You can search for components using various criteria, as well as getting some information -about the data provided by this AppStream database.

-

By default, the global software component cache is used as datasource, unless a different database -is explicitly defined via as_database_set_location().

-

A new cache can be created using the appstreamcli(1) utility.

-

See also: AsComponent, AsDataPool

-
-
-

Functions

-
-

as_database_new ()

-
AsDatabase *
-as_database_new (void);
-

Creates a new AsDatabase.

-
-

Returns

-

a AsDatabase.

-

[transfer full]

-
-
-
-
-

as_database_error_quark ()

-
GQuark
-as_database_error_quark (void);
-
-

Returns

-

An error quark.

-
-
-
-
-

as_database_open ()

-
gboolean
-as_database_open (AsDatabase *db,
-                  GError **error);
-

Open the current AppStream metadata cache for reading.

-
-

Parameters

-
----- - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

error

A GError or NULL.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-
-
-
-

as_database_get_location ()

-
const gchar *
-as_database_get_location (AsDatabase *db);
-

Get the current path of the AppStream database we use.

-
-

Parameters

-
----- - - - - - -

db

An instance of AsDatabase.

 
-
-
-
-
-

as_database_set_location ()

-
void
-as_database_set_location (AsDatabase *db,
-                          const gchar *dir);
-

Set the location of the AppStream database we use.

-
-

Parameters

-
----- - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

dir

The directory of the Xapian database.

 
-
-
-
-
-

as_database_find_components ()

-
GPtrArray *
-as_database_find_components (AsDatabase *db,
-                             const gchar *term,
-                             const gchar *cats_str,
-                             GError **error);
-

Find components in the AppStream database, which match a given term. -You can limit the search to a specific set of categories by setting the categories string to -a semicolon-separated list of lower-cased category names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

term

a search-term to look for.

[nullable]

cats_str

A semicolon-delimited list of lower-cased category names, e.g. "science;development".

[nullable]

error

A GError or NULL.

 
-
-
-

Returns

-

an array of AsComponent objects which have been found.

-

[element-type AsComponent][transfer full]

-
-
-
-
-

as_database_get_all_components ()

-
GPtrArray *
-as_database_get_all_components (AsDatabase *db,
-                                GError **error);
-

Dump a list of all software components found in the database.

-
-

Parameters

-
----- - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

error

A GError or NULL.

 
-
-
-

Returns

-

an array of AsComponent objects.

-

[element-type AsComponent][transfer full]

-
-
-
-
-

as_database_get_component_by_id ()

-
AsComponent *
-as_database_get_component_by_id (AsDatabase *db,
-                                 const gchar *cid,
-                                 GError **error);
-

Get a component by its AppStream-ID.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

cid

the ID of the component, e.g. "org.kde.gwenview.desktop"

 

error

A GError or NULL.

 
-
-
-

Returns

-

an AsComponent or NULL if none was found.

-

[transfer full]

-
-
-
-
-

as_database_get_components_by_provided_item ()

-
GPtrArray *
-as_database_get_components_by_provided_item
-                               (AsDatabase *db,
-                                AsProvidedKind kind,
-                                const gchar *item,
-                                GError **error);
-

Find components in the Appstream database.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

kind

an AsProvidesKind

 

item

the name of the provided item.

 

error

A GError or NULL.

 
-
-
-

Returns

-

an array of AsComponent objects which have been found, NULL on error.

-

[element-type AsComponent][transfer full]

-
-
-
-
-

as_database_get_components_by_kind ()

-
GPtrArray *
-as_database_get_components_by_kind (AsDatabase *db,
-                                    AsComponentKind kind,
-                                    GError **error);
-

Return a list of all components in the database which match a certain kind.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

kind

an AsComponentKind.

 

error

A GError or NULL.

 
-
-
-

Returns

-

an array of AsComponent objects which have been found, NULL on error.

-

[element-type AsComponent][transfer full]

-
-
-
-
-

Types and Values

-
-

AS_TYPE_DATABASE

-
#define AS_TYPE_DATABASE (as_database_get_type ())
-
-

-

-
-
-
-

struct AsDatabaseClass

-
struct AsDatabaseClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

enum AsDatabaseError

-

A database query error.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

AS_DATABASE_ERROR_FAILED

-

Generic failure

-
 

AS_DATABASE_ERROR_MISSING

-

Database was not found

-
 

AS_DATABASE_ERROR_CLOSED

-

Tried to perform action on a closed database.

-
 

AS_DATABASE_ERROR_TERM_INVALID

-

A query term was invalid.

-
 
-
-
-
-
-

AS_DATABASE_ERROR

-
#define AS_DATABASE_ERROR as_database_error_quark ()
-
-

-

-
-
-
-

AsDatabase

-
typedef struct _AsDatabase AsDatabase;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsDataPool.html appstream-0.12.0/docs/api/html/AsDataPool.html --- appstream-0.9.4/docs/api/html/AsDataPool.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsDataPool.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,461 +0,0 @@ - - - - -AsDataPool: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsDataPool

-

AsDataPool — Collect and temporarily store metadata from different sources

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GQuark - -as_data_pool_error_quark () -
-AsDataPool * - -as_data_pool_new () -
const gchar * - -as_data_pool_get_locale () -
-void - -as_data_pool_set_locale () -
-gboolean - -as_data_pool_update () -
-GList * - -as_data_pool_get_components () -
-AsComponent * - -as_data_pool_get_component_by_id () -
-GPtrArray * - -as_data_pool_get_metadata_locations () -
-void - -as_data_pool_set_metadata_locations () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_DATA_POOL
structAsDataPoolClass
enumAsDataPoolError
#defineAS_DATA_POOL_ERROR
 AsDataPool
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsDataPool
-
-
-
-

Description

-

This class contains a temporary pool of metadata which has been collected from different -sources on the system. -It can directly be used, but usually it is accessed through a AsDatabase instance. -This class is used by internally by the cache builder, but might be useful for others.

-

See also: AsDatabase

-
-
-

Functions

-
-

as_data_pool_error_quark ()

-
GQuark
-as_data_pool_error_quark (void);
-
-

Returns

-

An error quark.

-
-
-
-
-

as_data_pool_new ()

-
AsDataPool *
-as_data_pool_new (void);
-

Creates a new AsDataPool.

-
-

Returns

-

a AsDataPool.

-

[transfer full]

-
-
-
-
-

as_data_pool_get_locale ()

-
const gchar *
-as_data_pool_get_locale (AsDataPool *dpool);
-

Gets the currently used locale.

-
-

Parameters

-
----- - - - - - -

dpool

An instance of AsDataPool.

 
-
-
-

Returns

-

Locale used for metadata parsing.

-
-
-
-
-

as_data_pool_set_locale ()

-
void
-as_data_pool_set_locale (AsDataPool *dpool,
-                         const gchar *locale);
-

Sets the current locale which should be used when parsing metadata.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dpool

An instance of AsDataPool.

 

locale

the locale.

 
-
-
-
-
-

as_data_pool_update ()

-
gboolean
-as_data_pool_update (AsDataPool *dpool,
-                     GError **error);
-

Builds an index of all found components in the watched locations. -The function will try to get as much data into the pool as possible, so even if -the updates completes with FALSE, it might still add components to the pool.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dpool

An instance of AsDataPool.

 

error

A GError or NULL.

 
-
-
-

Returns

-

TRUE if update completed without error.

-
-
-
-
-

as_data_pool_get_components ()

-
GList *
-as_data_pool_get_components (AsDataPool *dpool);
-

Get a list of found components.

-
-

Parameters

-
----- - - - - - -

dpool

An instance of AsDataPool.

 
-
-
-

Returns

-

a list of AsComponent instances, free with g_list_free().

-

[element-type AsComponent][transfer container]

-
-
-
-
-

as_data_pool_get_component_by_id ()

-
AsComponent *
-as_data_pool_get_component_by_id (AsDataPool *dpool,
-                                  const gchar *id);
-

Get a specific component by its ID.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dpool

An instance of AsDataPool.

 

id

The AppStream-ID to look for.

 
-
-
-

Returns

-

An AsComponent.

-

[transfer full]

-
-
-
-
-

as_data_pool_get_metadata_locations ()

-
GPtrArray *
-as_data_pool_get_metadata_locations (AsDataPool *dpool);
-

Return a list of all locations which are searched for metadata.

-
-

Parameters

-
----- - - - - - -

dpool

An instance of AsDataPool.

 
-
-
-

Returns

-

A string-list of watched (absolute) filepaths.

-

[transfer none][element-type utf8]

-
-
-
-
-

as_data_pool_set_metadata_locations ()

-
void
-as_data_pool_set_metadata_locations (AsDataPool *dpool,
-                                     gchar **dirs);
-

Set locations for the data pool to read it's data from. -This is mainly used for testing purposes. Each location should have an -"xmls" and/or "yaml" subdirectory with the actual data as (compressed) -AppStream XML or DEP-11 YAML in it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dpool

An instance of AsDataPool.

 

dirs

a zero-terminated array of data input directories.

[array zero-terminated=1]
-
-
-
-
-

Types and Values

-
-

AS_TYPE_DATA_POOL

-
#define AS_TYPE_DATA_POOL (as_data_pool_get_type ())
-
-

-

-
-
-
-

struct AsDataPoolClass

-
struct AsDataPoolClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

enum AsDataPoolError

-

A metadata pool error.

-
-

Members

-
----- - - - - - -

AS_DATA_POOL_ERROR_FAILED

-

Generic failure

-
 
-
-
-
-
-

AS_DATA_POOL_ERROR

-
#define AS_DATA_POOL_ERROR as_data_pool_error_quark ()
-
-

-

-
-
-
-

AsDataPool

-
typedef struct _AsDataPool AsDataPool;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsDistroDetails.html appstream-0.12.0/docs/api/html/AsDistroDetails.html --- appstream-0.9.4/docs/api/html/AsDistroDetails.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsDistroDetails.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,289 +0,0 @@ - - - - -AsDistroDetails: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsDistroDetails

-

AsDistroDetails — Provides information about the current distribution

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsDistroDetails * - -as_distro_details_new () -
const gchar * - -as_distro_details_get_id () -
const gchar * - -as_distro_details_get_name () -
const gchar * - -as_distro_details_get_version () -
-gchar * - -as_distro_details_get_str () -
-gboolean - -as_distro_details_get_bool () -
-gchar ** - -as_get_icon_repository_paths () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
-gchar *idRead
-gchar *nameRead
-gchar *versionRead
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineAS_TYPE_DISTRO_DETAILS
structAsDistroDetailsClass
 AsDistroDetails
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsDistroDetails
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object abstracts various distribution-specific settings and provides information -about the (Linux) distribution which is currently in use. -It is used internalls to get information about the icon-store or the 3rd-party screenshot -service distributors may want to provide.

-

See also: AsDatabase

-
-
-

Functions

-
-

as_distro_details_new ()

-
AsDistroDetails *
-as_distro_details_new (void);
-

Creates a new instance of AsDistroDetails.

-
-

Returns

-

a AsDistroDetails.

-

[transfer full]

-
-
-
-
-

as_distro_details_get_id ()

-
const gchar *
-as_distro_details_get_id (AsDistroDetails *distro);
-
-
-
-

as_distro_details_get_name ()

-
const gchar *
-as_distro_details_get_name (AsDistroDetails *distro);
-
-
-
-

as_distro_details_get_version ()

-
const gchar *
-as_distro_details_get_version (AsDistroDetails *distro);
-
-
-
-

as_distro_details_get_str ()

-
gchar *
-as_distro_details_get_str (AsDistroDetails *distro,
-                           const gchar *key);
-
-
-
-

as_distro_details_get_bool ()

-
gboolean
-as_distro_details_get_bool (AsDistroDetails *distro,
-                            const gchar *key);
-
-
-
-

as_get_icon_repository_paths ()

-
gchar **
-as_get_icon_repository_paths (void);
-

Returns list of icon-paths for software-center applications to use. -Icons of software (even if it is not installed) are stored in these -locations.

-
-

Returns

-

A NULL-terminated array of paths.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

AS_TYPE_DISTRO_DETAILS

-
#define AS_TYPE_DISTRO_DETAILS (as_distro_details_get_type ())
-
-

-

-
-
-
-

struct AsDistroDetailsClass

-
struct AsDistroDetailsClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

AsDistroDetails

-
typedef struct _AsDistroDetails AsDistroDetails;
-

-

-
-
-
-

Property Details

-
-

The “id” property

-
  “id”                       gchar *
-

id.

-

Flags: Read

-

Default value: NULL

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

name.

-

Flags: Read

-

Default value: NULL

-
-
-
-

The “version” property

-
  “version”                  gchar *
-

version.

-

Flags: Read

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsIcon.html appstream-0.12.0/docs/api/html/AsIcon.html --- appstream-0.9.4/docs/api/html/AsIcon.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsIcon.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,689 +0,0 @@ - - - - -AsIcon: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsIcon

-

AsIcon — Describes an icon of an application.

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsIconKind - -as_icon_kind_from_string () -
const gchar * - -as_icon_kind_to_string () -
-AsIcon * - -as_icon_new () -
-AsIconKind - -as_icon_get_kind () -
-void - -as_icon_set_kind () -
const gchar * - -as_icon_get_name () -
-void - -as_icon_set_name () -
const gchar * - -as_icon_get_url () -
-void - -as_icon_set_url () -
const gchar * - -as_icon_get_filename () -
-void - -as_icon_set_filename () -
-guint - -as_icon_get_width () -
-void - -as_icon_set_width () -
-guint - -as_icon_get_height () -
-void - -as_icon_set_height () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_ICON
structAsIconClass
enumAsIconKind
 AsIcon
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsIcon
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-
-
-

Functions

-
-

as_icon_kind_from_string ()

-
AsIconKind
-as_icon_kind_from_string (const gchar *kind_str);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind_str

the string.

 
-
-
-

Returns

-

a AsIconKind or AS_ICON_KIND_UNKNOWN for unknown

-
-
-
-
-

as_icon_kind_to_string ()

-
const gchar *
-as_icon_kind_to_string (AsIconKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsIconKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_icon_new ()

-
AsIcon *
-as_icon_new (void);
-

Creates a new AsIcon.

-
-

Returns

-

a AsIcon.

-

[transfer full]

-
-
-
-
-

as_icon_get_kind ()

-
AsIconKind
-as_icon_get_kind (AsIcon *icon);
-

Gets the icon kind.

-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

the AsIconKind

-
-
-
-
-

as_icon_set_kind ()

-
void
-as_icon_set_kind (AsIcon *icon,
-                  AsIconKind kind);
-

Sets the icon kind.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

kind

the AsIconKind, e.g. AS_ICON_KIND_CACHED.

 
-
-
-
-
-

as_icon_get_name ()

-
const gchar *
-as_icon_get_name (AsIcon *icon);
-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

the stock name of the icon. In case the icon is not of kind -"stock", the basename of the icon filename or URL is returned.

-
-
-
-
-

as_icon_set_name ()

-
void
-as_icon_set_name (AsIcon *icon,
-                  const gchar *name);
-

Sets the stock name or basename to use for the icon.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

name

the icon stock name, e.g. "gwenview"

 
-
-
-
-
-

as_icon_get_url ()

-
const gchar *
-as_icon_get_url (AsIcon *icon);
-

Gets the icon URL, pointing at a remote location. HTTPS and FTP urls are allowed. -This property is only set for icons of type AS_ICON_KIND_REMOTE

-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

the URL

-
-
-
-
-

as_icon_set_url ()

-
void
-as_icon_set_url (AsIcon *icon,
-                 const gchar *url);
-

Sets the icon URL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

url

the new icon URL.

 
-
-
-
-
-

as_icon_get_filename ()

-
const gchar *
-as_icon_get_filename (AsIcon *icon);
-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

The absolute path for the icon on disk. -This is only set for icons of kind AS_ICON_KIND_LOCAL or -AS_ICON_KIND_CACHED.

-
-
-
-
-

as_icon_set_filename ()

-
void
-as_icon_set_filename (AsIcon *icon,
-                      const gchar *filename);
-

Sets the icon absolute filename.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

filename

the new icon URL.

 
-
-
-
-
-

as_icon_get_width ()

-
guint
-as_icon_get_width (AsIcon *icon);
-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

The icon width in pixels, or 0 if unknown.

-
-
-
-
-

as_icon_set_width ()

-
void
-as_icon_set_width (AsIcon *icon,
-                   guint width);
-

Sets the icon width.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

width

the width in pixels.

 
-
-
-
-
-

as_icon_get_height ()

-
guint
-as_icon_get_height (AsIcon *icon);
-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

The icon height in pixels, or 0 if unknown.

-
-
-
-
-

as_icon_set_height ()

-
void
-as_icon_set_height (AsIcon *icon,
-                    guint height);
-

Sets the icon height.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

height

the height in pixels.

 
-
-
-
-
-

Types and Values

-
-

AS_TYPE_ICON

-
#define AS_TYPE_ICON (as_icon_get_type ())
-
-

-

-
-
-
-

struct AsIconClass

-
struct AsIconClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsIconKind

-

The icon type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_ICON_KIND_UNKNOWN

-

Unknown icon kind

-
 

AS_ICON_KIND_CACHED

-

Icon in the internal caches

-
 

AS_ICON_KIND_STOCK

-

Stock icon name

-
 

AS_ICON_KIND_LOCAL

-

Local icon name

-
 

AS_ICON_KIND_REMOTE

-

Remote icon URL

-
 
-
-
-
-
-

AsIcon

-
typedef struct _AsIcon AsIcon;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsImage.html appstream-0.12.0/docs/api/html/AsImage.html --- appstream-0.9.4/docs/api/html/AsImage.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsImage.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,533 +0,0 @@ - - - - -AsImage: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsImage

-

AsImage — Object representing a single image used in a screenshot.

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsImageKind - -as_image_kind_from_string () -
const gchar * - -as_image_kind_to_string () -
-AsImage * - -as_image_new () -
const gchar * - -as_image_get_url () -
-void - -as_image_set_url () -
-guint - -as_image_get_width () -
-void - -as_image_set_width () -
-guint - -as_image_get_height () -
-void - -as_image_set_height () -
-AsImageKind - -as_image_get_kind () -
-void - -as_image_set_kind () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_IMAGE
structAsImageClass
enumAsImageKind
 AsImage
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsImage
-
-
-
-

Description

-

Screenshot may have multiple versions of an image in different resolutions -or aspect ratios. This object allows access to the location and size of a -single image.

-

See also: AsScreenshot

-
-
-

Functions

-
-

as_image_kind_from_string ()

-
AsImageKind
-as_image_kind_from_string (const gchar *kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind

the string.

 
-
-
-

Returns

-

a AsImageKind, or AS_IMAGE_KIND_UNKNOWN for unknown.

-

[transfer full]

-
-
-
-
-

as_image_kind_to_string ()

-
const gchar *
-as_image_kind_to_string (AsImageKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsImageKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_image_new ()

-
AsImage *
-as_image_new (void);
-

Creates a new AsImage.

-
-

Returns

-

a AsImage.

-

[transfer full]

-
-
-
-
-

as_image_get_url ()

-
const gchar *
-as_image_get_url (AsImage *image);
-

Gets the full qualified URL for the image, usually pointing at some mirror.

-
-

Parameters

-
----- - - - - - -

image

a AsImage instance.

 
-
-
-

Returns

-

URL

-
-
-
-
-

as_image_set_url ()

-
void
-as_image_set_url (AsImage *image,
-                  const gchar *url);
-

Sets the fully-qualified mirror URL to use for the image.

-
-

Parameters

-
----- - - - - - - - - - - - - -

image

a AsImage instance.

 

url

the URL.

 
-
-
-
-
-

as_image_get_width ()

-
guint
-as_image_get_width (AsImage *image);
-

Gets the image width.

-
-

Parameters

-
----- - - - - - -

image

a AsImage instance.

 
-
-
-

Returns

-

width in pixels

-
-
-
-
-

as_image_set_width ()

-
void
-as_image_set_width (AsImage *image,
-                    guint width);
-

Sets the image width.

-
-

Parameters

-
----- - - - - - - - - - - - - -

image

a AsImage instance.

 

width

the width in pixels.

 
-
-
-
-
-

as_image_get_height ()

-
guint
-as_image_get_height (AsImage *image);
-

Gets the image height.

-
-

Parameters

-
----- - - - - - -

image

a AsImage instance.

 
-
-
-

Returns

-

height in pixels

-
-
-
-
-

as_image_set_height ()

-
void
-as_image_set_height (AsImage *image,
-                     guint height);
-

Sets the image height.

-
-

Parameters

-
----- - - - - - - - - - - - - -

image

a AsImage instance.

 

height

the height in pixels.

 
-
-
-
-
-

as_image_get_kind ()

-
AsImageKind
-as_image_get_kind (AsImage *image);
-

Gets the image kind.

-
-

Parameters

-
----- - - - - - -

image

a AsImage instance.

 
-
-
-

Returns

-

the AsImageKind

-
-
-
-
-

as_image_set_kind ()

-
void
-as_image_set_kind (AsImage *image,
-                   AsImageKind kind);
-

Sets the image kind.

-
-

Parameters

-
----- - - - - - - - - - - - - -

image

a AsImage instance.

 

kind

the AsImageKind, e.g. AS_IMAGE_KIND_THUMBNAIL.

 
-
-
-
-
-

Types and Values

-
-

AS_TYPE_IMAGE

-
#define AS_TYPE_IMAGE (as_image_get_type ())
-
-

-

-
-
-
-

struct AsImageClass

-
struct AsImageClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsImageKind

-

The image type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_IMAGE_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_IMAGE_KIND_SOURCE

-

The source image at full resolution

-
 

AS_IMAGE_KIND_THUMBNAIL

-

A thumbnail at reduced resolution

-
 
-
-
-
-
-

AsImage

-
typedef struct _AsImage AsImage;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsMenuParser.html appstream-0.12.0/docs/api/html/AsMenuParser.html --- appstream-0.9.4/docs/api/html/AsMenuParser.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsMenuParser.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,318 +0,0 @@ - - - - -AsMenuParser: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsMenuParser

-

AsMenuParser — Parser for XDG menu files designed for software-centers

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsMenuParser * - -as_menu_parser_new () -
-AsMenuParser * - -as_menu_parser_new_from_file () -
-GList * - -as_menu_parser_parse () -
-gboolean - -as_menu_parser_get_update_category_data () -
-void - -as_menu_parser_set_update_category_data () -
-GList * - -as_get_system_categories () -
-
-
-

Properties

-
----- - - - - - -
gbooleanupdate-category-dataRead / Write
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineAS_TYPE_MENU_PARSER
structAsMenuParserClass
 AsMenuParser
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsMenuParser
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object parses an XDG menu file and returns a set of AsCategory objects which -can be used by software-centers to group the applications they show. -By default, it loads a common set of categories from an internal menu file. -A custom menu file may be specified using the alternative class constructor.

-

See also: AsCategory

-
-
-

Functions

-
-

as_menu_parser_new ()

-
AsMenuParser *
-as_menu_parser_new (void);
-

Creates a new AsMenuParser.

-
-

Returns

-

an AsMenuParser.

-

[transfer full]

-
-
-
-
-

as_menu_parser_new_from_file ()

-
AsMenuParser *
-as_menu_parser_new_from_file (const gchar *menu_file);
-

Creates a new AsMenuParser using a custom XDG menu XML file.

-
-

Parameters

-
----- - - - - - -

menu_file

The menu-file to parse.

 
-
-
-

Returns

-

an AsMenuParser.

-

[transfer full]

-
-
-
-
-

as_menu_parser_parse ()

-
GList *
-as_menu_parser_parse (AsMenuParser *mp);
-

Parse the menu file

-
-

Parameters

-
----- - - - - - -

mp

An instance of AsMenuParser.

 
-
-
-

Returns

-

GList of AsCategory objects found in the menu, or NULL if there was an error.

-

[element-type AsCategory][transfer full]

-
-
-
-
-

as_menu_parser_get_update_category_data ()

-
gboolean
-as_menu_parser_get_update_category_data
-                               (AsMenuParser *mp);
-
-

Parameters

-
----- - - - - - -

mp

An instance of AsMenuParser.

 
-
-
-
-
-

as_menu_parser_set_update_category_data ()

-
void
-as_menu_parser_set_update_category_data
-                               (AsMenuParser *mp,
-                                gboolean value);
-
-

Parameters

-
----- - - - - - -

mp

An instance of AsMenuParser.

 
-
-
-
-
-

as_get_system_categories ()

-
GList *
-as_get_system_categories (void);
-

Get a GList of the default AppStream categories

-
-

Returns

-

GList of AsCategory objects.

-

[element-type AsCategory][transfer full]

-
-
-
-
-

Types and Values

-
-

AS_TYPE_MENU_PARSER

-
#define AS_TYPE_MENU_PARSER (as_menu_parser_get_type ())
-
-

-

-
-
-
-

struct AsMenuParserClass

-
struct AsMenuParserClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

AsMenuParser

-
typedef struct _AsMenuParser AsMenuParser;
-

-

-
-
-
-

Property Details

-
-

The “update-category-data” property

-
  “update-category-data”     gboolean
-

update-category-data.

-

Flags: Read / Write

-

Default value: FALSE

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsMetadata.html appstream-0.12.0/docs/api/html/AsMetadata.html --- appstream-0.9.4/docs/api/html/AsMetadata.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsMetadata.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,1085 +0,0 @@ - - - - -AsMetadata: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsMetadata

-

AsMetadata — Parser for AppStream metadata

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsMetadata * - -as_metadata_new () -
-GQuark - -as_metadata_error_quark () -
-void - -as_metadata_parse_file () -
-void - -as_metadata_parse_xml () -
-void - -as_metadata_parse_yaml () -
-AsComponent * - -as_metadata_get_component () -
-GPtrArray * - -as_metadata_get_components () -
-void - -as_metadata_clear_components () -
-void - -as_metadata_add_component () -
-gchar * - -as_metadata_component_to_upstream_xml () -
-void - -as_metadata_save_upstream_xml () -
-gchar * - -as_metadata_components_to_distro_xml () -
-void - -as_metadata_save_distro_xml () -
-gchar * - -as_metadata_components_to_distro_yaml () -
-void - -as_metadata_save_distro_yaml () -
-void - -as_metadata_set_locale () -
const gchar * - -as_metadata_get_locale () -
const gchar * - -as_metadata_get_origin () -
-void - -as_metadata_set_origin () -
-gboolean - -as_metadata_get_update_existing () -
-void - -as_metadata_set_update_existing () -
-gboolean - -as_metadata_get_write_header () -
-void - -as_metadata_set_write_header () -
-void - -as_metadata_set_parser_mode () -
-AsParserMode - -as_metadata_get_parser_mode () -
const gchar * - -as_metadata_get_architecture () -
-void - -as_metadata_set_architecture () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_METADATA
structAsMetadataClass
enumAsParserMode
enumAsMetadataError
#defineAS_METADATA_ERROR
 AsMetadata
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsMetadata
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object parses AppStream metadata, including AppStream -upstream metadata, which is defined by upstream projects. -It returns an AsComponent of the data.

-

See also: AsComponent, AsDatabase

-
-
-

Functions

-
-

as_metadata_new ()

-
AsMetadata *
-as_metadata_new (void);
-

Creates a new AsMetadata.

-
-

Returns

-

a AsMetadata.

-

[transfer full]

-
-
-
-
-

as_metadata_error_quark ()

-
GQuark
-as_metadata_error_quark (void);
-
-

Returns

-

An error quark.

-
-
-
-
-

as_metadata_parse_file ()

-
void
-as_metadata_parse_file (AsMetadata *metad,
-                        GFile *file,
-                        GError **error);
-

Parses an AppStream upstream metadata file.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

metad

A valid AsMetadata instance

 

file

GFile for the upstream metadata

 

error

A GError or NULL.

 
-
-
-
-
-

as_metadata_parse_xml ()

-
void
-as_metadata_parse_xml (AsMetadata *metad,
-                       const gchar *data,
-                       GError **error);
-

Parses AppStream XML metadata.

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

A valid AsMetadata instance

 

data

XML data describing one or more software components.

 
-
-
-
-
-

as_metadata_parse_yaml ()

-
void
-as_metadata_parse_yaml (AsMetadata *metad,
-                        const gchar *data,
-                        GError **error);
-

Parses AppStream YAML metadata.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

metad

A valid AsMetadata instance

 

data

YAML data describing one or more software components.

 

error

A GError or NULL.

 
-
-
-
-
-

as_metadata_get_component ()

-
AsComponent *
-as_metadata_get_component (AsMetadata *metad);
-

Gets the AsComponent which has been parsed from the XML. -If the AppStream XML contained multiple components, return the first -component that has been parsed.

-
-

Parameters

-
----- - - - - - -

metad

a AsMetadata instance.

 
-
-
-

Returns

-

An AsComponent or NULL.

-

[transfer none]

-
-
-
-
-

as_metadata_get_components ()

-
GPtrArray *
-as_metadata_get_components (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

a AsMetadata instance.

 
-
-
-

Returns

-

A GPtrArray of all parsed components.

-

[transfer none][element-type AsComponent]

-
-
-
-
-

as_metadata_clear_components ()

-
void
-as_metadata_clear_components (AsMetadata *metad);
-
-
-
-

as_metadata_add_component ()

-
void
-as_metadata_add_component (AsMetadata *metad,
-                           AsComponent *cpt);
-

Add an AsComponent to the list of components. -This can be used to add multiple components in order to -produce a distro-XML AppStream metadata file.

-
-
-
-

as_metadata_component_to_upstream_xml ()

-
gchar *
-as_metadata_component_to_upstream_xml (AsMetadata *metad);
-

Convert an AsComponent to upstream XML. -(The amount of localization included in the metadata depends on how the AsComponent -was initially loaded)

-

The first AsComponent added to the internal list will be transformed. -In case no component is present, NULL is returned.

-
-

Returns

-

A string containing the XML. Free with g_free().

-

[transfer full]

-
-
-
-
-

as_metadata_save_upstream_xml ()

-
void
-as_metadata_save_upstream_xml (AsMetadata *metad,
-                               const gchar *fname,
-                               GError **error);
-

Serialize AsComponent instance to XML and save it to file. -An existing file at the same location will be overridden.

-
-

Parameters

-
----- - - - - - -

fname

The filename for the new XML file.

 
-
-
-
-
-

as_metadata_components_to_distro_xml ()

-
gchar *
-as_metadata_components_to_distro_xml (AsMetadata *metad);
-

Serialize all AsComponent instances into AppStream -distro-XML data. -NULL is returned if there is nothing to serialize.

-
-

Returns

-

A string containing the XML. Free with g_free().

-

[transfer full]

-
-
-
-
-

as_metadata_save_distro_xml ()

-
void
-as_metadata_save_distro_xml (AsMetadata *metad,
-                             const gchar *fname,
-                             GError **error);
-

Serialize all AsComponent instances to XML and save the data to a file. -An existing file at the same location will be overridden.

-
-

Parameters

-
----- - - - - - -

fname

The filename for the new XML file.

 
-
-
-
-
-

as_metadata_components_to_distro_yaml ()

-
gchar *
-as_metadata_components_to_distro_yaml (AsMetadata *metad);
-

Serialize all AsComponent instances into AppStream DEP-11 -distro-YAML data. -NULL is returned if there is nothing to serialize.

-
-

Returns

-

A string containing the YAML markup. Free with g_free().

-

[transfer full]

-
-
-
-
-

as_metadata_save_distro_yaml ()

-
void
-as_metadata_save_distro_yaml (AsMetadata *metad,
-                              const gchar *fname,
-                              GError **error);
-

Serialize all AsComponent instances to XML and save the data to a file. -An existing file at the same location will be overridden.

-
-

Parameters

-
----- - - - - - -

fname

The filename for the new YAML file.

 
-
-
-
-
-

as_metadata_set_locale ()

-
void
-as_metadata_set_locale (AsMetadata *metad,
-                        const gchar *locale);
-

Sets the locale which should be read when processing metadata. -All other locales are ignored, which increases parsing speed and -reduces memory usage. -If you set the locale to "ALL", all locales will be read.

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

a AsMetadata instance.

 

locale

the locale.

 
-
-
-
-
-

as_metadata_get_locale ()

-
const gchar *
-as_metadata_get_locale (AsMetadata *metad);
-

Gets the current active locale for parsing metadata, -or "ALL" if all locales are read.

-
-

Parameters

-
----- - - - - - -

metad

a AsMetadata instance.

 
-
-
-

Returns

-

Locale used for metadata parsing.

-
-
-
-
-

as_metadata_get_origin ()

-
const gchar *
-as_metadata_get_origin (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

an AsMetadata instance.

 
-
-
-

Returns

-

The origin of AppStream distro metadata

-
-
-
-
-

as_metadata_set_origin ()

-
void
-as_metadata_set_origin (AsMetadata *metad,
-                        const gchar *origin);
-

Set the origin of AppStream distro metadata

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

an AsMetadata instance.

 

origin

the origin of AppStream distro metadata.

 
-
-
-
-
-

as_metadata_get_update_existing ()

-
gboolean
-as_metadata_get_update_existing (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

an AsMetadata instance.

 
-
-
-

Returns

-

Whether existing components should be updates with the parsed data, -instead of creating new ones.

-
-
-
-
-

as_metadata_set_update_existing ()

-
void
-as_metadata_set_update_existing (AsMetadata *metad,
-                                 gboolean update);
-

If set to TRUE, the parser will not create new components but -instead update existing components in the pool with new metadata.

-

NOTE: Right now, this feature is only implemented for metainfo XML parsing!

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

an AsMetadata instance.

 

update

A boolean value.

 
-
-
-
-
-

as_metadata_get_write_header ()

-
gboolean
-as_metadata_get_write_header (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

an AsMetadata instance.

 
-
-
-

Returns

-

Whether we will write a header/root node in distro metadata.

-
-
-
-
-

as_metadata_set_write_header ()

-
void
-as_metadata_set_write_header (AsMetadata *metad,
-                              gboolean wheader);
-

If set to TRUE, tehe metadata writer will omit writing a DEP-11 -header document when in YAML mode, and will not write a root components node -when writing XML data. -Please keep in mind that this will create an invalid DEP-11 YAML AppStream -distro metadata file, and an invalid XML file. -This parameter should only be changed e.g. by the appstream-generator tool.

-

NOTE: Right now, this feature is only implemented for YAML!

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

an AsMetadata instance.

 

wheader

A boolean value.

 
-
-
-
-
-

as_metadata_set_parser_mode ()

-
void
-as_metadata_set_parser_mode (AsMetadata *metad,
-                             AsParserMode mode);
-

Sets the current metadata parsing mode.

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

a AsMetadata instance.

 

mode

the AsParserMode.

 
-
-
-
-
-

as_metadata_get_parser_mode ()

-
AsParserMode
-as_metadata_get_parser_mode (AsMetadata *metad);
-

Gets the current parser mode

-
-

Parameters

-
----- - - - - - -

metad

a AsMetadata instance.

 
-
-
-

Returns

-

an AsParserMode

-
-
-
-
-

as_metadata_get_architecture ()

-
const gchar *
-as_metadata_get_architecture (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

an AsMetadata instance.

 
-
-
-

Returns

-

The architecture of AppStream distro metadata

-
-
-
-
-

as_metadata_set_architecture ()

-
void
-as_metadata_set_architecture (AsMetadata *metad,
-                              const gchar *arch);
-

Set the architecture the components in this metadata belong to.

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

an AsMetadata instance.

 

arch

an architecture string.

 
-
-
-
-
-

Types and Values

-
-

AS_TYPE_METADATA

-
#define AS_TYPE_METADATA (as_metadata_get_type ())
-
-

-

-
-
-
-

struct AsMetadataClass

-
struct AsMetadataClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsParserMode

-

There are a few differences between Appstream's upstream metadata -and the distribution metadata. -The parser mode indicates which style we should process. -Usually you don't want to change this.

-
-

Members

-
----- - - - - - - - - - - - - -

AS_PARSER_MODE_UPSTREAM

-

Parse Appstream upstream metadata

-
 

AS_PARSER_MODE_DISTRO

-

Parse Appstream distribution metadata

-
 
-
-
-
-
-

enum AsMetadataError

-

A metadata processing error.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_METADATA_ERROR_FAILED

-

Generic failure

-
 

AS_METADATA_ERROR_UNEXPECTED_FORMAT_KIND

-

Expected upstream metadata but got distro metadata, or vice versa.

-
 

AS_METADATA_ERROR_NO_COMPONENT

-

We expected a component in the pool, but couldn't find one.

-
 
-
-
-
-
-

AS_METADATA_ERROR

-
#define AS_METADATA_ERROR as_metadata_error_quark ()
-
-

-

-
-
-
-

AsMetadata

-
typedef struct _AsMetadata AsMetadata;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsProvided.html appstream-0.12.0/docs/api/html/AsProvided.html --- appstream-0.9.4/docs/api/html/AsProvided.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsProvided.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,530 +0,0 @@ - - - - -AsProvided: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsProvided

-

AsProvided — Description of the provided-items in components

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -as_provided_kind_to_string () -
-AsProvidedKind - -as_provided_kind_from_string () -
const gchar * - -as_provided_kind_to_l10n_string () -
-AsProvided * - -as_provided_new () -
-AsProvidedKind - -as_provided_get_kind () -
-void - -as_provided_set_kind () -
-gchar ** - -as_provided_get_items () -
-void - -as_provided_add_item () -
-gboolean - -as_provided_has_item () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_PROVIDED
structAsProvidedClass
enumAsProvidedKind
 AsProvided
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsProvided
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

Components can provide various items, like libraries, Python-modules, -firmware, binaries, etc. -Functions to work with these items are provided here.

-

See also: AsComponent

-
-
-

Functions

-
-

as_provided_kind_to_string ()

-
const gchar *
-as_provided_kind_to_string (AsProvidedKind kind);
-

Converts the enumerated value to a text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsProvidedKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_provided_kind_from_string ()

-
AsProvidedKind
-as_provided_kind_from_string (const gchar *kind_str);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind_str

the string.

 
-
-
-

Returns

-

a AsProvidedKind or AS_PROVIDED_KIND_UNKNOWN for unknown

-
-
-
-
-

as_provided_kind_to_l10n_string ()

-
const gchar *
-as_provided_kind_to_l10n_string (AsProvidedKind kind);
-

Converts the enumerated value to a localized text representation, -using the plural forms (e.g. "Libraries" instead of "Library").

-

This can be useful when displaying provided items in GUI dialogs.

-
-

Parameters

-
----- - - - - - -

kind

the AsProvidedKind.

 
-
-
-

Returns

-

Pluralized, l10n string version of kind -

-
-
-
-
-

as_provided_new ()

-
AsProvided *
-as_provided_new (void);
-

Creates a new AsProvided.

-
-

Returns

-

a AsProvided.

-

[transfer full]

-
-
-
-
-

as_provided_get_kind ()

-
AsProvidedKind
-as_provided_get_kind (AsProvided *prov);
-

The kind of items this AsProvided object stores.

-
-

Parameters

-
----- - - - - - -

prov

a AsProvided instance.

 
-
-
-

Returns

-

an enum of type AsProvidedKind

-
-
-
-
-

as_provided_set_kind ()

-
void
-as_provided_set_kind (AsProvided *prov,
-                      AsProvidedKind kind);
-

Set the kind of items this AsProvided object stores.

-
-

Parameters

-
----- - - - - - - - - - - - - -

prov

a AsProvided instance.

 

kind

the new AsProvidedKind

 
-
-
-
-
-

as_provided_get_items ()

-
gchar **
-as_provided_get_items (AsProvided *prov);
-

Get an array of provided data.

-
-

Parameters

-
----- - - - - - -

prov

a AsProvided instance.

 
-
-
-

Returns

-

An utf-8 array of provided items, free with g_free().

-

[transfer container]

-
-
-
-
-

as_provided_add_item ()

-
void
-as_provided_add_item (AsProvided *prov,
-                      const gchar *item);
-

Add a new provided item.

-
-

Parameters

-
----- - - - - - -

prov

a AsProvided instance.

 
-
-
-
-
-

as_provided_has_item ()

-
gboolean
-as_provided_has_item (AsProvided *prov,
-                      const gchar *item);
-

Check if the current AsProvided contains an item -of the given name.

-
-

Parameters

-
----- - - - - - - - - - - - - -

prov

a AsProvided instance.

 

item

the name of a provided item, e.g. "audio/x-vorbis" (in case the provided kind is a mimetype)

 
-
-
-

Returns

-

TRUE if found.

-
-
-
-
-

Types and Values

-
-

AS_TYPE_PROVIDED

-
#define AS_TYPE_PROVIDED (as_provided_get_type ())
-
-

-

-
-
-
-

struct AsProvidedClass

-
struct AsProvidedClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsProvidedKind

-

Type of the public interface components can provide.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_PROVIDED_KIND_UNKNOWN

-

Unknown kind

-
 

AS_PROVIDED_KIND_LIBRARY

-

A shared library

-
 

AS_PROVIDED_KIND_BINARY

-

A binary installed into a directory in PATH

-
 

AS_PROVIDED_KIND_MIMETYPE

-

Provides a handler for a mimetype

-
 

AS_PROVIDED_KIND_FONT

-

A font

-
 

AS_PROVIDED_KIND_MODALIAS

-

A modalias

-
 

AS_PROVIDED_KIND_PYTHON_2

-

A Python2 module

-
 

AS_PROVIDED_KIND_PYTHON

-

A Python3 module

-
 

AS_PROVIDED_KIND_DBUS_SYSTEM

-

A DBus service name on the system bus.

-
 

AS_PROVIDED_KIND_DBUS_USER

-

A DBus service name on the user/session bus.

-
 

AS_PROVIDED_KIND_FIRMWARE_RUNTIME

-

Firmware flashed at runtime.

-
 

AS_PROVIDED_KIND_FIRMWARE_FLASHED

-

Firmware flashed permanently to the device.

-
 
-
-
-
-
-

AsProvided

-
typedef struct _AsProvided AsProvided;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsRelease.html appstream-0.12.0/docs/api/html/AsRelease.html --- appstream-0.9.4/docs/api/html/AsRelease.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsRelease.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,897 +0,0 @@ - - - - -AsRelease: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsRelease

-

AsRelease — Object representing a single upstream release

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -as_checksum_kind_to_string () -
-AsChecksumKind - -as_checksum_kind_from_string () -
const gchar * - -as_size_kind_to_string () -
-AsSizeKind - -as_size_kind_from_string () -
-AsRelease * - -as_release_new () -
const gchar * - -as_release_get_version () -
-void - -as_release_set_version () -
-guint64 - -as_release_get_timestamp () -
-void - -as_release_set_timestamp () -
const gchar * - -as_release_get_description () -
-void - -as_release_set_description () -
-gchar * - -as_release_get_active_locale () -
-void - -as_release_set_active_locale () -
-GPtrArray * - -as_release_get_locations () -
-void - -as_release_add_location () -
const gchar * - -as_release_get_checksum () -
-void - -as_release_set_checksum () -
-AsUrgencyKind - -as_release_get_urgency () -
-void - -as_release_set_urgency () -
-guint64 - -as_release_get_size () -
-void - -as_release_set_size () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_RELEASE
structAsReleaseClass
enumAsChecksumKind
enumAsSizeKind
 AsRelease
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsRelease
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object represents a single upstream release, typically a minor update. -Releases can contain a localized description of paragraph and list elements -and also have a version number and timestamp.

-

Releases can be automatically generated by parsing upstream ChangeLogs or -.spec files, or can be populated using MetaInfo files.

-

See also: AsComponent

-
-
-

Functions

-
-

as_checksum_kind_to_string ()

-
const gchar *
-as_checksum_kind_to_string (AsChecksumKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsChecksumKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_checksum_kind_from_string ()

-
AsChecksumKind
-as_checksum_kind_from_string (const gchar *kind_str);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind_str

the string.

 
-
-
-

Returns

-

a AsChecksumKind or AS_CHECKSUM_KIND_NONE for unknown

-
-
-
-
-

as_size_kind_to_string ()

-
const gchar *
-as_size_kind_to_string (AsSizeKind size_kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

size_kind

the AsSizeKind.

 
-
-
-

Returns

-

string version of size_kind -

-
-

Since: 0.8.6

-
-
-
-

as_size_kind_from_string ()

-
AsSizeKind
-as_size_kind_from_string (const gchar *size_kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

size_kind

the string.

 
-
-
-

Returns

-

an AsSizeKind or AS_SIZE_KIND_UNKNOWN for unknown

-
-

Since: 0.8.6

-
-
-
-

as_release_new ()

-
AsRelease *
-as_release_new (void);
-

Creates a new AsRelease.

-
-

Returns

-

a AsRelease.

-

[transfer full]

-
-
-
-
-

as_release_get_version ()

-
const gchar *
-as_release_get_version (AsRelease *release);
-

Gets the release version.

-
-

Parameters

-
----- - - - - - -

release

a AsRelease instance.

 
-
-
-

Returns

-

string, or NULL for not set or invalid

-
-
-
-
-

as_release_set_version ()

-
void
-as_release_set_version (AsRelease *release,
-                        const gchar *version);
-

Sets the release version.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance.

 

version

the version string.

 
-
-
-
-
-

as_release_get_timestamp ()

-
guint64
-as_release_get_timestamp (AsRelease *release);
-

Gets the release timestamp.

-
-

Parameters

-
----- - - - - - -

release

a AsRelease instance.

 
-
-
-

Returns

-

timestamp, or 0 for unset

-
-
-
-
-

as_release_set_timestamp ()

-
void
-as_release_set_timestamp (AsRelease *release,
-                          guint64 timestamp);
-

Sets the release timestamp.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance.

 

timestamp

the timestamp value.

 
-
-
-
-
-

as_release_get_description ()

-
const gchar *
-as_release_get_description (AsRelease *release);
-

Gets the release description markup for a given locale.

-
-

Parameters

-
----- - - - - - -

release

a AsRelease instance.

 
-
-
-

Returns

-

markup, or NULL for not set or invalid

-
-
-
-
-

as_release_set_description ()

-
void
-as_release_set_description (AsRelease *release,
-                            const gchar *description,
-                            const gchar *locale);
-

Sets the description release markup.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance.

 

description

the description markup.

 
-
-
-
-
-

as_release_get_active_locale ()

-
gchar *
-as_release_get_active_locale (AsRelease *release);
-

Get the current active locale, which -is used to get localized messages.

-
-
-
-

as_release_set_active_locale ()

-
void
-as_release_set_active_locale (AsRelease *release,
-                              const gchar *locale);
-

Set the current active locale, which -is used to get localized messages. -If the AsComponent linking this AsRelease was fetched -from a localized database, usually only -one locale is available.

-
-
-
-

as_release_get_locations ()

-
GPtrArray *
-as_release_get_locations (AsRelease *release);
-

Gets the release locations, typically URLs.

-
-

Returns

-

list of locations.

-

[transfer none][element-type utf8]

-
-

Since: 0.8.1

-
-
-
-

as_release_add_location ()

-
void
-as_release_add_location (AsRelease *release,
-                         const gchar *location);
-

Adds a release location.

-
-

Parameters

-
----- - - - - - -

location

An URL of the download location

 
-
-

Since: 0.8.1

-
-
-
-

as_release_get_checksum ()

-
const gchar *
-as_release_get_checksum (AsRelease *release,
-                         AsChecksumKind kind);
-

Gets the release checksum

-
-

Returns

-

string, or NULL for not set or invalid

-
-

Since: 0.8.2

-
-
-
-

as_release_set_checksum ()

-
void
-as_release_set_checksum (AsRelease *release,
-                         const gchar *checksum,
-                         AsChecksumKind kind);
-

Set the release checksum.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

release

An instance of AsRelease.

 

checksum

The checksum as string.

 

kind

The kind of this checksum, e.g. AS_CHECKSUM_KIND_SHA256

 
-
-

Since: 0.8.2

-
-
-
-

as_release_get_urgency ()

-
AsUrgencyKind
-as_release_get_urgency (AsRelease *release);
-

Gets the urgency of the release -(showing how important it is to update to a more recent release)

-
-

Parameters

-
----- - - - - - -

release

a AsRelease instance.

 
-
-
-

Returns

-

AsUrgencyKind, or AS_URGENCY_KIND_UNKNOWN for not set

-
-

Since: 0.6.5

-
-
-
-

as_release_set_urgency ()

-
void
-as_release_set_urgency (AsRelease *release,
-                        AsUrgencyKind urgency);
-

Sets the release urgency.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance.

 

urgency

the urgency of this release/update (as AsUrgencyKind)

 
-
-

Since: 0.6.5

-
-
-
-

as_release_get_size ()

-
guint64
-as_release_get_size (AsRelease *release,
-                     AsSizeKind kind);
-

Gets the release size.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance

 

kind

a AsSizeKind

 
-
-
-

Returns

-

The size of the given kind of this release.

-
-

Since: 0.8.6

-
-
-
-

as_release_set_size ()

-
void
-as_release_set_size (AsRelease *release,
-                     guint64 size,
-                     AsSizeKind kind);
-

Sets the release size for the given kind.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

release

a AsRelease instance

 

size

a size in bytes, or 0 for unknown

 

kind

a AsSizeKind

 
-
-

Since: 0.8.6

-
-
-
-

Types and Values

-
-

AS_TYPE_RELEASE

-
#define AS_TYPE_RELEASE (as_release_get_type ())
-
-

-

-
-
-
-

struct AsReleaseClass

-
struct AsReleaseClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsChecksumKind

-

Checksums supported by AsRelease

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_CHECKSUM_KIND_NONE

-

No checksum

-
 

AS_CHECKSUM_KIND_SHA1

-

SHA1

-
 

AS_CHECKSUM_KIND_SHA256

-

SHA256

-
 
-
-
-
-
-

enum AsSizeKind

-

The release size kind.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_SIZE_KIND_UNKNOWN

-

Unknown size

-
 

AS_SIZE_KIND_DOWNLOAD

-

Size of download of component

-
 

AS_SIZE_KIND_INSTALLED

-

Size of installed component

-
 
-
-

Since: 0.8.6

-
-
-
-

AsRelease

-
typedef struct _AsRelease AsRelease;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsScreenshot.html appstream-0.12.0/docs/api/html/AsScreenshot.html --- appstream-0.9.4/docs/api/html/AsScreenshot.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsScreenshot.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,533 +0,0 @@ - - - - -AsScreenshot: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsScreenshot

-

AsScreenshot — Object representing a single screenshot

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsScreenshotKind - -as_screenshot_kind_from_string () -
const gchar * - -as_screenshot_kind_to_string () -
-gboolean - -as_screenshot_is_valid () -
-AsScreenshot * - -as_screenshot_new () -
-AsScreenshotKind - -as_screenshot_get_kind () -
-void - -as_screenshot_set_kind () -
const gchar * - -as_screenshot_get_caption () -
-void - -as_screenshot_set_caption () -
-GPtrArray * - -as_screenshot_get_images () -
-void - -as_screenshot_add_image () -
-gchar * - -as_screenshot_get_active_locale () -
-void - -as_screenshot_set_active_locale () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_SCREENSHOT
structAsScreenshotClass
enumAsScreenshotKind
 AsScreenshot
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsScreenshot
-
-
-
-

Description

-

Screenshots have a localized caption and also contain a number of images -of different resolution.

-

See also: AsImage

-
-
-

Functions

-
-

as_screenshot_kind_from_string ()

-
AsScreenshotKind
-as_screenshot_kind_from_string (const gchar *kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind

the string.

 
-
-
-

Returns

-

a AsScreenshotKind, or -AS_SCREENSHOT_KIND_UNKNOWN if not known.

-

[transfer full]

-
-
-
-
-

as_screenshot_kind_to_string ()

-
const gchar *
-as_screenshot_kind_to_string (AsScreenshotKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsScreenshotKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_screenshot_is_valid ()

-
gboolean
-as_screenshot_is_valid (AsScreenshot *screenshot);
-

Performs a quick validation on this screenshot

-
-

Parameters

-
----- - - - - - -

screenshot

a AsScreenshot instance.

 
-
-
-

Returns

-

TRUE if the screenshot is a complete AsScreenshot

-
-
-
-
-

as_screenshot_new ()

-
AsScreenshot *
-as_screenshot_new (void);
-

Creates a new AsScreenshot.

-
-

Returns

-

a AsScreenshot.

-

[transfer full]

-
-
-
-
-

as_screenshot_get_kind ()

-
AsScreenshotKind
-as_screenshot_get_kind (AsScreenshot *screenshot);
-

Gets the screenshot kind.

-
-

Parameters

-
----- - - - - - -

screenshot

a AsScreenshot instance.

 
-
-
-

Returns

-

a AsScreenshotKind

-
-
-
-
-

as_screenshot_set_kind ()

-
void
-as_screenshot_set_kind (AsScreenshot *screenshot,
-                        AsScreenshotKind kind);
-

Sets the screenshot kind.

-
-

Parameters

-
----- - - - - - - - - - - - - -

screenshot

a AsScreenshot instance.

 

kind

the AsScreenshotKind.

 
-
-
-
-
-

as_screenshot_get_caption ()

-
const gchar *
-as_screenshot_get_caption (AsScreenshot *screenshot);
-

Gets the image caption

-
-

Parameters

-
----- - - - - - -

screenshot

a AsScreenshot instance.

 
-
-
-

Returns

-

the caption

-
-
-
-
-

as_screenshot_set_caption ()

-
void
-as_screenshot_set_caption (AsScreenshot *screenshot,
-                           const gchar *caption,
-                           const gchar *locale);
-

Sets a caption on the screenshot

-
-

Parameters

-
----- - - - - - - - - - - - - -

screenshot

a AsScreenshot instance.

 

caption

the caption text.

 
-
-
-
-
-

as_screenshot_get_images ()

-
GPtrArray *
-as_screenshot_get_images (AsScreenshot *screenshot);
-

Gets the image sizes included in the screenshot.

-
-

Parameters

-
----- - - - - - -

screenshot

a AsScreenshot instance.

 
-
-
-

Returns

-

an array.

-

[element-type AsImage][transfer none]

-
-
-
-
-

as_screenshot_add_image ()

-
void
-as_screenshot_add_image (AsScreenshot *screenshot,
-                         AsImage *image);
-

Adds an image to the screenshot.

-
-

Parameters

-
----- - - - - - - - - - - - - -

screenshot

a AsScreenshot instance.

 

image

a AsImage instance.

 
-
-
-
-
-

as_screenshot_get_active_locale ()

-
gchar *
-as_screenshot_get_active_locale (AsScreenshot *screenshot);
-

Get the current active locale, which -is used to get localized messages.

-
-
-
-

as_screenshot_set_active_locale ()

-
void
-as_screenshot_set_active_locale (AsScreenshot *screenshot,
-                                 const gchar *locale);
-

Set the current active locale, which -is used to get localized messages. -If the AsComponent linking this AsScreenshot was fetched -from a localized database, usually only -one locale is available.

-
-
-
-

Types and Values

-
-

AS_TYPE_SCREENSHOT

-
#define AS_TYPE_SCREENSHOT (as_screenshot_get_type ())
-
-

-

-
-
-
-

struct AsScreenshotClass

-
struct AsScreenshotClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsScreenshotKind

-

The screenshot type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_SCREENSHOT_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_SCREENSHOT_KIND_DEFAULT

-

The primary screenshot to show by default

-
 

AS_SCREENSHOT_KIND_EXTRA

-

Optional screenshot

-
 
-
-
-
-
-

AsScreenshot

-
typedef struct _AsScreenshot AsScreenshot;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsValidator.html appstream-0.12.0/docs/api/html/AsValidator.html --- appstream-0.9.4/docs/api/html/AsValidator.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsValidator.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,318 +0,0 @@ - - - - -AsValidator: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsValidator

-

AsValidator — Validator and report-generator about AppStream XML metadata

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsValidator * - -as_validator_new () -
-void - -as_validator_clear_issues () -
-gboolean - -as_validator_validate_file () -
-gboolean - -as_validator_validate_data () -
-gboolean - -as_validator_validate_tree () -
-GList * - -as_validator_get_issues () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineAS_TYPE_VALIDATOR
structAsValidatorClass
 AsValidator
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsValidator
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object is able to validate AppStream XML metadata (distro and upstream) -and to generate a report about issues found with it.

-

See also: AsMetadata

-
-
-

Functions

-
-

as_validator_new ()

-
AsValidator *
-as_validator_new (void);
-

Creates a new AsValidator.

-
-

Returns

-

an AsValidator.

-

[transfer full]

-
-
-
-
-

as_validator_clear_issues ()

-
void
-as_validator_clear_issues (AsValidator *validator);
-

Clears the list of issues

-
-

Parameters

-
----- - - - - - -

validator

An instance of AsValidator.

 
-
-
-
-
-

as_validator_validate_file ()

-
gboolean
-as_validator_validate_file (AsValidator *validator,
-                            GFile *metadata_file);
-

Validate an AppStream XML file

-
-

Parameters

-
----- - - - - - - - - - - - - -

validator

An instance of AsValidator.

 

metadata_file

An AppStream XML file.

 
-
-
-
-
-

as_validator_validate_data ()

-
gboolean
-as_validator_validate_data (AsValidator *validator,
-                            const gchar *metadata);
-

Validate AppStream XML data

-
-

Parameters

-
----- - - - - - - - - - - - - -

validator

An instance of AsValidator.

 

metadata

XML metadata.

 
-
-
-
-
-

as_validator_validate_tree ()

-
gboolean
-as_validator_validate_tree (AsValidator *validator,
-                            const gchar *root_dir);
-

Validate a full directory tree for issues in AppStream metadata.

-
-

Parameters

-
----- - - - - - - - - - - - - -

validator

An instance of AsValidator.

 

root_dir

The root directory of the filesystem tree that should be validated.

 
-
-
-
-
-

as_validator_get_issues ()

-
GList *
-as_validator_get_issues (AsValidator *validator);
-

Get a list of found metadata format issues.

-
-

Parameters

-
----- - - - - - -

validator

An instance of AsValidator.

 
-
-
-

Returns

-

a list of AsValidatorIssue instances, free with g_list_free().

-

[element-type AsValidatorIssue][transfer container]

-
-
-
-
-

Types and Values

-
-

AS_TYPE_VALIDATOR

-
#define AS_TYPE_VALIDATOR (as_validator_get_type ())
-
-

-

-
-
-
-

struct AsValidatorClass

-
struct AsValidatorClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

AsValidator

-
typedef struct _AsValidator AsValidator;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/AsValidatorIssue.html appstream-0.12.0/docs/api/html/AsValidatorIssue.html --- appstream-0.9.4/docs/api/html/AsValidatorIssue.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/AsValidatorIssue.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,603 +0,0 @@ - - - - -AsValidatorIssue: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsValidatorIssue

-

AsValidatorIssue — Object representing an issue found in AppStream metadata

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsValidatorIssue * - -as_validator_issue_new () -
-AsIssueKind - -as_validator_issue_get_kind () -
-void - -as_validator_issue_set_kind () -
-AsIssueImportance - -as_validator_issue_get_importance () -
-void - -as_validator_issue_set_importance () -
const gchar * - -as_validator_issue_get_message () -
-void - -as_validator_issue_set_message () -
const gchar * - -as_validator_issue_get_location () -
-void - -as_validator_issue_set_location () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_VALIDATOR_ISSUE
structAsValidatorIssueClass
enumAsIssueImportance
enumAsIssueKind
 AsValidatorIssue
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsValidatorIssue
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

See also: AsValidator

-
-
-

Functions

-
-

as_validator_issue_new ()

-
AsValidatorIssue *
-as_validator_issue_new (void);
-

Creates a new AsValidatorIssue.

-
-

Returns

-

a AsValidatorIssue.

-

[transfer full]

-
-
-
-
-

as_validator_issue_get_kind ()

-
AsIssueKind
-as_validator_issue_get_kind (AsValidatorIssue *issue);
-

Gets the issue kind enum, if available.

-
-

Parameters

-
----- - - - - - -

issue

a AsValidatorIssue instance.

 
-
-
-

Returns

-

a AsIssueKind

-
-
-
-
-

as_validator_issue_set_kind ()

-
void
-as_validator_issue_set_kind (AsValidatorIssue *issue,
-                             AsIssueKind kind);
-

Sets the kind enum for this issue, if known.

-
-

Parameters

-
----- - - - - - - - - - - - - -

issue

a AsValidatorIssue instance.

 

kind

the AsIssueKind.

 
-
-
-
-
-

as_validator_issue_get_importance ()

-
AsIssueImportance
-as_validator_issue_get_importance (AsValidatorIssue *issue);
-

Gets the importance of this issue.

-
-

Parameters

-
----- - - - - - -

issue

a AsValidatorIssue instance.

 
-
-
-

Returns

-

a AsIssueImportance

-
-
-
-
-

as_validator_issue_set_importance ()

-
void
-as_validator_issue_set_importance (AsValidatorIssue *issue,
-                                   AsIssueImportance importance);
-

Sets the importance for this issue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

issue

a AsValidatorIssue instance.

 

importance

the AsIssueImportance.

 
-
-
-
-
-

as_validator_issue_get_message ()

-
const gchar *
-as_validator_issue_get_message (AsValidatorIssue *issue);
-

Gets the message for the issue.

-
-

Parameters

-
----- - - - - - -

issue

a AsValidatorIssue instance.

 
-
-
-

Returns

-

the message

-
-
-
-
-

as_validator_issue_set_message ()

-
void
-as_validator_issue_set_message (AsValidatorIssue *issue,
-                                const gchar *message);
-

Sets a message on the issue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

issue

a AsValidatorIssue instance.

 

message

the message text.

 
-
-
-
-
-

as_validator_issue_get_location ()

-
const gchar *
-as_validator_issue_get_location (AsValidatorIssue *issue);
-

Gets a location hint for the issue.

-
-

Parameters

-
----- - - - - - -

issue

a AsValidatorIssue instance.

 
-
-
-

Returns

-

the location hint

-
-
-
-
-

as_validator_issue_set_location ()

-
void
-as_validator_issue_set_location (AsValidatorIssue *issue,
-                                 const gchar *location);
-

Sets a location hint for this issue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

issue

a AsValidatorIssue instance.

 

location

a location hint.

 
-
-
-
-
-

Types and Values

-
-

AS_TYPE_VALIDATOR_ISSUE

-
#define AS_TYPE_VALIDATOR_ISSUE (as_validator_issue_get_type ())
-
-

-

-
-
-
-

struct AsValidatorIssueClass

-
struct AsValidatorIssueClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsIssueImportance

-

The importance of an issue found by AsValidator

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_ISSUE_IMPORTANCE_UNKNOWN

  

AS_ISSUE_IMPORTANCE_ERROR

-

There is a serious error in your metadata

-
 

AS_ISSUE_IMPORTANCE_WARNING

-

Something which should be fixed, but is not fatal

-
 

AS_ISSUE_IMPORTANCE_INFO

-

Non-essential information on how to improve your metadata

-
 

AS_ISSUE_IMPORTANCE_PEDANTIC

-

Pedantic information

-
 
-
-
-
-
-

enum AsIssueKind

-

The issue type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_ISSUE_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_ISSUE_KIND_MARKUP_INVALID

-

The XML markup is invalid

-
 

AS_ISSUE_KIND_LEGACY

-

An element from a legacy AppStream specification has been found

-
 

AS_ISSUE_KIND_TAG_DUPLICATED

-

A tag is duplicated

-
 

AS_ISSUE_KIND_TAG_MISSING

-

A required tag is missing

-
 

AS_ISSUE_KIND_TAG_UNKNOWN

-

An unknown tag was found

-
 

AS_ISSUE_KIND_TAG_NOT_ALLOWED

-

A tag is not allowed in the current context

-
 

AS_ISSUE_KIND_PROPERTY_MISSING

-

A required property is missing

-
 

AS_ISSUE_KIND_PROPERTY_INVALID

-

A property is invalid

-
 

AS_ISSUE_KIND_VALUE_MISSING

-

A value is missing

-
 

AS_ISSUE_KIND_VALUE_WRONG

-

The value of a tag or property is wrong

-
 

AS_ISSUE_KIND_VALUE_ISSUE

-

There is an issue with a tag or property value (often non-fatal)

-
 

AS_ISSUE_KIND_FILE_MISSING

-

A required file or other metadata was missing

-
 

AS_ISSUE_KIND_WRONG_NAME

-

The naming of an entity is wrong

-
 

AS_ISSUE_KIND_READ_ERROR

-

Reading of data failed

-
 
-
-
-
-
-

AsValidatorIssue

-
typedef struct _AsValidatorIssue AsValidatorIssue;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/ch01.html appstream-0.12.0/docs/api/html/ch01.html --- appstream-0.9.4/docs/api/html/ch01.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/ch01.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ - - - - -AppStream API Reference: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-AppStream API Reference

-
-
-AsComponent — Object representing a software component -
-
-as-enums — Some enums used by various other modules -
-
-AsRelease — Object representing a single upstream release -
-
-AsIcon — Describes an icon of an application. -
-
-AsProvided — Description of the provided-items in components -
-
-AsScreenshot — Object representing a single screenshot -
-
-AsImage — Object representing a single image used in a screenshot. -
-
-AsDatabase — Read-only access to the AppStream component database -
-
-AsMetadata — Parser for AppStream metadata -
-
-AsDataPool — Collect and temporarily store metadata from different sources -
-
-AsDistroDetails — Provides information about the current distribution -
-
-AsMenuParser — Parser for XDG menu files designed for software-centers -
-
-AsCategory — Representation of a XDG category -
-
-AsValidator — Validator and report-generator about AppStream XML metadata -
-
-AsValidatorIssue — Object representing an issue found in AppStream metadata -
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/deprecated-api-index.html appstream-0.12.0/docs/api/html/deprecated-api-index.html --- appstream-0.9.4/docs/api/html/deprecated-api-index.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/deprecated-api-index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - -Index of deprecated API: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-Index of deprecated API

- -
- - - \ No newline at end of file Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/api/html/home.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/api/html/home.png differ diff -Nru appstream-0.9.4/docs/api/html/index.html appstream-0.12.0/docs/api/html/index.html --- appstream-0.9.4/docs/api/html/index.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - -AppStream Library Reference Manual: AppStream Library Reference Manual - - - - - - - -
-
-
-
-

- The latest version of this documentation can be found on-line at - freedesktop.org/software/appstream/docs/api/html. -

-
-
-
-
-
AppStream API Reference
-
-
-AsComponent — Object representing a software component -
-
-as-enums — Some enums used by various other modules -
-
-AsRelease — Object representing a single upstream release -
-
-AsIcon — Describes an icon of an application. -
-
-AsProvided — Description of the provided-items in components -
-
-AsScreenshot — Object representing a single screenshot -
-
-AsImage — Object representing a single image used in a screenshot. -
-
-AsDatabase — Read-only access to the AppStream component database -
-
-AsMetadata — Parser for AppStream metadata -
-
-AsDataPool — Collect and temporarily store metadata from different sources -
-
-AsDistroDetails — Provides information about the current distribution -
-
-AsMenuParser — Parser for XDG menu files designed for software-centers -
-
-AsCategory — Representation of a XDG category -
-
-AsValidator — Validator and report-generator about AppStream XML metadata -
-
-AsValidatorIssue — Object representing an issue found in AppStream metadata -
-
-
Object Hierarchy
-
API Index
-
Index of deprecated API
-
Annotation Glossary
-
AppStream Manual Pages
-
-appstreamcli — Handle AppStream metadata and the AppStream index -
-
-
- - - \ No newline at end of file Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/api/html/left-insensitive.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/api/html/left-insensitive.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/api/html/left.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/api/html/left.png differ diff -Nru appstream-0.9.4/docs/api/html/manpages.html appstream-0.12.0/docs/api/html/manpages.html --- appstream-0.9.4/docs/api/html/manpages.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/manpages.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - -AppStream Manual Pages: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-AppStream Manual Pages

-
-appstreamcli — Handle AppStream metadata and the AppStream index -
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/object-tree.html appstream-0.12.0/docs/api/html/object-tree.html --- appstream-0.9.4/docs/api/html/object-tree.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/object-tree.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ - - - - -Object Hierarchy: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-Object Hierarchy

-
-    GObject
-    ├── AsCacheBuilder
-    ├── AsCategory
-    ├── AsComponent
-    ├── AsDataPool
-    ├── AsDatabase
-    ├── AsDistroDetails
-    ├── AsIcon
-    ├── AsImage
-    ├── AsMenuParser
-    ├── AsMetadata
-    ├── AsProvided
-    ├── AsRelease
-    ├── AsScreenshot
-    ├── AsTranslation
-    ├── AsValidator
-    ├── AsValidatorIssue
-    ├── AsXMLData
-    ╰── AsYAMLData
-    GEnum
-    ╰── AsComponentKind
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/html/re16.html appstream-0.12.0/docs/api/html/re16.html --- appstream-0.9.4/docs/api/html/re16.html 2016-04-18 14:19:35.000000000 +0000 +++ appstream-0.12.0/docs/api/html/re16.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,191 +0,0 @@ - - - - -appstreamcli: AppStream Library Reference Manual - - - - - - - - - - - - - - - -
-
-
- - -
-

appstreamcli

-

appstreamcli — Handle AppStream metadata and the AppStream index

-
-
-

Synopsis

-

appstreamcli [COMMAND]

-
-
-

Description

-

- This manual page documents briefly the appstreamcli command. -

-

- appstreamcli is a small helper tool to work with AppStream metadata and - access the AppStream component index from the command-line. The AppStream component - index contains a list of all available software components for your distribution, matched to their - package names. - It is generated using AppStream XML or Debian DEP-11 data, which is provided by your distributor. -

-

- For more information about the AppStream project and the other components which are part of it, take a look at - the AppStream pages at Freedesktop.org. -

-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

status

- Display various information about the installed metadata and - the metadata cache. -

get ID

Get a component by it's identifier.

s, search TERM

Search the AppStream component database for a given search term.

what-provides TYPE TERM

-

- Return components which provide a given item. An item type can be specified using the - TYPE parameter, a value to search for has to be - supplied using the TERM parameter. -

-

Examples:

-

- Get components which handle the "text/xml" mimetype. -

-

- appstreamcli what-provides mimetype "text/xml" -

-

- Get component which provides the "libfoo.so.2" library. -

-

- appstreamcli what-provides lib libfoo.so.2 -

-

refresh, refresh-index

-

- Trigger a database refresh, if necessary. - In case you want to force the database to be rebuilt, supply the --force flag. -

-

This command must be executed with root permission.

-

dump ID

- Dump the XML description of a component with the given ID. -

validate FILES

-

- Validate AppStream XML metadata for compliance with the specification. -

-

- Both XML metadata types, upstream and distro XML, are handled. - The filetype which should be validated is determined automatically. -

-

- The --pedantic flag triggers a more pedantic - validation of the file, including minor and style issues in the report. -

-

validate-tree DIRECTORY

-

- Validate AppStream XML metadata found in a file-tree. -

-

- This performs a standard validation of all found metadata, but also checks for additional - errors, like the presence of .desktop files and validity of other additional metadata. -

-

install ID

-

- Install a software component by its ID. -

-

- This resolves the AppStream component ID to the package name which provides it and - then calls the distribution's package manager to install the software. -

-

- This feature is experimental. -

-

put FILE

- Install a metadata file into the right directory on the current machine. -

--details

Print out more information about a found component.

--no-color

Don't print colored output.

--version

Display the version number of appstreamcli

-
-
-

See Also

-

pkcon (1).

-
-
-

AUTHOR

-

- This manual page was written by Matthias Klumpp . -

-
-
- - - \ No newline at end of file Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/api/html/right-insensitive.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/api/html/right-insensitive.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/api/html/right.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/api/html/right.png differ diff -Nru appstream-0.9.4/docs/api/html/style.css appstream-0.12.0/docs/api/html/style.css --- appstream-0.9.4/docs/api/html/style.css 2016-04-18 14:19:34.000000000 +0000 +++ appstream-0.12.0/docs/api/html/style.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,479 +0,0 @@ -body -{ - font-family: cantarell, sans-serif; -} -.synopsis, .classsynopsis -{ - /* tango:aluminium 1/2 */ - background: #eeeeec; - background: rgba(238, 238, 236, 0.5); - border: solid 1px rgb(238, 238, 236); - padding: 0.5em; -} -.programlisting -{ - /* tango:sky blue 0/1 */ - /* fallback for no rgba support */ - background: #e6f3ff; - border: solid 1px #729fcf; - background: rgba(114, 159, 207, 0.1); - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0.5em; -} -.variablelist -{ - padding: 4px; - margin-left: 3em; -} -.variablelist td:first-child -{ - vertical-align: top; -} - -div.gallery-float -{ - float: left; - padding: 10px; -} -div.gallery-float img -{ - border-style: none; -} -div.gallery-spacer -{ - clear: both; -} - -a, a:visited -{ - text-decoration: none; - /* tango:sky blue 2 */ - color: #3465a4; -} -a:hover -{ - text-decoration: underline; - /* tango:sky blue 1 */ - color: #729fcf; -} - -div.informaltable table -{ - border-collapse: separate; - border-spacing: 1em 0.3em; - border: none; -} - -div.informaltable table td, div.informaltable table th -{ - vertical-align: top; -} - -.function_type, -.variable_type, -.property_type, -.signal_type, -.parameter_name, -.struct_member_name, -.union_member_name, -.define_keyword, -.datatype_keyword, -.typedef_keyword -{ - text-align: right; -} - -/* dim non-primary columns */ -.c_punctuation, -.function_type, -.variable_type, -.property_type, -.signal_type, -.define_keyword, -.datatype_keyword, -.typedef_keyword, -.property_flags, -.signal_flags, -.parameter_annotations, -.enum_member_annotations, -.struct_member_annotations, -.union_member_annotations -{ - color: #888a85; -} - -.function_type a, -.function_type a:visited, -.function_type a:hover, -.property_type a, -.property_type a:visited, -.property_type a:hover, -.signal_type a, -.signal_type a:visited, -.signal_type a:hover, -.signal_flags a, -.signal_flags a:visited, -.signal_flags a:hover -{ - color: #729fcf; -} - -td p -{ - margin: 0.25em; -} - -div.table table -{ - border-collapse: collapse; - border-spacing: 0px; - /* tango:aluminium 3 */ - border: solid 1px #babdb6; -} - -div.table table td, div.table table th -{ - /* tango:aluminium 3 */ - border: solid 1px #babdb6; - padding: 3px; - vertical-align: top; -} - -div.table table th -{ - /* tango:aluminium 2 */ - background-color: #d3d7cf; -} - -h4 -{ - color: #555753; - margin-top: 1em; - margin-bottom: 1em; -} - -hr -{ - /* tango:aluminium 1 */ - color: #d3d7cf; - background: #d3d7cf; - border: none 0px; - height: 1px; - clear: both; - margin: 2.0em 0em 2.0em 0em; -} - -dl.toc dt -{ - padding-bottom: 0.25em; -} - -dl.toc > dt -{ - padding-top: 0.25em; - padding-bottom: 0.25em; - font-weight: bold; -} - -dl.toc > dl -{ - padding-bottom: 0.5em; -} - -.parameter -{ - font-style: normal; -} - -.footer -{ - padding-top: 3.5em; - /* tango:aluminium 3 */ - color: #babdb6; - text-align: center; - font-size: 80%; -} - -.informalfigure, -.figure -{ - margin: 1em; -} - -.informalexample, -.example -{ - margin-top: 1em; - margin-bottom: 1em; -} - -.warning -{ - /* tango:orange 0/1 */ - background: #ffeed9; - background: rgba(252, 175, 62, 0.1); - border-color: #ffb04f; - border-color: rgba(252, 175, 62, 0.2); -} -.note -{ - /* tango:chameleon 0/0.5 */ - background: #d8ffb2; - background: rgba(138, 226, 52, 0.1); - border-color: #abf562; - border-color: rgba(138, 226, 52, 0.2); -} -div.blockquote -{ - border-color: #eeeeec; -} -.note, .warning, div.blockquote -{ - padding: 0.5em; - border-width: 1px; - border-style: solid; - margin: 2em; -} -.note p, .warning p -{ - margin: 0; -} - -div.warning h3.title, -div.note h3.title -{ - display: none; -} - -p + div.section -{ - margin-top: 1em; -} - -div.refnamediv, -div.refsynopsisdiv, -div.refsect1, -div.refsect2, -div.toc, -div.section -{ - margin-bottom: 1em; -} - -/* blob links */ -h2 .extralinks, h3 .extralinks -{ - float: right; - /* tango:aluminium 3 */ - color: #babdb6; - font-size: 80%; - font-weight: normal; -} - -.lineart -{ - color: #d3d7cf; - font-weight: normal; -} - -.annotation -{ - /* tango:aluminium 5 */ - color: #555753; - font-weight: normal; -} - -.structfield -{ - font-style: normal; - font-weight: normal; -} - -acronym,abbr -{ - border-bottom: 1px dotted gray; -} - -/* code listings */ - -.listing_code .programlisting .normal, -.listing_code .programlisting .normal a, -.listing_code .programlisting .number, -.listing_code .programlisting .cbracket, -.listing_code .programlisting .symbol { color: #555753; } -.listing_code .programlisting .comment, -.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ -.listing_code .programlisting .function, -.listing_code .programlisting .function a, -.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ -.listing_code .programlisting .string { color: #ad7fa8; } /* tango: plum */ -.listing_code .programlisting .keyword, -.listing_code .programlisting .usertype, -.listing_code .programlisting .type, -.listing_code .programlisting .type a { color: #4e9a06; } /* tango: chameleon 3 */ - -.listing_frame { - /* tango:sky blue 1 */ - border: solid 1px #729fcf; - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0px; -} - -.listing_lines, .listing_code { - margin-top: 0px; - margin-bottom: 0px; - padding: 0.5em; -} -.listing_lines { - /* tango:sky blue 0.5 */ - background: #a6c5e3; - background: rgba(114, 159, 207, 0.2); - /* tango:aluminium 6 */ - color: #2e3436; -} -.listing_code { - /* tango:sky blue 0 */ - background: #e6f3ff; - background: rgba(114, 159, 207, 0.1); -} -.listing_code .programlisting { - /* override from previous */ - border: none 0px; - padding: 0px; - background: none; -} -.listing_lines pre, .listing_code pre { - margin: 0px; -} - -@media screen { - /* these have a as a first child, but since there are no parent selectors - * we can't use that. */ - a.footnote - { - position: relative; - top: 0em ! important; - } - /* this is needed so that the local anchors are displayed below the naviagtion */ - div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] - { - display: inline-block; - position: relative; - top:-5em; - } - /* this seems to be a bug in the xsl style sheets when generating indexes */ - div.index div.index - { - top: 0em; - } - /* make space for the fixed navigation bar and add space at the bottom so that - * link targets appear somewhat close to top - */ - body - { - padding-top: 2.5em; - padding-bottom: 500px; - max-width: 60em; - } - p - { - max-width: 60em; - } - /* style and size the navigation bar */ - table.navigation#top - { - position: fixed; - background: #e2e2e2; - border-bottom: solid 1px #babdb6; - border-spacing: 5px; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - z-index: 10; - } - table.navigation#top td - { - padding-left: 6px; - padding-right: 6px; - } - .navigation a, .navigation a:visited - { - /* tango:sky blue 3 */ - color: #204a87; - } - .navigation a:hover - { - /* tango:sky blue 2 */ - color: #3465a4; - } - td.shortcuts - { - /* tango:sky blue 2 */ - color: #3465a4; - font-size: 80%; - white-space: nowrap; - } - td.shortcuts .dim - { - color: #babdb6; - } - .navigation .title - { - font-size: 80%; - max-width: none; - margin: 0px; - font-weight: normal; - } -} -@media screen and (min-width: 60em) { - /* screen larger than 60em */ - body { margin: auto; } -} -@media screen and (max-width: 60em) { - /* screen less than 60em */ - #nav_hierarchy { display: none; } - #nav_interfaces { display: none; } - #nav_prerequisites { display: none; } - #nav_derived_interfaces { display: none; } - #nav_implementations { display: none; } - #nav_child_properties { display: none; } - #nav_style_properties { display: none; } - #nav_index { display: none; } - #nav_glossary { display: none; } - .gallery_image { display: none; } - .property_flags { display: none; } - .signal_flags { display: none; } - .parameter_annotations { display: none; } - .enum_member_annotations { display: none; } - .struct_member_annotations { display: none; } - .union_member_annotations { display: none; } - /* now that a column is hidden, optimize space */ - col.parameters_name { width: auto; } - col.parameters_description { width: auto; } - col.struct_members_name { width: auto; } - col.struct_members_description { width: auto; } - col.enum_members_name { width: auto; } - col.enum_members_description { width: auto; } - col.union_members_name { width: auto; } - col.union_members_description { width: auto; } - .listing_lines { display: none; } -} -@media print { - table.navigation { - visibility: collapse; - display: none; - } - div.titlepage table.navigation { - visibility: visible; - display: table; - background: #e2e2e2; - border: solid 1px #babdb6; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - } -} - Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/api/html/up-insensitive.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/api/html/up-insensitive.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/api/html/up.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/api/html/up.png differ diff -Nru appstream-0.9.4/docs/api/html.stamp appstream-0.12.0/docs/api/html.stamp --- appstream-0.9.4/docs/api/html.stamp 2016-04-18 14:19:34.000000000 +0000 +++ appstream-0.12.0/docs/api/html.stamp 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -timestamp diff -Nru appstream-0.9.4/docs/api/meson.build appstream-0.12.0/docs/api/meson.build --- appstream-0.9.4/docs/api/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/api/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,26 @@ +# Meson definition for AppStream API Documentation + +as_api_doc_target_dir = join_paths(as_doc_target_dir, 'html', 'api') + +glib.gtkdoc ( + 'appstream', + src_dir: join_paths(source_root, 'src'), + main_xml: 'appstream-docs.xml', + ignore_headers: aslib_priv_headers, + install: true, + install_dir: join_paths(get_option('prefix'), as_api_doc_target_dir), # requires an absolute path + content_files: ['../sources/man/appstreamcli.1.xml'] +) + +# create symlink, so tools using gtk-doc can find the API documentation, without us +# duplicating the data in two places. +# We hardcore the gtk-doc path here, because gtkdoc_html_dir('appstream') creates a +# wrong path due to a Meson bug at the moment +# This code sucks until Meson gains the install_symlink command proposed by the systemd guys +gtk_doc_root = join_paths(get_option('prefix'), get_option('datadir'), 'gtk-doc', 'html') +meson.add_install_script ('sh', '-c', + 'mkdir -p $DESTDIR@0@ && ln -sf ../../../@1@ $DESTDIR/@2@' + .format(gtk_doc_root, + as_api_doc_target_dir, + join_paths(gtk_doc_root, 'appstream')) +) diff -Nru appstream-0.9.4/docs/api/sgml.stamp appstream-0.12.0/docs/api/sgml.stamp --- appstream-0.9.4/docs/api/sgml.stamp 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/sgml.stamp 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -timestamp \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/tmpl/as-cache-builder.sgml appstream-0.12.0/docs/api/tmpl/as-cache-builder.sgml --- appstream-0.9.4/docs/api/tmpl/as-cache-builder.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-cache-builder.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,108 +0,0 @@ - -AsCacheBuilder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@AS_CACHE_BUILDER_ERROR_FAILED: -@AS_CACHE_BUILDER_ERROR_CACHE_INCOMPLETE: -@AS_CACHE_BUILDER_ERROR_TARGET_NOT_WRITABLE: - - - - - - -@void: -@Returns: - - - - - - - -@builder: -@dbpath: -@error: -@Returns: - - - - - - - -@builder: -@force: -@error: -@Returns: - - - - - - - -@self: -@dirs: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-category.sgml appstream-0.12.0/docs/api/tmpl/as-category.sgml --- appstream-0.9.4/docs/api/tmpl/as-category.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-category.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,244 +0,0 @@ - -AsCategory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@cat: - - - - - - - -@cat: -@Returns: - - - - - - - -@cat: -@value: - - - - - - - -@cat: -@Returns: - - - - - - - -@cat: -@value: - - - - - - - -@cat: -@Returns: - - - - - - - -@cat: -@value: - - - - - - - -@cat: -@Returns: - - - - - - - -@cat: -@value: - - - - - - - -@cat: -@Returns: - - - - - - - -@cat: -@subcat: - - - - - - - -@cat: -@subcat: - - - - - - - -@cat: -@Returns: - - - - - - - -@cat: -@Returns: - - - - - - - -@cat: -@Returns: - - - - - - - -@cat: -@Returns: - - - - - - - -@cat: -@value: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-component.sgml appstream-0.12.0/docs/api/tmpl/as-component.sgml --- appstream-0.9.4/docs/api/tmpl/as-component.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-component.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,692 +0,0 @@ - -AsComponent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_COMPONENT_KIND_UNKNOWN: -@AS_COMPONENT_KIND_GENERIC: -@AS_COMPONENT_KIND_DESKTOP_APP: -@AS_COMPONENT_KIND_FONT: -@AS_COMPONENT_KIND_CODEC: -@AS_COMPONENT_KIND_INPUTMETHOD: -@AS_COMPONENT_KIND_ADDON: -@AS_COMPONENT_KIND_FIRMWARE: - - - - - - -@kind: -@Returns: - - - - - - - -@kind_str: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@locale: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@origin: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@spkgname: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: -@locale: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: -@locale: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: -@locale: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: -@locale: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: - - - - - - - -@cpt: -@desktop: -@Returns: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: - - - - - - - -@cpt: -@category: -@Returns: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@sshot: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@value: -@locale: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@width: -@height: -@Returns: - - - - - - - -@cpt: -@icon: - - - - - - - -@cpt: -@prov: - - - - - - - -@cpt: -@kind: -@Returns: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@url_kind: -@Returns: - - - - - - - -@cpt: -@url_kind: -@url: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@release: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@cpt_id: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@cpt_id: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@locale: -@Returns: - - - - - - - -@cpt: -@locale: -@percentage: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@tr: - - - - - - - -@cpt: -@Returns: - - - - - - - -@cpt: -@bundle_kind: -@Returns: - - - - - - - -@cpt: -@bundle_kind: -@id: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-database.sgml appstream-0.12.0/docs/api/tmpl/as-database.sgml --- appstream-0.9.4/docs/api/tmpl/as-database.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-database.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,162 +0,0 @@ - -AsDatabase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_DATABASE_ERROR_FAILED: -@AS_DATABASE_ERROR_MISSING: -@AS_DATABASE_ERROR_CLOSED: -@AS_DATABASE_ERROR_TERM_INVALID: - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@db: -@error: -@Returns: - - - - - - - -@db: -@Returns: - - - - - - - -@db: -@dir: - - - - - - - -@db: -@term: -@cats_str: -@error: -@Returns: - - - - - - - -@db: -@error: -@Returns: - - - - - - - -@db: -@cid: -@error: -@Returns: - - - - - - - -@db: -@kind: -@item: -@error: -@Returns: - - - - - - - -@db: -@kind: -@error: -@Returns: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-data-pool.sgml appstream-0.12.0/docs/api/tmpl/as-data-pool.sgml --- appstream-0.9.4/docs/api/tmpl/as-data-pool.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-data-pool.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ - -AsDataPool - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_DATA_POOL_ERROR_FAILED: - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@dpool: -@Returns: - - - - - - - -@dpool: -@locale: - - - - - - - -@dpool: -@error: -@Returns: - - - - - - - -@dpool: -@Returns: - - - - - - - -@dpool: -@id: -@Returns: - - - - - - - -@dpool: -@Returns: - - - - - - - -@dpool: -@dirs: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-distro-details.sgml appstream-0.12.0/docs/api/tmpl/as-distro-details.sgml --- appstream-0.9.4/docs/api/tmpl/as-distro-details.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-distro-details.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ - -AsDistroDetails - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@distro: -@Returns: - - - - - - - -@distro: -@Returns: - - - - - - - -@distro: -@Returns: - - - - - - - -@distro: -@key: -@Returns: - - - - - - - -@distro: -@key: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - - - - - - - - - - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-enums.sgml appstream-0.12.0/docs/api/tmpl/as-enums.sgml --- appstream-0.9.4/docs/api/tmpl/as-enums.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-enums.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ - -as-enums - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_URL_KIND_UNKNOWN: -@AS_URL_KIND_HOMEPAGE: -@AS_URL_KIND_BUGTRACKER: -@AS_URL_KIND_FAQ: -@AS_URL_KIND_HELP: -@AS_URL_KIND_DONATION: - - - - - - -@url_kind: -@Returns: - - - - - - - -@url_kind: -@Returns: - - - - - - - -@AS_BUNDLE_KIND_UNKNOWN: -@AS_BUNDLE_KIND_LIMBA: -@AS_BUNDLE_KIND_XDG_APP: - - - - - - -@bundle_kind: -@Returns: - - - - - - - -@bundle_kind: -@Returns: - - - - - - - -@AS_URGENCY_KIND_UNKNOWN: -@AS_URGENCY_KIND_LOW: -@AS_URGENCY_KIND_MEDIUM: -@AS_URGENCY_KIND_HIGH: -@AS_URGENCY_KIND_CRITICAL: - - - - - - -@urgency_kind: -@Returns: - - - - - - - -@urgency_kind: -@Returns: - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-icon.sgml appstream-0.12.0/docs/api/tmpl/as-icon.sgml --- appstream-0.9.4/docs/api/tmpl/as-icon.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-icon.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ - -AsIcon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_ICON_KIND_UNKNOWN: -@AS_ICON_KIND_CACHED: -@AS_ICON_KIND_STOCK: -@AS_ICON_KIND_LOCAL: -@AS_ICON_KIND_REMOTE: - - - - - - -@kind_str: -@Returns: - - - - - - - -@kind: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@icon: -@Returns: - - - - - - - -@icon: -@kind: - - - - - - - -@icon: -@Returns: - - - - - - - -@icon: -@name: - - - - - - - -@icon: -@Returns: - - - - - - - -@icon: -@url: - - - - - - - -@icon: -@Returns: - - - - - - - -@icon: -@filename: - - - - - - - -@icon: -@Returns: - - - - - - - -@icon: -@width: - - - - - - - -@icon: -@Returns: - - - - - - - -@icon: -@height: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-image.sgml appstream-0.12.0/docs/api/tmpl/as-image.sgml --- appstream-0.9.4/docs/api/tmpl/as-image.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-image.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ - -AsImage - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_IMAGE_KIND_UNKNOWN: -@AS_IMAGE_KIND_SOURCE: -@AS_IMAGE_KIND_THUMBNAIL: - - - - - - -@kind: -@Returns: - - - - - - - -@kind: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@image: -@Returns: - - - - - - - -@image: -@url: - - - - - - - -@image: -@Returns: - - - - - - - -@image: -@width: - - - - - - - -@image: -@Returns: - - - - - - - -@image: -@height: - - - - - - - -@image: -@Returns: - - - - - - - -@image: -@kind: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-menu-parser.sgml appstream-0.12.0/docs/api/tmpl/as-menu-parser.sgml --- appstream-0.9.4/docs/api/tmpl/as-menu-parser.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-menu-parser.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ - -AsMenuParser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@menu_file: -@Returns: - - - - - - - -@mp: -@Returns: - - - - - - - -@mp: -@Returns: - - - - - - - -@mp: -@value: - - - - - - - -@void: -@Returns: - - - - - - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-metadata.sgml appstream-0.12.0/docs/api/tmpl/as-metadata.sgml --- appstream-0.9.4/docs/api/tmpl/as-metadata.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-metadata.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,315 +0,0 @@ - -AsMetadata - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_PARSER_MODE_UPSTREAM: -@AS_PARSER_MODE_DISTRO: - - - - - - -@AS_METADATA_ERROR_FAILED: -@AS_METADATA_ERROR_UNEXPECTED_FORMAT_KIND: -@AS_METADATA_ERROR_NO_COMPONENT: - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@metad: -@file: -@error: - - - - - - - -@metad: -@data: -@error: - - - - - - - -@metad: -@data: -@error: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: - - - - - - - -@metad: -@cpt: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@fname: -@error: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@fname: -@error: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@fname: -@error: - - - - - - - -@metad: -@locale: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@origin: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@update: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@wheader: - - - - - - - -@metad: -@mode: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@Returns: - - - - - - - -@metad: -@arch: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-provided.sgml appstream-0.12.0/docs/api/tmpl/as-provided.sgml --- appstream-0.9.4/docs/api/tmpl/as-provided.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-provided.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ - -AsProvided - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_PROVIDED_KIND_UNKNOWN: -@AS_PROVIDED_KIND_LIBRARY: -@AS_PROVIDED_KIND_BINARY: -@AS_PROVIDED_KIND_MIMETYPE: -@AS_PROVIDED_KIND_FONT: -@AS_PROVIDED_KIND_MODALIAS: -@AS_PROVIDED_KIND_PYTHON_2: -@AS_PROVIDED_KIND_PYTHON: -@AS_PROVIDED_KIND_DBUS_SYSTEM: -@AS_PROVIDED_KIND_DBUS_USER: -@AS_PROVIDED_KIND_FIRMWARE_RUNTIME: -@AS_PROVIDED_KIND_FIRMWARE_FLASHED: - - - - - - -@kind: -@Returns: - - - - - - - -@kind_str: -@Returns: - - - - - - - -@kind: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@prov: -@Returns: - - - - - - - -@prov: -@kind: - - - - - - - -@prov: -@Returns: - - - - - - - -@prov: -@item: - - - - - - - -@prov: -@item: -@Returns: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-release.sgml appstream-0.12.0/docs/api/tmpl/as-release.sgml --- appstream-0.9.4/docs/api/tmpl/as-release.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-release.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,255 +0,0 @@ - -AsRelease - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_CHECKSUM_KIND_NONE: -@AS_CHECKSUM_KIND_SHA1: -@AS_CHECKSUM_KIND_SHA256: - - - - - - -@kind: -@Returns: - - - - - - - -@kind_str: -@Returns: - - - - - - - -@AS_SIZE_KIND_UNKNOWN: -@AS_SIZE_KIND_DOWNLOAD: -@AS_SIZE_KIND_INSTALLED: - - - - - - -@size_kind: -@Returns: - - - - - - - -@size_kind: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@release: -@Returns: - - - - - - - -@release: -@version: - - - - - - - -@release: -@Returns: - - - - - - - -@release: -@timestamp: - - - - - - - -@release: -@Returns: - - - - - - - -@release: -@description: -@locale: - - - - - - - -@release: -@Returns: - - - - - - - -@release: -@locale: - - - - - - - -@release: -@Returns: - - - - - - - -@release: -@location: - - - - - - - -@release: -@kind: -@Returns: - - - - - - - -@release: -@checksum: -@kind: - - - - - - - -@release: -@Returns: - - - - - - - -@release: -@urgency: - - - - - - - -@release: -@kind: -@Returns: - - - - - - - -@release: -@size: -@kind: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-screenshot-private.sgml appstream-0.12.0/docs/api/tmpl/as-screenshot-private.sgml --- appstream-0.9.4/docs/api/tmpl/as-screenshot-private.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-screenshot-private.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - -as-screenshot-private - - - - - - - - - - - - - - - - - - - - - - - - - - - -@screenshot: -@Returns: - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-screenshot.sgml appstream-0.12.0/docs/api/tmpl/as-screenshot.sgml --- appstream-0.9.4/docs/api/tmpl/as-screenshot.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-screenshot.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ - -AsScreenshot - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_SCREENSHOT_KIND_UNKNOWN: -@AS_SCREENSHOT_KIND_DEFAULT: -@AS_SCREENSHOT_KIND_EXTRA: - - - - - - -@kind: -@Returns: - - - - - - - -@kind: -@Returns: - - - - - - - -@screenshot: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@screenshot: -@Returns: - - - - - - - -@screenshot: -@kind: - - - - - - - -@screenshot: -@Returns: - - - - - - - -@screenshot: -@caption: -@locale: - - - - - - - -@screenshot: -@Returns: - - - - - - - -@screenshot: -@image: - - - - - - - -@screenshot: -@Returns: - - - - - - - -@screenshot: -@locale: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-translation.sgml appstream-0.12.0/docs/api/tmpl/as-translation.sgml --- appstream-0.9.4/docs/api/tmpl/as-translation.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-translation.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ - -AsTranslation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_TRANSLATION_KIND_UNKNOWN: -@AS_TRANSLATION_KIND_GETTEXT: -@AS_TRANSLATION_KIND_QT: - - - - - - -@kind: -@Returns: - - - - - - - -@kind_str: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@tr: -@Returns: - - - - - - - -@tr: -@kind: - - - - - - - -@tr: -@Returns: - - - - - - - -@tr: -@id: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-utils-private.sgml appstream-0.12.0/docs/api/tmpl/as-utils-private.sgml --- appstream-0.9.4/docs/api/tmpl/as-utils-private.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-utils-private.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ - -as-utils-private - - - - - - - - - - - - - - - - - - - - - - - - - - - -@dirname: -@Returns: - - - - - - - -@categories_strv: -@system_categories: -@Returns: - - - - - - - -@categories_str: -@system_categories: -@Returns: - - - - - - - -@dir: -@pattern: -@recursive: -@error: -@Returns: - - - - - - - -@dir: -@recursive: -@error: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@path: -@Returns: - - - - - - - -@str: -@old_str: -@new_str: -@Returns: - - - - - - - -@array: -@Returns: - - - - - - - -@fname: -@Returns: - - - - - - - -@source: -@destination: -@error: -@Returns: - - - - - - - -@void: - - - - - - - -@locale: -@Returns: - - - - - - - -@locale: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@arch1: -@arch2: -@Returns: - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-validator-issue.sgml appstream-0.12.0/docs/api/tmpl/as-validator-issue.sgml --- appstream-0.9.4/docs/api/tmpl/as-validator-issue.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-validator-issue.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ - -AsValidatorIssue - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@AS_ISSUE_IMPORTANCE_UNKNOWN: -@AS_ISSUE_IMPORTANCE_ERROR: -@AS_ISSUE_IMPORTANCE_WARNING: -@AS_ISSUE_IMPORTANCE_INFO: -@AS_ISSUE_IMPORTANCE_PEDANTIC: - - - - - - -@AS_ISSUE_KIND_UNKNOWN: -@AS_ISSUE_KIND_MARKUP_INVALID: -@AS_ISSUE_KIND_LEGACY: -@AS_ISSUE_KIND_TAG_DUPLICATED: -@AS_ISSUE_KIND_TAG_MISSING: -@AS_ISSUE_KIND_TAG_UNKNOWN: -@AS_ISSUE_KIND_TAG_NOT_ALLOWED: -@AS_ISSUE_KIND_PROPERTY_MISSING: -@AS_ISSUE_KIND_PROPERTY_INVALID: -@AS_ISSUE_KIND_VALUE_MISSING: -@AS_ISSUE_KIND_VALUE_WRONG: -@AS_ISSUE_KIND_VALUE_ISSUE: -@AS_ISSUE_KIND_FILE_MISSING: -@AS_ISSUE_KIND_WRONG_NAME: -@AS_ISSUE_KIND_READ_ERROR: - - - - - - -@void: -@Returns: - - - - - - - -@issue: -@Returns: - - - - - - - -@issue: -@kind: - - - - - - - -@issue: -@Returns: - - - - - - - -@issue: -@importance: - - - - - - - -@issue: -@Returns: - - - - - - - -@issue: -@message: - - - - - - - -@issue: -@Returns: - - - - - - - -@issue: -@location: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-validator.sgml appstream-0.12.0/docs/api/tmpl/as-validator.sgml --- appstream-0.9.4/docs/api/tmpl/as-validator.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-validator.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ - -AsValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@validator: - - - - - - - -@validator: -@metadata_file: -@Returns: - - - - - - - -@validator: -@metadata: -@Returns: - - - - - - - -@validator: -@root_dir: -@Returns: - - - - - - - -@validator: -@Returns: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-xmldata.sgml appstream-0.12.0/docs/api/tmpl/as-xmldata.sgml --- appstream-0.9.4/docs/api/tmpl/as-xmldata.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-xmldata.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ - -AsXMLData - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@xdt: -@locale: -@origin: -@media_baseurl: -@arch: -@priority: - - - - - - - -@xdt: -@data: -@error: -@Returns: - - - - - - - -@xdt: -@data: -@error: -@Returns: - - - - - - - -@xdt: -@data: -@cpt: -@error: -@Returns: - - - - - - - -@xdt: -@cpt: -@Returns: - - - - - - - -@xdt: -@cpts: -@write_header: -@Returns: - - - - - - - -@xdt: -@mode: - - - - - - - -@metad: -@node: -@cpt: -@error: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl/as-yamldata.sgml appstream-0.12.0/docs/api/tmpl/as-yamldata.sgml --- appstream-0.9.4/docs/api/tmpl/as-yamldata.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl/as-yamldata.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ - -AsYAMLData - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@ydt: -@locale: -@origin: -@media_baseurl: -@arch: -@priority: - - - - - - - -@ydt: -@data: -@error: -@Returns: - - - - - - - -@ydt: -@cpts: -@write_header: -@add_timestamp: -@error: -@Returns: - - - - - - - -@ydt: -@Returns: - - - - - - - -@ydt: -@locale: - - - - - - - - diff -Nru appstream-0.9.4/docs/api/tmpl.stamp appstream-0.12.0/docs/api/tmpl.stamp --- appstream-0.9.4/docs/api/tmpl.stamp 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/tmpl.stamp 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -timestamp \ No newline at end of file diff -Nru appstream-0.9.4/docs/api/xml/annotation-glossary.xml appstream-0.12.0/docs/api/xml/annotation-glossary.xml --- appstream-0.9.4/docs/api/xml/annotation-glossary.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/annotation-glossary.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ - - -]> - - Annotation Glossary -A - - array - - Parameter points to an array of items. - - - -D - - default - - Default parameter value (for in case the shadows-to function has less parameters). - - - -E - - element-type - - Generics and defining elements of containers and arrays. - - - -N - - nullable - - NULL may be passed as the value in, out, in-out; or as a return value. - - - -T - - transfer container - - Free data container after the code is done. - - - - transfer full - - Free data after the code is done. - - - - transfer none - - Don't free data after the code is done. - - - - type - - Override the parsed C type with given type. - - - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-0.6.1.xml appstream-0.12.0/docs/api/xml/api-index-0.6.1.xml --- appstream-0.9.4/docs/api/xml/api-index-0.6.1.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-0.6.1.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - -]> - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-0.6.2.xml appstream-0.12.0/docs/api/xml/api-index-0.6.2.xml --- appstream-0.9.4/docs/api/xml/api-index-0.6.2.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-0.6.2.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - - -]> - -C -as_component_add_provided, function in AsComponent -as_component_add_url, function in AsComponent -as_component_get_url, function in AsComponent - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-0.6.5.xml appstream-0.12.0/docs/api/xml/api-index-0.6.5.xml --- appstream-0.9.4/docs/api/xml/api-index-0.6.5.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-0.6.5.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - -]> - -R -as_release_get_urgency, function in AsRelease -as_release_set_urgency, function in AsRelease - -U -as_urgency_kind_from_string, function in as-enums -as_urgency_kind_to_string, function in as-enums - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-0.7.0.xml appstream-0.12.0/docs/api/xml/api-index-0.7.0.xml --- appstream-0.9.4/docs/api/xml/api-index-0.7.0.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-0.7.0.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - -]> - -C -as_component_add_extends, function in AsComponent -as_component_add_language, function in AsComponent -as_component_get_extends, function in AsComponent -as_component_get_language, function in AsComponent -as_component_get_languages, function in AsComponent - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-0.8.0.xml appstream-0.12.0/docs/api/xml/api-index-0.8.0.xml --- appstream-0.9.4/docs/api/xml/api-index-0.8.0.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-0.8.0.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - -]> - -B -as_bundle_kind_to_string, function in as-enums - -C -as_component_add_bundle_id, function in AsComponent -as_component_get_bundle_id, function in AsComponent - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-0.8.1.xml appstream-0.12.0/docs/api/xml/api-index-0.8.1.xml --- appstream-0.9.4/docs/api/xml/api-index-0.8.1.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-0.8.1.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - -]> - -R -as_release_add_location, function in AsRelease -as_release_get_locations, function in AsRelease - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-0.8.2.xml appstream-0.12.0/docs/api/xml/api-index-0.8.2.xml --- appstream-0.9.4/docs/api/xml/api-index-0.8.2.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-0.8.2.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - -]> - -R -as_release_get_checksum, function in AsRelease -as_release_set_checksum, function in AsRelease - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-0.8.6.xml appstream-0.12.0/docs/api/xml/api-index-0.8.6.xml --- appstream-0.9.4/docs/api/xml/api-index-0.8.6.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-0.8.6.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - -]> - -R -as_release_get_size, function in AsRelease -as_release_set_size, function in AsRelease - -S -AsSizeKind, enum in AsRelease -as_size_kind_from_string, function in AsRelease -as_size_kind_to_string, function in AsRelease - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-0.9.2.xml appstream-0.12.0/docs/api/xml/api-index-0.9.2.xml --- appstream-0.9.4/docs/api/xml/api-index-0.9.2.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-0.9.2.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - -]> - -C -as_component_add_extension, function in AsComponent -as_component_add_translation, function in AsComponent -as_component_get_extensions, function in AsComponent -as_component_get_translations, function in AsComponent - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-deprecated.xml appstream-0.12.0/docs/api/xml/api-index-deprecated.xml --- appstream-0.9.4/docs/api/xml/api-index-deprecated.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-deprecated.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - -]> - - diff -Nru appstream-0.9.4/docs/api/xml/api-index-full.xml appstream-0.12.0/docs/api/xml/api-index-full.xml --- appstream-0.9.4/docs/api/xml/api-index-full.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/api-index-full.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,413 +0,0 @@ - - -]> - -A -as_arch_compatible, function in as-utils-private - -B -AsBundleKind, enum in as-enums -as_bundle_kind_from_string, function in as-enums -as_bundle_kind_to_string, function in as-enums - -C -AsCacheBuilder, struct in AsCacheBuilder -AsCacheBuilderClass, struct in AsCacheBuilder -AsCacheBuilderError, enum in AsCacheBuilder -AS_CACHE_BUILDER_ERROR, macro in AsCacheBuilder -as_cache_builder_error_quark, function in AsCacheBuilder -as_cache_builder_new, function in AsCacheBuilder -as_cache_builder_refresh, function in AsCacheBuilder -as_cache_builder_setup, function in AsCacheBuilder -as_cache_builder_set_data_source_directories, function in AsCacheBuilder -AsCategory, struct in AsCategory -AsCategory:directory, object property in AsCategory -AsCategory:excluded, object property in AsCategory -AsCategory:icon, object property in AsCategory -AsCategory:included, object property in AsCategory -AsCategory:level, object property in AsCategory -AsCategory:name, object property in AsCategory -AsCategory:subcategories, object property in AsCategory -AsCategory:summary, object property in AsCategory -AsCategoryClass, struct in AsCategory -as_category_add_subcategory, function in AsCategory -as_category_complete, function in AsCategory -as_category_get_directory, function in AsCategory -as_category_get_excluded, function in AsCategory -as_category_get_icon, function in AsCategory -as_category_get_included, function in AsCategory -as_category_get_level, function in AsCategory -as_category_get_name, function in AsCategory -as_category_get_subcategories, function in AsCategory -as_category_get_summary, function in AsCategory -as_category_has_subcategory, function in AsCategory -as_category_new, function in AsCategory -as_category_remove_subcategory, function in AsCategory -as_category_set_directory, function in AsCategory -as_category_set_icon, function in AsCategory -as_category_set_level, function in AsCategory -as_category_set_name, function in AsCategory -as_category_set_summary, function in AsCategory -AsChecksumKind, enum in AsRelease -as_checksum_kind_from_string, function in AsRelease -as_checksum_kind_to_string, function in AsRelease -AsComponent, struct in AsComponent -AsComponent:categories, object property in AsComponent -AsComponent:description, object property in AsComponent -AsComponent:developer-name, object property in AsComponent -AsComponent:icons, object property in AsComponent -AsComponent:id, object property in AsComponent -AsComponent:keywords, object property in AsComponent -AsComponent:kind, object property in AsComponent -AsComponent:name, object property in AsComponent -AsComponent:pkgnames, object property in AsComponent -AsComponent:project-group, object property in AsComponent -AsComponent:project-license, object property in AsComponent -AsComponent:screenshots, object property in AsComponent -AsComponent:summary, object property in AsComponent -AsComponent:urls, object property in AsComponent -AsComponentClass, struct in AsComponent -AsComponentKind, enum in AsComponent -as_component_add_bundle_id, function in AsComponent -as_component_add_extends, function in AsComponent -as_component_add_extension, function in AsComponent -as_component_add_icon, function in AsComponent -as_component_add_language, function in AsComponent -as_component_add_provided, function in AsComponent -as_component_add_release, function in AsComponent -as_component_add_screenshot, function in AsComponent -as_component_add_translation, function in AsComponent -as_component_add_url, function in AsComponent -as_component_get_active_locale, function in AsComponent -as_component_get_bundle_id, function in AsComponent -as_component_get_categories, function in AsComponent -as_component_get_compulsory_for_desktops, function in AsComponent -as_component_get_description, function in AsComponent -as_component_get_developer_name, function in AsComponent -as_component_get_extends, function in AsComponent -as_component_get_extensions, function in AsComponent -as_component_get_icons, function in AsComponent -as_component_get_icon_by_size, function in AsComponent -as_component_get_id, function in AsComponent -as_component_get_keywords, function in AsComponent -as_component_get_kind, function in AsComponent -as_component_get_language, function in AsComponent -as_component_get_languages, function in AsComponent -as_component_get_name, function in AsComponent -as_component_get_origin, function in AsComponent -as_component_get_pkgnames, function in AsComponent -as_component_get_project_group, function in AsComponent -as_component_get_project_license, function in AsComponent -as_component_get_provided, function in AsComponent -as_component_get_provided_for_kind, function in AsComponent -as_component_get_releases, function in AsComponent -as_component_get_screenshots, function in AsComponent -as_component_get_source_pkgname, function in AsComponent -as_component_get_summary, function in AsComponent -as_component_get_translations, function in AsComponent -as_component_get_url, function in AsComponent -as_component_has_bundle, function in AsComponent -as_component_has_category, function in AsComponent -as_component_is_compulsory_for_desktop, function in AsComponent -as_component_is_valid, function in AsComponent -as_component_kind_from_string, function in AsComponent -as_component_kind_to_string, function in AsComponent -as_component_new, function in AsComponent -as_component_set_active_locale, function in AsComponent -as_component_set_categories, function in AsComponent -as_component_set_compulsory_for_desktops, function in AsComponent -as_component_set_description, function in AsComponent -as_component_set_developer_name, function in AsComponent -as_component_set_id, function in AsComponent -as_component_set_keywords, function in AsComponent -as_component_set_kind, function in AsComponent -as_component_set_name, function in AsComponent -as_component_set_origin, function in AsComponent -as_component_set_pkgnames, function in AsComponent -as_component_set_project_group, function in AsComponent -as_component_set_project_license, function in AsComponent -as_component_set_source_pkgname, function in AsComponent -as_component_set_summary, function in AsComponent -as_component_to_string, function in AsComponent -as_copy_file, function in as-utils-private - -D -AsDatabase, struct in AsDatabase -AsDatabaseClass, struct in AsDatabase -AsDatabaseError, enum in AsDatabase -AS_DATABASE_ERROR, macro in AsDatabase -as_database_error_quark, function in AsDatabase -as_database_find_components, function in AsDatabase -as_database_get_all_components, function in AsDatabase -as_database_get_components_by_kind, function in AsDatabase -as_database_get_components_by_provided_item, function in AsDatabase -as_database_get_component_by_id, function in AsDatabase -as_database_get_location, function in AsDatabase -as_database_new, function in AsDatabase -as_database_open, function in AsDatabase -as_database_set_location, function in AsDatabase -AsDataPool, struct in AsDataPool -AsDataPoolClass, struct in AsDataPool -AsDataPoolError, enum in AsDataPool -AS_DATA_POOL_ERROR, macro in AsDataPool -as_data_pool_error_quark, function in AsDataPool -as_data_pool_get_components, function in AsDataPool -as_data_pool_get_component_by_id, function in AsDataPool -as_data_pool_get_locale, function in AsDataPool -as_data_pool_get_metadata_locations, function in AsDataPool -as_data_pool_new, function in AsDataPool -as_data_pool_set_locale, function in AsDataPool -as_data_pool_set_metadata_locations, function in AsDataPool -as_data_pool_update, function in AsDataPool -AsDistroDetails, struct in AsDistroDetails -AsDistroDetails:id, object property in AsDistroDetails -AsDistroDetails:name, object property in AsDistroDetails -AsDistroDetails:version, object property in AsDistroDetails -AsDistroDetailsClass, struct in AsDistroDetails -as_distro_details_get_bool, function in AsDistroDetails -as_distro_details_get_id, function in AsDistroDetails -as_distro_details_get_name, function in AsDistroDetails -as_distro_details_get_str, function in AsDistroDetails -as_distro_details_get_version, function in AsDistroDetails -as_distro_details_new, function in AsDistroDetails - -G -as_get_current_arch, function in as-utils-private -as_get_icon_repository_paths, function in AsDistroDetails -as_get_system_categories, function in AsMenuParser - -I -AsIcon, struct in AsIcon -AsIconClass, struct in AsIcon -AsIconKind, enum in AsIcon -as_icon_get_filename, function in AsIcon -as_icon_get_height, function in AsIcon -as_icon_get_kind, function in AsIcon -as_icon_get_name, function in AsIcon -as_icon_get_url, function in AsIcon -as_icon_get_width, function in AsIcon -as_icon_kind_from_string, function in AsIcon -as_icon_kind_to_string, function in AsIcon -as_icon_new, function in AsIcon -as_icon_set_filename, function in AsIcon -as_icon_set_height, function in AsIcon -as_icon_set_kind, function in AsIcon -as_icon_set_name, function in AsIcon -as_icon_set_url, function in AsIcon -as_icon_set_width, function in AsIcon -AsImage, struct in AsImage -AsImageClass, struct in AsImage -AsImageKind, enum in AsImage -as_image_get_height, function in AsImage -as_image_get_kind, function in AsImage -as_image_get_url, function in AsImage -as_image_get_width, function in AsImage -as_image_kind_from_string, function in AsImage -as_image_kind_to_string, function in AsImage -as_image_new, function in AsImage -as_image_set_height, function in AsImage -as_image_set_kind, function in AsImage -as_image_set_url, function in AsImage -as_image_set_width, function in AsImage -AsIssueImportance, enum in AsValidatorIssue -AsIssueKind, enum in AsValidatorIssue -as_is_cruft_locale, function in as-utils-private - -L -as_locale_strip_encoding, function in as-utils-private - -M -AsMenuParser, struct in AsMenuParser -AsMenuParser:update-category-data, object property in AsMenuParser -AsMenuParserClass, struct in AsMenuParser -as_menu_parser_get_update_category_data, function in AsMenuParser -as_menu_parser_new, function in AsMenuParser -as_menu_parser_new_from_file, function in AsMenuParser -as_menu_parser_parse, function in AsMenuParser -as_menu_parser_set_update_category_data, function in AsMenuParser -AsMetadata, struct in AsMetadata -AsMetadataClass, struct in AsMetadata -AsMetadataError, enum in AsMetadata -as_metadata_add_component, function in AsMetadata -as_metadata_clear_components, function in AsMetadata -as_metadata_components_to_distro_xml, function in AsMetadata -as_metadata_components_to_distro_yaml, function in AsMetadata -as_metadata_component_to_upstream_xml, function in AsMetadata -AS_METADATA_ERROR, macro in AsMetadata -as_metadata_error_quark, function in AsMetadata -as_metadata_get_architecture, function in AsMetadata -as_metadata_get_component, function in AsMetadata -as_metadata_get_components, function in AsMetadata -as_metadata_get_locale, function in AsMetadata -as_metadata_get_origin, function in AsMetadata -as_metadata_get_parser_mode, function in AsMetadata -as_metadata_get_update_existing, function in AsMetadata -as_metadata_get_write_header, function in AsMetadata -as_metadata_new, function in AsMetadata -as_metadata_parse_file, function in AsMetadata -as_metadata_parse_xml, function in AsMetadata -as_metadata_parse_yaml, function in AsMetadata -as_metadata_save_distro_xml, function in AsMetadata -as_metadata_save_distro_yaml, function in AsMetadata -as_metadata_save_upstream_xml, function in AsMetadata -as_metadata_set_architecture, function in AsMetadata -as_metadata_set_locale, function in AsMetadata -as_metadata_set_origin, function in AsMetadata -as_metadata_set_parser_mode, function in AsMetadata -as_metadata_set_update_existing, function in AsMetadata -as_metadata_set_write_header, function in AsMetadata - -P -AsParserMode, enum in AsMetadata -AsProvided, struct in AsProvided -AsProvidedClass, struct in AsProvided -AsProvidedKind, enum in AsProvided -as_provided_add_item, function in AsProvided -as_provided_get_items, function in AsProvided -as_provided_get_kind, function in AsProvided -as_provided_has_item, function in AsProvided -as_provided_kind_from_string, function in AsProvided -as_provided_kind_to_l10n_string, function in AsProvided -as_provided_kind_to_string, function in AsProvided -as_provided_new, function in AsProvided -as_provided_set_kind, function in AsProvided -as_ptr_array_to_strv, function in as-utils-private - -R -AsRelease, struct in AsRelease -AsReleaseClass, struct in AsRelease -as_release_add_location, function in AsRelease -as_release_get_active_locale, function in AsRelease -as_release_get_checksum, function in AsRelease -as_release_get_description, function in AsRelease -as_release_get_locations, function in AsRelease -as_release_get_size, function in AsRelease -as_release_get_timestamp, function in AsRelease -as_release_get_urgency, function in AsRelease -as_release_get_version, function in AsRelease -as_release_new, function in AsRelease -as_release_set_active_locale, function in AsRelease -as_release_set_checksum, function in AsRelease -as_release_set_description, function in AsRelease -as_release_set_size, function in AsRelease -as_release_set_timestamp, function in AsRelease -as_release_set_urgency, function in AsRelease -as_release_set_version, function in AsRelease -as_reset_umask, function in as-utils-private - -S -AsScreenshot, struct in AsScreenshot -AsScreenshotClass, struct in AsScreenshot -AsScreenshotKind, enum in AsScreenshot -as_screenshot_add_image, function in AsScreenshot -as_screenshot_get_active_locale, function in AsScreenshot -as_screenshot_get_caption, function in AsScreenshot -as_screenshot_get_caption_table, function in as-screenshot-private -as_screenshot_get_images, function in AsScreenshot -as_screenshot_get_kind, function in AsScreenshot -as_screenshot_is_valid, function in AsScreenshot -as_screenshot_kind_from_string, function in AsScreenshot -as_screenshot_kind_to_string, function in AsScreenshot -as_screenshot_new, function in AsScreenshot -as_screenshot_set_active_locale, function in AsScreenshot -as_screenshot_set_caption, function in AsScreenshot -as_screenshot_set_kind, function in AsScreenshot -AsSizeKind, enum in AsRelease -as_size_kind_from_string, function in AsRelease -as_size_kind_to_string, function in AsRelease -as_str_replace, function in as-utils-private - -T -as_touch_location, function in as-utils-private -AsTranslation, struct in AsTranslation -AsTranslationClass, struct in AsTranslation -AsTranslationKind, enum in AsTranslation -as_translation_get_id, function in AsTranslation -as_translation_get_kind, function in AsTranslation -as_translation_kind_from_string, function in AsTranslation -as_translation_kind_to_string, function in AsTranslation -as_translation_new, function in AsTranslation -as_translation_set_id, function in AsTranslation -as_translation_set_kind, function in AsTranslation -AS_TYPE_CACHE_BUILDER, macro in AsCacheBuilder -AS_TYPE_CATEGORY, macro in AsCategory -AS_TYPE_COMPONENT, macro in AsComponent -AS_TYPE_DATABASE, macro in AsDatabase -AS_TYPE_DATA_POOL, macro in AsDataPool -AS_TYPE_DISTRO_DETAILS, macro in AsDistroDetails -AS_TYPE_ICON, macro in AsIcon -AS_TYPE_IMAGE, macro in AsImage -AS_TYPE_MENU_PARSER, macro in AsMenuParser -AS_TYPE_METADATA, macro in AsMetadata -AS_TYPE_PROVIDED, macro in AsProvided -AS_TYPE_RELEASE, macro in AsRelease -AS_TYPE_SCREENSHOT, macro in AsScreenshot -AS_TYPE_TRANSLATION, macro in AsTranslation -AS_TYPE_VALIDATOR, macro in AsValidator -AS_TYPE_VALIDATOR_ISSUE, macro in AsValidatorIssue -AS_TYPE_XMLDATA, macro in AsXMLData -AS_TYPE_YAMLDATA, macro in AsYAMLData - -U -AsUrgencyKind, enum in as-enums -as_urgency_kind_from_string, function in as-enums -as_urgency_kind_to_string, function in as-enums -AsUrlKind, enum in as-enums -as_url_kind_from_string, function in as-enums -as_url_kind_to_string, function in as-enums -as_utils_categories_from_str, function in as-utils-private -as_utils_categories_from_strv, function in as-utils-private -as_utils_delete_dir_recursive, function in as-utils-private -as_utils_find_files, function in as-utils-private -as_utils_find_files_matching, function in as-utils-private -as_utils_is_root, function in as-utils-private -as_utils_is_writable, function in as-utils-private - -V -AsValidator, struct in AsValidator -AsValidatorClass, struct in AsValidator -AsValidatorIssue, struct in AsValidatorIssue -AsValidatorIssueClass, struct in AsValidatorIssue -as_validator_clear_issues, function in AsValidator -as_validator_get_issues, function in AsValidator -as_validator_issue_get_importance, function in AsValidatorIssue -as_validator_issue_get_kind, function in AsValidatorIssue -as_validator_issue_get_location, function in AsValidatorIssue -as_validator_issue_get_message, function in AsValidatorIssue -as_validator_issue_new, function in AsValidatorIssue -as_validator_issue_set_importance, function in AsValidatorIssue -as_validator_issue_set_kind, function in AsValidatorIssue -as_validator_issue_set_location, function in AsValidatorIssue -as_validator_issue_set_message, function in AsValidatorIssue -as_validator_new, function in AsValidator -as_validator_validate_data, function in AsValidator -as_validator_validate_file, function in AsValidator -as_validator_validate_tree, function in AsValidator - -X -AsXMLData, struct in AsXMLData -AsXMLDataClass, struct in AsXMLData -as_xmldata_initialize, function in AsXMLData -as_xmldata_new, function in AsXMLData -as_xmldata_parse_component_node, function in AsXMLData -as_xmldata_parse_distro_data, function in AsXMLData -as_xmldata_parse_upstream_data, function in AsXMLData -as_xmldata_serialize_to_distro, function in AsXMLData -as_xmldata_serialize_to_upstream, function in AsXMLData -as_xmldata_set_parser_mode, function in AsXMLData -as_xmldata_update_cpt_with_upstream_data, function in AsXMLData - -Y -AsYAMLData, struct in AsYAMLData -AsYAMLDataClass, struct in AsYAMLData -as_yamldata_get_locale, function in AsYAMLData -as_yamldata_initialize, function in AsYAMLData -as_yamldata_new, function in AsYAMLData -as_yamldata_parse_distro_data, function in AsYAMLData -as_yamldata_serialize_to_distro, function in AsYAMLData -as_yamldata_set_locale, function in AsYAMLData - - diff -Nru appstream-0.9.4/docs/api/xml/appstream-doc.bottom appstream-0.12.0/docs/api/xml/appstream-doc.bottom --- appstream-0.9.4/docs/api/xml/appstream-doc.bottom 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/appstream-doc.bottom 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-cache-builder.xml appstream-0.12.0/docs/api/xml/as-cache-builder.xml --- appstream-0.9.4/docs/api/xml/as-cache-builder.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-cache-builder.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,237 +0,0 @@ - - -]> - - -AsCacheBuilder -3 -APPSTREAM Library - - -AsCacheBuilder - - - - -Functions - - - - - -GQuark -as_cache_builder_error_quark () -AsCacheBuilder * -as_cache_builder_new () -gboolean -as_cache_builder_setup () -gboolean -as_cache_builder_refresh () -void -as_cache_builder_set_data_source_directories () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_CACHE_BUILDER -structAsCacheBuilderClass -#defineAS_CACHE_BUILDER_ERROR -enumAsCacheBuilderError -AsCacheBuilder - - - - - - -Object Hierarchy - GObject - ╰── AsCacheBuilder - - - - - -Description - - - - - -Functions - -as_cache_builder_error_quark () -as_cache_builder_error_quark -GQuark -as_cache_builder_error_quark (void); - -Returns - An error quark. - - -as_cache_builder_new () -as_cache_builder_new -AsCacheBuilder * -as_cache_builder_new (void); -Creates a new AsCacheBuilder. - -Returns - a new AsCacheBuilder. -[transfer full] - - -as_cache_builder_setup () -as_cache_builder_setup -gboolean -as_cache_builder_setup (AsCacheBuilder *builder, - const gchar *dbpath, - GError **error); -Initialize the cache builder. - -Parameters - - - - - - -builder -An instance of AsCacheBuilder. - -dbpath - Path to the database directory, or NULL to use default. -[nullable][default NULL] - - - -as_cache_builder_refresh () -as_cache_builder_refresh -gboolean -as_cache_builder_refresh (AsCacheBuilder *builder, - gboolean force, - GError **error); -Update the AppStream Xapian cache. - -Parameters - - - - - - -builder -An instance of AsCacheBuilder. - -force -Enforce refresh, even if source data has not changed. - - - -Returns - TRUE if the cache was updated, FALSE on error or if the cache update was not necessary and has been skipped. - - -as_cache_builder_set_data_source_directories () -as_cache_builder_set_data_source_directories -void -as_cache_builder_set_data_source_directories - (AsCacheBuilder *self, - gchar **dirs); -Set locations for the database builder to pull it's data from. -This is mainly used for testing purposes. Each location should have an -"xmls" and/or "yaml" subdirectory with the actual data as (compressed) -AppStream XML or DEP-11 YAML in it. - -Parameters - - - - - - -dirs - a zero-terminated array of data input directories. -[array zero-terminated=1] - - - - - -Types and Values - -AS_TYPE_CACHE_BUILDER -AS_TYPE_CACHE_BUILDER -#define AS_TYPE_CACHE_BUILDER (as_cache_builder_get_type ()) - - - - - -struct AsCacheBuilderClass -AsCacheBuilderClass -struct AsCacheBuilderClass { - GObjectClass parent_class; -}; - - - - - -AS_CACHE_BUILDER_ERROR -AS_CACHE_BUILDER_ERROR -#define AS_CACHE_BUILDER_ERROR as_cache_builder_error_quark () - - - - - -enum AsCacheBuilderError -AsCacheBuilderError -The error type. - -Members - - - - - - -AS_CACHE_BUILDER_ERROR_FAILED -Generic failure - - - -AS_CACHE_BUILDER_ERROR_CACHE_INCOMPLETE -The cache was built, but we had to ignore some metadata. - - - -AS_CACHE_BUILDER_ERROR_TARGET_NOT_WRITABLE -We do not have write-access to the cache target location. - - - - - - -AsCacheBuilder -AsCacheBuilder -typedef struct _AsCacheBuilder AsCacheBuilder; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-category.xml appstream-0.12.0/docs/api/xml/as-category.xml --- appstream-0.9.4/docs/api/xml/as-category.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-category.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,532 +0,0 @@ - - -]> - - -AsCategory -3 -APPSTREAM Library - - -AsCategory -Representation of a XDG category - - - -Functions - - - - - -AsCategory * -as_category_new () -void -as_category_complete () -const gchar * -as_category_get_directory () -void -as_category_set_directory () -const gchar * -as_category_get_name () -void -as_category_set_name () -const gchar * -as_category_get_summary () -void -as_category_set_summary () -const gchar * -as_category_get_icon () -void -as_category_set_icon () -gboolean -as_category_has_subcategory () -void -as_category_add_subcategory () -void -as_category_remove_subcategory () -GList * -as_category_get_included () -GList * -as_category_get_excluded () -GList * -as_category_get_subcategories () -gint -as_category_get_level () -void -as_category_set_level () - - - - - - -Properties - - - - - - -gchar *directoryRead / Write -gpointerexcludedRead -gchar *iconRead / Write -gpointerincludedRead -gintlevelRead / Write -gchar *nameRead / Write -gpointersubcategoriesRead -gchar *summaryRead - - - - - - -Types and Values - - - - - -#defineAS_TYPE_CATEGORY -structAsCategoryClass -AsCategory - - - - - - -Object Hierarchy - GObject - ╰── AsCategory - - - -Includes#include <appstream.h> - - - -Description -This object represents an XDG category, as defined at: -http://standards.freedesktop.org/menu-spec/menu-spec-1.0.htmlcategory-registry -The AsCategory object does not support all aspects of a menu. It's main purpose -is to be used in software-centers to show information about application-groups, -which are use to thematically group applications. -You can use AsMenuParser to get a set of supported default categories. -See also: AsMenuParser - - - -Functions - -as_category_new () -as_category_new -AsCategory * -as_category_new (void); -Creates a new AsCategory. - -Returns - a new AsCategory. -[transfer full] - - -as_category_complete () -as_category_complete -void -as_category_complete (AsCategory *cat); -Update incomplete category data with information from -"/usr/share/desktop-directories". - - -as_category_get_directory () -as_category_get_directory -const gchar * -as_category_get_directory (AsCategory *cat); -Get associated XDG directory name for this category, -in case one exists in "/usr/share/desktop-directories/". - -Parameters - - - - - - -cat -An instance of AsCategory. - - - - -as_category_set_directory () -as_category_set_directory -void -as_category_set_directory (AsCategory *cat, - const gchar *value); -Set associated XDG directory name for this category. - -Parameters - - - - - - -cat -An instance of AsCategory. - - - - -as_category_get_name () -as_category_get_name -const gchar * -as_category_get_name (AsCategory *cat); -Get the name of this category. - -Parameters - - - - - - -cat -An instance of AsCategory. - - - - -as_category_set_name () -as_category_set_name -void -as_category_set_name (AsCategory *cat, - const gchar *value); -Set the name of this category. - -Parameters - - - - - - -cat -An instance of AsCategory. - - - - -as_category_get_summary () -as_category_get_summary -const gchar * -as_category_get_summary (AsCategory *cat); -Get the summary (short description) of this category. - -Parameters - - - - - - -cat -An instance of AsCategory. - - - - -as_category_set_summary () -as_category_set_summary -void -as_category_set_summary (AsCategory *cat, - const gchar *value); -Get the summary (short description) of this category. - -Parameters - - - - - - -cat -An instance of AsCategory. - -value -A new short summary of this category. - - - - -as_category_get_icon () -as_category_get_icon -const gchar * -as_category_get_icon (AsCategory *cat); -Get the stock icon name for this category. - -Parameters - - - - - - -cat -An instance of AsCategory. - - - - -as_category_set_icon () -as_category_set_icon -void -as_category_set_icon (AsCategory *cat, - const gchar *value); -Set the stock icon name for this category. - -Parameters - - - - - - -cat -An instance of AsCategory. - - - - -as_category_has_subcategory () -as_category_has_subcategory -gboolean -as_category_has_subcategory (AsCategory *cat); -Test for sub-categories. - -Parameters - - - - - - -cat -An instance of AsCategory. - - - -Returns - TRUE if this category has any subcategory - - -as_category_add_subcategory () -as_category_add_subcategory -void -as_category_add_subcategory (AsCategory *cat, - AsCategory *subcat); -Add a subcategory to this category. - -Parameters - - - - - - -cat -An instance of AsCategory. - -subcat -A subcategory to add. - - - - -as_category_remove_subcategory () -as_category_remove_subcategory -void -as_category_remove_subcategory (AsCategory *cat, - AsCategory *subcat); -Drop a subcategory from this AsCategory. - -Parameters - - - - - - -cat -An instance of AsCategory. - -subcat -A subcategory to remove. - - - - -as_category_get_included () -as_category_get_included -GList * -as_category_get_included (AsCategory *cat); - -Parameters - - - - - - -cat -An instance of AsCategory. - - - -Returns - A list of category names. -[element-type utf8][transfer none] - - -as_category_get_excluded () -as_category_get_excluded -GList * -as_category_get_excluded (AsCategory *cat); - -Parameters - - - - - - -cat -An instance of AsCategory. - - - -Returns - A list of category names. -[element-type utf8][transfer none] - - -as_category_get_subcategories () -as_category_get_subcategories -GList * -as_category_get_subcategories (AsCategory *cat); - -Parameters - - - - - - -cat -An instance of AsCategory. - - - -Returns - A list of subcategories. -[element-type AsCategory][transfer none] - - -as_category_get_level () -as_category_get_level -gint -as_category_get_level (AsCategory *cat); - - -as_category_set_level () -as_category_set_level -void -as_category_set_level (AsCategory *cat, - gint value); - - - - -Types and Values - -AS_TYPE_CATEGORY -AS_TYPE_CATEGORY -#define AS_TYPE_CATEGORY (as_category_get_type ()) - - - - - -struct AsCategoryClass -AsCategoryClass -struct AsCategoryClass { - GObjectClass parent_class; -}; - - - - - -AsCategory -AsCategory -typedef struct _AsCategory AsCategory; - - - - - - -Property Details -The <literal>“directory”</literal> property -AsCategory:directory - “directory” gchar * -directory.Flags: Read / Write -Default value: NULL - -The <literal>“excluded”</literal> property -AsCategory:excluded - “excluded” gpointer -excluded.Flags: Read - -The <literal>“icon”</literal> property -AsCategory:icon - “icon” gchar * -icon.Flags: Read / Write -Default value: NULL - -The <literal>“included”</literal> property -AsCategory:included - “included” gpointer -included.Flags: Read - -The <literal>“level”</literal> property -AsCategory:level - “level” gint -level.Flags: Read / Write -Default value: 0 - -The <literal>“name”</literal> property -AsCategory:name - “name” gchar * -name.Flags: Read / Write -Default value: NULL - -The <literal>“subcategories”</literal> property -AsCategory:subcategories - “subcategories” gpointer -subcategories.Flags: Read - -The <literal>“summary”</literal> property -AsCategory:summary - “summary” gchar * -summary.Flags: Read -Default value: NULL - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-component.xml appstream-0.12.0/docs/api/xml/as-component.xml --- appstream-0.9.4/docs/api/xml/as-component.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-component.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,1853 +0,0 @@ - - -]> - - -AsComponent -3 -APPSTREAM Library - - -AsComponent -Object representing a software component - - - -Functions - - - - - -const gchar * -as_component_kind_to_string () -AsComponentKind -as_component_kind_from_string () -AsComponent * -as_component_new () -gboolean -as_component_is_valid () -gchar * -as_component_to_string () -gchar * -as_component_get_active_locale () -void -as_component_set_active_locale () -AsComponentKind -as_component_get_kind () -void -as_component_set_kind () -const gchar * -as_component_get_id () -void -as_component_set_id () -const gchar * -as_component_get_origin () -void -as_component_set_origin () -gchar ** -as_component_get_pkgnames () -void -as_component_set_pkgnames () -const gchar * -as_component_get_source_pkgname () -void -as_component_set_source_pkgname () -const gchar * -as_component_get_name () -void -as_component_set_name () -const gchar * -as_component_get_summary () -void -as_component_set_summary () -const gchar * -as_component_get_description () -void -as_component_set_description () -const gchar * -as_component_get_project_license () -void -as_component_set_project_license () -const gchar * -as_component_get_project_group () -void -as_component_set_project_group () -const gchar * -as_component_get_developer_name () -void -as_component_set_developer_name () -gchar ** -as_component_get_compulsory_for_desktops () -void -as_component_set_compulsory_for_desktops () -gboolean -as_component_is_compulsory_for_desktop () -gchar ** -as_component_get_categories () -void -as_component_set_categories () -gboolean -as_component_has_category () -GPtrArray * -as_component_get_screenshots () -void -as_component_add_screenshot () -gchar ** -as_component_get_keywords () -void -as_component_set_keywords () -GPtrArray * -as_component_get_icons () -AsIcon * -as_component_get_icon_by_size () -void -as_component_add_icon () -void -as_component_add_provided () -AsProvided * -as_component_get_provided_for_kind () -GList * -as_component_get_provided () -const gchar * -as_component_get_url () -void -as_component_add_url () -GPtrArray * -as_component_get_releases () -void -as_component_add_release () -GPtrArray * -as_component_get_extends () -void -as_component_add_extends () -GPtrArray * -as_component_get_extensions () -void -as_component_add_extension () -GList * -as_component_get_languages () -gint -as_component_get_language () -void -as_component_add_language () -GPtrArray * -as_component_get_translations () -void -as_component_add_translation () -gboolean -as_component_has_bundle () -const gchar * -as_component_get_bundle_id () -void -as_component_add_bundle_id () - - - - - - -Properties - - - - - - -GStrvcategoriesRead / Write -gchar *descriptionRead / Write -gchar *developer-nameRead / Write -gpointericonsRead -gchar *idRead / Write -GStrvkeywordsRead / Write -AsComponentKindkindRead / Write -gchar *nameRead / Write -GStrvpkgnamesRead / Write -gchar *project-groupRead / Write -gchar *project-licenseRead / Write -GPtrArray *screenshotsRead -gchar *summaryRead / Write -GHashTable *urlsRead - - - - - - -Types and Values - - - - - -#defineAS_TYPE_COMPONENT -structAsComponentClass -enumAsComponentKind -AsComponent - - - - - - -Object Hierarchy - GEnum - ╰── AsComponentKind - GObject - ╰── AsComponent - - - -Includes#include <appstream.h> - - - -Description -This object represents an Appstream software component which is associated -to a package in the distribution's repositories. -A component can be anything, ranging from an application to a font, a codec or -even a non-visual software project providing libraries and python-modules for -other applications to use. -The type of the component is stored as AsComponentKind and can be queried to -find out which kind of component we're dealing with. -See also: AsProvidesKind, AsDatabase - - - -Functions - -as_component_kind_to_string () -as_component_kind_to_string -const gchar * -as_component_kind_to_string (AsComponentKind kind); -Converts the enumerated value to an text representation. - -Parameters - - - - - - -kind -the AsComponentKind. - - - -Returns - string version of kind - - - -as_component_kind_from_string () -as_component_kind_from_string -AsComponentKind -as_component_kind_from_string (const gchar *kind_str); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -kind_str -the string. - - - -Returns - a AsComponentKind or AS_COMPONENT_KIND_UNKNOWN for unknown - - -as_component_new () -as_component_new -AsComponent * -as_component_new (void); -Creates a new AsComponent. - -Returns - a new AsComponent. -[transfer full] - - -as_component_is_valid () -as_component_is_valid -gboolean -as_component_is_valid (AsComponent *cpt); -Check if the essential properties of this Component are -populated with useful data. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - TRUE if the component data was validated successfully. - - -as_component_to_string () -as_component_to_string -gchar * -as_component_to_string (AsComponent *cpt); -Returns a string identifying this component. -(useful for debugging) - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - A descriptive string. -[transfer full] - - -as_component_get_active_locale () -as_component_get_active_locale -gchar * -as_component_get_active_locale (AsComponent *cpt); -Get the current active locale for this component, which -is used to get localized messages. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the current active locale. - - -as_component_set_active_locale () -as_component_set_active_locale -void -as_component_set_active_locale (AsComponent *cpt, - const gchar *locale); -Set the current active locale for this component, which -is used to get localized messages. -If the AsComponent was fetched from a localized database, usually only -one locale is available. - -Parameters - - - - - - -cpt -a AsComponent instance. - -locale - the locale, or NULL. e.g. "en_GB". -[nullable] - - - -as_component_get_kind () -as_component_get_kind -AsComponentKind -as_component_get_kind (AsComponent *cpt); -Returns the AsComponentKind of this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the kind of this. - - -as_component_set_kind () -as_component_set_kind -void -as_component_set_kind (AsComponent *cpt, - AsComponentKind value); -Sets the AsComponentKind of this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - -value -the AsComponentKind. - - - - -as_component_get_id () -as_component_get_id -const gchar * -as_component_get_id (AsComponent *cpt); -Set the unique identifier for this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the unique identifier. - - -as_component_set_id () -as_component_set_id -void -as_component_set_id (AsComponent *cpt, - const gchar *value); -Set the unique identifier for this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - -value -the unique identifier. - - - - -as_component_get_origin () -as_component_get_origin -const gchar * -as_component_get_origin (AsComponent *cpt); - -Parameters - - - - - - -cpt -a AsComponent instance. - - - - -as_component_set_origin () -as_component_set_origin -void -as_component_set_origin (AsComponent *cpt, - const gchar *origin); - -Parameters - - - - - - -cpt -a AsComponent instance. - -origin -the origin. - - - - -as_component_get_pkgnames () -as_component_get_pkgnames -gchar ** -as_component_get_pkgnames (AsComponent *cpt); -Get a list of package names which this component consists of. -This usually is just one package name. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - String array of package names. -[transfer none] - - -as_component_set_pkgnames () -as_component_set_pkgnames -void -as_component_set_pkgnames (AsComponent *cpt, - gchar **value); -Set a list of package names this component consists of. -(This should usually be just one package name) - -Parameters - - - - - - -cpt -a AsComponent instance. - -value -. -[array zero-terminated=1] - - - -as_component_get_source_pkgname () -as_component_get_source_pkgname -const gchar * -as_component_get_source_pkgname (AsComponent *cpt); - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the source package name. - - -as_component_set_source_pkgname () -as_component_set_source_pkgname -void -as_component_set_source_pkgname (AsComponent *cpt, - const gchar *spkgname); - -Parameters - - - - - - -cpt -a AsComponent instance. - -spkgname -the source package name. - - - - -as_component_get_name () -as_component_get_name -const gchar * -as_component_get_name (AsComponent *cpt); -A human-readable name for this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the name. - - -as_component_set_name () -as_component_set_name -void -as_component_set_name (AsComponent *cpt, - const gchar *value, - const gchar *locale); -Set a human-readable name for this component. - -Parameters - - - - - - -cpt -A valid AsComponent - -value -The name - -locale - The locale the used for this value, or NULL to use the current active one. -[nullable] - - - -as_component_get_summary () -as_component_get_summary -const gchar * -as_component_get_summary (AsComponent *cpt); -Get a short description of this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the summary. - - -as_component_set_summary () -as_component_set_summary -void -as_component_set_summary (AsComponent *cpt, - const gchar *value, - const gchar *locale); -Set a short description for this component. - -Parameters - - - - - - -cpt -A valid AsComponent - -value -The summary - -locale - The locale the used for this value, or NULL to use the current active one. -[nullable] - - - -as_component_get_description () -as_component_get_description -const gchar * -as_component_get_description (AsComponent *cpt); -Get the localized long description of this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the description. - - -as_component_set_description () -as_component_set_description -void -as_component_set_description (AsComponent *cpt, - const gchar *value, - const gchar *locale); -Set long description for this component. - -Parameters - - - - - - -cpt -A valid AsComponent - -value -The long description - -locale - The locale the used for this value, or NULL to use the current active one. -[nullable] - - - -as_component_get_project_license () -as_component_get_project_license -const gchar * -as_component_get_project_license (AsComponent *cpt); -Get the license of the project this component belongs to. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the license. - - -as_component_set_project_license () -as_component_set_project_license -void -as_component_set_project_license (AsComponent *cpt, - const gchar *value); -Set the project license. - -Parameters - - - - - - -cpt -a AsComponent instance. - -value -the project license. - - - - -as_component_get_project_group () -as_component_get_project_group -const gchar * -as_component_get_project_group (AsComponent *cpt); -Get the component's project group. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the project group. - - -as_component_set_project_group () -as_component_set_project_group -void -as_component_set_project_group (AsComponent *cpt, - const gchar *value); -Set the component's project group. - -Parameters - - - - - - -cpt -a AsComponent instance. - -value -the project group. - - - - -as_component_get_developer_name () -as_component_get_developer_name -const gchar * -as_component_get_developer_name (AsComponent *cpt); -Get the component's developer or development team name. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - the developer name. - - -as_component_set_developer_name () -as_component_set_developer_name -void -as_component_set_developer_name (AsComponent *cpt, - const gchar *value, - const gchar *locale); -Set the the component's developer or development team name. - -Parameters - - - - - - -cpt -a AsComponent instance. - -value -the developer or developer team name - -locale - the locale, or NULL. e.g. "en_GB". -[nullable] - - - -as_component_get_compulsory_for_desktops () -as_component_get_compulsory_for_desktops -gchar ** -as_component_get_compulsory_for_desktops - (AsComponent *cpt); - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - A list of desktops where this component is compulsory. -[transfer none] - - -as_component_set_compulsory_for_desktops () -as_component_set_compulsory_for_desktops -void -as_component_set_compulsory_for_desktops - (AsComponent *cpt, - gchar **value); -Set a list of desktops where this component is compulsory. - -Parameters - - - - - - -cpt -a AsComponent instance. - -value - the array of desktop ids. -[array zero-terminated=1] - - - -as_component_is_compulsory_for_desktop () -as_component_is_compulsory_for_desktop -gboolean -as_component_is_compulsory_for_desktop - (AsComponent *cpt, - const gchar *desktop); -Check if this component is compulsory for the given desktop. - -Parameters - - - - - - -cpt -an AsComponent object - -desktop -the desktop-id to test for - - - -Returns - TRUE if compulsory, FALSE otherwise. - - -as_component_get_categories () -as_component_get_categories -gchar ** -as_component_get_categories (AsComponent *cpt); - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - String array of categories. -[transfer none] - - -as_component_set_categories () -as_component_set_categories -void -as_component_set_categories (AsComponent *cpt, - gchar **value); - -Parameters - - - - - - -cpt -a AsComponent instance. - -value - the categories name. -[array zero-terminated=1] - - - -as_component_has_category () -as_component_has_category -gboolean -as_component_has_category (AsComponent *cpt, - const gchar *category); -Check if component is in the specified category. - -Parameters - - - - - - -cpt -an AsComponent object - -category -the specified category to check - - - -Returns - TRUE if the component is in the specified category. - - -as_component_get_screenshots () -as_component_get_screenshots -GPtrArray * -as_component_get_screenshots (AsComponent *cpt); -Get a list of associated screenshots. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - an array of AsScreenshot instances. -[element-type AsScreenshot][transfer none] - - -as_component_add_screenshot () -as_component_add_screenshot -void -as_component_add_screenshot (AsComponent *cpt, - AsScreenshot *sshot); -Add an AsScreenshot to this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - -sshot -The AsScreenshot to add - - - - -as_component_get_keywords () -as_component_get_keywords -gchar ** -as_component_get_keywords (AsComponent *cpt); - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - String array of keywords. -[transfer none] - - -as_component_set_keywords () -as_component_set_keywords -void -as_component_set_keywords (AsComponent *cpt, - gchar **value, - const gchar *locale); -Set keywords for this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - -value - String-array of keywords. -[array zero-terminated=1] -locale - Locale of the values, or NULL to use current locale. -[nullable] - - - -as_component_get_icons () -as_component_get_icons -GPtrArray * -as_component_get_icons (AsComponent *cpt); - -Parameters - - - - - - -cpt -an AsComponent instance - - - -Returns - A GPtrArray of all icons for this component. -[element-type AsIcon][transfer none] - - -as_component_get_icon_by_size () -as_component_get_icon_by_size -AsIcon * -as_component_get_icon_by_size (AsComponent *cpt, - guint width, - guint height); -Gets an icon matching the size constraints. -The icons are not filtered by type, and the first icon -which matches the size is returned. -If you want more control over which icons you use for displaying, -use the as_component_get_icons() function to get a list of all icons. - -Parameters - - - - - - -cpt -an AsComponent instance - -width -The icon width in pixels. - -height -the icon height in pixels. - - - -Returns - An icon matching the given width/height, or NULL if not found. -[transfer none] - - -as_component_add_icon () -as_component_add_icon -void -as_component_add_icon (AsComponent *cpt, - AsIcon *icon); -Add an icon to this component. - -Parameters - - - - - - -cpt -an AsComponent instance - -icon -the valid AsIcon instance to add. - - - - -as_component_add_provided () -as_component_add_provided -void -as_component_add_provided (AsComponent *cpt, - AsProvided *prov); -Add a set of provided items to this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - -prov -a AsProvided instance. - - -Since: 0.6.2 - -as_component_get_provided_for_kind () -as_component_get_provided_for_kind -AsProvided * -as_component_get_provided_for_kind (AsComponent *cpt, - AsProvidedKind kind); -Get an AsProvided object for the given interface type, -containing information about the public interfaces (mimetypes, firmware, DBus services, ...) -this component provides. - -Parameters - - - - - - -cpt -a AsComponent instance. - -kind -kind of the provided item, e.g. AS_PROVIDED_KIND_MIMETYPE - - - -Returns - AsProvided containing the items this component provides, or NULL. -[transfer none] - - -as_component_get_provided () -as_component_get_provided -GList * -as_component_get_provided (AsComponent *cpt); -Get a list of AsProvided objects associated with this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - A list of AsProvided objects. -[transfer container][element-type AsProvided] - - -as_component_get_url () -as_component_get_url -const gchar * -as_component_get_url (AsComponent *cpt, - AsUrlKind url_kind); -Gets a URL. - -Parameters - - - - - - -cpt -a AsComponent instance. - -url_kind -the URL kind, e.g. AS_URL_KIND_HOMEPAGE. - - - -Returns - string, or NULL if unset. -[nullable] -Since: 0.6.2 - -as_component_add_url () -as_component_add_url -void -as_component_add_url (AsComponent *cpt, - AsUrlKind url_kind, - const gchar *url); -Adds some URL data to the component. - -Parameters - - - - - - -cpt -a AsComponent instance. - -url_kind -the URL kind, e.g. AS_URL_KIND_HOMEPAGE - -url -the full URL. - - -Since: 0.6.2 - -as_component_get_releases () -as_component_get_releases -GPtrArray * -as_component_get_releases (AsComponent *cpt); -Get an array of the AsRelease items this component -provides. - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - A list of releases. -[element-type AsRelease][transfer none] - - -as_component_add_release () -as_component_add_release -void -as_component_add_release (AsComponent *cpt, - AsRelease *release); -Add an AsRelease to this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - -release -The AsRelease to add - - - - -as_component_get_extends () -as_component_get_extends -GPtrArray * -as_component_get_extends (AsComponent *cpt); -Returns a string list of IDs of components which -are extended by this addon. -See as_component_get_extends() for the reverse. - -Parameters - - - - - - -cpt -an AsComponent instance. - - - -Returns - A GPtrArray or NULL if not set. -[element-type utf8][transfer none] -Since: 0.7.0 - -as_component_add_extends () -as_component_add_extends -void -as_component_add_extends (AsComponent *cpt, - const gchar *cpt_id); -Add a reference to the extended component - -Parameters - - - - - - -cpt -a AsComponent instance. - -cpt_id -The id of a component which is extended by this component - - -Since: 0.7.0 - -as_component_get_extensions () -as_component_get_extensions -GPtrArray * -as_component_get_extensions (AsComponent *cpt); -Returns a string list of IDs of components which -are addons extending this component in functionality. -This is the reverse of as_component_get_extends() - -Parameters - - - - - - -cpt -an AsComponent instance. - - - -Returns - A GPtrArray or NULL if not set. -[element-type utf8][transfer none] -Since: 0.9.2 - -as_component_add_extension () -as_component_add_extension -void -as_component_add_extension (AsComponent *cpt, - const gchar *cpt_id); -Add a reference to the extension enhancing this component. - -Parameters - - - - - - -cpt -a AsComponent instance. - -cpt_id -The id of a component extending this component. - - -Since: 0.9.2 - -as_component_get_languages () -as_component_get_languages -GList * -as_component_get_languages (AsComponent *cpt); -Get a list of all languages. - -Parameters - - - - - - -cpt -an AsComponent instance. - - - -Returns - list of locales. -[transfer container][element-type utf8] -Since: 0.7.0 - -as_component_get_language () -as_component_get_language -gint -as_component_get_language (AsComponent *cpt, - const gchar *locale); -Gets the translation coverage in percent for a specific locale - -Parameters - - - - - - -cpt -an AsComponent instance. - -locale - the locale, or NULL. e.g. "en_GB". -[nullable] - - -Returns - a percentage value, -1 if locale was not found -Since: 0.7.0 - -as_component_add_language () -as_component_add_language -void -as_component_add_language (AsComponent *cpt, - const gchar *locale, - gint percentage); -Adds a language to the component. - -Parameters - - - - - - -cpt -an AsComponent instance. - -locale - the locale, or NULL. e.g. "en_GB". -[nullable] -percentage -the percentage completion of the translation, 0 for locales with unknown amount of translation - - -Since: 0.7.0 - -as_component_get_translations () -as_component_get_translations -GPtrArray * -as_component_get_translations (AsComponent *cpt); -Get a GPtrArray of AsTranslation objects describing the -translation systems and translation-ids (e.g. Gettext domains) used -by this software component. -Only set for metainfo files. - -Parameters - - - - - - -cpt -an AsComponent instance. - - - -Returns - An array of AsTranslation objects. -[transfer none][element-type AsTranslation] -Since: 0.9.2 - -as_component_add_translation () -as_component_add_translation -void -as_component_add_translation (AsComponent *cpt, - AsTranslation *tr); -Assign an AsTranslation object describing the translation system used -by this component. - -Parameters - - - - - - -cpt -an AsComponent instance. - -tr -an AsTranslation instance. - - -Since: 0.9.2 - -as_component_has_bundle () -as_component_has_bundle -gboolean -as_component_has_bundle (AsComponent *cpt); - -Parameters - - - - - - -cpt -a AsComponent instance. - - - -Returns - TRUE if this component has a bundle-id associated. - - -as_component_get_bundle_id () -as_component_get_bundle_id -const gchar * -as_component_get_bundle_id (AsComponent *cpt, - AsBundleKind bundle_kind); -Gets a bundle identifier string. - -Parameters - - - - - - -cpt -a AsComponent instance. - -bundle_kind -the bundle kind, e.g. AS_BUNDLE_KIND_LIMBA. - - - -Returns - string, or NULL if unset. -[nullable] -Since: 0.8.0 - -as_component_add_bundle_id () -as_component_add_bundle_id -void -as_component_add_bundle_id (AsComponent *cpt, - AsBundleKind bundle_kind, - const gchar *id); -Adds a bundle identifier to the component. - -Parameters - - - - - - -cpt -a AsComponent instance. - -bundle_kind -the URL kind, e.g. AS_BUNDLE_KIND_LIMBA - -id -The bundle identification string - - -Since: 0.8.0 - - - -Types and Values - -AS_TYPE_COMPONENT -AS_TYPE_COMPONENT -#define AS_TYPE_COMPONENT (as_component_get_type ()) - - - - - -struct AsComponentClass -AsComponentClass -struct AsComponentClass { - GObjectClass parent_class; -}; - - - - - -enum AsComponentKind -AsComponentKind -The type of an AsComponent. - -Members - - - - - - -AS_COMPONENT_KIND_UNKNOWN -Type invalid or not known - - - -AS_COMPONENT_KIND_GENERIC -A generic (= without specialized type) component - - - -AS_COMPONENT_KIND_DESKTOP_APP -An application with a .desktop-file - - - -AS_COMPONENT_KIND_FONT -A font - - - -AS_COMPONENT_KIND_CODEC -A multimedia codec - - - -AS_COMPONENT_KIND_INPUTMETHOD -An input-method provider - - - -AS_COMPONENT_KIND_ADDON -An extension of existing software, which does not run standalone - - - -AS_COMPONENT_KIND_FIRMWARE -Firmware - - - - - - -AsComponent -AsComponent -typedef struct _AsComponent AsComponent; - - - - - - -Property Details -The <literal>“categories”</literal> property -AsComponent:categories - “categories” GStrv -string array of categories -Flags: Read / Write - -The <literal>“description”</literal> property -AsComponent:description - “description” gchar * -the description -Flags: Read / Write -Default value: NULL - -The <literal>“developer-name”</literal> property -AsComponent:developer-name - “developer-name” gchar * -the developer name -Flags: Read / Write -Default value: NULL - -The <literal>“icons”</literal> property -AsComponent:icons - “icons” gpointer -hash map of icon urls and sizes - -[type GList(AsIcon)]Flags: Read - -The <literal>“id”</literal> property -AsComponent:id - “id” gchar * -the unique identifier -Flags: Read / Write -Default value: NULL - -The <literal>“keywords”</literal> property -AsComponent:keywords - “keywords” GStrv -string array of keywords -Flags: Read / Write - -The <literal>“kind”</literal> property -AsComponent:kind - “kind” AsComponentKind -the AsComponentKind of this component -Flags: Read / Write -Default value: AS_COMPONENT_KIND_UNKNOWN - -The <literal>“name”</literal> property -AsComponent:name - “name” gchar * -the name -Flags: Read / Write -Default value: NULL - -The <literal>“pkgnames”</literal> property -AsComponent:pkgnames - “pkgnames” GStrv -string array of packages name -Flags: Read / Write - -The <literal>“project-group”</literal> property -AsComponent:project-group - “project-group” gchar * -the project group -Flags: Read / Write -Default value: NULL - -The <literal>“project-license”</literal> property -AsComponent:project-license - “project-license” gchar * -the project license -Flags: Read / Write -Default value: NULL - -The <literal>“screenshots”</literal> property -AsComponent:screenshots - “screenshots” GPtrArray * -screenshots.Flags: Read - -The <literal>“summary”</literal> property -AsComponent:summary - “summary” gchar * -the summary -Flags: Read / Write -Default value: NULL - -The <literal>“urls”</literal> property -AsComponent:urls - “urls” GHashTable * -urls.Flags: Read - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-database.xml appstream-0.12.0/docs/api/xml/as-database.xml --- appstream-0.9.4/docs/api/xml/as-database.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-database.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,414 +0,0 @@ - - -]> - - -AsDatabase -3 -APPSTREAM Library - - -AsDatabase -Read-only access to the AppStream component database - - - -Functions - - - - - -AsDatabase * -as_database_new () -GQuark -as_database_error_quark () -gboolean -as_database_open () -const gchar * -as_database_get_location () -void -as_database_set_location () -GPtrArray * -as_database_find_components () -GPtrArray * -as_database_get_all_components () -AsComponent * -as_database_get_component_by_id () -GPtrArray * -as_database_get_components_by_provided_item () -GPtrArray * -as_database_get_components_by_kind () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_DATABASE -structAsDatabaseClass -enumAsDatabaseError -#defineAS_DATABASE_ERROR -AsDatabase - - - - - - -Object Hierarchy - GObject - ╰── AsDatabase - - - -Includes#include <appstream.h> - - - -Description -This object provides access to the Appstream Xapian database of available software components. -You can search for components using various criteria, as well as getting some information -about the data provided by this AppStream database. -By default, the global software component cache is used as datasource, unless a different database -is explicitly defined via as_database_set_location(). -A new cache can be created using the appstreamcli(1) utility. -See also: AsComponent, AsDataPool - - - -Functions - -as_database_new () -as_database_new -AsDatabase * -as_database_new (void); -Creates a new AsDatabase. - -Returns - a AsDatabase. -[transfer full] - - -as_database_error_quark () -as_database_error_quark -GQuark -as_database_error_quark (void); - -Returns - An error quark. - - -as_database_open () -as_database_open -gboolean -as_database_open (AsDatabase *db, - GError **error); -Open the current AppStream metadata cache for reading. - -Parameters - - - - - - -db -An instance of AsDatabase. - -error -A GError or NULL. - - - -Returns - TRUE on success, FALSE on error. - - -as_database_get_location () -as_database_get_location -const gchar * -as_database_get_location (AsDatabase *db); -Get the current path of the AppStream database we use. - -Parameters - - - - - - -db -An instance of AsDatabase. - - - - -as_database_set_location () -as_database_set_location -void -as_database_set_location (AsDatabase *db, - const gchar *dir); -Set the location of the AppStream database we use. - -Parameters - - - - - - -db -An instance of AsDatabase. - -dir -The directory of the Xapian database. - - - - -as_database_find_components () -as_database_find_components -GPtrArray * -as_database_find_components (AsDatabase *db, - const gchar *term, - const gchar *cats_str, - GError **error); -Find components in the AppStream database, which match a given term. -You can limit the search to a specific set of categories by setting the categories string to -a semicolon-separated list of lower-cased category names. - -Parameters - - - - - - -db -An instance of AsDatabase. - -term - a search-term to look for. -[nullable] -cats_str - A semicolon-delimited list of lower-cased category names, e.g. "science;development". -[nullable] -error -A GError or NULL. - - - -Returns - an array of AsComponent objects which have been found. -[element-type AsComponent][transfer full] - - -as_database_get_all_components () -as_database_get_all_components -GPtrArray * -as_database_get_all_components (AsDatabase *db, - GError **error); -Dump a list of all software components found in the database. - -Parameters - - - - - - -db -An instance of AsDatabase. - -error -A GError or NULL. - - - -Returns - an array of AsComponent objects. -[element-type AsComponent][transfer full] - - -as_database_get_component_by_id () -as_database_get_component_by_id -AsComponent * -as_database_get_component_by_id (AsDatabase *db, - const gchar *cid, - GError **error); -Get a component by its AppStream-ID. - -Parameters - - - - - - -db -An instance of AsDatabase. - -cid -the ID of the component, e.g. "org.kde.gwenview.desktop" - -error -A GError or NULL. - - - -Returns - an AsComponent or NULL if none was found. -[transfer full] - - -as_database_get_components_by_provided_item () -as_database_get_components_by_provided_item -GPtrArray * -as_database_get_components_by_provided_item - (AsDatabase *db, - AsProvidedKind kind, - const gchar *item, - GError **error); -Find components in the Appstream database. - -Parameters - - - - - - -db -An instance of AsDatabase. - -kind -an AsProvidesKind - -item -the name of the provided item. - -error -A GError or NULL. - - - -Returns - an array of AsComponent objects which have been found, NULL on error. -[element-type AsComponent][transfer full] - - -as_database_get_components_by_kind () -as_database_get_components_by_kind -GPtrArray * -as_database_get_components_by_kind (AsDatabase *db, - AsComponentKind kind, - GError **error); -Return a list of all components in the database which match a certain kind. - -Parameters - - - - - - -db -An instance of AsDatabase. - -kind -an AsComponentKind. - -error -A GError or NULL. - - - -Returns - an array of AsComponent objects which have been found, NULL on error. -[element-type AsComponent][transfer full] - - - - -Types and Values - -AS_TYPE_DATABASE -AS_TYPE_DATABASE -#define AS_TYPE_DATABASE (as_database_get_type ()) - - - - - -struct AsDatabaseClass -AsDatabaseClass -struct AsDatabaseClass { - GObjectClass parent_class; -}; - - - - - -enum AsDatabaseError -AsDatabaseError -A database query error. - -Members - - - - - - -AS_DATABASE_ERROR_FAILED -Generic failure - - - -AS_DATABASE_ERROR_MISSING -Database was not found - - - -AS_DATABASE_ERROR_CLOSED -Tried to perform action on a closed database. - - - -AS_DATABASE_ERROR_TERM_INVALID -A query term was invalid. - - - - - - -AS_DATABASE_ERROR -AS_DATABASE_ERROR -#define AS_DATABASE_ERROR as_database_error_quark () - - - - - -AsDatabase -AsDatabase -typedef struct _AsDatabase AsDatabase; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-data-pool.xml appstream-0.12.0/docs/api/xml/as-data-pool.xml --- appstream-0.9.4/docs/api/xml/as-data-pool.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-data-pool.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,335 +0,0 @@ - - -]> - - -AsDataPool -3 -APPSTREAM Library - - -AsDataPool -Collect and temporarily store metadata from different sources - - - -Functions - - - - - -GQuark -as_data_pool_error_quark () -AsDataPool * -as_data_pool_new () -const gchar * -as_data_pool_get_locale () -void -as_data_pool_set_locale () -gboolean -as_data_pool_update () -GList * -as_data_pool_get_components () -AsComponent * -as_data_pool_get_component_by_id () -GPtrArray * -as_data_pool_get_metadata_locations () -void -as_data_pool_set_metadata_locations () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_DATA_POOL -structAsDataPoolClass -enumAsDataPoolError -#defineAS_DATA_POOL_ERROR -AsDataPool - - - - - - -Object Hierarchy - GObject - ╰── AsDataPool - - - - - -Description -This class contains a temporary pool of metadata which has been collected from different -sources on the system. -It can directly be used, but usually it is accessed through a AsDatabase instance. -This class is used by internally by the cache builder, but might be useful for others. -See also: AsDatabase - - - -Functions - -as_data_pool_error_quark () -as_data_pool_error_quark -GQuark -as_data_pool_error_quark (void); - -Returns - An error quark. - - -as_data_pool_new () -as_data_pool_new -AsDataPool * -as_data_pool_new (void); -Creates a new AsDataPool. - -Returns - a AsDataPool. -[transfer full] - - -as_data_pool_get_locale () -as_data_pool_get_locale -const gchar * -as_data_pool_get_locale (AsDataPool *dpool); -Gets the currently used locale. - -Parameters - - - - - - -dpool -An instance of AsDataPool. - - - -Returns - Locale used for metadata parsing. - - -as_data_pool_set_locale () -as_data_pool_set_locale -void -as_data_pool_set_locale (AsDataPool *dpool, - const gchar *locale); -Sets the current locale which should be used when parsing metadata. - -Parameters - - - - - - -dpool -An instance of AsDataPool. - -locale -the locale. - - - - -as_data_pool_update () -as_data_pool_update -gboolean -as_data_pool_update (AsDataPool *dpool, - GError **error); -Builds an index of all found components in the watched locations. -The function will try to get as much data into the pool as possible, so even if -the updates completes with FALSE, it might still add components to the pool. - -Parameters - - - - - - -dpool -An instance of AsDataPool. - -error -A GError or NULL. - - - -Returns - TRUE if update completed without error. - - -as_data_pool_get_components () -as_data_pool_get_components -GList * -as_data_pool_get_components (AsDataPool *dpool); -Get a list of found components. - -Parameters - - - - - - -dpool -An instance of AsDataPool. - - - -Returns - a list of AsComponent instances, free with g_list_free(). -[element-type AsComponent][transfer container] - - -as_data_pool_get_component_by_id () -as_data_pool_get_component_by_id -AsComponent * -as_data_pool_get_component_by_id (AsDataPool *dpool, - const gchar *id); -Get a specific component by its ID. - -Parameters - - - - - - -dpool -An instance of AsDataPool. - -id -The AppStream-ID to look for. - - - -Returns - An AsComponent. -[transfer full] - - -as_data_pool_get_metadata_locations () -as_data_pool_get_metadata_locations -GPtrArray * -as_data_pool_get_metadata_locations (AsDataPool *dpool); -Return a list of all locations which are searched for metadata. - -Parameters - - - - - - -dpool -An instance of AsDataPool. - - - -Returns - A string-list of watched (absolute) filepaths. -[transfer none][element-type utf8] - - -as_data_pool_set_metadata_locations () -as_data_pool_set_metadata_locations -void -as_data_pool_set_metadata_locations (AsDataPool *dpool, - gchar **dirs); -Set locations for the data pool to read it's data from. -This is mainly used for testing purposes. Each location should have an -"xmls" and/or "yaml" subdirectory with the actual data as (compressed) -AppStream XML or DEP-11 YAML in it. - -Parameters - - - - - - -dpool -An instance of AsDataPool. - -dirs - a zero-terminated array of data input directories. -[array zero-terminated=1] - - - - - -Types and Values - -AS_TYPE_DATA_POOL -AS_TYPE_DATA_POOL -#define AS_TYPE_DATA_POOL (as_data_pool_get_type ()) - - - - - -struct AsDataPoolClass -AsDataPoolClass -struct AsDataPoolClass { - GObjectClass parent_class; -}; - - - - - -enum AsDataPoolError -AsDataPoolError -A metadata pool error. - -Members - - - - - - -AS_DATA_POOL_ERROR_FAILED -Generic failure - - - - - - -AS_DATA_POOL_ERROR -AS_DATA_POOL_ERROR -#define AS_DATA_POOL_ERROR as_data_pool_error_quark () - - - - - -AsDataPool -AsDataPool -typedef struct _AsDataPool AsDataPool; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-distro-details.xml appstream-0.12.0/docs/api/xml/as-distro-details.xml --- appstream-0.9.4/docs/api/xml/as-distro-details.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-distro-details.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,206 +0,0 @@ - - -]> - - -AsDistroDetails -3 -APPSTREAM Library - - -AsDistroDetails -Provides information about the current distribution - - - -Functions - - - - - -AsDistroDetails * -as_distro_details_new () -const gchar * -as_distro_details_get_id () -const gchar * -as_distro_details_get_name () -const gchar * -as_distro_details_get_version () -gchar * -as_distro_details_get_str () -gboolean -as_distro_details_get_bool () -gchar ** -as_get_icon_repository_paths () - - - - - - -Properties - - - - - - -gchar *idRead -gchar *nameRead -gchar *versionRead - - - - - - -Types and Values - - - - - -#defineAS_TYPE_DISTRO_DETAILS -structAsDistroDetailsClass -AsDistroDetails - - - - - - -Object Hierarchy - GObject - ╰── AsDistroDetails - - - -Includes#include <appstream.h> - - - -Description -This object abstracts various distribution-specific settings and provides information -about the (Linux) distribution which is currently in use. -It is used internalls to get information about the icon-store or the 3rd-party screenshot -service distributors may want to provide. -See also: AsDatabase - - - -Functions - -as_distro_details_new () -as_distro_details_new -AsDistroDetails * -as_distro_details_new (void); -Creates a new instance of AsDistroDetails. - -Returns - a AsDistroDetails. -[transfer full] - - -as_distro_details_get_id () -as_distro_details_get_id -const gchar * -as_distro_details_get_id (AsDistroDetails *distro); - - -as_distro_details_get_name () -as_distro_details_get_name -const gchar * -as_distro_details_get_name (AsDistroDetails *distro); - - -as_distro_details_get_version () -as_distro_details_get_version -const gchar * -as_distro_details_get_version (AsDistroDetails *distro); - - -as_distro_details_get_str () -as_distro_details_get_str -gchar * -as_distro_details_get_str (AsDistroDetails *distro, - const gchar *key); - - -as_distro_details_get_bool () -as_distro_details_get_bool -gboolean -as_distro_details_get_bool (AsDistroDetails *distro, - const gchar *key); - - -as_get_icon_repository_paths () -as_get_icon_repository_paths -gchar ** -as_get_icon_repository_paths (void); -Returns list of icon-paths for software-center applications to use. -Icons of software (even if it is not installed) are stored in these -locations. - -Returns - A NULL-terminated array of paths. -[transfer full] - - - - -Types and Values - -AS_TYPE_DISTRO_DETAILS -AS_TYPE_DISTRO_DETAILS -#define AS_TYPE_DISTRO_DETAILS (as_distro_details_get_type ()) - - - - - -struct AsDistroDetailsClass -AsDistroDetailsClass -struct AsDistroDetailsClass { - GObjectClass parent_class; -}; - - - - - -AsDistroDetails -AsDistroDetails -typedef struct _AsDistroDetails AsDistroDetails; - - - - - - -Property Details -The <literal>“id”</literal> property -AsDistroDetails:id - “id” gchar * -id.Flags: Read -Default value: NULL - -The <literal>“name”</literal> property -AsDistroDetails:name - “name” gchar * -name.Flags: Read -Default value: NULL - -The <literal>“version”</literal> property -AsDistroDetails:version - “version” gchar * -version.Flags: Read -Default value: NULL - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-enums.xml appstream-0.12.0/docs/api/xml/as-enums.xml --- appstream-0.9.4/docs/api/xml/as-enums.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-enums.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,321 +0,0 @@ - - -]> - - -as-enums -3 -APPSTREAM Library - - -as-enums -Some enums used by various other modules - - - -Functions - - - - - -const gchar * -as_url_kind_to_string () -AsUrlKind -as_url_kind_from_string () -const gchar * -as_bundle_kind_to_string () -AsBundleKind -as_bundle_kind_from_string () -const gchar * -as_urgency_kind_to_string () -AsUrgencyKind -as_urgency_kind_from_string () - - - - - - -Types and Values - - - - - -enumAsUrlKind -enumAsBundleKind -enumAsUrgencyKind - - - - - - -Includes#include <appstream.h> - - - -Description - - - -Functions - -as_url_kind_to_string () -as_url_kind_to_string -const gchar * -as_url_kind_to_string (AsUrlKind url_kind); -Converts the enumerated value to an text representation. - -Parameters - - - - - - -url_kind -the AsUrlKind. - - - -Returns - string version of url_kind - - - -as_url_kind_from_string () -as_url_kind_from_string -AsUrlKind -as_url_kind_from_string (const gchar *url_kind); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -url_kind -the string. - - - -Returns - a AsUrlKind or AS_URL_KIND_UNKNOWN for unknown - - -as_bundle_kind_to_string () -as_bundle_kind_to_string -const gchar * -as_bundle_kind_to_string (AsBundleKind bundle_kind); -Converts the enumerated value to an text representation. - -Parameters - - - - - - -bundle_kind -the AsBundleKind. - - - -Returns - string version of bundle_kind - -Since: 0.8.0 - -as_bundle_kind_from_string () -as_bundle_kind_from_string -AsBundleKind -as_bundle_kind_from_string (const gchar *bundle_kind); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -bundle_kind -the string. - - - -Returns - a AsBundleKind or AS_BUNDLE_KIND_UNKNOWN for unknown - - -as_urgency_kind_to_string () -as_urgency_kind_to_string -const gchar * -as_urgency_kind_to_string (AsUrgencyKind urgency_kind); -Converts the enumerated value to an text representation. - -Parameters - - - - - - -urgency_kind -the AsUrgencyKind. - - - -Returns - string version of urgency_kind - -Since: 0.6.5 - -as_urgency_kind_from_string () -as_urgency_kind_from_string -AsUrgencyKind -as_urgency_kind_from_string (const gchar *urgency_kind); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -urgency_kind -the string. - - - -Returns - a AsUrgencyKind or AS_URGENCY_KIND_UNKNOWN for unknown -Since: 0.6.5 - - - -Types and Values - -enum AsUrlKind -AsUrlKind -The URL type. - -Members - - - - - - -AS_URL_KIND_UNKNOWN -Type invalid or not known - - - -AS_URL_KIND_HOMEPAGE -Project homepage - - - -AS_URL_KIND_BUGTRACKER -Bugtracker - - - -AS_URL_KIND_FAQ -FAQ page - - - -AS_URL_KIND_HELP -Help manual - - - -AS_URL_KIND_DONATION -Page with information about how to donate to the project - - - - - - -enum AsBundleKind -AsBundleKind -The bundle type. - -Members - - - - - - -AS_BUNDLE_KIND_UNKNOWN -Type invalid or not known - - - -AS_BUNDLE_KIND_LIMBA -A Limba bundle - - - -AS_BUNDLE_KIND_XDG_APP -An xdg-app bundle - - - - - - -enum AsUrgencyKind -AsUrgencyKind -The urgency of an AsRelease - -Members - - - - - - -AS_URGENCY_KIND_UNKNOWN -Urgency is unknown or not set - - - -AS_URGENCY_KIND_LOW -Low urgency - - - -AS_URGENCY_KIND_MEDIUM -Medium urgency - - - -AS_URGENCY_KIND_HIGH -High urgency - - - -AS_URGENCY_KIND_CRITICAL -Critical urgency - - - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-icon.xml appstream-0.12.0/docs/api/xml/as-icon.xml --- appstream-0.9.4/docs/api/xml/as-icon.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-icon.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,489 +0,0 @@ - - -]> - - -AsIcon -3 -APPSTREAM Library - - -AsIcon -Describes an icon of an application. - - - -Functions - - - - - -AsIconKind -as_icon_kind_from_string () -const gchar * -as_icon_kind_to_string () -AsIcon * -as_icon_new () -AsIconKind -as_icon_get_kind () -void -as_icon_set_kind () -const gchar * -as_icon_get_name () -void -as_icon_set_name () -const gchar * -as_icon_get_url () -void -as_icon_set_url () -const gchar * -as_icon_get_filename () -void -as_icon_set_filename () -guint -as_icon_get_width () -void -as_icon_set_width () -guint -as_icon_get_height () -void -as_icon_set_height () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_ICON -structAsIconClass -enumAsIconKind -AsIcon - - - - - - -Object Hierarchy - GObject - ╰── AsIcon - - - -Includes#include <appstream.h> - - - -Description - - - -Functions - -as_icon_kind_from_string () -as_icon_kind_from_string -AsIconKind -as_icon_kind_from_string (const gchar *kind_str); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -kind_str -the string. - - - -Returns - a AsIconKind or AS_ICON_KIND_UNKNOWN for unknown - - -as_icon_kind_to_string () -as_icon_kind_to_string -const gchar * -as_icon_kind_to_string (AsIconKind kind); -Converts the enumerated value to an text representation. - -Parameters - - - - - - -kind -the AsIconKind. - - - -Returns - string version of kind - - - -as_icon_new () -as_icon_new -AsIcon * -as_icon_new (void); -Creates a new AsIcon. - -Returns - a AsIcon. -[transfer full] - - -as_icon_get_kind () -as_icon_get_kind -AsIconKind -as_icon_get_kind (AsIcon *icon); -Gets the icon kind. - -Parameters - - - - - - -icon -a AsIcon instance. - - - -Returns - the AsIconKind - - -as_icon_set_kind () -as_icon_set_kind -void -as_icon_set_kind (AsIcon *icon, - AsIconKind kind); -Sets the icon kind. - -Parameters - - - - - - -icon -a AsIcon instance. - -kind -the AsIconKind, e.g. AS_ICON_KIND_CACHED. - - - - -as_icon_get_name () -as_icon_get_name -const gchar * -as_icon_get_name (AsIcon *icon); - -Parameters - - - - - - -icon -a AsIcon instance. - - - -Returns - the stock name of the icon. In case the icon is not of kind -"stock", the basename of the icon filename or URL is returned. - - -as_icon_set_name () -as_icon_set_name -void -as_icon_set_name (AsIcon *icon, - const gchar *name); -Sets the stock name or basename to use for the icon. - -Parameters - - - - - - -icon -a AsIcon instance. - -name -the icon stock name, e.g. "gwenview" - - - - -as_icon_get_url () -as_icon_get_url -const gchar * -as_icon_get_url (AsIcon *icon); -Gets the icon URL, pointing at a remote location. HTTPS and FTP urls are allowed. -This property is only set for icons of type AS_ICON_KIND_REMOTE - -Parameters - - - - - - -icon -a AsIcon instance. - - - -Returns - the URL - - -as_icon_set_url () -as_icon_set_url -void -as_icon_set_url (AsIcon *icon, - const gchar *url); -Sets the icon URL. - -Parameters - - - - - - -icon -a AsIcon instance. - -url -the new icon URL. - - - - -as_icon_get_filename () -as_icon_get_filename -const gchar * -as_icon_get_filename (AsIcon *icon); - -Parameters - - - - - - -icon -a AsIcon instance. - - - -Returns - The absolute path for the icon on disk. -This is only set for icons of kind AS_ICON_KIND_LOCAL or -AS_ICON_KIND_CACHED. - - -as_icon_set_filename () -as_icon_set_filename -void -as_icon_set_filename (AsIcon *icon, - const gchar *filename); -Sets the icon absolute filename. - -Parameters - - - - - - -icon -a AsIcon instance. - -filename -the new icon URL. - - - - -as_icon_get_width () -as_icon_get_width -guint -as_icon_get_width (AsIcon *icon); - -Parameters - - - - - - -icon -a AsIcon instance. - - - -Returns - The icon width in pixels, or 0 if unknown. - - -as_icon_set_width () -as_icon_set_width -void -as_icon_set_width (AsIcon *icon, - guint width); -Sets the icon width. - -Parameters - - - - - - -icon -a AsIcon instance. - -width -the width in pixels. - - - - -as_icon_get_height () -as_icon_get_height -guint -as_icon_get_height (AsIcon *icon); - -Parameters - - - - - - -icon -a AsIcon instance. - - - -Returns - The icon height in pixels, or 0 if unknown. - - -as_icon_set_height () -as_icon_set_height -void -as_icon_set_height (AsIcon *icon, - guint height); -Sets the icon height. - -Parameters - - - - - - -icon -a AsIcon instance. - -height -the height in pixels. - - - - - - -Types and Values - -AS_TYPE_ICON -AS_TYPE_ICON -#define AS_TYPE_ICON (as_icon_get_type ()) - - - - - -struct AsIconClass -AsIconClass -struct AsIconClass { - GObjectClass parent_class; -}; - - - - - -enum AsIconKind -AsIconKind -The icon type. - -Members - - - - - - -AS_ICON_KIND_UNKNOWN -Unknown icon kind - - - -AS_ICON_KIND_CACHED -Icon in the internal caches - - - -AS_ICON_KIND_STOCK -Stock icon name - - - -AS_ICON_KIND_LOCAL -Local icon name - - - -AS_ICON_KIND_REMOTE -Remote icon URL - - - - - - -AsIcon -AsIcon -typedef struct _AsIcon AsIcon; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-image.xml appstream-0.12.0/docs/api/xml/as-image.xml --- appstream-0.9.4/docs/api/xml/as-image.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-image.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,384 +0,0 @@ - - -]> - - -AsImage -3 -APPSTREAM Library - - -AsImage -Object representing a single image used in a screenshot. - - - -Functions - - - - - -AsImageKind -as_image_kind_from_string () -const gchar * -as_image_kind_to_string () -AsImage * -as_image_new () -const gchar * -as_image_get_url () -void -as_image_set_url () -guint -as_image_get_width () -void -as_image_set_width () -guint -as_image_get_height () -void -as_image_set_height () -AsImageKind -as_image_get_kind () -void -as_image_set_kind () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_IMAGE -structAsImageClass -enumAsImageKind -AsImage - - - - - - -Object Hierarchy - GObject - ╰── AsImage - - - - - -Description -Screenshot may have multiple versions of an image in different resolutions -or aspect ratios. This object allows access to the location and size of a -single image. -See also: AsScreenshot - - - -Functions - -as_image_kind_from_string () -as_image_kind_from_string -AsImageKind -as_image_kind_from_string (const gchar *kind); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -kind -the string. - - - -Returns - a AsImageKind, or AS_IMAGE_KIND_UNKNOWN for unknown. -[transfer full] - - -as_image_kind_to_string () -as_image_kind_to_string -const gchar * -as_image_kind_to_string (AsImageKind kind); -Converts the enumerated value to an text representation. - -Parameters - - - - - - -kind -the AsImageKind. - - - -Returns - string version of kind - - - -as_image_new () -as_image_new -AsImage * -as_image_new (void); -Creates a new AsImage. - -Returns - a AsImage. -[transfer full] - - -as_image_get_url () -as_image_get_url -const gchar * -as_image_get_url (AsImage *image); -Gets the full qualified URL for the image, usually pointing at some mirror. - -Parameters - - - - - - -image -a AsImage instance. - - - -Returns - URL - - -as_image_set_url () -as_image_set_url -void -as_image_set_url (AsImage *image, - const gchar *url); -Sets the fully-qualified mirror URL to use for the image. - -Parameters - - - - - - -image -a AsImage instance. - -url -the URL. - - - - -as_image_get_width () -as_image_get_width -guint -as_image_get_width (AsImage *image); -Gets the image width. - -Parameters - - - - - - -image -a AsImage instance. - - - -Returns - width in pixels - - -as_image_set_width () -as_image_set_width -void -as_image_set_width (AsImage *image, - guint width); -Sets the image width. - -Parameters - - - - - - -image -a AsImage instance. - -width -the width in pixels. - - - - -as_image_get_height () -as_image_get_height -guint -as_image_get_height (AsImage *image); -Gets the image height. - -Parameters - - - - - - -image -a AsImage instance. - - - -Returns - height in pixels - - -as_image_set_height () -as_image_set_height -void -as_image_set_height (AsImage *image, - guint height); -Sets the image height. - -Parameters - - - - - - -image -a AsImage instance. - -height -the height in pixels. - - - - -as_image_get_kind () -as_image_get_kind -AsImageKind -as_image_get_kind (AsImage *image); -Gets the image kind. - -Parameters - - - - - - -image -a AsImage instance. - - - -Returns - the AsImageKind - - -as_image_set_kind () -as_image_set_kind -void -as_image_set_kind (AsImage *image, - AsImageKind kind); -Sets the image kind. - -Parameters - - - - - - -image -a AsImage instance. - -kind -the AsImageKind, e.g. AS_IMAGE_KIND_THUMBNAIL. - - - - - - -Types and Values - -AS_TYPE_IMAGE -AS_TYPE_IMAGE -#define AS_TYPE_IMAGE (as_image_get_type ()) - - - - - -struct AsImageClass -AsImageClass -struct AsImageClass { - GObjectClass parent_class; -}; - - - - - -enum AsImageKind -AsImageKind -The image type. - -Members - - - - - - -AS_IMAGE_KIND_UNKNOWN -Type invalid or not known - - - -AS_IMAGE_KIND_SOURCE -The source image at full resolution - - - -AS_IMAGE_KIND_THUMBNAIL -A thumbnail at reduced resolution - - - - - - -AsImage -AsImage -typedef struct _AsImage AsImage; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-menu-parser.xml appstream-0.12.0/docs/api/xml/as-menu-parser.xml --- appstream-0.9.4/docs/api/xml/as-menu-parser.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-menu-parser.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,241 +0,0 @@ - - -]> - - -AsMenuParser -3 -APPSTREAM Library - - -AsMenuParser -Parser for XDG menu files designed for software-centers - - - -Functions - - - - - -AsMenuParser * -as_menu_parser_new () -AsMenuParser * -as_menu_parser_new_from_file () -GList * -as_menu_parser_parse () -gboolean -as_menu_parser_get_update_category_data () -void -as_menu_parser_set_update_category_data () -GList * -as_get_system_categories () - - - - - - -Properties - - - - - - -gbooleanupdate-category-dataRead / Write - - - - - - -Types and Values - - - - - -#defineAS_TYPE_MENU_PARSER -structAsMenuParserClass -AsMenuParser - - - - - - -Object Hierarchy - GObject - ╰── AsMenuParser - - - -Includes#include <appstream.h> - - - -Description -This object parses an XDG menu file and returns a set of AsCategory objects which -can be used by software-centers to group the applications they show. -By default, it loads a common set of categories from an internal menu file. -A custom menu file may be specified using the alternative class constructor. -See also: AsCategory - - - -Functions - -as_menu_parser_new () -as_menu_parser_new -AsMenuParser * -as_menu_parser_new (void); -Creates a new AsMenuParser. - -Returns - an AsMenuParser. -[transfer full] - - -as_menu_parser_new_from_file () -as_menu_parser_new_from_file -AsMenuParser * -as_menu_parser_new_from_file (const gchar *menu_file); -Creates a new AsMenuParser using a custom XDG menu XML file. - -Parameters - - - - - - -menu_file -The menu-file to parse. - - - -Returns - an AsMenuParser. -[transfer full] - - -as_menu_parser_parse () -as_menu_parser_parse -GList * -as_menu_parser_parse (AsMenuParser *mp); -Parse the menu file - -Parameters - - - - - - -mp -An instance of AsMenuParser. - - - -Returns - GList of AsCategory objects found in the menu, or NULL if there was an error. -[element-type AsCategory][transfer full] - - -as_menu_parser_get_update_category_data () -as_menu_parser_get_update_category_data -gboolean -as_menu_parser_get_update_category_data - (AsMenuParser *mp); - -Parameters - - - - - - -mp -An instance of AsMenuParser. - - - - -as_menu_parser_set_update_category_data () -as_menu_parser_set_update_category_data -void -as_menu_parser_set_update_category_data - (AsMenuParser *mp, - gboolean value); - -Parameters - - - - - - -mp -An instance of AsMenuParser. - - - - -as_get_system_categories () -as_get_system_categories -GList * -as_get_system_categories (void); -Get a GList of the default AppStream categories - -Returns - GList of AsCategory objects. -[element-type AsCategory][transfer full] - - - - -Types and Values - -AS_TYPE_MENU_PARSER -AS_TYPE_MENU_PARSER -#define AS_TYPE_MENU_PARSER (as_menu_parser_get_type ()) - - - - - -struct AsMenuParserClass -AsMenuParserClass -struct AsMenuParserClass { - GObjectClass parent_class; -}; - - - - - -AsMenuParser -AsMenuParser -typedef struct _AsMenuParser AsMenuParser; - - - - - - -Property Details -The <literal>“update-category-data”</literal> property -AsMenuParser:update-category-data - “update-category-data” gboolean -update-category-data.Flags: Read / Write -Default value: FALSE - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-metadata.xml appstream-0.12.0/docs/api/xml/as-metadata.xml --- appstream-0.9.4/docs/api/xml/as-metadata.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-metadata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,765 +0,0 @@ - - -]> - - -AsMetadata -3 -APPSTREAM Library - - -AsMetadata -Parser for AppStream metadata - - - -Functions - - - - - -AsMetadata * -as_metadata_new () -GQuark -as_metadata_error_quark () -void -as_metadata_parse_file () -void -as_metadata_parse_xml () -void -as_metadata_parse_yaml () -AsComponent * -as_metadata_get_component () -GPtrArray * -as_metadata_get_components () -void -as_metadata_clear_components () -void -as_metadata_add_component () -gchar * -as_metadata_component_to_upstream_xml () -void -as_metadata_save_upstream_xml () -gchar * -as_metadata_components_to_distro_xml () -void -as_metadata_save_distro_xml () -gchar * -as_metadata_components_to_distro_yaml () -void -as_metadata_save_distro_yaml () -void -as_metadata_set_locale () -const gchar * -as_metadata_get_locale () -const gchar * -as_metadata_get_origin () -void -as_metadata_set_origin () -gboolean -as_metadata_get_update_existing () -void -as_metadata_set_update_existing () -gboolean -as_metadata_get_write_header () -void -as_metadata_set_write_header () -void -as_metadata_set_parser_mode () -AsParserMode -as_metadata_get_parser_mode () -const gchar * -as_metadata_get_architecture () -void -as_metadata_set_architecture () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_METADATA -structAsMetadataClass -enumAsParserMode -enumAsMetadataError -#defineAS_METADATA_ERROR -AsMetadata - - - - - - -Object Hierarchy - GObject - ╰── AsMetadata - - - -Includes#include <appstream.h> - - - -Description -This object parses AppStream metadata, including AppStream -upstream metadata, which is defined by upstream projects. -It returns an AsComponent of the data. -See also: AsComponent, AsDatabase - - - -Functions - -as_metadata_new () -as_metadata_new -AsMetadata * -as_metadata_new (void); -Creates a new AsMetadata. - -Returns - a AsMetadata. -[transfer full] - - -as_metadata_error_quark () -as_metadata_error_quark -GQuark -as_metadata_error_quark (void); - -Returns - An error quark. - - -as_metadata_parse_file () -as_metadata_parse_file -void -as_metadata_parse_file (AsMetadata *metad, - GFile *file, - GError **error); -Parses an AppStream upstream metadata file. - -Parameters - - - - - - -metad -A valid AsMetadata instance - -file -GFile for the upstream metadata - -error -A GError or NULL. - - - - -as_metadata_parse_xml () -as_metadata_parse_xml -void -as_metadata_parse_xml (AsMetadata *metad, - const gchar *data, - GError **error); -Parses AppStream XML metadata. - -Parameters - - - - - - -metad -A valid AsMetadata instance - -data -XML data describing one or more software components. - - - - -as_metadata_parse_yaml () -as_metadata_parse_yaml -void -as_metadata_parse_yaml (AsMetadata *metad, - const gchar *data, - GError **error); -Parses AppStream YAML metadata. - -Parameters - - - - - - -metad -A valid AsMetadata instance - -data -YAML data describing one or more software components. - -error -A GError or NULL. - - - - -as_metadata_get_component () -as_metadata_get_component -AsComponent * -as_metadata_get_component (AsMetadata *metad); -Gets the AsComponent which has been parsed from the XML. -If the AppStream XML contained multiple components, return the first -component that has been parsed. - -Parameters - - - - - - -metad -a AsMetadata instance. - - - -Returns - An AsComponent or NULL. -[transfer none] - - -as_metadata_get_components () -as_metadata_get_components -GPtrArray * -as_metadata_get_components (AsMetadata *metad); - -Parameters - - - - - - -metad -a AsMetadata instance. - - - -Returns - A GPtrArray of all parsed components. -[transfer none][element-type AsComponent] - - -as_metadata_clear_components () -as_metadata_clear_components -void -as_metadata_clear_components (AsMetadata *metad); - - -as_metadata_add_component () -as_metadata_add_component -void -as_metadata_add_component (AsMetadata *metad, - AsComponent *cpt); -Add an AsComponent to the list of components. -This can be used to add multiple components in order to -produce a distro-XML AppStream metadata file. - - -as_metadata_component_to_upstream_xml () -as_metadata_component_to_upstream_xml -gchar * -as_metadata_component_to_upstream_xml (AsMetadata *metad); -Convert an AsComponent to upstream XML. -(The amount of localization included in the metadata depends on how the AsComponent -was initially loaded) -The first AsComponent added to the internal list will be transformed. -In case no component is present, NULL is returned. - -Returns - A string containing the XML. Free with g_free(). -[transfer full] - - -as_metadata_save_upstream_xml () -as_metadata_save_upstream_xml -void -as_metadata_save_upstream_xml (AsMetadata *metad, - const gchar *fname, - GError **error); -Serialize AsComponent instance to XML and save it to file. -An existing file at the same location will be overridden. - -Parameters - - - - - - -fname -The filename for the new XML file. - - - - -as_metadata_components_to_distro_xml () -as_metadata_components_to_distro_xml -gchar * -as_metadata_components_to_distro_xml (AsMetadata *metad); -Serialize all AsComponent instances into AppStream -distro-XML data. -NULL is returned if there is nothing to serialize. - -Returns - A string containing the XML. Free with g_free(). -[transfer full] - - -as_metadata_save_distro_xml () -as_metadata_save_distro_xml -void -as_metadata_save_distro_xml (AsMetadata *metad, - const gchar *fname, - GError **error); -Serialize all AsComponent instances to XML and save the data to a file. -An existing file at the same location will be overridden. - -Parameters - - - - - - -fname -The filename for the new XML file. - - - - -as_metadata_components_to_distro_yaml () -as_metadata_components_to_distro_yaml -gchar * -as_metadata_components_to_distro_yaml (AsMetadata *metad); -Serialize all AsComponent instances into AppStream DEP-11 -distro-YAML data. -NULL is returned if there is nothing to serialize. - -Returns - A string containing the YAML markup. Free with g_free(). -[transfer full] - - -as_metadata_save_distro_yaml () -as_metadata_save_distro_yaml -void -as_metadata_save_distro_yaml (AsMetadata *metad, - const gchar *fname, - GError **error); -Serialize all AsComponent instances to XML and save the data to a file. -An existing file at the same location will be overridden. - -Parameters - - - - - - -fname -The filename for the new YAML file. - - - - -as_metadata_set_locale () -as_metadata_set_locale -void -as_metadata_set_locale (AsMetadata *metad, - const gchar *locale); -Sets the locale which should be read when processing metadata. -All other locales are ignored, which increases parsing speed and -reduces memory usage. -If you set the locale to "ALL", all locales will be read. - -Parameters - - - - - - -metad -a AsMetadata instance. - -locale -the locale. - - - - -as_metadata_get_locale () -as_metadata_get_locale -const gchar * -as_metadata_get_locale (AsMetadata *metad); -Gets the current active locale for parsing metadata, -or "ALL" if all locales are read. - -Parameters - - - - - - -metad -a AsMetadata instance. - - - -Returns - Locale used for metadata parsing. - - -as_metadata_get_origin () -as_metadata_get_origin -const gchar * -as_metadata_get_origin (AsMetadata *metad); - -Parameters - - - - - - -metad -an AsMetadata instance. - - - -Returns - The origin of AppStream distro metadata - - -as_metadata_set_origin () -as_metadata_set_origin -void -as_metadata_set_origin (AsMetadata *metad, - const gchar *origin); -Set the origin of AppStream distro metadata - -Parameters - - - - - - -metad -an AsMetadata instance. - -origin -the origin of AppStream distro metadata. - - - - -as_metadata_get_update_existing () -as_metadata_get_update_existing -gboolean -as_metadata_get_update_existing (AsMetadata *metad); - -Parameters - - - - - - -metad -an AsMetadata instance. - - - -Returns - Whether existing components should be updates with the parsed data, -instead of creating new ones. - - -as_metadata_set_update_existing () -as_metadata_set_update_existing -void -as_metadata_set_update_existing (AsMetadata *metad, - gboolean update); -If set to TRUE, the parser will not create new components but -instead update existing components in the pool with new metadata. -NOTE: Right now, this feature is only implemented for metainfo XML parsing! - -Parameters - - - - - - -metad -an AsMetadata instance. - -update -A boolean value. - - - - -as_metadata_get_write_header () -as_metadata_get_write_header -gboolean -as_metadata_get_write_header (AsMetadata *metad); - -Parameters - - - - - - -metad -an AsMetadata instance. - - - -Returns - Whether we will write a header/root node in distro metadata. - - -as_metadata_set_write_header () -as_metadata_set_write_header -void -as_metadata_set_write_header (AsMetadata *metad, - gboolean wheader); -If set to TRUE, tehe metadata writer will omit writing a DEP-11 -header document when in YAML mode, and will not write a root components node -when writing XML data. -Please keep in mind that this will create an invalid DEP-11 YAML AppStream -distro metadata file, and an invalid XML file. -This parameter should only be changed e.g. by the appstream-generator tool. -NOTE: Right now, this feature is only implemented for YAML! - -Parameters - - - - - - -metad -an AsMetadata instance. - -wheader -A boolean value. - - - - -as_metadata_set_parser_mode () -as_metadata_set_parser_mode -void -as_metadata_set_parser_mode (AsMetadata *metad, - AsParserMode mode); -Sets the current metadata parsing mode. - -Parameters - - - - - - -metad -a AsMetadata instance. - -mode -the AsParserMode. - - - - -as_metadata_get_parser_mode () -as_metadata_get_parser_mode -AsParserMode -as_metadata_get_parser_mode (AsMetadata *metad); -Gets the current parser mode - -Parameters - - - - - - -metad -a AsMetadata instance. - - - -Returns - an AsParserMode - - -as_metadata_get_architecture () -as_metadata_get_architecture -const gchar * -as_metadata_get_architecture (AsMetadata *metad); - -Parameters - - - - - - -metad -an AsMetadata instance. - - - -Returns - The architecture of AppStream distro metadata - - -as_metadata_set_architecture () -as_metadata_set_architecture -void -as_metadata_set_architecture (AsMetadata *metad, - const gchar *arch); -Set the architecture the components in this metadata belong to. - -Parameters - - - - - - -metad -an AsMetadata instance. - -arch -an architecture string. - - - - - - -Types and Values - -AS_TYPE_METADATA -AS_TYPE_METADATA -#define AS_TYPE_METADATA (as_metadata_get_type ()) - - - - - -struct AsMetadataClass -AsMetadataClass -struct AsMetadataClass { - GObjectClass parent_class; -}; - - - - - -enum AsParserMode -AsParserMode -There are a few differences between Appstream's upstream metadata -and the distribution metadata. -The parser mode indicates which style we should process. -Usually you don't want to change this. - -Members - - - - - - -AS_PARSER_MODE_UPSTREAM -Parse Appstream upstream metadata - - - -AS_PARSER_MODE_DISTRO -Parse Appstream distribution metadata - - - - - - -enum AsMetadataError -AsMetadataError -A metadata processing error. - -Members - - - - - - -AS_METADATA_ERROR_FAILED -Generic failure - - - -AS_METADATA_ERROR_UNEXPECTED_FORMAT_KIND -Expected upstream metadata but got distro metadata, or vice versa. - - - -AS_METADATA_ERROR_NO_COMPONENT -We expected a component in the pool, but couldn't find one. - - - - - - -AS_METADATA_ERROR -AS_METADATA_ERROR -#define AS_METADATA_ERROR as_metadata_error_quark () - - - - - -AsMetadata -AsMetadata -typedef struct _AsMetadata AsMetadata; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-provided.xml appstream-0.12.0/docs/api/xml/as-provided.xml --- appstream-0.9.4/docs/api/xml/as-provided.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-provided.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,386 +0,0 @@ - - -]> - - -AsProvided -3 -APPSTREAM Library - - -AsProvided -Description of the provided-items in components - - - -Functions - - - - - -const gchar * -as_provided_kind_to_string () -AsProvidedKind -as_provided_kind_from_string () -const gchar * -as_provided_kind_to_l10n_string () -AsProvided * -as_provided_new () -AsProvidedKind -as_provided_get_kind () -void -as_provided_set_kind () -gchar ** -as_provided_get_items () -void -as_provided_add_item () -gboolean -as_provided_has_item () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_PROVIDED -structAsProvidedClass -enumAsProvidedKind -AsProvided - - - - - - -Object Hierarchy - GObject - ╰── AsProvided - - - -Includes#include <appstream.h> - - - -Description -Components can provide various items, like libraries, Python-modules, -firmware, binaries, etc. -Functions to work with these items are provided here. -See also: AsComponent - - - -Functions - -as_provided_kind_to_string () -as_provided_kind_to_string -const gchar * -as_provided_kind_to_string (AsProvidedKind kind); -Converts the enumerated value to a text representation. - -Parameters - - - - - - -kind -the AsProvidedKind. - - - -Returns - string version of kind - - - -as_provided_kind_from_string () -as_provided_kind_from_string -AsProvidedKind -as_provided_kind_from_string (const gchar *kind_str); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -kind_str -the string. - - - -Returns - a AsProvidedKind or AS_PROVIDED_KIND_UNKNOWN for unknown - - -as_provided_kind_to_l10n_string () -as_provided_kind_to_l10n_string -const gchar * -as_provided_kind_to_l10n_string (AsProvidedKind kind); -Converts the enumerated value to a localized text representation, -using the plural forms (e.g. "Libraries" instead of "Library"). -This can be useful when displaying provided items in GUI dialogs. - -Parameters - - - - - - -kind -the AsProvidedKind. - - - -Returns - Pluralized, l10n string version of kind - - - -as_provided_new () -as_provided_new -AsProvided * -as_provided_new (void); -Creates a new AsProvided. - -Returns - a AsProvided. -[transfer full] - - -as_provided_get_kind () -as_provided_get_kind -AsProvidedKind -as_provided_get_kind (AsProvided *prov); -The kind of items this AsProvided object stores. - -Parameters - - - - - - -prov -a AsProvided instance. - - - -Returns - an enum of type AsProvidedKind - - -as_provided_set_kind () -as_provided_set_kind -void -as_provided_set_kind (AsProvided *prov, - AsProvidedKind kind); -Set the kind of items this AsProvided object stores. - -Parameters - - - - - - -prov -a AsProvided instance. - -kind -the new AsProvidedKind - - - - -as_provided_get_items () -as_provided_get_items -gchar ** -as_provided_get_items (AsProvided *prov); -Get an array of provided data. - -Parameters - - - - - - -prov -a AsProvided instance. - - - -Returns - An utf-8 array of provided items, free with g_free(). -[transfer container] - - -as_provided_add_item () -as_provided_add_item -void -as_provided_add_item (AsProvided *prov, - const gchar *item); -Add a new provided item. - -Parameters - - - - - - -prov -a AsProvided instance. - - - - -as_provided_has_item () -as_provided_has_item -gboolean -as_provided_has_item (AsProvided *prov, - const gchar *item); -Check if the current AsProvided contains an item -of the given name. - -Parameters - - - - - - -prov -a AsProvided instance. - -item -the name of a provided item, e.g. "audio/x-vorbis" (in case the provided kind is a mimetype) - - - -Returns - TRUE if found. - - - - -Types and Values - -AS_TYPE_PROVIDED -AS_TYPE_PROVIDED -#define AS_TYPE_PROVIDED (as_provided_get_type ()) - - - - - -struct AsProvidedClass -AsProvidedClass -struct AsProvidedClass { - GObjectClass parent_class; -}; - - - - - -enum AsProvidedKind -AsProvidedKind -Type of the public interface components can provide. - -Members - - - - - - -AS_PROVIDED_KIND_UNKNOWN -Unknown kind - - - -AS_PROVIDED_KIND_LIBRARY -A shared library - - - -AS_PROVIDED_KIND_BINARY -A binary installed into a directory in PATH - - - -AS_PROVIDED_KIND_MIMETYPE -Provides a handler for a mimetype - - - -AS_PROVIDED_KIND_FONT -A font - - - -AS_PROVIDED_KIND_MODALIAS -A modalias - - - -AS_PROVIDED_KIND_PYTHON_2 -A Python2 module - - - -AS_PROVIDED_KIND_PYTHON -A Python3 module - - - -AS_PROVIDED_KIND_DBUS_SYSTEM -A DBus service name on the system bus. - - - -AS_PROVIDED_KIND_DBUS_USER -A DBus service name on the user/session bus. - - - -AS_PROVIDED_KIND_FIRMWARE_RUNTIME -Firmware flashed at runtime. - - - -AS_PROVIDED_KIND_FIRMWARE_FLASHED -Firmware flashed permanently to the device. - - - - - - -AsProvided -AsProvided -typedef struct _AsProvided AsProvided; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-release.xml appstream-0.12.0/docs/api/xml/as-release.xml --- appstream-0.9.4/docs/api/xml/as-release.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-release.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,626 +0,0 @@ - - -]> - - -AsRelease -3 -APPSTREAM Library - - -AsRelease -Object representing a single upstream release - - - -Functions - - - - - -const gchar * -as_checksum_kind_to_string () -AsChecksumKind -as_checksum_kind_from_string () -const gchar * -as_size_kind_to_string () -AsSizeKind -as_size_kind_from_string () -AsRelease * -as_release_new () -const gchar * -as_release_get_version () -void -as_release_set_version () -guint64 -as_release_get_timestamp () -void -as_release_set_timestamp () -const gchar * -as_release_get_description () -void -as_release_set_description () -gchar * -as_release_get_active_locale () -void -as_release_set_active_locale () -GPtrArray * -as_release_get_locations () -void -as_release_add_location () -const gchar * -as_release_get_checksum () -void -as_release_set_checksum () -AsUrgencyKind -as_release_get_urgency () -void -as_release_set_urgency () -guint64 -as_release_get_size () -void -as_release_set_size () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_RELEASE -structAsReleaseClass -enumAsChecksumKind -enumAsSizeKind -AsRelease - - - - - - -Object Hierarchy - GObject - ╰── AsRelease - - - -Includes#include <appstream.h> - - - -Description -This object represents a single upstream release, typically a minor update. -Releases can contain a localized description of paragraph and list elements -and also have a version number and timestamp. -Releases can be automatically generated by parsing upstream ChangeLogs or -.spec files, or can be populated using MetaInfo files. -See also: AsComponent - - - -Functions - -as_checksum_kind_to_string () -as_checksum_kind_to_string -const gchar * -as_checksum_kind_to_string (AsChecksumKind kind); -Converts the enumerated value to an text representation. - -Parameters - - - - - - -kind -the AsChecksumKind. - - - -Returns - string version of kind - - - -as_checksum_kind_from_string () -as_checksum_kind_from_string -AsChecksumKind -as_checksum_kind_from_string (const gchar *kind_str); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -kind_str -the string. - - - -Returns - a AsChecksumKind or AS_CHECKSUM_KIND_NONE for unknown - - -as_size_kind_to_string () -as_size_kind_to_string -const gchar * -as_size_kind_to_string (AsSizeKind size_kind); -Converts the enumerated value to an text representation. - -Parameters - - - - - - -size_kind -the AsSizeKind. - - - -Returns - string version of size_kind - -Since: 0.8.6 - -as_size_kind_from_string () -as_size_kind_from_string -AsSizeKind -as_size_kind_from_string (const gchar *size_kind); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -size_kind -the string. - - - -Returns - an AsSizeKind or AS_SIZE_KIND_UNKNOWN for unknown -Since: 0.8.6 - -as_release_new () -as_release_new -AsRelease * -as_release_new (void); -Creates a new AsRelease. - -Returns - a AsRelease. -[transfer full] - - -as_release_get_version () -as_release_get_version -const gchar * -as_release_get_version (AsRelease *release); -Gets the release version. - -Parameters - - - - - - -release -a AsRelease instance. - - - -Returns - string, or NULL for not set or invalid - - -as_release_set_version () -as_release_set_version -void -as_release_set_version (AsRelease *release, - const gchar *version); -Sets the release version. - -Parameters - - - - - - -release -a AsRelease instance. - -version -the version string. - - - - -as_release_get_timestamp () -as_release_get_timestamp -guint64 -as_release_get_timestamp (AsRelease *release); -Gets the release timestamp. - -Parameters - - - - - - -release -a AsRelease instance. - - - -Returns - timestamp, or 0 for unset - - -as_release_set_timestamp () -as_release_set_timestamp -void -as_release_set_timestamp (AsRelease *release, - guint64 timestamp); -Sets the release timestamp. - -Parameters - - - - - - -release -a AsRelease instance. - -timestamp -the timestamp value. - - - - -as_release_get_description () -as_release_get_description -const gchar * -as_release_get_description (AsRelease *release); -Gets the release description markup for a given locale. - -Parameters - - - - - - -release -a AsRelease instance. - - - -Returns - markup, or NULL for not set or invalid - - -as_release_set_description () -as_release_set_description -void -as_release_set_description (AsRelease *release, - const gchar *description, - const gchar *locale); -Sets the description release markup. - -Parameters - - - - - - -release -a AsRelease instance. - -description -the description markup. - - - - -as_release_get_active_locale () -as_release_get_active_locale -gchar * -as_release_get_active_locale (AsRelease *release); -Get the current active locale, which -is used to get localized messages. - - -as_release_set_active_locale () -as_release_set_active_locale -void -as_release_set_active_locale (AsRelease *release, - const gchar *locale); -Set the current active locale, which -is used to get localized messages. -If the AsComponent linking this AsRelease was fetched -from a localized database, usually only -one locale is available. - - -as_release_get_locations () -as_release_get_locations -GPtrArray * -as_release_get_locations (AsRelease *release); -Gets the release locations, typically URLs. - -Returns - list of locations. -[transfer none][element-type utf8] -Since: 0.8.1 - -as_release_add_location () -as_release_add_location -void -as_release_add_location (AsRelease *release, - const gchar *location); -Adds a release location. - -Parameters - - - - - - -location -An URL of the download location - - -Since: 0.8.1 - -as_release_get_checksum () -as_release_get_checksum -const gchar * -as_release_get_checksum (AsRelease *release, - AsChecksumKind kind); -Gets the release checksum - -Returns - string, or NULL for not set or invalid -Since: 0.8.2 - -as_release_set_checksum () -as_release_set_checksum -void -as_release_set_checksum (AsRelease *release, - const gchar *checksum, - AsChecksumKind kind); -Set the release checksum. - -Parameters - - - - - - -release -An instance of AsRelease. - -checksum -The checksum as string. - -kind -The kind of this checksum, e.g. AS_CHECKSUM_KIND_SHA256 - - -Since: 0.8.2 - -as_release_get_urgency () -as_release_get_urgency -AsUrgencyKind -as_release_get_urgency (AsRelease *release); -Gets the urgency of the release -(showing how important it is to update to a more recent release) - -Parameters - - - - - - -release -a AsRelease instance. - - - -Returns - AsUrgencyKind, or AS_URGENCY_KIND_UNKNOWN for not set -Since: 0.6.5 - -as_release_set_urgency () -as_release_set_urgency -void -as_release_set_urgency (AsRelease *release, - AsUrgencyKind urgency); -Sets the release urgency. - -Parameters - - - - - - -release -a AsRelease instance. - -urgency -the urgency of this release/update (as AsUrgencyKind) - - -Since: 0.6.5 - -as_release_get_size () -as_release_get_size -guint64 -as_release_get_size (AsRelease *release, - AsSizeKind kind); -Gets the release size. - -Parameters - - - - - - -release -a AsRelease instance - -kind -a AsSizeKind - - - -Returns - The size of the given kind of this release. -Since: 0.8.6 - -as_release_set_size () -as_release_set_size -void -as_release_set_size (AsRelease *release, - guint64 size, - AsSizeKind kind); -Sets the release size for the given kind. - -Parameters - - - - - - -release -a AsRelease instance - -size -a size in bytes, or 0 for unknown - -kind -a AsSizeKind - - -Since: 0.8.6 - - - -Types and Values - -AS_TYPE_RELEASE -AS_TYPE_RELEASE -#define AS_TYPE_RELEASE (as_release_get_type ()) - - - - - -struct AsReleaseClass -AsReleaseClass -struct AsReleaseClass { - GObjectClass parent_class; -}; - - - - - -enum AsChecksumKind -AsChecksumKind -Checksums supported by AsRelease - -Members - - - - - - -AS_CHECKSUM_KIND_NONE -No checksum - - - -AS_CHECKSUM_KIND_SHA1 -SHA1 - - - -AS_CHECKSUM_KIND_SHA256 -SHA256 - - - - - - -enum AsSizeKind -AsSizeKind -The release size kind. - -Members - - - - - - -AS_SIZE_KIND_UNKNOWN -Unknown size - - - -AS_SIZE_KIND_DOWNLOAD -Size of download of component - - - -AS_SIZE_KIND_INSTALLED -Size of installed component - - - - -Since: 0.8.6 - -AsRelease -AsRelease -typedef struct _AsRelease AsRelease; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-screenshot-private.xml appstream-0.12.0/docs/api/xml/as-screenshot-private.xml --- appstream-0.9.4/docs/api/xml/as-screenshot-private.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-screenshot-private.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ - - -]> - - -as-screenshot-private -3 -APPSTREAM Library - - -as-screenshot-private - - - - -Functions - - - - - -GHashTable * -as_screenshot_get_caption_table () - - - - - - - - -Description - - - - - -Functions - -as_screenshot_get_caption_table () -as_screenshot_get_caption_table -GHashTable * -as_screenshot_get_caption_table (AsScreenshot *screenshot); -Internal function. - - - - -Types and Values - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-screenshot.xml appstream-0.12.0/docs/api/xml/as-screenshot.xml --- appstream-0.9.4/docs/api/xml/as-screenshot.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-screenshot.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,385 +0,0 @@ - - -]> - - -AsScreenshot -3 -APPSTREAM Library - - -AsScreenshot -Object representing a single screenshot - - - -Functions - - - - - -AsScreenshotKind -as_screenshot_kind_from_string () -const gchar * -as_screenshot_kind_to_string () -gboolean -as_screenshot_is_valid () -AsScreenshot * -as_screenshot_new () -AsScreenshotKind -as_screenshot_get_kind () -void -as_screenshot_set_kind () -const gchar * -as_screenshot_get_caption () -void -as_screenshot_set_caption () -GPtrArray * -as_screenshot_get_images () -void -as_screenshot_add_image () -gchar * -as_screenshot_get_active_locale () -void -as_screenshot_set_active_locale () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_SCREENSHOT -structAsScreenshotClass -enumAsScreenshotKind -AsScreenshot - - - - - - -Object Hierarchy - GObject - ╰── AsScreenshot - - - - - -Description -Screenshots have a localized caption and also contain a number of images -of different resolution. -See also: AsImage - - - -Functions - -as_screenshot_kind_from_string () -as_screenshot_kind_from_string -AsScreenshotKind -as_screenshot_kind_from_string (const gchar *kind); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -kind -the string. - - - -Returns - a AsScreenshotKind, or -AS_SCREENSHOT_KIND_UNKNOWN if not known. -[transfer full] - - -as_screenshot_kind_to_string () -as_screenshot_kind_to_string -const gchar * -as_screenshot_kind_to_string (AsScreenshotKind kind); -Converts the enumerated value to an text representation. - -Parameters - - - - - - -kind -the AsScreenshotKind. - - - -Returns - string version of kind - - - -as_screenshot_is_valid () -as_screenshot_is_valid -gboolean -as_screenshot_is_valid (AsScreenshot *screenshot); -Performs a quick validation on this screenshot - -Parameters - - - - - - -screenshot -a AsScreenshot instance. - - - -Returns - TRUE if the screenshot is a complete AsScreenshot - - -as_screenshot_new () -as_screenshot_new -AsScreenshot * -as_screenshot_new (void); -Creates a new AsScreenshot. - -Returns - a AsScreenshot. -[transfer full] - - -as_screenshot_get_kind () -as_screenshot_get_kind -AsScreenshotKind -as_screenshot_get_kind (AsScreenshot *screenshot); -Gets the screenshot kind. - -Parameters - - - - - - -screenshot -a AsScreenshot instance. - - - -Returns - a AsScreenshotKind - - -as_screenshot_set_kind () -as_screenshot_set_kind -void -as_screenshot_set_kind (AsScreenshot *screenshot, - AsScreenshotKind kind); -Sets the screenshot kind. - -Parameters - - - - - - -screenshot -a AsScreenshot instance. - -kind -the AsScreenshotKind. - - - - -as_screenshot_get_caption () -as_screenshot_get_caption -const gchar * -as_screenshot_get_caption (AsScreenshot *screenshot); -Gets the image caption - -Parameters - - - - - - -screenshot -a AsScreenshot instance. - - - -Returns - the caption - - -as_screenshot_set_caption () -as_screenshot_set_caption -void -as_screenshot_set_caption (AsScreenshot *screenshot, - const gchar *caption, - const gchar *locale); -Sets a caption on the screenshot - -Parameters - - - - - - -screenshot -a AsScreenshot instance. - -caption -the caption text. - - - - -as_screenshot_get_images () -as_screenshot_get_images -GPtrArray * -as_screenshot_get_images (AsScreenshot *screenshot); -Gets the image sizes included in the screenshot. - -Parameters - - - - - - -screenshot -a AsScreenshot instance. - - - -Returns - an array. -[element-type AsImage][transfer none] - - -as_screenshot_add_image () -as_screenshot_add_image -void -as_screenshot_add_image (AsScreenshot *screenshot, - AsImage *image); -Adds an image to the screenshot. - -Parameters - - - - - - -screenshot -a AsScreenshot instance. - -image -a AsImage instance. - - - - -as_screenshot_get_active_locale () -as_screenshot_get_active_locale -gchar * -as_screenshot_get_active_locale (AsScreenshot *screenshot); -Get the current active locale, which -is used to get localized messages. - - -as_screenshot_set_active_locale () -as_screenshot_set_active_locale -void -as_screenshot_set_active_locale (AsScreenshot *screenshot, - const gchar *locale); -Set the current active locale, which -is used to get localized messages. -If the AsComponent linking this AsScreenshot was fetched -from a localized database, usually only -one locale is available. - - - - -Types and Values - -AS_TYPE_SCREENSHOT -AS_TYPE_SCREENSHOT -#define AS_TYPE_SCREENSHOT (as_screenshot_get_type ()) - - - - - -struct AsScreenshotClass -AsScreenshotClass -struct AsScreenshotClass { - GObjectClass parent_class; -}; - - - - - -enum AsScreenshotKind -AsScreenshotKind -The screenshot type. - -Members - - - - - - -AS_SCREENSHOT_KIND_UNKNOWN -Type invalid or not known - - - -AS_SCREENSHOT_KIND_DEFAULT -The primary screenshot to show by default - - - -AS_SCREENSHOT_KIND_EXTRA -Optional screenshot - - - - - - -AsScreenshot -AsScreenshot -typedef struct _AsScreenshot AsScreenshot; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-translation.xml appstream-0.12.0/docs/api/xml/as-translation.xml --- appstream-0.9.4/docs/api/xml/as-translation.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-translation.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,284 +0,0 @@ - - -]> - - -AsTranslation -3 -APPSTREAM Library - - -AsTranslation -Description of translation domains for an upstream component. - - - -Functions - - - - - -const gchar * -as_translation_kind_to_string () -AsTranslationKind -as_translation_kind_from_string () -AsTranslation * -as_translation_new () -AsTranslationKind -as_translation_get_kind () -void -as_translation_set_kind () -const gchar * -as_translation_get_id () -void -as_translation_set_id () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_TRANSLATION -structAsTranslationClass -enumAsTranslationKind -AsTranslation - - - - - - -Object Hierarchy - GObject - ╰── AsTranslation - - - -Includes#include <appstream.h> - - - -Description -Describes the translation domain and translation system used by the upstream component. -See the specification for -more information on the corresponding XML tag. -See also: AsComponent - - - -Functions - -as_translation_kind_to_string () -as_translation_kind_to_string -const gchar * -as_translation_kind_to_string (AsTranslationKind kind); -Converts the enumerated value to a text representation. - -Parameters - - - - - - -kind -the AsTranslationKind. - - - -Returns - string version of kind - - - -as_translation_kind_from_string () -as_translation_kind_from_string -AsTranslationKind -as_translation_kind_from_string (const gchar *kind_str); -Converts the text representation to an enumerated value. - -Parameters - - - - - - -kind_str -the string. - - - -Returns - a AsTranslationKind or AS_TRANSLATION_KIND_UNKNOWN for unknown - - -as_translation_new () -as_translation_new -AsTranslation * -as_translation_new (void); -Creates a new AsTranslation. - -Returns - a AsTranslation. -[transfer full] - - -as_translation_get_kind () -as_translation_get_kind -AsTranslationKind -as_translation_get_kind (AsTranslation *tr); -The translation system type. - -Parameters - - - - - - -tr -a AsTranslation instance. - - - -Returns - an enum of type AsTranslationKind - - -as_translation_set_kind () -as_translation_set_kind -void -as_translation_set_kind (AsTranslation *tr, - AsTranslationKind kind); -Set the translation system type. - -Parameters - - - - - - -tr -a AsTranslation instance. - -kind -the new AsTranslationKind - - - - -as_translation_get_id () -as_translation_get_id -const gchar * -as_translation_get_id (AsTranslation *tr); -The ID (e.g. Gettext translation domain) of this translation. - -Parameters - - - - - - -tr -a AsTranslation instance. - - - - -as_translation_set_id () -as_translation_set_id -void -as_translation_set_id (AsTranslation *tr, - const gchar *id); -Set the ID (e.g. Gettext domain) of this translation. - -Parameters - - - - - - -tr -a AsTranslation instance. - -id -The ID of this translation. - - - - - - -Types and Values - -AS_TYPE_TRANSLATION -AS_TYPE_TRANSLATION -#define AS_TYPE_TRANSLATION (as_translation_get_type ()) - - - - - -struct AsTranslationClass -AsTranslationClass -struct AsTranslationClass { - GObjectClass parent_class; -}; - - - - - -enum AsTranslationKind -AsTranslationKind -The translation type. - -Members - - - - - - -AS_TRANSLATION_KIND_UNKNOWN -Type invalid or not known - - - -AS_TRANSLATION_KIND_GETTEXT -Gettext translation domain - - - -AS_TRANSLATION_KIND_QT -Qt translation domain - - - - - - -AsTranslation -AsTranslation -typedef struct _AsTranslation AsTranslation; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-utils-private.xml appstream-0.12.0/docs/api/xml/as-utils-private.xml --- appstream-0.9.4/docs/api/xml/as-utils-private.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-utils-private.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,314 +0,0 @@ - - -]> - - -as-utils-private -3 -APPSTREAM Library - - -as-utils-private - - - - -Functions - - - - - -gboolean -as_utils_delete_dir_recursive () -GPtrArray * -as_utils_categories_from_strv () -GPtrArray * -as_utils_categories_from_str () -GPtrArray * -as_utils_find_files_matching () -GPtrArray * -as_utils_find_files () -gboolean -as_utils_is_root () -gboolean -as_utils_is_writable () -gchar * -as_str_replace () -gchar ** -as_ptr_array_to_strv () -gboolean -as_touch_location () -gboolean -as_copy_file () -void -as_reset_umask () -gboolean -as_is_cruft_locale () -gchar * -as_locale_strip_encoding () -gchar * -as_get_current_arch () -gboolean -as_arch_compatible () - - - - - - - - -Description - - - - - -Functions - -as_utils_delete_dir_recursive () -as_utils_delete_dir_recursive -gboolean -as_utils_delete_dir_recursive (const gchar *dirname); -Remove directory and all its children (like rm -r does). - -Parameters - - - - - - -dirname -Directory to remove - - - -Returns - TRUE if operation was successful - - -as_utils_categories_from_strv () -as_utils_categories_from_strv -GPtrArray * -as_utils_categories_from_strv (gchar **categories_strv, - GPtrArray *system_categories); -Create a list of categories from string array - -Parameters - - - - - - -categories_strv -a string array - -system_categories -list of AsCategory objects available on this system - - - -Returns - GPtrArray of AsCategory objects matching the strings in the array. -[element-type AsCategory][transfer full] - - -as_utils_categories_from_str () -as_utils_categories_from_str -GPtrArray * -as_utils_categories_from_str (const gchar *categories_str, - GPtrArray *system_categories); -Create a list of categories from semicolon-separated string - -Parameters - - - - - - -categories_str -string with semicolon-separated categories - -system_categories -list of AsCategory objects available on this system - - - -Returns - GPtrArray of AsCategory objcts matching the strings in the array. -[element-type AsCategory][transfer full] - - -as_utils_find_files_matching () -as_utils_find_files_matching -GPtrArray * -as_utils_find_files_matching (const gchar *dir, - const gchar *pattern, - gboolean recursive, - GError **error); - - -as_utils_find_files () -as_utils_find_files -GPtrArray * -as_utils_find_files (const gchar *dir, - gboolean recursive, - GError **error); - - -as_utils_is_root () -as_utils_is_root -gboolean -as_utils_is_root (void); - - -as_utils_is_writable () -as_utils_is_writable -gboolean -as_utils_is_writable (const gchar *path); -Checks if a path is writable. - -Parameters - - - - - - -path -the path to check. - - - - -as_str_replace () -as_str_replace -gchar * -as_str_replace (const gchar *str, - const gchar *old_str, - const gchar *new_str); - - -as_ptr_array_to_strv () -as_ptr_array_to_strv -gchar ** -as_ptr_array_to_strv (GPtrArray *array); - -Parameters - - - - - - -array -. -[element-type utf8] - - -Returns - strv of the string array. -[transfer full] - - -as_touch_location () -as_touch_location -gboolean -as_touch_location (const gchar *fname); -Change mtime of a filesystem location. - -Parameters - - - - - - -fname -The file or directory to touch. - - - - -as_copy_file () -as_copy_file -gboolean -as_copy_file (const gchar *source, - const gchar *destination, - GError **error); -Copy a file. - - -as_reset_umask () -as_reset_umask -void -as_reset_umask (void); -Reset umask potentially set by the user to a default value, -so we can create files with the correct permissions. - - -as_is_cruft_locale () -as_is_cruft_locale -gboolean -as_is_cruft_locale (const gchar *locale); -Checks whether the given locale is valid or a cruft or dummy -locale. - - -as_locale_strip_encoding () -as_locale_strip_encoding -gchar * -as_locale_strip_encoding (gchar *locale); -Remove the encoding from a locale string. -The function modifies the string directly. - - -as_get_current_arch () -as_get_current_arch -gchar * -as_get_current_arch (void); -Get the current architecture as vendor strings -(e.g. "amd64" instead of "x86_64"). - -Returns - The current OS architecture as string. -[transfer full] - - -as_arch_compatible () -as_arch_compatible -gboolean -as_arch_compatible (const gchar *arch1, - const gchar *arch2); -Compares two architectures and returns TRUE if they are compatible. - -Parameters - - - - - - -arch1 -Architecture 1 - -arch2 -Architecture 2 - - - - - - -Types and Values - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-validator-issue.xml appstream-0.12.0/docs/api/xml/as-validator-issue.xml --- appstream-0.9.4/docs/api/xml/as-validator-issue.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-validator-issue.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,432 +0,0 @@ - - -]> - - -AsValidatorIssue -3 -APPSTREAM Library - - -AsValidatorIssue -Object representing an issue found in AppStream metadata - - - -Functions - - - - - -AsValidatorIssue * -as_validator_issue_new () -AsIssueKind -as_validator_issue_get_kind () -void -as_validator_issue_set_kind () -AsIssueImportance -as_validator_issue_get_importance () -void -as_validator_issue_set_importance () -const gchar * -as_validator_issue_get_message () -void -as_validator_issue_set_message () -const gchar * -as_validator_issue_get_location () -void -as_validator_issue_set_location () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_VALIDATOR_ISSUE -structAsValidatorIssueClass -enumAsIssueImportance -enumAsIssueKind -AsValidatorIssue - - - - - - -Object Hierarchy - GObject - ╰── AsValidatorIssue - - - -Includes#include <appstream.h> - - - -Description -See also: AsValidator - - - -Functions - -as_validator_issue_new () -as_validator_issue_new -AsValidatorIssue * -as_validator_issue_new (void); -Creates a new AsValidatorIssue. - -Returns - a AsValidatorIssue. -[transfer full] - - -as_validator_issue_get_kind () -as_validator_issue_get_kind -AsIssueKind -as_validator_issue_get_kind (AsValidatorIssue *issue); -Gets the issue kind enum, if available. - -Parameters - - - - - - -issue -a AsValidatorIssue instance. - - - -Returns - a AsIssueKind - - -as_validator_issue_set_kind () -as_validator_issue_set_kind -void -as_validator_issue_set_kind (AsValidatorIssue *issue, - AsIssueKind kind); -Sets the kind enum for this issue, if known. - -Parameters - - - - - - -issue -a AsValidatorIssue instance. - -kind -the AsIssueKind. - - - - -as_validator_issue_get_importance () -as_validator_issue_get_importance -AsIssueImportance -as_validator_issue_get_importance (AsValidatorIssue *issue); -Gets the importance of this issue. - -Parameters - - - - - - -issue -a AsValidatorIssue instance. - - - -Returns - a AsIssueImportance - - -as_validator_issue_set_importance () -as_validator_issue_set_importance -void -as_validator_issue_set_importance (AsValidatorIssue *issue, - AsIssueImportance importance); -Sets the importance for this issue. - -Parameters - - - - - - -issue -a AsValidatorIssue instance. - -importance -the AsIssueImportance. - - - - -as_validator_issue_get_message () -as_validator_issue_get_message -const gchar * -as_validator_issue_get_message (AsValidatorIssue *issue); -Gets the message for the issue. - -Parameters - - - - - - -issue -a AsValidatorIssue instance. - - - -Returns - the message - - -as_validator_issue_set_message () -as_validator_issue_set_message -void -as_validator_issue_set_message (AsValidatorIssue *issue, - const gchar *message); -Sets a message on the issue. - -Parameters - - - - - - -issue -a AsValidatorIssue instance. - -message -the message text. - - - - -as_validator_issue_get_location () -as_validator_issue_get_location -const gchar * -as_validator_issue_get_location (AsValidatorIssue *issue); -Gets a location hint for the issue. - -Parameters - - - - - - -issue -a AsValidatorIssue instance. - - - -Returns - the location hint - - -as_validator_issue_set_location () -as_validator_issue_set_location -void -as_validator_issue_set_location (AsValidatorIssue *issue, - const gchar *location); -Sets a location hint for this issue. - -Parameters - - - - - - -issue -a AsValidatorIssue instance. - -location -a location hint. - - - - - - -Types and Values - -AS_TYPE_VALIDATOR_ISSUE -AS_TYPE_VALIDATOR_ISSUE -#define AS_TYPE_VALIDATOR_ISSUE (as_validator_issue_get_type ()) - - - - - -struct AsValidatorIssueClass -AsValidatorIssueClass -struct AsValidatorIssueClass { - GObjectClass parent_class; -}; - - - - - -enum AsIssueImportance -AsIssueImportance -The importance of an issue found by AsValidator - -Members - - - - - - -AS_ISSUE_IMPORTANCE_UNKNOWN - - - -AS_ISSUE_IMPORTANCE_ERROR -There is a serious error in your metadata - - - -AS_ISSUE_IMPORTANCE_WARNING -Something which should be fixed, but is not fatal - - - -AS_ISSUE_IMPORTANCE_INFO -Non-essential information on how to improve your metadata - - - -AS_ISSUE_IMPORTANCE_PEDANTIC -Pedantic information - - - - - - -enum AsIssueKind -AsIssueKind -The issue type. - -Members - - - - - - -AS_ISSUE_KIND_UNKNOWN -Type invalid or not known - - - -AS_ISSUE_KIND_MARKUP_INVALID -The XML markup is invalid - - - -AS_ISSUE_KIND_LEGACY -An element from a legacy AppStream specification has been found - - - -AS_ISSUE_KIND_TAG_DUPLICATED -A tag is duplicated - - - -AS_ISSUE_KIND_TAG_MISSING -A required tag is missing - - - -AS_ISSUE_KIND_TAG_UNKNOWN -An unknown tag was found - - - -AS_ISSUE_KIND_TAG_NOT_ALLOWED -A tag is not allowed in the current context - - - -AS_ISSUE_KIND_PROPERTY_MISSING -A required property is missing - - - -AS_ISSUE_KIND_PROPERTY_INVALID -A property is invalid - - - -AS_ISSUE_KIND_VALUE_MISSING -A value is missing - - - -AS_ISSUE_KIND_VALUE_WRONG -The value of a tag or property is wrong - - - -AS_ISSUE_KIND_VALUE_ISSUE -There is an issue with a tag or property value (often non-fatal) - - - -AS_ISSUE_KIND_FILE_MISSING -A required file or other metadata was missing - - - -AS_ISSUE_KIND_WRONG_NAME -The naming of an entity is wrong - - - -AS_ISSUE_KIND_READ_ERROR -Reading of data failed - - - - - - -AsValidatorIssue -AsValidatorIssue -typedef struct _AsValidatorIssue AsValidatorIssue; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-validator.xml appstream-0.12.0/docs/api/xml/as-validator.xml --- appstream-0.9.4/docs/api/xml/as-validator.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-validator.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,230 +0,0 @@ - - -]> - - -AsValidator -3 -APPSTREAM Library - - -AsValidator -Validator and report-generator about AppStream XML metadata - - - -Functions - - - - - -AsValidator * -as_validator_new () -void -as_validator_clear_issues () -gboolean -as_validator_validate_file () -gboolean -as_validator_validate_data () -gboolean -as_validator_validate_tree () -GList * -as_validator_get_issues () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_VALIDATOR -structAsValidatorClass -AsValidator - - - - - - -Object Hierarchy - GObject - ╰── AsValidator - - - -Includes#include <appstream.h> - - - -Description -This object is able to validate AppStream XML metadata (distro and upstream) -and to generate a report about issues found with it. -See also: AsMetadata - - - -Functions - -as_validator_new () -as_validator_new -AsValidator * -as_validator_new (void); -Creates a new AsValidator. - -Returns - an AsValidator. -[transfer full] - - -as_validator_clear_issues () -as_validator_clear_issues -void -as_validator_clear_issues (AsValidator *validator); -Clears the list of issues - -Parameters - - - - - - -validator -An instance of AsValidator. - - - - -as_validator_validate_file () -as_validator_validate_file -gboolean -as_validator_validate_file (AsValidator *validator, - GFile *metadata_file); -Validate an AppStream XML file - -Parameters - - - - - - -validator -An instance of AsValidator. - -metadata_file -An AppStream XML file. - - - - -as_validator_validate_data () -as_validator_validate_data -gboolean -as_validator_validate_data (AsValidator *validator, - const gchar *metadata); -Validate AppStream XML data - -Parameters - - - - - - -validator -An instance of AsValidator. - -metadata -XML metadata. - - - - -as_validator_validate_tree () -as_validator_validate_tree -gboolean -as_validator_validate_tree (AsValidator *validator, - const gchar *root_dir); -Validate a full directory tree for issues in AppStream metadata. - -Parameters - - - - - - -validator -An instance of AsValidator. - -root_dir -The root directory of the filesystem tree that should be validated. - - - - -as_validator_get_issues () -as_validator_get_issues -GList * -as_validator_get_issues (AsValidator *validator); -Get a list of found metadata format issues. - -Parameters - - - - - - -validator -An instance of AsValidator. - - - -Returns - a list of AsValidatorIssue instances, free with g_list_free(). -[element-type AsValidatorIssue][transfer container] - - - - -Types and Values - -AS_TYPE_VALIDATOR -AS_TYPE_VALIDATOR -#define AS_TYPE_VALIDATOR (as_validator_get_type ()) - - - - - -struct AsValidatorClass -AsValidatorClass -struct AsValidatorClass { - GObjectClass parent_class; -}; - - - - - -AsValidator -AsValidator -typedef struct _AsValidator AsValidator; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-xmldata.xml appstream-0.12.0/docs/api/xml/as-xmldata.xml --- appstream-0.9.4/docs/api/xml/as-xmldata.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-xmldata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,305 +0,0 @@ - - -]> - - -AsXMLData -3 -APPSTREAM Library - - -AsXMLData -AppStream data XML serialization. - - - -Functions - - - - - -AsXMLData * -as_xmldata_new () -void -as_xmldata_initialize () -AsComponent * -as_xmldata_parse_upstream_data () -GPtrArray * -as_xmldata_parse_distro_data () -gboolean -as_xmldata_update_cpt_with_upstream_data () -gchar * -as_xmldata_serialize_to_upstream () -gchar * -as_xmldata_serialize_to_distro () -void -as_xmldata_set_parser_mode () -void -as_xmldata_parse_component_node () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_XMLDATA -structAsXMLDataClass -AsXMLData - - - - - - -Object Hierarchy - GObject - ╰── AsXMLData - - - -Includes#include <appstream.h> - - - -Description -Private class to serialize AppStream data into its XML representation and -deserialize the data again. -This class is used by AsMetadata to read AppStream XML. -See also: AsComponent, AsMetadata - - - -Functions - -as_xmldata_new () -as_xmldata_new -AsXMLData * -as_xmldata_new (void); - - -as_xmldata_initialize () -as_xmldata_initialize -void -as_xmldata_initialize (AsXMLData *xdt, - const gchar *locale, - const gchar *origin, - const gchar *media_baseurl, - const gchar *arch, - gint priority); -Initialize the XML handler. - -Parameters - - - - - - -xdt -An instance of AsXMLData - - - - -as_xmldata_parse_upstream_data () -as_xmldata_parse_upstream_data -AsComponent * -as_xmldata_parse_upstream_data (AsXMLData *xdt, - const gchar *data, - GError **error); -Parse AppStream upstream metadata. - -Parameters - - - - - - -xdt -An instance of AsXMLData - -data -XML representing upstream metadata. - -error -A GError - - - -Returns - An AsComponent, deserialized from the XML. -[transfer full] - - -as_xmldata_parse_distro_data () -as_xmldata_parse_distro_data -GPtrArray * -as_xmldata_parse_distro_data (AsXMLData *xdt, - const gchar *data, - GError **error); -Parse AppStream upstream metadata. - -Parameters - - - - - - -xdt -An instance of AsXMLData - -data -XML representing distro metadata. - -error -A GError - - - -Returns - An array of AsComponent, deserialized from the XML. -[transfer full][element-type AsComponent] - - -as_xmldata_update_cpt_with_upstream_data () -as_xmldata_update_cpt_with_upstream_data -gboolean -as_xmldata_update_cpt_with_upstream_data - (AsXMLData *xdt, - const gchar *data, - AsComponent *cpt, - GError **error); -Parse AppStream upstream metadata. - -Parameters - - - - - - -xdt -An instance of AsXMLData - -data -XML representing upstream metadata. - -cpt -Component that should be updated. - -error -A GError - - - - -as_xmldata_serialize_to_upstream () -as_xmldata_serialize_to_upstream -gchar * -as_xmldata_serialize_to_upstream (AsXMLData *xdt, - AsComponent *cpt); -Serialize an AsComponent to upstream XML. - -Parameters - - - - - - -xdt -An instance of AsXMLData - -cpt -The component to serialize. - - - -Returns - XML metadata. - - -as_xmldata_serialize_to_distro () -as_xmldata_serialize_to_distro -gchar * -as_xmldata_serialize_to_distro (AsXMLData *xdt, - GPtrArray *cpts, - gboolean write_header); -Serialize an AsComponent to distro XML. - -Parameters - - - - - - -xdt -An instance of AsXMLData - - - -Returns - XML metadata. - - -as_xmldata_set_parser_mode () -as_xmldata_set_parser_mode -void -as_xmldata_set_parser_mode (AsXMLData *xdt, - AsParserMode mode); - - -as_xmldata_parse_component_node () -as_xmldata_parse_component_node -void -as_xmldata_parse_component_node (AsXMLData *metad, - xmlNode *node, - AsComponent *cpt, - GError **error); - - - - -Types and Values - -AS_TYPE_XMLDATA -AS_TYPE_XMLDATA -#define AS_TYPE_XMLDATA (as_xmldata_get_type ()) - - - - - -struct AsXMLDataClass -AsXMLDataClass -struct AsXMLDataClass { - GObjectClass parent_class; -}; - - - - - -AsXMLData -AsXMLData -typedef struct _AsXMLData AsXMLData; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/as-yamldata.xml appstream-0.12.0/docs/api/xml/as-yamldata.xml --- appstream-0.9.4/docs/api/xml/as-yamldata.xml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/as-yamldata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,222 +0,0 @@ - - -]> - - -AsYAMLData -3 -APPSTREAM Library - - -AsYAMLData - - - - -Functions - - - - - -AsYAMLData * -as_yamldata_new () -void -as_yamldata_initialize () -GPtrArray * -as_yamldata_parse_distro_data () -gchar * -as_yamldata_serialize_to_distro () -const gchar * -as_yamldata_get_locale () -void -as_yamldata_set_locale () - - - - - - -Types and Values - - - - - -#defineAS_TYPE_YAMLDATA -structAsYAMLDataClass -AsYAMLData - - - - - - -Object Hierarchy - GObject - ╰── AsYAMLData - - - - - -Description - - - - - -Functions - -as_yamldata_new () -as_yamldata_new -AsYAMLData * -as_yamldata_new (void); - - -as_yamldata_initialize () -as_yamldata_initialize -void -as_yamldata_initialize (AsYAMLData *ydt, - const gchar *locale, - const gchar *origin, - const gchar *media_baseurl, - const gchar *arch, - gint priority); -Initialize the YAML handler. - -Parameters - - - - - - -ydt -An instance of AsYAMLData - - - - -as_yamldata_parse_distro_data () -as_yamldata_parse_distro_data -GPtrArray * -as_yamldata_parse_distro_data (AsYAMLData *ydt, - const gchar *data, - GError **error); -Read an array of AsComponent from AppStream YAML metadata. - -Parameters - - - - - - -ydt -An instance of AsYAMLData - -data -YAML metadata to parse - - - -Returns - An array of AsComponent or NULL. -[transfer full][element-type AsComponent] - - -as_yamldata_serialize_to_distro () -as_yamldata_serialize_to_distro -gchar * -as_yamldata_serialize_to_distro (AsYAMLData *ydt, - GPtrArray *cpts, - gboolean write_header, - gboolean add_timestamp, - GError **error); - - -as_yamldata_get_locale () -as_yamldata_get_locale -const gchar * -as_yamldata_get_locale (AsYAMLData *ydt); -Gets the current active locale for parsing DEP-11 metadata., -or "ALL" if all locales are read. - -Parameters - - - - - - -ydt -a AsYAMLData instance. - - - -Returns - Locale used for metadata parsing. - - -as_yamldata_set_locale () -as_yamldata_set_locale -void -as_yamldata_set_locale (AsYAMLData *ydt, - const gchar *locale); -Sets the locale which should be read when processing DEP-11 metadata. -All other locales are ignored, which increases parsing speed and -reduces memory usage. -If you set the locale to "ALL", all locales will be read. - -Parameters - - - - - - -ydt -a AsYAMLData instance. - -locale -the locale. - - - - - - -Types and Values - -AS_TYPE_YAMLDATA -AS_TYPE_YAMLDATA -#define AS_TYPE_YAMLDATA (as_yamldata_get_type ()) - - - - - -struct AsYAMLDataClass -AsYAMLDataClass -struct AsYAMLDataClass { - GObjectClass parent_class; -}; - - - - - -AsYAMLData -AsYAMLData -typedef struct _AsYAMLData AsYAMLData; - - - - - - - diff -Nru appstream-0.9.4/docs/api/xml/object_index.sgml appstream-0.12.0/docs/api/xml/object_index.sgml --- appstream-0.9.4/docs/api/xml/object_index.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/object_index.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - -]> - - - - - - - -AsCacheBuilder -AsCategory -AsComponent - - -AsComponentKind -AsDataPool -AsDatabase - - -AsDistroDetails -AsIcon -AsImage - - -AsMenuParser -AsMetadata -AsProvided - - -AsRelease -AsScreenshot -AsTranslation - - -AsValidator -AsValidatorIssue -AsXMLData - - -AsYAMLData -GEnum -GObject - - diff -Nru appstream-0.9.4/docs/api/xml/tree_index.sgml appstream-0.12.0/docs/api/xml/tree_index.sgml --- appstream-0.9.4/docs/api/xml/tree_index.sgml 2016-04-18 14:19:31.000000000 +0000 +++ appstream-0.12.0/docs/api/xml/tree_index.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - -]> - - GObject - ├── AsCacheBuilder - ├── AsCategory - ├── AsComponent - ├── AsDataPool - ├── AsDatabase - ├── AsDistroDetails - ├── AsIcon - ├── AsImage - ├── AsMenuParser - ├── AsMetadata - ├── AsProvided - ├── AsRelease - ├── AsScreenshot - ├── AsTranslation - ├── AsValidator - ├── AsValidatorIssue - ├── AsXMLData - ╰── AsYAMLData - GEnum - ╰── AsComponentKind - diff -Nru appstream-0.9.4/docs/CMakeLists.txt appstream-0.12.0/docs/CMakeLists.txt --- appstream-0.9.4/docs/CMakeLists.txt 2016-03-25 16:18:12.000000000 +0000 +++ appstream-0.12.0/docs/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -# CMakeLists for documentation - -find_program (XMLTO xmlto) -mark_as_advanced (XMLTO) -if (XMLTO STREQUAL "XMLTO-NOTFOUND") - message (FATAL_ERROR "Xmlto was not found! Please install it to continue!") -endif (XMLTO STREQUAL "XMLTO-NOTFOUND") - -include (${CMAKE_SOURCE_DIR}/data/cmake/documentation.cmake) - -add_xml_manpages(doc-man-asi "sources/man/appstreamcli.1" "" "") - -set(DOC_HTML_EXPORT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/html") - -if (DOCUMENTATION) - ######################### - # General project documentation - find_program (PUBLICAN publican) - mark_as_advanced (PUBLICAN) - if (NOT PUBLICAN) - message (FATAL_ERROR "Publican was not found. Please install it to continue!") - endif () - - # we need to assemble our documentation build-directory before we can built it - add_custom_target (assemble-docs - COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/prepare-docbuild.sh" "source_dir=${CMAKE_CURRENT_SOURCE_DIR}" "build_dir=${CMAKE_BINARY_DIR}/docbuild" - DEPENDS "publican.cfg" - "sources/" - "${CMAKE_BINARY_DIR}/docbuild/" - appstream - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - VERBATIM - ) - - # the actual target to build all documentation - add_custom_target (documentation-noexport - COMMAND ${PUBLICAN} "build" "--langs=en-US" "--publish" "--formats=html" - DEPENDS "publican.cfg" - "${CMAKE_BINARY_DIR}/docbuild/publican.cfg" - assemble-docs - doc-appstream - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/docbuild/ - ) - add_custom_command (OUTPUT "${CMAKE_BINARY_DIR}/docbuild/" - COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/docbuild" - VERBATIM - ) - - set_directory_properties (PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/html) - set_directory_properties (PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_BINARY_DIR}/docbuild) - - # a target to export documentation html to the source tree (useful when building the tarballs) - add_custom_target (documentation - COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/docbuild/AppStream-Docs/en-US/html/" "${DOC_HTML_EXPORT_DIR}" - DEPENDS documentation-noexport - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - add_custom_command( - TARGET documentation POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/api/html" "${CMAKE_CURRENT_SOURCE_DIR}/html/api/html" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - - ######################### - # API documentation - - find_package(GtkDoc) - if(NOT GTKDOC_FOUND) - message(FATAL_ERROR "gtkdoc was not found, API documentation can not be built.") - endif() - include(UseGtkDoc) - - gtk_doc_add_module(appstream ${CMAKE_SOURCE_DIR}/src - IGNOREHEADERS as-component-private.h as-utils.h as-database-write.h as-settings-private.h - SUFFIXES h c hh cc - LDFLAGS - -L${CMAKE_CURRENT_BINARY_DIR}/../src - -lappstream - LDPATH - "${CMAKE_CURRENT_BINARY_DIR}/../src" - OUTPUT_DIR - "${CMAKE_CURRENT_SOURCE_DIR}/api" - DEPENDS appstream) - - set_directory_properties (PROPERTIES CLEAN_NO_CUSTOM ${CMAKE_CURRENT_SOURCE_DIR}/api) - set_directory_properties (PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/api/html;${CMAKE_CURRENT_SOURCE_DIR}/api/xml;${CMAKE_CURRENT_SOURCE_DIR}/api/tmpl") -endif() - -option(INSTALL_PREBUILT_DOCS "Install prebuilt documentation, if found" ON) -if (INSTALL_PREBUILT_DOCS OR DOCUMENTATION) - if (DOCUMENTATION OR (EXISTS "${DOC_HTML_EXPORT_DIR}" AND IS_DIRECTORY "${DOC_HTML_EXPORT_DIR}")) - install(DIRECTORY "${DOC_HTML_EXPORT_DIR}/" DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/appstream/html) - - install(DIRECTORY DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/gtk-doc/html/) - install(CODE "if (\"\$ENV{DESTDIR}\" STREQUAL \"\") - execute_process (COMMAND \"${CMAKE_COMMAND}\" -E create_symlink - ${CMAKE_INSTALL_FULL_DATADIR}/doc/appstream/html/api/html/ - ${CMAKE_INSTALL_FULL_DATADIR}/gtk-doc/html/appstream - ) - else () - execute_process (COMMAND \"${CMAKE_COMMAND}\" -E create_symlink - ${CMAKE_INSTALL_FULL_DATADIR}/doc/appstream/html/api/html/ - \$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_DATADIR}/gtk-doc/html/appstream - ) - endif ()") - endif() -endif() diff -Nru appstream-0.9.4/docs/doc-build-helper.py appstream-0.12.0/docs/doc-build-helper.py --- appstream-0.9.4/docs/doc-build-helper.py 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/doc-build-helper.py 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 +# +# Copyright (C) 2016-2017 Matthias Klumpp +# +# Licensed under the GNU General Public License Version 2 +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the license, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# +# This is a helper script for Meson and intended to be called by the +# AppStream buildsystem. You do not want to run this manually. +# + +import os +import argparse +import subprocess +import shutil +from pathlib import Path + + +parser = argparse.ArgumentParser() +parser.add_argument('--ws') +parser.add_argument('--src') +parser.add_argument('--out') +parser.add_argument('--publican', default='publican') +parser.add_argument('project') +parser.add_argument('version') + + +def assemble_ws(src_dir, ws_dir): + print('Assembling workspace...') + if os.path.exists(ws_dir): + shutil.rmtree(ws_dir) + + shutil.copytree(os.path.join(src_dir, 'sources'), os.path.join(ws_dir, 'en-US'), symlinks=True) + shutil.copy2(os.path.join(src_dir, 'publican.cfg'), os.path.join(ws_dir, 'publican.cfg')) + + +def run_publican(ws_dir, publican_exe): + print('Running Publican...') + return subprocess.check_call([publican_exe, + 'build', + '--src_dir=' + ws_dir, + '--pub_dir=' + os.path.join(ws_dir, 'public'), + '--langs=en-US', + '--publish', + '--formats=html']) + + +def copy_result(project, version, ws_dir, out_dir): + print('Copying result...') + if os.path.exists(out_dir): + shutil.rmtree(out_dir) + + shutil.copytree(os.path.join(ws_dir, 'public', 'en-US', project, version, 'html', project), + out_dir, symlinks=True) + + +def main(args): + options = parser.parse_args(args) + + # some control over where Publican puts its tmp dir + os.chdir(options.ws) + + if not options.ws: + print('You need to define a temporary workspace directory!') + return 1 + + if not options.src: + print('You need to define a source directory!') + return 1 + + if not options.out: + print('You need to define an output directory!') + return 1 + + ws_dir = os.path.join(options.ws, 'publican_ws') + + # create temporary workspace for Publican, outside of the source tree + assemble_ws(options.src, ws_dir) + + # make HTML + run_publican(ws_dir, options.publican) + + # copy to output folder, overrding its contents + copy_result(options.project, options.version, ws_dir, os.path.join(options.out, 'html')) + + # make a dummy file so Meson can rebuild documentation on demand + Path(os.path.join(options.ws, 'docs_built.stamp')).touch() + + print('Documentation built.') + return 0 + + +if __name__ == '__main__': + import sys + sys.exit(main(sys.argv[1:])) diff -Nru appstream-0.9.4/docs/html/api/html/annotation-glossary.html appstream-0.12.0/docs/html/api/html/annotation-glossary.html --- appstream-0.9.4/docs/html/api/html/annotation-glossary.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/annotation-glossary.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ - - - - -Annotation Glossary: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-Annotation Glossary

-

A

-
array
-

Parameter points to an array of items.

-

D

-
default
-

Default parameter value (for in case the shadows-to function has less parameters).

-

E

-
element-type
-

Generics and defining elements of containers and arrays.

-

N

-
nullable
-

NULL may be passed as the value in, out, in-out; or as a return value.

-

T

-
transfer container
-

Free data container after the code is done.

-
transfer full
-

Free data after the code is done.

-
transfer none
-

Don't free data after the code is done.

-
type
-

Override the parsed C type with given type.

-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/api-index-full.html appstream-0.12.0/docs/html/api/html/api-index-full.html --- appstream-0.9.4/docs/html/api/html/api-index-full.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/api-index-full.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,1567 +0,0 @@ - - - - -API Index: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-API Index

-

A

-
-as_arch_compatible, function in as-utils-private -
-
-

B

-
-AsBundleKind, enum in as-enums -
-
-
-as_bundle_kind_from_string, function in as-enums -
-
-
-as_bundle_kind_to_string, function in as-enums -
-
-

C

-
-AsCacheBuilder, struct in AsCacheBuilder -
-
-
-AsCacheBuilderClass, struct in AsCacheBuilder -
-
-
-AsCacheBuilderError, enum in AsCacheBuilder -
-
-
-AS_CACHE_BUILDER_ERROR, macro in AsCacheBuilder -
-
-
-as_cache_builder_error_quark, function in AsCacheBuilder -
-
-
-as_cache_builder_new, function in AsCacheBuilder -
-
-
-as_cache_builder_refresh, function in AsCacheBuilder -
-
-
-as_cache_builder_setup, function in AsCacheBuilder -
-
-
-as_cache_builder_set_data_source_directories, function in AsCacheBuilder -
-
-
-AsCategory, struct in AsCategory -
-
-
-AsCategory:directory, object property in AsCategory -
-
-
-AsCategory:excluded, object property in AsCategory -
-
-
-AsCategory:icon, object property in AsCategory -
-
-
-AsCategory:included, object property in AsCategory -
-
-
-AsCategory:level, object property in AsCategory -
-
-
-AsCategory:name, object property in AsCategory -
-
-
-AsCategory:subcategories, object property in AsCategory -
-
-
-AsCategory:summary, object property in AsCategory -
-
-
-AsCategoryClass, struct in AsCategory -
-
-
-as_category_add_subcategory, function in AsCategory -
-
-
-as_category_complete, function in AsCategory -
-
-
-as_category_get_directory, function in AsCategory -
-
-
-as_category_get_excluded, function in AsCategory -
-
-
-as_category_get_icon, function in AsCategory -
-
-
-as_category_get_included, function in AsCategory -
-
-
-as_category_get_level, function in AsCategory -
-
-
-as_category_get_name, function in AsCategory -
-
-
-as_category_get_subcategories, function in AsCategory -
-
-
-as_category_get_summary, function in AsCategory -
-
-
-as_category_has_subcategory, function in AsCategory -
-
-
-as_category_new, function in AsCategory -
-
-
-as_category_remove_subcategory, function in AsCategory -
-
-
-as_category_set_directory, function in AsCategory -
-
-
-as_category_set_icon, function in AsCategory -
-
-
-as_category_set_level, function in AsCategory -
-
-
-as_category_set_name, function in AsCategory -
-
-
-as_category_set_summary, function in AsCategory -
-
-
-AsChecksumKind, enum in AsRelease -
-
-
-as_checksum_kind_from_string, function in AsRelease -
-
-
-as_checksum_kind_to_string, function in AsRelease -
-
-
-AsComponent, struct in AsComponent -
-
-
-AsComponent:categories, object property in AsComponent -
-
-
-AsComponent:description, object property in AsComponent -
-
-
-AsComponent:developer-name, object property in AsComponent -
-
-
-AsComponent:icons, object property in AsComponent -
-
-
-AsComponent:id, object property in AsComponent -
-
-
-AsComponent:keywords, object property in AsComponent -
-
-
-AsComponent:kind, object property in AsComponent -
-
-
-AsComponent:name, object property in AsComponent -
-
-
-AsComponent:pkgnames, object property in AsComponent -
-
-
-AsComponent:project-group, object property in AsComponent -
-
-
-AsComponent:project-license, object property in AsComponent -
-
-
-AsComponent:screenshots, object property in AsComponent -
-
-
-AsComponent:summary, object property in AsComponent -
-
-
-AsComponent:urls, object property in AsComponent -
-
-
-AsComponentClass, struct in AsComponent -
-
-
-AsComponentKind, enum in AsComponent -
-
-
-as_component_add_bundle_id, function in AsComponent -
-
-
-as_component_add_extends, function in AsComponent -
-
-
-as_component_add_extension, function in AsComponent -
-
-
-as_component_add_icon, function in AsComponent -
-
-
-as_component_add_language, function in AsComponent -
-
-
-as_component_add_provided, function in AsComponent -
-
-
-as_component_add_release, function in AsComponent -
-
-
-as_component_add_screenshot, function in AsComponent -
-
-
-as_component_add_translation, function in AsComponent -
-
-
-as_component_add_url, function in AsComponent -
-
-
-as_component_get_active_locale, function in AsComponent -
-
-
-as_component_get_bundle_id, function in AsComponent -
-
-
-as_component_get_categories, function in AsComponent -
-
-
-as_component_get_compulsory_for_desktops, function in AsComponent -
-
-
-as_component_get_description, function in AsComponent -
-
-
-as_component_get_developer_name, function in AsComponent -
-
-
-as_component_get_extends, function in AsComponent -
-
-
-as_component_get_extensions, function in AsComponent -
-
-
-as_component_get_icons, function in AsComponent -
-
-
-as_component_get_icon_by_size, function in AsComponent -
-
-
-as_component_get_id, function in AsComponent -
-
-
-as_component_get_keywords, function in AsComponent -
-
-
-as_component_get_kind, function in AsComponent -
-
-
-as_component_get_language, function in AsComponent -
-
-
-as_component_get_languages, function in AsComponent -
-
-
-as_component_get_name, function in AsComponent -
-
-
-as_component_get_origin, function in AsComponent -
-
-
-as_component_get_pkgnames, function in AsComponent -
-
-
-as_component_get_project_group, function in AsComponent -
-
-
-as_component_get_project_license, function in AsComponent -
-
-
-as_component_get_provided, function in AsComponent -
-
-
-as_component_get_provided_for_kind, function in AsComponent -
-
-
-as_component_get_releases, function in AsComponent -
-
-
-as_component_get_screenshots, function in AsComponent -
-
-
-as_component_get_source_pkgname, function in AsComponent -
-
-
-as_component_get_summary, function in AsComponent -
-
-
-as_component_get_translations, function in AsComponent -
-
-
-as_component_get_url, function in AsComponent -
-
-
-as_component_has_bundle, function in AsComponent -
-
-
-as_component_has_category, function in AsComponent -
-
-
-as_component_is_compulsory_for_desktop, function in AsComponent -
-
-
-as_component_is_valid, function in AsComponent -
-
-
-as_component_kind_from_string, function in AsComponent -
-
-
-as_component_kind_to_string, function in AsComponent -
-
-
-as_component_new, function in AsComponent -
-
-
-as_component_set_active_locale, function in AsComponent -
-
-
-as_component_set_categories, function in AsComponent -
-
-
-as_component_set_compulsory_for_desktops, function in AsComponent -
-
-
-as_component_set_description, function in AsComponent -
-
-
-as_component_set_developer_name, function in AsComponent -
-
-
-as_component_set_id, function in AsComponent -
-
-
-as_component_set_keywords, function in AsComponent -
-
-
-as_component_set_kind, function in AsComponent -
-
-
-as_component_set_name, function in AsComponent -
-
-
-as_component_set_origin, function in AsComponent -
-
-
-as_component_set_pkgnames, function in AsComponent -
-
-
-as_component_set_project_group, function in AsComponent -
-
-
-as_component_set_project_license, function in AsComponent -
-
-
-as_component_set_source_pkgname, function in AsComponent -
-
-
-as_component_set_summary, function in AsComponent -
-
-
-as_component_to_string, function in AsComponent -
-
-
-as_copy_file, function in as-utils-private -
-
-

D

-
-AsDatabase, struct in AsDatabase -
-
-
-AsDatabaseClass, struct in AsDatabase -
-
-
-AsDatabaseError, enum in AsDatabase -
-
-
-AS_DATABASE_ERROR, macro in AsDatabase -
-
-
-as_database_error_quark, function in AsDatabase -
-
-
-as_database_find_components, function in AsDatabase -
-
-
-as_database_get_all_components, function in AsDatabase -
-
-
-as_database_get_components_by_kind, function in AsDatabase -
-
-
-as_database_get_components_by_provided_item, function in AsDatabase -
-
-
-as_database_get_component_by_id, function in AsDatabase -
-
-
-as_database_get_location, function in AsDatabase -
-
-
-as_database_new, function in AsDatabase -
-
-
-as_database_open, function in AsDatabase -
-
-
-as_database_set_location, function in AsDatabase -
-
-
-AsDataPool, struct in AsDataPool -
-
-
-AsDataPoolClass, struct in AsDataPool -
-
-
-AsDataPoolError, enum in AsDataPool -
-
-
-AS_DATA_POOL_ERROR, macro in AsDataPool -
-
-
-as_data_pool_error_quark, function in AsDataPool -
-
-
-as_data_pool_get_components, function in AsDataPool -
-
-
-as_data_pool_get_component_by_id, function in AsDataPool -
-
-
-as_data_pool_get_locale, function in AsDataPool -
-
-
-as_data_pool_get_metadata_locations, function in AsDataPool -
-
-
-as_data_pool_new, function in AsDataPool -
-
-
-as_data_pool_set_locale, function in AsDataPool -
-
-
-as_data_pool_set_metadata_locations, function in AsDataPool -
-
-
-as_data_pool_update, function in AsDataPool -
-
-
-AsDistroDetails, struct in AsDistroDetails -
-
-
-AsDistroDetails:id, object property in AsDistroDetails -
-
-
-AsDistroDetails:name, object property in AsDistroDetails -
-
-
-AsDistroDetails:version, object property in AsDistroDetails -
-
-
-AsDistroDetailsClass, struct in AsDistroDetails -
-
-
-as_distro_details_get_bool, function in AsDistroDetails -
-
-
-as_distro_details_get_id, function in AsDistroDetails -
-
-
-as_distro_details_get_name, function in AsDistroDetails -
-
-
-as_distro_details_get_str, function in AsDistroDetails -
-
-
-as_distro_details_get_version, function in AsDistroDetails -
-
-
-as_distro_details_new, function in AsDistroDetails -
-
-

G

-
-as_get_current_arch, function in as-utils-private -
-
-
-as_get_icon_repository_paths, function in AsDistroDetails -
-
-
-as_get_system_categories, function in AsMenuParser -
-
-

I

-
-AsIcon, struct in AsIcon -
-
-
-AsIconClass, struct in AsIcon -
-
-
-AsIconKind, enum in AsIcon -
-
-
-as_icon_get_filename, function in AsIcon -
-
-
-as_icon_get_height, function in AsIcon -
-
-
-as_icon_get_kind, function in AsIcon -
-
-
-as_icon_get_name, function in AsIcon -
-
-
-as_icon_get_url, function in AsIcon -
-
-
-as_icon_get_width, function in AsIcon -
-
-
-as_icon_kind_from_string, function in AsIcon -
-
-
-as_icon_kind_to_string, function in AsIcon -
-
-
-as_icon_new, function in AsIcon -
-
-
-as_icon_set_filename, function in AsIcon -
-
-
-as_icon_set_height, function in AsIcon -
-
-
-as_icon_set_kind, function in AsIcon -
-
-
-as_icon_set_name, function in AsIcon -
-
-
-as_icon_set_url, function in AsIcon -
-
-
-as_icon_set_width, function in AsIcon -
-
-
-AsImage, struct in AsImage -
-
-
-AsImageClass, struct in AsImage -
-
-
-AsImageKind, enum in AsImage -
-
-
-as_image_get_height, function in AsImage -
-
-
-as_image_get_kind, function in AsImage -
-
-
-as_image_get_url, function in AsImage -
-
-
-as_image_get_width, function in AsImage -
-
-
-as_image_kind_from_string, function in AsImage -
-
-
-as_image_kind_to_string, function in AsImage -
-
-
-as_image_new, function in AsImage -
-
-
-as_image_set_height, function in AsImage -
-
-
-as_image_set_kind, function in AsImage -
-
-
-as_image_set_url, function in AsImage -
-
-
-as_image_set_width, function in AsImage -
-
-
-AsIssueImportance, enum in AsValidatorIssue -
-
-
-AsIssueKind, enum in AsValidatorIssue -
-
-
-as_is_cruft_locale, function in as-utils-private -
-
-

L

-
-as_locale_strip_encoding, function in as-utils-private -
-
-

M

-
-AsMenuParser, struct in AsMenuParser -
-
-
-AsMenuParser:update-category-data, object property in AsMenuParser -
-
-
-AsMenuParserClass, struct in AsMenuParser -
-
-
-as_menu_parser_get_update_category_data, function in AsMenuParser -
-
-
-as_menu_parser_new, function in AsMenuParser -
-
-
-as_menu_parser_new_from_file, function in AsMenuParser -
-
-
-as_menu_parser_parse, function in AsMenuParser -
-
-
-as_menu_parser_set_update_category_data, function in AsMenuParser -
-
-
-AsMetadata, struct in AsMetadata -
-
-
-AsMetadataClass, struct in AsMetadata -
-
-
-AsMetadataError, enum in AsMetadata -
-
-
-as_metadata_add_component, function in AsMetadata -
-
-
-as_metadata_clear_components, function in AsMetadata -
-
-
-as_metadata_components_to_distro_xml, function in AsMetadata -
-
-
-as_metadata_components_to_distro_yaml, function in AsMetadata -
-
-
-as_metadata_component_to_upstream_xml, function in AsMetadata -
-
-
-AS_METADATA_ERROR, macro in AsMetadata -
-
-
-as_metadata_error_quark, function in AsMetadata -
-
-
-as_metadata_get_architecture, function in AsMetadata -
-
-
-as_metadata_get_component, function in AsMetadata -
-
-
-as_metadata_get_components, function in AsMetadata -
-
-
-as_metadata_get_locale, function in AsMetadata -
-
-
-as_metadata_get_origin, function in AsMetadata -
-
-
-as_metadata_get_parser_mode, function in AsMetadata -
-
-
-as_metadata_get_update_existing, function in AsMetadata -
-
-
-as_metadata_get_write_header, function in AsMetadata -
-
-
-as_metadata_new, function in AsMetadata -
-
-
-as_metadata_parse_file, function in AsMetadata -
-
-
-as_metadata_parse_xml, function in AsMetadata -
-
-
-as_metadata_parse_yaml, function in AsMetadata -
-
-
-as_metadata_save_distro_xml, function in AsMetadata -
-
-
-as_metadata_save_distro_yaml, function in AsMetadata -
-
-
-as_metadata_save_upstream_xml, function in AsMetadata -
-
-
-as_metadata_set_architecture, function in AsMetadata -
-
-
-as_metadata_set_locale, function in AsMetadata -
-
-
-as_metadata_set_origin, function in AsMetadata -
-
-
-as_metadata_set_parser_mode, function in AsMetadata -
-
-
-as_metadata_set_update_existing, function in AsMetadata -
-
-
-as_metadata_set_write_header, function in AsMetadata -
-
-

P

-
-AsParserMode, enum in AsMetadata -
-
-
-AsProvided, struct in AsProvided -
-
-
-AsProvidedClass, struct in AsProvided -
-
-
-AsProvidedKind, enum in AsProvided -
-
-
-as_provided_add_item, function in AsProvided -
-
-
-as_provided_get_items, function in AsProvided -
-
-
-as_provided_get_kind, function in AsProvided -
-
-
-as_provided_has_item, function in AsProvided -
-
-
-as_provided_kind_from_string, function in AsProvided -
-
-
-as_provided_kind_to_l10n_string, function in AsProvided -
-
-
-as_provided_kind_to_string, function in AsProvided -
-
-
-as_provided_new, function in AsProvided -
-
-
-as_provided_set_kind, function in AsProvided -
-
-
-as_ptr_array_to_strv, function in as-utils-private -
-
-

R

-
-AsRelease, struct in AsRelease -
-
-
-AsReleaseClass, struct in AsRelease -
-
-
-as_release_add_location, function in AsRelease -
-
-
-as_release_get_active_locale, function in AsRelease -
-
-
-as_release_get_checksum, function in AsRelease -
-
-
-as_release_get_description, function in AsRelease -
-
-
-as_release_get_locations, function in AsRelease -
-
-
-as_release_get_size, function in AsRelease -
-
-
-as_release_get_timestamp, function in AsRelease -
-
-
-as_release_get_urgency, function in AsRelease -
-
-
-as_release_get_version, function in AsRelease -
-
-
-as_release_new, function in AsRelease -
-
-
-as_release_set_active_locale, function in AsRelease -
-
-
-as_release_set_checksum, function in AsRelease -
-
-
-as_release_set_description, function in AsRelease -
-
-
-as_release_set_size, function in AsRelease -
-
-
-as_release_set_timestamp, function in AsRelease -
-
-
-as_release_set_urgency, function in AsRelease -
-
-
-as_release_set_version, function in AsRelease -
-
-
-as_reset_umask, function in as-utils-private -
-
-

S

-
-AsScreenshot, struct in AsScreenshot -
-
-
-AsScreenshotClass, struct in AsScreenshot -
-
-
-AsScreenshotKind, enum in AsScreenshot -
-
-
-as_screenshot_add_image, function in AsScreenshot -
-
-
-as_screenshot_get_active_locale, function in AsScreenshot -
-
-
-as_screenshot_get_caption, function in AsScreenshot -
-
-
-as_screenshot_get_caption_table, function in as-screenshot-private -
-
-
-as_screenshot_get_images, function in AsScreenshot -
-
-
-as_screenshot_get_kind, function in AsScreenshot -
-
-
-as_screenshot_is_valid, function in AsScreenshot -
-
-
-as_screenshot_kind_from_string, function in AsScreenshot -
-
-
-as_screenshot_kind_to_string, function in AsScreenshot -
-
-
-as_screenshot_new, function in AsScreenshot -
-
-
-as_screenshot_set_active_locale, function in AsScreenshot -
-
-
-as_screenshot_set_caption, function in AsScreenshot -
-
-
-as_screenshot_set_kind, function in AsScreenshot -
-
-
-AsSizeKind, enum in AsRelease -
-
-
-as_size_kind_from_string, function in AsRelease -
-
-
-as_size_kind_to_string, function in AsRelease -
-
-
-as_str_replace, function in as-utils-private -
-
-

T

-
-as_touch_location, function in as-utils-private -
-
-
-AsTranslation, struct in AsTranslation -
-
-
-AsTranslationClass, struct in AsTranslation -
-
-
-AsTranslationKind, enum in AsTranslation -
-
-
-as_translation_get_id, function in AsTranslation -
-
-
-as_translation_get_kind, function in AsTranslation -
-
-
-as_translation_kind_from_string, function in AsTranslation -
-
-
-as_translation_kind_to_string, function in AsTranslation -
-
-
-as_translation_new, function in AsTranslation -
-
-
-as_translation_set_id, function in AsTranslation -
-
-
-as_translation_set_kind, function in AsTranslation -
-
-
-AS_TYPE_CACHE_BUILDER, macro in AsCacheBuilder -
-
-
-AS_TYPE_CATEGORY, macro in AsCategory -
-
-
-AS_TYPE_COMPONENT, macro in AsComponent -
-
-
-AS_TYPE_DATABASE, macro in AsDatabase -
-
-
-AS_TYPE_DATA_POOL, macro in AsDataPool -
-
-
-AS_TYPE_DISTRO_DETAILS, macro in AsDistroDetails -
-
-
-AS_TYPE_ICON, macro in AsIcon -
-
-
-AS_TYPE_IMAGE, macro in AsImage -
-
-
-AS_TYPE_MENU_PARSER, macro in AsMenuParser -
-
-
-AS_TYPE_METADATA, macro in AsMetadata -
-
-
-AS_TYPE_PROVIDED, macro in AsProvided -
-
-
-AS_TYPE_RELEASE, macro in AsRelease -
-
-
-AS_TYPE_SCREENSHOT, macro in AsScreenshot -
-
-
-AS_TYPE_TRANSLATION, macro in AsTranslation -
-
-
-AS_TYPE_VALIDATOR, macro in AsValidator -
-
-
-AS_TYPE_VALIDATOR_ISSUE, macro in AsValidatorIssue -
-
-
-AS_TYPE_XMLDATA, macro in AsXMLData -
-
-
-AS_TYPE_YAMLDATA, macro in AsYAMLData -
-
-

U

-
-AsUrgencyKind, enum in as-enums -
-
-
-as_urgency_kind_from_string, function in as-enums -
-
-
-as_urgency_kind_to_string, function in as-enums -
-
-
-AsUrlKind, enum in as-enums -
-
-
-as_url_kind_from_string, function in as-enums -
-
-
-as_url_kind_to_string, function in as-enums -
-
-
-as_utils_categories_from_str, function in as-utils-private -
-
-
-as_utils_categories_from_strv, function in as-utils-private -
-
-
-as_utils_delete_dir_recursive, function in as-utils-private -
-
-
-as_utils_find_files, function in as-utils-private -
-
-
-as_utils_find_files_matching, function in as-utils-private -
-
-
-as_utils_is_root, function in as-utils-private -
-
-
-as_utils_is_writable, function in as-utils-private -
-
-

V

-
-AsValidator, struct in AsValidator -
-
-
-AsValidatorClass, struct in AsValidator -
-
-
-AsValidatorIssue, struct in AsValidatorIssue -
-
-
-AsValidatorIssueClass, struct in AsValidatorIssue -
-
-
-as_validator_clear_issues, function in AsValidator -
-
-
-as_validator_get_issues, function in AsValidator -
-
-
-as_validator_issue_get_importance, function in AsValidatorIssue -
-
-
-as_validator_issue_get_kind, function in AsValidatorIssue -
-
-
-as_validator_issue_get_location, function in AsValidatorIssue -
-
-
-as_validator_issue_get_message, function in AsValidatorIssue -
-
-
-as_validator_issue_new, function in AsValidatorIssue -
-
-
-as_validator_issue_set_importance, function in AsValidatorIssue -
-
-
-as_validator_issue_set_kind, function in AsValidatorIssue -
-
-
-as_validator_issue_set_location, function in AsValidatorIssue -
-
-
-as_validator_issue_set_message, function in AsValidatorIssue -
-
-
-as_validator_new, function in AsValidator -
-
-
-as_validator_validate_data, function in AsValidator -
-
-
-as_validator_validate_file, function in AsValidator -
-
-
-as_validator_validate_tree, function in AsValidator -
-
-

X

-
-AsXMLData, struct in AsXMLData -
-
-
-AsXMLDataClass, struct in AsXMLData -
-
-
-as_xmldata_initialize, function in AsXMLData -
-
-
-as_xmldata_new, function in AsXMLData -
-
-
-as_xmldata_parse_component_node, function in AsXMLData -
-
-
-as_xmldata_parse_distro_data, function in AsXMLData -
-
-
-as_xmldata_parse_upstream_data, function in AsXMLData -
-
-
-as_xmldata_serialize_to_distro, function in AsXMLData -
-
-
-as_xmldata_serialize_to_upstream, function in AsXMLData -
-
-
-as_xmldata_set_parser_mode, function in AsXMLData -
-
-
-as_xmldata_update_cpt_with_upstream_data, function in AsXMLData -
-
-

Y

-
-AsYAMLData, struct in AsYAMLData -
-
-
-AsYAMLDataClass, struct in AsYAMLData -
-
-
-as_yamldata_get_locale, function in AsYAMLData -
-
-
-as_yamldata_initialize, function in AsYAMLData -
-
-
-as_yamldata_new, function in AsYAMLData -
-
-
-as_yamldata_parse_distro_data, function in AsYAMLData -
-
-
-as_yamldata_serialize_to_distro, function in AsYAMLData -
-
-
-as_yamldata_set_locale, function in AsYAMLData -
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/appstream-as-enums.html appstream-0.12.0/docs/html/api/html/appstream-as-enums.html --- appstream-0.9.4/docs/html/api/html/appstream-as-enums.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/appstream-as-enums.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,440 +0,0 @@ - - - - -as-enums: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

as-enums

-

as-enums — Some enums used by various other modules

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -as_url_kind_to_string () -
-AsUrlKind - -as_url_kind_from_string () -
const gchar * - -as_bundle_kind_to_string () -
-AsBundleKind - -as_bundle_kind_from_string () -
const gchar * - -as_urgency_kind_to_string () -
-AsUrgencyKind - -as_urgency_kind_from_string () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
enumAsUrlKind
enumAsBundleKind
enumAsUrgencyKind
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-
-
-

Functions

-
-

as_url_kind_to_string ()

-
const gchar *
-as_url_kind_to_string (AsUrlKind url_kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

url_kind

the AsUrlKind.

 
-
-
-

Returns

-

string version of url_kind -

-
-
-
-
-

as_url_kind_from_string ()

-
AsUrlKind
-as_url_kind_from_string (const gchar *url_kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

url_kind

the string.

 
-
-
-

Returns

-

a AsUrlKind or AS_URL_KIND_UNKNOWN for unknown

-
-
-
-
-

as_bundle_kind_to_string ()

-
const gchar *
-as_bundle_kind_to_string (AsBundleKind bundle_kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

bundle_kind

the AsBundleKind.

 
-
-
-

Returns

-

string version of bundle_kind -

-
-

Since: 0.8.0

-
-
-
-

as_bundle_kind_from_string ()

-
AsBundleKind
-as_bundle_kind_from_string (const gchar *bundle_kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

bundle_kind

the string.

 
-
-
-

Returns

-

a AsBundleKind or AS_BUNDLE_KIND_UNKNOWN for unknown

-
-
-
-
-

as_urgency_kind_to_string ()

-
const gchar *
-as_urgency_kind_to_string (AsUrgencyKind urgency_kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

urgency_kind

the AsUrgencyKind.

 
-
-
-

Returns

-

string version of urgency_kind -

-
-

Since: 0.6.5

-
-
-
-

as_urgency_kind_from_string ()

-
AsUrgencyKind
-as_urgency_kind_from_string (const gchar *urgency_kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

urgency_kind

the string.

 
-
-
-

Returns

-

a AsUrgencyKind or AS_URGENCY_KIND_UNKNOWN for unknown

-
-

Since: 0.6.5

-
-
-
-

Types and Values

-
-

enum AsUrlKind

-

The URL type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_URL_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_URL_KIND_HOMEPAGE

-

Project homepage

-
 

AS_URL_KIND_BUGTRACKER

-

Bugtracker

-
 

AS_URL_KIND_FAQ

-

FAQ page

-
 

AS_URL_KIND_HELP

-

Help manual

-
 

AS_URL_KIND_DONATION

-

Page with information about how to donate to the project

-
 
-
-
-
-
-

enum AsBundleKind

-

The bundle type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_BUNDLE_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_BUNDLE_KIND_LIMBA

-

A Limba bundle

-
 

AS_BUNDLE_KIND_XDG_APP

-

An xdg-app bundle

-
 
-
-
-
-
-

enum AsUrgencyKind

-

The urgency of an AsRelease

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_URGENCY_KIND_UNKNOWN

-

Urgency is unknown or not set

-
 

AS_URGENCY_KIND_LOW

-

Low urgency

-
 

AS_URGENCY_KIND_MEDIUM

-

Medium urgency

-
 

AS_URGENCY_KIND_HIGH

-

High urgency

-
 

AS_URGENCY_KIND_CRITICAL

-

Critical urgency

-
 
-
-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/appstream-as-provides.html appstream-0.12.0/docs/html/api/html/appstream-as-provides.html --- appstream-0.9.4/docs/html/api/html/appstream-as-provides.html 2015-11-06 12:34:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/appstream-as-provides.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,311 +0,0 @@ - - - - -as-provides: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

as-provides

-

as-provides — Description of the provides-types in components

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -as_provides_kind_to_string () -
-AsProvidesKind - -as_provides_kind_from_string () -
-gchar * - -as_provides_item_create () -
-AsProvidesKind - -as_provides_item_get_kind () -
-gchar * - -as_provides_item_get_value () -
-
-
-

Types and Values

-
---- - - - - -
enumAsProvidesKind
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

Components can provide various items, like libraries, Python-modules, -firmware, binaries, etc. -Functions to work with these items are provided here.

-

See also: AsComponent

-
-
-

Functions

-
-

as_provides_kind_to_string ()

-
const gchar *
-as_provides_kind_to_string (AsProvidesKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsProvidesKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_provides_kind_from_string ()

-
AsProvidesKind
-as_provides_kind_from_string (const gchar *kind_str);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind_str

the string.

 
-
-
-

Returns

-

a AsProvidesKind or AS_PROVIDES_KIND_UNKNOWN for unknown

-
-
-
-
-

as_provides_item_create ()

-
gchar *
-as_provides_item_create (AsProvidesKind kind,
-                         const gchar *value,
-                         const gchar *data);
-

Creates a new provides-item string, which -consists of a type-part describing the items type, and a name-part, -containing the name of the item. Both are separated by a semicolon, -so an item of type KIND_LIBRARY and name libappstream.so.0 will become -"lib;libappstream.so.0;" -A provides-item might also contain a "data" part, describing additional -information about it. For example, for a KIND_DBUS provides type, -the item might look like: dbus;org.freedesktop.PackageKit;system -(specifying that the service name is on the system bus)

-

kind - a AsProvidesKind describing the type of the item string -value - the name of the item as string -data - (allow-none) (default NULL): additional data associated with this item

-
-

Returns

-

a new provides-item string. Free with g_free

-
-
-
-
-

as_provides_item_get_kind ()

-
AsProvidesKind
-as_provides_item_get_kind (const gchar *item);
-

Returns the type (kind) of a provides-item string -as AsProvidesKind

-

item - a valid provides-item string

-
-

Returns

-

the kind of the given item

-
-
-
-
-

as_provides_item_get_value ()

-
gchar *
-as_provides_item_get_value (const gchar *item);
-

Returns the value (name) of a provides-item string

-

item - a valid provides-item string

-
-

Returns

-

the value of the given item, or NULL if the item was invalid

-
-
-
-
-

Types and Values

-
-

enum AsProvidesKind

-

Public interfaces components can provide.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_PROVIDES_KIND_UNKNOWN

-

Unknown kind

-
 

AS_PROVIDES_KIND_LIBRARY

-

A shared library

-
 

AS_PROVIDES_KIND_BINARY

-

A binary installed into a directory in PATH

-
 

AS_PROVIDES_KIND_FONT

-

A font

-
 

AS_PROVIDES_KIND_MODALIAS

-

A modalias

-
 

AS_PROVIDES_KIND_FIRMWARE

-

Runtime or flashed firmware

-
 

AS_PROVIDES_KIND_PYTHON2

-

A Python2 module

-
 

AS_PROVIDES_KIND_PYTHON3

-

A Python3 module

-
 

AS_PROVIDES_KIND_MIMETYPE

-

Provides a handler for a mimetype

-
 

AS_PROVIDES_KIND_DBUS

-

A DBus service name

-
 
-
-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/appstream.devhelp2 appstream-0.12.0/docs/html/api/html/appstream.devhelp2 --- appstream-0.9.4/docs/html/api/html/appstream.devhelp2 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/appstream.devhelp2 1970-01-01 00:00:00.000000000 +0000 @@ -1,426 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru appstream-0.9.4/docs/html/api/html/appstream-sections.txt appstream-0.12.0/docs/html/api/html/appstream-sections.txt --- appstream-0.9.4/docs/html/api/html/appstream-sections.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/appstream-sections.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,452 +0,0 @@ -
-as-cache-builder -AsCacheBuilder -AS_TYPE_CACHE_BUILDER -AsCacheBuilderClass -AS_CACHE_BUILDER_ERROR -as_cache_builder_error_quark -AsCacheBuilderError -as_cache_builder_new -as_cache_builder_setup -as_cache_builder_refresh -as_cache_builder_set_data_source_directories -AsCacheBuilder -
- -
-as-category -AsCategory -AS_TYPE_CATEGORY -AsCategoryClass -as_category_new -as_category_complete -as_category_get_directory -as_category_set_directory -as_category_get_name -as_category_set_name -as_category_get_summary -as_category_set_summary -as_category_get_icon -as_category_set_icon -as_category_has_subcategory -as_category_add_subcategory -as_category_remove_subcategory -as_category_get_included -as_category_get_excluded -as_category_get_subcategories -as_category_get_level -as_category_set_level -AsCategory -
- -
-as-component -AsComponent -AS_TYPE_COMPONENT -AsComponentClass -AsComponentKind -as_component_kind_to_string -as_component_kind_from_string -as_component_new -as_component_is_valid -as_component_to_string -as_component_get_active_locale -as_component_set_active_locale -as_component_get_kind -as_component_set_kind -as_component_get_id -as_component_set_id -as_component_get_origin -as_component_set_origin -as_component_get_pkgnames -as_component_set_pkgnames -as_component_get_source_pkgname -as_component_set_source_pkgname -as_component_get_name -as_component_set_name -as_component_get_summary -as_component_set_summary -as_component_get_description -as_component_set_description -as_component_get_project_license -as_component_set_project_license -as_component_get_project_group -as_component_set_project_group -as_component_get_developer_name -as_component_set_developer_name -as_component_get_compulsory_for_desktops -as_component_set_compulsory_for_desktops -as_component_is_compulsory_for_desktop -as_component_get_categories -as_component_set_categories -as_component_has_category -as_component_get_screenshots -as_component_add_screenshot -as_component_get_keywords -as_component_set_keywords -as_component_get_icons -as_component_get_icon_by_size -as_component_add_icon -as_component_add_provided -as_component_get_provided_for_kind -as_component_get_provided -as_component_get_url -as_component_add_url -as_component_get_releases -as_component_add_release -as_component_get_extends -as_component_add_extends -as_component_get_extensions -as_component_add_extension -as_component_get_languages -as_component_get_language -as_component_add_language -as_component_get_translations -as_component_add_translation -as_component_has_bundle -as_component_get_bundle_id -as_component_add_bundle_id -AsComponent - -AS_TYPE_COMPONENT_KIND -as_component_kind_get_type -
- -
-as-data-pool -AsDataPool -AS_TYPE_DATA_POOL -AsDataPoolClass -AsDataPoolError -AS_DATA_POOL_ERROR -as_data_pool_error_quark -as_data_pool_new -as_data_pool_get_locale -as_data_pool_set_locale -as_data_pool_update -as_data_pool_get_components -as_data_pool_get_component_by_id -as_data_pool_get_metadata_locations -as_data_pool_set_metadata_locations -AsDataPool -
- -
-as-database -AsDatabase -AS_TYPE_DATABASE -AsDatabaseClass -AsDatabaseError -AS_DATABASE_ERROR -as_database_new -as_database_error_quark -as_database_open -as_database_get_location -as_database_set_location -as_database_find_components -as_database_get_all_components -as_database_get_component_by_id -as_database_get_components_by_provided_item -as_database_get_components_by_kind -AsDatabase -
- -
-as-distro-details -AsDistroDetails -AS_TYPE_DISTRO_DETAILS -AsDistroDetailsClass -as_distro_details_new -as_distro_details_get_id -as_distro_details_get_name -as_distro_details_get_version -as_distro_details_get_str -as_distro_details_get_bool -as_get_icon_repository_paths -AsDistroDetails -
- -
-as-enums -AsUrlKind -as_url_kind_to_string -as_url_kind_from_string -AsBundleKind -as_bundle_kind_to_string -as_bundle_kind_from_string -AsUrgencyKind -as_urgency_kind_to_string -as_urgency_kind_from_string -
- -
-as-icon -AsIcon -AS_TYPE_ICON -AsIconClass -AsIconKind -as_icon_kind_from_string -as_icon_kind_to_string -as_icon_new -as_icon_get_kind -as_icon_set_kind -as_icon_get_name -as_icon_set_name -as_icon_get_url -as_icon_set_url -as_icon_get_filename -as_icon_set_filename -as_icon_get_width -as_icon_set_width -as_icon_get_height -as_icon_set_height -AsIcon -
- -
-as-image -AsImage -AS_TYPE_IMAGE -AsImageClass -AsImageKind -as_image_kind_from_string -as_image_kind_to_string -as_image_new -as_image_get_url -as_image_set_url -as_image_get_width -as_image_set_width -as_image_get_height -as_image_set_height -as_image_get_kind -as_image_set_kind -AsImage -
- -
-as-menu-parser -AsMenuParser -AS_TYPE_MENU_PARSER -AsMenuParserClass -as_menu_parser_new -as_menu_parser_new_from_file -as_menu_parser_parse -as_menu_parser_get_update_category_data -as_menu_parser_set_update_category_data -as_get_system_categories -AsMenuParser -
- -
-as-metadata -AsMetadata -AS_TYPE_METADATA -AsMetadataClass -AsParserMode -AsMetadataError -AS_METADATA_ERROR -as_metadata_new -as_metadata_error_quark -as_metadata_parse_file -as_metadata_parse_xml -as_metadata_parse_yaml -as_metadata_get_component -as_metadata_get_components -as_metadata_clear_components -as_metadata_add_component -as_metadata_component_to_upstream_xml -as_metadata_save_upstream_xml -as_metadata_components_to_distro_xml -as_metadata_save_distro_xml -as_metadata_components_to_distro_yaml -as_metadata_save_distro_yaml -as_metadata_set_locale -as_metadata_get_locale -as_metadata_get_origin -as_metadata_set_origin -as_metadata_get_update_existing -as_metadata_set_update_existing -as_metadata_get_write_header -as_metadata_set_write_header -as_metadata_set_parser_mode -as_metadata_get_parser_mode -as_metadata_get_architecture -as_metadata_set_architecture -AsMetadata -
- -
-as-provided -AsProvided -AS_TYPE_PROVIDED -AsProvidedClass -AsProvidedKind -as_provided_kind_to_string -as_provided_kind_from_string -as_provided_kind_to_l10n_string -as_provided_new -as_provided_get_kind -as_provided_set_kind -as_provided_get_items -as_provided_add_item -as_provided_has_item -AsProvided -
- -
-as-release -AsRelease -AS_TYPE_RELEASE -AsReleaseClass -AsChecksumKind -as_checksum_kind_to_string -as_checksum_kind_from_string -AsSizeKind -as_size_kind_to_string -as_size_kind_from_string -as_release_new -as_release_get_version -as_release_set_version -as_release_get_timestamp -as_release_set_timestamp -as_release_get_description -as_release_set_description -as_release_get_active_locale -as_release_set_active_locale -as_release_get_locations -as_release_add_location -as_release_get_checksum -as_release_set_checksum -as_release_get_urgency -as_release_set_urgency -as_release_get_size -as_release_set_size -AsRelease -
- -
-as-screenshot -AsScreenshot -AS_TYPE_SCREENSHOT -AsScreenshotClass -AsScreenshotKind -as_screenshot_kind_from_string -as_screenshot_kind_to_string -as_screenshot_is_valid -as_screenshot_new -as_screenshot_get_kind -as_screenshot_set_kind -as_screenshot_get_caption -as_screenshot_set_caption -as_screenshot_get_images -as_screenshot_add_image -as_screenshot_get_active_locale -as_screenshot_set_active_locale -AsScreenshot -
- -
-as-screenshot-private -as_screenshot_get_caption_table -
- -
-as-translation -AsTranslation -AS_TYPE_TRANSLATION -AsTranslationClass -AsTranslationKind -as_translation_kind_to_string -as_translation_kind_from_string -as_translation_new -as_translation_get_kind -as_translation_set_kind -as_translation_get_id -as_translation_set_id -AsTranslation -
- -
-as-utils-private -as_utils_delete_dir_recursive -as_utils_categories_from_strv -as_utils_categories_from_str -as_utils_find_files_matching -as_utils_find_files -as_utils_is_root -as_utils_is_writable -as_str_replace -as_ptr_array_to_strv -as_touch_location -as_copy_file -as_reset_umask -as_is_cruft_locale -as_locale_strip_encoding -as_get_current_arch -as_arch_compatible -
- -
-as-validator -AsValidator -AS_TYPE_VALIDATOR -AsValidatorClass -as_validator_new -as_validator_clear_issues -as_validator_validate_file -as_validator_validate_data -as_validator_validate_tree -as_validator_get_issues -AsValidator -
- -
-as-validator-issue -AsValidatorIssue -AS_TYPE_VALIDATOR_ISSUE -AsValidatorIssueClass -AsIssueImportance -AsIssueKind -as_validator_issue_new -as_validator_issue_get_kind -as_validator_issue_set_kind -as_validator_issue_get_importance -as_validator_issue_set_importance -as_validator_issue_get_message -as_validator_issue_set_message -as_validator_issue_get_location -as_validator_issue_set_location -AsValidatorIssue -
- -
-as-xmldata -AsXMLData -AS_TYPE_XMLDATA -AsXMLDataClass -as_xmldata_new -as_xmldata_initialize -as_xmldata_parse_upstream_data -as_xmldata_parse_distro_data -as_xmldata_update_cpt_with_upstream_data -as_xmldata_serialize_to_upstream -as_xmldata_serialize_to_distro -as_xmldata_set_parser_mode -as_xmldata_parse_component_node -AsXMLData -
- -
-as-yamldata -AsYAMLData -AS_TYPE_YAMLDATA -AsYAMLDataClass -as_yamldata_new -as_yamldata_initialize -as_yamldata_parse_distro_data -as_yamldata_serialize_to_distro -as_yamldata_get_locale -as_yamldata_set_locale -AsYAMLData -
- diff -Nru appstream-0.9.4/docs/html/api/html/AsCategory.html appstream-0.12.0/docs/html/api/html/AsCategory.html --- appstream-0.9.4/docs/html/api/html/AsCategory.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsCategory.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,768 +0,0 @@ - - - - -AsCategory: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsCategory

-

AsCategory — Representation of a XDG category

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsCategory * - -as_category_new () -
-void - -as_category_complete () -
const gchar * - -as_category_get_directory () -
-void - -as_category_set_directory () -
const gchar * - -as_category_get_name () -
-void - -as_category_set_name () -
const gchar * - -as_category_get_summary () -
-void - -as_category_set_summary () -
const gchar * - -as_category_get_icon () -
-void - -as_category_set_icon () -
-gboolean - -as_category_has_subcategory () -
-void - -as_category_add_subcategory () -
-void - -as_category_remove_subcategory () -
-GList * - -as_category_get_included () -
-GList * - -as_category_get_excluded () -
-GList * - -as_category_get_subcategories () -
-gint - -as_category_get_level () -
-void - -as_category_set_level () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gchar *directoryRead / Write
gpointerexcludedRead
-gchar *iconRead / Write
gpointerincludedRead
gintlevelRead / Write
-gchar *nameRead / Write
gpointersubcategoriesRead
-gchar *summaryRead
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineAS_TYPE_CATEGORY
structAsCategoryClass
 AsCategory
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsCategory
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object represents an XDG category, as defined at: -http://standards.freedesktop.org/menu-spec/menu-spec-1.0.htmlcategory-registry

-

The AsCategory object does not support all aspects of a menu. It's main purpose -is to be used in software-centers to show information about application-groups, -which are use to thematically group applications.

-

You can use AsMenuParser to get a set of supported default categories.

-

See also: AsMenuParser

-
-
-

Functions

-
-

as_category_new ()

-
AsCategory *
-as_category_new (void);
-

Creates a new AsCategory.

-
-

Returns

-

a new AsCategory.

-

[transfer full]

-
-
-
-
-

as_category_complete ()

-
void
-as_category_complete (AsCategory *cat);
-

Update incomplete category data with information from -"/usr/share/desktop-directories".

-
-
-
-

as_category_get_directory ()

-
const gchar *
-as_category_get_directory (AsCategory *cat);
-

Get associated XDG directory name for this category, -in case one exists in "/usr/share/desktop-directories/".

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_set_directory ()

-
void
-as_category_set_directory (AsCategory *cat,
-                           const gchar *value);
-

Set associated XDG directory name for this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_get_name ()

-
const gchar *
-as_category_get_name (AsCategory *cat);
-

Get the name of this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_set_name ()

-
void
-as_category_set_name (AsCategory *cat,
-                      const gchar *value);
-

Set the name of this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_get_summary ()

-
const gchar *
-as_category_get_summary (AsCategory *cat);
-

Get the summary (short description) of this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_set_summary ()

-
void
-as_category_set_summary (AsCategory *cat,
-                         const gchar *value);
-

Get the summary (short description) of this category.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cat

An instance of AsCategory.

 

value

A new short summary of this category.

 
-
-
-
-
-

as_category_get_icon ()

-
const gchar *
-as_category_get_icon (AsCategory *cat);
-

Get the stock icon name for this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_set_icon ()

-
void
-as_category_set_icon (AsCategory *cat,
-                      const gchar *value);
-

Set the stock icon name for this category.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-
-
-

as_category_has_subcategory ()

-
gboolean
-as_category_has_subcategory (AsCategory *cat);
-

Test for sub-categories.

-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-

Returns

-

TRUE if this category has any subcategory

-
-
-
-
-

as_category_add_subcategory ()

-
void
-as_category_add_subcategory (AsCategory *cat,
-                             AsCategory *subcat);
-

Add a subcategory to this category.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cat

An instance of AsCategory.

 

subcat

A subcategory to add.

 
-
-
-
-
-

as_category_remove_subcategory ()

-
void
-as_category_remove_subcategory (AsCategory *cat,
-                                AsCategory *subcat);
-

Drop a subcategory from this AsCategory.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cat

An instance of AsCategory.

 

subcat

A subcategory to remove.

 
-
-
-
-
-

as_category_get_included ()

-
GList *
-as_category_get_included (AsCategory *cat);
-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-

Returns

-

A list of category names.

-

[element-type utf8][transfer none]

-
-
-
-
-

as_category_get_excluded ()

-
GList *
-as_category_get_excluded (AsCategory *cat);
-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-

Returns

-

A list of category names.

-

[element-type utf8][transfer none]

-
-
-
-
-

as_category_get_subcategories ()

-
GList *
-as_category_get_subcategories (AsCategory *cat);
-
-

Parameters

-
----- - - - - - -

cat

An instance of AsCategory.

 
-
-
-

Returns

-

A list of subcategories.

-

[element-type AsCategory][transfer none]

-
-
-
-
-

as_category_get_level ()

-
gint
-as_category_get_level (AsCategory *cat);
-
-
-
-

as_category_set_level ()

-
void
-as_category_set_level (AsCategory *cat,
-                       gint value);
-
-
-
-

Types and Values

-
-

AS_TYPE_CATEGORY

-
#define AS_TYPE_CATEGORY (as_category_get_type ())
-
-

-

-
-
-
-

struct AsCategoryClass

-
struct AsCategoryClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

AsCategory

-
typedef struct _AsCategory AsCategory;
-

-

-
-
-
-

Property Details

-
-

The “directory” property

-
  “directory”                gchar *
-

directory.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “excluded” property

-
  “excluded”                 gpointer
-

excluded.

-

Flags: Read

-
-
-
-

The “icon” property

-
  “icon”                     gchar *
-

icon.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “included” property

-
  “included”                 gpointer
-

included.

-

Flags: Read

-
-
-
-

The “level” property

-
  “level”                    gint
-

level.

-

Flags: Read / Write

-

Default value: 0

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

name.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “subcategories” property

-
  “subcategories”            gpointer
-

subcategories.

-

Flags: Read

-
-
-
-

The “summary” property

-
  “summary”                  gchar *
-

summary.

-

Flags: Read

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsComponent.html appstream-0.12.0/docs/html/api/html/AsComponent.html --- appstream-0.9.4/docs/html/api/html/AsComponent.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsComponent.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,2706 +0,0 @@ - - - - -AsComponent: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsComponent

-

AsComponent — Object representing a software component

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -as_component_kind_to_string () -
-AsComponentKind - -as_component_kind_from_string () -
-AsComponent * - -as_component_new () -
-gboolean - -as_component_is_valid () -
-gchar * - -as_component_to_string () -
-gchar * - -as_component_get_active_locale () -
-void - -as_component_set_active_locale () -
-AsComponentKind - -as_component_get_kind () -
-void - -as_component_set_kind () -
const gchar * - -as_component_get_id () -
-void - -as_component_set_id () -
const gchar * - -as_component_get_origin () -
-void - -as_component_set_origin () -
-gchar ** - -as_component_get_pkgnames () -
-void - -as_component_set_pkgnames () -
const gchar * - -as_component_get_source_pkgname () -
-void - -as_component_set_source_pkgname () -
const gchar * - -as_component_get_name () -
-void - -as_component_set_name () -
const gchar * - -as_component_get_summary () -
-void - -as_component_set_summary () -
const gchar * - -as_component_get_description () -
-void - -as_component_set_description () -
const gchar * - -as_component_get_project_license () -
-void - -as_component_set_project_license () -
const gchar * - -as_component_get_project_group () -
-void - -as_component_set_project_group () -
const gchar * - -as_component_get_developer_name () -
-void - -as_component_set_developer_name () -
-gchar ** - -as_component_get_compulsory_for_desktops () -
-void - -as_component_set_compulsory_for_desktops () -
-gboolean - -as_component_is_compulsory_for_desktop () -
-gchar ** - -as_component_get_categories () -
-void - -as_component_set_categories () -
-gboolean - -as_component_has_category () -
-GPtrArray * - -as_component_get_screenshots () -
-void - -as_component_add_screenshot () -
-gchar ** - -as_component_get_keywords () -
-void - -as_component_set_keywords () -
-GPtrArray * - -as_component_get_icons () -
-AsIcon * - -as_component_get_icon_by_size () -
-void - -as_component_add_icon () -
-void - -as_component_add_provided () -
-AsProvided * - -as_component_get_provided_for_kind () -
-GList * - -as_component_get_provided () -
const gchar * - -as_component_get_url () -
-void - -as_component_add_url () -
-GPtrArray * - -as_component_get_releases () -
-void - -as_component_add_release () -
-GPtrArray * - -as_component_get_extends () -
-void - -as_component_add_extends () -
-GPtrArray * - -as_component_get_extensions () -
-void - -as_component_add_extension () -
-GList * - -as_component_get_languages () -
-gint - -as_component_get_language () -
-void - -as_component_add_language () -
-GPtrArray * - -as_component_get_translations () -
-void - -as_component_add_translation () -
-gboolean - -as_component_has_bundle () -
const gchar * - -as_component_get_bundle_id () -
-void - -as_component_add_bundle_id () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GStrvcategoriesRead / Write
-gchar *descriptionRead / Write
-gchar *developer-nameRead / Write
gpointericonsRead
-gchar *idRead / Write
GStrvkeywordsRead / Write
AsComponentKindkindRead / Write
-gchar *nameRead / Write
GStrvpkgnamesRead / Write
-gchar *project-groupRead / Write
-gchar *project-licenseRead / Write
-GPtrArray *screenshotsRead
-gchar *summaryRead / Write
-GHashTable *urlsRead
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_COMPONENT
structAsComponentClass
enumAsComponentKind
 AsComponent
-
-
-

Object Hierarchy

-
    GEnum
-    ╰── AsComponentKind
-    GObject
-    ╰── AsComponent
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object represents an Appstream software component which is associated -to a package in the distribution's repositories. -A component can be anything, ranging from an application to a font, a codec or -even a non-visual software project providing libraries and python-modules for -other applications to use.

-

The type of the component is stored as AsComponentKind and can be queried to -find out which kind of component we're dealing with.

-

See also: AsProvidesKind, AsDatabase

-
-
-

Functions

-
-

as_component_kind_to_string ()

-
const gchar *
-as_component_kind_to_string (AsComponentKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsComponentKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_component_kind_from_string ()

-
AsComponentKind
-as_component_kind_from_string (const gchar *kind_str);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind_str

the string.

 
-
-
-

Returns

-

a AsComponentKind or AS_COMPONENT_KIND_UNKNOWN for unknown

-
-
-
-
-

as_component_new ()

-
AsComponent *
-as_component_new (void);
-

Creates a new AsComponent.

-
-

Returns

-

a new AsComponent.

-

[transfer full]

-
-
-
-
-

as_component_is_valid ()

-
gboolean
-as_component_is_valid (AsComponent *cpt);
-

Check if the essential properties of this Component are -populated with useful data.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

TRUE if the component data was validated successfully.

-
-
-
-
-

as_component_to_string ()

-
gchar *
-as_component_to_string (AsComponent *cpt);
-

Returns a string identifying this component. -(useful for debugging)

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

A descriptive string.

-

[transfer full]

-
-
-
-
-

as_component_get_active_locale ()

-
gchar *
-as_component_get_active_locale (AsComponent *cpt);
-

Get the current active locale for this component, which -is used to get localized messages.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the current active locale.

-
-
-
-
-

as_component_set_active_locale ()

-
void
-as_component_set_active_locale (AsComponent *cpt,
-                                const gchar *locale);
-

Set the current active locale for this component, which -is used to get localized messages. -If the AsComponent was fetched from a localized database, usually only -one locale is available.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

locale

the locale, or NULL. e.g. "en_GB".

[nullable]
-
-
-
-
-

as_component_get_kind ()

-
AsComponentKind
-as_component_get_kind (AsComponent *cpt);
-

Returns the AsComponentKind of this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the kind of this.

-
-
-
-
-

as_component_set_kind ()

-
void
-as_component_set_kind (AsComponent *cpt,
-                       AsComponentKind value);
-

Sets the AsComponentKind of this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the AsComponentKind.

 
-
-
-
-
-

as_component_get_id ()

-
const gchar *
-as_component_get_id (AsComponent *cpt);
-

Set the unique identifier for this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the unique identifier.

-
-
-
-
-

as_component_set_id ()

-
void
-as_component_set_id (AsComponent *cpt,
-                     const gchar *value);
-

Set the unique identifier for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the unique identifier.

 
-
-
-
-
-

as_component_get_origin ()

-
const gchar *
-as_component_get_origin (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-
-
-

as_component_set_origin ()

-
void
-as_component_set_origin (AsComponent *cpt,
-                         const gchar *origin);
-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

origin

the origin.

 
-
-
-
-
-

as_component_get_pkgnames ()

-
gchar **
-as_component_get_pkgnames (AsComponent *cpt);
-

Get a list of package names which this component consists of. -This usually is just one package name.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

String array of package names.

-

[transfer none]

-
-
-
-
-

as_component_set_pkgnames ()

-
void
-as_component_set_pkgnames (AsComponent *cpt,
-                           gchar **value);
-

Set a list of package names this component consists of. -(This should usually be just one package name)

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

.

[array zero-terminated=1]
-
-
-
-
-

as_component_get_source_pkgname ()

-
const gchar *
-as_component_get_source_pkgname (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the source package name.

-
-
-
-
-

as_component_set_source_pkgname ()

-
void
-as_component_set_source_pkgname (AsComponent *cpt,
-                                 const gchar *spkgname);
-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

spkgname

the source package name.

 
-
-
-
-
-

as_component_get_name ()

-
const gchar *
-as_component_get_name (AsComponent *cpt);
-

A human-readable name for this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the name.

-
-
-
-
-

as_component_set_name ()

-
void
-as_component_set_name (AsComponent *cpt,
-                       const gchar *value,
-                       const gchar *locale);
-

Set a human-readable name for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

A valid AsComponent

 

value

The name

 

locale

The locale the used for this value, or NULL to use the current active one.

[nullable]
-
-
-
-
-

as_component_get_summary ()

-
const gchar *
-as_component_get_summary (AsComponent *cpt);
-

Get a short description of this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the summary.

-
-
-
-
-

as_component_set_summary ()

-
void
-as_component_set_summary (AsComponent *cpt,
-                          const gchar *value,
-                          const gchar *locale);
-

Set a short description for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

A valid AsComponent

 

value

The summary

 

locale

The locale the used for this value, or NULL to use the current active one.

[nullable]
-
-
-
-
-

as_component_get_description ()

-
const gchar *
-as_component_get_description (AsComponent *cpt);
-

Get the localized long description of this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the description.

-
-
-
-
-

as_component_set_description ()

-
void
-as_component_set_description (AsComponent *cpt,
-                              const gchar *value,
-                              const gchar *locale);
-

Set long description for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

A valid AsComponent

 

value

The long description

 

locale

The locale the used for this value, or NULL to use the current active one.

[nullable]
-
-
-
-
-

as_component_get_project_license ()

-
const gchar *
-as_component_get_project_license (AsComponent *cpt);
-

Get the license of the project this component belongs to.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the license.

-
-
-
-
-

as_component_set_project_license ()

-
void
-as_component_set_project_license (AsComponent *cpt,
-                                  const gchar *value);
-

Set the project license.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the project license.

 
-
-
-
-
-

as_component_get_project_group ()

-
const gchar *
-as_component_get_project_group (AsComponent *cpt);
-

Get the component's project group.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the project group.

-
-
-
-
-

as_component_set_project_group ()

-
void
-as_component_set_project_group (AsComponent *cpt,
-                                const gchar *value);
-

Set the component's project group.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the project group.

 
-
-
-
-
-

as_component_get_developer_name ()

-
const gchar *
-as_component_get_developer_name (AsComponent *cpt);
-

Get the component's developer or development team name.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

the developer name.

-
-
-
-
-

as_component_set_developer_name ()

-
void
-as_component_set_developer_name (AsComponent *cpt,
-                                 const gchar *value,
-                                 const gchar *locale);
-

Set the the component's developer or development team name.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the developer or developer team name

 

locale

the locale, or NULL. e.g. "en_GB".

[nullable]
-
-
-
-
-

as_component_get_compulsory_for_desktops ()

-
gchar **
-as_component_get_compulsory_for_desktops
-                               (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

A list of desktops where this component is compulsory.

-

[transfer none]

-
-
-
-
-

as_component_set_compulsory_for_desktops ()

-
void
-as_component_set_compulsory_for_desktops
-                               (AsComponent *cpt,
-                                gchar **value);
-

Set a list of desktops where this component is compulsory.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the array of desktop ids.

[array zero-terminated=1]
-
-
-
-
-

as_component_is_compulsory_for_desktop ()

-
gboolean
-as_component_is_compulsory_for_desktop
-                               (AsComponent *cpt,
-                                const gchar *desktop);
-

Check if this component is compulsory for the given desktop.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent object

 

desktop

the desktop-id to test for

 
-
-
-

Returns

-

TRUE if compulsory, FALSE otherwise.

-
-
-
-
-

as_component_get_categories ()

-
gchar **
-as_component_get_categories (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

String array of categories.

-

[transfer none]

-
-
-
-
-

as_component_set_categories ()

-
void
-as_component_set_categories (AsComponent *cpt,
-                             gchar **value);
-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

the categories name.

[array zero-terminated=1]
-
-
-
-
-

as_component_has_category ()

-
gboolean
-as_component_has_category (AsComponent *cpt,
-                           const gchar *category);
-

Check if component is in the specified category.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent object

 

category

the specified category to check

 
-
-
-

Returns

-

TRUE if the component is in the specified category.

-
-
-
-
-

as_component_get_screenshots ()

-
GPtrArray *
-as_component_get_screenshots (AsComponent *cpt);
-

Get a list of associated screenshots.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

an array of AsScreenshot instances.

-

[element-type AsScreenshot][transfer none]

-
-
-
-
-

as_component_add_screenshot ()

-
void
-as_component_add_screenshot (AsComponent *cpt,
-                             AsScreenshot *sshot);
-

Add an AsScreenshot to this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

sshot

The AsScreenshot to add

 
-
-
-
-
-

as_component_get_keywords ()

-
gchar **
-as_component_get_keywords (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

String array of keywords.

-

[transfer none]

-
-
-
-
-

as_component_set_keywords ()

-
void
-as_component_set_keywords (AsComponent *cpt,
-                           gchar **value,
-                           const gchar *locale);
-

Set keywords for this component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

value

String-array of keywords.

[array zero-terminated=1]

locale

Locale of the values, or NULL to use current locale.

[nullable]
-
-
-
-
-

as_component_get_icons ()

-
GPtrArray *
-as_component_get_icons (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance

 
-
-
-

Returns

-

A GPtrArray of all icons for this component.

-

[element-type AsIcon][transfer none]

-
-
-
-
-

as_component_get_icon_by_size ()

-
AsIcon *
-as_component_get_icon_by_size (AsComponent *cpt,
-                               guint width,
-                               guint height);
-

Gets an icon matching the size constraints. -The icons are not filtered by type, and the first icon -which matches the size is returned. -If you want more control over which icons you use for displaying, -use the as_component_get_icons() function to get a list of all icons.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

an AsComponent instance

 

width

The icon width in pixels.

 

height

the icon height in pixels.

 
-
-
-

Returns

-

An icon matching the given width/height, or NULL if not found.

-

[transfer none]

-
-
-
-
-

as_component_add_icon ()

-
void
-as_component_add_icon (AsComponent *cpt,
-                       AsIcon *icon);
-

Add an icon to this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent instance

 

icon

the valid AsIcon instance to add.

 
-
-
-
-
-

as_component_add_provided ()

-
void
-as_component_add_provided (AsComponent *cpt,
-                           AsProvided *prov);
-

Add a set of provided items to this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

prov

a AsProvided instance.

 
-
-

Since: 0.6.2

-
-
-
-

as_component_get_provided_for_kind ()

-
AsProvided *
-as_component_get_provided_for_kind (AsComponent *cpt,
-                                    AsProvidedKind kind);
-

Get an AsProvided object for the given interface type, -containing information about the public interfaces (mimetypes, firmware, DBus services, ...) -this component provides.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

kind

kind of the provided item, e.g. AS_PROVIDED_KIND_MIMETYPE

 
-
-
-

Returns

-

AsProvided containing the items this component provides, or NULL.

-

[transfer none]

-
-
-
-
-

as_component_get_provided ()

-
GList *
-as_component_get_provided (AsComponent *cpt);
-

Get a list of AsProvided objects associated with this component.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

A list of AsProvided objects.

-

[transfer container][element-type AsProvided]

-
-
-
-
-

as_component_get_url ()

-
const gchar *
-as_component_get_url (AsComponent *cpt,
-                      AsUrlKind url_kind);
-

Gets a URL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

url_kind

the URL kind, e.g. AS_URL_KIND_HOMEPAGE.

 
-
-
-

Returns

-

string, or NULL if unset.

-

[nullable]

-
-

Since: 0.6.2

-
-
-
-

as_component_add_url ()

-
void
-as_component_add_url (AsComponent *cpt,
-                      AsUrlKind url_kind,
-                      const gchar *url);
-

Adds some URL data to the component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

url_kind

the URL kind, e.g. AS_URL_KIND_HOMEPAGE

 

url

the full URL.

 
-
-

Since: 0.6.2

-
-
-
-

as_component_get_releases ()

-
GPtrArray *
-as_component_get_releases (AsComponent *cpt);
-

Get an array of the AsRelease items this component -provides.

-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

A list of releases.

-

[element-type AsRelease][transfer none]

-
-
-
-
-

as_component_add_release ()

-
void
-as_component_add_release (AsComponent *cpt,
-                          AsRelease *release);
-

Add an AsRelease to this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

release

The AsRelease to add

 
-
-
-
-
-

as_component_get_extends ()

-
GPtrArray *
-as_component_get_extends (AsComponent *cpt);
-

Returns a string list of IDs of components which -are extended by this addon.

-

See as_component_get_extends() for the reverse.

-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance.

 
-
-
-

Returns

-

A GPtrArray or NULL if not set.

-

[element-type utf8][transfer none]

-
-

Since: 0.7.0

-
-
-
-

as_component_add_extends ()

-
void
-as_component_add_extends (AsComponent *cpt,
-                          const gchar *cpt_id);
-

Add a reference to the extended component

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

cpt_id

The id of a component which is extended by this component

 
-
-

Since: 0.7.0

-
-
-
-

as_component_get_extensions ()

-
GPtrArray *
-as_component_get_extensions (AsComponent *cpt);
-

Returns a string list of IDs of components which -are addons extending this component in functionality.

-

This is the reverse of as_component_get_extends()

-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance.

 
-
-
-

Returns

-

A GPtrArray or NULL if not set.

-

[element-type utf8][transfer none]

-
-

Since: 0.9.2

-
-
-
-

as_component_add_extension ()

-
void
-as_component_add_extension (AsComponent *cpt,
-                            const gchar *cpt_id);
-

Add a reference to the extension enhancing this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

cpt_id

The id of a component extending this component.

 
-
-

Since: 0.9.2

-
-
-
-

as_component_get_languages ()

-
GList *
-as_component_get_languages (AsComponent *cpt);
-

Get a list of all languages.

-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance.

 
-
-
-

Returns

-

list of locales.

-

[transfer container][element-type utf8]

-
-

Since: 0.7.0

-
-
-
-

as_component_get_language ()

-
gint
-as_component_get_language (AsComponent *cpt,
-                           const gchar *locale);
-

Gets the translation coverage in percent for a specific locale

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent instance.

 

locale

the locale, or NULL. e.g. "en_GB".

[nullable]
-
-
-

Returns

-

a percentage value, -1 if locale was not found

-
-

Since: 0.7.0

-
-
-
-

as_component_add_language ()

-
void
-as_component_add_language (AsComponent *cpt,
-                           const gchar *locale,
-                           gint percentage);
-

Adds a language to the component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

an AsComponent instance.

 

locale

the locale, or NULL. e.g. "en_GB".

[nullable]

percentage

the percentage completion of the translation, 0 for locales with unknown amount of translation

 
-
-

Since: 0.7.0

-
-
-
-

as_component_get_translations ()

-
GPtrArray *
-as_component_get_translations (AsComponent *cpt);
-

Get a GPtrArray of AsTranslation objects describing the -translation systems and translation-ids (e.g. Gettext domains) used -by this software component.

-

Only set for metainfo files.

-
-

Parameters

-
----- - - - - - -

cpt

an AsComponent instance.

 
-
-
-

Returns

-

An array of AsTranslation objects.

-

[transfer none][element-type AsTranslation]

-
-

Since: 0.9.2

-
-
-
-

as_component_add_translation ()

-
void
-as_component_add_translation (AsComponent *cpt,
-                              AsTranslation *tr);
-

Assign an AsTranslation object describing the translation system used -by this component.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

an AsComponent instance.

 

tr

an AsTranslation instance.

 
-
-

Since: 0.9.2

-
-
-
-

as_component_has_bundle ()

-
gboolean
-as_component_has_bundle (AsComponent *cpt);
-
-

Parameters

-
----- - - - - - -

cpt

a AsComponent instance.

 
-
-
-

Returns

-

TRUE if this component has a bundle-id associated.

-
-
-
-
-

as_component_get_bundle_id ()

-
const gchar *
-as_component_get_bundle_id (AsComponent *cpt,
-                            AsBundleKind bundle_kind);
-

Gets a bundle identifier string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

bundle_kind

the bundle kind, e.g. AS_BUNDLE_KIND_LIMBA.

 
-
-
-

Returns

-

string, or NULL if unset.

-

[nullable]

-
-

Since: 0.8.0

-
-
-
-

as_component_add_bundle_id ()

-
void
-as_component_add_bundle_id (AsComponent *cpt,
-                            AsBundleKind bundle_kind,
-                            const gchar *id);
-

Adds a bundle identifier to the component.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cpt

a AsComponent instance.

 

bundle_kind

the URL kind, e.g. AS_BUNDLE_KIND_LIMBA

 

id

The bundle identification string

 
-
-

Since: 0.8.0

-
-
-
-

Types and Values

-
-

AS_TYPE_COMPONENT

-
#define AS_TYPE_COMPONENT (as_component_get_type ())
-
-

-

-
-
-
-

struct AsComponentClass

-
struct AsComponentClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsComponentKind

-

The type of an AsComponent.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_COMPONENT_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_COMPONENT_KIND_GENERIC

-

A generic (= without specialized type) component

-
 

AS_COMPONENT_KIND_DESKTOP_APP

-

An application with a .desktop-file

-
 

AS_COMPONENT_KIND_FONT

-

A font

-
 

AS_COMPONENT_KIND_CODEC

-

A multimedia codec

-
 

AS_COMPONENT_KIND_INPUTMETHOD

-

An input-method provider

-
 

AS_COMPONENT_KIND_ADDON

-

An extension of existing software, which does not run standalone

-
 

AS_COMPONENT_KIND_FIRMWARE

-

Firmware

-
 
-
-
-
-
-

AsComponent

-
typedef struct _AsComponent AsComponent;
-

-

-
-
-
-

Property Details

-
-

The “categories” property

-
  “categories”               GStrv
-

string array of categories

-

Flags: Read / Write

-
-
-
-

The “description” property

-
  “description”              gchar *
-

the description

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “developer-name” property

-
  “developer-name”           gchar *
-

the developer name

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “icons” property

-
  “icons”                    gpointer
-

hash map of icon urls and sizes

-

[type GList(AsIcon)]

-

Flags: Read

-
-
-
-

The “id” property

-
  “id”                       gchar *
-

the unique identifier

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “keywords” property

-
  “keywords”                 GStrv
-

string array of keywords

-

Flags: Read / Write

-
-
-
-

The “kind” property

-
  “kind”                     AsComponentKind
-

the AsComponentKind of this component

-

Flags: Read / Write

-

Default value: AS_COMPONENT_KIND_UNKNOWN

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

the name

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “pkgnames” property

-
  “pkgnames”                 GStrv
-

string array of packages name

-

Flags: Read / Write

-
-
-
-

The “project-group” property

-
  “project-group”            gchar *
-

the project group

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “project-license” property

-
  “project-license”          gchar *
-

the project license

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “screenshots” property

-
  “screenshots”              GPtrArray *
-

screenshots.

-

Flags: Read

-
-
-
-

The “summary” property

-
  “summary”                  gchar *
-

the summary

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “urls” property

-
  “urls”                     GHashTable *
-

urls.

-

Flags: Read

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsDatabase.html appstream-0.12.0/docs/html/api/html/AsDatabase.html --- appstream-0.9.4/docs/html/api/html/AsDatabase.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsDatabase.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,585 +0,0 @@ - - - - -AsDatabase: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsDatabase

-

AsDatabase — Read-only access to the AppStream component database

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsDatabase * - -as_database_new () -
-GQuark - -as_database_error_quark () -
-gboolean - -as_database_open () -
const gchar * - -as_database_get_location () -
-void - -as_database_set_location () -
-GPtrArray * - -as_database_find_components () -
-GPtrArray * - -as_database_get_all_components () -
-AsComponent * - -as_database_get_component_by_id () -
-GPtrArray * - -as_database_get_components_by_provided_item () -
-GPtrArray * - -as_database_get_components_by_kind () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_DATABASE
structAsDatabaseClass
enumAsDatabaseError
#defineAS_DATABASE_ERROR
 AsDatabase
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsDatabase
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object provides access to the Appstream Xapian database of available software components. -You can search for components using various criteria, as well as getting some information -about the data provided by this AppStream database.

-

By default, the global software component cache is used as datasource, unless a different database -is explicitly defined via as_database_set_location().

-

A new cache can be created using the appstreamcli(1) utility.

-

See also: AsComponent, AsDataPool

-
-
-

Functions

-
-

as_database_new ()

-
AsDatabase *
-as_database_new (void);
-

Creates a new AsDatabase.

-
-

Returns

-

a AsDatabase.

-

[transfer full]

-
-
-
-
-

as_database_error_quark ()

-
GQuark
-as_database_error_quark (void);
-
-

Returns

-

An error quark.

-
-
-
-
-

as_database_open ()

-
gboolean
-as_database_open (AsDatabase *db,
-                  GError **error);
-

Open the current AppStream metadata cache for reading.

-
-

Parameters

-
----- - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

error

A GError or NULL.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-
-
-
-

as_database_get_location ()

-
const gchar *
-as_database_get_location (AsDatabase *db);
-

Get the current path of the AppStream database we use.

-
-

Parameters

-
----- - - - - - -

db

An instance of AsDatabase.

 
-
-
-
-
-

as_database_set_location ()

-
void
-as_database_set_location (AsDatabase *db,
-                          const gchar *dir);
-

Set the location of the AppStream database we use.

-
-

Parameters

-
----- - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

dir

The directory of the Xapian database.

 
-
-
-
-
-

as_database_find_components ()

-
GPtrArray *
-as_database_find_components (AsDatabase *db,
-                             const gchar *term,
-                             const gchar *cats_str,
-                             GError **error);
-

Find components in the AppStream database, which match a given term. -You can limit the search to a specific set of categories by setting the categories string to -a semicolon-separated list of lower-cased category names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

term

a search-term to look for.

[nullable]

cats_str

A semicolon-delimited list of lower-cased category names, e.g. "science;development".

[nullable]

error

A GError or NULL.

 
-
-
-

Returns

-

an array of AsComponent objects which have been found.

-

[element-type AsComponent][transfer full]

-
-
-
-
-

as_database_get_all_components ()

-
GPtrArray *
-as_database_get_all_components (AsDatabase *db,
-                                GError **error);
-

Dump a list of all software components found in the database.

-
-

Parameters

-
----- - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

error

A GError or NULL.

 
-
-
-

Returns

-

an array of AsComponent objects.

-

[element-type AsComponent][transfer full]

-
-
-
-
-

as_database_get_component_by_id ()

-
AsComponent *
-as_database_get_component_by_id (AsDatabase *db,
-                                 const gchar *cid,
-                                 GError **error);
-

Get a component by its AppStream-ID.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

cid

the ID of the component, e.g. "org.kde.gwenview.desktop"

 

error

A GError or NULL.

 
-
-
-

Returns

-

an AsComponent or NULL if none was found.

-

[transfer full]

-
-
-
-
-

as_database_get_components_by_provided_item ()

-
GPtrArray *
-as_database_get_components_by_provided_item
-                               (AsDatabase *db,
-                                AsProvidedKind kind,
-                                const gchar *item,
-                                GError **error);
-

Find components in the Appstream database.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

kind

an AsProvidesKind

 

item

the name of the provided item.

 

error

A GError or NULL.

 
-
-
-

Returns

-

an array of AsComponent objects which have been found, NULL on error.

-

[element-type AsComponent][transfer full]

-
-
-
-
-

as_database_get_components_by_kind ()

-
GPtrArray *
-as_database_get_components_by_kind (AsDatabase *db,
-                                    AsComponentKind kind,
-                                    GError **error);
-

Return a list of all components in the database which match a certain kind.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

db

An instance of AsDatabase.

 

kind

an AsComponentKind.

 

error

A GError or NULL.

 
-
-
-

Returns

-

an array of AsComponent objects which have been found, NULL on error.

-

[element-type AsComponent][transfer full]

-
-
-
-
-

Types and Values

-
-

AS_TYPE_DATABASE

-
#define AS_TYPE_DATABASE (as_database_get_type ())
-
-

-

-
-
-
-

struct AsDatabaseClass

-
struct AsDatabaseClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

enum AsDatabaseError

-

A database query error.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

AS_DATABASE_ERROR_FAILED

-

Generic failure

-
 

AS_DATABASE_ERROR_MISSING

-

Database was not found

-
 

AS_DATABASE_ERROR_CLOSED

-

Tried to perform action on a closed database.

-
 

AS_DATABASE_ERROR_TERM_INVALID

-

A query term was invalid.

-
 
-
-
-
-
-

AS_DATABASE_ERROR

-
#define AS_DATABASE_ERROR as_database_error_quark ()
-
-

-

-
-
-
-

AsDatabase

-
typedef struct _AsDatabase AsDatabase;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsDataPool.html appstream-0.12.0/docs/html/api/html/AsDataPool.html --- appstream-0.9.4/docs/html/api/html/AsDataPool.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsDataPool.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,461 +0,0 @@ - - - - -AsDataPool: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsDataPool

-

AsDataPool — Collect and temporarily store metadata from different sources

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GQuark - -as_data_pool_error_quark () -
-AsDataPool * - -as_data_pool_new () -
const gchar * - -as_data_pool_get_locale () -
-void - -as_data_pool_set_locale () -
-gboolean - -as_data_pool_update () -
-GList * - -as_data_pool_get_components () -
-AsComponent * - -as_data_pool_get_component_by_id () -
-GPtrArray * - -as_data_pool_get_metadata_locations () -
-void - -as_data_pool_set_metadata_locations () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_DATA_POOL
structAsDataPoolClass
enumAsDataPoolError
#defineAS_DATA_POOL_ERROR
 AsDataPool
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsDataPool
-
-
-
-

Description

-

This class contains a temporary pool of metadata which has been collected from different -sources on the system. -It can directly be used, but usually it is accessed through a AsDatabase instance. -This class is used by internally by the cache builder, but might be useful for others.

-

See also: AsDatabase

-
-
-

Functions

-
-

as_data_pool_error_quark ()

-
GQuark
-as_data_pool_error_quark (void);
-
-

Returns

-

An error quark.

-
-
-
-
-

as_data_pool_new ()

-
AsDataPool *
-as_data_pool_new (void);
-

Creates a new AsDataPool.

-
-

Returns

-

a AsDataPool.

-

[transfer full]

-
-
-
-
-

as_data_pool_get_locale ()

-
const gchar *
-as_data_pool_get_locale (AsDataPool *dpool);
-

Gets the currently used locale.

-
-

Parameters

-
----- - - - - - -

dpool

An instance of AsDataPool.

 
-
-
-

Returns

-

Locale used for metadata parsing.

-
-
-
-
-

as_data_pool_set_locale ()

-
void
-as_data_pool_set_locale (AsDataPool *dpool,
-                         const gchar *locale);
-

Sets the current locale which should be used when parsing metadata.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dpool

An instance of AsDataPool.

 

locale

the locale.

 
-
-
-
-
-

as_data_pool_update ()

-
gboolean
-as_data_pool_update (AsDataPool *dpool,
-                     GError **error);
-

Builds an index of all found components in the watched locations. -The function will try to get as much data into the pool as possible, so even if -the updates completes with FALSE, it might still add components to the pool.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dpool

An instance of AsDataPool.

 

error

A GError or NULL.

 
-
-
-

Returns

-

TRUE if update completed without error.

-
-
-
-
-

as_data_pool_get_components ()

-
GList *
-as_data_pool_get_components (AsDataPool *dpool);
-

Get a list of found components.

-
-

Parameters

-
----- - - - - - -

dpool

An instance of AsDataPool.

 
-
-
-

Returns

-

a list of AsComponent instances, free with g_list_free().

-

[element-type AsComponent][transfer container]

-
-
-
-
-

as_data_pool_get_component_by_id ()

-
AsComponent *
-as_data_pool_get_component_by_id (AsDataPool *dpool,
-                                  const gchar *id);
-

Get a specific component by its ID.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dpool

An instance of AsDataPool.

 

id

The AppStream-ID to look for.

 
-
-
-

Returns

-

An AsComponent.

-

[transfer full]

-
-
-
-
-

as_data_pool_get_metadata_locations ()

-
GPtrArray *
-as_data_pool_get_metadata_locations (AsDataPool *dpool);
-

Return a list of all locations which are searched for metadata.

-
-

Parameters

-
----- - - - - - -

dpool

An instance of AsDataPool.

 
-
-
-

Returns

-

A string-list of watched (absolute) filepaths.

-

[transfer none][element-type utf8]

-
-
-
-
-

as_data_pool_set_metadata_locations ()

-
void
-as_data_pool_set_metadata_locations (AsDataPool *dpool,
-                                     gchar **dirs);
-

Set locations for the data pool to read it's data from. -This is mainly used for testing purposes. Each location should have an -"xmls" and/or "yaml" subdirectory with the actual data as (compressed) -AppStream XML or DEP-11 YAML in it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dpool

An instance of AsDataPool.

 

dirs

a zero-terminated array of data input directories.

[array zero-terminated=1]
-
-
-
-
-

Types and Values

-
-

AS_TYPE_DATA_POOL

-
#define AS_TYPE_DATA_POOL (as_data_pool_get_type ())
-
-

-

-
-
-
-

struct AsDataPoolClass

-
struct AsDataPoolClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

enum AsDataPoolError

-

A metadata pool error.

-
-

Members

-
----- - - - - - -

AS_DATA_POOL_ERROR_FAILED

-

Generic failure

-
 
-
-
-
-
-

AS_DATA_POOL_ERROR

-
#define AS_DATA_POOL_ERROR as_data_pool_error_quark ()
-
-

-

-
-
-
-

AsDataPool

-
typedef struct _AsDataPool AsDataPool;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsDistroDetails.html appstream-0.12.0/docs/html/api/html/AsDistroDetails.html --- appstream-0.9.4/docs/html/api/html/AsDistroDetails.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsDistroDetails.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,289 +0,0 @@ - - - - -AsDistroDetails: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsDistroDetails

-

AsDistroDetails — Provides information about the current distribution

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsDistroDetails * - -as_distro_details_new () -
const gchar * - -as_distro_details_get_id () -
const gchar * - -as_distro_details_get_name () -
const gchar * - -as_distro_details_get_version () -
-gchar * - -as_distro_details_get_str () -
-gboolean - -as_distro_details_get_bool () -
-gchar ** - -as_get_icon_repository_paths () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
-gchar *idRead
-gchar *nameRead
-gchar *versionRead
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineAS_TYPE_DISTRO_DETAILS
structAsDistroDetailsClass
 AsDistroDetails
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsDistroDetails
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object abstracts various distribution-specific settings and provides information -about the (Linux) distribution which is currently in use. -It is used internalls to get information about the icon-store or the 3rd-party screenshot -service distributors may want to provide.

-

See also: AsDatabase

-
-
-

Functions

-
-

as_distro_details_new ()

-
AsDistroDetails *
-as_distro_details_new (void);
-

Creates a new instance of AsDistroDetails.

-
-

Returns

-

a AsDistroDetails.

-

[transfer full]

-
-
-
-
-

as_distro_details_get_id ()

-
const gchar *
-as_distro_details_get_id (AsDistroDetails *distro);
-
-
-
-

as_distro_details_get_name ()

-
const gchar *
-as_distro_details_get_name (AsDistroDetails *distro);
-
-
-
-

as_distro_details_get_version ()

-
const gchar *
-as_distro_details_get_version (AsDistroDetails *distro);
-
-
-
-

as_distro_details_get_str ()

-
gchar *
-as_distro_details_get_str (AsDistroDetails *distro,
-                           const gchar *key);
-
-
-
-

as_distro_details_get_bool ()

-
gboolean
-as_distro_details_get_bool (AsDistroDetails *distro,
-                            const gchar *key);
-
-
-
-

as_get_icon_repository_paths ()

-
gchar **
-as_get_icon_repository_paths (void);
-

Returns list of icon-paths for software-center applications to use. -Icons of software (even if it is not installed) are stored in these -locations.

-
-

Returns

-

A NULL-terminated array of paths.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

AS_TYPE_DISTRO_DETAILS

-
#define AS_TYPE_DISTRO_DETAILS (as_distro_details_get_type ())
-
-

-

-
-
-
-

struct AsDistroDetailsClass

-
struct AsDistroDetailsClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

AsDistroDetails

-
typedef struct _AsDistroDetails AsDistroDetails;
-

-

-
-
-
-

Property Details

-
-

The “id” property

-
  “id”                       gchar *
-

id.

-

Flags: Read

-

Default value: NULL

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

name.

-

Flags: Read

-

Default value: NULL

-
-
-
-

The “version” property

-
  “version”                  gchar *
-

version.

-

Flags: Read

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsIcon.html appstream-0.12.0/docs/html/api/html/AsIcon.html --- appstream-0.9.4/docs/html/api/html/AsIcon.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsIcon.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,689 +0,0 @@ - - - - -AsIcon: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsIcon

-

AsIcon — Describes an icon of an application.

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsIconKind - -as_icon_kind_from_string () -
const gchar * - -as_icon_kind_to_string () -
-AsIcon * - -as_icon_new () -
-AsIconKind - -as_icon_get_kind () -
-void - -as_icon_set_kind () -
const gchar * - -as_icon_get_name () -
-void - -as_icon_set_name () -
const gchar * - -as_icon_get_url () -
-void - -as_icon_set_url () -
const gchar * - -as_icon_get_filename () -
-void - -as_icon_set_filename () -
-guint - -as_icon_get_width () -
-void - -as_icon_set_width () -
-guint - -as_icon_get_height () -
-void - -as_icon_set_height () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_ICON
structAsIconClass
enumAsIconKind
 AsIcon
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsIcon
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-
-
-

Functions

-
-

as_icon_kind_from_string ()

-
AsIconKind
-as_icon_kind_from_string (const gchar *kind_str);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind_str

the string.

 
-
-
-

Returns

-

a AsIconKind or AS_ICON_KIND_UNKNOWN for unknown

-
-
-
-
-

as_icon_kind_to_string ()

-
const gchar *
-as_icon_kind_to_string (AsIconKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsIconKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_icon_new ()

-
AsIcon *
-as_icon_new (void);
-

Creates a new AsIcon.

-
-

Returns

-

a AsIcon.

-

[transfer full]

-
-
-
-
-

as_icon_get_kind ()

-
AsIconKind
-as_icon_get_kind (AsIcon *icon);
-

Gets the icon kind.

-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

the AsIconKind

-
-
-
-
-

as_icon_set_kind ()

-
void
-as_icon_set_kind (AsIcon *icon,
-                  AsIconKind kind);
-

Sets the icon kind.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

kind

the AsIconKind, e.g. AS_ICON_KIND_CACHED.

 
-
-
-
-
-

as_icon_get_name ()

-
const gchar *
-as_icon_get_name (AsIcon *icon);
-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

the stock name of the icon. In case the icon is not of kind -"stock", the basename of the icon filename or URL is returned.

-
-
-
-
-

as_icon_set_name ()

-
void
-as_icon_set_name (AsIcon *icon,
-                  const gchar *name);
-

Sets the stock name or basename to use for the icon.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

name

the icon stock name, e.g. "gwenview"

 
-
-
-
-
-

as_icon_get_url ()

-
const gchar *
-as_icon_get_url (AsIcon *icon);
-

Gets the icon URL, pointing at a remote location. HTTPS and FTP urls are allowed. -This property is only set for icons of type AS_ICON_KIND_REMOTE

-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

the URL

-
-
-
-
-

as_icon_set_url ()

-
void
-as_icon_set_url (AsIcon *icon,
-                 const gchar *url);
-

Sets the icon URL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

url

the new icon URL.

 
-
-
-
-
-

as_icon_get_filename ()

-
const gchar *
-as_icon_get_filename (AsIcon *icon);
-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

The absolute path for the icon on disk. -This is only set for icons of kind AS_ICON_KIND_LOCAL or -AS_ICON_KIND_CACHED.

-
-
-
-
-

as_icon_set_filename ()

-
void
-as_icon_set_filename (AsIcon *icon,
-                      const gchar *filename);
-

Sets the icon absolute filename.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

filename

the new icon URL.

 
-
-
-
-
-

as_icon_get_width ()

-
guint
-as_icon_get_width (AsIcon *icon);
-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

The icon width in pixels, or 0 if unknown.

-
-
-
-
-

as_icon_set_width ()

-
void
-as_icon_set_width (AsIcon *icon,
-                   guint width);
-

Sets the icon width.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

width

the width in pixels.

 
-
-
-
-
-

as_icon_get_height ()

-
guint
-as_icon_get_height (AsIcon *icon);
-
-

Parameters

-
----- - - - - - -

icon

a AsIcon instance.

 
-
-
-

Returns

-

The icon height in pixels, or 0 if unknown.

-
-
-
-
-

as_icon_set_height ()

-
void
-as_icon_set_height (AsIcon *icon,
-                    guint height);
-

Sets the icon height.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a AsIcon instance.

 

height

the height in pixels.

 
-
-
-
-
-

Types and Values

-
-

AS_TYPE_ICON

-
#define AS_TYPE_ICON (as_icon_get_type ())
-
-

-

-
-
-
-

struct AsIconClass

-
struct AsIconClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsIconKind

-

The icon type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_ICON_KIND_UNKNOWN

-

Unknown icon kind

-
 

AS_ICON_KIND_CACHED

-

Icon in the internal caches

-
 

AS_ICON_KIND_STOCK

-

Stock icon name

-
 

AS_ICON_KIND_LOCAL

-

Local icon name

-
 

AS_ICON_KIND_REMOTE

-

Remote icon URL

-
 
-
-
-
-
-

AsIcon

-
typedef struct _AsIcon AsIcon;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsImage.html appstream-0.12.0/docs/html/api/html/AsImage.html --- appstream-0.9.4/docs/html/api/html/AsImage.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsImage.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,533 +0,0 @@ - - - - -AsImage: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsImage

-

AsImage — Object representing a single image used in a screenshot.

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsImageKind - -as_image_kind_from_string () -
const gchar * - -as_image_kind_to_string () -
-AsImage * - -as_image_new () -
const gchar * - -as_image_get_url () -
-void - -as_image_set_url () -
-guint - -as_image_get_width () -
-void - -as_image_set_width () -
-guint - -as_image_get_height () -
-void - -as_image_set_height () -
-AsImageKind - -as_image_get_kind () -
-void - -as_image_set_kind () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_IMAGE
structAsImageClass
enumAsImageKind
 AsImage
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsImage
-
-
-
-

Description

-

Screenshot may have multiple versions of an image in different resolutions -or aspect ratios. This object allows access to the location and size of a -single image.

-

See also: AsScreenshot

-
-
-

Functions

-
-

as_image_kind_from_string ()

-
AsImageKind
-as_image_kind_from_string (const gchar *kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind

the string.

 
-
-
-

Returns

-

a AsImageKind, or AS_IMAGE_KIND_UNKNOWN for unknown.

-

[transfer full]

-
-
-
-
-

as_image_kind_to_string ()

-
const gchar *
-as_image_kind_to_string (AsImageKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsImageKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_image_new ()

-
AsImage *
-as_image_new (void);
-

Creates a new AsImage.

-
-

Returns

-

a AsImage.

-

[transfer full]

-
-
-
-
-

as_image_get_url ()

-
const gchar *
-as_image_get_url (AsImage *image);
-

Gets the full qualified URL for the image, usually pointing at some mirror.

-
-

Parameters

-
----- - - - - - -

image

a AsImage instance.

 
-
-
-

Returns

-

URL

-
-
-
-
-

as_image_set_url ()

-
void
-as_image_set_url (AsImage *image,
-                  const gchar *url);
-

Sets the fully-qualified mirror URL to use for the image.

-
-

Parameters

-
----- - - - - - - - - - - - - -

image

a AsImage instance.

 

url

the URL.

 
-
-
-
-
-

as_image_get_width ()

-
guint
-as_image_get_width (AsImage *image);
-

Gets the image width.

-
-

Parameters

-
----- - - - - - -

image

a AsImage instance.

 
-
-
-

Returns

-

width in pixels

-
-
-
-
-

as_image_set_width ()

-
void
-as_image_set_width (AsImage *image,
-                    guint width);
-

Sets the image width.

-
-

Parameters

-
----- - - - - - - - - - - - - -

image

a AsImage instance.

 

width

the width in pixels.

 
-
-
-
-
-

as_image_get_height ()

-
guint
-as_image_get_height (AsImage *image);
-

Gets the image height.

-
-

Parameters

-
----- - - - - - -

image

a AsImage instance.

 
-
-
-

Returns

-

height in pixels

-
-
-
-
-

as_image_set_height ()

-
void
-as_image_set_height (AsImage *image,
-                     guint height);
-

Sets the image height.

-
-

Parameters

-
----- - - - - - - - - - - - - -

image

a AsImage instance.

 

height

the height in pixels.

 
-
-
-
-
-

as_image_get_kind ()

-
AsImageKind
-as_image_get_kind (AsImage *image);
-

Gets the image kind.

-
-

Parameters

-
----- - - - - - -

image

a AsImage instance.

 
-
-
-

Returns

-

the AsImageKind

-
-
-
-
-

as_image_set_kind ()

-
void
-as_image_set_kind (AsImage *image,
-                   AsImageKind kind);
-

Sets the image kind.

-
-

Parameters

-
----- - - - - - - - - - - - - -

image

a AsImage instance.

 

kind

the AsImageKind, e.g. AS_IMAGE_KIND_THUMBNAIL.

 
-
-
-
-
-

Types and Values

-
-

AS_TYPE_IMAGE

-
#define AS_TYPE_IMAGE (as_image_get_type ())
-
-

-

-
-
-
-

struct AsImageClass

-
struct AsImageClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsImageKind

-

The image type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_IMAGE_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_IMAGE_KIND_SOURCE

-

The source image at full resolution

-
 

AS_IMAGE_KIND_THUMBNAIL

-

A thumbnail at reduced resolution

-
 
-
-
-
-
-

AsImage

-
typedef struct _AsImage AsImage;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsMenuParser.html appstream-0.12.0/docs/html/api/html/AsMenuParser.html --- appstream-0.9.4/docs/html/api/html/AsMenuParser.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsMenuParser.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,318 +0,0 @@ - - - - -AsMenuParser: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsMenuParser

-

AsMenuParser — Parser for XDG menu files designed for software-centers

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsMenuParser * - -as_menu_parser_new () -
-AsMenuParser * - -as_menu_parser_new_from_file () -
-GList * - -as_menu_parser_parse () -
-gboolean - -as_menu_parser_get_update_category_data () -
-void - -as_menu_parser_set_update_category_data () -
-GList * - -as_get_system_categories () -
-
-
-

Properties

-
----- - - - - - -
gbooleanupdate-category-dataRead / Write
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineAS_TYPE_MENU_PARSER
structAsMenuParserClass
 AsMenuParser
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsMenuParser
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object parses an XDG menu file and returns a set of AsCategory objects which -can be used by software-centers to group the applications they show. -By default, it loads a common set of categories from an internal menu file. -A custom menu file may be specified using the alternative class constructor.

-

See also: AsCategory

-
-
-

Functions

-
-

as_menu_parser_new ()

-
AsMenuParser *
-as_menu_parser_new (void);
-

Creates a new AsMenuParser.

-
-

Returns

-

an AsMenuParser.

-

[transfer full]

-
-
-
-
-

as_menu_parser_new_from_file ()

-
AsMenuParser *
-as_menu_parser_new_from_file (const gchar *menu_file);
-

Creates a new AsMenuParser using a custom XDG menu XML file.

-
-

Parameters

-
----- - - - - - -

menu_file

The menu-file to parse.

 
-
-
-

Returns

-

an AsMenuParser.

-

[transfer full]

-
-
-
-
-

as_menu_parser_parse ()

-
GList *
-as_menu_parser_parse (AsMenuParser *mp);
-

Parse the menu file

-
-

Parameters

-
----- - - - - - -

mp

An instance of AsMenuParser.

 
-
-
-

Returns

-

GList of AsCategory objects found in the menu, or NULL if there was an error.

-

[element-type AsCategory][transfer full]

-
-
-
-
-

as_menu_parser_get_update_category_data ()

-
gboolean
-as_menu_parser_get_update_category_data
-                               (AsMenuParser *mp);
-
-

Parameters

-
----- - - - - - -

mp

An instance of AsMenuParser.

 
-
-
-
-
-

as_menu_parser_set_update_category_data ()

-
void
-as_menu_parser_set_update_category_data
-                               (AsMenuParser *mp,
-                                gboolean value);
-
-

Parameters

-
----- - - - - - -

mp

An instance of AsMenuParser.

 
-
-
-
-
-

as_get_system_categories ()

-
GList *
-as_get_system_categories (void);
-

Get a GList of the default AppStream categories

-
-

Returns

-

GList of AsCategory objects.

-

[element-type AsCategory][transfer full]

-
-
-
-
-

Types and Values

-
-

AS_TYPE_MENU_PARSER

-
#define AS_TYPE_MENU_PARSER (as_menu_parser_get_type ())
-
-

-

-
-
-
-

struct AsMenuParserClass

-
struct AsMenuParserClass {
-	GObjectClass parent_class;
-};
-
-

-

-
-
-
-

AsMenuParser

-
typedef struct _AsMenuParser AsMenuParser;
-

-

-
-
-
-

Property Details

-
-

The “update-category-data” property

-
  “update-category-data”     gboolean
-

update-category-data.

-

Flags: Read / Write

-

Default value: FALSE

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsMetadata.html appstream-0.12.0/docs/html/api/html/AsMetadata.html --- appstream-0.9.4/docs/html/api/html/AsMetadata.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsMetadata.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,1085 +0,0 @@ - - - - -AsMetadata: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsMetadata

-

AsMetadata — Parser for AppStream metadata

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsMetadata * - -as_metadata_new () -
-GQuark - -as_metadata_error_quark () -
-void - -as_metadata_parse_file () -
-void - -as_metadata_parse_xml () -
-void - -as_metadata_parse_yaml () -
-AsComponent * - -as_metadata_get_component () -
-GPtrArray * - -as_metadata_get_components () -
-void - -as_metadata_clear_components () -
-void - -as_metadata_add_component () -
-gchar * - -as_metadata_component_to_upstream_xml () -
-void - -as_metadata_save_upstream_xml () -
-gchar * - -as_metadata_components_to_distro_xml () -
-void - -as_metadata_save_distro_xml () -
-gchar * - -as_metadata_components_to_distro_yaml () -
-void - -as_metadata_save_distro_yaml () -
-void - -as_metadata_set_locale () -
const gchar * - -as_metadata_get_locale () -
const gchar * - -as_metadata_get_origin () -
-void - -as_metadata_set_origin () -
-gboolean - -as_metadata_get_update_existing () -
-void - -as_metadata_set_update_existing () -
-gboolean - -as_metadata_get_write_header () -
-void - -as_metadata_set_write_header () -
-void - -as_metadata_set_parser_mode () -
-AsParserMode - -as_metadata_get_parser_mode () -
const gchar * - -as_metadata_get_architecture () -
-void - -as_metadata_set_architecture () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_METADATA
structAsMetadataClass
enumAsParserMode
enumAsMetadataError
#defineAS_METADATA_ERROR
 AsMetadata
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsMetadata
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object parses AppStream metadata, including AppStream -upstream metadata, which is defined by upstream projects. -It returns an AsComponent of the data.

-

See also: AsComponent, AsDatabase

-
-
-

Functions

-
-

as_metadata_new ()

-
AsMetadata *
-as_metadata_new (void);
-

Creates a new AsMetadata.

-
-

Returns

-

a AsMetadata.

-

[transfer full]

-
-
-
-
-

as_metadata_error_quark ()

-
GQuark
-as_metadata_error_quark (void);
-
-

Returns

-

An error quark.

-
-
-
-
-

as_metadata_parse_file ()

-
void
-as_metadata_parse_file (AsMetadata *metad,
-                        GFile *file,
-                        GError **error);
-

Parses an AppStream upstream metadata file.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

metad

A valid AsMetadata instance

 

file

GFile for the upstream metadata

 

error

A GError or NULL.

 
-
-
-
-
-

as_metadata_parse_xml ()

-
void
-as_metadata_parse_xml (AsMetadata *metad,
-                       const gchar *data,
-                       GError **error);
-

Parses AppStream XML metadata.

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

A valid AsMetadata instance

 

data

XML data describing one or more software components.

 
-
-
-
-
-

as_metadata_parse_yaml ()

-
void
-as_metadata_parse_yaml (AsMetadata *metad,
-                        const gchar *data,
-                        GError **error);
-

Parses AppStream YAML metadata.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

metad

A valid AsMetadata instance

 

data

YAML data describing one or more software components.

 

error

A GError or NULL.

 
-
-
-
-
-

as_metadata_get_component ()

-
AsComponent *
-as_metadata_get_component (AsMetadata *metad);
-

Gets the AsComponent which has been parsed from the XML. -If the AppStream XML contained multiple components, return the first -component that has been parsed.

-
-

Parameters

-
----- - - - - - -

metad

a AsMetadata instance.

 
-
-
-

Returns

-

An AsComponent or NULL.

-

[transfer none]

-
-
-
-
-

as_metadata_get_components ()

-
GPtrArray *
-as_metadata_get_components (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

a AsMetadata instance.

 
-
-
-

Returns

-

A GPtrArray of all parsed components.

-

[transfer none][element-type AsComponent]

-
-
-
-
-

as_metadata_clear_components ()

-
void
-as_metadata_clear_components (AsMetadata *metad);
-
-
-
-

as_metadata_add_component ()

-
void
-as_metadata_add_component (AsMetadata *metad,
-                           AsComponent *cpt);
-

Add an AsComponent to the list of components. -This can be used to add multiple components in order to -produce a distro-XML AppStream metadata file.

-
-
-
-

as_metadata_component_to_upstream_xml ()

-
gchar *
-as_metadata_component_to_upstream_xml (AsMetadata *metad);
-

Convert an AsComponent to upstream XML. -(The amount of localization included in the metadata depends on how the AsComponent -was initially loaded)

-

The first AsComponent added to the internal list will be transformed. -In case no component is present, NULL is returned.

-
-

Returns

-

A string containing the XML. Free with g_free().

-

[transfer full]

-
-
-
-
-

as_metadata_save_upstream_xml ()

-
void
-as_metadata_save_upstream_xml (AsMetadata *metad,
-                               const gchar *fname,
-                               GError **error);
-

Serialize AsComponent instance to XML and save it to file. -An existing file at the same location will be overridden.

-
-

Parameters

-
----- - - - - - -

fname

The filename for the new XML file.

 
-
-
-
-
-

as_metadata_components_to_distro_xml ()

-
gchar *
-as_metadata_components_to_distro_xml (AsMetadata *metad);
-

Serialize all AsComponent instances into AppStream -distro-XML data. -NULL is returned if there is nothing to serialize.

-
-

Returns

-

A string containing the XML. Free with g_free().

-

[transfer full]

-
-
-
-
-

as_metadata_save_distro_xml ()

-
void
-as_metadata_save_distro_xml (AsMetadata *metad,
-                             const gchar *fname,
-                             GError **error);
-

Serialize all AsComponent instances to XML and save the data to a file. -An existing file at the same location will be overridden.

-
-

Parameters

-
----- - - - - - -

fname

The filename for the new XML file.

 
-
-
-
-
-

as_metadata_components_to_distro_yaml ()

-
gchar *
-as_metadata_components_to_distro_yaml (AsMetadata *metad);
-

Serialize all AsComponent instances into AppStream DEP-11 -distro-YAML data. -NULL is returned if there is nothing to serialize.

-
-

Returns

-

A string containing the YAML markup. Free with g_free().

-

[transfer full]

-
-
-
-
-

as_metadata_save_distro_yaml ()

-
void
-as_metadata_save_distro_yaml (AsMetadata *metad,
-                              const gchar *fname,
-                              GError **error);
-

Serialize all AsComponent instances to XML and save the data to a file. -An existing file at the same location will be overridden.

-
-

Parameters

-
----- - - - - - -

fname

The filename for the new YAML file.

 
-
-
-
-
-

as_metadata_set_locale ()

-
void
-as_metadata_set_locale (AsMetadata *metad,
-                        const gchar *locale);
-

Sets the locale which should be read when processing metadata. -All other locales are ignored, which increases parsing speed and -reduces memory usage. -If you set the locale to "ALL", all locales will be read.

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

a AsMetadata instance.

 

locale

the locale.

 
-
-
-
-
-

as_metadata_get_locale ()

-
const gchar *
-as_metadata_get_locale (AsMetadata *metad);
-

Gets the current active locale for parsing metadata, -or "ALL" if all locales are read.

-
-

Parameters

-
----- - - - - - -

metad

a AsMetadata instance.

 
-
-
-

Returns

-

Locale used for metadata parsing.

-
-
-
-
-

as_metadata_get_origin ()

-
const gchar *
-as_metadata_get_origin (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

an AsMetadata instance.

 
-
-
-

Returns

-

The origin of AppStream distro metadata

-
-
-
-
-

as_metadata_set_origin ()

-
void
-as_metadata_set_origin (AsMetadata *metad,
-                        const gchar *origin);
-

Set the origin of AppStream distro metadata

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

an AsMetadata instance.

 

origin

the origin of AppStream distro metadata.

 
-
-
-
-
-

as_metadata_get_update_existing ()

-
gboolean
-as_metadata_get_update_existing (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

an AsMetadata instance.

 
-
-
-

Returns

-

Whether existing components should be updates with the parsed data, -instead of creating new ones.

-
-
-
-
-

as_metadata_set_update_existing ()

-
void
-as_metadata_set_update_existing (AsMetadata *metad,
-                                 gboolean update);
-

If set to TRUE, the parser will not create new components but -instead update existing components in the pool with new metadata.

-

NOTE: Right now, this feature is only implemented for metainfo XML parsing!

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

an AsMetadata instance.

 

update

A boolean value.

 
-
-
-
-
-

as_metadata_get_write_header ()

-
gboolean
-as_metadata_get_write_header (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

an AsMetadata instance.

 
-
-
-

Returns

-

Whether we will write a header/root node in distro metadata.

-
-
-
-
-

as_metadata_set_write_header ()

-
void
-as_metadata_set_write_header (AsMetadata *metad,
-                              gboolean wheader);
-

If set to TRUE, tehe metadata writer will omit writing a DEP-11 -header document when in YAML mode, and will not write a root components node -when writing XML data. -Please keep in mind that this will create an invalid DEP-11 YAML AppStream -distro metadata file, and an invalid XML file. -This parameter should only be changed e.g. by the appstream-generator tool.

-

NOTE: Right now, this feature is only implemented for YAML!

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

an AsMetadata instance.

 

wheader

A boolean value.

 
-
-
-
-
-

as_metadata_set_parser_mode ()

-
void
-as_metadata_set_parser_mode (AsMetadata *metad,
-                             AsParserMode mode);
-

Sets the current metadata parsing mode.

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

a AsMetadata instance.

 

mode

the AsParserMode.

 
-
-
-
-
-

as_metadata_get_parser_mode ()

-
AsParserMode
-as_metadata_get_parser_mode (AsMetadata *metad);
-

Gets the current parser mode

-
-

Parameters

-
----- - - - - - -

metad

a AsMetadata instance.

 
-
-
-

Returns

-

an AsParserMode

-
-
-
-
-

as_metadata_get_architecture ()

-
const gchar *
-as_metadata_get_architecture (AsMetadata *metad);
-
-

Parameters

-
----- - - - - - -

metad

an AsMetadata instance.

 
-
-
-

Returns

-

The architecture of AppStream distro metadata

-
-
-
-
-

as_metadata_set_architecture ()

-
void
-as_metadata_set_architecture (AsMetadata *metad,
-                              const gchar *arch);
-

Set the architecture the components in this metadata belong to.

-
-

Parameters

-
----- - - - - - - - - - - - - -

metad

an AsMetadata instance.

 

arch

an architecture string.

 
-
-
-
-
-

Types and Values

-
-

AS_TYPE_METADATA

-
#define AS_TYPE_METADATA (as_metadata_get_type ())
-
-

-

-
-
-
-

struct AsMetadataClass

-
struct AsMetadataClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsParserMode

-

There are a few differences between Appstream's upstream metadata -and the distribution metadata. -The parser mode indicates which style we should process. -Usually you don't want to change this.

-
-

Members

-
----- - - - - - - - - - - - - -

AS_PARSER_MODE_UPSTREAM

-

Parse Appstream upstream metadata

-
 

AS_PARSER_MODE_DISTRO

-

Parse Appstream distribution metadata

-
 
-
-
-
-
-

enum AsMetadataError

-

A metadata processing error.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_METADATA_ERROR_FAILED

-

Generic failure

-
 

AS_METADATA_ERROR_UNEXPECTED_FORMAT_KIND

-

Expected upstream metadata but got distro metadata, or vice versa.

-
 

AS_METADATA_ERROR_NO_COMPONENT

-

We expected a component in the pool, but couldn't find one.

-
 
-
-
-
-
-

AS_METADATA_ERROR

-
#define AS_METADATA_ERROR as_metadata_error_quark ()
-
-

-

-
-
-
-

AsMetadata

-
typedef struct _AsMetadata AsMetadata;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsProvided.html appstream-0.12.0/docs/html/api/html/AsProvided.html --- appstream-0.9.4/docs/html/api/html/AsProvided.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsProvided.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,530 +0,0 @@ - - - - -AsProvided: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsProvided

-

AsProvided — Description of the provided-items in components

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -as_provided_kind_to_string () -
-AsProvidedKind - -as_provided_kind_from_string () -
const gchar * - -as_provided_kind_to_l10n_string () -
-AsProvided * - -as_provided_new () -
-AsProvidedKind - -as_provided_get_kind () -
-void - -as_provided_set_kind () -
-gchar ** - -as_provided_get_items () -
-void - -as_provided_add_item () -
-gboolean - -as_provided_has_item () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_PROVIDED
structAsProvidedClass
enumAsProvidedKind
 AsProvided
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsProvided
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

Components can provide various items, like libraries, Python-modules, -firmware, binaries, etc. -Functions to work with these items are provided here.

-

See also: AsComponent

-
-
-

Functions

-
-

as_provided_kind_to_string ()

-
const gchar *
-as_provided_kind_to_string (AsProvidedKind kind);
-

Converts the enumerated value to a text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsProvidedKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_provided_kind_from_string ()

-
AsProvidedKind
-as_provided_kind_from_string (const gchar *kind_str);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind_str

the string.

 
-
-
-

Returns

-

a AsProvidedKind or AS_PROVIDED_KIND_UNKNOWN for unknown

-
-
-
-
-

as_provided_kind_to_l10n_string ()

-
const gchar *
-as_provided_kind_to_l10n_string (AsProvidedKind kind);
-

Converts the enumerated value to a localized text representation, -using the plural forms (e.g. "Libraries" instead of "Library").

-

This can be useful when displaying provided items in GUI dialogs.

-
-

Parameters

-
----- - - - - - -

kind

the AsProvidedKind.

 
-
-
-

Returns

-

Pluralized, l10n string version of kind -

-
-
-
-
-

as_provided_new ()

-
AsProvided *
-as_provided_new (void);
-

Creates a new AsProvided.

-
-

Returns

-

a AsProvided.

-

[transfer full]

-
-
-
-
-

as_provided_get_kind ()

-
AsProvidedKind
-as_provided_get_kind (AsProvided *prov);
-

The kind of items this AsProvided object stores.

-
-

Parameters

-
----- - - - - - -

prov

a AsProvided instance.

 
-
-
-

Returns

-

an enum of type AsProvidedKind

-
-
-
-
-

as_provided_set_kind ()

-
void
-as_provided_set_kind (AsProvided *prov,
-                      AsProvidedKind kind);
-

Set the kind of items this AsProvided object stores.

-
-

Parameters

-
----- - - - - - - - - - - - - -

prov

a AsProvided instance.

 

kind

the new AsProvidedKind

 
-
-
-
-
-

as_provided_get_items ()

-
gchar **
-as_provided_get_items (AsProvided *prov);
-

Get an array of provided data.

-
-

Parameters

-
----- - - - - - -

prov

a AsProvided instance.

 
-
-
-

Returns

-

An utf-8 array of provided items, free with g_free().

-

[transfer container]

-
-
-
-
-

as_provided_add_item ()

-
void
-as_provided_add_item (AsProvided *prov,
-                      const gchar *item);
-

Add a new provided item.

-
-

Parameters

-
----- - - - - - -

prov

a AsProvided instance.

 
-
-
-
-
-

as_provided_has_item ()

-
gboolean
-as_provided_has_item (AsProvided *prov,
-                      const gchar *item);
-

Check if the current AsProvided contains an item -of the given name.

-
-

Parameters

-
----- - - - - - - - - - - - - -

prov

a AsProvided instance.

 

item

the name of a provided item, e.g. "audio/x-vorbis" (in case the provided kind is a mimetype)

 
-
-
-

Returns

-

TRUE if found.

-
-
-
-
-

Types and Values

-
-

AS_TYPE_PROVIDED

-
#define AS_TYPE_PROVIDED (as_provided_get_type ())
-
-

-

-
-
-
-

struct AsProvidedClass

-
struct AsProvidedClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsProvidedKind

-

Type of the public interface components can provide.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_PROVIDED_KIND_UNKNOWN

-

Unknown kind

-
 

AS_PROVIDED_KIND_LIBRARY

-

A shared library

-
 

AS_PROVIDED_KIND_BINARY

-

A binary installed into a directory in PATH

-
 

AS_PROVIDED_KIND_MIMETYPE

-

Provides a handler for a mimetype

-
 

AS_PROVIDED_KIND_FONT

-

A font

-
 

AS_PROVIDED_KIND_MODALIAS

-

A modalias

-
 

AS_PROVIDED_KIND_PYTHON_2

-

A Python2 module

-
 

AS_PROVIDED_KIND_PYTHON

-

A Python3 module

-
 

AS_PROVIDED_KIND_DBUS_SYSTEM

-

A DBus service name on the system bus.

-
 

AS_PROVIDED_KIND_DBUS_USER

-

A DBus service name on the user/session bus.

-
 

AS_PROVIDED_KIND_FIRMWARE_RUNTIME

-

Firmware flashed at runtime.

-
 

AS_PROVIDED_KIND_FIRMWARE_FLASHED

-

Firmware flashed permanently to the device.

-
 
-
-
-
-
-

AsProvided

-
typedef struct _AsProvided AsProvided;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsRelease.html appstream-0.12.0/docs/html/api/html/AsRelease.html --- appstream-0.9.4/docs/html/api/html/AsRelease.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsRelease.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,897 +0,0 @@ - - - - -AsRelease: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsRelease

-

AsRelease — Object representing a single upstream release

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -as_checksum_kind_to_string () -
-AsChecksumKind - -as_checksum_kind_from_string () -
const gchar * - -as_size_kind_to_string () -
-AsSizeKind - -as_size_kind_from_string () -
-AsRelease * - -as_release_new () -
const gchar * - -as_release_get_version () -
-void - -as_release_set_version () -
-guint64 - -as_release_get_timestamp () -
-void - -as_release_set_timestamp () -
const gchar * - -as_release_get_description () -
-void - -as_release_set_description () -
-gchar * - -as_release_get_active_locale () -
-void - -as_release_set_active_locale () -
-GPtrArray * - -as_release_get_locations () -
-void - -as_release_add_location () -
const gchar * - -as_release_get_checksum () -
-void - -as_release_set_checksum () -
-AsUrgencyKind - -as_release_get_urgency () -
-void - -as_release_set_urgency () -
-guint64 - -as_release_get_size () -
-void - -as_release_set_size () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_RELEASE
structAsReleaseClass
enumAsChecksumKind
enumAsSizeKind
 AsRelease
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsRelease
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object represents a single upstream release, typically a minor update. -Releases can contain a localized description of paragraph and list elements -and also have a version number and timestamp.

-

Releases can be automatically generated by parsing upstream ChangeLogs or -.spec files, or can be populated using MetaInfo files.

-

See also: AsComponent

-
-
-

Functions

-
-

as_checksum_kind_to_string ()

-
const gchar *
-as_checksum_kind_to_string (AsChecksumKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsChecksumKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_checksum_kind_from_string ()

-
AsChecksumKind
-as_checksum_kind_from_string (const gchar *kind_str);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind_str

the string.

 
-
-
-

Returns

-

a AsChecksumKind or AS_CHECKSUM_KIND_NONE for unknown

-
-
-
-
-

as_size_kind_to_string ()

-
const gchar *
-as_size_kind_to_string (AsSizeKind size_kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

size_kind

the AsSizeKind.

 
-
-
-

Returns

-

string version of size_kind -

-
-

Since: 0.8.6

-
-
-
-

as_size_kind_from_string ()

-
AsSizeKind
-as_size_kind_from_string (const gchar *size_kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

size_kind

the string.

 
-
-
-

Returns

-

an AsSizeKind or AS_SIZE_KIND_UNKNOWN for unknown

-
-

Since: 0.8.6

-
-
-
-

as_release_new ()

-
AsRelease *
-as_release_new (void);
-

Creates a new AsRelease.

-
-

Returns

-

a AsRelease.

-

[transfer full]

-
-
-
-
-

as_release_get_version ()

-
const gchar *
-as_release_get_version (AsRelease *release);
-

Gets the release version.

-
-

Parameters

-
----- - - - - - -

release

a AsRelease instance.

 
-
-
-

Returns

-

string, or NULL for not set or invalid

-
-
-
-
-

as_release_set_version ()

-
void
-as_release_set_version (AsRelease *release,
-                        const gchar *version);
-

Sets the release version.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance.

 

version

the version string.

 
-
-
-
-
-

as_release_get_timestamp ()

-
guint64
-as_release_get_timestamp (AsRelease *release);
-

Gets the release timestamp.

-
-

Parameters

-
----- - - - - - -

release

a AsRelease instance.

 
-
-
-

Returns

-

timestamp, or 0 for unset

-
-
-
-
-

as_release_set_timestamp ()

-
void
-as_release_set_timestamp (AsRelease *release,
-                          guint64 timestamp);
-

Sets the release timestamp.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance.

 

timestamp

the timestamp value.

 
-
-
-
-
-

as_release_get_description ()

-
const gchar *
-as_release_get_description (AsRelease *release);
-

Gets the release description markup for a given locale.

-
-

Parameters

-
----- - - - - - -

release

a AsRelease instance.

 
-
-
-

Returns

-

markup, or NULL for not set or invalid

-
-
-
-
-

as_release_set_description ()

-
void
-as_release_set_description (AsRelease *release,
-                            const gchar *description,
-                            const gchar *locale);
-

Sets the description release markup.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance.

 

description

the description markup.

 
-
-
-
-
-

as_release_get_active_locale ()

-
gchar *
-as_release_get_active_locale (AsRelease *release);
-

Get the current active locale, which -is used to get localized messages.

-
-
-
-

as_release_set_active_locale ()

-
void
-as_release_set_active_locale (AsRelease *release,
-                              const gchar *locale);
-

Set the current active locale, which -is used to get localized messages. -If the AsComponent linking this AsRelease was fetched -from a localized database, usually only -one locale is available.

-
-
-
-

as_release_get_locations ()

-
GPtrArray *
-as_release_get_locations (AsRelease *release);
-

Gets the release locations, typically URLs.

-
-

Returns

-

list of locations.

-

[transfer none][element-type utf8]

-
-

Since: 0.8.1

-
-
-
-

as_release_add_location ()

-
void
-as_release_add_location (AsRelease *release,
-                         const gchar *location);
-

Adds a release location.

-
-

Parameters

-
----- - - - - - -

location

An URL of the download location

 
-
-

Since: 0.8.1

-
-
-
-

as_release_get_checksum ()

-
const gchar *
-as_release_get_checksum (AsRelease *release,
-                         AsChecksumKind kind);
-

Gets the release checksum

-
-

Returns

-

string, or NULL for not set or invalid

-
-

Since: 0.8.2

-
-
-
-

as_release_set_checksum ()

-
void
-as_release_set_checksum (AsRelease *release,
-                         const gchar *checksum,
-                         AsChecksumKind kind);
-

Set the release checksum.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

release

An instance of AsRelease.

 

checksum

The checksum as string.

 

kind

The kind of this checksum, e.g. AS_CHECKSUM_KIND_SHA256

 
-
-

Since: 0.8.2

-
-
-
-

as_release_get_urgency ()

-
AsUrgencyKind
-as_release_get_urgency (AsRelease *release);
-

Gets the urgency of the release -(showing how important it is to update to a more recent release)

-
-

Parameters

-
----- - - - - - -

release

a AsRelease instance.

 
-
-
-

Returns

-

AsUrgencyKind, or AS_URGENCY_KIND_UNKNOWN for not set

-
-

Since: 0.6.5

-
-
-
-

as_release_set_urgency ()

-
void
-as_release_set_urgency (AsRelease *release,
-                        AsUrgencyKind urgency);
-

Sets the release urgency.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance.

 

urgency

the urgency of this release/update (as AsUrgencyKind)

 
-
-

Since: 0.6.5

-
-
-
-

as_release_get_size ()

-
guint64
-as_release_get_size (AsRelease *release,
-                     AsSizeKind kind);
-

Gets the release size.

-
-

Parameters

-
----- - - - - - - - - - - - - -

release

a AsRelease instance

 

kind

a AsSizeKind

 
-
-
-

Returns

-

The size of the given kind of this release.

-
-

Since: 0.8.6

-
-
-
-

as_release_set_size ()

-
void
-as_release_set_size (AsRelease *release,
-                     guint64 size,
-                     AsSizeKind kind);
-

Sets the release size for the given kind.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

release

a AsRelease instance

 

size

a size in bytes, or 0 for unknown

 

kind

a AsSizeKind

 
-
-

Since: 0.8.6

-
-
-
-

Types and Values

-
-

AS_TYPE_RELEASE

-
#define AS_TYPE_RELEASE (as_release_get_type ())
-
-

-

-
-
-
-

struct AsReleaseClass

-
struct AsReleaseClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsChecksumKind

-

Checksums supported by AsRelease

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_CHECKSUM_KIND_NONE

-

No checksum

-
 

AS_CHECKSUM_KIND_SHA1

-

SHA1

-
 

AS_CHECKSUM_KIND_SHA256

-

SHA256

-
 
-
-
-
-
-

enum AsSizeKind

-

The release size kind.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_SIZE_KIND_UNKNOWN

-

Unknown size

-
 

AS_SIZE_KIND_DOWNLOAD

-

Size of download of component

-
 

AS_SIZE_KIND_INSTALLED

-

Size of installed component

-
 
-
-

Since: 0.8.6

-
-
-
-

AsRelease

-
typedef struct _AsRelease AsRelease;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsScreenshot.html appstream-0.12.0/docs/html/api/html/AsScreenshot.html --- appstream-0.9.4/docs/html/api/html/AsScreenshot.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsScreenshot.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,533 +0,0 @@ - - - - -AsScreenshot: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsScreenshot

-

AsScreenshot — Object representing a single screenshot

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsScreenshotKind - -as_screenshot_kind_from_string () -
const gchar * - -as_screenshot_kind_to_string () -
-gboolean - -as_screenshot_is_valid () -
-AsScreenshot * - -as_screenshot_new () -
-AsScreenshotKind - -as_screenshot_get_kind () -
-void - -as_screenshot_set_kind () -
const gchar * - -as_screenshot_get_caption () -
-void - -as_screenshot_set_caption () -
-GPtrArray * - -as_screenshot_get_images () -
-void - -as_screenshot_add_image () -
-gchar * - -as_screenshot_get_active_locale () -
-void - -as_screenshot_set_active_locale () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_SCREENSHOT
structAsScreenshotClass
enumAsScreenshotKind
 AsScreenshot
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsScreenshot
-
-
-
-

Description

-

Screenshots have a localized caption and also contain a number of images -of different resolution.

-

See also: AsImage

-
-
-

Functions

-
-

as_screenshot_kind_from_string ()

-
AsScreenshotKind
-as_screenshot_kind_from_string (const gchar *kind);
-

Converts the text representation to an enumerated value.

-
-

Parameters

-
----- - - - - - -

kind

the string.

 
-
-
-

Returns

-

a AsScreenshotKind, or -AS_SCREENSHOT_KIND_UNKNOWN if not known.

-

[transfer full]

-
-
-
-
-

as_screenshot_kind_to_string ()

-
const gchar *
-as_screenshot_kind_to_string (AsScreenshotKind kind);
-

Converts the enumerated value to an text representation.

-
-

Parameters

-
----- - - - - - -

kind

the AsScreenshotKind.

 
-
-
-

Returns

-

string version of kind -

-
-
-
-
-

as_screenshot_is_valid ()

-
gboolean
-as_screenshot_is_valid (AsScreenshot *screenshot);
-

Performs a quick validation on this screenshot

-
-

Parameters

-
----- - - - - - -

screenshot

a AsScreenshot instance.

 
-
-
-

Returns

-

TRUE if the screenshot is a complete AsScreenshot

-
-
-
-
-

as_screenshot_new ()

-
AsScreenshot *
-as_screenshot_new (void);
-

Creates a new AsScreenshot.

-
-

Returns

-

a AsScreenshot.

-

[transfer full]

-
-
-
-
-

as_screenshot_get_kind ()

-
AsScreenshotKind
-as_screenshot_get_kind (AsScreenshot *screenshot);
-

Gets the screenshot kind.

-
-

Parameters

-
----- - - - - - -

screenshot

a AsScreenshot instance.

 
-
-
-

Returns

-

a AsScreenshotKind

-
-
-
-
-

as_screenshot_set_kind ()

-
void
-as_screenshot_set_kind (AsScreenshot *screenshot,
-                        AsScreenshotKind kind);
-

Sets the screenshot kind.

-
-

Parameters

-
----- - - - - - - - - - - - - -

screenshot

a AsScreenshot instance.

 

kind

the AsScreenshotKind.

 
-
-
-
-
-

as_screenshot_get_caption ()

-
const gchar *
-as_screenshot_get_caption (AsScreenshot *screenshot);
-

Gets the image caption

-
-

Parameters

-
----- - - - - - -

screenshot

a AsScreenshot instance.

 
-
-
-

Returns

-

the caption

-
-
-
-
-

as_screenshot_set_caption ()

-
void
-as_screenshot_set_caption (AsScreenshot *screenshot,
-                           const gchar *caption,
-                           const gchar *locale);
-

Sets a caption on the screenshot

-
-

Parameters

-
----- - - - - - - - - - - - - -

screenshot

a AsScreenshot instance.

 

caption

the caption text.

 
-
-
-
-
-

as_screenshot_get_images ()

-
GPtrArray *
-as_screenshot_get_images (AsScreenshot *screenshot);
-

Gets the image sizes included in the screenshot.

-
-

Parameters

-
----- - - - - - -

screenshot

a AsScreenshot instance.

 
-
-
-

Returns

-

an array.

-

[element-type AsImage][transfer none]

-
-
-
-
-

as_screenshot_add_image ()

-
void
-as_screenshot_add_image (AsScreenshot *screenshot,
-                         AsImage *image);
-

Adds an image to the screenshot.

-
-

Parameters

-
----- - - - - - - - - - - - - -

screenshot

a AsScreenshot instance.

 

image

a AsImage instance.

 
-
-
-
-
-

as_screenshot_get_active_locale ()

-
gchar *
-as_screenshot_get_active_locale (AsScreenshot *screenshot);
-

Get the current active locale, which -is used to get localized messages.

-
-
-
-

as_screenshot_set_active_locale ()

-
void
-as_screenshot_set_active_locale (AsScreenshot *screenshot,
-                                 const gchar *locale);
-

Set the current active locale, which -is used to get localized messages. -If the AsComponent linking this AsScreenshot was fetched -from a localized database, usually only -one locale is available.

-
-
-
-

Types and Values

-
-

AS_TYPE_SCREENSHOT

-
#define AS_TYPE_SCREENSHOT (as_screenshot_get_type ())
-
-

-

-
-
-
-

struct AsScreenshotClass

-
struct AsScreenshotClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsScreenshotKind

-

The screenshot type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

AS_SCREENSHOT_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_SCREENSHOT_KIND_DEFAULT

-

The primary screenshot to show by default

-
 

AS_SCREENSHOT_KIND_EXTRA

-

Optional screenshot

-
 
-
-
-
-
-

AsScreenshot

-
typedef struct _AsScreenshot AsScreenshot;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsSearchQuery.html appstream-0.12.0/docs/html/api/html/AsSearchQuery.html --- appstream-0.9.4/docs/html/api/html/AsSearchQuery.html 2015-12-09 17:48:16.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsSearchQuery.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,405 +0,0 @@ - - - - -AsSearchQuery: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsSearchQuery

-

AsSearchQuery — An Appstream database search query

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsSearchQuery * - -as_search_query_new () -
-AsSearchQuery * - -as_search_query_construct () -
-void - -as_search_query_set_search_term () -
-gboolean - -as_search_query_get_search_all_categories () -
-gchar ** - -as_search_query_get_categories () -
-void - -as_search_query_set_search_all_categories () -
-void - -as_search_query_set_categories () -
-void - -as_search_query_set_categories_from_string () -
-void - -as_search_query_sanitize_search_term () -
const gchar * - -as_search_query_get_search_term () -
-
-
-

Properties

-
----- - - - - - - - - - - - - -
GStrvcategoriesRead / Write
-gchar *search-termRead / Write
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsSearchQuery
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object defines a search run in the Appstream components database. -It contains a string to search for, as well as information which -categories should be searched. -It also applies some sanity checks and improvements to the entered search string.

-

See also: AsDatabase

-
-
-

Functions

-
-

as_search_query_new ()

-
AsSearchQuery *
-as_search_query_new (const gchar *term);
-

Creates a new AsSearchQuery.

-
-

Parameters

-
----- - - - - - -

term

the string to search for

 
-
-
-

Returns

-

a new AsSearchQuery.

-

[transfer full]

-
-
-
-
-

as_search_query_construct ()

-
AsSearchQuery *
-as_search_query_construct (GType object_type,
-                           const gchar *term);
-

Construct a new AsSearchQuery.

-
-

Returns

-

a new AsSearchQuery.

-

[transfer full]

-
-
-
-
-

as_search_query_set_search_term ()

-
void
-as_search_query_set_search_term (AsSearchQuery *self,
-                                 const gchar *value);
-

Set the search-term we use for the search. Multiple terms may be -comma-separated. -You can use Xapian prefixes, such as "XP" to refine your search.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

an instance of AsSearchQuery

 

value

the string to search for

 
-
-
-
-
-

as_search_query_get_search_all_categories ()

-
gboolean
-as_search_query_get_search_all_categories
-                               (AsSearchQuery *self);
-
-

Returns

-

TRUE if we search in all categories

-
-
-
-
-

as_search_query_get_categories ()

-
gchar **
-as_search_query_get_categories (AsSearchQuery *self);
-
-

Returns

-

String array of categories.

-

[transfer full]

-
-
-
-
-

as_search_query_set_search_all_categories ()

-
void
-as_search_query_set_search_all_categories
-                               (AsSearchQuery *self);
-

Shortcut to set that we should search in all categories

-
-

Parameters

-
----- - - - - - -

self

A valid AsSearchQuery

 
-
-
-
-
-

as_search_query_set_categories ()

-
void
-as_search_query_set_categories (AsSearchQuery *self,
-                                gchar **value);
-

Set the categories to search

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

an instance of AsSearchQuery

 

value

a null-terminated string array of categories.

[array zero-terminated=1]
-
-
-
-
-

as_search_query_set_categories_from_string ()

-
void
-as_search_query_set_categories_from_string
-                               (AsSearchQuery *self,
-                                const gchar *categories_str);
-

Set the categories list from a string

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

an instance of AsSearchQuery

 

categories_str

Semicolon-separated list of category-names

 
-
-
-
-
-

as_search_query_sanitize_search_term ()

-
void
-as_search_query_sanitize_search_term (AsSearchQuery *self);
-

-

-
-
-
-

as_search_query_get_search_term ()

-
const gchar *
-as_search_query_get_search_term (AsSearchQuery *self);
-
-

Parameters

-
----- - - - - - -

self

an instance of AsSearchQuery

 
-
-
-

Returns

-

the search-term we currently use

-
-
-
-
-

Types and Values

-
-
-

Property Details

-
-

The “categories” property

-
  “categories”               GStrv
-

categories.

-

Flags: Read / Write

-
-
-
-

The “search-term” property

-
  “search-term”              gchar *
-

search-term.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsValidator.html appstream-0.12.0/docs/html/api/html/AsValidator.html --- appstream-0.9.4/docs/html/api/html/AsValidator.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsValidator.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,318 +0,0 @@ - - - - -AsValidator: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsValidator

-

AsValidator — Validator and report-generator about AppStream XML metadata

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsValidator * - -as_validator_new () -
-void - -as_validator_clear_issues () -
-gboolean - -as_validator_validate_file () -
-gboolean - -as_validator_validate_data () -
-gboolean - -as_validator_validate_tree () -
-GList * - -as_validator_get_issues () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineAS_TYPE_VALIDATOR
structAsValidatorClass
 AsValidator
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsValidator
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

This object is able to validate AppStream XML metadata (distro and upstream) -and to generate a report about issues found with it.

-

See also: AsMetadata

-
-
-

Functions

-
-

as_validator_new ()

-
AsValidator *
-as_validator_new (void);
-

Creates a new AsValidator.

-
-

Returns

-

an AsValidator.

-

[transfer full]

-
-
-
-
-

as_validator_clear_issues ()

-
void
-as_validator_clear_issues (AsValidator *validator);
-

Clears the list of issues

-
-

Parameters

-
----- - - - - - -

validator

An instance of AsValidator.

 
-
-
-
-
-

as_validator_validate_file ()

-
gboolean
-as_validator_validate_file (AsValidator *validator,
-                            GFile *metadata_file);
-

Validate an AppStream XML file

-
-

Parameters

-
----- - - - - - - - - - - - - -

validator

An instance of AsValidator.

 

metadata_file

An AppStream XML file.

 
-
-
-
-
-

as_validator_validate_data ()

-
gboolean
-as_validator_validate_data (AsValidator *validator,
-                            const gchar *metadata);
-

Validate AppStream XML data

-
-

Parameters

-
----- - - - - - - - - - - - - -

validator

An instance of AsValidator.

 

metadata

XML metadata.

 
-
-
-
-
-

as_validator_validate_tree ()

-
gboolean
-as_validator_validate_tree (AsValidator *validator,
-                            const gchar *root_dir);
-

Validate a full directory tree for issues in AppStream metadata.

-
-

Parameters

-
----- - - - - - - - - - - - - -

validator

An instance of AsValidator.

 

root_dir

The root directory of the filesystem tree that should be validated.

 
-
-
-
-
-

as_validator_get_issues ()

-
GList *
-as_validator_get_issues (AsValidator *validator);
-

Get a list of found metadata format issues.

-
-

Parameters

-
----- - - - - - -

validator

An instance of AsValidator.

 
-
-
-

Returns

-

a list of AsValidatorIssue instances, free with g_list_free().

-

[element-type AsValidatorIssue][transfer container]

-
-
-
-
-

Types and Values

-
-

AS_TYPE_VALIDATOR

-
#define AS_TYPE_VALIDATOR (as_validator_get_type ())
-
-

-

-
-
-
-

struct AsValidatorClass

-
struct AsValidatorClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

AsValidator

-
typedef struct _AsValidator AsValidator;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/AsValidatorIssue.html appstream-0.12.0/docs/html/api/html/AsValidatorIssue.html --- appstream-0.9.4/docs/html/api/html/AsValidatorIssue.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/AsValidatorIssue.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,603 +0,0 @@ - - - - -AsValidatorIssue: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

AsValidatorIssue

-

AsValidatorIssue — Object representing an issue found in AppStream metadata

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-AsValidatorIssue * - -as_validator_issue_new () -
-AsIssueKind - -as_validator_issue_get_kind () -
-void - -as_validator_issue_set_kind () -
-AsIssueImportance - -as_validator_issue_get_importance () -
-void - -as_validator_issue_set_importance () -
const gchar * - -as_validator_issue_get_message () -
-void - -as_validator_issue_set_message () -
const gchar * - -as_validator_issue_get_location () -
-void - -as_validator_issue_set_location () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
#defineAS_TYPE_VALIDATOR_ISSUE
structAsValidatorIssueClass
enumAsIssueImportance
enumAsIssueKind
 AsValidatorIssue
-
-
-

Object Hierarchy

-
    GObject
-    ╰── AsValidatorIssue
-
-
-
-

Includes

-
#include <appstream.h>
-
-
-
-

Description

-

See also: AsValidator

-
-
-

Functions

-
-

as_validator_issue_new ()

-
AsValidatorIssue *
-as_validator_issue_new (void);
-

Creates a new AsValidatorIssue.

-
-

Returns

-

a AsValidatorIssue.

-

[transfer full]

-
-
-
-
-

as_validator_issue_get_kind ()

-
AsIssueKind
-as_validator_issue_get_kind (AsValidatorIssue *issue);
-

Gets the issue kind enum, if available.

-
-

Parameters

-
----- - - - - - -

issue

a AsValidatorIssue instance.

 
-
-
-

Returns

-

a AsIssueKind

-
-
-
-
-

as_validator_issue_set_kind ()

-
void
-as_validator_issue_set_kind (AsValidatorIssue *issue,
-                             AsIssueKind kind);
-

Sets the kind enum for this issue, if known.

-
-

Parameters

-
----- - - - - - - - - - - - - -

issue

a AsValidatorIssue instance.

 

kind

the AsIssueKind.

 
-
-
-
-
-

as_validator_issue_get_importance ()

-
AsIssueImportance
-as_validator_issue_get_importance (AsValidatorIssue *issue);
-

Gets the importance of this issue.

-
-

Parameters

-
----- - - - - - -

issue

a AsValidatorIssue instance.

 
-
-
-

Returns

-

a AsIssueImportance

-
-
-
-
-

as_validator_issue_set_importance ()

-
void
-as_validator_issue_set_importance (AsValidatorIssue *issue,
-                                   AsIssueImportance importance);
-

Sets the importance for this issue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

issue

a AsValidatorIssue instance.

 

importance

the AsIssueImportance.

 
-
-
-
-
-

as_validator_issue_get_message ()

-
const gchar *
-as_validator_issue_get_message (AsValidatorIssue *issue);
-

Gets the message for the issue.

-
-

Parameters

-
----- - - - - - -

issue

a AsValidatorIssue instance.

 
-
-
-

Returns

-

the message

-
-
-
-
-

as_validator_issue_set_message ()

-
void
-as_validator_issue_set_message (AsValidatorIssue *issue,
-                                const gchar *message);
-

Sets a message on the issue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

issue

a AsValidatorIssue instance.

 

message

the message text.

 
-
-
-
-
-

as_validator_issue_get_location ()

-
const gchar *
-as_validator_issue_get_location (AsValidatorIssue *issue);
-

Gets a location hint for the issue.

-
-

Parameters

-
----- - - - - - -

issue

a AsValidatorIssue instance.

 
-
-
-

Returns

-

the location hint

-
-
-
-
-

as_validator_issue_set_location ()

-
void
-as_validator_issue_set_location (AsValidatorIssue *issue,
-                                 const gchar *location);
-

Sets a location hint for this issue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

issue

a AsValidatorIssue instance.

 

location

a location hint.

 
-
-
-
-
-

Types and Values

-
-

AS_TYPE_VALIDATOR_ISSUE

-
#define AS_TYPE_VALIDATOR_ISSUE (as_validator_issue_get_type ())
-
-

-

-
-
-
-

struct AsValidatorIssueClass

-
struct AsValidatorIssueClass {
-	GObjectClass		parent_class;
-};
-
-

-

-
-
-
-

enum AsIssueImportance

-

The importance of an issue found by AsValidator

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_ISSUE_IMPORTANCE_UNKNOWN

  

AS_ISSUE_IMPORTANCE_ERROR

-

There is a serious error in your metadata

-
 

AS_ISSUE_IMPORTANCE_WARNING

-

Something which should be fixed, but is not fatal

-
 

AS_ISSUE_IMPORTANCE_INFO

-

Non-essential information on how to improve your metadata

-
 

AS_ISSUE_IMPORTANCE_PEDANTIC

-

Pedantic information

-
 
-
-
-
-
-

enum AsIssueKind

-

The issue type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

AS_ISSUE_KIND_UNKNOWN

-

Type invalid or not known

-
 

AS_ISSUE_KIND_MARKUP_INVALID

-

The XML markup is invalid

-
 

AS_ISSUE_KIND_LEGACY

-

An element from a legacy AppStream specification has been found

-
 

AS_ISSUE_KIND_TAG_DUPLICATED

-

A tag is duplicated

-
 

AS_ISSUE_KIND_TAG_MISSING

-

A required tag is missing

-
 

AS_ISSUE_KIND_TAG_UNKNOWN

-

An unknown tag was found

-
 

AS_ISSUE_KIND_TAG_NOT_ALLOWED

-

A tag is not allowed in the current context

-
 

AS_ISSUE_KIND_PROPERTY_MISSING

-

A required property is missing

-
 

AS_ISSUE_KIND_PROPERTY_INVALID

-

A property is invalid

-
 

AS_ISSUE_KIND_VALUE_MISSING

-

A value is missing

-
 

AS_ISSUE_KIND_VALUE_WRONG

-

The value of a tag or property is wrong

-
 

AS_ISSUE_KIND_VALUE_ISSUE

-

There is an issue with a tag or property value (often non-fatal)

-
 

AS_ISSUE_KIND_FILE_MISSING

-

A required file or other metadata was missing

-
 

AS_ISSUE_KIND_WRONG_NAME

-

The naming of an entity is wrong

-
 

AS_ISSUE_KIND_READ_ERROR

-

Reading of data failed

-
 
-
-
-
-
-

AsValidatorIssue

-
typedef struct _AsValidatorIssue AsValidatorIssue;
-

-

-
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/ch01.html appstream-0.12.0/docs/html/api/html/ch01.html --- appstream-0.9.4/docs/html/api/html/ch01.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/ch01.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ - - - - -AppStream API Reference: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-AppStream API Reference

-
-
-AsComponent — Object representing a software component -
-
-as-enums — Some enums used by various other modules -
-
-AsRelease — Object representing a single upstream release -
-
-AsIcon — Describes an icon of an application. -
-
-AsProvided — Description of the provided-items in components -
-
-AsScreenshot — Object representing a single screenshot -
-
-AsImage — Object representing a single image used in a screenshot. -
-
-AsDatabase — Read-only access to the AppStream component database -
-
-AsMetadata — Parser for AppStream metadata -
-
-AsDataPool — Collect and temporarily store metadata from different sources -
-
-AsDistroDetails — Provides information about the current distribution -
-
-AsMenuParser — Parser for XDG menu files designed for software-centers -
-
-AsCategory — Representation of a XDG category -
-
-AsValidator — Validator and report-generator about AppStream XML metadata -
-
-AsValidatorIssue — Object representing an issue found in AppStream metadata -
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/deprecated-api-index.html appstream-0.12.0/docs/html/api/html/deprecated-api-index.html --- appstream-0.9.4/docs/html/api/html/deprecated-api-index.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/deprecated-api-index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - -Index of deprecated API: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-Index of deprecated API

- -
- - - \ No newline at end of file Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/api/html/home.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/api/html/home.png differ diff -Nru appstream-0.9.4/docs/html/api/html/index.html appstream-0.12.0/docs/html/api/html/index.html --- appstream-0.9.4/docs/html/api/html/index.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - -AppStream Library Reference Manual: AppStream Library Reference Manual - - - - - - - -
-
-
-
-

- The latest version of this documentation can be found on-line at - freedesktop.org/software/appstream/docs/api/html. -

-
-
-
-
-
AppStream API Reference
-
-
-AsComponent — Object representing a software component -
-
-as-enums — Some enums used by various other modules -
-
-AsRelease — Object representing a single upstream release -
-
-AsIcon — Describes an icon of an application. -
-
-AsProvided — Description of the provided-items in components -
-
-AsScreenshot — Object representing a single screenshot -
-
-AsImage — Object representing a single image used in a screenshot. -
-
-AsDatabase — Read-only access to the AppStream component database -
-
-AsMetadata — Parser for AppStream metadata -
-
-AsDataPool — Collect and temporarily store metadata from different sources -
-
-AsDistroDetails — Provides information about the current distribution -
-
-AsMenuParser — Parser for XDG menu files designed for software-centers -
-
-AsCategory — Representation of a XDG category -
-
-AsValidator — Validator and report-generator about AppStream XML metadata -
-
-AsValidatorIssue — Object representing an issue found in AppStream metadata -
-
-
Object Hierarchy
-
API Index
-
Index of deprecated API
-
Annotation Glossary
-
AppStream Manual Pages
-
-appstreamcli — Handle AppStream metadata and the AppStream index -
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/index.sgml appstream-0.12.0/docs/html/api/html/index.sgml --- appstream-0.9.4/docs/html/api/html/index.sgml 2016-04-12 14:35:00.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/index.sgml 1970-01-01 00:00:00.000000000 +0000 @@ -1,526 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/api/html/left-insensitive.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/api/html/left-insensitive.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/api/html/left.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/api/html/left.png differ diff -Nru appstream-0.9.4/docs/html/api/html/manpages.html appstream-0.12.0/docs/html/api/html/manpages.html --- appstream-0.9.4/docs/html/api/html/manpages.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/manpages.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - -AppStream Manual Pages: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-AppStream Manual Pages

-
-appstreamcli — Handle AppStream metadata and the AppStream index -
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/object-tree.html appstream-0.12.0/docs/html/api/html/object-tree.html --- appstream-0.9.4/docs/html/api/html/object-tree.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/object-tree.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ - - - - -Object Hierarchy: AppStream Library Reference Manual - - - - - - - - - - - - - - - - -
-

-Object Hierarchy

-
-    GObject
-    ├── AsCacheBuilder
-    ├── AsCategory
-    ├── AsComponent
-    ├── AsDataPool
-    ├── AsDatabase
-    ├── AsDistroDetails
-    ├── AsIcon
-    ├── AsImage
-    ├── AsMenuParser
-    ├── AsMetadata
-    ├── AsProvided
-    ├── AsRelease
-    ├── AsScreenshot
-    ├── AsTranslation
-    ├── AsValidator
-    ├── AsValidatorIssue
-    ├── AsXMLData
-    ╰── AsYAMLData
-    GEnum
-    ╰── AsComponentKind
-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/re16.html appstream-0.12.0/docs/html/api/html/re16.html --- appstream-0.9.4/docs/html/api/html/re16.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/re16.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,191 +0,0 @@ - - - - -appstreamcli: AppStream Library Reference Manual - - - - - - - - - - - - - - - -
-
-
- - -
-

appstreamcli

-

appstreamcli — Handle AppStream metadata and the AppStream index

-
-
-

Synopsis

-

appstreamcli [COMMAND]

-
-
-

Description

-

- This manual page documents briefly the appstreamcli command. -

-

- appstreamcli is a small helper tool to work with AppStream metadata and - access the AppStream component index from the command-line. The AppStream component - index contains a list of all available software components for your distribution, matched to their - package names. - It is generated using AppStream XML or Debian DEP-11 data, which is provided by your distributor. -

-

- For more information about the AppStream project and the other components which are part of it, take a look at - the AppStream pages at Freedesktop.org. -

-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

status

- Display various information about the installed metadata and - the metadata cache. -

get ID

Get a component by it's identifier.

s, search TERM

Search the AppStream component database for a given search term.

what-provides TYPE TERM

-

- Return components which provide a given item. An item type can be specified using the - TYPE parameter, a value to search for has to be - supplied using the TERM parameter. -

-

Examples:

-

- Get components which handle the "text/xml" mimetype. -

-

- appstreamcli what-provides mimetype "text/xml" -

-

- Get component which provides the "libfoo.so.2" library. -

-

- appstreamcli what-provides lib libfoo.so.2 -

-

refresh, refresh-index

-

- Trigger a database refresh, if necessary. - In case you want to force the database to be rebuilt, supply the --force flag. -

-

This command must be executed with root permission.

-

dump ID

- Dump the XML description of a component with the given ID. -

validate FILES

-

- Validate AppStream XML metadata for compliance with the specification. -

-

- Both XML metadata types, upstream and distro XML, are handled. - The filetype which should be validated is determined automatically. -

-

- The --pedantic flag triggers a more pedantic - validation of the file, including minor and style issues in the report. -

-

validate-tree DIRECTORY

-

- Validate AppStream XML metadata found in a file-tree. -

-

- This performs a standard validation of all found metadata, but also checks for additional - errors, like the presence of .desktop files and validity of other additional metadata. -

-

install ID

-

- Install a software component by its ID. -

-

- This resolves the AppStream component ID to the package name which provides it and - then calls the distribution's package manager to install the software. -

-

- This feature is experimental. -

-

put FILE

- Install a metadata file into the right directory on the current machine. -

--details

Print out more information about a found component.

--no-color

Don't print colored output.

--version

Display the version number of appstreamcli

-
-
-

See Also

-

pkcon (1).

-
-
-

AUTHOR

-

- This manual page was written by Matthias Klumpp . -

-
-
- - - \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/api/html/re17.html appstream-0.12.0/docs/html/api/html/re17.html --- appstream-0.9.4/docs/html/api/html/re17.html 2015-12-09 17:48:16.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/re17.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,163 +0,0 @@ - - - - -appstreamcli: AppStream Library Reference Manual - - - - - - - - - - - - - - - -
-
-
- - -
-

appstreamcli

-

appstreamcli — Handle AppStream metadata and the AppStream index

-
-
-

Synopsis

-

appstreamcli [COMMAND]

-
-
-

Description

-

- This manual page documents briefly the appstreamcli command. -

-

- appstreamcli is a small helper tool to work with AppStream metadata and - access the AppStream component index from the command-line. The AppStream component - index contains a list of all available software components for your distribution, matched to their - package names. - It is generated using AppStream XML or Debian DEP-11 data, which is provided by your distributor. -

-

- For more information about the AppStream project and the other components which are part of it, take a look at - the AppStream pages at Freedesktop.org. -

-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

get ID

Get a component by it's identifier.

s, search TERM

Search the AppStream component database for a given search term.

what-provides TYPE TERM

-

- Return components which provide a given item. An item type can be specified using the - TYPE parameter, a value to search for has to be - supplied using the TERM parameter. -

-

Examples:

-

- Get components which handle the "text/xml" mimetype. -

-

- appstreamcli what-provides mimetype "text/xml" -

-

- Get component which provides the "libfoo.so.2" library. -

-

- appstreamcli what-provides lib libfoo.so.2 -

-

refresh, refresh-index

-

- Trigger a database refresh, if necessary. - In case you want to force the database to be rebuilt, supply the --force flag. -

-

This command must be executed with root permission.

-

dump ID

- Dump the XML description of a component with the given ID. -

validate FILES

-

- Validate AppStream XML metadata for compliance with the specification. -

-

- Both XML metadata types, upstream and distro XML, are handled. - The filetype which should be validated is determined automatically. -

-

- The --pedantic flag triggers a more pedantic - validation of the file, including minor and style issues in the report. -

-

validate-tree DIRECTORY

-

- Validate AppStream XML metadata found in a file-tree. -

-

- This performs a standard validation of all found metadata, but also checks for additional - errors, like the presence of .desktop files and validity of other additional metadata. -

-

--details

Print out more information about a found component.

--no-color

Don't print colored output.

--version

Display the version number of appstreamcli

-
-
-

See Also

-

pkcon (1).

-
-
-

AUTHOR

-

- This manual page was written by Matthias Klumpp . -

-
-
- - - \ No newline at end of file Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/api/html/right-insensitive.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/api/html/right-insensitive.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/api/html/right.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/api/html/right.png differ diff -Nru appstream-0.9.4/docs/html/api/html/style.css appstream-0.12.0/docs/html/api/html/style.css --- appstream-0.9.4/docs/html/api/html/style.css 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/api/html/style.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,479 +0,0 @@ -body -{ - font-family: cantarell, sans-serif; -} -.synopsis, .classsynopsis -{ - /* tango:aluminium 1/2 */ - background: #eeeeec; - background: rgba(238, 238, 236, 0.5); - border: solid 1px rgb(238, 238, 236); - padding: 0.5em; -} -.programlisting -{ - /* tango:sky blue 0/1 */ - /* fallback for no rgba support */ - background: #e6f3ff; - border: solid 1px #729fcf; - background: rgba(114, 159, 207, 0.1); - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0.5em; -} -.variablelist -{ - padding: 4px; - margin-left: 3em; -} -.variablelist td:first-child -{ - vertical-align: top; -} - -div.gallery-float -{ - float: left; - padding: 10px; -} -div.gallery-float img -{ - border-style: none; -} -div.gallery-spacer -{ - clear: both; -} - -a, a:visited -{ - text-decoration: none; - /* tango:sky blue 2 */ - color: #3465a4; -} -a:hover -{ - text-decoration: underline; - /* tango:sky blue 1 */ - color: #729fcf; -} - -div.informaltable table -{ - border-collapse: separate; - border-spacing: 1em 0.3em; - border: none; -} - -div.informaltable table td, div.informaltable table th -{ - vertical-align: top; -} - -.function_type, -.variable_type, -.property_type, -.signal_type, -.parameter_name, -.struct_member_name, -.union_member_name, -.define_keyword, -.datatype_keyword, -.typedef_keyword -{ - text-align: right; -} - -/* dim non-primary columns */ -.c_punctuation, -.function_type, -.variable_type, -.property_type, -.signal_type, -.define_keyword, -.datatype_keyword, -.typedef_keyword, -.property_flags, -.signal_flags, -.parameter_annotations, -.enum_member_annotations, -.struct_member_annotations, -.union_member_annotations -{ - color: #888a85; -} - -.function_type a, -.function_type a:visited, -.function_type a:hover, -.property_type a, -.property_type a:visited, -.property_type a:hover, -.signal_type a, -.signal_type a:visited, -.signal_type a:hover, -.signal_flags a, -.signal_flags a:visited, -.signal_flags a:hover -{ - color: #729fcf; -} - -td p -{ - margin: 0.25em; -} - -div.table table -{ - border-collapse: collapse; - border-spacing: 0px; - /* tango:aluminium 3 */ - border: solid 1px #babdb6; -} - -div.table table td, div.table table th -{ - /* tango:aluminium 3 */ - border: solid 1px #babdb6; - padding: 3px; - vertical-align: top; -} - -div.table table th -{ - /* tango:aluminium 2 */ - background-color: #d3d7cf; -} - -h4 -{ - color: #555753; - margin-top: 1em; - margin-bottom: 1em; -} - -hr -{ - /* tango:aluminium 1 */ - color: #d3d7cf; - background: #d3d7cf; - border: none 0px; - height: 1px; - clear: both; - margin: 2.0em 0em 2.0em 0em; -} - -dl.toc dt -{ - padding-bottom: 0.25em; -} - -dl.toc > dt -{ - padding-top: 0.25em; - padding-bottom: 0.25em; - font-weight: bold; -} - -dl.toc > dl -{ - padding-bottom: 0.5em; -} - -.parameter -{ - font-style: normal; -} - -.footer -{ - padding-top: 3.5em; - /* tango:aluminium 3 */ - color: #babdb6; - text-align: center; - font-size: 80%; -} - -.informalfigure, -.figure -{ - margin: 1em; -} - -.informalexample, -.example -{ - margin-top: 1em; - margin-bottom: 1em; -} - -.warning -{ - /* tango:orange 0/1 */ - background: #ffeed9; - background: rgba(252, 175, 62, 0.1); - border-color: #ffb04f; - border-color: rgba(252, 175, 62, 0.2); -} -.note -{ - /* tango:chameleon 0/0.5 */ - background: #d8ffb2; - background: rgba(138, 226, 52, 0.1); - border-color: #abf562; - border-color: rgba(138, 226, 52, 0.2); -} -div.blockquote -{ - border-color: #eeeeec; -} -.note, .warning, div.blockquote -{ - padding: 0.5em; - border-width: 1px; - border-style: solid; - margin: 2em; -} -.note p, .warning p -{ - margin: 0; -} - -div.warning h3.title, -div.note h3.title -{ - display: none; -} - -p + div.section -{ - margin-top: 1em; -} - -div.refnamediv, -div.refsynopsisdiv, -div.refsect1, -div.refsect2, -div.toc, -div.section -{ - margin-bottom: 1em; -} - -/* blob links */ -h2 .extralinks, h3 .extralinks -{ - float: right; - /* tango:aluminium 3 */ - color: #babdb6; - font-size: 80%; - font-weight: normal; -} - -.lineart -{ - color: #d3d7cf; - font-weight: normal; -} - -.annotation -{ - /* tango:aluminium 5 */ - color: #555753; - font-weight: normal; -} - -.structfield -{ - font-style: normal; - font-weight: normal; -} - -acronym,abbr -{ - border-bottom: 1px dotted gray; -} - -/* code listings */ - -.listing_code .programlisting .normal, -.listing_code .programlisting .normal a, -.listing_code .programlisting .number, -.listing_code .programlisting .cbracket, -.listing_code .programlisting .symbol { color: #555753; } -.listing_code .programlisting .comment, -.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ -.listing_code .programlisting .function, -.listing_code .programlisting .function a, -.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ -.listing_code .programlisting .string { color: #ad7fa8; } /* tango: plum */ -.listing_code .programlisting .keyword, -.listing_code .programlisting .usertype, -.listing_code .programlisting .type, -.listing_code .programlisting .type a { color: #4e9a06; } /* tango: chameleon 3 */ - -.listing_frame { - /* tango:sky blue 1 */ - border: solid 1px #729fcf; - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0px; -} - -.listing_lines, .listing_code { - margin-top: 0px; - margin-bottom: 0px; - padding: 0.5em; -} -.listing_lines { - /* tango:sky blue 0.5 */ - background: #a6c5e3; - background: rgba(114, 159, 207, 0.2); - /* tango:aluminium 6 */ - color: #2e3436; -} -.listing_code { - /* tango:sky blue 0 */ - background: #e6f3ff; - background: rgba(114, 159, 207, 0.1); -} -.listing_code .programlisting { - /* override from previous */ - border: none 0px; - padding: 0px; - background: none; -} -.listing_lines pre, .listing_code pre { - margin: 0px; -} - -@media screen { - /* these have a as a first child, but since there are no parent selectors - * we can't use that. */ - a.footnote - { - position: relative; - top: 0em ! important; - } - /* this is needed so that the local anchors are displayed below the naviagtion */ - div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] - { - display: inline-block; - position: relative; - top:-5em; - } - /* this seems to be a bug in the xsl style sheets when generating indexes */ - div.index div.index - { - top: 0em; - } - /* make space for the fixed navigation bar and add space at the bottom so that - * link targets appear somewhat close to top - */ - body - { - padding-top: 2.5em; - padding-bottom: 500px; - max-width: 60em; - } - p - { - max-width: 60em; - } - /* style and size the navigation bar */ - table.navigation#top - { - position: fixed; - background: #e2e2e2; - border-bottom: solid 1px #babdb6; - border-spacing: 5px; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - z-index: 10; - } - table.navigation#top td - { - padding-left: 6px; - padding-right: 6px; - } - .navigation a, .navigation a:visited - { - /* tango:sky blue 3 */ - color: #204a87; - } - .navigation a:hover - { - /* tango:sky blue 2 */ - color: #3465a4; - } - td.shortcuts - { - /* tango:sky blue 2 */ - color: #3465a4; - font-size: 80%; - white-space: nowrap; - } - td.shortcuts .dim - { - color: #babdb6; - } - .navigation .title - { - font-size: 80%; - max-width: none; - margin: 0px; - font-weight: normal; - } -} -@media screen and (min-width: 60em) { - /* screen larger than 60em */ - body { margin: auto; } -} -@media screen and (max-width: 60em) { - /* screen less than 60em */ - #nav_hierarchy { display: none; } - #nav_interfaces { display: none; } - #nav_prerequisites { display: none; } - #nav_derived_interfaces { display: none; } - #nav_implementations { display: none; } - #nav_child_properties { display: none; } - #nav_style_properties { display: none; } - #nav_index { display: none; } - #nav_glossary { display: none; } - .gallery_image { display: none; } - .property_flags { display: none; } - .signal_flags { display: none; } - .parameter_annotations { display: none; } - .enum_member_annotations { display: none; } - .struct_member_annotations { display: none; } - .union_member_annotations { display: none; } - /* now that a column is hidden, optimize space */ - col.parameters_name { width: auto; } - col.parameters_description { width: auto; } - col.struct_members_name { width: auto; } - col.struct_members_description { width: auto; } - col.enum_members_name { width: auto; } - col.enum_members_description { width: auto; } - col.union_members_name { width: auto; } - col.union_members_description { width: auto; } - .listing_lines { display: none; } -} -@media print { - table.navigation { - visibility: collapse; - display: none; - } - div.titlepage table.navigation { - visibility: visible; - display: table; - background: #e2e2e2; - border: solid 1px #babdb6; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - } -} - Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/api/html/up-insensitive.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/api/html/up-insensitive.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/api/html/up.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/api/html/up.png differ diff -Nru appstream-0.9.4/docs/html/chap-AppStream-About.html appstream-0.12.0/docs/html/chap-AppStream-About.html --- appstream-0.9.4/docs/html/chap-AppStream-About.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/chap-AppStream-About.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,13 +1,13 @@ -Chapter 1. About AppStream

Product SiteDocumentation Site

+Chapter 1. About AppStream

Product SiteDocumentation Site

Chapter 1. About AppStream

1.1. What is AppStream?

- AppStream is a cross-distro effort for ehnacing the metadata available about software components in the Linux and free-software ecosystem. One of the project's goals is to make building software-center applications possible, and make interaction with the package sources of a distribution smarter. AppStream provides specifications for meta-information which is shipped by upstream projects and can be consumed by other software. The meta-information includes data which is interesting to display in software centers and is mainly useful for end-users, as well as descriptions about the public interfaces a software component provides, which is mainly useful for developers, 3rd-party software installers and for automatically installing missing components on a distribution, for example missing firmware or mimetype-handlers. + AppStream is a cross-distro effort for enhancing the metadata available about software components in the Linux and free-software ecosystem. One of the project's goals is to make building software-center applications possible, and make interaction with the package sources of a distribution smarter. AppStream provides specifications for meta-information which is shipped by upstream projects and can be consumed by other software. The meta-information includes data which is interesting to display in software centers and is mainly useful for end-users, as well as descriptions about the public interfaces a software component provides, which is mainly useful for developers, 3rd-party software installers and for automatically installing missing components on a distribution, for example missing firmware or mimetype-handlers.
- Distributors provide metadata as well, which describes all components available in a software repository. That data is composed of the upstream-metainfo and some other sources. AppStream also provides specifications for things like a screenshot-service, application ratings & reviews etc. All AppStream distro-repository data is stored in a Xapian database, which then contains information about all available components in the distribution's software repositories. + Distributors provide metadata as well, which describes all components available in a software repository. That data is composed of the upstream-metainfo and some other sources. AppStream also provides specifications for things like a screenshot-service, application ratings & reviews etc.
- All parts of AppStream are distro-agnostic (with exception to some metadata which is used to generate the Xapian application cache), and therefore AppStream makes it possible to build distro-agnostic application management tools. -

1.1.1. Architecture

diff -Nru appstream-0.9.4/docs/html/chap-AppStream-API.html appstream-0.12.0/docs/html/chap-AppStream-API.html --- appstream-0.9.4/docs/html/chap-AppStream-API.html 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/chap-AppStream-API.html 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,7 @@ + +Chapter 7. AppStream API Reference

Product SiteDocumentation Site

+ ⁠Chapter 7. AppStream API Reference

+ A reference of AppStream's public API can be fount on the API reference pages. +
+ If you want to use the PackageKit API, look at the PackageKit reference manual. +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/chap-AppStream-ManualPages.html appstream-0.12.0/docs/html/chap-AppStream-ManualPages.html --- appstream-0.9.4/docs/html/chap-AppStream-ManualPages.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/chap-AppStream-ManualPages.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,5 +1,5 @@ -Chapter 6. Manual pages

Product SiteDocumentation Site

+Chapter 6. Manual pages

Product SiteDocumentation Site

Chapter 6. Manual pages

Manpages are available at the API documentation. -
\ No newline at end of file +

\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/chap-AppStream-Services.html appstream-0.12.0/docs/html/chap-AppStream-Services.html --- appstream-0.9.4/docs/html/chap-AppStream-Services.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/chap-AppStream-Services.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,5 +1,5 @@ -Chapter 5. Services

Product SiteDocumentation Site

+Chapter 5. Services

Product SiteDocumentation Site

Chapter 5. Services

AppStream provides some services to fetch additional data from.
\ No newline at end of file + The screenshot data will be inserted transparently into AsScreenshot, if the distributor has set the configuration flag. Authors of software-centers don't need to take care of this implementation detail. +

\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/chap-CollectionData.html appstream-0.12.0/docs/html/chap-CollectionData.html --- appstream-0.9.4/docs/html/chap-CollectionData.html 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/chap-CollectionData.html 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,374 @@ + +Chapter 3. Collection Metadata

Product SiteDocumentation Site

+ ⁠Chapter 3. Collection Metadata

+ Additionally to the metainfo files shipped by upstream projects, AppStream also provides an XML and YAML format to make information about not installed software components known to the system. +
+ This chapter documents this collection metadata format and icon cache used on the client side. +

+ ⁠3.1. AppStream collection XML

+ ⁠3.1.1. Introduction

+ AppStream collection XML files are text files describing all available software components a software repository (usually from a Linux distributor) offers for installation. The XML files might be compressed with GZip. +

+ ⁠3.1.2. File naming and location

+ The XML files must have a unique name, which is usually the distribution's name and version, combined with the name of the repository/origin. For example in Debian 8 (Jessie), the filename for the main repository component would be debian-jessie-main.xml.gz. For Fedora 20 (Heisenbug) updates it would be fedora-20-updates.xml.gz. 3rd-party repositories use a vendor name and repository-name combination, for example Ubuntu PPAs might get ppa-ubuntu12.04-username-foobar.xml. +
+ There are two valid locations to store AppStream XML data. /usr/share/app-info/xmls stores all AppStream data which has been installed via software packages, while /var/cache/app-info/xmls stores application data which was downloaded by the package manager or placed there by other tools (for example, Limba). The XML files can either be plain files or be compressed with gzip. It is always a good idea to compress the files, because they tend to become quite large. +

+ ⁠3.1.3. General XML structure

+ The XML starts with a <components> tag as the root element. It has all the <component> tags of different types as children. +
+ Data to fill the different component elements is usually taken from their Desktop files and package data. However, if an upstream project ships metainfo files (see Chapter 2, Upstream Metadata), values defined there should override data from any other source. +
+ All child elements of the <components> element, no matter of which type they are, must at least have an id, name, summary and pkgname tag. For applications, a icon tag is also required. +
+ The <components> root node has these properties, where the first two are required: +
version
+ This property declares the AppStream spec version this file is based on (currently 0.9). The property is required. +
origin
+ Defines the repository ID this AppStream XML file belongs to. This usually matches the filename without extension (see the explanation on how to pick a good filename above). It is also used to associate the right cached icons with AppStream metadata. This property is required. +
architecture
+ Defines the architecture this data belongs to. This information is useful to resolve AppStream-ID conflicts on multiarch systems, which appear if the user has metadata for two architectures installed. This property is optional. +

+ ⁠3.1.4. Valid tags for all component types

+ These tags can be applied to every component type (application, component, font, inputmethod) which is described in the AppStream metadata. +
+ Additionally to the type property, every <component/> tag in AppStream collection data may have a priority property, defining the priority of this specific metadata over other metadata from different AppStream XML files (for example, from a different repository) which have the same component-id. The value of this tag is an integer, if the property is missing, a value of "0" is assumed. +
+ In order to merge metadata, each component in collection data may also have a merge property, assuming the values append or replace. If the value is append, all data this component describes will be appended to data of the component with the same ID. If the value is replace the fields of the target component will be replaced with the ones present in the merge component. Merge components with a higher priority take precedence. If a component has a merge property, the only tag that must at least be present for it is the <id/> tag. +
+ ⁠<id/>
+ The <id/> tag is a short unique and usually lower-cases identifier for the component. Depending on the component's type, different naming conventions apply. +
+ ⁠<pkgname/>
+ The name of the package which needs to be installed in order to make this component available on the system. +
+ This tag can be defined multiple times, if a component is split across multiple packages. +

Important

+ The preferred way is to create metapackages containing the component metadata, and referencing them from the collection metadata, and not to use multiple pkgname tags. They should only be used multiple times as a workaround or if there is no sensible way of creating a matching metapackage. +
+ ⁠<source_pkgname/>
+ This optional tag is used to specify the source package the binary package this component belongs to was built from. +
+ The tag can be used by software center applications to group components. It is otherwise useful for the distributor to assign components to a source package and to fetch additional information about a package from the web. +
+ ⁠<name/>
+ A human-readable name for this software. +
+ In case of a component of type desktop-application, the application name as defined in the application's desktop file is used. +
+ ⁠<project_license/>
+ The <project_license/> tag is indicating the license of the component. It should be a SPDX license expression. Possible values include: +
  • + GPL-2.0 +
  • + LGPL-3.0+ AND GPL-3.0+ +
  • + MIT +
  • + CC-BY-SA-2.0 +
  • + ... +
+ A full list of recognized licenses and their identifiers can be found at the SPDX OpenSource License Registry. +
+ ⁠<summary/>
+ The tag contains a short summary of the purpose and function of this component. In case the component is of type desktop, it is usually taken from a Desktop file, if the application does not ship an upstream metadata file. +
+ For more information about this tag, take a look at the tag's definition at <summary/>. +
+ ⁠<description/>
+ A long description of the component. It is usually taken from the package descriptions or meta-info files, if they were provided. The description might use markup. Right now, only paragraph, ordered list and unordered list are supported. An example description element might look like this: +
<description>
+  <p>
+   Power Statistics is a program used to view historical and current battery
+   information and will show programs running on your computer using power.
+  </p>
+  <p>Example list:</p>
+  <ul>
+   <li>First item</li>
+   <li>Second item</li>
+  </ul>
+  <p>
+  You probably only need to install this application if you are having problems
+  with your laptop battery, or are trying to work out what programs are using
+  significant amounts of power.
+  </p>
+ </description>
+ +
+ As opposed to the by-paragraph translation used in meta-info files, this tag is translated "as a whole", meaning that the <description/> tag itself has a language property and contain the translated paragraphs for the given language. This allows faster parsing of the Appstream XML file, and does not increase it's size much, as long as it is compressed. +
+ For more information about this tag, take a look at the tag's definition at <description/>. +
+ ⁠<url/>
+ Defines URLs for this component. This tag can be present multiple times. +
+ For a list of possible url types and what they are expected to do, take a look at the tag's description at <url/>. +
+ ⁠<project_group/>
+ The <project_group> tag identifies a project with a specific upstream umbrella project. Known values include GNOME, KDE, XFCE, LXDE, Mozilla and MATE, although other umbrella projects like Yorba would make sense too. +

Note

+ Components should only identify with an umbrella project if you use all their infrastructure and policies, for instance string freezes dates, bugtracker and source control instance. +
+ ⁠<icon/>
+ The <icon/> tag describes the component icon. It is mostly used for GUI applications (component-type desktop-application). It can be of the type stock, cached, local, or url. +
+ stock icons are loaded from stock. The icon name should never include any file-extension or path. +
+ cached icons are loaded from the AppStream icon cache. The icon tag should contain the icon file name, including it's extension. It must not contain a full or relative path to the icon file. +
+ local icons are reserved for AppStream data installed by local applications or via 3rd-party application installers. They should specify a full file path. This icon type may have width and height properties. +
+ remote icons loaded from a remote URL. Currently, only HTTP urls are supported. This icon type should have width and height properties. +
+ Examples of the different methods to specify an icon: +
<icon type="stock">gimp</icon>
+<icon type="cached">firefox.png</icon>
+<icon type="remote" width="64" height="64">http://example.com/icons/foobar.png</icon>
+<icon type="local" width="64" height="64">/usr/share/pixmaps/foobar.png</icon>
+ Multiple <icon/> tags might be combined for one application, for example to define a stock icon and a cached icon. Software-Centers should always prefer the stock icon, if it is available, and fall back to the other icon types if they can not find it. The libappstream library makes it easy to do that. +
+ The AppStream library will prefer cached over local over remote icons when setting the non-stock icon for the application. +
+ ⁠<mimetypes/>
+ This tag can contain one or more <mimetype> tags, describing the mime types this component supports. The data can usually be fetched from the Desktop files. Example: +
<mimetypes>
+    <mimetype>text/html</mimetype>
+    <mimetype>image/jpeg</mimetype>
+    <mimetype>application/rss+xml</mimetype>
+ </mimetypes>
+ ⁠<categories/>
+ This tag can contain one or more <category> tags, describing the categories this component is located in. This tag is usually applied to components of type desktop-application, although it might be used by others later. This data is usually taken from Desktop files, a list of categories can be found in the Freedesktop menu spec. Example: +
<categories>
+    <category>Science</category>
+    <category>Network</category>
+    <category>Telephony</category>
+</categories>

Deprecated Tags

+ The tag <appcategories> with its <appcategory> child elements is deprecated API. AppStream parsers should handle these tags just like the category tags, there is no difference except for the name. +
+ ⁠<keywords/>
+ This tag can contain one or more <keyword> tags, describing keywords for the component, to make it easier to find in a software center. In case of type desktop-application components, this data is taken from .desktop files. For addon components, the upstream metadata file usually provides this tag. For translated keyword lists, the root node (<keywords/>) has the language property. Example: +
<keywords>
+  <keyword>IDE</keyword>
+  <keyword>development</keyword>
+  <keyword>programming</keyword>
+</keywords>
+<keywords xml:lang="de">
+  <keyword>IDE</keyword>
+  <keyword>entwicklung</keyword>
+  <keyword>programmierung</keyword>
+</keywords>
+ ⁠<screenshots/>
+ This tag can contain one or more <screenshot> tags, describing screenshots which are available for the software. A screenshot tag my have the attribute type="default", marking it as the software's default screenshot, which primarily represents it in a software center. +
+ The screenshots tag is described for metainfo files in <screenshots/>. In collection metadata, the tag has the exact same format as in metainfo files. The metadata generator may add an arbitrary number of resized thumbnails though. +
+ Every <screenshot> is defined by several images of different sizes. All images should have their width and hight set as arguments. Also, one of the images should be marked as type="source", indicating that it is the unscaled version of the screenshot. Images of type="thumbnail" define thumbnails of the screenshot. +
+ The metadata generator should scale the source image down to several thumbnails useful for the client to load. The recommended sizes for thumbnail images are: +
  • + 752x423 (large) +
  • + 624x351 (normal) +
  • + 112x63 (small) +
  • + 1504x846 (large, HiDPI) +
  • + 1248x702 (normal, HiDPI) +
  • + 224x126 (small, HiDPI) +
+ In order to support HiDPI screens, the thumbnails should also be available in their bigger sizes. A metadata generator should, however, never attempt to scale up a smaller image to a larger size, and just ship the smaller sizes instead. +
+ Optionally, a screenshot can contain a <caption> tag, describing the screenshot's caption. This is usually what the user can see on the image shown. The tag is translatable. +
+ Every image should have a full remote url set, usually pointing to a cache of images maintained by the repository vendor. Example: +
<screenshots>
+  <screenshot type="default">
+    <caption>FooBar showing kitchen-sink functionality.</caption>
+    <caption xml:lang="de">FooBar beim Ausführen der Spühlbecken-Funktion.</caption>
+    <image type="source" width="800" height="600">http://www.example.org/en_US/main.png</image>
+    <image type="thumbnail" width="752" height="423">http://www.example.org/en_US/main-large.png</image>
+    <image type="thumbnail" width="112" height="63">http://www.example.org/en_US/main-small.png</image>
+  </screenshot>
+  <screenshot>
+     ....
+  </screenshot>
+</screenshots>
+ ⁠<compulsory_for_desktop/>
+ The <compulsory_for_desktop> tag indicates that the component which the metadata belongs to is essential for the functionality of the defined desktop environment. Examples for compulsory components are the GNOME-Shell by the GNOME-Project, or the Plasma-Desktop by KDE, as well as things like iBus or the desktop login manager. +
+ Software centers are expected to detect the running desktop environment and disable uninstallation for compulsory components of that desktop, so users will not be able to damage their currently running, primary desktop environment. +
+ Multiple occurrences of the <compulsory_for_desktop> tag are allowed, so a project can be essential for many desktops. The distributor decides which components should be made compulsory, however it is generally a good idea to follow upstream's recommendations on that matter. +
+ A list of all allowed values for this tag is defined in the XDG Menu Specification. Software center applications will only recognize these values. +
+ ⁠<provides/>
+ This tag is described in detail at Section 2.1, “Generic Component”. +
+ Distributors and software repository vendors must ensure that all things described in this tag are present in the package referenced in the associated pkgname tag (or in dependencies of it). +
+ ⁠<developer_name/>
+ The <developer_name/> tag as described in the specification for a generic component. See <developer_name/> for more information. +
+ ⁠<launchable/>
+ This optional tag follows the same schema as described for metainfo files in <launchable/>. +
+ ⁠<releases/>
+ The releases tag and its release children are structured as described in <releases/>. +
+ Each release tag may have a description tag as child, containing a brief description of what is new in the release. The description tag is structured as described in <description/>. This also applies to its translation rules. +
+ The AppStream collection XML generator may shorten overlong lists of releases to a smaller list, for example of 4 release tags. It may also convert ISO 8601 date properties of the metainfo file into an UNIX timestamp timestamp property. It should avoid generating metadata containing both properties on a release tag. +
+ Example for a valid releases tag: +
<releases>
+  <release version="1.8" timestamp="1424116753">
+    <description>
+      <p>This stable release fixes the following bug:</p>
+      <ul>
+        <li>CPU no longer overheats when you hold down spacebar</li>
+      </ul>
+    </description>
+    <size type="download">12345678</size>
+    <size type="installed">42424242</size>
+  </release>
+  <release version="1.2" timestamp="1397253600" />
+  <release version="1.0" timestamp="1345932000" />
+</releases>
+ In case a <release/> tag has a <description/> tag as parameter, describing the new release briefly, distributors are encouraged to provide 2-4 <release/> release tags for every component. If no description is provided, one tag is enough. +
+ Components of type firmware (Section 2.10, “Firmware”) may also have a <location/> tag as child of one of the <release/> tags. In case a <location/> tag is present, it must be accompanied by a <checksum/> tag, containing a checksum of the downloaded file. This is done to ensure the integrity of the downloaded firmware, and that the user gets the firmware which was tested by the distributor. The <location/> tag is often used in case the distributor is not allowed to legally redistribute the firmware in a native package. +
+ The <checksum/> tag has a type attribute, describing the checksumming-algorithm that was used to create it. Currently, only SHA1 is supported. +
+ Example for a <release/> tag of a firmware component which makes use of <location/>: +
<release version="2.0.3" timestamp="1429362707">
+  <location>http://www.hughski.com/downloads/colorhug2/firmware/colorhug2-2.0.3.cab</location>
+  <checksum type="sha1">40b59e37cb918f3241f65bc5ac2b90ab47b34e8c</checksum>
+  <description>
+    <p>This stable release fixes problems.</p>
+  </description>
+</release>
+ ⁠<languages/>
+ This tag gives information about the translations a component provides, and to which extent the software is translated. +
+ The tag is allowed to only occur once per component, and contains multiple <lang/> child nodes, which have a language code as value. Each <lang/> node may have a percentage property, which describes the percentage value to which a component has been translated. +
+ The language data is expected to be extracted by the AppStream XML generator, and is not provided upstream. Generators may obtain the information from processing GNU Gettext files, which should cover most translation methods. +
+ Tag example: +
<languages>
+  <lang percentage="96">gu</lang>
+  <lang percentage="94">ca@valencia</lang>
+  <lang percentage="91">de</lang>
+  <lang percentage="93">eo</lang>
+</languages>
+
+ ⁠<bundle/>
+ The optional bundle tag indicates that the described software is available as a software bundle via a 3rd-party application installer. The value of this tag is an identification string for the bundle. +
+ Software centers may use the information of this tag to offer the user to install the software from 3rd-party sources, or just update an already installed software automatically via the normal update procedure. The bundle tag can coexist with the pkgname tag, in case a component is available from multiple sources. +
+ The type property of this tag indicates which 3rd-party software installation solution the bundle belongs to. Currently supported solutions are: +
  • + The Limba Project, using the value limba. +
  • + Flatpak bundles, using the value flatpak. +
  • + AppImageKit bundles, using the value appimage. +
  • + Snappy snap bundles, using the value snap. +
+ +
+ Example: +
<bundle type="limba">foobar-1.0.2</bundle>
+ ⁠<suggests/>
+ The optional suggests tag provides suggestions of other software made by this component. It follows the same schema as described for metainfo files in <suggests/>. +
+ Additionally to the upstream type allowed for metainfo files, the catalog data also allows a heuristic type, which is added by automatic recommendation services, and might be based on the user's preferences. It is commonly injected into existing metadata via a merge pseudo-component. +
+ Example: +
<suggests type="upstream">
+  <id>org.kde.gwenview.desktop</id>
+  <id>org.inkscape.Inkscape</id>
+</suggests>
+<suggests type="heuristic">
+  <id>org.gimp.gimp.desktop</id>
+</suggests>
+ ⁠<content_rating/>
+ This optional tag follows the same schema as described for metainfo files in <content_rating/>. +

+ ⁠3.1.5. Example file

+ This is an example AppStream metadata file: +

+<?xml version="1.0"?>
+<components version="0.10">
+  <component type="desktop-application">
+    <id>org.mozilla.Firefox</id>
+    <pkgname>firefox-bin</pkgname>
+    <name>Firefox</name>
+    <name lang="en_GB">Firefoux</name>
+    <summary>Web browser</summary>
+    <summary lang="fr_FR">Navigateur web</summary>
+    <project_license>MPL-2.0</project_license>
+    <keywords>
+      <keyword>internet</keyword>
+      <keyword>web</keyword>
+      <keyword>browser</keyword>
+      <keyword lang="fr_FR">navigateur</keyword>
+    </keywords>
+    <icon type="stock">web-browser</icon>
+    <icon type="cached">firefox.png</icon>
+    <categories>
+      <category>network</category>
+      <category>web</category>
+    </categories>
+    <mimetypes>
+      <mimetype>text/html</mimetype>
+      <mimetype>text/xml</mimetype>
+      <mimetype>application/xhtml+xml</mimetype>
+      <mimetype>application/vnd.mozilla.xul+xml</mimetype>
+      <mimetype>text/mml</mimetype>
+      <mimetype>application/x-xpinstall</mimetype>
+      <mimetype>x-scheme-handler/http</mimetype>
+      <mimetype>x-scheme-handler/https</mimetype>
+    </mimetypes>
+    <url type="homepage">http://www.mozilla.com</url>
+    <screenshots>
+      <screenshot type="default">
+        <image type="source" width="800" height="600">http://www.awesomedistro.example.org/en_US/firefox.desktop/main.png</image>
+        <image type="thumbnail" width="200" height="150">http://www.awesomedistro.example.org/en_US/firefox.desktop/main-small.png</image>
+      </screenshot>
+    </screenshots>
+    <provides>
+      <binary>firefox</binary>
+    </provides>
+  </component>
+  <component>
+    <id>org.freedesktop.PulseAudio</id>
+    <name>PulseAudio</name>
+    <summary>The PulseAudio sound server</summary>
+    <url type="homepage">http://www.freedesktop.org/wiki/Software/PulseAudio/</url>
+    <project_license>GPL-2.0+</project_license>
+    <provides>
+      <library>libpulse-simple.so.0</library>
+      <library>libpulse.so.0</library>
+      <binary>start-pulseaudio-kde</binary>
+      <binary>start-pulseaudio-x11</binary>
+    </provides>
+    <release version="2.0"/>
+  </component>
+  <component type="font">
+    <id>org.linuxlibertine.LinuxLibertine</id>
+    <name>Linux Libertine</name>
+    <summary>Linux Libertine Open fonts</summary>
+    <provides>
+      <font>LinLibertine_M.otf</font>
+    </provides>
+  </component>
+  <!-- more components here! -->
+</components>
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/chap-DistroData.html appstream-0.12.0/docs/html/chap-DistroData.html --- appstream-0.9.4/docs/html/chap-DistroData.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/chap-DistroData.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,342 +0,0 @@ - -Chapter 3. Distribution Metadata and Services

Product SiteDocumentation Site

- ⁠Chapter 3. Distribution Metadata and Services

- AppStream provides an own Metadata format which gets shipped by the distributions and is read by the Xapian database generator or software centers directly. -
- This chapter contains information about it. -

- ⁠3.1. AppStream distribution XML files

- ⁠3.1.1. Introduction

- AppStream XML files are small textfiles describing all available applications in the distribution's package repositories. The XML files might be compressed with GZip. -

- ⁠3.1.2. File naming and location

- The XML files must have an unique name, which is usually the distribution's name and version, combined with the name of the repository/origin. For example in Debian 8 (Jessie), the filename for the main repository component would be debian-jessie-main.xml.gz. For Fedora 20 (Heisenbug) updates it would be fedora-20-updates.xml.gz. 3rd-party repositories use a vendor name and repository-name combination, for example Ubuntu PPAs might get ppa-ubuntu12.04-username-foobar.xml. -
- There are two valid locations to store AppStream XML data. /usr/share/app-info/xmls stores all AppStream data which has been installed via software packages, while /var/cache/app-info/xmls stores application data which was downloaded by the package manager or placed there by other tools (e.g. Limba). The XML files can either be plain files or be compressed with gzip. It is always a good idea to compress the files, because they tend to become quite large. -

- ⁠3.1.3. General XML structure

- The XML starts with an <components> tag as root element. It has all the <component> tags of different type as children. -
- Data to fill the different component elements is usually taken from their Desktop files and package data. However, if an upstream project ships metainfo files (see Chapter 2, Upstream Metadata), values defined there should override data from any other source. -
- All child elements of the <components> element, no matter of which type they are, must at least have an id, name, summary and pkgname tag. For applications, a icon tag is also required. -
- The <components> root node has these properties, where the first two are required: -
version
- This property declares the AppStream spec version this file is based on (currently 0.9). The property is required. -
origin
- Defines the repository-id this AppStream XML file belongs to. This usually matches the filename without extension (see the explanation on how to pick a good filename above). It is also used to associate the right cached icons with AppStream metadata. This property is required. -
architecture
- Defines the architecture this data belongs to. This information is useful to resolve AppStream-ID conflicts on multiarch systems, which appear if the user has metadata for two architectures installed. This property is optional. -

- ⁠3.1.4. Valid tags for all component types

- These tags can be applied to every component type (application, component, font, inputmethod) which is described in the AppStream metadata. -
- Additionally to the type property, every <component/> tag in AppStream distro data may have a priority property, defining the priority of this specific metadata over other metadata from different AppStream XML files (e.g. from a different repository) which have the same component-id. The value of this tag is an integer, if the property is missing, a value of "0" is assumed. -
- ⁠<id/>
- The <id/> tag is a short unique and usually lower-cases identifier for the component. Depending on the component's type, different naming conventions apply. -
- ⁠<pkgname/>
- The name of the package which needs to be installed in order to make this component available on the system. -
- This tag can be defined multiple times, if a component is split across multiple packages. -

Important

- The preferred way is to create metapackages containing the component metadata, and referncing them from the distribution metadata, and not to use multiple pkgname tags. They should only be used multiple times as a workaround or if there is no sensible way of creating a matching metapackage. -
- ⁠<source_pkgname/>
- This optional tag is used to specify the source package the binary package this component belongs to was built from. -
- The tag can be used by software center applications to group components. It is otherwise useful for the distributor to assign components to a source package and to fetch additional information about a package from the web. -
- ⁠<name/>
- A human-readable name for this component. -
- In case of a component of type desktop, the application name as defined in the application's desktop file is used. -
- ⁠<project_license/>
- The <project_license/> tag is indicating the license of the component. It should be a string in SPDX format. Licenses may be combined using and and or logic. Possible values include: -
  • - GPL-2.0 -
  • - LGPL-3.0+ and GPL-3.0+ -
  • - MIT -
  • - CC-BY-SA-2.0 -
  • - ... -
- A full list of recognized licenses and their identifiers can be found at the SPDX OpenSource License Registry. -
- ⁠<summary/>
- The tag contains a short summary of the purpose and function of this component. In case the component is of type desktop, it is usually taken from a Desktop file, if the application does not ship an upstream metadata file. -
- For more information about this tag, take a look at the tag's definition at <summary/>. -
- ⁠<description/>
- A long description of the component. It is usually taken from the package descriptions or meta-info files, if they were provided. The description might use markup. Right now, only paragraph, ordered list and unordered list are supported. An example description element might look like this: -
<description>
-  <p>
-   Power Statistics is a program used to view historical and current battery
-   information and will show programs running on your computer using power.
-  </p>
-  <p>Example list:</p>
-  <ul>
-   <li>First item</li>
-   <li>Second item</li>
-  </ul>
-  <p>
-  You probably only need to install this application if you are having problems
-  with your laptop battery, or are trying to work out what programs are using
-  significant amounts of power.
-  </p>
- </description>
- -
- As opposed to the by-paragraph translation used in meta-info files, this tag is translated "as a whole", meaning that the <description/> tag itself has a language property and contain the translated paragraphs for the given language. This allows faster parsing of the Appstream XML file, and does not increase it's size much, as long as it is compressed. -
- For more information about this tag, take a look at the tag's definition at <description/>. -
- ⁠<url/>
- Defines URLs for this component. This tag can be present multiple times. -
- For a list of possible url types and what they are expected to do, take a look at the tag's description at <url/>. -
- ⁠<project_group/>
- The <project_group> tag identifies a project with a specific upstream umbrella project. Known values include GNOME, KDE, XFCE, LXDE, Mozilla and MATE, although other umbrella projects like Yorba would make sense too. -

Note

- Components should only identify with an umbrella project if you use all their infrastructure and policies, for instance string freezes dates, bugtracker and source control instance. -
- ⁠<icon/>
- The <icon/> tag describes the component icon. It is mostly used for GUI applications (component-type desktop). It can be of the type stock, cached, local, or url. -
- stock icons are loaded from stock. The icon name should never include any file-extension or path. -
- cached icons are loaded from the AppStream icon cache. The icon tag should contain the icon file name, including it's extension. It must not contain a full or relative path to the icon file. -
- local icons are reserved for AppStream data installed by local applications or via 3rd-party application installers. They should specify a full file path. This icon type may have width and height properties. -
- remote icons loaded from a remote URL. Currently, at least HTTP urls must be supported. This icon type may have width and height properties. -
- Examples of the different methods to specify an icon: -
<icon type="stock">gimp</icon>
-<icon type="cached">firefox.png</icon>
-<icon type="remote" width="64" height="64">http://example.com/icons/foobar.png</icon>
-<icon type="local" width="64" height="64">/usr/share/pixmaps/foobar.png</icon>
- Multiple <icon/> tags might be combined for one application, e.g. to define a stock icon and a cached icon. Software-Centers should always prefer the stock icon, if it is available, and fall back to the other icon types if they can not find it. The libappstream library makes it easy to do that, if you are not accessing the Xapian database manually. -
- The AppStream Xapian database generator will prefer cached over local over remote icons when setting the non-stock icon for the application. -
- ⁠<mimetypes/>
- This tag can contain one or more <mimetype> tags, describing the mime types this component supports. The data can usually be fetched from the Desktop files. Example: -
<mimetypes>
-    <mimetype>text/html</mimetype>
-    <mimetype>image/jpeg</mimetype>
-    <mimetype>application/rss+xml</mimetype>
- </mimetypes>
- ⁠<categories/>
- This tag can contain one or more <category> tags, describing the categories this application is located in. This tag is usually applied to components of type desktop, although it might be used by others later. This data is usually taken from Desktop files, a list of categories can be found in the Freedesktop menu spec. Example: -
<categories>
-    <category>GNOME</category>
-    <category>GTK</category>
-    <category>Network</category>
-    <category>Telephony</category>
-</categories>

Deprecated Tags

- The tag <appcategories> with its <appcategory> child elements is deprecated API. AppStream parsers should handle these tags just like the category tags, there is no difference except for the name. -
- ⁠<keywords/>
- This tag can contain one or more <keyword> tags, describing keywords for the component, to make it easier to find in a software center. In case of type desktop components, this data is taken from Desktop files. For addon components, the upstream metadata file usually provides this tag. Example: -
<keywords>
-  <keyword>IDE</keyword>
-  <keyword>development</keyword>
-  <keyword>programming</keyword>
-</keywords>
- ⁠<screenshots/>
- This tag can contain one or more <screenshot> tags, describing screenshots which are available for the application. A screenshot tag my have the attribute type="default", marking it as the application's default screenshot, which primarily represents it in a software center. -
- Every <screenshot> is defined by several images of different sizes. All images should have their width and hight set as arguments. Also, one of the images should be marked as type="source", indicating that it is the unscaled version of the screenshot. Images of type="thumbnail" define thumbnails of the screenshot. -
- The metadata generator should scale the source image down to several thumbnails useful for the client to load. The recommended sizes for thumbnail images are: -
  • - 752x423 (large) -
  • - 624x351 (normal) -
  • - 112x63 (small) -
  • - 1504x846 (large, HiDPI) -
  • - 1248x702 (normal, HiDPI) -
  • - 224x126 (small, HiDPI) -
- In order to support HiDPI screens, the thumbnails should also be available in their bigger sizes. A metadata generator should, however, never attempt to scale up a smaller image to a larger size, and just ship the smaller sizes instead. -
- Optionally, a screenshot can contain a <caption> tag, describing the screenshot's caption. This is usually what the user can see on the image shown. The tag is translatable. -
- Every image should have a full remote url set, usually pointing to a cache of images maintained by the distributor. Example: -
<screenshots>
-  <screenshot type="default">
-    <caption>Foobar showing kitchen-sink functionality</caption>
-    <caption xml:lang="si">Foobar shoeewing kischän-sünk funzionality</caption>
-    <image type="source" width="800" height="600">http://www.example.org/en_US/main.png</image>
-    <image type="thumbnail" width="752" height="423">http://www.example.org/en_US/main-large.png</image>
-    <image type="thumbnail" width="112" height="63">http://www.example.org/en_US/main-small.png</image>
-  </screenshot>
-  <screenshot>
-     ....
-  </screenshot>
-</screenshots>
- ⁠<compulsory_for_desktop/>
- The <compulsory_for_desktop> tag indicates that the component which the metadata belongs to is essential for the functionality of the defined desktop environment. Examples for compulsory components are the GNOME-Shell by the GNOME-Project, or the Plasma-Desktop by KDE, as well as things like iBus or the desktop login manager. -
- Software centers are expected to detect the running desktop environment and disable uninstallation for compulsory components of that desktop, so users will not be able to damage their currently running, primary desktop environment. -
- Multiple occurrences of the <compulsory_for_desktop> tag are allowed, so a project can be essential for many desktops. The distributor decides which components should be made compulsory, however it is generally a good idea to follow upstream's recommendations on that matter. -
- A list of all allowed values for this tag is defined in the XDG Menu Specification. Software center applications will only recognize these values. -
- ⁠<provides/>
- This tag is described in detail at Section 2.1, “Generic Component”. -
- For generic component types, this tag has to be present. Distributors must ensure that all things described in this tag are present in the package referenced in the associated pkgname tag. -
- ⁠<developer_name/>
- The <developer_name/> tag as described in the specification for a generic component. See <developer_name/> for more information. -
- ⁠<releases/>
- The releases tag and its release children are structured as described in <releases/>. -
- Each release tag may have a description tag as child, containing a brief description of what is new in the release. The description tag is structured as described in <description/>. This also applies to its translation rules. -
- The AppStream distro XML generator may shorten overlong lists of releases to a smaller list, e.g. of 4 release tags. It may also convert ISO 8601 date properties of the metainfo file into an UNIX timestamp timestamp property. It should avoid generating metadata containing both properties on a release tag. -
- Example for a valid releases tag: -
<releases>
-  <release version="1.8" timestamp="1424116753">
-    <description>
-      <p>This stable release fixes the following bug:</p>
-      <ul>
-        <li>CPU no longer overheats when you hold down spacebar</li>
-      </ul>
-    </description>
-    <size type="download">12345678</size>
-    <size type="installed">42424242</size>
-  </release>
-  <release version="1.2" timestamp="1397253600" />
-  <release version="1.0" timestamp="1345932000" />
-</releases>
- In case a <release/> tag has a <description/> tag as parameter, describing the new release briefly, distributors are encouraged to provide 2-4 <release/> release tags for every component. If no description is provided, one tag is enough. -
- Components of type firmware (Section 2.7, “Firmware”) may also have a <location/> tag as child of one of the <release/> tags. In case a <location/> tag is present, it must be accompanied by a <checksum/> tag, containing a checksum of the downloaded file. This is done to ensure the integrity of the downloaded firmware, and that the user gets the firmware which was tested by the distributor. The <location/> tag is often used in case the distributor is not allowed to legally redistribute the firmware in a native package. -
- The <checksum/> tag has a type attribute, describing the checksumming-algorithm that was used to create it. Currently, only SHA1 is supported. -
- Example for a <release/> tag of a firmware component which makes use of <location/>: -
<release version="2.0.3" timestamp="1429362707">
-  <location>http://www.hughski.com/downloads/colorhug2/firmware/colorhug2-2.0.3.cab</location>
-  <checksum type="sha1">40b59e37cb918f3241f65bc5ac2b90ab47b34e8c</checksum>
-  <description>
-    <p>This stable release fixes problems.</p>
-  </description>
-</release>
- ⁠<languages/>
- This tag gives information about the translations a component provides, and to which extent the software is translated. -
- The tag is allowed to only occur once per component, and contains multiple <lang/> child nodes, which have a language code as value. Each <lang/> node may have a percentage property, which describes the percentage value to which a component has been translated. -
- The language data is expected to be extracted by the AppStream XML generator, and is not provided upstream. Generators may obtain the information from processing GNU Gettext files, which should cover most translation methods. -
- Tag example: -
<languages>
-  <lang percentage="96">gu</lang>
-  <lang percentage="94">ca@valencia</lang>
-  <lang percentage="91">de</lang>
-  <lang percentage="93">eo</lang>
-</languages>
-
- ⁠<bundle/>
- The optional bundle tag indicates that the described software is available as a software bundle via a 3rd-party application installer. The value of this tag is an identification string for the bundle. -
- Software centers may use the information of this tag to offer the user to install the software from 3rd-party sources, or just update an already installed software automatically via the normal update procedure. The bundle tag can coexist with the pkgname tag, in case a component is available from multiple sources. -
- The type property of this tag indicates which 3rd-party software installation solution the bundle belongs to. Currently supported solutions are: -
- -
- Example: -
<bundle type="limba">foobar-1.0.2</bundle>

- ⁠3.1.5. Example file

- This is an example AppStream metadata file: -

-<?xml version="1.0"?>
-<components version="0.6">
-  <component type="application">
-    <id>firefox.desktop</id>
-    <pkgname>firefox-bin</pkgname>
-    <name>Firefox</name>
-    <name lang="en_GB">Firefoux</name>
-    <summary>Web browser</summary>
-    <summary lang="fr_FR">Navigateur web</summary>
-    <project_license>MPL-2</project_license>
-    <keywords>
-      <keyword>internet</keyword>
-      <keyword>web</keyword>
-      <keyword>browser</keyword>
-      <keyword lang="fr_FR">navigateur</keyword>
-    </keywords>
-    <icon type="stock">web-browser</icon>
-    <icon type="cached">firefox.png</icon>
-    <categories>
-      <category>network</category>
-      <category>web</category>
-    </categories>
-    <mimetypes>
-      <mimetype>text/html</mimetype>
-      <mimetype>text/xml</mimetype>
-      <mimetype>application/xhtml+xml</mimetype>
-      <mimetype>application/vnd.mozilla.xul+xml</mimetype>
-      <mimetype>text/mml</mimetype>
-      <mimetype>application/x-xpinstall</mimetype>
-      <mimetype>x-scheme-handler/http</mimetype>
-      <mimetype>x-scheme-handler/https</mimetype>
-    </mimetypes>
-    <url type="homepage">http://www.mozilla.com</url>
-    <screenshots>
-      <screenshot type="default">
-        <image type="source" width="800" height="600">http://www.awesomedistro.example.org/en_US/firefox.desktop/main.png</image>
-        <image type="thumbnail" width="200" height="150">http://www.awesomedistro.example.org/en_US/firefox.desktop/main-small.png</image>
-      </screenshot>
-    </screenshots>
-    <provides>
-      <binary>firefox</binary>
-    </provides>
-  </component>
-  <component>
-    <id>pulseaudio</id>
-    <name>PulseAudio</name>
-    <summary>The PulseAudio sound server</summary>
-    <url type="homepage">http://www.freedesktop.org/wiki/Software/PulseAudio/</url>
-    <project_license>GPLv2</project_license>
-    <provides>
-      <library>libpulse-simple.so.0</library>
-      <library>libpulse.so.0</library>
-      <binary>start-pulseaudio-kde</binary>
-      <binary>start-pulseaudio-x11</binary>
-    </provides>
-    <release version="2.0"/>
-  </component>
-  <component type="font">
-    <id>LinLibertine_M.otf</id>
-    <name>Libertine</name>
-    <summary>Linux Libertine Open fonts</summary>
-    <font_classifier>Mono</font_classifier>
-    <font_parent>Libertine</font_parent>
-  </component>
-  <!-- more components here! -->
-</components>
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/chap-LibAppStream-API.html appstream-0.12.0/docs/html/chap-LibAppStream-API.html --- appstream-0.9.4/docs/html/chap-LibAppStream-API.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/chap-LibAppStream-API.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - -Chapter 7. AppStream API Reference

Product SiteDocumentation Site

- ⁠Chapter 7. AppStream API Reference

- A reference of AppStream's public API can be fount on the API reference pages. -
- If you want to use the PackageKit API, look at the PackageKit reference manual. -
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/chap-Metadata.html appstream-0.12.0/docs/html/chap-Metadata.html --- appstream-0.9.4/docs/html/chap-Metadata.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/chap-Metadata.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,100 +1,158 @@ -Chapter 2. Upstream Metadata

Product SiteDocumentation Site

- ⁠Chapter 2. Upstream Metadata

+Chapter 2. Upstream Metadata

Product SiteDocumentation Site

+ ⁠Chapter 2. Upstream Metadata

AppStream allows upstream projects to define metadata about the components they provide using small XML files, metainfo files, which get installed into locations on the client system and are used by distribuors to enhance their metadata.
A "component" is a piece of software, like an application, a library, a font or a codec. For several components, especially those which are shown in software-centers, we provide specialized metainfo files to define specific properties and data of these components. For example, applications and fonts support screenshots, while codecs don't.
All metainfo files need to contain a minimal amount of information, defined in the "Generic Component" section, which also describes some optional elements which can be used. Specialized components might require more information to be complete and valid. +
+ The XML in metainfo files does not need any XML namespace, and adding one should generally be avoided. If you want to use a namespace though (maybe in case you want to embed the data in other contexts), the xmlns should be https://specifications.freedesktop.org/metainfo/1.0.

2.1. Generic Component

2.1.1. Introduction

For a distribution, it is good to know more about the content of a package. Which public interfaces (libraries? Python modules?) does it provide? Does it contain codecs? Does it contain firmware? Fonts? An application? All of this information can be used to automatically install missing software or to offer users a choice on what they want to install from a software center.
- To provide this information, we created the metainfo files, which allow upstream projects to describe the content of their software package. If a metainfo file provides a <provides/> tag, distributors must also ensure that the package providing the file contain all items referenced by that statement, or is installed by a metapackage depending on packages which provide these items. This gives upstream projects a (very light) way to influence distributor packaging. More information about that can be found below. + To provide this information, we created the metainfo files, which allow upstream projects to describe the content of their software package. If a metainfo file contains a <provides/> tag, distributors must also ensure that the package providing the file contains all items referenced by that statement, or is installed by a metapackage depending on packages which provide these items. This gives upstream projects a (very light) way to influence distributor packaging. More information about that can be found below.
Several specialized component-metainfo files exist, for example for applications or fonts. These are all based on this generic component XML specification, and are described in the following chapters.

2.1.2. Filesystem locations

Upstream projects can ship one or more metainfo files in /usr/share/metainfo/%{id}.metainfo.xml, where id is a unique identifier of this specific component.

Note

- Applications are a special case here, because they are usually treated differently by software centers (and also for historical reasons). If your metainfo file covers only an application, as described in the AppData section, install it as /usr/share/metainfo/%{id}.appdata.xml. + Applications are a special case here, because they are usually treated differently by software centers (and also for historical reasons). If your metainfo file contains an application, as described in Section 2.2, “Desktop Applications”, you may want to install it as /usr/share/metainfo/%{id}.appdata.xml.

Legacy Path

The /usr/share/appdata/ path must be scanned by AppStream tools as well, to support legacy applications installing metadata there. For new software components, it is advised not to use this directory.

2.1.3. XML Specification

- The XML for a generic component definition starts with an <component> tag as root element. The <component> element must at least have an id, name and releases tag, a provides tag with appropriate children is highly recommended. All possible tags in the generic set are: + The XML for a generic component definition starts with a <component> tag as the root element. The <component> element must at least have an id, name and summary tag; and a provides tag with appropriate children is highly recommended. All possible tags in the generic set are:
<id/>
- The <id> tag is a short and unique identifier for this component. It must contain only ASCII characters, dots, hyphens and numbers, spaces are not allowed. Specialized metainfo types, such as application or fonts, may apply additional restrictions on the id tag value. + The <id> tag is a unique identifier for this component. It must contain only ASCII characters, dots, hyphens and numbers. Spaces are not allowed. While hyphens are allowed for legacy compatibility, their usage is strongly discouraged to ensure interoperability of the AppStream ID with other tools such as D-Bus (and thereby making the ID more generic and useful). It is also strongly discouraged to start any segment of the ID with a digit. +
+ The ID must follow a reverse-DNS scheme, consisting of {tld}.{vendor}.{product}, for example org.kde.Gwenview or com.hugski.ColorHug2. Ownership of {vendor}.{tld} in the domain name system guarantees uniqueness of IDs.
- A general pattern for a valid ID tag is to use a reverse URL scheme, consisting of <tld>.<vendor>.<product>.<type>, e.g. org.kde.gwenview.desktop or com.hugski.ColorHug2.firmware. + To increase the uniqueness and to distinguish between different pieces of a software suite, it is suggested to append the type name to the component-id in these cases. For example, one can use com.hugski.ColorHug2 for the client tools to control hardware, and com.hugski.ColorHug2.firmware for the runtime firmware files.
- Note that the value of this tag must be unique across all distributions. In case it is not, distributors are expected to reject the conflicting components from inclusion into their metadata. -
+ Note that the value of this tag must be unique across all distributions and software deployment platforms. In case it is not unique, distributors are expected to reject the conflicting components from inclusion into their metadata and notify the upstream projects about this issue. +
<metadata_license/>
- The <metadata_license/> tag indicates the content licence that you are releasing the one Metainfo XML file under. This is not typically the same as the project licence. Omitting the license value can result in your data not being incorporated into the distribution metadata (so this is a required tag). + The <metadata_license/> tag indicates the content license that you are releasing the one metainfo XML file under. This is typically not the same as the project license. Omitting the license value can result in your data not being incorporated into the distribution metadata (so this is a required tag).
- A permissive license ensures your data can be combined with arbitrary other data in one file. Primissive licence names include: + A permissive license ensures your data can be combined with arbitrary other data in one file (this means copyleft licenses like the GPL are not suitable as metadata license). Valid permissive licenses include:
  • - CC0-1.0 + CC0-1.0
  • - CC-BY-3.0 + CC-BY-3.0
  • - CC-BY-SA-3.0 + CC-BY-SA-3.0
  • - GFDL-1.3 + GFDL-1.3
  • - MIT + MIT +
  • + FSFAP
- The licence codes correspond to the identifiers found at the SPDX OpenSource License Registry. For instance, CC-BY-SA-3.0 corresponds to the license at creativecommons.org/licenses/by-sa/3.0. + The license codes correspond to the identifiers found at the SPDX OpenSource License Registry. For instance, CC-BY-SA-3.0 corresponds to the license at creativecommons.org/licenses/by-sa/3.0.
<name/>
- A human-readable name for this software component. For example, if the component id was "libc", its name might be "GNU Standard C Library". + A human-readable name for this software component. For example, if the component ID was "libc", its name might be "GNU Standard C Library".
<summary/>
A short summary of what this component does. If the component is "PackageKit", the summary could be "Provides a package-management abstraction layer". +
+ ⁠<icon/>
+ The <icon/> tag describes the component icon. It is mostly used for GUI applications (component-type desktop-application). It can be of type stock, local or remote. +
+ stock icons are loaded from the icon stock (the current or hicolor/locolor fallback themes). The icon name must not include any file-extension or path. +
+ local icons are loaded from a file in the filesystem. They should specify a full file path. This icon type may have width and height properties. +
+ remote icons loaded from a remote URL. Currently, only HTTP/HTTPS urls are supported. This icon type should have width and height properties.
<description/>
A long description of this component. Some markup can be used.
- Do not assume the format is HTML. Only paragraph (p), ordered list (ol) and unordered list (ul) are supported at this time. + Do not assume the format is HTML. Only paragraph (p), ordered list (ol) and unordered list (ul) are supported at this time.
In metainfo files, this tag should be translated by-paragraph, meaning that in a translated file, each translated <p/> child has a language property. -
+
+ ⁠<categories/>
+ This tag can contain one or more <category>> entries, describing the categories this software component is associated with. This tag is usually applied to components of type desktop-application, but can be used with any component. A list of valid category names can be found in the Freedesktop menu spec. Example: +
<categories>
+    <category>Game</category>
+    <category>ArcadeGame</category>
+</categories>
<url/>
- Defines URLs for this component.There are several different URL types allowed: + Defines web URLs for this component.There are several different URL types allowed:
homepage
Should be a link to the upstream homepage for the component.
bugtracker
Should point to the software's bug tracking system, for users to report new bugs.
faq
- Should link a FAQ page for this software, to answer some of the most-asked questions in detail, something which you can not do in the component's description. + Should link a FAQ page for this software, to answer some of the most-asked questions in detail, something which you cannot do in the component's description.
help
- Should provide a link to an online user's reference, a software manual or help page. + Should provide a web link to an online user's reference, a software manual or help page.
donation
- Links of this type should point to a webpage showing information on how to donate to the described software project. -
+ URLs of this type should point to a webpage showing information on how to donate to the described software project. +
translate
+ ⁠<launchable/>
+ This optional tag indicates possible methods to launch the software described in this component. It is allowed to appear multiple times in the metainfo data. +
+ The <launchable/> tag has a essential type property indicating the system that is used to launch the component. The following types are allowed: +
desktop-id
+ The application can be launched via a desktop file. The value of the tag is a desktop-file id. +
+ In case a software component has multiple launchable entries, the software center might display a dialog to choose which entry to launch. If possible though, it should be avoided to add multiple launchable tags of type desktop-id. +
service
+ The software can be started, stopped, and monitored by the OS "init" facility, such as systemd. The value of the tag is a name that can be used with that facility, such as a systemd unit name. +
+ Multiple launchable tags of type service are not alternatives to start the same service, but the component does contain multiple services that might all need to be started. +
+ Only those services should be listed as launchables that the user is actually expected to start and stop manually. Services that are started/stopped indirectly via dependencies of other services should not be listed. +
+ For systemd units, the services listed as launchables are expected to support enabling and disabling. +
cockpit-manifest
+ The software can be launched from the menus of the Cockpit admin interface. The value of the tag is the name of a Cockpit package. +
url
+ The application is a web site that is viewed through a browser. The value of the tag is a direct HTTP/HTTPS URL that the browser must navigate to. +
+ Example: +
<launchable type="desktop-id">org.gnome.Sysprof2.desktop</launchable>
<releases/>
The <releases> tag contains <release/> child tags which describe some metainformation about the current release of the described software. The <release/> tag may be present multiple times (for older releases), but a tag for the current version must always be present.
- A release tag can have the properties version, date and timestamp. The date property can have any time in ISO 8601 format as value and should be present for every release. The timestamp tag contains the release time in form of a UNIX epoch. This tag should not be used in metainfo files in newly written metadata, but will still be parsed in case it is present. The the timestamp property is mainly used in generated distro-meadata. In case both release-time tags are present, the timestamp tag will take precedence over date. + A release tag can have the properties version, date and timestamp. The date property can have any time in ISO 8601 format as its value and should be present for every release. The timestamp tag contains the release time in the form of a UNIX epoch. This tag should not be used in metainfo files in newly written metadata, but will still be parsed in case it is present. The timestamp property is mainly used in generated distro-metadata. In case both release-time tags are present, the timestamp tag will take precedence over date.
Optionally, the <release/> tag may also have an urgency property, having one of the following values:
  • - low + low
  • - medium + medium
  • - high + high
  • - critical + critical
The urgency defines how important it is to install the new release as an update. This is especially important for type=firmware components. If no urgency is defined, a medium urgency is implicitly assumed. The urgency defines how the update will be presented to the user, and sometimes if it will be installed automatically and immediately, or delayed.
- Each release tag may have a description tag as child, containing a brief description of what is new in the release. The description tag is structured as described in <description/> + Finally a release tag may have a type property to classify releases with one of the following values: +
  • + stable +
  • + development +
+ By default, if no release type is defined, stable is assumed. A software displaying a listing of releases should only show stable releases and discard any development release if the current version is itself stable. It can show all versions when development versions of the software are also distributed. +
+ Each release tag may have a description tag as child, containing a brief description of what is new in the release. The description tag is structured as described in <description/>.
- A release tag may also have one or multiple size tags as children, which define the installed and download size of this component release. This is useful in case the component does not have a corresponding native package in a distribution, for example if it is a Limba bundle or LVFS firmware. The size type is defined via a type property on the size tag, and may assume the value download or installed. The size itself is set as value and must be given in bytes. + A release tag may also have one or multiple size tags as children, which define the installed and download size of this component release. This is useful in case the component does not have a corresponding native package in a distribution, for example if it is a Limba bundle or LVFS firmware. The size type is defined via a type property on the size tag, and may assume the value download or installed. The size itself is set as the value and must be given in bytes.
Examples for a valid releases tag:
<releases>
@@ -102,39 +160,77 @@
     <size type="download">12345678</size>
     <size type="installed">42424242</size>
   </release>
+  <release version="1.1" type="development" date="2013-10-20" />
   <release version="1.0" date="2012-08-26" />
 </releases>
<provides/>
- The provides tag and it's children describe the public interfaces this application provides. A public interface can be anything which other applications, which are not part of the upstream project, can access or reference. This includes binaries and libraries. Private interfaces should never be added to a provides tag. + The provides tag and its children describe the public interfaces this application provides. A public interface can be anything which other applications, which are not part of the upstream project, can access or reference. This includes binaries and libraries. Private interfaces should never be added to a provides tag.
- A provides tag contain a number of children describing the type and name of the provided public interface items. It is suggested that the build-system auto-generates this tag and it's children. Currently allowed item types are listed below. If you miss something, file a bug against AppStream so we can add the new type. + A provides tag contain a number of children describing the type and name of the provided public interface items. It is suggested that the build system auto-generates this tag and its children. Currently allowed item types are listed below. If you miss something, file a bug against AppStream so we can add the new type.
<library/>
Contains the name of a shared library placed in a publicly accessible library path, such as /usr/lib, /usr/lib/<triplet> or /lib. For example, for the libappstream library, the value for library would be libappstream.so.1.
<binary/>
Name of a binary installed into a location in PATH.
<font/>
- Name of a font provided by this component. For example Linux Libertine O. The tag must have a file property stating the filename of the referenced font. -
- Example: -
<provides>
-  <font file="LinLibertine_R.otf">Linux Libertine O</font>
-</provides>
<modalias/>
- A modalias glob representing the hardware types (for example USB, PCI, ACPI, DMI) this component handles. Useful for installing printer drivers or other USB protocol drivers for smartphones, firmware, kernel drivers which are not merged upstream yet or whatever else. + Full name of a font provided by this component. See Section 2.7, “Fonts” for more information. +
<modalias/>
+ A modalias glob representing the hardware types (for example USB, PCI, ACPI, DMI) this component handles. Useful for installing printer drivers or other USB protocol drivers for smartphones, firmware, and out of tree kernel drivers.
<firmware/>
This provided element is described in details for the firmware component type, where it is mandatory. Please see <provides/> ↪ <firmware/> for more information.
<python2/>
- Name of a Python2 module this component provides. + Name of a Python 2 module this component provides.
<python3/>
- Name of a Python3 module this component provides. + Name of a Python 3 module this component provides.
<dbus/>
- Contains the name of a DBus service as property. The type of the service must be specified using the type property of this tag. Allowed values are user and system. + Contains the well-known name of a D-Bus service as its value. The type of the service must be specified using the type property of this tag. Allowed values are user and system.
Example:
<provides>
   <dbus type="system">org.freedesktop.PackageKit</dbus>
-</provides>
+</provides>
<id/>
+ ⁠<requires/> & <recommends/>
+ The requires tag denotes an absolute requirement on a different system component. A component can require a certain hardware to be present, or kernel, or other component to be installed first. If a requirement is not met, AppStream clients should prevent the installation of the particular software component. +
+ If it is not essential that a certain requirement is met by the system, but just recommended to be available, a recommends tag should be used. In this case, AppStream clients should allow the installation of the software component, but may display a warning before allowing it. +
+ A requires or recommends tag contains children describing the type, value and version relation of the required item. Each child can have a version and a compare property, to allow depending on a certain minimal version of the respective item. The version property contains the version to be compared against, while the compare property contains a two-letter code denoting how to compare the version of a present item with the version listed in the property. If no compare property is given, but a version property is found, AppStream implementations should implicitly assume a value of ge for comparison of the versions. The installed version is on the left side of the required version when comparing them. Possible two-letter codes for version comparisons are: +
  • + eq - Equal to +
  • + ne - Not equal to +
  • + lt - Lesser than +
  • + gt - Greater than +
  • + le - Lesser than or equal to +
  • + ge - Greater than or equal to +
+ Possible item types to declare a requirement on or a recommendation for are: +
<id/>
+ A relation to another software component. The value should be another component-ID. Example: +
<requires>
+  <id version="1.0" compare="ge">org.example.MySoftware</id>
+</requires>
<modalias/>
+ Check for a specific hardware to be present via its modalias. The modalias may contain a wildcard expression. Example: +
<recommends>
+  <modalias>usb:v1130p0202d*</modalias>
+</recommends>
<kernel/>
+ Check for a specific kernel to be running on the system. The kernel name is the output of uname -s. Example: +
<requires>
+  <kernel version="4.14" compare="ge">Linux</kernel>
+</requires>
<memory/>
+ Set a relation to the amount of physical memory (RAM) the system should have to run the software component. The memory size is set in MiB. You usually only want to use this with the recommends tag, because users might want to install the software on systems even if they have a lesser amount of memory compared to what would be ideal. Example: +
<recommends>
+  <memory>2048</memory> <!-- recommend at least 2GiB of memory -->
+</recommends>
<mimetypes/>
- This tag can contain one or more <mimetype/> children, describing the mime types this application supports. This tag is especially useful for generic components and addon-type components. For applications, the metadata will automatically be fetched from their .desktop files by the distribution's metadata generator. Example: + This tag can contain one or more <mimetype/> children, describing the MIME types this application supports. This tag is especially useful for generic components and addon-type components. For applications, the metadata will automatically be fetched from their .desktop files by the distribution's metadata generator. Example:

 <mimetypes>
     <mimetype>text/html</mimetype>
@@ -142,22 +238,20 @@
     <mimetype>application/rss+xml</mimetype>
  </mimetypes>
<project_group/>
- If you include the <project_group/> tag then this identifies your project with a specific upstream umbrella project. Known values include GNOME, KDE, XFCE, MATE and LXDE, although other umbrella projects like Yorba or Mozilla make sense too. + If you include the <project_group/> tag then this identifies your project with a specific upstream umbrella project. Known values include GNOME, KDE, XFCE, MATE and LXDE, although other umbrella projects like Yorba or Mozilla make sense too.

Note

- You should only identify with an umbrella project if you use all their infrastructure and policies, for instance string freezes dates, bugtracker and source control instance. + You should only identify with an umbrella project if you use all their infrastructure and policies, for instance string freezes dates, bugtracker and source control instance.
<project_license/>
- The <project_license/> tag is indicating the license of the component (application/library/addon/font/etc.) described in the metadata document. It should be a string in SPDX format. Licenses may be combined using and and or logic. Possible values include: + The <project_license/> tag is indicating the license of the component (application/library/addon/font/etc.) described in the metadata document. It should be a SPDX license expression. Possible values include:
  • - GPL-2.0 -
  • - LGPL-3.0+ and GPL-3.0+ + GPL-2.0
  • - MIT + LGPL-3.0+ AND GPL-3.0+
  • - CC-BY-SA-2.0 + MIT
  • - ... + CC-BY-SA-2.0
A full list of recognized licenses and their identifiers can be found at the SPDX OpenSource License Registry.
@@ -173,39 +267,104 @@ ⁠<screenshots/>
Visual components (like fonts or graphical applications) may choose to add one or multiple screenshots to their metadata.
- The <screenshots/> tag contains multiple <screenshot/> children, where at least one of them must have the property type="default" to indicate the application's primary screenshot. Every <screenshot/> tag must have at least one <image/> child, which should define the width and height of the referenced image in it's properties. The value of the <image/> tag is a direct URL to a screenshot uploaded to a public location on the web. + The <screenshots/> tag contains multiple <screenshot/> children, where at least one of them must have the property type="default" to indicate the primary screenshot of the software. Every <screenshot/> tag must have at least one <image/> child. +
+ The value of the <image/> tag is a direct HTTP/HTTPS/FTP URL to a screenshot uploaded to a public location on the web. The <image/> tag may have the following properties: +
  • + type +
    + The type of the image: source for the source image, and thumbnail for a thumbnail image. In case the type is thumbnail, the width and height properties must be present. +
  • + width +
    + The width of the image in pixels. +
  • + height +
    + The height of the image in pixels. +
  • + xml:lang +
    + The language this screenshot image is translated in. This property should only be present if there are multiple images with different locales present. +
+ +
+ Optionally, a <screenshot/> tag may have a translatable <caption/> child, defining a short (ideally not more than 256 characters) description of what the user can see on the referenced screenshot.
- Optionally, a <screenshot/> tag may have a <caption/> child, defining a short (not more then 255 characters!) description of what the user can see on the referenced screenshot. + Ideally, all screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620 pixels. They should also be in be in PNG or JPEG format. PNG is the preferred format; JPEG should only be used when screenshots include large photographs or other images where a lossy format like JPEG may compress better.
- Ideally, all screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620px. They should also be in be in PNG or JPEG format. PNG is the preferred format; JPEG should only be used when screenshots include large photographs or other images where a lossy format like JPEG may compress better. -
+ Example: +
<screenshots>
+  <screenshot type="default">
+    <caption>The FooBar main window.</caption>
+    <image type="source" width="1600" height="900">https://example.com/foobar/screenshot-1.png</image>
+  </screenshot>
+  <screenshot>
+    <caption>Foobar showing the frobnicate functionality.</caption>
+    <image type="source" width="1600" height="900">https://example.com/foobar/screenshot-2.png</image>
+  </screenshot>
+ </screenshots>
<update_contact/>
- The <update_contact/> tag is an optional tag which can be added to provide an email address distributors can use to contact the project about invalid or incomplete metadata, or in case the specification has changed, about old metadata. It can also be used to ask general questions in case of an update of the component described in the metadata file. + The <update_contact/> tag is an optional tag which can be added to provide an email address distributors can use to contact the project about invalid or incomplete metadata or – in case the specification has changed – about old metadata. It can also be used to ask general questions in case of an update of the component described in the metadata file.
The <update_contact/> tag must only be used by distributors. It is not included in the distribution-provided AppStream XML file, and therefore not exposed to the end user via any kind of UI.
- Upstream authors might decide to add an email address in cleartext, but spam protection using _AT_ is also valid. + Upstream authors might decide to add an email address in cleartext, but spam protection using _AT_ is also valid. The value of this tag is generally treated a case-insensitive way.
Example:
<update_contact>developer_AT_example.com</update_contact>
<translation/>
The <translation/> tag is an optional tag which can be added to specify the translation domain used for this software component. It may be used by the AppStream distro metadata generator to determine the translation status of the respective software.
- The tag must have a type property, assuming the value of the translation system which is used. Right now, allowed trabslation systems and values for type are: + The tag must have a type property, assuming the value of the translation system which is used. Right now, allowed translation systems and values for type are:
  • - gettext + gettext
  • - qt + qt
In case a software components gets its translation from multiple translation domains, the <translation/> tag may be defined more than once.
Example: -
<translation type="gettext">foobar</translation>
+
<translation type="gettext">foobar</translation>
+ ⁠<suggests/>
+ The <suggests/> tag is an optional tag which can be added to specify the component-ids of other software this components suggests. Software centers might present the suggested software on the installation page of the described component. +
+ The tag may have a type property, with the value upstream, indicating that this suggestion originates from the upstream project. If no type property is given, upstream is implicitly assumed as value. Metainfo files must not define other suggests types, those are reserved for AppStream catalog XML (see <suggests/> in catalog XML). +
+ The suggests tag must have one or more <id/> tags as children, specifying the IDs of the suggested other software components. +
+ Example: +
<suggests>
+  <id>org.kde.gwenview.desktop</id>
+  <id>org.inkscape.Inkscape</id>
+</suggests>
+ ⁠<content_rating/>
+ The <content_rating/> tag is an optional tag which can be added to specify age ratings for the respective software components. These maybe be used for parental control or to display their information in software centers. +
+ The tag must have a type property, indicating the type of the rating system that is used. At the moment, the Open Age Ratings Service (value oars-1.0) is supported natively, but more services might be added in future. +
+ The <content_rating/> must have <content_attribute/> children which each have an id property indicating the specific section that is rated. Their value indicates the intensity of the rated section and can be one of: +
  • + none - no rating given +
  • + mild +
  • + moderate +
  • + intense +
+ The website of the Open Age Ratings Service provides an online form which will automatically generate AppStream compatible markup based on a set of questions answered about the content. +
+ Example: +
<content_rating type="oars-1.0">
+  <content_attribute id="drugs-alcohol">moderate</content_attribute>
+  <content_attribute id="language-humor">mild</content_attribute>
+</content_rating>
An example for a very basic component file could look like this:

 <?xml version="1.0" encoding="UTF-8"?>
 <component>
-  <id>foobar</id>
+  <id>com.example.foobar</id>
   <name>Foo Bar</name>
   <summary>A foo-ish bar</summary>
   <url type="homepage">http://www.example.org</url>
diff -Nru appstream-0.9.4/docs/html/chap-Quickstart.html appstream-0.12.0/docs/html/chap-Quickstart.html
--- appstream-0.9.4/docs/html/chap-Quickstart.html	2016-04-18 14:19:38.000000000 +0000
+++ appstream-0.12.0/docs/html/chap-Quickstart.html	2018-04-04 15:53:50.000000000 +0000
@@ -1,15 +1,15 @@
 
-Chapter 4. Metadata Quickstart

Product SiteDocumentation Site

- ⁠Chapter 4. Metadata Quickstart

+Chapter 4. Metadata Quickstart

Product SiteDocumentation Site

+ ⁠Chapter 4. Metadata Quickstart

These pages are designed to give upstream authors compressed information on how to write metadata for their applications. The documents describe just the basic information, and don't resemble the whole specification, to give upstreams an easy way to get started with AppStream.

4.1. For GUI application upstream maintainers

4.1.1. Introduction

Every software center that exists allows the user to look at screenshots and a long description of the application before it is installed. For most users it allows them to answer the question Do I want to install this application?. Traditionally in Linux distributions, we have none of this data for the vast majority of our desktop user-installable applications. The packages-descriptions are describing all contents of a package, and not just a single application. They are also often written in a technical language and refer to other packages, which makes it hard for beginners to understand what the application they want to install really does. Additionally, if you are not using Debian or Ubuntu, the package descriptions are often untranslated. Also, packages do not provide some metadata users might be interested in before installing an application.
- To solve this, we have defined a new data file, which the upstream project can optionally translate using the same technique as Desktop files or GSetting schemas. The AppData specification is a subset of the AppStream metadata (see Section 3.1, “AppStream distribution XML files”) and extends the generic component metadata with fields specific for applications (see Section 2.1, “Generic Component”). + To solve this, we have defined a new data file, which the upstream project can optionally translate using the same technique as Desktop files or GSetting schemas. The AppData specification is a subset of the AppStream metadata (see Section 3.1, “AppStream collection XML”) and extends the generic component metadata with fields specific for applications (see Section 2.1, “Generic Component”).
- The AppData files override any values which are automatically fetched by the AppStream data generator. Applications can ship one or more files in /usr/share/appdata/%{id}.appdata.xml. + The AppData files override any values which are automatically fetched by the AppStream data generator. Applications can ship one or more files in /usr/share/metainfo/%{id}.appdata.xml.
AppData files can - just like all other metainfo files - be translated. See the section about translation for more information about that.

Note

@@ -20,9 +20,9 @@

 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Copyright 2013 First Lastname <your@email.com> -->
-<component type="desktop">
-  <id>gnome-power-statistics.desktop</id>
-  <metadata_license>CC0</metadata_license>
+<component type="desktop-application">
+  <id>org.gnome.gnome-power-statistics</id>
+  <metadata_license>FSFAP</metadata_license>
   <project_license>GPL-2.0+</project_license>
   <name>Power Statistics</name>
   <summary>Observe power management</summary>
@@ -44,13 +44,15 @@
     </p>
   </description>
 
+  <launchable type="desktop-id">org.gnome.gnome-power-statistics.desktop</launchable>
+
   <screenshots>
     <screenshot type="default">
       <caption>The options dialog</caption>
-      <image width="800" height="600">http://www.hughsie.com/en_US/main.png</image>
+      <image>http://www.hughsie.com/en_US/main.png</image>
     </screenshot>
     <screenshot>
-      <image width="800" height="600">http://www.hughsie.com/en_US/preferences.png</image>
+      <image>http://www.hughsie.com/en_US/preferences.png</image>
     </screenshot>
   </screenshots>
 
@@ -73,10 +75,16 @@
       ⁠4.1.3. Recommended metadata file contents

This is a list of tags you might want to define for your application. For a full list of all possible tags, take a look at the definition of a generic component (Section 2.1.3, “XML Specification”) and an application-component (Section 2.2.2, “File specification”).
<id/>
- For applications, the <id/> tag value must be the same name as the installed .desktop file for the application. + The <id/> tag value contains the unique identifier for this application. It is usually modeled after the .desktop filename and follows a reverse-DNS scheme. For the full naming guidelines see <id/>. +
+ Example: If your application's .desktop file is named org.example.FooBar.desktop, a good component-id would be org.example.FooBar.
<metadata_license/>
- The <metadata_license/> tag is indicating the content license that you are releasing the one metadata file as. This is not typically the same as the project license. By ommitting the license value would probably mean your data would not be incorporated into the distribution metadata. Permissible license codes include: + The <metadata_license/> tag is indicating the content license that you are releasing the one metainfo file under. This is not typically the same as the project license. Omitting the license value can result in your data not being incorporated into the distribution metadata (so this is a required tag). +
+ A permissive license ensures your data can be combined with arbitrary other data in one file, without license conflics (this means copyleft licenses like the GPL are not suitable as metadata license). Possible license identifiers include:
  • + FSFAP +
  • CC0-1.0
  • CC-BY-3.0 @@ -91,9 +99,13 @@
<project_license/>
The <project_license/> tag is indicating the license(s) this application is released under. Take a look at the specification of the <project_license/> tag for details on how to properly use it.
<name/>
- While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this. + While this tag is always requited for a generic component, for an application metainfo file it is not necessary, but only recommended. You can omit this tag if you want the software center to have the same strings as defined in the Name field of the .desktop file. In that case, one <launchable/> tag must be present. +
+ If no name tag and no Name field is present, the metadata is considered invalid and might be ignored by the AppStream generator.
<summary/>
- While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this. + While this tag is always requited for a generic component, for a desktop-application metainfo file it is only essential if the accompanying .desktop file does not have a Comment= field. Data from a .desktop file is only taken into consideration if one <launchable/> tag is present. If the metainfo file has a summary, it wil override the value found in the Comment field of the .desktop file. +
+ If no summary tag and no Comment field is present, the metadata is considered invalid and might be ignored by the AppStream generator.
<description/>
The long description is an important part of the file. Important things to consider when writing the application description:
  • @@ -124,11 +136,18 @@ Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time.
    In metainfo files, this tag should be translated by-paragraph, meaning that in a translated file, each translated <p/> child has a language property. -
+
+ ⁠<launchable/>
+ This tag indicates a possible method to launch the software. Usually you want the application to be launchable by its .desktop file ID. +
+ The tag makes it possible for software centers to offer launching an application immediately after installation. It also connects the metainfo file with a .desktop file, so AppStream metadata generators and the distribution can absorb its metadata into the final AppStream output. +
+ See <launchable/> for a detailed description of the tag. Example: +
<launchable type="desktop-id">org.gnome.Sysprof2.desktop</launchable>
<screenshots/>
A screenshot presents your application to the outside world, and could be seen by hundreds or thousands of people.
- The <screenshots/> tag contains multiple <screenshot/> children, where at least one of them must have the property type="default" to indicate the application's primary screenshot. Every <screenshot/> tag must have at least one <image/> child, which should define the width and height of the referenced image in it's properties. The value of the <image/> tag is a direct URL to a screenshot uploaded to a public location on the web. + The <screenshots/> tag contains multiple <screenshot/> children, where at least one of them must have the property type="default" to indicate the application's primary screenshot. Every <screenshot/> tag must have at least one <image/> child, which may define the width and height of the referenced image in it's properties. The value of the <image/> tag is a direct URL to a screenshot uploaded to a public location on the web.
Optionally, a <screenshot/> tag may have a <caption/> child, defining a short (not more than 180 characters!) description of what the user can see on the referenced screenshot.
@@ -217,13 +236,13 @@ Example:
<update_contact>developer_AT_example.com</update_contact>

4.1.4. Suggested metadata file contents

- You may choose to add these tags as well, if you need them. -
<provides/>
- This tag is described in detail for generic components at <provides/>. + It is useful to add these tags as well if they make sense for the described application. They are not strictly required to be present though. +
<releases/>
+ The application metainfo may include one <releases/> tag, which has one or multiple <release/> subnodes to define the version and release date of this application. For details, see <releases/> .
- If your application ships a binary in a location in the default PATH, you should add at least a child of type <binary/> to make that new executable known to the distribution. -
<releases/>
- The application metainfo should at least provide one <releases/> tag, which has one or more <release/> childs to define the version and release date of this application. For details, see <releases/> . + It is very useful to attach short release-notes to a <release/> using the <description/> subnode. These release-notes should contain brief information about what is new in the release, in a way which is understandable by non-technical users. +
<provides/>
+ This tag is described in detail for generic components at <provides/>.
- Additionally, the <release/> might be described in a short manner using the <description/> child tag, which should give brief information about what is new in the release, in a way which is understandable by non-technical users. + If your application ships a binary in a location in the default PATH, it is useful to add at least a child of type <binary/> to make it easily possible to find your application's metadata using the name of its binary.
\ No newline at end of file Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/10.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/10.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/11.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/11.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/12.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/12.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/13.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/13.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/14.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/14.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/15.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/15.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/16.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/16.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/17.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/17.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/18.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/18.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/19.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/19.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/1.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/1.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/20.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/20.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/21.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/21.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/22.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/22.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/23.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/23.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/24.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/24.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/25.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/25.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/26.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/26.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/27.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/27.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/28.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/28.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/29.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/29.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/2.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/2.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/30.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/30.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/31.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/31.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/32.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/32.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/33.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/33.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/34.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/34.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/35.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/35.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/36.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/36.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/37.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/37.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/38.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/38.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/39.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/39.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/3.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/3.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/40.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/40.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/4.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/4.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/5.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/5.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/6.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/6.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/7.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/7.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/8.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/8.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/9.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/9.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/dot2.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/dot2.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/dot.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/dot.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/green.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/green.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/h1-bg.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/h1-bg.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/image_left.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/image_left.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/image_right.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/image_right.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/important.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/important.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/note.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/note.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/red.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/red.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/shine.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/shine.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/stock-go-back.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/stock-go-back.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/stock-go-forward.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/stock-go-forward.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/stock-go-up.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/stock-go-up.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/stock-home.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/stock-home.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/title_logo.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/title_logo.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/warning.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/warning.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/watermark-draft.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/watermark-draft.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/Common_Content/images/yellow.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/Common_Content/images/yellow.png differ diff -Nru appstream-0.9.4/docs/html/images/appstream-button1.svg appstream-0.12.0/docs/html/images/appstream-button1.svg --- appstream-0.9.4/docs/html/images/appstream-button1.svg 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/images/appstream-button1.svg 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru appstream-0.9.4/docs/html/images/appstream-button2.svg appstream-0.12.0/docs/html/images/appstream-button2.svg --- appstream-0.9.4/docs/html/images/appstream-button2.svg 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/images/appstream-button2.svg 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/images/appstream-logo.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/images/appstream-logo.png differ diff -Nru appstream-0.9.4/docs/html/images/appstream-logo.svg appstream-0.12.0/docs/html/images/appstream-logo.svg --- appstream-0.9.4/docs/html/images/appstream-logo.svg 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/images/appstream-logo.svg 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/images/architecture.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/images/architecture.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/images/architecture-small.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/images/architecture-small.png differ diff -Nru appstream-0.9.4/docs/html/images/architecture.svg appstream-0.12.0/docs/html/images/architecture.svg --- appstream-0.9.4/docs/html/images/architecture.svg 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/images/architecture.svg 2018-04-04 15:53:50.000000000 +0000 @@ -9,15 +9,15 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1322.3459" - height="1122.6986" + width="1243.0377" + height="1102.6987" id="svg2" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="architecture.svg" inkscape:export-filename="/home/matthias/Development/AppStream/appstream/docs/sources/images/architecture.png" - inkscape:export-xdpi="81.847435" - inkscape:export-ydpi="81.847435"> + inkscape:export-xdpi="79.659111" + inkscape:export-ydpi="79.659111"> + originx="531.3541" + originy="-88.87497" /> @@ -89,7 +89,7 @@ image/svg+xml - + @@ -97,30 +97,32 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" - transform="translate(551.12497,139.21139)"> + transform="translate(531.3541,139.21139)"> - Ratings- Comments + x="-478" + y="480.36218" + id="tspan3100" + style="font-size:35px">- Ratings- Comments app-icons.tar.gz + y="503.39734">app-icons.tar.gz @@ -201,28 +203,28 @@ sodipodi:nodetypes="cc" /> distro-components.xml + sodipodi:role="line">components.xml @@ -230,39 +232,39 @@ style="fill:none;stroke:#000096;stroke-width:6.25;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect3058" width="900" - height="300" + height="280.00018" x="-200" y="672.36218" ry="20.000143" /> ComposeComposeserver Mirror + x="558" + y="528.36224">Mirror package file Client + x="560" + y="188.36221">Client SoftwareCenter + style="text-align:center;text-anchor:middle" + id="tspan4219">Center FeedbackFeedbackServer PackageKit - extract metadata- extract metadata (metainfo files, desktop files, pkg-config, ...)- construct metadata + style="font-size:30px">- construct metadata (AppStream collection XML or YAML) xapian database + sodipodi:role="line">cache / data pool oauth + x="-396" + y="184.36218">oauth stemming Rebuild onRebuild onrepo-compose + x="238" + y="642.67407">repo-compose ExistingPackagemetadata - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - PackageKit Daemon - - - Xapian Database - - - AppStream Plugin - - - - AppInstallDesktop-File - - AppStreamXML - - DEP-11YAML - Application data sources - - - - - - libappstream - - - - Client(software-center, ...) - - - - Client - - - - - - Icons - Screenshots - - Ratings - Reviews - - - - Icons - Screenshots - - Ratings - Reviews - - - - - - - - diff -Nru appstream-0.9.4/docs/html/images/old_libas_architecture.svg appstream-0.12.0/docs/html/images/old_libas_architecture.svg --- appstream-0.9.4/docs/html/images/old_libas_architecture.svg 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/images/old_libas_architecture.svg 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,609 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + PackageKit Daemon + + + Cache + + + AppStream Plugin + + + + AppInstallDesktop-File + + AppStreamXML + + DEP-11YAML + Application data sources + + + + + + libappstream + + + + Client(software-center, ...) + + + + Client + + + + + + Icons + Screenshots + + Ratings + Reviews + + + + Icons + Screenshots + + Ratings + Reviews + + + + + + + + Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/html/images/pure_architecture.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/html/images/pure_architecture.png differ diff -Nru appstream-0.9.4/docs/html/images/pure_architecture.svg appstream-0.12.0/docs/html/images/pure_architecture.svg --- appstream-0.9.4/docs/html/images/pure_architecture.svg 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/images/pure_architecture.svg 2018-04-04 15:53:50.000000000 +0000 @@ -9,8 +9,8 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1712.7344" - height="1122.3687" + width="1704.8438" + height="1102.3687" id="svg2" version="1.1" inkscape:version="0.91 r13725" @@ -71,8 +71,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.7" - inkscape:cx="721.1945" - inkscape:cy="572.57212" + inkscape:cx="799.98376" + inkscape:cy="438.28641" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -92,8 +92,8 @@ visible="true" enabled="true" snapvisiblegridlinesonly="true" - originx="891.12503px" - originy="-69.20491px" /> + originx="891.12503" + originy="-89.204905" /> @@ -103,7 +103,7 @@ image/svg+xml - + @@ -117,28 +117,30 @@ - Ratings- Ratings- Comments + y="521.86218" + id="tspan3102" + style="font-size:30px">- Comments + style="fill:#dcdcdc;fill-opacity:1;stroke:#000096;stroke-width:3.68415523;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> component-data.xml app-icon-images server Mirror metadata package file Client FeedbackFeedbackServer oauth Rebuild onrepo-compose Server - Screenshot + x="-840" + y="428.36218" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Open Sans';-inkscape-font-specification:'Open Sans'">ScreenshotServer One server perOne server perdistro or 3rdparty repo One or oneOne or oneper distro http http screen shot servers + id="tspan8533">screenshot servers -AppStream

Product SiteDocumentation Site

AppStream 0.9

AppStream

Infrastructure for distro-agnostic software-centers and software metadata handling

Edition 1

+AppStream

Product SiteDocumentation Site

AppStream 0.12

AppStream

Infrastructure for distro-agnostic software-centers and universal software component metadata

Edition 1

-

Matthias Klumpp

Debian

Michael Vogt

Canonical / Ubuntu / Debian

Richard Hughes

Fedora / Red Hat

Vincent Untz

OpenSUSE

Legal Notice

- Copyright © 2012-2016 Matthias Klumpp. This material may only be distributed subject to the terms and conditions set forth in the GNU Free Documentation License (GFDL), V1.2 with no invariant sections or later (the latest version is presently available at http://www.gnu.org/licenses/fdl.txt). +

Matthias Klumpp

Debian

Michael Vogt

Canonical / Ubuntu / Debian

Richard Hughes

Fedora / Red Hat

Vincent Untz

OpenSUSE

Legal Notice

+ Copyright © 2012-2018 Matthias Klumpp. This material may only be distributed subject to the terms and conditions set forth in the GNU Free Documentation License (GFDL), V1.2 with no invariant sections or later (the latest version is presently available at http://www.gnu.org/licenses/fdl.txt).

Abstract

- AppStream is a cross-distro effort for enhancing the way we interact with the software repositories provided by the distribution by standardizing sets of additional metadata. + AppStream is a collaborative effort for enhancing the way we interact with the software repositories provided by the distribution by standardizing sets of additional metadata.
- AppStream provides the foundation to build software-center applications. It additionally provides specifications for things like an unified software metadata database, screenshot services and various other things needed to create user-friendly application-centers for (Linux) distributions. -
\ No newline at end of file + AppStream provides the foundation to build software-center applications. It additionally provides specifications for things like an unified software metadata database, screenshot services and various other things needed to create user-friendly application-centers for software distributions. + \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/ix01.html appstream-0.12.0/docs/html/ix01.html --- appstream-0.9.4/docs/html/ix01.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/ix01.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,3 +1,3 @@ -Index

Product SiteDocumentation Site

- ⁠Index

\ No newline at end of file +Index

Product SiteDocumentation Site

+ ⁠Index

\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-AppStream-DEP11.html appstream-0.12.0/docs/html/sect-AppStream-DEP11.html --- appstream-0.9.4/docs/html/sect-AppStream-DEP11.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-AppStream-DEP11.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,376 +0,0 @@ - -3.2. Debian DEP-11 specification

Product SiteDocumentation Site

- ⁠3.2. Debian DEP-11 specification

- ⁠3.2.1. Introduction

- DEP-11 is a YAML implementation of the AppStream Distro specification, which is primarily used by Debian and its derivatives. This document describes the DEP-11 YAML. All AppStream support libraries available today are able to read both the YAML and the XML specification. -

Important

- If you want to use AppStream in your distribution, and are not based on Debian, please use the XML specification (unless you have strong reasons for preferring YAML). XML is the official format for AppStream Distro metadata. -
- The DEP-11 YAML metadata can be validated for correctness using the dep11-validate tool from the AppStream DEP-11 utils. -
- Fields not mentioned in this document are not recognized by DEP-11 YAML parsers. -

- ⁠3.2.2. File naming and location

- Take a look at Section 3.1.2, “File naming and location” for AppStream XML files. While the XML data belongs into the xmls subdirectory in /usr/share/app-info (or /var/cache/app-info), the YAML data is stored in the yaml subdirectory. All other rules affecting the XML apply the DEP-11 YAML as well, including the recommendation to compress the files with gzip. -

- ⁠3.2.3. General DEP-11 YAML structure

- Each YAML file starts with a header document, which defines the basic properties of the metadata, which is followed by the actual metadata in form of one YAML document per AppStream component. -
- The header document contains the following fields, all of them are required or at least strongly recommended. -
File
- This field identifies the file as DEP-11 file. Its value is always DEP-11. -

Field info: value-type:strrequired:yes

Version
- The version of the AppStream specification this file was built for. -

Field info: value-type:strrequired:yes

Origin
- Defines the repository-id this file belongs to. This usually matches the filename without extension. On Debian systems, it is the <suite>-<component> combination, e.g. jessie-main. -

Field info: value-type:strrequired:yes

MediaBaseUrl
- The base URL for media (screenshots, icons, ...) referenced in the metadata file. If this is set, all urls in the document referencing media will be treated relative to the base url. -

Field info: value-type:strrequired:no

Architecture
- Defines the architecture this data belongs to. This information is useful to resolve AppStream-ID conflicts on multiarch systems, which appear if the user has metadata for two architectures installed. -

Field info: value-type:strrequired:no

Priority
- The priorization of this metadata file over other metadata. -

Field info: value-type:intrequired:no

- ⁠3.2.4. Translated fields

- Fields with translated values follow the following conventions: -
  1. - They are of type dict -
  2. - They must contain a key C, with the untranslated string as value -
  3. - All languages are represented with their locale name as key in the dict and the translated content as value (which is of type str, unless explicitly stated otherwise) -
- In this document, the type localized is used to indicate that the field contains translated values following this schema. -
- Example for a translated Name field: -
Name:
-  C: I am the untranslated string.
-  be@latin: Redaktar naładaŭ
-  bg: Настройки на програмите
-  pl: Edytor konfiguracji

- ⁠3.2.5. Valid fields

- This document describes all valid fields in the DEP-11 YAML specification. The requirements for the values are exactly the same as in the XML specification, and each field links to its correspondent XML tag for reference. -
- ⁠ID
- The ID field is a short unique and usually lower-cases identifier for the component. Depending on the component's type, different naming conventions apply. -
- See <id/>. -

Field info: value-type:strrequired:yes

- ⁠Priority
- The Priority field sets the priority this component's metadata should have over other meadata in the pool. Data with a higher priority replaces data with a lower priority. -

Field info: value-type:intrequired:no

- ⁠Type
- The type of this component. Allowed values are: -

Field info: value-type:strrequired:yes

- ⁠Package
- The name of the package which needs to be installed in order to make this component available on the system. -
- See <pkgname/>. -

Field info: value-type:strrequired:yes

- ⁠SourcePackage

Field info: value-type:str

- ⁠Name
- See <name/>. -

Field info: value-type:localizedrequired:yes

- ⁠Summary
- See <summary/>. -

Field info: value-type:localizedrequired:yes

- ⁠ProjectLicense

Field info: value-type:str

- ⁠Description
- See <description/>. -
- The markup for the description is the same as in the XML specification, so it can be read by anything parsing basic HTML markup. -

Field info: value-type:localized

- ⁠Url
- See <url/>. -
- The Url field contains the different url types as keys in its dict. Valid url types are defined in the main AppStream XML specification. All URL types must be lowercased. -
- Example: -
Url:
-  homepage: http://example.org
-  faq: http://example.org/faq
-  bugtracker: http://bugs.example.org/report-issue

Field info: value-type:dict

- ⁠ProjectGroup
- See <project_group/>. -

Field info: value-type:str

- ⁠Icon
- See <icon/>. -
- The Icon field has the different icon types as keys for its dict. -
stock
- Contains the stock icon name. -

Field info: value-type:str

cached
- Contains a list of dictionaries with the keys width and height of type int specifying the dimensions of the icon, as well as the key name of type str specifying the name of the icon in the cache. -

Field info: value-type:list ➟ dict

local
- Contains a list of dictionaries with the keys width and height of type int specifying the dimensions of the icon, as well as the key name of type str specifying the absolute filename pointing to the right icon. -

Field info: value-type:list ➟ dict

remote
- Contains a list of dictionaries with the keys width and height of type int specifying the dimensions of the icon, as well as the key url of type str which contains a HTTP(S) or FTP URL to the icon. -

Field info: value-type:list ➟ dict

Field info: value-type:dict

- ⁠Categories
- See <categories/>. -
- This field follows its XML counterpart in almost all regards. The different XDG menu category names are encoded in the list, and are of type str. -
- Example: -
Categories:
-  - GNOME
-  - GTK
-  - Network
-  - Telephony

Field info: value-type:list

- ⁠Keywords
- See <keywords/>. -
- This field contains the keywords for this component. The keys define the locales for the respective language, the values are of type list and contain the list of keywords for the respective language. An unlocalized C key must be present. -
- Example: -
Keywords:
-  C:
-    - IDE
-    - development
-    - programming
-  de:
-    - IDE
-    - entwicklung
-    - programmierung

Field info: value-type:translated(list)

- ⁠Screenshots
- See <screenshots/>. -
- The Screenshots field contains a list of screenshots. A screenshot is of type dict and contains the following keys: -
default
- If default is true, the screenshot is selected as default screenshot. There has to be at least one screenshot which is marked as default. -

Field info: value-type:bool

source-image
- Describes the source image for this screenshot. It has the following keys: -
  • - height, describing the image height (value-type:int) -
  • - width, describing the image width (value-type:int) -
  • - url, the full image url, or the url component added to AssetsUrl, if defined (value-type:str) -

Field info: value-type:dictrequired:yes

thumbnails
- A list of an arbitrary number of screenshots. All screenshots are of type dict and must contain the same keys as described for source-image. -

Field info: value-type:list

caption
- A caption for this screenshot. -

Field info: value-type:localized

- Example for a Screenshots field containing one screenshot: -
Screenshots:
-  - default: true
-    caption:
-      C: Foobar showing kitchen-sink functionality
-      si: Foobar shoeewing kischän-sünk funzionality
-    source-image:
-      height: 800
-      url: http://www.example.org/en_US/main.png
-      width: 600
-    thumbnails:
-      - height: 423
-        width: 752
-        url: http://www.example.org/en_US/main-large.png
-      - height: 63
-        width: 112
-        url: http://www.example.org/en_US/main-small.png

Field info: value-type:list

- ⁠CompulsoryForDesktop

Field info: value-type:str

- ⁠Provides
- See <provides/>. -
- The Provides field is of type dict and can have the following keys set with the described allowed values: -
libraries
- A list of provided library names. -

Field info: value-type:list(str)

binaries
- A list of provided binaries in PATH. -

Field info: value-type:list(str)

mimetypes
- A list of mimetypes this component can handle. -

Field info: value-type:list(str)

firmware
- A list of provided firmware. Each firmware entry is of type dict and has a type key, which has either runtime or flashed as value. Firmware of type flashed has a guid key, containing the GUID of the device the firmware is flashed on, while firmware of type runtime has a fname key, containing the firmware filename which the kernel is looking for. -

Field info: value-type:list(dict)

dbus
- A list of provided DBus services. Each service entry in the list is of type dict and has a type key, which has either system or user as value. user means the DBus service name is for a user/session service, while system means it describes a system service. The service key contains the name of the DBus service file. All dict values are of type str. -

Field info: value-type:list(dict)

Field info: value-type:dict

- ⁠DeveloperName

Field info: value-type:localized

- ⁠Releases
- See <releases/>. -
- The Releases contains a list of releases, where each list items contains the following fields/keys: -
version
- The version number of this release. -

Field info: value-type:strrequired:yes

unix-timestamp
- The UNIX timestamp of when this software was released. -
- One of the unix-timestamp or date fields must be present. -

Field info: value-type:intrequired:maybe

date
- The ISO 8601 date of when this software was released. -
- One of the unix-timestamp or date fields must be present. -

Field info: value-type:strrequired:maybe

description
- A description of this release. May contain allowed HTML markup. -

Field info: value-type:localized

- It is recommended to order this list starting with the latest timestamp to the olderst one. -
- Example: -
Releases:
-  - version: '1.8'
-    unix-timestamp: 1424116753
-    description:
-      C: |
-        <p>This stable release fixes the following bug:</p>
-        <ul>
-          <li>CPU no longer overheats when you hold down spacebar</li>
-        </ul>
-  - version: '1.2'
-    unix-timestamp: 1397253600
-  - version: '1.0'
-    unix-timestamp: 1345932000

Field info: value-type:list(dict)

- ⁠Languages
- See <languages/>. -
- The languages list is a list of dictionaries. They must contain a percentage key, indicating the completion of translation for this language, and a locale key, with the locale string as value. -
- Example: -
Languages:
-  - locale: gu
-    percentage: 96
-  - locale: ca@valencia
-    percentage: 94
-  - locale: de
-    percentage: 91
-  - locale: eo
-    percentage: 93

Field info: value-type:list(dict)

- ⁠Bundle
- See <bundle/>. -
- The Bundle contains one or two subfields with the value limba, describing a Limba bundle ID, or xdg-app for an XdgApp bundle ID. -
- Example: -
Bundle:
-  limba: foobar-1.0.2

Field info: value-type:dict

- ⁠Extends
- See <extends/>. -
- Contains a list of AppStream IDs of the other component extended by the described component. This field may only be used with component-type addon. -

Field info: value-type:list(str)

- ⁠3.2.6. Example YAML file

- This is an example AppStream DEP-11 metadata file: -
----
-File: DEP-11
-Version: '0.8'
-Origin: chromodoris-main
-AssetsUrl: http://metadata.tanglu.org/dep11/assets/main/
----
-Categories:
-  - GNOME
-  - GTK
-  - System
-ID: gconf-editor.desktop
-Icon:
-  cached: gconf-editor_gconf-editor.png
-Name:
-  C: Configuration Editor
-  be@latin: Redaktar naładaŭ
-  bg: Настройки на програмите
-  pl: Edytor konfiguracji
-Package: gconf-editor
-Summary:
-  C: Directly edit your entire configuration database
-  ar: حرّر مباشرة كامل قاعدة بيانات الإعدادات.
-  de: Direkten Zugriff auf Ihre gesamte Konfigurationsdatenbank erlangen
-Type: desktop-app
----
-Categories:
-  - Qt
-  - KDE
-  - AudioVideo
-  - Player
-ID: kmplayer.desktop
-Icon:
-  cached: kmplayer_kmplayer.png
-Name:
-  C: KMPlayer
-  hi: केएम-प्लेयर
-  hne: केएम-प्लेयर
-  ku: KMLêdar
-  pa: KM-ਪਲੇਅਰ
-  sr: КМ‑плејер
-  sr@ijekavian: КМ‑плејер
-  sv: Kmplayer
-Package: kmplayer
-Provides:
-  mimetypes:
-    - application/ogg
-    - application/smil
-    - application/vnd.ms-asf
-    - application/vnd.rn-realmedia
-    - application/x-kmplayer
-    - video/webm
-    - video/x-avi
-Summary:
-  C: KDE interface for MPlayer
-Type: desktop-app
----
-Categories:
-  - Office
-  - Publishing
-Description:
-  C: <p>TeXstudio is an integrated writing environment for creating LaTeX documents. It integrates editing,
-    building and viewing into a single frontend.</p><p>Our goal is to make writing LaTeX as easy and comfortable
-    as possible. This is achieved through a rich feature set including:</p>
-ID: texstudio.desktop
-Icon:
-  cached: texstudio_texstudio.png
-Keywords:
-  C:
-    - editor
-    - latex
-    - pdflatex
-    - xelatex
-    - lualatex
-    - context
-    - bibtex
-Name:
-  C: TeXstudio
-Package: texstudio
-ProjectLicense: GPL-2.0
-Provides:
-  mimetypes:
-    - text/x-tex
-Screenshots:
-  - default: true
-    source-image:
-      height: 756
-      url: texstudio_2.8.4+debian-3_amd64/screenshots/source/screenshot-1.png
-      width: 1344
-    thumbnails:
-      - height: 423
-        url: texstudio_2.8.4+debian-3_amd64/screenshots/752x423/screenshot-1.png
-        width: 752
-      - height: 351
-        url: texstudio_2.8.4+debian-3_amd64/screenshots/624x351/screenshot-1.png
-        width: 624
-      - height: 63
-        url: texstudio_2.8.4+debian-3_amd64/screenshots/112x63/screenshot-1.png
-        width: 112
-Summary:
-  C: LaTeX development environment
-  fr: Environnement de développement LaTeX
-Type: desktop-app
-Url:
-  homepage: http://texstudio.sourceforge.net/
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-AppStream-IconCache.html appstream-0.12.0/docs/html/sect-AppStream-IconCache.html --- appstream-0.9.4/docs/html/sect-AppStream-IconCache.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-AppStream-IconCache.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,13 +1,15 @@ -3.3. Icon Cache

Product SiteDocumentation Site

+3.3. Icon Cache

Product SiteDocumentation Site

3.3. Icon Cache

3.3.1. Introduction

In order to display icons in software-centers, distributors should offer a repository of cached icons for applications defined in their AppStream XML files. The icons should be PNG files or vectorgraphics (PNG is preferred) and match the name referenced in the applications .desktop file. Their size should be 64x64px, it is okay to just provide one size.

3.3.2. Filesystem locations

- All icons of type cached must be placed in /usr/share/app-info/icons/%{origin}/%{size}/ or /var/cache/app-info/icons/%{origin}/%{size}/, where origin is the AppStream data origin defined in the AppStream data file (see Section 3.1.3, “General XML structure”), and size is 64x64 or 128x128 depending on the size of the icon. And icon might be present with different sizes in both directories. + All icons of type cached must be placed in /usr/share/app-info/icons/%{origin}/%{size}/ or /var/cache/app-info/icons/%{origin}/%{size}/, where origin is the AppStream data origin defined in the AppStream data file (see Section 3.1.3, “General XML structure”), and size is 64x64 or 128x128 depending on the size of the icon. And icon might be present with different sizes in both directories.
For example the cache icon krita.png of a component in a data file with the origin jessie should be stored in /usr/share/app-info/icons/jessie/64x64/krita.png (or in the /var/cache location). +
+ Icon sclaing factors commonly used for HiDPI display support are part of the size-directory filename and are separated from the regular size via an @ sign. If the scaling factor is 1, it must be omitted from the directory name. For example, if the icon scaling factor is 2 for icons of size 64x64 from origin jessie, the icon must be placed in /usr/share/app-info/icons/jessie/64x64@2/.

Legacy Support

In order to support the old icon cache layout, client applications may also look for icons in the folder below the size-directories, assuming that the icons placed there are of size 64x64 pixels. -
\ No newline at end of file +

\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-AppStream-Services-UrlHandler.html appstream-0.12.0/docs/html/sect-AppStream-Services-UrlHandler.html --- appstream-0.9.4/docs/html/sect-AppStream-Services-UrlHandler.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-AppStream-Services-UrlHandler.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,5 +1,5 @@ -5.2. Url handler

Product SiteDocumentation Site

+5.2. Url handler

Product SiteDocumentation Site

5.2. Url handler

5.2.1. Introduction

In order to allow installation of AppStream components from websites, software-centers implementing AppStream may choose to also support the appstream:// urls. @@ -7,9 +7,16 @@ This allows upstream projects to trigger an installation of their application from their homepage on any supporting distribution. It also is helpful for web-based software-centers.

5.2.2. URL schema

- Software-centers handling appstream:// URLs must provide a handler for the x-scheme-handler/appstream mimetype. An AppStream URL follows the schema appstream://%{component-id}. + Software-centers handling appstream:// URLs must provide a handler for the x-scheme-handler/appstream mimetype. An AppStream URL follows the schema appstream:%{component-id}.
Example HTML code: -
<a href="appstream://org.kde.discover.desktop">Install KDE Discover</a>
-<a href="appstream://org.gnome.Software.desktop">Install GNOME-Software</a>
-<a href="appstream://org.freedesktop.AppStream">Install libappstream</a>
\ No newline at end of file +

<a href="appstream:org.kde.discover.desktop">Install KDE Discover</a>
+<a href="appstream:org.gnome.Software.desktop">Install GNOME-Software</a>
+<a href="appstream:org.freedesktop.AppStream">Install libappstream</a>

+ ⁠5.2.3. AppStream Buttons

+ If you want to allow users to open your software in their local software center from your website, you might want to use one of the easily recognizable AppStream buttons for your appstream: link. +
+ SVG +
+ SVG +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-AppStream-YAML.html appstream-0.12.0/docs/html/sect-AppStream-YAML.html --- appstream-0.9.4/docs/html/sect-AppStream-YAML.html 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-AppStream-YAML.html 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,453 @@ + +3.2. AppStream collection YAML

Product SiteDocumentation Site

+ ⁠3.2. AppStream collection YAML

+ ⁠3.2.1. Introduction

+ DEP-11 is a YAML implementation of the AppStream collection specification, which is primarily used by Debian and its derivatives. This document describes the DEP-11 YAML. All AppStream support libraries available today are able to read both the YAML and the XML specification. +

Important

+ If you want to use AppStream in your distribution, and are not based on Debian, please use the XML specification (unless you have strong reasons for preferring YAML). XML is the official format for AppStream collection metadata. +
+ The DEP-11 YAML metadata can be validated for correctness using the dep11-validate tool from the AppStream DEP-11 utils. +
+ Fields not mentioned in this document are not recognized by DEP-11 YAML parsers. +

+ ⁠3.2.2. File naming and location

+ Take a look at Section 3.1.2, “File naming and location” for AppStream XML files. While the XML data belongs into the xmls subdirectory in /usr/share/app-info (or /var/cache/app-info), the YAML data is stored in the yaml subdirectory. All other rules affecting the XML apply the DEP-11 YAML as well, including the recommendation to compress the files with gzip. +

+ ⁠3.2.3. General DEP-11 YAML structure

+ Each YAML file starts with a header document, which defines the basic properties of the metadata, which is followed by the actual metadata in form of one YAML document per AppStream component. +
+ The header document contains the following fields, all of them are required or at least strongly recommended. +
File
+ This field identifies the file as DEP-11 file. Its value is always DEP-11. +

Field info: value-type:strrequired:yes

Version
+ The version of the AppStream specification this file was built for. +

Field info: value-type:strrequired:yes

Origin
+ Defines the repository-id this file belongs to. This usually matches the filename without extension. On Debian systems, it is the <suite>-<component> combination, e.g. jessie-main. +

Field info: value-type:strrequired:yes

MediaBaseUrl
+ The base URL for media (screenshots, icons, ...) referenced in the metadata file. If this is set, all urls in the document referencing media will be treated relative to the base url. +

Field info: value-type:strrequired:no

Architecture
+ Defines the architecture this data belongs to. This information is useful to resolve AppStream-ID conflicts on multiarch systems, which appear if the user has metadata for two architectures installed. +

Field info: value-type:strrequired:no

Priority
+ The priorization of this metadata file over other metadata. +

Field info: value-type:intrequired:no

+ ⁠3.2.4. Translated fields

+ Fields with translated values follow the following conventions: +
  1. + They are of type dict +
  2. + They must contain a key C, with the untranslated string as value +
  3. + All languages are represented with their locale name as key in the dict and the translated content as value (which is of type str, unless explicitly stated otherwise) +
+ In this document, the type localized is used to indicate that the field contains translated values following this schema. +
+ Example for a translated Name field: +
Name:
+  C: I am the untranslated string.
+  be@latin: Redaktar naładaŭ
+  bg: Настройки на програмите
+  pl: Edytor konfiguracji

+ ⁠3.2.5. Valid fields

+ This document describes all valid fields in the DEP-11 YAML specification. The requirements for the values are exactly the same as in the XML specification, and each field links to its correspondent XML tag for reference. +
+ ⁠ID
+ The ID field is a short unique and usually lower-cases identifier for the component. Depending on the component's type, different naming conventions apply. +
+ See <id/>. +

Field info: value-type:strrequired:yes

+ ⁠Priority
+ The Priority field sets the priority this component's metadata should have over other meadata in the pool. Data with a higher priority replaces data with a lower priority. +

Field info: value-type:intrequired:no

+ ⁠Type
+ The type of this component. Allowed values are: +

Field info: value-type:strrequired:yes

+ ⁠Merge
+ The optional Merge field describes the merge strategy that should be applied when merging data of this component into its base. It may assume the values append or replace. +
+ See Section 3.1.4, “Valid tags for all component types” for a description on how merging works. +

Field info: value-type:strrequired:no

+ ⁠Package
+ The name of the package which needs to be installed in order to make this component available on the system. +
+ See <pkgname/>. +

Field info: value-type:strrequired:yes

+ ⁠SourcePackage

Field info: value-type:str

+ ⁠Name
+ See <name/>. +

Field info: value-type:localizedrequired:yes

+ ⁠Summary
+ See <summary/>. +

Field info: value-type:localizedrequired:yes

+ ⁠ProjectLicense

Field info: value-type:str

+ ⁠Description
+ See <description/>. +
+ The markup for the description is the same as in the XML specification, so it can be read by anything parsing basic HTML markup. +

Field info: value-type:localized

+ ⁠Url
+ See <url/>. +
+ The Url field contains the different url types as keys in its dict. Valid url types are defined in the main AppStream XML specification. All URL types must be lowercased. +
+ Example: +
Url:
+  homepage: http://example.org
+  faq: http://example.org/faq
+  bugtracker: http://bugs.example.org/report-issue

Field info: value-type:dict

+ ⁠ProjectGroup
+ See <project_group/>. +

Field info: value-type:str

+ ⁠Icon
+ See <icon/>. +
+ The Icon field has the different icon types as keys for its dict. +
stock
+ Contains the stock icon name. +

Field info: value-type:str

cached
+ Contains a list of dictionaries with the keys width and height of type int specifying the dimensions of the icon, as well as the key name of type str specifying the name of the icon in the cache. +

Field info: value-type:list ➟ dict

local
+ Contains a list of dictionaries with the keys width and height of type int specifying the dimensions of the icon, as well as the key name of type str specifying the absolute filename pointing to the right icon. +

Field info: value-type:list ➟ dict

remote
+ Contains a list of dictionaries with the keys width and height of type int specifying the dimensions of the icon, as well as the key url of type str which contains a HTTP(S) or FTP URL to the icon. +

Field info: value-type:list ➟ dict

Field info: value-type:dict

+ ⁠Categories
+ See <categories/>. +
+ This field follows its XML counterpart in almost all regards. The different XDG menu category names are encoded in the list, and are of type str. +
+ Example: +
Categories:
+  - Network
+  - Telephony

Field info: value-type:list

+ ⁠Keywords
+ See <keywords/>. +
+ This field contains the keywords for this component. The keys define the locales for the respective language, the values are of type list and contain the list of keywords for the respective language. An unlocalized C key must be present. +
+ Example: +
Keywords:
+  C:
+    - IDE
+    - development
+    - programming
+  de:
+    - IDE
+    - entwicklung
+    - programmierung

Field info: value-type:translated(list)

+ ⁠Screenshots
+ See <screenshots/>. +
+ The Screenshots field contains a list of screenshots. A screenshot is of type dict and contains the following keys: +
default
+ If default is true, the screenshot is selected as default screenshot. There has to be at least one screenshot which is marked as default. +

Field info: value-type:bool

source-image
+ Describes the source image for this screenshot. It has the following keys: +
  • + height +
    + The image height (value-type:int) +
  • + width +
    + The image width (value-type:int) +
  • + url +
    + The full image url, or the url component added to MediaBaseUrl, if defined (value-type:str). +
  • + lang +
    + The language this screenshot image is translated in. The value is a locale string. (value-type:str, required:no) +

Field info: value-type:dictrequired:yes

thumbnails
+ A list of an arbitrary number of screenshots. All screenshots are of type dict and must contain the same keys as described for source-image. +

Field info: value-type:listrequired:no

caption
+ A caption for this screenshot. +

Field info: value-type:localized

+ Example for a Screenshots field containing one screenshot: +
Screenshots:
+  - default: true
+    caption:
+      C: Foobar showing kitchen-sink functionality
+      si: Foobar shoeewing kischän-sünk funzionality
+    source-image:
+      height: 800
+      url: http://www.example.org/en_US/main.png
+      width: 600
+    thumbnails:
+      - height: 423
+        width: 752
+        url: http://www.example.org/en_US/main-large.png
+      - height: 63
+        width: 112
+        url: http://www.example.org/en_US/main-small.png

Field info: value-type:list

+ ⁠CompulsoryForDesktop

Field info: value-type:str

+ ⁠Provides
+ See <provides/>. +
+ The Provides field is of type dict and can have the following keys set with the described allowed values: +
libraries
+ A list of provided library names. +

Field info: value-type:list(str)

binaries
+ A list of provided binaries in PATH. +

Field info: value-type:list(str)

mimetypes
+ A list of mimetypes this component can handle. +

Field info: value-type:list(str)

firmware
+ A list of provided firmware. Each firmware entry is of type dict and has a type key, which has either runtime or flashed as value. Firmware of type flashed has a guid key, containing the GUID of the device the firmware is flashed on, while firmware of type runtime has a file key, containing the firmware filename which the kernel is looking for. +

Field info: value-type:list(dict)

dbus
+ A list of provided DBus services. Each service entry in the list is of type dict and has a type key, which has either system or user as value. user means the DBus service name is for a user/session service, while system means it describes a system service. The service key contains the name of the DBus service file. All dict values are of type str. +

Field info: value-type:list(dict)

Field info: value-type:dict

+ ⁠DeveloperName

Field info: value-type:localized

+ ⁠Launchable
+ See <launchable/>. +
+ A dictionary containing the launchable-type as key, and a list of IDs used for launching the application as value. +
+ Example: +
Launch:
+  desktop-id:
+    - org.gnome.Sysprof2.desktop

Field info: value-type:dict(list)

+ ⁠Releases
+ See <releases/>. +
+ The Releases contains a list of releases, where each list items contains the following fields/keys: +
version
+ The version number of this release. +

Field info: value-type:strrequired:yes

unix-timestamp
+ The UNIX timestamp of when this software was released. +
+ One of the unix-timestamp or date fields must be present. +

Field info: value-type:intrequired:maybe

date
+ The ISO 8601 date of when this software was released. +
+ One of the unix-timestamp or date fields must be present. +

Field info: value-type:strrequired:maybe

description
+ A description of this release. May contain allowed HTML markup. +

Field info: value-type:localized

+ It is recommended to order this list starting with the latest timestamp to the olderst one. +
+ Example: +
Releases:
+  - version: '1.8'
+    unix-timestamp: 1424116753
+    description:
+      C: |
+        <p>This stable release fixes the following bug:</p>
+        <ul>
+          <li>CPU no longer overheats when you hold down spacebar</li>
+        </ul>
+  - version: '1.2'
+    unix-timestamp: 1397253600
+  - version: '1.0'
+    unix-timestamp: 1345932000

Field info: value-type:list(dict)

+ ⁠Languages
+ See <languages/>. +
+ The languages list is a list of dictionaries. They must contain a percentage key, indicating the completion of translation for this language, and a locale key, with the locale string as value. +
+ Example: +
Languages:
+  - locale: gu
+    percentage: 96
+  - locale: ca@valencia
+    percentage: 94
+  - locale: de
+    percentage: 91
+  - locale: eo
+    percentage: 93

Field info: value-type:list(dict)

+ ⁠Bundles
+ See <bundle/>. +
+ The Bundles contains a list of dictionaries with the keys type, having the ID for a specific bundling system (e.g. flatpak or limba) as value, and id for the associated bundle-id. See the XML tag description for information on all valid bundling systems. +
+ Example: +
Bundles:
+  - type: limba
+    id: foobar-1.0.2

Field info: value-type:list

+ ⁠Extends
+ See <extends/>. +
+ Contains a list of AppStream IDs of the other component extended by the described component. This field may only be used with component-type addon. +

Field info: value-type:list(str)

+ ⁠Suggests
+ See <suggests/>. +
+ A list of dictionaries containing suggested software components. The dictionaries must have a type key with the string value upstream or heuristic depending on where the suggestion originates from. The also must have a ids key containing a list of component-ids of the suggested software. +
+ Example: +
Suggests:
+  - type: upstream
+    ids:
+      - org.example.Awesome
+  - type: heuristic
+    ids:
+      - org.example.Test1
+      - org.example.Test2

Field info: value-type:list(dict)

+ ⁠ContentRating
+ A dictionary containing the rating system as key, and a dictionary of rating-values as value. The value-dictionary itself has the content rating IDs as keys and the intensity values as values. The intensity values as well as IDs and rating system names match the values from the XML exactly. +
+ Example: +
ContentRating:
+  oars-1.0:
+    drugs-alcohol: moderate
+    language-humor: mild

Field info: value-type:dict(dict)

+ ⁠Requires & Recommends
+ A list of dictionaries containing the referenced items. The dictionaries in the list must have one key denoting the item type, which has the respective item value as value. Refer to the XML description for a list of possible types. +
+ Each dictionary may have a version field with contains a version comparison string. The first two characters denote the version comparison operation, and are followed by the version number to be compared with. The comparison operation may be one of: +
  • + == - Equal to +
  • + != - Not equal to +
  • + << - Lesser than +
  • + >> - Greater than +
  • + <= - Lesser than or equal to +
  • + >= - Greater than or equal to +
+ Example: +
Recommends:
+- memory: '2500'
+- modalias: usb:v1130p0202d*
+Requires:
+- kernel: Linux
+  version: '>= 4.15'
+- id: org.example.TestDependency
+  version: == 1.2

Field info: value-type:list(dict)

+ ⁠3.2.6. Example YAML file

+ This is an example AppStream DEP-11 metadata file: +
+---
+File: DEP-11
+Version: '0.8'
+Origin: chromodoris-main
+MediaBaseUrl: http://metadata.tanglu.org/appstream/media/
+---
+Type: desktop-application
+ID: gconf-editor.desktop
+Icon:
+  cached: gconf-editor_gconf-editor.png
+Name:
+  C: Configuration Editor
+  be@latin: Redaktar naładaŭ
+  bg: Настройки на програмите
+  pl: Edytor konfiguracji
+Package: gconf-editor
+Summary:
+  C: Directly edit your entire configuration database
+  ar: حرّر مباشرة كامل قاعدة بيانات الإعدادات.
+  de: Direkten Zugriff auf Ihre gesamte Konfigurationsdatenbank erlangen
+Categories:
+  - GNOME
+  - GTK
+  - System
+---
+Type: desktop-application
+ID: kmplayer.desktop
+Icon:
+  cached: kmplayer_kmplayer.png
+Name:
+  C: KMPlayer
+  hi: केएम-प्लेयर
+  hne: केएम-प्लेयर
+  ku: KMLêdar
+  pa: KM-ਪਲੇਅਰ
+  sr: КМ‑плејер
+  sr@ijekavian: КМ‑плејер
+  sv: Kmplayer
+Package: kmplayer
+Summary:
+  C: KDE interface for MPlayer
+Categories:
+  - Qt
+  - KDE
+  - AudioVideo
+  - Player
+Provides:
+  mimetypes:
+    - application/ogg
+    - application/smil
+    - application/vnd.ms-asf
+    - application/vnd.rn-realmedia
+    - application/x-kmplayer
+    - video/webm
+    - video/x-avi
+---
+ID: texstudio.desktop
+Type: desktop-application
+Package: texstudio
+Name:
+  C: TeXstudio
+Summary:
+  C: LaTeX development environment
+  fr: Environnement de développement LaTeX
+Description:
+  C: <p>TeXstudio is an integrated writing environment for creating LaTeX documents. It integrates editing,
+    building and viewing into a single frontend.</p><p>Our goal is to make writing LaTeX as easy and comfortable
+    as possible. This is achieved through a rich feature set including:</p>
+Icon:
+  cached: texstudio_texstudio.png
+Keywords:
+  C:
+    - editor
+    - latex
+    - pdflatex
+    - xelatex
+    - lualatex
+    - context
+    - bibtex
+ProjectLicense: GPL-2.0
+Url:
+  homepage: http://texstudio.sourceforge.net/
+Categories:
+  - Office
+  - Publishing
+Provides:
+  mimetypes:
+    - text/x-tex
+Screenshots:
+  - default: true
+    source-image:
+      height: 756
+      url: texstudio_2.8.4+debian-3_amd64/screenshots/source/screenshot-1.png
+      width: 1344
+    thumbnails:
+      - height: 423
+        url: texstudio_2.8.4+debian-3_amd64/screenshots/752x423/screenshot-1.png
+        width: 752
+      - height: 351
+        url: texstudio_2.8.4+debian-3_amd64/screenshots/624x351/screenshot-1.png
+        width: 624
+      - height: 63
+        url: texstudio_2.8.4+debian-3_amd64/screenshots/112x63/screenshot-1.png
+        width: 112
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-Addon.html appstream-0.12.0/docs/html/sect-Metadata-Addon.html --- appstream-0.9.4/docs/html/sect-Metadata-Addon.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-Addon.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,36 +1,36 @@ -2.3. Addons

Product SiteDocumentation Site

- ⁠2.3. Addons

- ⁠2.3.1. Introduction

- Some software is not standalone, but rather extends existing software installed on the system. The "Addon" component type exists to reflect that. +2.6. Addons

Product SiteDocumentation Site

+ ⁠2.6. Addons

+ ⁠2.6.1. Introduction

+ Some software is not standalone, but rather extends existing software installed on the system. The addon component type exists to reflect that.
Software which provides addons can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml.

- ⁠2.3.2. Example file

+ ⁠2.6.2. Example file
A addon meta-info file should look like this:

 <?xml version="1.0" encoding="UTF-8"?>
 <component type="addon">
-  <id>gedit-code-assistance</id>
-  <extends>gedit.desktop</extends>
+  <id>org.gnome.gedit-code-assistance</id>
+  <extends>org.gnome.gedit.desktop</extends>
   <name>Code Assistance</name>
   <summary>Code assistance for C, C++ and Objective-C</summary>
   <url type="homepage">http://projects.gnome.org/gedit</url>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-3.0+</project_license>
 </component>

- ⁠2.3.3. File specification

- Note that the XML root must have the type property set to addon. This clearly identified this metainfo document as describing an addon to an existing software. + ⁠2.6.3. File specification
+ Note that the XML root must have the type property set to addon. This clearly identifies this metainfo document as describing an addon to existing software.
<id/>
- For addons, there are no special requirements for what their %{id} should be. You might want to prefix your id with "addon-" though, to make it easily recognizable. + For addons, the %{id} must follow the component-id naming conventions (see <id/>).
<extends/>
- This tag is refers to the id of the component this addon is extending. + This tag is refers to the ID of the component this addon is extending.
- So for example if I have a plugin "kipi" which extends the application "Gwenview", I need to refer to it's identifier like: -
<extends>gwenview.desktop</extends>
+ For example, if there is a plugin "kipi" which extens the application "Gwenview", it needs to be referred to as: +
<extends>org.kde.Gwenview</extends>
The <extends/> tag may be specified multiple times.
For a component of type addon, the following tags are required and must be present: <id/>, <name/>, <summary/>, <metadata_license/>, <extends/>. -
\ No newline at end of file + \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-Application.html appstream-0.12.0/docs/html/sect-Metadata-Application.html --- appstream-0.9.4/docs/html/sect-Metadata-Application.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-Application.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,31 +1,48 @@ -2.2. Desktop Applications

Product SiteDocumentation Site

+2.2. Desktop Applications

Product SiteDocumentation Site

2.2. Desktop Applications

2.2.1. Introduction

- Upstream projects can ship a small XML file containing additional metadata to describe their application. This data includes things like screenshots, long descriptions, icon information and various other things needed to present the application properly to the user. + A desktop application is an application which has a graphical user interface and is commonly used with mouse and keyboard. It also ships a Freedesktop .desktop file to be visible in application menus.
- The file described in this document is built upon the generic component metadata with fields specific for applications (see Section 2.1, “Generic Component”). + AppStream generators may pull data from the preexisting .desktop files to represent an application in the AppStream metadata pool. Upstream projects should ship a metainfo file containing additional metadata to describe their application though, to enhance the available metadata. This data includes things like screenshots, long descriptions, icon information and various other things needed to present the application properly to the user. For some distributions, the presence of this metadata is a prerequisite for the application showing up in the metadata pool and being presented in software centers.
- The AppData files override any values which are automatically fetched by the AppStream data generator, which means that it's data takes precedence over data which has already been defined in a .desktop-file. Applications can ship one or more files in /usr/share/metainfo/%{id}.appdata.xml. + The file described in this document is built upon the generic component metadata with fields specific for desktop applications (see Section 2.1, “Generic Component”). +
+ The metainfo files override any values which are automatically fetched from other sources by the AppStream data generator, which means that its data will always take precedence over data which has already been defined in a .desktop file. Applications can ship one or more files in /usr/share/metainfo/%{id}.appdata.xml. +
+ Data will only be fetched from a desktop file if one <launchable/> tag is present to define a .desktop file ID. If multiple launch tags are defined, no data will be merged in from .desktop files.

Note

If you are looking for some quickstart guide to just get your application to ship AppStream metadata quickly, this document might not be for you. You might want to take a look at Section 4.1, “For GUI application upstream maintainers” instead.

2.2.2. File specification

- The basic structure for a generic component as described at Section 2.1.3, “XML Specification” applies. Note that the XML root must have the type property set to desktop, which in a generic component this property can be omitted. This clearly identified this metainfo document as describing an application. + The basic structure for a generic component as described at Section 2.1.3, “XML Specification” applies. Note that the XML root must have the type property set to desktop-application, while in a generic component this property can be omitted. This clearly identifies this metainfo document as describing an application.

Note

- All tags defined in the generic component specification are valid in AppData as well, an application is just defined as a specialized component, which has the additional benefit of being displayed in a software-center application. + All tags defined in the generic component specification are valid for desktop-application components as well. An application is just a specialized component, allowing tools like software centers to filter out the component types they want to display. +

Note

+ The desktop-application component type is the same as the desktop component type - desktop is the older type identifier for desktop-applications and should not be used for new metainfo files, unless compatibility with very old AppStream tools (pre 2016) is still wanted.
The following list describes the special tags for application upstream metadata and provides some additional information about the values the tags are expected to have. If no information is given about a tag, refer to the respective tag in Section 2.1, “Generic Component”. -
<id/>
- For applications, the <id/> tag value must be the same name as the installed .desktop file for the application. -
<metadata_license/>
- The <metadata_license/> as described in <metadata_license/> must be present. -
<name/>
- While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this. -
<summary/>
- While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this. -
+ For desktop applications, the <id/> tag value must follow the reverse-DNS scheme as described in <id/>. +

Note

+ In previous AppStream releases, the <id/> was used to associate metainfo files with their .desktop files to merge in data from .desktop files into the AppStream generator's final output. In modern metainfo files, the component-ID for desktop-application components can be an arbitrary string (matching the naming rules applying to all AppStream metadata), while the <launchable/> tag is used to associate .desktop files with their metainfo files. +
<metadata_license/>
+ The <metadata_license/> tag as described in <metadata_license/> must be present. +
+ ⁠<name/>
+ The human-readable name of the application. This is the name you want users to see prior to installing the application. +
+ ⁠<summary/>
+ A short summary on what this application does, roughly equivalent to the Comment field of the accompanying .desktop file of the application. +
+ ⁠<launchable/>
+ It is recommended that a <launchable/> tag is present in desktop-application metainfo files. The tag is described in detail at <launchable/>. +
+ If only one launchable entry of type desktop-id is present, AppStream metadata generators might decide to merge metadata from .desktop files referenced by the tag into their final output. +
+ The launchable tag is optional, but if omitted software centers will not be able to launch the application directly after it was installed. +
<screenshots/>
A screenshot presents your application to the outside world, and could be seen by hundreds or thousands of people.
@@ -51,5 +68,5 @@
<releases/>
The application metainfo should at least provide one <releases/> tag, which has one or more <release/> childs to define the version and release date of this application. For details, see <releases/> .
- For a component of type desktop, the following tags are required and must always be present: <id/>, <description/>, <metadata_license/>. -

\ No newline at end of file + For a component of type desktop-application, the following tags are required and must always be present: <id/>, <name/>, <summary/>, <description/>, <metadata_license/>. +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-Codec.html appstream-0.12.0/docs/html/sect-Metadata-Codec.html --- appstream-0.9.4/docs/html/sect-Metadata-Codec.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-Codec.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,19 +1,19 @@ -2.5. Codecs

Product SiteDocumentation Site

- ⁠2.5. Codecs

- ⁠2.5.1. Introduction

+2.8. Codecs

Product SiteDocumentation Site

+ ⁠2.8. Codecs

+ ⁠2.8.1. Introduction

Software centers might want to special-case codec handling. Therefore, we provide a component type for them.
Codecs can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml.
- Codec metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that. + Codec metadata files can – just like all other metainfo files – be translated. See the section about translation for more information.

- ⁠2.5.2. Example file

+ ⁠2.8.2. Example file
A codec meta-info file should look like this:

 <?xml version="1.0" encoding="UTF-8"?>
 <component type="codec">
-  <id>gstreamer-good</id>
+  <id>org.freedesktop.gstreamer.codecs-good</id>
   <metadata_license>CC0</metadata_license>
   <name>GStreamer Multimedia Codecs - Extra</name>
   <description>
@@ -51,11 +51,11 @@
     <codec>element-xvidenc</codec>
   </provides>
 </component>

- ⁠2.5.3. File specification

- Note that the XML root must have the type property set to codec. This clearly identified this metainfo document as describing a codec. + ⁠2.8.3. File specification
+ Note that the XML root must have the type property set to codec. This clearly identifies this metainfo document as describing a codec.
<id/>
- For codecs, there are no special requirements for what their %{id} should be. But, as for any other component, you should pick a reasonable and unique name. + For codecs, the %{id} must follow the component-id naming conventions (see <id/>).
<metadata_license/>
The <metadata_license/> tag is required. See Section 2.1, “Generic Component” for a description of this tag.
@@ -65,4 +65,4 @@ You must add one or more children of type <codec/> to make it known to the system that your software is able to provide the mentioned codecs. Adding this data is required for all components of type=codec.
\ No newline at end of file + \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-ConsoleApplication.html appstream-0.12.0/docs/html/sect-Metadata-ConsoleApplication.html --- appstream-0.9.4/docs/html/sect-Metadata-ConsoleApplication.html 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-ConsoleApplication.html 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,31 @@ + +2.3. Console Applications

Product SiteDocumentation Site

+ ⁠2.3. Console Applications

+ ⁠2.3.1. Introduction

+ A console application is any application that has a command-line or text-based interface and is designed to be used by a human user on the command line. Applications need to be present in the standard PATH. +
+ The file described in this document is built upon the generic component metadata with fields specific for applications (see Section 2.1, “Generic Component”). All tags valid for a generic component are valid for a console-application component as well. +
+ In order to enhance the available metadata about their application, projects shipping a console application can ship one or more metainfo files in /usr/share/metainfo/%{id}.metainfo.xml. +

+ ⁠2.3.2. File specification

+ The basic structure for a generic component as described at Section 2.1.3, “XML Specification” applies. Note that the XML root must have the type property set to console-application, while in a generic component this property can be omitted. This clearly identified this metainfo document as describing an application. +
+ The following list describes tags for console-application upstream metadata and provides some additional information about the values the tags are expected to have. If no information is given about a tag, refer to the respective tag in Section 2.1, “Generic Component”. +
+ ⁠<id/>
+ For console applications, the <id/> tag value must follow the AppStream ID naming conventions (it should be a reverse-DNS name). +
<metadata_license/>
+ The <metadata_license/> tag as described in <metadata_license/> must be present. +
<name/>
+ A name must be present for console applications. See <name/> for a detailed description of this tag. +
<summary/>
+ A summary must be present for console applications. See <summary/> for a detailed description of this tag. +
+ ⁠<provides/> ↪ <binary/>
+ This tag is described in detail for generic components at <provides/>. +
+ For console applications, at least one provided <binary/> must be listed in this tag. +
+ For a component of type console-application, the following tags are required and must always be present: <id/>, <metadata_license/>, <name/>, <summary/>, <provides/> ↪ <binary/>. +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-Driver.html appstream-0.12.0/docs/html/sect-Metadata-Driver.html --- appstream-0.9.4/docs/html/sect-Metadata-Driver.html 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-Driver.html 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,52 @@ + +2.11. Driver

Product SiteDocumentation Site

+ ⁠2.11. Driver

+ ⁠2.11.1. Driver

+ The driver component type describes drivers for hardware devices as well as other Linux kernel drivers for e.g. virtualization support. It usually provides one or multiple modaliases. +
+ Drivers can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. +

+ ⁠2.11.2. Example file

+ A driver metainfo file can look like this: +

+<?xml version="1.0" encoding="UTF-8"?>
+<component type="driver">
+  <id>com.nvidia.GeForce</id>
+  <name>NVIDIA GeForce</name>
+  <summary>NVIDIA Graphics Driver</summary>
+  <description>
+    <p>
+      The NVIDIA Accelerated Linux Graphics Driver brings accelerated 2D
+      functionality and high-performance OpenGL support to Linux x86 with the
+      use of NVIDIA graphics processing units.
+    </p>
+    ...
+  </description>
+  <url type="homepage">http://www.nvidia.com/Download/index.aspx</url>
+  <metadata_license>CC0-1.0</metadata_license>
+  <project_license>LicenseRef-proprietary:NVIDIA</project_license>
+  <developer_name>NVIDIA Corporation</developer_name>
+
+  <provides>
+    <modalias>pci:v000010DEd*sv*sd*bc03sc00i00*</modalias>
+    ...
+  </provides>
+</component>

+ ⁠2.11.3. File specification

+ Note that the XML root must have the type property set to driver. This clearly identifies this metainfo document as describing a driver. +
+ ⁠<id/>
+ For drivers, the value of the <id/> tag must follow the reverse-DNS scheme as described for generic components. It is sometimes useful to suffix the ID with .driver to make it more unique. +
+ ⁠<provides/> ↪ <modalias/>
+ The provides/modalias tags contain all the modaliases the described driver supports and allow to automatically offer installation of the described driver on systems where hardware matching the modalias has been detected. +
+ Using wildcards for modaliases is permitted. +
+ Example: +
<provides>
+  <modalias>pci:v000010DEd00001194sv*sd*bc03sc*i*</modalias>
+  <modalias>pci:v000010DEd00001199sv*sd*bc03sc*i*</modalias>
+</provides>
+ For a component of type driver, the following tags are required and must be present for a valid document: <id/>, <name/>, <summary/>, <metadata_license/>, <provides/> ↪ <modalias/>. +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-Firmware.html appstream-0.12.0/docs/html/sect-Metadata-Firmware.html --- appstream-0.9.4/docs/html/sect-Metadata-Firmware.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-Firmware.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,12 +1,12 @@ -2.7. Firmware

Product SiteDocumentation Site

- ⁠2.7. Firmware

- ⁠2.7.1. Introduction

- Device firmware can be accompanied by AppStream upstream metadata, to be incorporated by a distribution. Tools like fwupd make use of this metadata to automatically update flashed firmware of devices found in the machine. Additionally, this component type can also be used for firmware which is loaded to the device at runtime. +2.10. Firmware

Product SiteDocumentation Site

+ ⁠2.10. Firmware

+ ⁠2.10.1. Introduction

+ Device firmware can be accompanied by AppStream upstream metadata, to be incorporated by a distribution. Tools like fwupd make use of this metadata to automatically update flashed firmware of devices found in the machine. Additionally, this component type can also be used for firmware which is loaded onto the device at runtime.
Firmware can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml.

- ⁠2.7.2. Example file

+ ⁠2.10.2. Example file
A firmware meta-info file should look like this:

 <?xml version="1.0" encoding="UTF-8"?>
@@ -42,17 +42,17 @@
 </component>
You can find additional information on how to create a complete firmware package for flashed firmware upstream in the README document of fwupd.

- ⁠2.7.3. File specification

- Note that the XML root must have the type property set to firmware. This clearly identified this metainfo document as describing firmware. + ⁠2.10.3. File specification
+ Note that the XML root must have the type property set to firmware. This clearly identifies this metainfo document as describing firmware.
<id/>
- For firmware, the value of the <id/> tag must be a unique name for the device the firmware belongs to, constsing of the vendor domain and the device name. A reverse URL scheme in form of <tld>.<vendor>.<product>.firmware is used, e.g. com.hughski.ColorHug2.firmware. + For firmware, the value of the <id/> tag must follow the reverse-DNS scheme as described for generic components. It is sometimes useful to suffix the ID with .firmware to make it more unique. For example com.hughski.ColorHug2.firmware.
<releases/>
This tag is almost identical to the generic <releases/> tag. Additional to the generic tag, for each <release/> child a <location/> tag is allowed, in case the component describes flashed firmware.
- The <location/> tag specifies a remote location where the firmware .cab can be downloaded from. The download location needs to be accessibly via HTTP, HTTPS or FTP. + The <location/> tag specifies a remote location where the firmware .cab can be downloaded from. The download location needs to be accessible via HTTP, HTTPS or FTP.
Example:
<releases>
@@ -81,4 +81,4 @@
   <firmware type="flashed">84f40464-9272-4ef7-9399-cd95f12da696</firmware>
 </provides>
For a component of type firmware, the following tags are required and must be present for a valid document: <id/>, <name/>, <summary/>, <metadata_license/>, <provides/> ↪ <firmware/>. -
\ No newline at end of file + \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-Fonts.html appstream-0.12.0/docs/html/sect-Metadata-Fonts.html --- appstream-0.9.4/docs/html/sect-Metadata-Fonts.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-Fonts.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,41 +1,57 @@ -2.4. Fonts

Product SiteDocumentation Site

- ⁠2.4. Fonts

- ⁠2.4.1. Introduction

- A software center can allow users to install additional fonts using font metadata. Also, applications can use font metadata to find missing fonts (e.g. a special methematical font is needed) in the distribution's software sources. This meta-info specification describes how metadata for fonts / font collections should be structured. +2.7. Fonts

Product SiteDocumentation Site

+ ⁠2.7. Fonts

+ ⁠2.7.1. Introduction

+ A software center can allow users to install additional fonts using font metadata. Also, applications can use font metadata to find missing fonts (for example, if a special mathematical font is needed) in the distribution's software sources. This metainfo specification describes how metadata for fonts or font collections should be structured.
Font packages can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml.
- Font metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that. -

- ⁠2.4.2. Example file

+ Font metadata files can – just like all other metainfo files – be translated. See the section about translation for more information. +

Note

+ A font component is in most cases not describing a single font, but rather a collection of fonts that are grouped together, usually by their art style or font-family. +
+ To make the individual fonts known to the system, use the <provides/> ↪ <font/> tag. +

+ ⁠2.7.2. Example file

A minimal font metainfo file can look like this: -

-<?xml version="1.0" encoding="UTF-8"?>
+		
<?xml version="1.0" encoding="UTF-8"?>
 <component type="font">
-  <id>LinuxLibertine.font</id>
-  <metadata_license>CC0</metadata_license>
-  <name>Linux Libertine</name>
-  <summary>Linux Libertine fonts</summary>
+  <id>com.latofonts.Lato</id>
+  <metadata_license>MIT</metadata_license>
+  <project_license>OFL-1.1</project_license>
+
+  <name>Lato</name>
+  <summary>A sanserif type­face fam­ily</summary>
+  <description>
+    <p>
+      Lato is a sanserif type­face fam­ily designed in the Sum­mer 2010 by Warsaw-​​based designer
+      Łukasz Dziedzic (“Lato” means “Sum­mer” in Pol­ish). In Decem­ber 2010 the Lato fam­ily
+      was pub­lished under the open-​​source Open Font License by his foundry tyPoland, with
+      sup­port from Google.
+    </p>
+  </description>
+
   <provides>
-    <font file="LinLibertine_R.otf">Linux Libertine O</font>
-    <font file="LinLibertine_M.otf">Linux Libertine Mono</font>
+    <font>Lato Regular</font>
+    <font>Lato Italic</font>
+    <font>Lato Bold</font>
+    <font>Lato Light</font>
+    <font>Lato Light Italic</font>
+    ...
   </provides>
 </component>

- ⁠2.4.3. File specification

- Note that the XML root must have the type property set to font. This clearly identified this metainfo document as describing a font. + ⁠2.7.3. File specification
+ Note that the XML root must have the type property set to font. This clearly identifies this metainfo document as describing a font.
<id/>
- For fonts, the %{id} must be the name of the font or font bundle without whitespaces, and must be suffixed with .font. + For fonts, the %{id} must follow the reverse-DNS scheme as described for generic components. For the product name part, it is recommended to take the the name of the font or font bundle without whitespace.
<metadata_license/>
The <metadata_license/> tag is required. See <metadata_license/> for a description of this tag.
<name/>
- Set a name for your font or font collection. + Set a name for the font or font collection.
<summary/>
A short description of the font described in this metainfo file.
<description/>
- Add a long description of your font. Some rules apply (will soon be split out to a "description guidelines" section). -
- Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time. + Add a long description of your font. Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time.
See the generic component <description/> for a detailed description of this tag.
<screenshots/>
@@ -50,7 +66,38 @@ ⁠<provides/> ↪ <font/>
This tag is described in detail for generic components at <provides/>.
- You should add one or more children of type <font/> to make the font filenames and names known to the system. If this tag is not present, the name and id tag values can be used by the distribution's AppStream-generator to recreate this tag. -
- For a component of type font, the following tags are required and must be present: <id/>, <name/>, <summary/>, <metadata_license/>. -
\ No newline at end of file + You should add one or more children of type <font/> to make the font's full-names known. The full-name should be the same as given in the font file for the English language. If no full-name is set, a space-separated combination of the font's family and style is used instead. The font must have a family defined to be included. +
+ The full-name entry should show the complete name of a typeface in its “natural” form, including style and character set information (if any), and without abbreviations. This is the name that some systems and applications look at to determine full, unabbreviated font menu names. +
+ If you want to query the full-name and its family and style to see what needs to be added to this tag, you can use the fc-query utility of Fonconfig: +
fc-query --format='FN: %{fullname[0]}\nFS: %{family[0]} %{style[0]}\n' FONT-FILENAME
+ Examples: +
<provides>
+  <font>Lato Heavy Italic</font>
+  <font>Noto Kufi Arabic Bold</font>
+  <font>Liberation Serif Bold Italic</font>
+  <font>FontAwesome Regular</font>
+</provides>
+ If no <font/> tags were defined, the AppStream collection data generator should try to extract them from the actual font files found in the software package/bundle. +
+ In every case, the names given in the provides tag must match the metadat the fonts contain themselves. If the data of the font files is incomplete, the data can not be extended by the <font/> tag. This is important because the AppStream generator may use the data to pick the right fonts, and because applications expect the exact font they requested via AppStream to be present on the system after the component was installed (and not one which has different metadata). +
+ ⁠<languages/>
+ This tag gives information about the locale a font supports. +
+ This tak allows specifying the main locale (and thereby scripts) the font can be used with. It does not have to contain an extensive list, as the AppStream metadata generator will try get obtain that information from the font files themselves, but it is useful to define to hint the generator in the right direction. +
+ If samples of the font are rendered as screenshots by the collection metadata generator, the locale mentioned in the metainfo file will be preferred over automatically (or heuristically) defined ones. +
+ You can use the following command to determine which languages a font supports: +
fc-query --format='%{lang}\n' FONT-FILENAME
+ Tag example: +
<languages>
+  <lang>de</lang>
+  <lang>en</lang>
+  <lang>cn</lang>
+</languages>
+
+ For a component of type font, the following tags are required and must be present: <id/>, <name/>, <summary/>, <metadata_license/>, <provides/> ↪ <font/>. +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-InputMethod.html appstream-0.12.0/docs/html/sect-Metadata-InputMethod.html --- appstream-0.9.4/docs/html/sect-Metadata-InputMethod.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-InputMethod.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,20 +1,20 @@ -2.6. Input Methods

Product SiteDocumentation Site

- ⁠2.6. Input Methods

- ⁠2.6.1. Introduction

- It is a nice feature for a software center to allows users the installation of additional input-methods. This meta-info specification describes how metadata about input-methods should be structured. +2.9. Input Methods

Product SiteDocumentation Site

+ ⁠2.9. Input Methods

+ ⁠2.9.1. Introduction

+ It is a nice feature for a software center to allows users the installation of additional input methods. This meta-info specification describes how metadata about input methods should be structured.
- Software components providing an input-method can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. + Software components providing an input method can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml.
- Input-method metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that. + Input method metadata files can – just like all other metainfo files – be translated. See the section about translation for more information.

- ⁠2.6.2. Example file

- The input-method meta-info file should look like this: + ⁠2.9.2. Example file
+ The input method meta-info file should look like this:

 <?xml version="1.0" encoding="UTF-8"?>
 <component type="inputmethod">
-  <id>mathwriter-ibus.db</id>
-  <metadata_license>CC0</metadata_license>
+  <id>com.github.ibus.mathwriter-ibus.db</id>
+  <metadata_license>FSFAP</metadata_license>
   <name>Mathwriter</name>
   <summary>Math symbols input method</summary>
   <description>
@@ -29,23 +29,23 @@
   </description>
   <url type="homepage">https://github.com/mike-fabian/ibus-table-others</url>
 </component>

- ⁠2.6.3. File specification

- Note that the XML root must have the type property set to inputmethod. This clearly identified this metainfo document as describing an input-method instead of a generic software-component. + ⁠2.9.3. File specification
+ Note that the XML root must have the type property set to inputmethod. This clearly identifies this metainfo document as describing an input method instead of a generic software component.
<id/>
- For input-methods, the %{id} is the same name as the input-method's database filename. + For input methods, the %{id} should follow the standard reverse-domain-name scheme. For the product name part, it is recommended to take the database filename of the input method.
<metadata_license/>
The <metadata_license/> tag is required. See Section 2.1, “Generic Component” for a description of this tag.
<name/>
- Set a name for your input-method. + Set a name for your input method.
<summary/>
- A short description of the input-method described in this metainfo file. + A short description of the input method described in this metainfo file.
<description/>
- Add a long description of the input-method. + Add a long description of the input method.
Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time.
<screenshots/>
- A screenshot may be included, showing the input-method in use in an application. + A screenshot may be included, showing the input method in use in an application.
Refer to <screenshots/> for a detailed description of this tag.
<url/>
@@ -53,7 +53,7 @@
<provides/>
This tag is described for generic components at <provides/> in detail.
- You can add one or more children of type <library/> in case you publish some additional shared libraries. If not, and there are no public binaries involved, you may omit the provides tag for input-methods. + You can add one or more children of type <library/> in case you publish some additional shared libraries. If not, and there are no public binaries involved, you may omit the provides tag for input methods.
For a component of type inputmethod, the following tags are required and must be present: <id/>, <name/>, <summary/>, <metadata_license/>. -
\ No newline at end of file + \ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-Localization.html appstream-0.12.0/docs/html/sect-Metadata-Localization.html --- appstream-0.9.4/docs/html/sect-Metadata-Localization.html 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-Localization.html 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,58 @@ + +2.12. Localization

Product SiteDocumentation Site

+ ⁠2.12. Localization

+ ⁠2.12.1. Localization

+ The localization component type describes language packs for individual software components or groups of software components. A language pack includes anything necessary to localize a software component for a specific language and/or country. This is usually translations, but may also be translated media content, currency information and other things. A localization component extends one or multiple other components and defines the languages it provides via its languages tag. +
+ Language packs can ship one or more metainfo files as /usr/share/metainfo/%{id}.metainfo.xml. +

+ ⁠2.12.2. Example file

+ A localization metainfo file can look like this: +

+<?xml version="1.0" encoding="UTF-8"?>
+<component type="localization">
+  <id>org.kde.l10n.de</id>
+  <name>KDE German Language</name>
+  <summary>German localization for the KDE desktop and apps</summary>
+
+  <extends>org.kde.plasmashell</extends>
+  <extends>org.kde.gwenview.desktop</extends>
+  <extends>org.kde.dolphin.desktop</extends>
+  ...
+
+  <url type="homepage">http://i18n.kde.org/team-infos.php?teamcode=de</url>
+  <metadata_license>FSFAP</metadata_license>
+
+  <developer_name>The KDE German L10N team</developer_name>
+
+  <languages>
+    <lang>de_DE</lang>
+    <lang percentage="96">de_AT</lang>
+    <lang percentage="100">de</lang>
+    ...
+  </languages>
+</component>

+ ⁠2.12.3. File specification

+ Note that the XML root must have the type property set to localization. This clearly identifies this metainfo document as describing a language pack. +
+ ⁠<id/>
+ For localizations, the value of the <id/> tag must follow the reverse-DNS scheme as described for generic components. Ideally, the name of the component this language pack is for should be suffixed with .l10n.%{lang}, where %{lang} is the language code of the language pack. +
+ For example, if your applications component-id is org.gimp.gimp the ID of the German language pack for GIMP should be org.gimp.gimp.l10n.de. +
+ ⁠<extends/>
+ The extends tags contain all the components this language pack can be used with. +
+ ⁠<languages/>
+ This tag gives information about the locale a localization component provides support for. +
+ The tag is allowed to only occur once per component, and contains multiple <lang/> child nodes, which have a language code as value. Each <lang/> node may have a percentage property, which describes the percentage value to which a component has been translated. +
+ Tag example: +
<languages>
+  <lang>de_DE</lang>
+  <lang percentage="94">de_AT</lang>
+</languages>
+
+ For a component of type localization, the following tags are required and must be present for a valid document: <id/>, <name/>, <summary/>, <metadata_license/>, <extends/>, <languages/>. +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-Service.html appstream-0.12.0/docs/html/sect-Metadata-Service.html --- appstream-0.9.4/docs/html/sect-Metadata-Service.html 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-Service.html 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,34 @@ + +2.5. Services

Product SiteDocumentation Site

+ ⁠2.5. Services

+ ⁠2.5.1. Introduction

+ A service component is any software that is started and supervised by the Operating Systems "init" facility, such as systemd. +
+ The metadata described in this document is built upon the generic component metadata with fields specific for services (see Section 2.1, “Generic Component”). All tags valid for a generic component are valid for a service component as well. +
+ In order to enhance the available metadata about their services, projects shipping a service can ship one or more metainfo files in /usr/share/metainfo/%{id}.metainfo.xml. +

+ ⁠2.5.2. File specification

+ The basic structure for a generic component as described at Section 2.1.3, “XML Specification” applies. Note that the XML root must have the type property set to service, while in a generic component this property can be omitted. This clearly identified this metainfo document as describing a service. +
+ The following list describes tags for service upstream metadata and provides some additional information about the values the tags are expected to have. If no information is given about a tag, refer to the respective tag in Section 2.1, “Generic Component”. +
+ ⁠<id/>
+ For services, the <id/> tag value must follow the AppStream ID naming conventions (it should be a reverse-DNS name). +
<metadata_license/>
+ The <metadata_license/> tag as described in <metadata_license/> must be present. +
<name/>
+ A name must be present for services. See <name/> for a detailed description of this tag. +
<summary/>
+ A summary must be present for services. See <summary/> for a detailed description of this tag. +
+ ⁠<provides/> ↪ <service/>
+ This tag is described in detail for generic components at <provides/>. +
+ ⁠<launchable/>
+ This tag is described in detail for generic components at <launchable/>. +
+ At least one launchable element with type "service" must be present. The value is a name that can be used with the OS init facility to start/stop and monitor the service. +
+ For a component of type service, the following tags are required and must always be present: <id/>, <metadata_license/>, <name/>, <summary/>, <provides/> ↪ <service/>. +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Metadata-WebApplication.html appstream-0.12.0/docs/html/sect-Metadata-WebApplication.html --- appstream-0.9.4/docs/html/sect-Metadata-WebApplication.html 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Metadata-WebApplication.html 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,38 @@ + +2.4. Web Applications

Product SiteDocumentation Site

+ ⁠2.4. Web Applications

+ ⁠2.4.1. Introduction

+ A web application is an application running remotely that is accessed via a web browser and built on the web platform. +
+ The metadata described in this document is built upon the generic component metadata with fields specific for web-applications (see Section 2.1, “Generic Component”). All tags valid for a generic component are valid for a web-application component as well. +
+ A web application metainfo file is special in the regard that it is usually not combined with the software it is describing and that it has no installable. It usually is equivalent to a weblink that gets special treatment by software centers. Web application metainfo files are therefore injected directly into the collection metadata generation process, or can be installed as usual into /usr/share/metainfo/%{id}.metainfo.xml. +
+ Software centers may display web applications in special, chrome-less web browser windows to achieve better desktop integration and make the web application feel more native on the desktop. +

+ ⁠2.4.2. File specification

+ The basic structure for a generic component as described at Section 2.1.3, “XML Specification” applies. Note that the XML root must have the type property set to web-application, while in a generic component this property can be omitted. This clearly identified this metainfo document as describing a web application. +
+ The following list describes tags for web-application metainfo files and provides some additional information about the values the tags are expected to have. If no information is given about a tag, refer to the respective tag in Section 2.1, “Generic Component”. +
+ ⁠<id/>
+ For web applications, the <id/> tag value must follow the AppStream ID naming conventions (it should be a reverse-DNS name). +
<metadata_license/>
+ The <metadata_license/> tag as described in <metadata_license/> must be present. +
<name/>
+ A name must be present for console applications. See <name/> for a detailed description of this tag. +
<summary/>
+ A summary must be present for console applications. See <summary/> for a detailed description of this tag. +
+ ⁠<launchable/>
+ This tag is described in detail for generic components at <launchable/>. +
+ A launchable tag of type url must be present for web applications. It is used as the entry point for starting the web application and opened in a browser in case the user wants to "launch" the web application. +
+ ⁠<icon/>
+ This tag is described in detail for generic components at <icon/>. +
+ A icon tag must be present for web applications. Authors of the metainfo files might prefer using the remote icon type, but any icon type is allowed here. +
+ For a component of type web-application, the following tags are required and must always be present: <id/>, <metadata_license/>, <name/>, <summary/>, <launchable/>, <icon/>, <categories/>. +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Quickstart-Addons.html appstream-0.12.0/docs/html/sect-Quickstart-Addons.html --- appstream-0.9.4/docs/html/sect-Quickstart-Addons.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Quickstart-Addons.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,5 +1,5 @@ -4.2. For upstream projects providing addons

Product SiteDocumentation Site

+4.2. For upstream projects providing addons

Product SiteDocumentation Site

4.2. For upstream projects providing addons

4.2.1. Introduction

TODO: write short intro @@ -18,7 +18,7 @@ <project_license>GPL-2.0+</project_license> </component>

4.2.3. Metadata file contents

- This is a list of tags you might want to define for your application. For a full list of possible tags, take a look at the definition of a generic component (Section 2.1.3, “XML Specification”) and an addon-component (Section 2.3.3, “File specification”). + This is a list of tags you might want to define for your application. For a full list of possible tags, take a look at the definition of a generic component (Section 2.1.3, “XML Specification”) and an addon component (Section 2.6.3, “File specification”).
<id/>
For addons, there is no strict rule for the component-ID. You should just ensure that you pick a unique name.
@@ -59,4 +59,4 @@ The <project_license/> tag is indicating the license(s) this addon is released under. Take a look at the specification of the <project_license/> tag for details on how to properly use it.
<update_contact/>
You might want to include an update-contact email address. Take a look at the specification of the <update_contact/> tag for more details on how to use this tag. -
\ No newline at end of file +

\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Quickstart-Distros.html appstream-0.12.0/docs/html/sect-Quickstart-Distros.html --- appstream-0.9.4/docs/html/sect-Quickstart-Distros.html 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Quickstart-Distros.html 2018-04-04 15:53:50.000000000 +0000 @@ -0,0 +1,13 @@ + +4.3. For distributors packaging Appstream metadata

Product SiteDocumentation Site

+ ⁠4.3. For distributors packaging Appstream metadata

+ ⁠4.3.1. Guidelines for distributors

+ Distributors of projects with AppStream metadata perform an important role by making the software available to more people. There are a few guidelines distributors should follow in order for software centers to present the correct information to users. +

+ ⁠4.3.2. Guidelines for distributors

+ A binary package that contains AppStream desktop metadata (Section 2.2, “Desktop Applications”) must also contain both the .desktop file for the application and the application itself. +
+ A binary package must not contain more than one AppStream metadata file. The one exception is that it is permissable for a binary package that is extended by addons to include those addons (Section 2.6, “Addons”) and their AppStream metadata files. Note that users will be unable to remove those addons separately. +
+ Except for the extended package, no other package may contain more than one Appstream addon metadata file. +
\ No newline at end of file diff -Nru appstream-0.9.4/docs/html/sect-Quickstart-Translation.html appstream-0.12.0/docs/html/sect-Quickstart-Translation.html --- appstream-0.9.4/docs/html/sect-Quickstart-Translation.html 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/docs/html/sect-Quickstart-Translation.html 2018-04-04 15:53:50.000000000 +0000 @@ -1,19 +1,25 @@ -4.3. Translating Metadata

Product SiteDocumentation Site

- ⁠4.3. Translating Metadata

- ⁠4.3.1. Introduction

+4.4. Translating Metadata

Product SiteDocumentation Site

+ ⁠4.4. Translating Metadata

+ ⁠4.4.1. Introduction

Most AppStream metadata can be translated, This page contains some practical instructions how to translate the metadata.

For KDE developers

If you are a KDE developer and using the KDE infrastructure with it's localization support, you need to do nothing to get translated metadata. Just place your *.appdata.xml* or *.metainfo.xml* file at a sane place, and the l10n-script will translate the file in-place automatically.

- ⁠4.3.2. Translating using Intltool

+ ⁠4.4.2. Translating using Intltool
If you ship an .xml.in file rather than an .xml file, you can use Intltool to translate the data.
- Each translatable element in the .xml.in file needs to be prefixed with an underscore (_) to be marked as translatable. Apart from that, the same specifications apply to this file as for any other AppStream metadata. + Each translatable element in the .xml.in file needs to be prefixed with an underscore (_) to be marked as translatable. This should include the name, summary, and caption tags, as well as each paragraph in the description. Apart from that, the same specifications apply to this file as for any other AppStream metadata.
- TODO: Fill in some generic examples how Intltool can be used. -

- ⁠4.3.2.1. Integrating with Autotools (the AppStream way)

+ To translate the appstream data, first add the .xml.in file to po/POTFILES.in, along with any other translatable files. Then create the translation template file <package name>.pot. +
cd po; intltool-update --pot --gettext-package=<package name>
+ For each supported language, copy the template file to po/<language>-[<COUNTRY>].po, where po/<language> and the optional po/<COUNTRY> are standard two-letter codes. Edit the file to add translated strings. +
+ As the translatable content is updated, recreate the template file, and update the .po files. +
cd po; intltool-update --dist --gettext-package=<package name> <language>
+ Create the translated .xml with the following command. +
intltool-merge -u -c ./po/.intltool-merge-cache ./po -x <file>.xml.in <file>.xml

+ ⁠4.4.2.1. Integrating with Autotools (the AppStream way)

The generic way to add translation to your AppStream metadata in case you use Autotools is by using the following code snippet:
appstreamdir = $(datadir)/appdata/
 appstream_in_files = gedit.appdata.xml.in
@@ -23,7 +29,7 @@
 CLEANFILES = $(appstream_DATA)
The code assumes you are using the Intltool Automake code.

- ⁠4.3.2.2. Integrating with Autotools (the AppStream-GLib way)

+ ⁠4.4.2.2. Integrating with Autotools (the AppStream-GLib way)
In case you want to use the macro provided by the AppStream-GLib library, you can use this code snippet:
@APPSTREAM_XML_RULES@
 appstream_in_files = gedit.appdata.xml.in
@@ -33,7 +39,7 @@
 CLEANFILES = $(appstream_XML)
Make sure you have the additional AppStream macro installed.

- ⁠4.3.3. Translating using Itstool

+ ⁠4.4.3. Translating using Itstool
You can also use Itstool for translation. In order to translate an XML file with it, you need an .its file with translation definitions. An appropriate file for AppStream upstream metadata of any kind can be found here:

 <its:rules
@@ -53,4 +59,4 @@
 			Please ensure that the .mo files in $modir are named with their language codes.
 		

Note

You can find more information about Itstool on their homepage. -
\ No newline at end of file + \ No newline at end of file diff -Nru appstream-0.9.4/docs/meson.build appstream-0.12.0/docs/meson.build --- appstream-0.9.4/docs/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,107 @@ +# Meson definition for AppStream Documentation + + +# +# Manual pages +# + +# where we install all our documentation to +as_doc_target_dir = join_paths(get_option('datadir'), 'doc', 'appstream') + +# make manual pages +xsltproc = find_program('xsltproc') +custom_target('man-appstreamcli', + input: 'sources/man/appstreamcli.1.xml', + output: 'appstreamcli.1', + install: true, + install_dir: join_paths(get_option('mandir'), 'man1'), + command: [ + xsltproc, + '--nonet', + '--stringparam', 'man.output.quietly', '1', + '--stringparam', 'funcsynopsis.style', 'ansi', + '--stringparam', 'man.th.extra1.suppress', '1', + '-o', '@OUTPUT@', + 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl', + '@INPUT@' + ] +) + +if get_option('docs') or get_option('apidocs') + subdir('api/') +endif + +# +# Documentation +# +as_doc_version = '0.12' + +as_doc_src = [ + 'sources/APIDoc.xml', + 'sources/AppStream.xml', + 'sources/Author_Group.xml', + 'sources/Book_Info.xml', + 'sources/collection/CollectionData.xml', + 'sources/collection/iconcache.xml', + 'sources/collection/xmldata.xml', + 'sources/collection/yamldata.xml', + 'sources/Legal_Notice.xml', + 'sources/man/appstreamcli.1.xml', + 'sources/Manpages.xml', + 'sources/metainfo/addon.xml', + 'sources/metainfo/codec.xml', + 'sources/metainfo/component.xml', + 'sources/metainfo/consoleapp.xml', + 'sources/metainfo/desktopapp.xml', + 'sources/metainfo/driver.xml', + 'sources/metainfo/firmware.xml', + 'sources/metainfo/font.xml', + 'sources/metainfo/inputmethod.xml', + 'sources/metainfo/localization.xml', + 'sources/metainfo/MetaInfo.xml', + 'sources/metainfo/service.xml', + 'sources/metainfo/webapp.xml', + 'sources/Project_Desc.xml', + 'sources/quickstart/addons.xml', + 'sources/quickstart/desktop-apps.xml', + 'sources/quickstart/packaging.xml', + 'sources/quickstart/Quickstart.xml', + 'sources/quickstart/translation.xml', + 'sources/Revision_History.xml', + 'sources/services/screenshots.xml', + 'sources/services/Services.xml', + 'sources/services/urlhandler.xml' +] + +if get_option('docs') + publican_exe = find_program('publican') + python_exe = find_program('python3') + + build_docs_cmd = [ + python_exe, + join_paths(meson.current_source_dir(), 'doc-build-helper.py'), + '--src=' + meson.current_source_dir(), + '--ws=' + meson.current_build_dir(), + '--out=' + meson.current_source_dir(), + 'AppStream', + as_doc_version + ] + + make_docs_target = custom_target('make-docs', + input: ['publican.cfg', + as_doc_src], + output: ['docs_built.stamp'], + build_by_default: true, + command: build_docs_cmd + ) + + # helper if you only and always want to rebuild the docs + run_target('documentation', command: build_docs_cmd) + + install_subdir('html', install_dir: as_doc_target_dir) +else + if run_command('[', '-d', join_paths(meson.current_source_dir(), 'html'), ']').returncode() == 0 + # install documentation, if it exists + install_subdir('html', install_dir: as_doc_target_dir) + endif +endif diff -Nru appstream-0.9.4/docs/prepare-docbuild.sh appstream-0.12.0/docs/prepare-docbuild.sh --- appstream-0.9.4/docs/prepare-docbuild.sh 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/prepare-docbuild.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -#!/bin/bash -# (c) 2013 Matthias Klumpp, written for the Listaller Project -# GPLv2+ licensed - -for arg; do - case $arg in - source_dir=*) sourcedir=${arg#source_dir=};; - build_dir=*) builddir=${arg#build_dir=};; - esac; -done - -if [ -z "$sourcedir" ]; then - echo "ERR: No source directory set." - exit 1; -fi -if [ -z "$builddir" ]; then - echo "ERR: No build directory set." - exit 1; -fi - -# cleanup -rm -rf $builddir/en-US -rm -rf $builddir/AppStream-Docs -rm -f $builddir/publican.cfg - -# assemble documentation build directory -cp -dpr $sourcedir/sources $builddir/en-US -#cp -dpr $sourcedir/api/xml $builddir/en-US/api -cp $sourcedir/publican.cfg $builddir diff -Nru appstream-0.9.4/docs/publican.cfg appstream-0.12.0/docs/publican.cfg --- appstream-0.9.4/docs/publican.cfg 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/publican.cfg 2018-04-04 15:53:56.000000000 +0000 @@ -3,6 +3,5 @@ brand: common doc_url: http://www.freedesktop.org/software/appstream/docs/ prod_url: http://www.freedesktop.org/wiki/Distributions/AppStream/ -tmp_dir: AppStream-Docs toc_section_depth: 1 chunk_section_depth: 1 diff -Nru appstream-0.9.4/docs/sources/APIDoc.xml appstream-0.12.0/docs/sources/APIDoc.xml --- appstream-0.9.4/docs/sources/APIDoc.xml 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/sources/APIDoc.xml 2018-04-04 15:53:56.000000000 +0000 @@ -5,12 +5,12 @@ ]> - + AppStream API Reference A reference of AppStream's public API can be fount on the - API reference pages. + API reference pages. If you want to use the PackageKit API, look at diff -Nru appstream-0.9.4/docs/sources/AppStream.ent appstream-0.12.0/docs/sources/AppStream.ent --- appstream-0.9.4/docs/sources/AppStream.ent 2016-01-09 21:16:23.000000000 +0000 +++ appstream-0.12.0/docs/sources/AppStream.ent 2018-04-04 15:53:56.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru appstream-0.9.4/docs/sources/AppStream.xml appstream-0.12.0/docs/sources/AppStream.xml --- appstream-0.9.4/docs/sources/AppStream.xml 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/sources/AppStream.xml 2018-04-04 15:53:56.000000000 +0000 @@ -9,8 +9,8 @@ - - + + diff -Nru appstream-0.9.4/docs/sources/Book_Info.xml appstream-0.12.0/docs/sources/Book_Info.xml --- appstream-0.9.4/docs/sources/Book_Info.xml 2016-01-09 21:16:59.000000000 +0000 +++ appstream-0.12.0/docs/sources/Book_Info.xml 2018-04-04 15:53:56.000000000 +0000 @@ -5,21 +5,21 @@ ]> AppStream - Infrastructure for distro-agnostic software-centers and software metadata handling + Infrastructure for distro-agnostic software-centers and universal software component metadata AppStream - 0.9 + 0.12 1 0 - AppStream is a cross-distro effort for enhancing the way we interact with the software + AppStream is a collaborative effort for enhancing the way we interact with the software repositories provided by the distribution by standardizing sets of additional metadata. AppStream provides the foundation to build software-center applications. It additionally provides specifications for things like an unified software metadata database, screenshot services and various other things needed to create user-friendly application-centers - for (Linux) distributions. + for software distributions. diff -Nru appstream-0.9.4/docs/sources/collection/CollectionData.xml appstream-0.12.0/docs/sources/collection/CollectionData.xml --- appstream-0.9.4/docs/sources/collection/CollectionData.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/collection/CollectionData.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,20 @@ + + +%BOOK_ENTITIES; +]> + + Collection Metadata + + Additionally to the metainfo files shipped by upstream projects, AppStream also provides an XML and YAML format + to make information about not installed software components known to the system. + + + This chapter documents this collection metadata format and icon cache used on the client side. + + + + + + + diff -Nru appstream-0.9.4/docs/sources/collection/iconcache.xml appstream-0.12.0/docs/sources/collection/iconcache.xml --- appstream-0.9.4/docs/sources/collection/iconcache.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/collection/iconcache.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,46 @@ + + +%BOOK_ENTITIES; +]> + +
+ Icon Cache + +
+ Introduction + + + In order to display icons in software-centers, distributors should offer a repository of cached icons for applications defined in their AppStream XML files. + The icons should be PNG files or vectorgraphics (PNG is preferred) and match the name referenced in the applications .desktop file. + Their size should be 64x64px, it is okay to just provide one size. + +
+ +
+ Filesystem locations + + All icons of type cached must be placed in /usr/share/app-info/icons/%{origin}/%{size}/ or /var/cache/app-info/icons/%{origin}/%{size}/, + where origin is the AppStream data origin defined in the AppStream data file (see ), and size + is 64x64 or 128x128 depending on the size of the icon. And icon might be present with different sizes in both directories. + + + For example the cache icon krita.png of a component in a data file with the origin jessie should be stored in + /usr/share/app-info/icons/jessie/64x64/krita.png (or in the /var/cache location). + + + Icon sclaing factors commonly used for HiDPI display support are part of the size-directory filename and are separated from the regular size via an @ sign. + If the scaling factor is 1, it must be omitted from the directory name. + For example, if the icon scaling factor is 2 for icons of size 64x64 from origin jessie, the icon must be placed + in /usr/share/app-info/icons/jessie/64x64@2/. + + + Legacy Support + + In order to support the old icon cache layout, client applications may also look for icons in the folder below the size-directories, assuming + that the icons placed there are of size 64x64 pixels. + + +
+ +
diff -Nru appstream-0.9.4/docs/sources/collection/xmldata.xml appstream-0.12.0/docs/sources/collection/xmldata.xml --- appstream-0.9.4/docs/sources/collection/xmldata.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/collection/xmldata.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,717 @@ + + +%BOOK_ENTITIES; +]> + +
+ AppStream collection XML + +
+ Introduction + + + AppStream collection XML files are text files describing all available software components a software repository (usually + from a Linux distributor) offers for installation. + The XML files might be compressed with GZip. + +
+ +
+ File naming and location + + The XML files must have a unique name, which is usually the distribution's name and version, combined with the name of the repository/origin. + For example in Debian 8 (Jessie), the filename for the main repository component would be debian-jessie-main.xml.gz. + For Fedora 20 (Heisenbug) updates it would be fedora-20-updates.xml.gz. + 3rd-party repositories use a vendor name and repository-name combination, for example Ubuntu PPAs might get ppa-ubuntu12.04-username-foobar.xml. + + + There are two valid locations to store AppStream XML data. /usr/share/app-info/xmls stores all AppStream data which + has been installed via software packages, while /var/cache/app-info/xmls stores application data which was downloaded + by the package manager or placed there by other tools (for example, Limba). + The XML files can either be plain files or be compressed with gzip. It is always a good idea to compress the files, because they tend to become + quite large. + +
+ +
+ General XML structure + + The XML starts with a <components> tag as the root element. It has all the + <component> tags of different types as children. + + + Data to fill the different component elements is usually taken from their Desktop files + and package data. However, if an upstream project ships metainfo files (see ), + values defined there should override data from any other source. + + + All child elements of the <components> element, no matter of which type they are, must at least have + an id, name, summary and pkgname tag. + For applications, a icon tag is also required. + + + The <components> root node has these properties, where the first two are required: + + + + version + + + This property declares the AppStream spec version this file is based on (currently 0.9). The property is required. + + + + + + origin + + + Defines the repository ID this AppStream XML file belongs to. This usually matches the filename without extension (see the explanation on how to pick a good filename above). + It is also used to associate the right cached icons with AppStream metadata. This property is required. + + + + + + architecture + + + Defines the architecture this data belongs to. This information is useful to resolve AppStream-ID conflicts on multiarch systems, + which appear if the user has metadata for two architectures installed. This property is optional. + + + + +
+ +
+ Valid tags for all component types + + These tags can be applied to every component type (application, component, font, inputmethod) which + is described in the AppStream metadata. + + + Additionally to the type property, every <component/> tag in AppStream collection data + may have a priority property, defining the priority of this specific metadata over other metadata from different + AppStream XML files (for example, from a different repository) which have the same component-id. The value of this tag is an integer, if the + property is missing, a value of "0" is assumed. + + + In order to merge metadata, each component in collection data may also have a merge property, assuming the + values append or replace. If the value is append, all data this component describes will be appended + to data of the component with the same ID. If the value is replace the fields of the target component will be replaced with the + ones present in the merge component. + Merge components with a higher priority take precedence. If a component has a merge property, the only tag that must at least + be present for it is the <id/> tag. + + + + + <id/> + + + The <id/> tag is a short unique and usually lower-cases identifier for the component. + Depending on the component's type, different naming conventions apply. + + + + + + <pkgname/> + + + The name of the package which needs to be installed in order to make this component available on the system. + + + This tag can be defined multiple times, if a component is split across multiple packages. + + + + The preferred way is to create metapackages containing the component metadata, and referencing them + from the collection metadata, and not to use multiple pkgname tags. + They should only be used multiple times as a workaround or if there is no sensible way of creating a + matching metapackage. + + + + + + + <source_pkgname/> + + + This optional tag is used to specify the source package the binary package this component belongs to was built from. + + + The tag can be used by software center applications to group components. It is otherwise useful for the distributor + to assign components to a source package and to fetch additional information about a package from the web. + + + + + + <name/> + + + A human-readable name for this software. + + + In case of a component of type desktop-application, the application name as defined in the application's + desktop file is used. + + + + + + <project_license/> + + + The <project_license/> tag is indicating the license of the component. + It should be a SPDX license expression. + Possible values include: + + GPL-2.0 + LGPL-3.0+ AND GPL-3.0+ + MIT + CC-BY-SA-2.0 + ... + + A full list of recognized licenses and their identifiers can be found at the + SPDX OpenSource License Registry. + + + + + + <summary/> + + + The tag contains a short summary of the purpose and function of this component. In case the component is of + type desktop, it is usually taken from a Desktop file, + if the application does not ship an upstream metadata file. + + + For more information about this tag, take a look at the tag's definition at . + + + + + + <description/> + + + A long description of the component. It is usually taken from the package descriptions or meta-info files, if they were provided. + The description might use markup. Right now, only paragraph, ordered list and unordered list are supported. + An example description element might look like this: + +

+ Power Statistics is a program used to view historical and current battery + information and will show programs running on your computer using power. +

+

Example list:

+
    +
  • First item
  • +
  • Second item
  • +
+

+ You probably only need to install this application if you are having problems + with your laptop battery, or are trying to work out what programs are using + significant amounts of power. +

+ ]]>
+
+ + As opposed to the by-paragraph translation used in meta-info files, this tag is translated "as a whole", meaning that the + <description/> tag itself has a language property and contain the translated paragraphs for the given language. + This allows faster parsing of the Appstream XML file, and does not increase it's size much, as long as it is compressed. + + + For more information about this tag, take a look at the tag's definition at . + +
+
+ + + <url/> + + + Defines URLs for this component. This tag can be present multiple times. + + + For a list of possible url types and what they are expected to do, + take a look at the tag's description at . + + + + + + <project_group/> + + + The ]]> tag identifies a project with a specific upstream umbrella project. + Known values include GNOME, KDE, XFCE, LXDE, Mozilla and MATE, although other umbrella projects + like Yorba would make sense too. + + + + Components should only identify with an umbrella project if you use all their infrastructure and policies, for instance + string freezes dates, bugtracker and source control instance. + + + + + + + <icon/> + + + The <icon/> tag describes the component icon. It is mostly used for GUI applications (component-type desktop-application). + It can be of the type stock, cached, local, + or url. + + + stock icons are loaded from stock. The icon name should never include any file-extension or path. + + + cached icons are loaded from the AppStream icon cache. The icon tag should contain the icon file name, including it's + extension. It must not contain a full or relative path to the icon file. + + + local icons are reserved for AppStream data installed by local applications or via 3rd-party application installers. + They should specify a full file path. + This icon type may have width and height properties. + + + remote icons loaded from a remote URL. Currently, only HTTP urls are supported. + This icon type should have width and height properties. + + + Examples of the different methods to specify an icon: + + gimp +firefox.png +http://example.com/icons/foobar.png +/usr/share/pixmaps/foobar.png]]> + + Multiple ]]> tags might be combined for one application, for example to define a stock icon + and a cached icon. + Software-Centers should always prefer the stock icon, if it is available, and fall back to the other icon types if they can not find it. + The libappstream library makes it easy to do that. + + + The AppStream library will prefer cached over local over remote + icons when setting the non-stock icon for the application. + + + + + + <mimetypes/> + + + This tag can contain one or more ]]> tags, describing the mime types this component supports. + The data can usually be fetched from the Desktop files. + Example: + + + text/html + image/jpeg + application/rss+xml + ]]> + + + + + <categories/> + + + This tag can contain one or more ]]> tags, describing the categories this component + is located in. This tag is usually applied to components of type desktop-application, although it might be used by others later. + This data is usually taken from Desktop files, a list of categories can be found in the + Freedesktop menu spec. + Example: + + + Science + Network + Telephony +]]> + + Deprecated Tags + + The tag ]]> with its ]]> child elements is deprecated API. + AppStream parsers should handle these tags just like the category tags, there is no difference except for the name. + + + + + + + <keywords/> + + + This tag can contain one or more ]]> tags, describing keywords for the component, + to make it easier to find in a software center. + In case of type desktop-application components, this data is taken from .desktop files. For addon + components, the upstream metadata file usually provides this tag. + For translated keyword lists, the root node (<keywords/>) has the language property. + Example: + + + IDE + development + programming + + + IDE + entwicklung + programmierung +]]> + + + + + <screenshots/> + + + This tag can contain one or more ]]> tags, describing screenshots which are available for + the software. A screenshot tag my have the attribute type="default", marking it as the software's default screenshot, + which primarily represents it in a software center. + + + The screenshots tag is described for metainfo files in . In collection metadata, the tag + has the exact same format as in metainfo files. + The metadata generator may add an arbitrary number of resized thumbnails though. + + + Every ]]> is defined by several images of different sizes. + All images should have their width and hight set as arguments. Also, one of the images should be marked as type="source", + indicating that it is the unscaled version of the screenshot. + Images of type="thumbnail" define thumbnails of the screenshot. + + + The metadata generator should scale the source image down to several thumbnails useful for the client to load. + The recommended sizes for thumbnail images are: + + + 752x423 (large) + 624x351 (normal) + 112x63 (small) + + 1504x846 (large, HiDPI) + 1248x702 (normal, HiDPI) + 224x126 (small, HiDPI) + + + In order to support HiDPI screens, the thumbnails should also be available in their bigger sizes. A metadata generator should, however, never attempt + to scale up a smaller image to a larger size, and just ship the smaller sizes instead. + + + Optionally, a screenshot can contain a ]]> tag, describing the screenshot's caption. This is usually what the user can see + on the image shown. The tag is translatable. + + + Every image should have a full remote url set, usually pointing to a cache of images maintained by the repository vendor. + Example: + + + + FooBar showing kitchen-sink functionality. + FooBar beim Ausführen der Spühlbecken-Funktion. + http://www.example.org/en_US/main.png + http://www.example.org/en_US/main-large.png + http://www.example.org/en_US/main-small.png + + + .... + +]]> + + + + + <compulsory_for_desktop/> + + + The ]]> tag indicates that the component which the metadata belongs to is essential for the + functionality of the defined desktop environment. Examples for compulsory components are the GNOME-Shell by the GNOME-Project, + or the Plasma-Desktop by KDE, as well as things like iBus or the desktop login manager. + + + Software centers are expected to detect the running desktop environment and disable uninstallation for compulsory components of that desktop, + so users will not be able to damage their currently running, primary desktop environment. + + + Multiple occurrences of the ]]> tag are allowed, so a project can be essential for many desktops. + The distributor decides which components should be made compulsory, however it is generally a good idea to follow upstream's recommendations on that matter. + + + A list of all allowed values for this tag is defined in the XDG Menu Specification. + Software center applications will only recognize these values. + + + + + + <provides/> + + + This tag is described in detail at . + + + Distributors and software repository vendors must ensure that all things described in this tag are present in the package referenced in + the associated pkgname tag (or in dependencies of it). + + + + + + <developer_name/> + + + The <developer_name/> tag as described in the specification for a generic component. See for more information. + + + + + + <launchable/> + + + This optional tag follows the same schema as described for metainfo files in . + + + + + + <releases/> + + + The releases tag and its release children are structured as described in . + + + Each release tag may have a description tag as child, containing a brief description of what is new in the release. + The description tag is structured as described in . This also applies to its translation rules. + + + The AppStream collection XML generator may shorten overlong lists of releases to a smaller list, for example of 4 release tags. + It may also convert ISO 8601 date properties of the metainfo file into an UNIX timestamp timestamp property. + It should avoid generating metadata containing both properties on a release tag. + + + Example for a valid releases tag: + + + + +

This stable release fixes the following bug:

+
    +
  • CPU no longer overheats when you hold down spacebar
  • +
+
+ 12345678 + 42424242 +
+ + +]]>
+ + In case a <release/> tag has a <description/> tag as parameter, describing the new release briefly, distributors are encouraged to provide 2-4 + <release/> release tags for every component. If no description is provided, one tag is enough. + + + Components of type firmware () may also have a tag as child of one of the + <release/> tags. In case a <location/> tag is present, it must be accompanied by a <checksum/> tag, containing + a checksum of the downloaded file. This is done to ensure the integrity of the downloaded firmware, and that the user gets the firmware which was tested by the distributor. + The <location/> tag is often used in case the distributor is not allowed to legally redistribute the firmware in a native package. + + + The <checksum/> tag has a type attribute, describing the checksumming-algorithm that was used to create it. Currently, only SHA1 + is supported. + + + Example for a <release/> tag of a firmware component which makes use of <location/>: + + + http://www.hughski.com/downloads/colorhug2/firmware/colorhug2-2.0.3.cab + 40b59e37cb918f3241f65bc5ac2b90ab47b34e8c + +

This stable release fixes problems.

+
+]]>
+
+
+ + + <languages/> + + + This tag gives information about the translations a component provides, and to which extent the software is translated. + + + The tag is allowed to only occur once per component, and contains multiple <lang/> child nodes, which have + a language code as value. + Each <lang/> node may have a percentage property, which describes the percentage value to which + a component has been translated. + + + The language data is expected to be extracted by the AppStream XML generator, and is not provided upstream. Generators may obtain the + information from processing GNU Gettext files, which should cover most translation methods. + + + Tag example: + + + gu + ca@valencia + de + eo + +]]> + + + + + <bundle/> + + + The optional bundle tag indicates that the described software is available as a software bundle via a + 3rd-party application installer. The value of this tag is an identification string for the bundle. + + + Software centers may use the information of this tag to offer the user to install the software + from 3rd-party sources, or just update an already installed software automatically via the normal update procedure. + The bundle tag can coexist with the pkgname tag, in case a component is available from + multiple sources. + + + The type property of this tag indicates which 3rd-party software installation solution the bundle belongs to. + Currently supported solutions are: + + The Limba Project, using the value limba. + Flatpak bundles, using the value flatpak. + AppImageKit bundles, using the value appimage. + Snappy snap bundles, using the value snap. + + + + Example: + + foobar-1.0.2]]> + + + + + <suggests/> + + + The optional suggests tag provides suggestions of other software made by this component. + It follows the same schema as described for metainfo files in . + + + Additionally to the upstream type allowed for metainfo files, the catalog data also allows a + heuristic type, which is added by automatic recommendation services, and might be based on the user's + preferences. It is commonly injected into existing metadata via a merge pseudo-component. + + + Example: + + + org.kde.gwenview.desktop + org.inkscape.Inkscape + + + org.gimp.gimp.desktop +]]> + + + + + <content_rating/> + + + This optional tag follows the same schema as described for metainfo files in . + + + + +
+
+ +
+ Example file + + This is an example AppStream metadata file: + + + + + + org.mozilla.Firefox + firefox-bin + Firefox + Firefoux + Web browser + Navigateur web + MPL-2.0 + + internet + web + browser + navigateur + + web-browser + firefox.png + + network + web + + + text/html + text/xml + application/xhtml+xml + application/vnd.mozilla.xul+xml + text/mml + application/x-xpinstall + x-scheme-handler/http + x-scheme-handler/https + + http://www.mozilla.com + + + http://www.awesomedistro.example.org/en_US/firefox.desktop/main.png + http://www.awesomedistro.example.org/en_US/firefox.desktop/main-small.png + + + + firefox + + + + org.freedesktop.PulseAudio + PulseAudio + The PulseAudio sound server + http://www.freedesktop.org/wiki/Software/PulseAudio/ + GPL-2.0+ + + libpulse-simple.so.0 + libpulse.so.0 + start-pulseaudio-kde + start-pulseaudio-x11 + + + + + org.linuxlibertine.LinuxLibertine + Linux Libertine + Linux Libertine Open fonts + + LinLibertine_M.otf + + + +]]> + +
+
diff -Nru appstream-0.9.4/docs/sources/collection/yamldata.xml appstream-0.12.0/docs/sources/collection/yamldata.xml --- appstream-0.9.4/docs/sources/collection/yamldata.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/collection/yamldata.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,947 @@ + + +%BOOK_ENTITIES; +]> + +
+ AppStream collection YAML + +
+ Introduction + + + DEP-11 is a YAML implementation of the AppStream collection specification, which is primarily used by Debian and its derivatives. + This document describes the DEP-11 YAML. + All AppStream support libraries available today are able to read both the YAML and the XML specification. + + + + + If you want to use AppStream in your distribution, and are not based on Debian, please use the XML specification (unless + you have strong reasons for preferring YAML). + XML is the official format for AppStream collection metadata. + + + + + The DEP-11 YAML metadata can be validated for correctness using the dep11-validate tool from the + AppStream DEP-11 utils. + + + Fields not mentioned in this document are not recognized by DEP-11 YAML parsers. + +
+ + +
+ File naming and location + + Take a look at for AppStream XML files. While the XML data belongs into the xmls subdirectory in + /usr/share/app-info (or /var/cache/app-info), the YAML data is stored in the yaml subdirectory. + All other rules affecting the XML apply the DEP-11 YAML as well, including the recommendation to compress the files with gzip. + +
+ +
+ General DEP-11 YAML structure + + Each YAML file starts with a header document, which defines the basic properties of the metadata, which is followed by the actual metadata in form of one + YAML document per AppStream component. + + + The header document contains the following fields, all of them are required or at least strongly recommended. + + + + File + + + This field identifies the file as DEP-11 file. Its value is always DEP-11. + + Field info: value-type:str, required:yes + + + + + Version + + + The version of the AppStream specification this file was built for. + + Field info: value-type:str, required:yes + + + + + Origin + + + Defines the repository-id this file belongs to. This usually matches the filename without extension. On Debian systems, it is the + <suite>-<component> combination, e.g. jessie-main. + + Field info: value-type:str, required:yes + + + + + MediaBaseUrl + + + The base URL for media (screenshots, icons, ...) referenced in the metadata file. + If this is set, all urls in the document referencing media will be treated relative to the base url. + + Field info: value-type:str, required:no + + + + + Architecture + + + Defines the architecture this data belongs to. This information is useful to resolve AppStream-ID conflicts on multiarch systems, + which appear if the user has metadata for two architectures installed. + + Field info: value-type:str, required:no + + + + + Priority + + + The priorization of this metadata file over other metadata. + + Field info: value-type:int, required:no + + + +
+ +
+ Translated fields + + Fields with translated values follow the following conventions: + + + They are of type dict + They must contain a key C, with the untranslated string as value + + + All languages are represented with their locale name as key in the dict and the translated content as value + (which is of type str, unless explicitly stated otherwise) + + + + + In this document, the type localized is used to indicate that the field contains translated values following this schema. + + + Example for a translated Name field: + + + +
+ +
+ Valid fields + + This document describes all valid fields in the DEP-11 YAML specification. The requirements for the values are exactly the same as in the XML specification, + and each field links to its correspondent XML tag for reference. + + + + + ID + + + The ID field is a short unique and usually lower-cases identifier for the component. + Depending on the component's type, different naming conventions apply. + + See . + Field info: value-type:str, required:yes + + + + + Priority + + + The Priority field sets the priority this component's metadata should have over other meadata in the pool. + Data with a higher priority replaces data with a lower priority. + + See . + Field info: value-type:int, required:no + + + + + Type + + + The type of this component. Allowed values are: + + + generic for + desktop-application for + console-application for + addon for + codec for + inputmethod for + firmware for + + + Field info: value-type:str, required:yes + + + + + Merge + + + The optional Merge field describes the merge strategy that should be applied when merging data of this component into + its base. It may assume the values append or replace. + + See for a description on how merging works. + Field info: value-type:str, required:no + + + + + Package + + + The name of the package which needs to be installed in order to make this component available on the system. + + See . + Field info: value-type:str, required:yes + + + + + SourcePackage + + See . + Field info: value-type:str + + + + + Name + + See . + Field info: value-type:localized, required:yes + + + + + Summary + + See . + Field info: value-type:localized, required:yes + + + + + ProjectLicense + + See . + Field info: value-type:str + + + + + Description + + See . + + The markup for the description is the same as in the XML specification, so it can be read by anything + parsing basic HTML markup. + + Field info: value-type:localized + + + + + Url + + See . + + The Url field contains the different url types as keys in its dict. Valid url types are + defined in the main AppStream XML specification. + All URL types must be lowercased. + + + Example: + + + + Field info: value-type:dict + + + + + ProjectGroup + + See . + Field info: value-type:str + + + + + Icon + + See . + + + The Icon field has the different icon types as keys for its dict. + + + + + stock + + + Contains the stock icon name. + + Field info: value-type:str + + + + + cached + + + Contains a list of dictionaries with the keys width and height of type + int specifying the dimensions of the icon, as well as the key name + of type str specifying the name of the icon in the cache. + + Field info: value-type:list ➟ dict + + + + + local + + + Contains a list of dictionaries with the keys width and height of type + int specifying the dimensions of the icon, as well as the key name + of type str specifying the absolute filename pointing to the right icon. + + Field info: value-type:list ➟ dict + + + + + remote + + + Contains a list of dictionaries with the keys width and height of type + int specifying the dimensions of the icon, as well as the key url + of type str which contains a HTTP(S) or FTP URL to the icon. + + Field info: value-type:list ➟ dict + + + + + Field info: value-type:dict + + + + + Categories + + See . + + + This field follows its XML counterpart in almost all regards. The different XDG menu category names are encoded in the list, and are + of type str. + + + Example: + + + Field info: value-type:list + + + + + Keywords + + See . + + + This field contains the keywords for this component. The keys define the locales for the respective language, the values are + of type list and contain the list of keywords for the respective language. An unlocalized C + key must be present. + + + Example: + + + Field info: value-type:translated(list) + + + + + + Screenshots + + See . + + The Screenshots field contains a list of screenshots. A screenshot is of type + dict and contains the following keys: + + + + + default + + + If default is true, the screenshot is selected as default screenshot. There has to be at least one + screenshot which is marked as default. + + Field info: value-type:bool + + + + + source-image + + + Describes the source image for this screenshot. It has the following keys: + + + + height + The image height (value-type:int) + + + width + The image width (value-type:int) + + + url + + The full image url, or the url component added to MediaBaseUrl, + if defined (value-type:str). + + + + lang + + The language this screenshot image is translated in. The value is a locale string. + (value-type:str, required:no) + + + + Field info: value-type:dict, required:yes + + + + + thumbnails + + + A list of an arbitrary number of screenshots. All screenshots are of type dict and must contain the same keys as described for + source-image. + + Field info: value-type:list, required:no + + + + + caption + + + A caption for this screenshot. + + Field info: value-type:localized + + + + + + Example for a Screenshots field containing one screenshot: + + + + Field info: value-type:list + + + + + + CompulsoryForDesktop + + See . + Field info: value-type:str + + + + + Provides + + See . + + The Provides field is of type dict and can have the following keys set with + the described allowed values: + + + + + libraries + + + A list of provided library names. + + Field info: value-type:list(str) + + + + + binaries + + + A list of provided binaries in PATH. + + Field info: value-type:list(str) + + + + + mimetypes + + + A list of mimetypes this component can handle. + + Field info: value-type:list(str) + + + + + firmware + + + A list of provided firmware. Each firmware entry is of type dict and has a + type key, which has either runtime or flashed as + value. + Firmware of type flashed has a guid key, containing the GUID of the device + the firmware is flashed on, while firmware of type runtime has a file key, + containing the firmware filename which the kernel is looking for. + + Field info: value-type:list(dict) + + + + + dbus + + + A list of provided DBus services. Each service entry in the list is of type dict and has a + type key, which has either system or user as + value. user means the DBus service name is for a user/session service, while system means + it describes a system service. + The service key contains the name of the DBus service file. All dict values are of type str. + + Field info: value-type:list(dict) + + + + + + Field info: value-type:dict + + + + + DeveloperName + + See . + Field info: value-type:localized + + + + + Launchable + + See . + + A dictionary containing the launchable-type as key, and a list of IDs used for launching the application as value. + + + Example: + + + Field info: value-type:dict(list) + + + + + Releases + + See . + + The Releases contains a list of releases, where each list items contains the following fields/keys: + + + + + version + + + The version number of this release. + + Field info: value-type:str, required:yes + + + + + unix-timestamp + + + The UNIX timestamp of when this software was released. + + + One of the unix-timestamp or date fields must be present. + + Field info: value-type:int, required:maybe + + + + + date + + + The ISO 8601 date of when this software was released. + + + One of the unix-timestamp or date fields must be present. + + Field info: value-type:str, required:maybe + + + + + description + + + A description of this release. May contain allowed HTML markup. + + Field info: value-type:localized + + + + + + It is recommended to order this list starting with the latest timestamp to the olderst one. + + + Example: + + This stable release fixes the following bug:

+
    +
  • CPU no longer overheats when you hold down spacebar
  • +
+ - version: '1.2' + unix-timestamp: 1397253600 + - version: '1.0' + unix-timestamp: 1345932000]]>
+ + Field info: value-type:list(dict) +
+
+ + + Languages + + See . + + The languages list is a list of dictionaries. They must contain a percentage + key, indicating the completion of translation for this language, and a locale + key, with the locale string as value. + + + Example: + + + Field info: value-type:list(dict) + + + + + Bundles + + See . + + The Bundles contains a list of dictionaries with the keys type, having the ID for a specific bundling + system (e.g. flatpak or limba) as value, and id for the associated bundle-id. + See the XML tag description for information on all valid bundling systems. + + + Example: + + + Field info: value-type:list + + + + + Extends + + See . + + Contains a list of AppStream IDs of the other component extended by the described component. + This field may only be used with component-type addon. + + Field info: value-type:list(str) + + + + + Suggests + + See . + + A list of dictionaries containing suggested software components. The dictionaries must have a type key + with the string value upstream or heuristic depending on where the suggestion originates from. + The also must have a ids key containing a list of component-ids of the suggested software. + + + Example: + + + Field info: value-type:list(dict) + + + + + ContentRating + + See . + + A dictionary containing the rating system as key, and a dictionary of rating-values as value. + The value-dictionary itself has the content rating IDs as keys and the intensity values as values. + The intensity values as well as IDs and rating system names match the values from the XML exactly. + + + Example: + + + Field info: value-type:dict(dict) + + + + + Requires & Recommends + + See . + + A list of dictionaries containing the referenced items. The dictionaries in the list must have one key denoting the item type, which has the + respective item value as value. Refer to the XML description for a list of possible types. + + + Each dictionary may have a version field with contains a version comparison string. The first two characters denote the version + comparison operation, and are followed by the version number to be compared with. The comparison operation may be one of: + + + == - Equal to + != - Not equal to + << - Lesser than + >> - Greater than + <= - Lesser than or equal to + >= - Greater than or equal to + + + Example: + + = 4.15' +- id: org.example.TestDependency + version: == 1.2]]> + Field info: value-type:list(dict) + + + +
+ +
+ + +
+ Example YAML file + + This is an example AppStream DEP-11 metadata file: + + +TeXstudio is an integrated writing environment for creating LaTeX documents. It integrates editing, + building and viewing into a single frontend.

Our goal is to make writing LaTeX as easy and comfortable + as possible. This is achieved through a rich feature set including:

+Icon: + cached: texstudio_texstudio.png +Keywords: + C: + - editor + - latex + - pdflatex + - xelatex + - lualatex + - context + - bibtex +ProjectLicense: GPL-2.0 +Url: + homepage: http://texstudio.sourceforge.net/ +Categories: + - Office + - Publishing +Provides: + mimetypes: + - text/x-tex +Screenshots: + - default: true + source-image: + height: 756 + url: texstudio_2.8.4+debian-3_amd64/screenshots/source/screenshot-1.png + width: 1344 + thumbnails: + - height: 423 + url: texstudio_2.8.4+debian-3_amd64/screenshots/752x423/screenshot-1.png + width: 752 + - height: 351 + url: texstudio_2.8.4+debian-3_amd64/screenshots/624x351/screenshot-1.png + width: 624 + - height: 63 + url: texstudio_2.8.4+debian-3_amd64/screenshots/112x63/screenshot-1.png + width: 112]]>
+ +
+
diff -Nru appstream-0.9.4/docs/sources/distrospec/asxml.xml appstream-0.12.0/docs/sources/distrospec/asxml.xml --- appstream-0.9.4/docs/sources/distrospec/asxml.xml 2016-04-12 14:21:13.000000000 +0000 +++ appstream-0.12.0/docs/sources/distrospec/asxml.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,685 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- AppStream distribution XML files - -
- Introduction - - - AppStream XML files are small textfiles describing all available applications in the distribution's package repositories. - The XML files might be compressed with GZip. - -
- -
- File naming and location - - The XML files must have an unique name, which is usually the distribution's name and version, combined with the name of the repository/origin. - For example in Debian 8 (Jessie), the filename for the main repository component would be debian-jessie-main.xml.gz. - For Fedora 20 (Heisenbug) updates it would be fedora-20-updates.xml.gz. - 3rd-party repositories use a vendor name and repository-name combination, for example Ubuntu PPAs might get ppa-ubuntu12.04-username-foobar.xml. - - - There are two valid locations to store AppStream XML data. /usr/share/app-info/xmls stores all AppStream data which - has been installed via software packages, while /var/cache/app-info/xmls stores application data which was downloaded - by the package manager or placed there by other tools (e.g. Limba). - The XML files can either be plain files or be compressed with gzip. It is always a good idea to compress the files, because they tend to become - quite large. - -
- -
- General XML structure - - The XML starts with an <components> tag as root element. It has all the - <component> tags of different type as children. - - - Data to fill the different component elements is usually taken from their Desktop files - and package data. However, if an upstream project ships metainfo files (see ), - values defined there should override data from any other source. - - - All child elements of the <components> element, no matter of which type they are, must at least have - an id, name, summary and pkgname tag. - For applications, a icon tag is also required. - - - The <components> root node has these properties, where the first two are required: - - - - version - - - This property declares the AppStream spec version this file is based on (currently 0.9). The property is required. - - - - - - origin - - - Defines the repository-id this AppStream XML file belongs to. This usually matches the filename without extension (see the explanation on how to pick a good filename above). - It is also used to associate the right cached icons with AppStream metadata. This property is required. - - - - - - architecture - - - Defines the architecture this data belongs to. This information is useful to resolve AppStream-ID conflicts on multiarch systems, - which appear if the user has metadata for two architectures installed. This property is optional. - - - - -
- -
- Valid tags for all component types - - These tags can be applied to every component type (application, component, font, inputmethod) which - is described in the AppStream metadata. - - - Additionally to the type property, every <component/> tag in AppStream distro data - may have a priority property, defining the priority of this specific metadata over other metadata from different - AppStream XML files (e.g. from a different repository) which have the same component-id. The value of this tag is an integer, if the - property is missing, a value of "0" is assumed. - - - - - <id/> - - - The <id/> tag is a short unique and usually lower-cases identifier for the component. - Depending on the component's type, different naming conventions apply. - - - - - - <pkgname/> - - - The name of the package which needs to be installed in order to make this component available on the system. - - - This tag can be defined multiple times, if a component is split across multiple packages. - - - - The preferred way is to create metapackages containing the component metadata, and referncing them - from the distribution metadata, and not to use multiple pkgname tags. - They should only be used multiple times as a workaround or if there is no sensible way of creating a - matching metapackage. - - - - - - - <source_pkgname/> - - - This optional tag is used to specify the source package the binary package this component belongs to was built from. - - - The tag can be used by software center applications to group components. It is otherwise useful for the distributor - to assign components to a source package and to fetch additional information about a package from the web. - - - - - - <name/> - - - A human-readable name for this component. - - - In case of a component of type desktop, the application name as defined in the application's - desktop file is used. - - - - - - <project_license/> - - - The <project_license/> tag is indicating the license of the component. - It should be a string in SPDX format. Licenses may be combined using and and or logic. - Possible values include: - - GPL-2.0 - LGPL-3.0+ and GPL-3.0+ - MIT - CC-BY-SA-2.0 - ... - - A full list of recognized licenses and their identifiers can be found at the - SPDX OpenSource License Registry. - - - - - - <summary/> - - - The tag contains a short summary of the purpose and function of this component. In case the component is of - type desktop, it is usually taken from a Desktop file, - if the application does not ship an upstream metadata file. - - - For more information about this tag, take a look at the tag's definition at . - - - - - - <description/> - - - A long description of the component. It is usually taken from the package descriptions or meta-info files, if they were provided. - The description might use markup. Right now, only paragraph, ordered list and unordered list are supported. - An example description element might look like this: - -

- Power Statistics is a program used to view historical and current battery - information and will show programs running on your computer using power. -

-

Example list:

-
    -
  • First item
  • -
  • Second item
  • -
-

- You probably only need to install this application if you are having problems - with your laptop battery, or are trying to work out what programs are using - significant amounts of power. -

- ]]>
-
- - As opposed to the by-paragraph translation used in meta-info files, this tag is translated "as a whole", meaning that the - <description/> tag itself has a language property and contain the translated paragraphs for the given language. - This allows faster parsing of the Appstream XML file, and does not increase it's size much, as long as it is compressed. - - - For more information about this tag, take a look at the tag's definition at . - -
-
- - - <url/> - - - Defines URLs for this component. This tag can be present multiple times. - - - For a list of possible url types and what they are expected to do, - take a look at the tag's description at . - - - - - - <project_group/> - - - The ]]> tag identifies a project with a specific upstream umbrella project. - Known values include GNOME, KDE, XFCE, LXDE, Mozilla and MATE, although other umbrella projects - like Yorba would make sense too. - - - - Components should only identify with an umbrella project if you use all their infrastructure and policies, for instance - string freezes dates, bugtracker and source control instance. - - - - - - - <icon/> - - - The <icon/> tag describes the component icon. It is mostly used for GUI applications (component-type desktop). - It can be of the type stock, cached, local, - or url. - - - stock icons are loaded from stock. The icon name should never include any file-extension or path. - - - cached icons are loaded from the AppStream icon cache. The icon tag should contain the icon file name, including it's - extension. It must not contain a full or relative path to the icon file. - - - local icons are reserved for AppStream data installed by local applications or via 3rd-party application installers. - They should specify a full file path. - This icon type may have width and height properties. - - - remote icons loaded from a remote URL. Currently, at least HTTP urls must be supported. - This icon type may have width and height properties. - - - Examples of the different methods to specify an icon: - - gimp -firefox.png -http://example.com/icons/foobar.png -/usr/share/pixmaps/foobar.png]]> - - Multiple ]]> tags might be combined for one application, e.g. to define a stock icon - and a cached icon. - Software-Centers should always prefer the stock icon, if it is available, and fall back to the other icon types if they can not find it. - The libappstream library makes it easy to do that, if you are not accessing the Xapian database manually. - - - The AppStream Xapian database generator will prefer cached over local over remote - icons when setting the non-stock icon for the application. - - - - - - <mimetypes/> - - - This tag can contain one or more ]]> tags, describing the mime types this component supports. - The data can usually be fetched from the Desktop files. - Example: - - - text/html - image/jpeg - application/rss+xml - ]]> - - - - - <categories/> - - - This tag can contain one or more ]]> tags, describing the categories this application - is located in. This tag is usually applied to components of type desktop, although it might be used by others later. - This data is usually taken from Desktop files, a list of categories can be found in the - Freedesktop menu spec. - Example: - - - GNOME - GTK - Network - Telephony -]]> - - Deprecated Tags - - The tag ]]> with its ]]> child elements is deprecated API. - AppStream parsers should handle these tags just like the category tags, there is no difference except for the name. - - - - - - - <keywords/> - - - This tag can contain one or more ]]> tags, describing keywords for the component, - to make it easier to find in a software center. - In case of type desktop components, this data is taken from Desktop files. For addon - components, the upstream metadata file usually provides this tag. - Example: - - - IDE - development - programming -]]> - - - - - <screenshots/> - - - This tag can contain one or more ]]> tags, describing screenshots which are available for - the application. A screenshot tag my have the attribute type="default", marking it as the application's default screenshot, - which primarily represents it in a software center. - - - Every ]]> is defined by several images of different sizes. - All images should have their width and hight set as arguments. Also, one of the images should be marked as type="source", - indicating that it is the unscaled version of the screenshot. - Images of type="thumbnail" define thumbnails of the screenshot. - - - The metadata generator should scale the source image down to several thumbnails useful for the client to load. - The recommended sizes for thumbnail images are: - - - 752x423 (large) - 624x351 (normal) - 112x63 (small) - - 1504x846 (large, HiDPI) - 1248x702 (normal, HiDPI) - 224x126 (small, HiDPI) - - - In order to support HiDPI screens, the thumbnails should also be available in their bigger sizes. A metadata generator should, however, never attempt - to scale up a smaller image to a larger size, and just ship the smaller sizes instead. - - - Optionally, a screenshot can contain a ]]> tag, describing the screenshot's caption. This is usually what the user can see - on the image shown. The tag is translatable. - - - Every image should have a full remote url set, usually pointing to a cache of images maintained by the distributor. - Example: - - - - Foobar showing kitchen-sink functionality - Foobar shoeewing kischän-sünk funzionality - http://www.example.org/en_US/main.png - http://www.example.org/en_US/main-large.png - http://www.example.org/en_US/main-small.png - - - .... - -]]> - - - - - <compulsory_for_desktop/> - - - The ]]> tag indicates that the component which the metadata belongs to is essential for the - functionality of the defined desktop environment. Examples for compulsory components are the GNOME-Shell by the GNOME-Project, - or the Plasma-Desktop by KDE, as well as things like iBus or the desktop login manager. - - - Software centers are expected to detect the running desktop environment and disable uninstallation for compulsory components of that desktop, - so users will not be able to damage their currently running, primary desktop environment. - - - Multiple occurrences of the ]]> tag are allowed, so a project can be essential for many desktops. - The distributor decides which components should be made compulsory, however it is generally a good idea to follow upstream's recommendations on that matter. - - - A list of all allowed values for this tag is defined in the XDG Menu Specification. - Software center applications will only recognize these values. - - - - - - <provides/> - - - This tag is described in detail at . - - - For generic component types, this tag has to be present. - Distributors must ensure that all things described in this tag are present in the package referenced in - the associated pkgname tag. - - - - - - <developer_name/> - - - The <developer_name/> tag as described in the specification for a generic component. See for more information. - - - - - - <releases/> - - - The releases tag and its release children are structured as described in . - - - Each release tag may have a description tag as child, containing a brief description of what is new in the release. - The description tag is structured as described in . This also applies to its translation rules. - - - The AppStream distro XML generator may shorten overlong lists of releases to a smaller list, e.g. of 4 release tags. - It may also convert ISO 8601 date properties of the metainfo file into an UNIX timestamp timestamp property. - It should avoid generating metadata containing both properties on a release tag. - - - Example for a valid releases tag: - - - - -

This stable release fixes the following bug:

-
    -
  • CPU no longer overheats when you hold down spacebar
  • -
-
- 12345678 - 42424242 -
- - -]]>
- - In case a <release/> tag has a <description/> tag as parameter, describing the new release briefly, distributors are encouraged to provide 2-4 - <release/> release tags for every component. If no description is provided, one tag is enough. - - - Components of type firmware () may also have a tag as child of one of the - <release/> tags. In case a <location/> tag is present, it must be accompanied by a <checksum/> tag, containing - a checksum of the downloaded file. This is done to ensure the integrity of the downloaded firmware, and that the user gets the firmware which was tested by the distributor. - The <location/> tag is often used in case the distributor is not allowed to legally redistribute the firmware in a native package. - - - The <checksum/> tag has a type attribute, describing the checksumming-algorithm that was used to create it. Currently, only SHA1 - is supported. - - - Example for a <release/> tag of a firmware component which makes use of <location/>: - - - http://www.hughski.com/downloads/colorhug2/firmware/colorhug2-2.0.3.cab - 40b59e37cb918f3241f65bc5ac2b90ab47b34e8c - -

This stable release fixes problems.

-
-]]>
-
-
- - - <languages/> - - - This tag gives information about the translations a component provides, and to which extent the software is translated. - - - The tag is allowed to only occur once per component, and contains multiple <lang/> child nodes, which have - a language code as value. - Each <lang/> node may have a percentage property, which describes the percentage value to which - a component has been translated. - - - The language data is expected to be extracted by the AppStream XML generator, and is not provided upstream. Generators may obtain the - information from processing GNU Gettext files, which should cover most translation methods. - - - Tag example: - - - gu - ca@valencia - de - eo - -]]> - - - - - <bundle/> - - - The optional bundle tag indicates that the described software is available as a software bundle via a - 3rd-party application installer. The value of this tag is an identification string for the bundle. - - - Software centers may use the information of this tag to offer the user to install the software - from 3rd-party sources, or just update an already installed software automatically via the normal update procedure. - The bundle tag can coexist with the pkgname tag, in case a component is available from - multiple sources. - - - The type property of this tag indicates which 3rd-party software installation solution the bundle belongs to. - Currently supported solutions are: - - The Limba Project, using the value limba. - xdg-app bundles, using the value xdg-app. - - - - Example: - - foobar-1.0.2]]> - - - -
-
- - - -
- Example file - - This is an example AppStream metadata file: - - - - - - firefox.desktop - firefox-bin - Firefox - Firefoux - Web browser - Navigateur web - MPL-2 - - internet - web - browser - navigateur - - web-browser - firefox.png - - network - web - - - text/html - text/xml - application/xhtml+xml - application/vnd.mozilla.xul+xml - text/mml - application/x-xpinstall - x-scheme-handler/http - x-scheme-handler/https - - http://www.mozilla.com - - - http://www.awesomedistro.example.org/en_US/firefox.desktop/main.png - http://www.awesomedistro.example.org/en_US/firefox.desktop/main-small.png - - - - firefox - - - - pulseaudio - PulseAudio - The PulseAudio sound server - http://www.freedesktop.org/wiki/Software/PulseAudio/ - GPLv2 - - libpulse-simple.so.0 - libpulse.so.0 - start-pulseaudio-kde - start-pulseaudio-x11 - - - - - LinLibertine_M.otf - Libertine - Linux Libertine Open fonts - Mono - Libertine - - -]]> - -
-
diff -Nru appstream-0.9.4/docs/sources/distrospec/dep11.xml appstream-0.12.0/docs/sources/distrospec/dep11.xml --- appstream-0.9.4/docs/sources/distrospec/dep11.xml 2016-04-15 01:19:01.000000000 +0000 +++ appstream-0.12.0/docs/sources/distrospec/dep11.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,824 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Debian DEP-11 specification - -
- Introduction - - - DEP-11 is a YAML implementation of the AppStream Distro specification, which is primarily used by Debian and its derivatives. - This document describes the DEP-11 YAML. - All AppStream support libraries available today are able to read both the YAML and the XML specification. - - - - - If you want to use AppStream in your distribution, and are not based on Debian, please use the XML specification (unless - you have strong reasons for preferring YAML). - XML is the official format for AppStream Distro metadata. - - - - - The DEP-11 YAML metadata can be validated for correctness using the dep11-validate tool from the - AppStream DEP-11 utils. - - - Fields not mentioned in this document are not recognized by DEP-11 YAML parsers. - -
- - -
- File naming and location - - Take a look at for AppStream XML files. While the XML data belongs into the xmls subdirectory in - /usr/share/app-info (or /var/cache/app-info), the YAML data is stored in the yaml subdirectory. - All other rules affecting the XML apply the DEP-11 YAML as well, including the recommendation to compress the files with gzip. - -
- -
- General DEP-11 YAML structure - - Each YAML file starts with a header document, which defines the basic properties of the metadata, which is followed by the actual metadata in form of one - YAML document per AppStream component. - - - The header document contains the following fields, all of them are required or at least strongly recommended. - - - - File - - - This field identifies the file as DEP-11 file. Its value is always DEP-11. - - Field info: value-type:str, required:yes - - - - - Version - - - The version of the AppStream specification this file was built for. - - Field info: value-type:str, required:yes - - - - - Origin - - - Defines the repository-id this file belongs to. This usually matches the filename without extension. On Debian systems, it is the - <suite>-<component> combination, e.g. jessie-main. - - Field info: value-type:str, required:yes - - - - - MediaBaseUrl - - - The base URL for media (screenshots, icons, ...) referenced in the metadata file. - If this is set, all urls in the document referencing media will be treated relative to the base url. - - Field info: value-type:str, required:no - - - - - Architecture - - - Defines the architecture this data belongs to. This information is useful to resolve AppStream-ID conflicts on multiarch systems, - which appear if the user has metadata for two architectures installed. - - Field info: value-type:str, required:no - - - - - Priority - - - The priorization of this metadata file over other metadata. - - Field info: value-type:int, required:no - - - -
- -
- Translated fields - - Fields with translated values follow the following conventions: - - - They are of type dict - They must contain a key C, with the untranslated string as value - - - All languages are represented with their locale name as key in the dict and the translated content as value - (which is of type str, unless explicitly stated otherwise) - - - - - In this document, the type localized is used to indicate that the field contains translated values following this schema. - - - Example for a translated Name field: - - - -
- -
- Valid fields - - This document describes all valid fields in the DEP-11 YAML specification. The requirements for the values are exactly the same as in the XML specification, - and each field links to its correspondent XML tag for reference. - - - - - ID - - - The ID field is a short unique and usually lower-cases identifier for the component. - Depending on the component's type, different naming conventions apply. - - See . - Field info: value-type:str, required:yes - - - - - Priority - - - The Priority field sets the priority this component's metadata should have over other meadata in the pool. - Data with a higher priority replaces data with a lower priority. - - See . - Field info: value-type:int, required:no - - - - - Type - - - The type of this component. Allowed values are: - - - generic for - desktop-app for - addon for - codec for - inputmethod for - firmware for - - - Field info: value-type:str, required:yes - - - - - Package - - - The name of the package which needs to be installed in order to make this component available on the system. - - See . - Field info: value-type:str, required:yes - - - - - SourcePackage - - See . - Field info: value-type:str - - - - - Name - - See . - Field info: value-type:localized, required:yes - - - - - Summary - - See . - Field info: value-type:localized, required:yes - - - - - ProjectLicense - - See . - Field info: value-type:str - - - - - Description - - See . - - The markup for the description is the same as in the XML specification, so it can be read by anything - parsing basic HTML markup. - - Field info: value-type:localized - - - - - Url - - See . - - The Url field contains the different url types as keys in its dict. Valid url types are - defined in the main AppStream XML specification. - All URL types must be lowercased. - - - Example: - - - - Field info: value-type:dict - - - - - ProjectGroup - - See . - Field info: value-type:str - - - - - Icon - - See . - - - The Icon field has the different icon types as keys for its dict. - - - - - stock - - - Contains the stock icon name. - - Field info: value-type:str - - - - - cached - - - Contains a list of dictionaries with the keys width and height of type - int specifying the dimensions of the icon, as well as the key name - of type str specifying the name of the icon in the cache. - - Field info: value-type:list ➟ dict - - - - - local - - - Contains a list of dictionaries with the keys width and height of type - int specifying the dimensions of the icon, as well as the key name - of type str specifying the absolute filename pointing to the right icon. - - Field info: value-type:list ➟ dict - - - - - remote - - - Contains a list of dictionaries with the keys width and height of type - int specifying the dimensions of the icon, as well as the key url - of type str which contains a HTTP(S) or FTP URL to the icon. - - Field info: value-type:list ➟ dict - - - - - Field info: value-type:dict - - - - - Categories - - See . - - - This field follows its XML counterpart in almost all regards. The different XDG menu category names are encoded in the list, and are - of type str. - - - Example: - - - Field info: value-type:list - - - - - Keywords - - See . - - - This field contains the keywords for this component. The keys define the locales for the respective language, the values are - of type list and contain the list of keywords for the respective language. An unlocalized C - key must be present. - - - Example: - - - Field info: value-type:translated(list) - - - - - - Screenshots - - See . - - The Screenshots field contains a list of screenshots. A screenshot is of type - dict and contains the following keys: - - - - - default - - - If default is true, the screenshot is selected as default screenshot. There has to be at least one - screenshot which is marked as default. - - Field info: value-type:bool - - - - - source-image - - - Describes the source image for this screenshot. It has the following keys: - - - height, describing the image height (value-type:int) - width, describing the image width (value-type:int) - - - url, the full image url, or the url component added to AssetsUrl, - if defined (value-type:str) - - - - Field info: value-type:dict, required:yes - - - - - thumbnails - - - A list of an arbitrary number of screenshots. All screenshots are of type dict and must contain the same keys as described for - source-image. - - Field info: value-type:list - - - - - caption - - - A caption for this screenshot. - - Field info: value-type:localized - - - - - - Example for a Screenshots field containing one screenshot: - - - - Field info: value-type:list - - - - - - CompulsoryForDesktop - - See . - Field info: value-type:str - - - - - Provides - - See . - - The Provides field is of type dict and can have the following keys set with - the described allowed values: - - - - - libraries - - - A list of provided library names. - - Field info: value-type:list(str) - - - - - binaries - - - A list of provided binaries in PATH. - - Field info: value-type:list(str) - - - - - mimetypes - - - A list of mimetypes this component can handle. - - Field info: value-type:list(str) - - - - - firmware - - - A list of provided firmware. Each firmware entry is of type dict and has a - type key, which has either runtime or flashed as - value. - Firmware of type flashed has a guid key, containing the GUID of the device - the firmware is flashed on, while firmware of type runtime has a fname key, - containing the firmware filename which the kernel is looking for. - - Field info: value-type:list(dict) - - - - - dbus - - - A list of provided DBus services. Each service entry in the list is of type dict and has a - type key, which has either system or user as - value. user means the DBus service name is for a user/session service, while system means - it describes a system service. - The service key contains the name of the DBus service file. All dict values are of type str. - - Field info: value-type:list(dict) - - - - - - Field info: value-type:dict - - - - - DeveloperName - - See . - Field info: value-type:localized - - - - - Releases - - See . - - The Releases contains a list of releases, where each list items contains the following fields/keys: - - - - - version - - - The version number of this release. - - Field info: value-type:str, required:yes - - - - - unix-timestamp - - - The UNIX timestamp of when this software was released. - - - One of the unix-timestamp or date fields must be present. - - Field info: value-type:int, required:maybe - - - - - date - - - The ISO 8601 date of when this software was released. - - - One of the unix-timestamp or date fields must be present. - - Field info: value-type:str, required:maybe - - - - - description - - - A description of this release. May contain allowed HTML markup. - - Field info: value-type:localized - - - - - - It is recommended to order this list starting with the latest timestamp to the olderst one. - - - Example: - - This stable release fixes the following bug:

-
    -
  • CPU no longer overheats when you hold down spacebar
  • -
- - version: '1.2' - unix-timestamp: 1397253600 - - version: '1.0' - unix-timestamp: 1345932000]]>
- - Field info: value-type:list(dict) -
-
- - - Languages - - See . - - The languages list is a list of dictionaries. They must contain a percentage - key, indicating the completion of translation for this language, and a locale - key, with the locale string as value. - - - Example: - - - Field info: value-type:list(dict) - - - - - Bundle - - See . - - The Bundle contains one or two subfields with the value limba, describing a - Limba bundle ID, or xdg-app for an XdgApp bundle ID. - - - Example: - - - Field info: value-type:dict - - - - - Extends - - See . - - Contains a list of AppStream IDs of the other component extended by the described component. - This field may only be used with component-type addon. - - Field info: value-type:list(str) - - - -
- -
- - -
- Example YAML file - - This is an example AppStream DEP-11 metadata file: - - -TeXstudio is an integrated writing environment for creating LaTeX documents. It integrates editing, - building and viewing into a single frontend.

Our goal is to make writing LaTeX as easy and comfortable - as possible. This is achieved through a rich feature set including:

-ID: texstudio.desktop -Icon: - cached: texstudio_texstudio.png -Keywords: - C: - - editor - - latex - - pdflatex - - xelatex - - lualatex - - context - - bibtex -Name: - C: TeXstudio -Package: texstudio -ProjectLicense: GPL-2.0 -Provides: - mimetypes: - - text/x-tex -Screenshots: - - default: true - source-image: - height: 756 - url: texstudio_2.8.4+debian-3_amd64/screenshots/source/screenshot-1.png - width: 1344 - thumbnails: - - height: 423 - url: texstudio_2.8.4+debian-3_amd64/screenshots/752x423/screenshot-1.png - width: 752 - - height: 351 - url: texstudio_2.8.4+debian-3_amd64/screenshots/624x351/screenshot-1.png - width: 624 - - height: 63 - url: texstudio_2.8.4+debian-3_amd64/screenshots/112x63/screenshot-1.png - width: 112 -Summary: - C: LaTeX development environment - fr: Environnement de développement LaTeX -Type: desktop-app -Url: - homepage: http://texstudio.sourceforge.net/]]>
- -
-
diff -Nru appstream-0.9.4/docs/sources/distrospec/Distro.xml appstream-0.12.0/docs/sources/distrospec/Distro.xml --- appstream-0.9.4/docs/sources/distrospec/Distro.xml 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/sources/distrospec/Distro.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - -%BOOK_ENTITIES; -]> - - Distribution Metadata and Services - - AppStream provides an own Metadata format which gets shipped by the distributions and is read by the Xapian database generator or - software centers directly. - - - This chapter contains information about it. - - - - - - - diff -Nru appstream-0.9.4/docs/sources/distrospec/iconcache.xml appstream-0.12.0/docs/sources/distrospec/iconcache.xml --- appstream-0.9.4/docs/sources/distrospec/iconcache.xml 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/sources/distrospec/iconcache.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Icon Cache - -
- Introduction - - - In order to display icons in software-centers, distributors should offer a repository of cached icons for applications defined in their AppStream XML files. - The icons should be PNG files or vectorgraphics (PNG is preferred) and match the name referenced in the applications .desktop file. - Their size should be 64x64px, it is okay to just provide one size. - -
- -
- Filesystem locations - - All icons of type cached must be placed in /usr/share/app-info/icons/%{origin}/%{size}/ or /var/cache/app-info/icons/%{origin}/%{size}/, - where origin is the AppStream data origin defined in the AppStream data file (see ), and size - is 64x64 or 128x128 depending on the size of the icon. And icon might be present with different sizes in both directories. - - - For example the cache icon krita.png of a component in a data file with the origin jessie should be stored in - /usr/share/app-info/icons/jessie/64x64/krita.png (or in the /var/cache location). - - - Legacy Support - - In order to support the old icon cache layout, client applications may also look for icons in the folder below the size-directories, assuming - that the icons placed there are of size 64x64 pixels. - - -
- -
diff -Nru appstream-0.9.4/docs/sources/images/appstream-button1.svg appstream-0.12.0/docs/sources/images/appstream-button1.svg --- appstream-0.9.4/docs/sources/images/appstream-button1.svg 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/images/appstream-button1.svg 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru appstream-0.9.4/docs/sources/images/appstream-button2.svg appstream-0.12.0/docs/sources/images/appstream-button2.svg --- appstream-0.9.4/docs/sources/images/appstream-button2.svg 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/images/appstream-button2.svg 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/sources/images/appstream-logo.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/sources/images/appstream-logo.png differ diff -Nru appstream-0.9.4/docs/sources/images/appstream-logo.svg appstream-0.12.0/docs/sources/images/appstream-logo.svg --- appstream-0.9.4/docs/sources/images/appstream-logo.svg 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/images/appstream-logo.svg 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/sources/images/architecture.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/sources/images/architecture.png differ Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/sources/images/architecture-small.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/sources/images/architecture-small.png differ diff -Nru appstream-0.9.4/docs/sources/images/architecture.svg appstream-0.12.0/docs/sources/images/architecture.svg --- appstream-0.9.4/docs/sources/images/architecture.svg 2016-02-28 15:05:50.000000000 +0000 +++ appstream-0.12.0/docs/sources/images/architecture.svg 2018-04-04 15:53:56.000000000 +0000 @@ -9,15 +9,15 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1322.3459" - height="1122.6986" + width="1243.0377" + height="1102.6987" id="svg2" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="architecture.svg" inkscape:export-filename="/home/matthias/Development/AppStream/appstream/docs/sources/images/architecture.png" - inkscape:export-xdpi="81.847435" - inkscape:export-ydpi="81.847435"> + inkscape:export-xdpi="79.659111" + inkscape:export-ydpi="79.659111"> + originx="531.3541" + originy="-88.87497" /> @@ -89,7 +89,7 @@ image/svg+xml - + @@ -97,30 +97,32 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" - transform="translate(551.12497,139.21139)"> + transform="translate(531.3541,139.21139)"> - Ratings- Comments + x="-478" + y="480.36218" + id="tspan3100" + style="font-size:35px">- Ratings- Comments
app-icons.tar.gz + y="503.39734">app-icons.tar.gz @@ -201,28 +203,28 @@ sodipodi:nodetypes="cc" /> distro-components.xml + sodipodi:role="line">components.xml @@ -230,39 +232,39 @@ style="fill:none;stroke:#000096;stroke-width:6.25;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect3058" width="900" - height="300" + height="280.00018" x="-200" y="672.36218" ry="20.000143" /> ComposeComposeserver Mirror + x="558" + y="528.36224">Mirror package file Client + x="560" + y="188.36221">Client SoftwareCenter + style="text-align:center;text-anchor:middle" + id="tspan4219">Center FeedbackFeedbackServer PackageKit - extract metadata- extract metadata (metainfo files, desktop files, pkg-config, ...)- construct metadata + style="font-size:30px">- construct metadata (AppStream collection XML or YAML) xapian database + sodipodi:role="line">cache / data pool oauth + x="-396" + y="184.36218">oauth stemming Rebuild onRebuild onrepo-compose + x="238" + y="642.67407">repo-compose ExistingPackagemetadata - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - PackageKit Daemon - - - Xapian Database - - - AppStream Plugin - - - - AppInstallDesktop-File - - AppStreamXML - - DEP-11YAML - Application data sources - - - - - - libappstream - - - - Client(software-center, ...) - - - - Client - - - - - - Icons - Screenshots - - Ratings - Reviews - - - - Icons - Screenshots - - Ratings - Reviews - - - - - - - - diff -Nru appstream-0.9.4/docs/sources/images/old_libas_architecture.svg appstream-0.12.0/docs/sources/images/old_libas_architecture.svg --- appstream-0.9.4/docs/sources/images/old_libas_architecture.svg 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/images/old_libas_architecture.svg 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,609 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + PackageKit Daemon + + + Cache + + + AppStream Plugin + + + + AppInstallDesktop-File + + AppStreamXML + + DEP-11YAML + Application data sources + + + + + + libappstream + + + + Client(software-center, ...) + + + + Client + + + + + + Icons + Screenshots + + Ratings + Reviews + + + + Icons + Screenshots + + Ratings + Reviews + + + + + + + + Binary files /tmp/tmpHY1XSy/k9FeNtbszg/appstream-0.9.4/docs/sources/images/pure_architecture.png and /tmp/tmpHY1XSy/jwTaGCRhIn/appstream-0.12.0/docs/sources/images/pure_architecture.png differ diff -Nru appstream-0.9.4/docs/sources/images/pure_architecture.svg appstream-0.12.0/docs/sources/images/pure_architecture.svg --- appstream-0.9.4/docs/sources/images/pure_architecture.svg 2016-02-28 14:56:21.000000000 +0000 +++ appstream-0.12.0/docs/sources/images/pure_architecture.svg 2018-04-04 15:53:56.000000000 +0000 @@ -9,8 +9,8 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1712.7344" - height="1122.3687" + width="1704.8438" + height="1102.3687" id="svg2" version="1.1" inkscape:version="0.91 r13725" @@ -71,8 +71,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.7" - inkscape:cx="721.1945" - inkscape:cy="572.57212" + inkscape:cx="799.98376" + inkscape:cy="438.28641" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -92,8 +92,8 @@ visible="true" enabled="true" snapvisiblegridlinesonly="true" - originx="891.12503px" - originy="-69.20491px" /> + originx="891.12503" + originy="-89.204905" /> @@ -103,7 +103,7 @@ image/svg+xml - + @@ -117,28 +117,30 @@ - Ratings- Ratings- Comments + y="521.86218" + id="tspan3102" + style="font-size:30px">- Comments + style="fill:#dcdcdc;fill-opacity:1;stroke:#000096;stroke-width:3.68415523;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> component-data.xml app-icon-images server Mirror metadata package file Client FeedbackFeedbackServer oauth Rebuild onrepo-compose Server - Screenshot + x="-840" + y="428.36218" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Open Sans';-inkscape-font-specification:'Open Sans'">ScreenshotServer One server perOne server perdistro or 3rdparty repo One or oneOne or oneper distro http http screen shot servers + id="tspan8533">screenshot servers - + Trigger a database refresh, if necessary. @@ -188,6 +188,24 @@ + + + + Create a metainfo file template to be used by software projects. The option can be used + to use a .desktop file as template for generating the example file. + + + The generated files contain example entries which need to be filed in with the actual desired values by the project author. + + + The first TYPE parameter is the name of an AppStream component type. For a complete list check out + the documentation or the help output + of &package; for this subcommand. + + + + + Print out more information about a found component. @@ -201,6 +219,17 @@ + + + + Do not access the network when validating metadata. + + The same effect can be achieved by setting the AS_VALIDATE_NONET environment variable + before running &package;. + + + + diff -Nru appstream-0.9.4/docs/sources/metainfo/addon.xml appstream-0.12.0/docs/sources/metainfo/addon.xml --- appstream-0.9.4/docs/sources/metainfo/addon.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/addon.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,79 @@ + + +%BOOK_ENTITIES; +]> + +
+ Addons + +
+ Introduction + + Some software is not standalone, but rather extends existing software installed on the system. + The addon component type exists to reflect that. + + + Software which provides addons can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. + +
+ +
+ Example file + + A addon meta-info file should look like this: + + + + + org.gnome.gedit-code-assistance + org.gnome.gedit.desktop + Code Assistance + Code assistance for C, C++ and Objective-C + http://projects.gnome.org/gedit + CC0-1.0 + GPL-3.0+ +]]> +
+ +
+ File specification + + Note that the XML root must have the type property set to addon. + This clearly identifies this metainfo document as describing an addon to existing software. + + + + + <id/> + + + For addons, the %{id} must follow the component-id naming conventions (see ). + + + + + + <extends/> + + + This tag is refers to the ID of the component this addon is extending. + + + For example, if there is a plugin "kipi" which extens the application "Gwenview", it needs to be referred to as: + + org.kde.Gwenview]]> + + The <extends/> tag may be specified multiple times. + + + + + + + For a component of type addon, the following tags are required and must be present: , , , + , . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/codec.xml appstream-0.12.0/docs/sources/metainfo/codec.xml --- appstream-0.9.4/docs/sources/metainfo/codec.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/codec.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,117 @@ + + +%BOOK_ENTITIES; +]> + +
+ Codecs + +
+ Introduction + + Software centers might want to special-case codec handling. Therefore, we provide a component type for them. + + + Codecs can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. + + + Codec metadata files can – just like all other metainfo files – be translated. See the section about translation for more information. + +
+ +
+ Example file + + A codec meta-info file should look like this: + + + + + org.freedesktop.gstreamer.codecs-good + CC0 + GStreamer Multimedia Codecs - Extra + +

+ This addon includes several additional codecs that are missing + something - perhaps a good code review, some documentation, a set of + tests, a real live maintainer, or some actual wide use. + However, they might be good enough to play your media files. +

+

+ These codecs can be used to encode and decode media files where the + format is not patent encumbered. +

+

+ A codec decodes audio and video for for playback or editing and is also + used for transmission or storage. + Different codecs are used in video-conferencing, streaming media and + video editing applications. +

+
+ + encoder-audio/mpeg + mpegversion=(int){ 4, 2 } + stream-format=(string){ adts, raw } + encoder-video/mpeg + systemstream=(boolean)false + mpegversion=(int){ 1, 2, 4 } + encoder-video/mpeg + systemstream=(boolean)true + encoder-video/x-xvid + element-faac + element-mpeg2enc + element-mplex + element-xviddec + element-xvidenc + +
]]>
+
+ +
+ File specification + + Note that the XML root must have the type property set to codec. + This clearly identifies this metainfo document as describing a codec. + + + + + <id/> + + + For codecs, the %{id} must follow the component-id naming conventions (see ). + + + + + + <metadata_license/> + + + The <metadata_license/> tag is required. See for a description of this tag. + + + + + + <provides/> ↪ <codec/> + + + This tag is described for generic components at in detail. + + + You must add one or more children of type <codec/> to make it known to the system that your + software is able to provide the mentioned codecs. + Adding this data is required for all components of type=codec. + + + + + + + For a component of type codec, the following tags are required and must be present: , , + , , . + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/component.xml appstream-0.12.0/docs/sources/metainfo/component.xml --- appstream-0.9.4/docs/sources/metainfo/component.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/component.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,935 @@ + + +%BOOK_ENTITIES; +]> + +
+ Generic Component + +
+ Introduction + + For a distribution, it is good to know more about the content of a package. Which public interfaces (libraries? Python modules?) does it provide? Does it contain codecs? Does it + contain firmware? Fonts? An application? + All of this information can be used to automatically install missing software or to offer users a choice on what they want to install from a software center. + + + To provide this information, we created the metainfo files, which allow upstream projects to describe the content of their software package. + If a metainfo file contains a <provides/> tag, distributors must also ensure that the package providing the file contains all items referenced + by that statement, or is installed by a metapackage depending on packages which provide these items. This gives upstream projects a (very light) way to influence distributor packaging. + More information about that can be found below. + + + Several specialized component-metainfo files exist, for example for applications or fonts. These are all based on this generic component XML specification, and are described in the + following chapters. + +
+ +
+ Filesystem locations + + + Upstream projects can ship one or more metainfo files in /usr/share/metainfo/%{id}.metainfo.xml, where id is a unique + identifier of this specific component. + + + + Applications are a special case here, because they are usually treated differently by software centers (and also for historical reasons). + If your metainfo file contains an application, as described in , you may want to install it as + /usr/share/metainfo/%{id}.appdata.xml. + + + + Legacy Path + + The /usr/share/appdata/ path must be scanned by AppStream tools as well, to support legacy applications installing + metadata there. + For new software components, it is advised not to use this directory. + + + +
+ +
+ XML Specification + + + The XML for a generic component definition starts with a <component> tag as the root element. + The <component> element must at least have an id, name and summary tag; and + a provides tag with appropriate children is highly recommended. + All possible tags in the generic set are: + + + + + <id/> + + + The ]]> tag is a unique identifier for this component. It must contain only ASCII characters, dots, hyphens and numbers. Spaces are + not allowed. While hyphens are allowed for legacy compatibility, their usage is strongly discouraged to ensure interoperability of the AppStream ID with other tools such + as D-Bus (and thereby making the ID more generic and useful). It is also strongly discouraged to start any segment of the ID with a digit. + + + The ID must follow a reverse-DNS scheme, consisting of {tld}.{vendor}.{product}, for example org.kde.Gwenview + or com.hugski.ColorHug2. Ownership of {vendor}.{tld} in the domain name system guarantees uniqueness of IDs. + + + To increase the uniqueness and to distinguish between different pieces of a software suite, it is suggested to append the type name to the component-id in these cases. + For example, one can use com.hugski.ColorHug2 for the client tools to control hardware, and com.hugski.ColorHug2.firmware for the runtime firmware files. + + + Note that the value of this tag must be unique across all distributions and software deployment platforms. + In case it is not unique, distributors are expected to reject the conflicting components from inclusion into their metadata and notify the upstream projects about this issue. + + + + Escaping characters in the component ID + + To ensures the greatest possible compatibility of an AppStream ID, it is recommended to replace any hyphens in the ID with underscores, and prefix every leading digit of + a section with an underscore as well. Since the underscore is not a valid character in domain names, the uniqueness of the ID is kept. + For example, the ID org.7-zip.7Zip could become org._7_zip._7Zip. + + + + + + + + <metadata_license/> + + + The <metadata_license/> tag indicates the content license that you are releasing the one + metainfo XML file under. This is typically not the same as the project license. Omitting the license value can result + in your data not being incorporated into the distribution metadata (so this is a required tag). + + + A permissive license ensures your data can + be combined with arbitrary other data in one file (this means copyleft licenses like the GPL are not suitable as metadata license). + Valid permissive licenses include: + + + + CC0-1.0 + + + CC-BY-3.0 + + + CC-BY-SA-3.0 + + + GFDL-1.3 + + + MIT + + + FSFAP + + + + The license codes correspond to the identifiers found at the SPDX OpenSource License Registry. + For instance, CC-BY-SA-3.0 corresponds to the license at + creativecommons.org/licenses/by-sa/3.0. + + + + + + <name/> + + + A human-readable name for this software component. For example, if the component ID was "libc", its name might be "GNU Standard C Library". + + + + + + <summary/> + + + A short summary of what this component does. If the component is "PackageKit", the summary could be "Provides a package-management abstraction layer". + + + + + + <icon/> + + + The <icon/> tag describes the component icon. It is mostly used for GUI applications (component-type desktop-application). + It can be of type stock, local or remote. + + + stock icons are loaded from the icon stock (the current or hicolor/locolor fallback themes). + The icon name must not include any file-extension or path. + + + local icons are loaded from a file in the filesystem. + They should specify a full file path. + This icon type may have width and height + properties. + + + remote icons loaded from a remote URL. Currently, only HTTP/HTTPS urls are supported. + This icon type should have width and height properties. + + + + + + <description/> + + + A long description of this component. Some markup can be used. + + + Do not assume the format is HTML. Only paragraph (p), ordered list (ol) and unordered list (ul) are supported at this time. + + + In metainfo files, this tag should be translated by-paragraph, meaning that in a translated file, each translated <p/> child + has a language property. + + + + + + <categories/> + + + This tag can contain one or more <category>> entries, describing the categories this software component + is associated with. + This tag is usually applied to components of type desktop-application, but can be used with any component. + A list of valid category names can be found in the + Freedesktop menu spec. + Example: + + + Game + ArcadeGame +]]> + + + + + <url/> + + + Defines web URLs for this component.There are several different URL types allowed: + + + + + homepage + + + Should be a link to the upstream homepage for the component. + + + + + + bugtracker + + + Should point to the software's bug tracking system, for users to report new bugs. + + + + + + faq + + + Should link a FAQ page for this software, to answer some of the most-asked questions in + detail, something which you cannot do in the component's description. + + + + + + help + + + Should provide a web link to an online user's reference, a software manual or help page. + + + + + + donation + + + URLs of this type should point to a webpage showing information on how to donate to + the described software project. + + + + + + translate + + + URLs of this type should point to a webpage where users can submit or + modify translations of the upstream project. + + + Typically this should be a link to the project page in Weblate, Transifex or Zanata, but could also be a + link to an upstream-hosted wiki page describing how to send translations upstream. + + + + + + + + + <launchable/> + + + This optional tag indicates possible methods to launch the software described in this component. + It is allowed to appear multiple times in the metainfo data. + + + + The <launchable/> tag has a essential type property indicating the system that is used to launch the component. The following types are allowed: + + + + desktop-id + + + The application can be launched via a desktop file. The value of the tag is a + desktop-file id. + + + In case a software component has multiple launchable entries, + the software center might display a dialog to choose which entry to launch. + If possible though, it should be avoided to add multiple launchable tags of type desktop-id. + + + + + service + + + The software can be started, stopped, and monitored by the OS "init" + facility, such as systemd. The value of the tag is a name that can be + used with that facility, such as a systemd unit name. + + + Multiple launchable tags of type service are not + alternatives to start the same service, but the + component does contain multiple services that might all need to be + started. + + + Only those services should be listed as launchables that the user is + actually expected to start and stop manually. Services that are + started/stopped indirectly via dependencies of other services should + not be listed. + + + For systemd units, the services listed as launchables are expected to + support enabling and disabling. + + + + + cockpit-manifest + + + The software can be launched from the menus of + the Cockpit admin interface. + The value of the tag is the name of a Cockpit + package. + + + + + url + + + The application is a web site that is viewed through a browser. + The value of the tag is a direct HTTP/HTTPS URL that the browser must navigate to. + + + + + + Example: + + org.gnome.Sysprof2.desktop]]> + + + + + <releases/> + + + The ]]> tag contains <release/> child tags which + describe some metainformation about the current release of the described software. + The <release/> tag may be present multiple times (for older releases), but a tag for + the current version must always be present. + + + A release tag can have the properties version, date and timestamp. + The date property can have any time in ISO 8601 format as its value and + should be present for every release. + The timestamp tag contains the release time in the form of a UNIX epoch. This tag should not be used in metainfo files in newly + written metadata, but will still be parsed in case it is present. The timestamp property is mainly used in generated distro-metadata. + In case both release-time tags are present, the timestamp tag will take precedence over date. + + + Optionally, the <release/> tag may also have an urgency property, having one of the following values: + + + low + medium + high + critical + + + The urgency defines how important it is to install the new release as an update. This is especially important for type=firmware + components. + If no urgency is defined, a medium urgency is implicitly assumed. + The urgency defines how the update will be presented to the user, and sometimes if it will be installed automatically and immediately, or delayed. + + + Finally a release tag may have a type property + to classify releases with one of the following values: + + + stable + development + + + By default, if no release type is defined, stable is assumed. + A software displaying a listing of releases should only show stable releases and + discard any development release if the current version is itself stable. It can + show all versions when development versions of the software are also distributed. + + + Each release tag may have a description tag as child, containing a brief description of what is new in the release. + The description tag is structured as described in . + + + A release tag may also have one or multiple size tags as children, which define the installed and download size + of this component release. This is useful in case the component does not have a corresponding native package in a distribution, for example if it is a Limba + bundle or LVFS firmware. + The size type is defined via a type property on the size tag, and may assume the value download or installed. + The size itself is set as the value and must be given in bytes. + + + Examples for a valid releases tag: + + + + 12345678 + 42424242 + + + +]]> + + + + + <provides/> + + + The provides tag and its children describe the public interfaces this application provides. + A public interface can be anything which other applications, which are not part of the upstream project, can access or reference. + This includes binaries and libraries. Private interfaces should never be added to a provides tag. + + + A provides tag contain a number of children describing the type and name of the provided public interface items. + It is suggested that the build system auto-generates this tag and its children. + Currently allowed item types are listed below. If you miss something, + file a bug against AppStream so we can add the new type. + + + + + <library/> + + + Contains the name of a shared library placed in a publicly accessible library path, such as /usr/lib, /usr/lib/<triplet> + or /lib. + For example, for the libappstream library, the value for library would be libappstream.so.1. + + + + + + <binary/> + + + Name of a binary installed into a location in PATH. + + + + + + <font/> + + + Full name of a font provided by this component. See for more information. + + + + + + <modalias/> + + + A modalias glob representing the hardware types (for example USB, PCI, ACPI, DMI) this component handles. + Useful for installing printer drivers or other USB protocol drivers for smartphones, firmware, and + out of tree kernel drivers. + + + + + + <firmware/> + + + This provided element is described in details for the firmware component type, where it is mandatory. + Please see for more information. + + + + + + <python2/> + + + Name of a Python 2 module this component provides. + + + + + + <python3/> + + + Name of a Python 3 module this component provides. + + + + + + <dbus/> + + + Contains the well-known name of a D-Bus service as its value. The type of the service must be specified using the type property + of this tag. Allowed values are user and system. + + + Example: + + + org.freedesktop.PackageKit +]]> + + + + + <id/> + + + Contains the component-ID of another software component. The presence of this tag indicates that the software component containing it is able to + provide all functionality of the one referenced in the <provides/> ↪ <id/> tag. + + + This is useful in case a component-id had to be renamed in the past, e.g. because its domain-name changed. + + + + + + + + + + + <requires/> & <recommends/> + + + The requires tag denotes an absolute requirement on a different system component. + A component can require a certain hardware to be present, or kernel, or other component to be installed first. If a requirement + is not met, AppStream clients should prevent the installation of the particular software component. + + + If it is not essential that a certain requirement is met by the system, but just recommended to be available, a + recommends tag should be used. In this case, AppStream clients should allow the installation of the software + component, but may display a warning before allowing it. + + + A requires or recommends tag contains children describing the type, value and version relation + of the required item. + Each child can have a version and a compare property, to allow depending on a certain minimal + version of the respective item. + The version property contains the version to be compared against, while the compare property contains + a two-letter code denoting how to compare the version of a present item with the version listed in the property. + If no compare property is given, but a version property is found, AppStream implementations should + implicitly assume a value of ge for comparison of the versions. The installed version is on the left side of the required version + when comparing them. + Possible two-letter codes for version comparisons are: + + + eq - Equal to + ne - Not equal to + lt - Lesser than + gt - Greater than + le - Lesser than or equal to + ge - Greater than or equal to + + + Possible item types to declare a requirement on or a recommendation for are: + + + + + <id/> + + + A relation to another software component. The value should be another component-ID. Example: + + + org.example.MySoftware +]]> + + + + + <modalias/> + + + Check for a specific hardware to be present via its modalias. The modalias may contain a wildcard expression. + Example: + + + usb:v1130p0202d* +]]> + + + + + <kernel/> + + + Check for a specific kernel to be running on the system. The kernel name is the output of uname -s. + Example: + + + Linux +]]> + + + + + <memory/> + + + Set a relation to the amount of physical memory (RAM) the system should have to run the software component. + The memory size is set in MiB. You usually only want to use this with the recommends tag, + because users might want to install the software on systems even if they have a lesser amount of memory + compared to what would be ideal. + Example: + + + 2048 +]]> + + + + + + + + + + + <mimetypes/> + + + This tag can contain one or more <mimetype/> children, describing the MIME types this application supports. + This tag is especially useful for generic components and addon-type components. For applications, the metadata will automatically + be fetched from their .desktop files by the distribution's metadata generator. + Example: + + + + text/html + image/jpeg + application/rss+xml + ]]> + + + + + <project_group/> + + + If you include the <project_group/> tag then this identifies your project with a specific upstream umbrella project. + Known values include GNOME, KDE, XFCE, MATE and LXDE, although other umbrella projects like Yorba or Mozilla make sense too. + + + + You should only identify with an umbrella project if you use all their infrastructure and policies, for instance string freezes dates, bugtracker and source control instance. + + + + + + + <project_license/> + + + The <project_license/> tag is indicating the license of the component (application/library/addon/font/etc.) described in the metadata document. + It should be a SPDX license expression. + Possible values include: + + GPL-2.0 + LGPL-3.0+ AND GPL-3.0+ + MIT + CC-BY-SA-2.0 + + A full list of recognized licenses and their identifiers can be found at the + SPDX OpenSource License Registry. + + + Although the project_license tag is not mandatory, it is recommended to include it. + + + + + + <developer_name/> + + + The <developer_name/> tag is designed to represent the developers or project responsible for development of the project described in the metadata. + + + Values might be for example "The GNOME Foundation" or "The KDE Community". + You must not include hyperlinks or emails in this field, if you want to link to the developer's homepage, use the -tag instead. + + + This tag is translatable. + + + + + + <screenshots/> + + + Visual components (like fonts or graphical applications) may choose to add one or multiple screenshots to their metadata. + + + The <screenshots/> tag contains multiple <screenshot/> children, where at least one of them must have the property + type="default" to indicate the primary screenshot of the software. Every <screenshot/> tag must have at least + one <image/> child. + + + The value of the <image/> tag is a direct HTTP/HTTPS/FTP URL to a screenshot uploaded to a public location on the web. + The <image/> tag may have the following properties: + + + type + + The type of the image: source for the source image, and thumbnail for a thumbnail image. + In case the type is thumbnail, the width and height properties must be present. + + + + width + + The width of the image in pixels. + + + + height + + The height of the image in pixels. + + + + xml:lang + + The language this screenshot image is translated in. This property should only be present if there are multiple images with + different locales present. + + + + + + Optionally, a <screenshot/> tag may have a translatable <caption/> child, defining a short (ideally not more than 256 characters) + description of what the user can see on the referenced screenshot. + + + Ideally, all screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620 pixels. + They should also be in be in PNG or JPEG format. PNG is the preferred format; JPEG should only be used when screenshots include large photographs or other + images where a lossy format like JPEG may compress better. + + + Example: + + + + The FooBar main window. + https://example.com/foobar/screenshot-1.png + + + Foobar showing the frobnicate functionality. + https://example.com/foobar/screenshot-2.png + + ]]> + + + + + + <update_contact/> + + + The <update_contact/> tag is an optional tag which can be added to provide an email address distributors can use to contact the project + about invalid or incomplete metadata or – in case the specification has changed – about old metadata. It can also be used to ask general questions in case of + an update of the component described in the metadata file. + + + The <update_contact/> tag must only be used by distributors. It is not included in the distribution-provided + AppStream XML file, and therefore not exposed to the end user via any kind of UI. + + + Upstream authors might decide to add an email address in cleartext, but spam protection using _AT_ is also valid. + The value of this tag is generally treated a case-insensitive way. + + + Example: + + developer_AT_example.com]]> + + + + + <translation/> + + + The <translation/> tag is an optional tag which can be added to specify the translation domain used for this software component. + It may be used by the AppStream distro metadata generator to determine the translation status of the respective software. + + + The tag must have a type property, assuming the value of the translation system which is used. Right now, allowed translation systems and + values for type are: + + gettext + qt + + In case a software components gets its translation from multiple translation domains, the <translation/> tag may be defined more + than once. + + + Example: + + foobar]]> + + + + + <suggests/> + + + The <suggests/> tag is an optional tag which can be added to specify the component-ids of other software this components suggests. + Software centers might present the suggested software on the installation page of the described component. + + + The tag may have a type property, with the value upstream, indicating that this suggestion originates from the upstream project. + If no type property is given, upstream is implicitly assumed as value. Metainfo files must not define other suggests + types, those are reserved for AppStream catalog XML (see in catalog XML). + + + The suggests tag must have one or more <id/> tags as children, specifying the IDs of the suggested other software components. + + + Example: + + + org.kde.gwenview.desktop + org.inkscape.Inkscape +]]> + + + + + <content_rating/> + + + The <content_rating/> tag is an optional tag which can be added to specify age ratings for the respective software components. + These maybe be used for parental control or to display their information in software centers. + + + The tag must have a type property, indicating the type of the rating system that is used. At the moment, the + Open Age Ratings Service (value oars-1.0) is supported natively, but more services might be + added in future. + + + The <content_rating/> must have <content_attribute/> children which each have an id property indicating + the specific section that is rated. Their value indicates the intensity of the rated section and can be one of: + + + none - no rating given + mild + moderate + intense + + + The website of the Open Age Ratings Service provides an online form which will automatically generate AppStream compatible + markup based on a set of questions answered about the content. + + + Example: + + + moderate + mild +]]> + + + + + + + An example for a very basic component file could look like this: + + + + + com.example.foobar + Foo Bar + A foo-ish bar + http://www.example.org + CC0-1.0 + + + libfoobar.so.2 + foo.ttf + foobar + + + + + FooBar Team +]]> + + + + For a component of type generic, the minimal amount of required tags is: , , + , . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/consoleapp.xml appstream-0.12.0/docs/sources/metainfo/consoleapp.xml --- appstream-0.9.4/docs/sources/metainfo/consoleapp.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/consoleapp.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,98 @@ + + +%BOOK_ENTITIES; +]> + +
+ Console Applications + +
+ Introduction + + A console application is any application that has a command-line or text-based interface and is designed to be used by a human user + on the command line. Applications need to be present in the standard PATH. + + + The file described in this document is built upon the generic component metadata with fields specific for applications (see ). + All tags valid for a generic component are valid for a console-application component as well. + + + In order to enhance the available metadata about their application, projects shipping a console application can ship one or more metainfo files + in /usr/share/metainfo/%{id}.metainfo.xml. + + +
+ +
+ File specification + + + The basic structure for a generic component as described at applies. + Note that the XML root must have the type property set to console-application, while in a generic component this + property can be omitted. This clearly identified this metainfo document as describing an application. + + + + The following list describes tags for console-application upstream metadata and provides some additional information about the values + the tags are expected to have. + If no information is given about a tag, refer to the respective tag in . + + + + + <id/> + + + For console applications, the <id/> tag value must follow the AppStream ID naming conventions (it should be a reverse-DNS name). + + + + + + <metadata_license/> + + + The <metadata_license/> tag as described in must be present. + + + + + + <name/> + + + A name must be present for console applications. See for a detailed description of this tag. + + + + + + <summary/> + + + A summary must be present for console applications. See for a detailed description of this tag. + + + + + + <provides/> ↪ <binary/> + + + This tag is described in detail for generic components at . + + + For console applications, at least one provided <binary/> must be listed in this tag. + + + + + + + For a component of type console-application, the following tags are required and must always be present: , + , , , . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/desktopapp.xml appstream-0.12.0/docs/sources/metainfo/desktopapp.xml --- appstream-0.9.4/docs/sources/metainfo/desktopapp.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/desktopapp.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,214 @@ + + +%BOOK_ENTITIES; +]> + +
+ Desktop Applications + +
+ Introduction + + A desktop application is an application which has a graphical user interface and is commonly used with mouse and keyboard. It also ships a Freedesktop + .desktop file to be visible in application menus. + + + AppStream generators may pull data from the preexisting .desktop files to represent an application in the AppStream metadata pool. Upstream projects should + ship a metainfo file containing additional metadata to describe their application though, to enhance the available metadata. + This data includes things like screenshots, long descriptions, icon information and various other things needed + to present the application properly to the user. + For some distributions, the presence of this metadata is a prerequisite for the application showing up in the metadata pool and being presented in software centers. + + + The file described in this document is built upon the generic component metadata with fields specific for desktop applications (see ). + + + The metainfo files override any values which are automatically fetched from other sources by the AppStream data generator, which means that its data will always take precedence over + data which has already been defined in a .desktop file. + Applications can ship one or more files in /usr/share/metainfo/%{id}.appdata.xml. + + + Data will only be fetched from a desktop file if one tag is present to define a .desktop file ID. If multiple launch tags are + defined, no data will be merged in from .desktop files. + + + + If you are looking for some quickstart guide to just get your application to ship AppStream metadata quickly, this document might not be for you. + You might want to take a look at instead. + + +
+ +
+ File specification + + + The basic structure for a generic component as described at applies. + Note that the XML root must have the type property set to desktop-application, while in a generic component this + property can be omitted. This clearly identifies this metainfo document as describing an application. + + + + + All tags defined in the generic component specification are valid for desktop-application components as well. + An application is just a specialized component, allowing tools like software centers to filter out the component types they want to display. + + + + + The desktop-application component type is the same as the desktop component type - desktop is the older + type identifier for desktop-applications and should not be used for new metainfo files, unless compatibility with very old AppStream tools (pre 2016) + is still wanted. + + + + + The following list describes the special tags for application upstream metadata and provides some additional information about the values + the tags are expected to have. + If no information is given about a tag, refer to the respective tag in . + + + + + <id/> + + + For desktop applications, the <id/> tag value must follow the reverse-DNS scheme as described in . + + + + In previous AppStream releases, the <id/> was used to associate metainfo files with their .desktop files to merge in + data from .desktop files into the AppStream generator's final output. In modern metainfo files, the component-ID for desktop-application + components can be an arbitrary string (matching the naming rules applying to all AppStream metadata), while the tag is used + to associate .desktop files with their metainfo files. + + + + + + + <metadata_license/> + + + The <metadata_license/> tag as described in must be present. + + + + + + <name/> + + + The human-readable name of the application. This is the name you want users to see prior to installing the application. + + + + + + <summary/> + + + A short summary on what this application does, roughly equivalent to the Comment field of the + accompanying .desktop file of the application. + + + + + + <launchable/> + + + It is recommended that a <launchable/> tag is present in desktop-application metainfo files. + The tag is described in detail at . + + + If only one launchable entry of type desktop-id is present, AppStream metadata generators might decide to + merge metadata from .desktop files referenced by the tag into their final output. + + + The launchable tag is optional, but if omitted software centers will not be able to launch the application directly after + it was installed. + + + + + + <screenshots/> + + + A screenshot presents your application to the outside world, and could be seen by hundreds or thousands of people. + + + The <screenshots/> tag should look like it is described at . + + + Screenshot size, shape and format recommendations for applications: + + + + + All screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620px (software center applications will be able to fill in the screenshots in the space they provide for that + more easily then). + + + Ideally the window will be resized to a 16:9 aspect ratio, but screenshots can also be cropped if only a small area of the window needs to be shown. + + + + + Screenshots should be in PNG or JPEG format. PNG is the preferred format; JPEG should only be used when screenshots include large photographs or other images where a lossy format like + JPEG may compress better. + + + + Do not scale screenshots below their original size. + + + + You can find a lot more information on how to create good screenshots in the quickstart guide on applications. + + + + + + <project_group/> + + + This tag is described for generic components at . You should use it for your application if appropriate. + + + + + + <provides/> + + + This tag is described in detail for generic components at . + + + If your application ships a binary in a location in the default PATH, you should add at least a child of type + <binary/> to make that new executable known to the distribution. + + + + + + <releases/> + + + The application metainfo should at least provide one <releases/> tag, + which has one or more <release/> childs to define the version and release date of this + application. For details, see . + + + + + + + For a component of type desktop-application, the following tags are required and must always be present: , + , , , . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/driver.xml appstream-0.12.0/docs/sources/metainfo/driver.xml --- appstream-0.9.4/docs/sources/metainfo/driver.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/driver.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,103 @@ + + +%BOOK_ENTITIES; +]> + +
+ Driver + +
+ Driver + + The driver component type describes drivers for hardware devices as well as other Linux kernel + drivers for e.g. virtualization support. + It usually provides one or multiple modaliases. + + + Drivers can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. + +
+ +
+ Example file + + A driver metainfo file can look like this: + + + + + com.nvidia.GeForce + NVIDIA GeForce + NVIDIA Graphics Driver + +

+ The NVIDIA Accelerated Linux Graphics Driver brings accelerated 2D + functionality and high-performance OpenGL support to Linux x86 with the + use of NVIDIA graphics processing units. +

+ ... +
+ http://www.nvidia.com/Download/index.aspx + CC0-1.0 + LicenseRef-proprietary:NVIDIA + NVIDIA Corporation + + + pci:v000010DEd*sv*sd*bc03sc00i00* + ... + +
]]>
+ +
+ +
+ File specification + + Note that the XML root must have the type property set to driver. + This clearly identifies this metainfo document as describing a driver. + + + + + <id/> + + + For drivers, the value of the <id/> tag must follow the reverse-DNS scheme as described for generic components. + It is sometimes useful to suffix the ID with .driver to make it more unique. + + + + + + <provides/> ↪ <modalias/> + + + The provides/modalias tags contain all the modaliases the described driver supports and allow + to automatically offer installation of the described driver on systems where hardware matching the modalias has been + detected. + + + Using wildcards for modaliases is permitted. + + + Example: + + + pci:v000010DEd00001194sv*sd*bc03sc*i* + pci:v000010DEd00001199sv*sd*bc03sc*i* +]]> + + + + + + + + For a component of type driver, the following tags are required and must be present for a valid document: + , , , + , . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/firmware.xml appstream-0.12.0/docs/sources/metainfo/firmware.xml --- appstream-0.9.4/docs/sources/metainfo/firmware.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/firmware.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,158 @@ + + +%BOOK_ENTITIES; +]> + +
+ Firmware + +
+ Introduction + + Device firmware can be accompanied by AppStream upstream metadata, to be incorporated + by a distribution. Tools like fwupd make + use of this metadata to automatically update flashed firmware of devices found in the machine. + Additionally, this component type can also be used for firmware which is loaded onto the device at runtime. + + + Firmware can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. + +
+ +
+ Example file + + A firmware meta-info file should look like this: + + + + + com.hughski.ColorHug2.firmware + ColorHugALS Firmware + Firmware for the ColorHugALS Ambient Light Sensor + +

+ Updating the firmware on your ColorHugALS device improves performance and + adds new features. +

+
+ http://www.hughski.com/ + CC0-1.0 + GPL-2.0+ + Hughski Limited + + 84f40464-9272-4ef7-9399-cd95f12da696 + + + + http://www.hughski.com/downloads/colorhug-als/firmware/colorhug-als-3.0.2.cab + +

This stable release fixes the following bugs:

+
    +
  • Fix the return code from GetHardwareVersion
  • +
  • Scale the output of TakeReadingRaw by the datasheet values
  • +
+
+
+
+
]]>
+ + + You can find additional information on how to create a complete firmware package for flashed firmware upstream in + the README document of fwupd. + + +
+ +
+ File specification + + Note that the XML root must have the type property set to firmware. + This clearly identifies this metainfo document as describing firmware. + + + + + <id/> + + + For firmware, the value of the <id/> tag must follow the reverse-DNS scheme as described for generic components. + It is sometimes useful to suffix the ID with .firmware to make it more unique. + For example com.hughski.ColorHug2.firmware. + + + + + + <releases/> + + + This tag is almost identical to the generic tag. + Additional to the generic tag, for each <release/> child a <location/> tag is allowed, in case the component describes + flashed firmware. + + + The <location/> tag specifies a remote location where the firmware .cab can be downloaded from. + The download location needs to be accessible via HTTP, HTTPS or FTP. + + + Example: + + + + http://www.hughski.com/downloads/colorhug-als/firmware/colorhug-als-3.0.2.cab + +

This stable release fixes bugs.

+
+
+]]>
+ + The <location/> tag is currently only allowed to be specified once. + +
+
+ + + <provides/> ↪ <firmware/> + + + The provides/firmware tag describes the technical information needed to associate a firmware with a device, or describes + which runtime firmware file it makes available to the kernel. + + + For runtime-loadable firmware, the type property of the firmware tag needs to be set to runtime, + and its value needs to define the filename of a firmware below /lib/firmware to the firmware file in question, + like the firmware value exported from Linux kernel modules. + + + Example: + + + ipw2200-bss.fw +]]> + + + For flashed firmware, the type property of the tag needs to be set to flashed. + Its value needs to define the GUID of the device the firmware should be flashed onto. + + + Example: + + + 84f40464-9272-4ef7-9399-cd95f12da696 +]]> + + + + +
+ + + For a component of type firmware, the following tags are required and must be present for a valid document: + , , , + , . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/font.xml appstream-0.12.0/docs/sources/metainfo/font.xml --- appstream-0.9.4/docs/sources/metainfo/font.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/font.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,237 @@ + + +%BOOK_ENTITIES; +]> + +
+ Fonts + +
+ Introduction + + A software center can allow users to install additional fonts using font metadata. + Also, applications can use font metadata to find missing fonts (for example, if a special mathematical font is needed) + in the distribution's software sources. + This metainfo specification describes how metadata for fonts or font collections should be structured. + + + Font packages can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. + + + Font metadata files can – just like all other metainfo files – be translated. See the section about translation for more information. + + + + A font component is in most cases not describing a single font, but rather a collection of fonts that + are grouped together, usually by their art style or font-family. + + + To make the individual fonts known to the system, use the tag. + + +
+ +
+ Example file + + A minimal font metainfo file can look like this: + + + + com.latofonts.Lato + MIT + OFL-1.1 + + Lato + A sanserif type­face fam­ily + +

+ Lato is a sanserif type­face fam­ily designed in the Sum­mer 2010 by Warsaw-​​based designer + Łukasz Dziedzic (“Lato” means “Sum­mer” in Pol­ish). In Decem­ber 2010 the Lato fam­ily + was pub­lished under the open-​​source Open Font License by his foundry tyPoland, with + sup­port from Google. +

+
+ + + Lato Regular + Lato Italic + Lato Bold + Lato Light + Lato Light Italic + ... + +
]]>
+
+ +
+ File specification + + Note that the XML root must have the type property set to font. + This clearly identifies this metainfo document as describing a font. + + + + + <id/> + + + For fonts, the %{id} must follow the reverse-DNS scheme as described for generic components. + For the product name part, it is recommended to take the the name of the font or font bundle without whitespace. + + + + + + <metadata_license/> + + + The <metadata_license/> tag is required. See for a description of this tag. + + + + + + <name/> + + + Set a name for the font or font collection. + + + + + + <summary/> + + + A short description of the font described in this metainfo file. + + + + + + <description/> + + + Add a long description of your font. Do not assume the format is HTML. Only paragraph, ordered list + and unordered list are supported at this time. + + + See the generic component for a detailed description of this tag. + + + + + + <screenshots/> + + + A screenshot presents your font to the outside world. + + + If the font metadata does not define an own screenshot, the AppStream generator is supposed to render one or multiple + sample images using the respective font. + + + See the generic component for a detailed description of this tag. + + + + + + <url/> + + + This is a recommended tag for links of type homepage. + Links of type homepage should be a link to the upstream homepage for the application. + See the generic component for a description of this tag. + + + + + + <provides/> ↪ <font/> + + + This tag is described in detail for generic components at . + + + You should add one or more children of type <font/> to make the font's full-names known. + The full-name should be the same as given in the font file for the English language. + If no full-name is set, a space-separated combination of the font's family and style + is used instead. + The font must have a family defined to be included. + + + The full-name entry should show the complete name of a typeface in its + “natural” form, including style and character set information (if any), and + without abbreviations. This is the name that some systems and applications + look at to determine full, unabbreviated font menu names. + + + If you want to query the full-name and its family and style to see what needs to + be added to this tag, you can use the fc-query utility of Fonconfig: + + fc-query --format='FN: %{fullname[0]}\nFS: %{family[0]} %{style[0]}\n' FONT-FILENAME + + Examples: + + + Lato Heavy Italic + Noto Kufi Arabic Bold + Liberation Serif Bold Italic + FontAwesome Regular +]]> + + If no <font/> tags were defined, the AppStream collection data generator should try to extract them from the actual font files found in the + software package/bundle. + + + In every case, the names given in the provides tag must match the metadat the fonts contain themselves. If the data of the font files + is incomplete, the data can not be extended by the <font/> tag. + This is important because the AppStream generator may use the data to pick the right fonts, and because applications expect the exact font they requested + via AppStream to be present on the system after the component was installed (and not one which has different metadata). + + + + + + <languages/> + + + This tag gives information about the locale a font supports. + + + This tak allows specifying the main locale (and thereby scripts) the font can be used with. + It does not have to contain an extensive list, as the AppStream metadata generator will try get obtain that + information from the font files themselves, but it is useful to define to hint the generator in the right direction. + + + If samples of the font are rendered as screenshots by the collection metadata generator, the locale mentioned in the + metainfo file will be preferred over automatically (or heuristically) defined ones. + + + You can use the following command to determine which languages a font supports: + + fc-query --format='%{lang}\n' FONT-FILENAME + + Tag example: + + + de + en + cn + +]]> + + + + + + For a component of type font, the following tags are required and must be present: , , + , , . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/inputmethod.xml appstream-0.12.0/docs/sources/metainfo/inputmethod.xml --- appstream-0.9.4/docs/sources/metainfo/inputmethod.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/inputmethod.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,151 @@ + + +%BOOK_ENTITIES; +]> + +
+ Input Methods + +
+ Introduction + + It is a nice feature for a software center to allows users the installation of additional input methods. + This meta-info specification describes how metadata about input methods should be structured. + + + Software components providing an input method can ship one or more files in + /usr/share/metainfo/%{id}.metainfo.xml. + + + Input method metadata files can – just like all other metainfo files – be translated. See the section about translation for more information. + +
+ +
+ Example file + + The input method meta-info file should look like this: + + + + + com.github.ibus.mathwriter-ibus.db + FSFAP + Mathwriter + Math symbols input method + +

+ The input method is designed for entering mathematical symbols. +

+

+ Input methods are typing systems allowing users to input complex languages. + They are necessary because these contain too many characters to simply be laid + out on a traditional keyboard. +

+
+ https://github.com/mike-fabian/ibus-table-others +
]]>
+
+ +
+ File specification + + Note that the XML root must have the type property set to inputmethod. + This clearly identifies this metainfo document as describing an input method instead of a generic software component. + + + + + <id/> + + + For input methods, the %{id} should follow the standard reverse-domain-name scheme. + For the product name part, it is recommended to take the database filename of the input method. + + + + + + <metadata_license/> + + + The <metadata_license/> tag is required. See for a description of this tag. + + + + + + <name/> + + + Set a name for your input method. + + + + + + <summary/> + + + A short description of the input method described in this metainfo file. + + + + + + <description/> + + + Add a long description of the input method. + + + Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time. + + + + + + <screenshots/> + + + A screenshot may be included, showing the input method in use in an application. + + + Refer to for a detailed description of this tag. + + + + + + <url/> + + + This is a recommended tag for links of type homepage. + Links of type homepage should be a link to the upstream homepage for the application. + See See for a description of this tag. + + + + + + <provides/> + + + This tag is described for generic components at in detail. + + + You can add one or more children of type <library/> in case you publish some additional shared libraries. + If not, and there are no public binaries involved, you may omit the provides tag for input methods. + + + + + + + For a component of type inputmethod, the following tags are required and must be present: + , , + , . + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/localization.xml appstream-0.12.0/docs/sources/metainfo/localization.xml --- appstream-0.9.4/docs/sources/metainfo/localization.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/localization.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,121 @@ + + +%BOOK_ENTITIES; +]> + +
+ Localization + +
+ Localization + + The localization component type describes language packs for individual software components or groups + of software components. A language pack includes anything necessary to localize a software component for a specific language + and/or country. This is usually translations, but may also be translated media content, currency information and other things. + A localization component extends one or multiple other components and defines the + languages it provides via its languages tag. + + + Language packs can ship one or more metainfo files as /usr/share/metainfo/%{id}.metainfo.xml. + +
+ +
+ Example file + + A localization metainfo file can look like this: + + + + + org.kde.l10n.de + KDE German Language + German localization for the KDE desktop and apps + + org.kde.plasmashell + org.kde.gwenview.desktop + org.kde.dolphin.desktop + ... + + http://i18n.kde.org/team-infos.php?teamcode=de + FSFAP + + The KDE German L10N team + + + de_DE + de_AT + de + ... + +]]> + +
+ +
+ File specification + + Note that the XML root must have the type property set to localization. + This clearly identifies this metainfo document as describing a language pack. + + + + + <id/> + + + For localizations, the value of the <id/> tag must follow the reverse-DNS scheme as described for generic components. + Ideally, the name of the component this language pack is for should be suffixed with .l10n.%{lang}, where %{lang} + is the language code of the language pack. + + + For example, if your applications component-id is org.gimp.gimp the ID of the German language pack + for GIMP should be org.gimp.gimp.l10n.de. + + + + + + <extends/> + + + The extends tags contain all the components this language pack can be used with. + + + + + + + <languages/> + + + This tag gives information about the locale a localization component provides support for. + + + The tag is allowed to only occur once per component, and contains multiple <lang/> child nodes, which have + a language code as value. + Each <lang/> node may have a percentage property, which describes the percentage value to which + a component has been translated. + + + Tag example: + + + de_DE + de_AT + +]]> + + + + + + + For a component of type localization, the following tags are required and must be present for a valid document: + , , , + , , . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/MetaInfo.xml appstream-0.12.0/docs/sources/metainfo/MetaInfo.xml --- appstream-0.9.4/docs/sources/metainfo/MetaInfo.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/MetaInfo.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,42 @@ + + +%BOOK_ENTITIES; +]> + + Upstream Metadata + + AppStream allows upstream projects to define metadata about the components they provide using small XML files, + metainfo files, which get installed into locations on the client system and are used by distribuors to enhance their + metadata. + + + A "component" is a piece of software, like an application, a library, a font or a codec. For several components, especially + those which are shown in software-centers, we provide specialized metainfo files to define specific properties and data of these components. + For example, applications and fonts support screenshots, while codecs don't. + + + All metainfo files need to contain a minimal amount of information, defined in the "Generic Component" section, which also describes some optional + elements which can be used. + Specialized components might require more information to be complete and valid. + + + The XML in metainfo files does not need any XML namespace, and adding one should generally be avoided. + If you want to use a namespace though (maybe in case you want to embed the data in other contexts), the xmlns + should be https://specifications.freedesktop.org/metainfo/1.0. + + + + + + + + + + + + + + + + diff -Nru appstream-0.9.4/docs/sources/metainfo/service.xml appstream-0.12.0/docs/sources/metainfo/service.xml --- appstream-0.9.4/docs/sources/metainfo/service.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/service.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,110 @@ + + +%BOOK_ENTITIES; +]> + +
+ Services + +
+ Introduction + + A service component is any software that is started and supervised by + the Operating Systems "init" facility, such as systemd. + + + The metadata described in this document is built upon the generic component metadata with fields specific for services (see ). + All tags valid for a generic component are valid for a service component as well. + + + In order to enhance the available metadata about their services, projects shipping a service can ship one or more metainfo files + in /usr/share/metainfo/%{id}.metainfo.xml. + + +
+ +
+ File specification + + + The basic structure for a generic component as described at applies. + Note that the XML root must have the type property set to service, while in a generic component this + property can be omitted. This clearly identified this metainfo document as describing a service. + + + + The following list describes tags for service upstream metadata and provides some additional information about the values + the tags are expected to have. + If no information is given about a tag, refer to the respective tag in . + + + + + <id/> + + + For services, the <id/> tag value must follow the AppStream ID naming conventions (it should be a reverse-DNS name). + + + + + + <metadata_license/> + + + The <metadata_license/> tag as described in must be present. + + + + + + <name/> + + + A name must be present for services. See for a detailed description of this tag. + + + + + + <summary/> + + + A summary must be present for services. See for a detailed description of this tag. + + + + + + <provides/> ↪ <service/> + + + This tag is described in detail for generic components at . + + + + + + <launchable/> + + + This tag is described in detail for generic components at . + + + At least one launchable element with type "service" must be present. + The value is a name that can be used with the OS init facility to + start/stop and monitor the service. + + + + + + + + For a component of type service, the following tags are required and must always be present: , + , , , . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metainfo/webapp.xml appstream-0.12.0/docs/sources/metainfo/webapp.xml --- appstream-0.9.4/docs/sources/metainfo/webapp.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/metainfo/webapp.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,118 @@ + + +%BOOK_ENTITIES; +]> + +
+ Web Applications + +
+ Introduction + + A web application is an application running remotely that is accessed via a web browser and built on the web platform. + + + The metadata described in this document is built upon the generic component metadata with fields specific for web-applications (see ). + All tags valid for a generic component are valid for a web-application component as well. + + + A web application metainfo file is special in the regard that it is usually not combined with the software it is describing and that it has no + installable. + It usually is equivalent to a weblink that gets special treatment by software centers. Web application metainfo files are therefore + injected directly into the collection metadata generation process, or can be installed as usual into /usr/share/metainfo/%{id}.metainfo.xml. + + + Software centers may display web applications in special, chrome-less web browser windows to achieve better desktop integration and + make the web application feel more native on the desktop. + + +
+ +
+ File specification + + + The basic structure for a generic component as described at applies. + Note that the XML root must have the type property set to web-application, while in a generic component this + property can be omitted. This clearly identified this metainfo document as describing a web application. + + + + The following list describes tags for web-application metainfo files and provides some additional information about the values + the tags are expected to have. + If no information is given about a tag, refer to the respective tag in . + + + + + <id/> + + + For web applications, the <id/> tag value must follow the AppStream ID naming conventions (it should be a reverse-DNS name). + + + + + + <metadata_license/> + + + The <metadata_license/> tag as described in must be present. + + + + + + <name/> + + + A name must be present for console applications. See for a detailed description of this tag. + + + + + + <summary/> + + + A summary must be present for console applications. See for a detailed description of this tag. + + + + + + <launchable/> + + + This tag is described in detail for generic components at . + + + A launchable tag of type url must be present for web applications. It is used as the entry + point for starting the web application and opened in a browser in case the user wants to "launch" the web application. + + + + + + <icon/> + + + This tag is described in detail for generic components at . + + + A icon tag must be present for web applications. Authors of the metainfo files might prefer using the remote icon type, + but any icon type is allowed here. + + + + + + + For a component of type web-application, the following tags are required and must always be present: , + , , , , , + . + + +
+
diff -Nru appstream-0.9.4/docs/sources/metaspecs/addondata.xml appstream-0.12.0/docs/sources/metaspecs/addondata.xml --- appstream-0.9.4/docs/sources/metaspecs/addondata.xml 2016-04-11 22:18:45.000000000 +0000 +++ appstream-0.12.0/docs/sources/metaspecs/addondata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Addons - -
- Introduction - - Some software is not standalone, but rather extends existing software installed on the system. - The "Addon" component type exists to reflect that. - - - Software which provides addons can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. - -
- -
- Example file - - A addon meta-info file should look like this: - - - - - gedit-code-assistance - gedit.desktop - Code Assistance - Code assistance for C, C++ and Objective-C - http://projects.gnome.org/gedit - CC0-1.0 - GPL-3.0+ -]]> -
- -
- File specification - - Note that the XML root must have the type property set to addon. - This clearly identified this metainfo document as describing an addon to an existing software. - - - - - <id/> - - - For addons, there are no special requirements for what their %{id} should be. - You might want to prefix your id with "addon-" though, to make it easily recognizable. - - - - - - <extends/> - - - This tag is refers to the id of the component this addon is extending. - - - So for example if I have a plugin "kipi" which extends the application "Gwenview", I need to refer to - it's identifier like: - - gwenview.desktop]]> - - The <extends/> tag may be specified multiple times. - - - - - - - For a component of type addon, the following tags are required and must be present: , , , - , . - - -
-
diff -Nru appstream-0.9.4/docs/sources/metaspecs/appdata.xml appstream-0.12.0/docs/sources/metaspecs/appdata.xml --- appstream-0.9.4/docs/sources/metaspecs/appdata.xml 2016-04-11 22:18:45.000000000 +0000 +++ appstream-0.12.0/docs/sources/metaspecs/appdata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,174 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Desktop Applications - -
- Introduction - - Upstream projects can ship a small XML file containing additional metadata to describe their application. - This data includes things like screenshots, long descriptions, icon information and various other things needed - to present the application properly to the user. - - - The file described in this document is built upon the generic component metadata with fields specific for applications (see ). - - - The AppData files override any values which are automatically fetched by the AppStream data generator, which means that it's data takes precedence over - data which has already been defined in a .desktop-file. - Applications can ship one or more files in /usr/share/metainfo/%{id}.appdata.xml. - - - - If you are looking for some quickstart guide to just get your application to ship AppStream metadata quickly, this document might not be for you. - You might want to take a look at instead. - - -
- -
- File specification - - - The basic structure for a generic component as described at applies. - Note that the XML root must have the type property set to desktop, which in a generic component this - property can be omitted. This clearly identified this metainfo document as describing an application. - - - - - All tags defined in the generic component specification are valid in AppData as well, an application is just - defined as a specialized component, which has the additional benefit of being displayed in a software-center application. - - - - - The following list describes the special tags for application upstream metadata and provides some additional information about the values - the tags are expected to have. - If no information is given about a tag, refer to the respective tag in . - - - - - <id/> - - - For applications, the <id/> tag value must be the same name as the installed .desktop file for the application. - - - - - - <metadata_license/> - - - The <metadata_license/> as described in must be present. - - - - - - <name/> - - - While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. - You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. - In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this. - - - - - - <summary/> - - - While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. - You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. - In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this. - - - - - - <screenshots/> - - - A screenshot presents your application to the outside world, and could be seen by hundreds or thousands of people. - - - The <screenshots/> tag should look like it is described at . - - - Screenshot size, shape and format recommendations for applications: - - - - - All screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620px (software center applications will be able to fill in the screenshots in the space they provide for that - more easily then). - - - Ideally the window will be resized to a 16:9 aspect ratio, but screenshots can also be cropped if only a small area of the window needs to be shown. - - - - - Screenshots should be in PNG or JPEG format. PNG is the preferred format; JPEG should only be used when screenshots include large photographs or other images where a lossy format like - JPEG may compress better. - - - - Do not scale screenshots below their original size. - - - - You can find a lot more information on how to create good screenshots in the quickstart guide on applications. - - - - - - <project_group/> - - - This tag is described for generic components at . You should use it for your application if appropriate. - - - - - - <provides/> - - - This tag is described in detail for generic components at . - - - If your application ships a binary in a location in the default PATH, you should add at least a child of type - <binary/> to make that new executable known to the distribution. - - - - - - <releases/> - - - The application metainfo should at least provide one <releases/> tag, - which has one or more <release/> childs to define the version and release date of this - application. For details, see . - - - - - - - For a component of type desktop, the following tags are required and must always be present: , - , . - - -
-
diff -Nru appstream-0.9.4/docs/sources/metaspecs/codecdata.xml appstream-0.12.0/docs/sources/metaspecs/codecdata.xml --- appstream-0.9.4/docs/sources/metaspecs/codecdata.xml 2016-04-11 22:18:45.000000000 +0000 +++ appstream-0.12.0/docs/sources/metaspecs/codecdata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Codecs - -
- Introduction - - Software centers might want to special-case codec handling. Therefore, we provide a component type for them. - - - Codecs can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. - - - Codec metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that. - -
- -
- Example file - - A codec meta-info file should look like this: - - - - - gstreamer-good - CC0 - GStreamer Multimedia Codecs - Extra - -

- This addon includes several additional codecs that are missing - something - perhaps a good code review, some documentation, a set of - tests, a real live maintainer, or some actual wide use. - However, they might be good enough to play your media files. -

-

- These codecs can be used to encode and decode media files where the - format is not patent encumbered. -

-

- A codec decodes audio and video for for playback or editing and is also - used for transmission or storage. - Different codecs are used in video-conferencing, streaming media and - video editing applications. -

-
- - encoder-audio/mpeg - mpegversion=(int){ 4, 2 } - stream-format=(string){ adts, raw } - encoder-video/mpeg - systemstream=(boolean)false - mpegversion=(int){ 1, 2, 4 } - encoder-video/mpeg - systemstream=(boolean)true - encoder-video/x-xvid - element-faac - element-mpeg2enc - element-mplex - element-xviddec - element-xvidenc - -
]]>
-
- -
- File specification - - Note that the XML root must have the type property set to codec. - This clearly identified this metainfo document as describing a codec. - - - - - <id/> - - - For codecs, there are no special requirements for what their %{id} should be. - But, as for any other component, you should pick a reasonable and unique name. - - - - - - <metadata_license/> - - - The <metadata_license/> tag is required. See for a description of this tag. - - - - - - <provides/> ↪ <codec/> - - - This tag is described for generic components at in detail. - - - You must add one or more children of type <codec/> to make it known to the system that your - software is able to provide the mentioned codecs. - Adding this data is required for all components of type=codec. - - - - - - - For a component of type codec, the following tags are required and must be present: , , - , , . - -
-
diff -Nru appstream-0.9.4/docs/sources/metaspecs/component.xml appstream-0.12.0/docs/sources/metaspecs/component.xml --- appstream-0.9.4/docs/sources/metaspecs/component.xml 2016-04-12 14:17:58.000000000 +0000 +++ appstream-0.12.0/docs/sources/metaspecs/component.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,546 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Generic Component - -
- Introduction - - For a distribution, it is good to know more about the content of a package. Which public interfaces (libraries? Python modules?) does it provide? Does it contain codecs? Does it - contain firmware? Fonts? An application? - All of this information can be used to automatically install missing software or to offer users a choice on what they want to install from a software center. - - - To provide this information, we created the metainfo files, which allow upstream projects to describe the content of their software package. - If a metainfo file provides a <provides/> tag, distributors must also ensure that the package providing the file contain all items referenced - by that statement, or is installed by a metapackage depending on packages which provide these items. This gives upstream projects a (very light) way to influence distributor packaging. - More information about that can be found below. - - - Several specialized component-metainfo files exist, for example for applications or fonts. These are all based on this generic component XML specification, and are described in the - following chapters. - -
- -
- Filesystem locations - - - Upstream projects can ship one or more metainfo files in /usr/share/metainfo/%{id}.metainfo.xml, where id is a unique - identifier of this specific component. - - - - Applications are a special case here, because they are usually treated differently by software centers (and also for historical reasons). - If your metainfo file covers only an application, as described in the AppData section, install it as - /usr/share/metainfo/%{id}.appdata.xml. - - - - Legacy Path - - The /usr/share/appdata/ path must be scanned by AppStream tools as well, to support legacy applications installing - metadata there. - For new software components, it is advised not to use this directory. - - - -
- -
- XML Specification - - - The XML for a generic component definition starts with an ]]> tag as root element. - The ]]> element must at least have an id, name and releases tag, - a provides tag with appropriate children is highly recommended. - All possible tags in the generic set are: - - - - - <id/> - - - The ]]> tag is a short and unique identifier for this component. It must contain only ASCII characters, dots, hyphens and numbers, spaces are - not allowed. Specialized metainfo types, such as application or fonts, may apply additional restrictions on the id tag value. - - - A general pattern for a valid ID tag is to use a reverse URL scheme, consisting of <tld>.<vendor>.<product>.<type>, e.g. org.kde.gwenview.desktop - or com.hugski.ColorHug2.firmware. - - - Note that the value of this tag must be unique across all distributions. In case it is not, distributors are expected to reject the conflicting components - from inclusion into their metadata. - - - - - - <metadata_license/> - - - The <metadata_license/> tag indicates the content licence that you are releasing the one - Metainfo XML file under. This is not typically the same as the project licence. Omitting the license value can result - in your data not being incorporated into the distribution metadata (so this is a required tag). - - - A permissive license ensures your data can be combined with arbitrary other data in one file. - Primissive licence names include: - - - - CC0-1.0 - - - CC-BY-3.0 - - - CC-BY-SA-3.0 - - - GFDL-1.3 - - - MIT - - - - The licence codes correspond to the identifiers found at the SPDX OpenSource License Registry. - For instance, CC-BY-SA-3.0 corresponds to the license at - creativecommons.org/licenses/by-sa/3.0. - - - - - - <name/> - - - A human-readable name for this software component. For example, if the component id was "libc", its name might be "GNU Standard C Library". - - - - - - <summary/> - - - A short summary of what this component does. If the component is "PackageKit", the summary could be "Provides a package-management abstraction layer". - - - - - - <description/> - - - A long description of this component. Some markup can be used. - - - Do not assume the format is HTML. Only paragraph (p), ordered list (ol) and unordered list (ul) are supported at this time. - - - In metainfo files, this tag should be translated by-paragraph, meaning that in a translated file, each translated <p/> child - has a language property. - - - - - - <url/> - - - Defines URLs for this component.There are several different URL types allowed: - - - - homepage - - Should be a link to the upstream homepage for the component. - - - - - bugtracker - - Should point to the software's bug tracking system, for users to report new bugs. - - - - - faq - - - Should link a FAQ page for this software, to answer some of the most-asked questions in - detail, something which you can not do in the component's description. - - - - - - help - - Should provide a link to an online user's reference, a software manual or help page. - - - - - donation - - - Links of this type should point to a webpage showing information on how to donate to - the described software project. - - - - - - - - - <releases/> - - - The ]]> tag contains <release/> child tags which - describe some metainformation about the current release of the described software. - The <release/> tag may be present multiple times (for older releases), but a tag for - the current version must always be present. - - - A release tag can have the properties version, date and timestamp. - The date property can have any time in ISO 8601 format as value and - should be present for every release. - The timestamp tag contains the release time in form of a UNIX epoch. This tag should not be used in metainfo files in newly - written metadata, but will still be parsed in case it is present. The the timestamp property is mainly used in generated distro-meadata. - In case both release-time tags are present, the timestamp tag will take precedence over date. - - - Optionally, the <release/> tag may also have an urgency property, having one of the following values: - - - low - medium - high - critical - - - The urgency defines how important it is to install the new release as an update. This is especially important for type=firmware - components. - If no urgency is defined, a medium urgency is implicitly assumed. - The urgency defines how the update will be presented to the user, and sometimes if it will be installed automatically and immediately, or delayed. - - - Each release tag may have a description tag as child, containing a brief description of what is new in the release. - The description tag is structured as described in - - - A release tag may also have one or multiple size tags as children, which define the installed and download size - of this component release. This is useful in case the component does not have a corresponding native package in a distribution, for example if it is a Limba - bundle or LVFS firmware. - The size type is defined via a type property on the size tag, and may assume the value download or installed. - The size itself is set as value and must be given in bytes. - - - Examples for a valid releases tag: - - - - 12345678 - 42424242 - - -]]> - - - - - <provides/> - - - The provides tag and it's children describe the public interfaces this application provides. - A public interface can be anything which other applications, which are not part of the upstream project, can access or reference. - This includes binaries and libraries. Private interfaces should never be added to a provides tag. - - - A provides tag contain a number of children describing the type and name of the provided public interface items. - It is suggested that the build-system auto-generates this tag and it's children. - Currently allowed item types are listed below. If you miss something, file a bug against AppStream so we can add the new type. - - - - - <library/> - - - Contains the name of a shared library placed in a publicly accessible library path, such as /usr/lib, /usr/lib/<triplet> - or /lib. - For example, for the libappstream library, the value for library would be libappstream.so.1. - - - - - - <binary/> - - - Name of a binary installed into a location in PATH. - - - - - - <font/> - - - Name of a font provided by this component. For example Linux Libertine O. - The tag must have a file property stating the filename of the referenced font. - - - Example: - - - Linux Libertine O -]]> - - - - - <modalias/> - - - A modalias glob representing the hardware types (for example USB, PCI, ACPI, DMI) this component handles. - Useful for installing printer drivers or other USB protocol drivers for smartphones, firmware, kernel drivers which - are not merged upstream yet or whatever else. - - - - - - <firmware/> - - - This provided element is described in details for the firmware component type, where it is mandatory. - Please see for more information. - - - - - - <python2/> - - - Name of a Python2 module this component provides. - - - - - - <python3/> - - - Name of a Python3 module this component provides. - - - - - - <dbus/> - - - Contains the name of a DBus service as property. The type of the service must be specified using the type property - of this tag. Allowed values are user and system. - - - Example: - - - org.freedesktop.PackageKit -]]> - - - - - - - - - - <mimetypes/> - - - This tag can contain one or more <mimetype/> children, describing the mime types this application supports. - This tag is especially useful for generic components and addon-type components. For applications, the metadata will automatically - be fetched from their .desktop files by the distribution's metadata generator. - Example: - - - - text/html - image/jpeg - application/rss+xml - ]]> - - - - - <project_group/> - - - If you include the <project_group/> tag then this identifies your project with a specific upstream umbrella project. - Known values include GNOME, KDE, XFCE, MATE and LXDE, although other umbrella projects like Yorba or Mozilla make sense too. - - - - You should only identify with an umbrella project if you use all their infrastructure and policies, for instance string freezes dates, bugtracker and source control instance. - - - - - - - <project_license/> - - - The <project_license/> tag is indicating the license of the component (application/library/addon/font/etc.) described in the metadata document. - It should be a string in SPDX format. Licenses may be combined using and and or logic. - Possible values include: - - GPL-2.0 - LGPL-3.0+ and GPL-3.0+ - MIT - CC-BY-SA-2.0 - ... - - A full list of recognized licenses and their identifiers can be found at the - SPDX OpenSource License Registry. - - - Although the project_license tag is not mandatory, it is recommended to include it. - - - - - - <developer_name/> - - - The <developer_name/> tag is designed to represent the developers or project responsible for development of the project described in the metadata. - - - Values might be for example "The GNOME Foundation" or "The KDE Community". - You must not include hyperlinks or emails in this field, if you want to link to the developer's homepage, use the -tag instead. - - - This tag is translatable. - - - - - - <screenshots/> - - - Visual components (like fonts or graphical applications) may choose to add one or multiple screenshots to their metadata. - - - The <screenshots/> tag contains multiple <screenshot/> children, where at least one of them must have the property - type="default" to indicate the application's primary screenshot. Every <screenshot/> tag must have at least - one <image/> child, which should define the width and height of the referenced image in it's properties. - The value of the <image/> tag is a direct URL to a screenshot uploaded to a public location on the web. - - - Optionally, a <screenshot/> tag may have a <caption/> child, defining a short (not more then 255 characters!) - description of what the user can see on the referenced screenshot. - - - Ideally, all screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620px. - They should also be in be in PNG or JPEG format. PNG is the preferred format; JPEG should only be used when screenshots include large photographs or other - images where a lossy format like JPEG may compress better. - - - - - - <update_contact/> - - - The <update_contact/> tag is an optional tag which can be added to provide an email address distributors can use to contact the project - about invalid or incomplete metadata, or in case the specification has changed, about old metadata. It can also be used to ask general questions in case of - an update of the component described in the metadata file. - - - The <update_contact/> tag must only be used by distributors. It is not included in the distribution-provided - AppStream XML file, and therefore not exposed to the end user via any kind of UI. - - - Upstream authors might decide to add an email address in cleartext, but spam protection using _AT_ is also valid. - - - Example: - - developer_AT_example.com]]> - - - - - <translation/> - - - The <translation/> tag is an optional tag which can be added to specify the translation domain used for this software component. - It may be used by the AppStream distro metadata generator to determine the translation status of the respective software. - - - The tag must have a type property, assuming the value of the translation system which is used. Right now, allowed trabslation systems and - values for type are: - - gettext - qt - - In case a software components gets its translation from multiple translation domains, the <translation/> tag may be defined more - than once. - - - Example: - - foobar]]> - - - - - - - An example for a very basic component file could look like this: - - - - - foobar - Foo Bar - A foo-ish bar - http://www.example.org - CC0-1.0 - - - libfoobar.so.2 - foo.ttf - foobar - - - - - FooBar Team -]]> - - - - For a component of type generic, the minimal amount of required tags is: , , - , . - - -
-
diff -Nru appstream-0.9.4/docs/sources/metaspecs/firmwaredata.xml appstream-0.12.0/docs/sources/metaspecs/firmwaredata.xml --- appstream-0.9.4/docs/sources/metaspecs/firmwaredata.xml 2016-04-11 22:18:45.000000000 +0000 +++ appstream-0.12.0/docs/sources/metaspecs/firmwaredata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,157 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Firmware - -
- Introduction - - Device firmware can be accompanied by AppStream upstream metadata, to be incorporated - by a distribution. Tools like fwupd make - use of this metadata to automatically update flashed firmware of devices found in the machine. - Additionally, this component type can also be used for firmware which is loaded to the device at runtime. - - - Firmware can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. - -
- -
- Example file - - A firmware meta-info file should look like this: - - - - - com.hughski.ColorHug2.firmware - ColorHugALS Firmware - Firmware for the ColorHugALS Ambient Light Sensor - -

- Updating the firmware on your ColorHugALS device improves performance and - adds new features. -

-
- http://www.hughski.com/ - CC0-1.0 - GPL-2.0+ - Hughski Limited - - 84f40464-9272-4ef7-9399-cd95f12da696 - - - - http://www.hughski.com/downloads/colorhug-als/firmware/colorhug-als-3.0.2.cab - -

This stable release fixes the following bugs:

-
    -
  • Fix the return code from GetHardwareVersion
  • -
  • Scale the output of TakeReadingRaw by the datasheet values
  • -
-
-
-
-
]]>
- - - You can find additional information on how to create a complete firmware package for flashed firmware upstream in - the README document of fwupd. - - -
- -
- File specification - - Note that the XML root must have the type property set to firmware. - This clearly identified this metainfo document as describing firmware. - - - - - <id/> - - - For firmware, the value of the <id/> tag must be a unique name for the device the firmware belongs to, constsing of the vendor domain and the - device name. A reverse URL scheme in form of <tld>.<vendor>.<product>.firmware is used, e.g. com.hughski.ColorHug2.firmware. - - - - - - <releases/> - - - This tag is almost identical to the generic tag. - Additional to the generic tag, for each <release/> child a <location/> tag is allowed, in case the component describes - flashed firmware. - - - The <location/> tag specifies a remote location where the firmware .cab can be downloaded from. - The download location needs to be accessibly via HTTP, HTTPS or FTP. - - - Example: - - - - http://www.hughski.com/downloads/colorhug-als/firmware/colorhug-als-3.0.2.cab - -

This stable release fixes bugs.

-
-
-]]>
- - The <location/> tag is currently only allowed to be specified once. - -
-
- - - <provides/> ↪ <firmware/> - - - The provides/firmware tag describes the technical information needed to associate a firmware with a device, or describes - which runtime firmware file it makes available to the kernel. - - - For runtime-loadable firmware, the type property of the firmware tag needs to be set to runtime, - and its value needs to define the filename of a firmware below /lib/firmware to the firmware file in question, - like the firmware value exported from Linux kernel modules. - - - Example: - - - ipw2200-bss.fw -]]> - - - For flashed firmware, the type property of the tag needs to be set to flashed. - Its value needs to define the GUID of the device the firmware should be flashed onto. - - - Example: - - - 84f40464-9272-4ef7-9399-cd95f12da696 -]]> - - - - -
- - - For a component of type firmware, the following tags are required and must be present for a valid document: - , , , - , . - - -
-
diff -Nru appstream-0.9.4/docs/sources/metaspecs/fontdata.xml appstream-0.12.0/docs/sources/metaspecs/fontdata.xml --- appstream-0.9.4/docs/sources/metaspecs/fontdata.xml 2016-04-11 22:18:45.000000000 +0000 +++ appstream-0.12.0/docs/sources/metaspecs/fontdata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Fonts - -
- Introduction - - A software center can allow users to install additional fonts using font metadata. - Also, applications can use font metadata to find missing fonts (e.g. a special methematical font is needed) - in the distribution's software sources. - This meta-info specification describes how metadata for fonts / font collections should be structured. - - - Font packages can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml. - - - Font metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that. - -
- -
- Example file - - A minimal font metainfo file can look like this: - - - - - LinuxLibertine.font - CC0 - Linux Libertine - Linux Libertine fonts - - Linux Libertine O - Linux Libertine Mono - -]]> -
- -
- File specification - - Note that the XML root must have the type property set to font. - This clearly identified this metainfo document as describing a font. - - - - - <id/> - - - For fonts, the %{id} must be the name of the font or font bundle without whitespaces, and must be suffixed - with .font. - - - - - - <metadata_license/> - - - The <metadata_license/> tag is required. See for a description of this tag. - - - - - - <name/> - - - Set a name for your font or font collection. - - - - - - <summary/> - - - A short description of the font described in this metainfo file. - - - - - - <description/> - - - Add a long description of your font. Some rules apply (will soon be split out to a "description guidelines" section). - - - Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time. - - - See the generic component for a detailed description of this tag. - - - - - - <screenshots/> - - - A screenshot presents your font to the outside world. - - - If the font metadata does not define an own screenshot, the AppStream generator is supposed to render one or multiple - sample images using the respective font. - - - See the generic component for a detailed description of this tag. - - - - - - <url/> - - - This is a recommended tag for links of type homepage. - Links of type homepage should be a link to the upstream homepage for the application. - See the generic component for a description of this tag. - - - - - - <provides/> ↪ <font/> - - - This tag is described in detail for generic components at . - - - You should add one or more children of type <font/> to make the font filenames and names known to the system. - If this tag is not present, the name and id tag values can be used by the - distribution's AppStream-generator to recreate this tag. - - - - - - - For a component of type font, the following tags are required and must be present: , , - , . - - -
-
diff -Nru appstream-0.9.4/docs/sources/metaspecs/inputmethoddata.xml appstream-0.12.0/docs/sources/metaspecs/inputmethoddata.xml --- appstream-0.9.4/docs/sources/metaspecs/inputmethoddata.xml 2016-04-11 22:18:45.000000000 +0000 +++ appstream-0.12.0/docs/sources/metaspecs/inputmethoddata.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,150 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Input Methods - -
- Introduction - - It is a nice feature for a software center to allows users the installation of additional input-methods. - This meta-info specification describes how metadata about input-methods should be structured. - - - Software components providing an input-method can ship one or more files in - /usr/share/metainfo/%{id}.metainfo.xml. - - - Input-method metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that. - -
- -
- Example file - - The input-method meta-info file should look like this: - - - - - mathwriter-ibus.db - CC0 - Mathwriter - Math symbols input method - -

- The input method is designed for entering mathematical symbols. -

-

- Input methods are typing systems allowing users to input complex languages. - They are necessary because these contain too many characters to simply be laid - out on a traditional keyboard. -

-
- https://github.com/mike-fabian/ibus-table-others -
]]>
-
- -
- File specification - - Note that the XML root must have the type property set to inputmethod. - This clearly identified this metainfo document as describing an input-method instead of a generic software-component. - - - - - <id/> - - - For input-methods, the %{id} is the same name as the input-method's database filename. - - - - - - <metadata_license/> - - - The <metadata_license/> tag is required. See for a description of this tag. - - - - - - <name/> - - - Set a name for your input-method. - - - - - - <summary/> - - - A short description of the input-method described in this metainfo file. - - - - - - <description/> - - - Add a long description of the input-method. - - - Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time. - - - - - - <screenshots/> - - - A screenshot may be included, showing the input-method in use in an application. - - - Refer to for a detailed description of this tag. - - - - - - <url/> - - - This is a recommended tag for links of type homepage. - Links of type homepage should be a link to the upstream homepage for the application. - See See for a description of this tag. - - - - - - <provides/> - - - This tag is described for generic components at in detail. - - - You can add one or more children of type <library/> in case you publish some additional shared libraries. - If not, and there are no public binaries involved, you may omit the provides tag for input-methods. - - - - - - - For a component of type inputmethod, the following tags are required and must be present: - , , - , . - -
-
diff -Nru appstream-0.9.4/docs/sources/metaspecs/MetaInfo.xml appstream-0.12.0/docs/sources/metaspecs/MetaInfo.xml --- appstream-0.9.4/docs/sources/metaspecs/MetaInfo.xml 2016-01-07 16:11:54.000000000 +0000 +++ appstream-0.12.0/docs/sources/metaspecs/MetaInfo.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - -%BOOK_ENTITIES; -]> - - Upstream Metadata - - AppStream allows upstream projects to define metadata about the components they provide using small XML files, - metainfo files, which get installed into locations on the client system and are used by distribuors to enhance their - metadata. - - - A "component" is a piece of software, like an application, a library, a font or a codec. For several components, especially - those which are shown in software-centers, we provide specialized metainfo files to define specific properties and data of these components. - For example, applications and fonts support screenshots, while codecs don't. - - - All metainfo files need to contain a minimal amount of information, defined in the "Generic Component" section, which also describes some optional - elements which can be used. - Specialized components might require more information to be complete and valid. - - - - - - - - - - - diff -Nru appstream-0.9.4/docs/sources/Project_Desc.xml appstream-0.12.0/docs/sources/Project_Desc.xml --- appstream-0.9.4/docs/sources/Project_Desc.xml 2016-04-12 14:17:01.000000000 +0000 +++ appstream-0.12.0/docs/sources/Project_Desc.xml 2018-04-04 15:53:56.000000000 +0000 @@ -10,7 +10,7 @@ What is AppStream? - AppStream is a cross-distro effort for ehnacing the metadata available about software components in the Linux and free-software ecosystem. + AppStream is a cross-distro effort for enhancing the metadata available about software components in the Linux and free-software ecosystem. One of the project's goals is to make building software-center applications possible, and make interaction with the package sources of a distribution smarter. AppStream provides specifications for meta-information which is shipped by upstream projects and can be consumed by other software. @@ -22,12 +22,10 @@ Distributors provide metadata as well, which describes all components available in a software repository. That data is composed of the upstream-metainfo and some other sources. AppStream also provides specifications for things like a screenshot-service, application ratings & reviews etc. - All AppStream distro-repository data is stored in a Xapian database, which then contains information about all available components in the distribution's - software repositories. - All parts of AppStream are distro-agnostic (with exception to some metadata which is used to generate the Xapian application cache), and therefore - AppStream makes it possible to build distro-agnostic application management tools. + All parts of AppStream are distribution-agnostic, and therefore it is easily possible to build software management tools with it that work + on any distribution implementing the AppStream specification.
diff -Nru appstream-0.9.4/docs/sources/quickstart/addons.xml appstream-0.12.0/docs/sources/quickstart/addons.xml --- appstream-0.9.4/docs/sources/quickstart/addons.xml 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/sources/quickstart/addons.xml 2018-04-04 15:53:56.000000000 +0000 @@ -36,7 +36,7 @@ Metadata file contents This is a list of tags you might want to define for your application. For a full list of possible tags, take a look at - the definition of a generic component () and an addon-component (). + the definition of a generic component () and an addon component (). diff -Nru appstream-0.9.4/docs/sources/quickstart/buildsystems.xml appstream-0.12.0/docs/sources/quickstart/buildsystems.xml --- appstream-0.9.4/docs/sources/quickstart/buildsystems.xml 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/sources/quickstart/buildsystems.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Integrating with Buildsystems - -
- Introduction - - Most projectis are using different buildsyste,. This page containst some practical instructions how to integrate AppStream metadata with them. - -
- -
- Integrating with Autotools (appstream way) - - You should add some things to Makefile.am. - - - Highly recommended to do all AppStream files localized. - - - - - - - Changes to Makefile.am - - - Add this strings to Makefile.am in directory with AppStream metadata. - - - - - - If you using Intltool, take a look how to translate AppStream with Autotools - - - - - -
- -
- Integrating with Autotools (appstream-glib way) - - - You should add some things to configure.ac and Makefile.am. You need libappstream-glib installed. - - - Highly recommended to do all AppStream files localized. - - - - - - - - Changes to configure.ac - - - - - - - - - Changes to Makefile.am - - - Add this strings to Makefile.am in directory with AppStream metadata. - - - - - - If you using Intltool, take a look how to translate AppStream with Autotools - - - - - - -
-
diff -Nru appstream-0.9.4/docs/sources/quickstart/desktop-apps.xml appstream-0.12.0/docs/sources/quickstart/desktop-apps.xml --- appstream-0.9.4/docs/sources/quickstart/desktop-apps.xml 2016-01-21 20:58:44.000000000 +0000 +++ appstream-0.12.0/docs/sources/quickstart/desktop-apps.xml 2018-04-04 15:53:56.000000000 +0000 @@ -21,12 +21,12 @@ To solve this, we have defined a new data file, which the upstream project can optionally translate using the same technique as Desktop files or GSetting schemas. - The AppData specification is a subset of the AppStream metadata (see ) and extends + The AppData specification is a subset of the AppStream metadata (see ) and extends the generic component metadata with fields specific for applications (see ). The AppData files override any values which are automatically fetched by the AppStream data generator. - Applications can ship one or more files in /usr/share/appdata/%{id}.appdata.xml. + Applications can ship one or more files in /usr/share/metainfo/%{id}.appdata.xml. AppData files can - just like all other metainfo files - be translated. See the section about translation for more information about that. @@ -47,9 +47,9 @@ - - gnome-power-statistics.desktop - CC0 + + org.gnome.gnome-power-statistics + FSFAP GPL-2.0+ Power Statistics Observe power management @@ -71,13 +71,15 @@

+ org.gnome.gnome-power-statistics.desktop + The options dialog - http://www.hughsie.com/en_US/main.png + http://www.hughsie.com/en_US/main.png - http://www.hughsie.com/en_US/preferences.png + http://www.hughsie.com/en_US/preferences.png @@ -112,7 +114,12 @@ <id/> - For applications, the <id/> tag value must be the same name as the installed .desktop file for the application. + The <id/> tag value contains the unique identifier for this application. It is usually modeled after the .desktop filename + and follows a reverse-DNS scheme. For the full naming guidelines see . + + + Example: If your application's .desktop file is named org.example.FooBar.desktop, a good component-id would be + org.example.FooBar. @@ -122,12 +129,20 @@ The <metadata_license/> tag is indicating the content license that you are releasing the one - metadata file as. This is not typically the same as the project license. By ommitting the license value would - probably mean your data would not be incorporated into the distribution metadata. - Permissible license codes include: + metainfo file under. This is not typically the same as the project license. Omitting the license value can result + in your data not being incorporated into the distribution metadata (so this is a required tag). + + + A permissive license ensures your data can + be combined with arbitrary other data in one file, without license conflics (this means copyleft licenses like the GPL are + not suitable as metadata license). + Possible license identifiers include: + FSFAP + + CC0-1.0 @@ -164,9 +179,13 @@ <name/> - While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. - You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. - In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this. + While this tag is always requited for a generic component, for an application metainfo file it is not necessary, but only recommended. + You can omit this tag if you want the software center to have the same strings as defined in the Name field + of the .desktop file. In that case, one tag must be present. + + + If no name tag and no Name field is present, the metadata + is considered invalid and might be ignored by the AppStream generator. @@ -175,9 +194,15 @@ <summary/> - While this tag is requited for a generic component, for an application metainfo file it is not necessary, but only recommended. - You can omit this tag if you want the software center to have the same strings as defined in the XDG desktop file. - In some cases it might be required to have a different name in the app-store, but most appdata.xml files will not need this. + While this tag is always requited for a generic component, for a desktop-application metainfo file it is only essential + if the accompanying .desktop file does not have a Comment= field. Data from a .desktop file is only + taken into consideration if one tag is present. + If the metainfo file has a summary, it wil override the value found in the Comment field of the + .desktop file. + + + If no summary tag and no Comment field is present, the metadata + is considered invalid and might be ignored by the AppStream generator. @@ -236,6 +261,24 @@ + + <launchable/> + + + This tag indicates a possible method to launch the software. Usually you want the application to be launchable by its .desktop file ID. + + + The tag makes it possible for software centers to offer launching an application immediately after installation. It also connects the metainfo file + with a .desktop file, so AppStream metadata generators and the distribution can absorb its metadata into the final AppStream output. + + + See for a detailed description of the tag. + Example: + + org.gnome.Sysprof2.desktop]]> + + + <screenshots/> @@ -245,7 +288,7 @@ The <screenshots/> tag contains multiple <screenshot/> children, where at least one of them must have the property type="default" to indicate the application's primary screenshot. Every <screenshot/> tag must have at least - one <image/> child, which should define the width and height of the referenced image in it's properties. + one <image/> child, which may define the width and height of the referenced image in it's properties. The value of the <image/> tag is a direct URL to a screenshot uploaded to a public location on the web. @@ -515,34 +558,35 @@ Suggested metadata file contents - You may choose to add these tags as well, if you need them. + It is useful to add these tags as well if they make sense for the described application. + They are not strictly required to be present though. - <provides/> + <releases/> - This tag is described in detail for generic components at . + The application metainfo may include one <releases/> tag, which + has one or multiple <release/> subnodes to define the version and release date of this + application. For details, see . - If your application ships a binary in a location in the default PATH, you should add at least a child of type - <binary/> to make that new executable known to the distribution. + It is very useful to attach short release-notes to a <release/> using the <description/> + subnode. These release-notes should contain brief information about what is new in the release, in a way which is understandable by non-technical users. - <releases/> + <provides/> - The application metainfo should at least provide one <releases/> tag, - which has one or more <release/> childs to define the version and release date of this - application. For details, see . + This tag is described in detail for generic components at . - Additionally, the <release/> might be described in a short manner using the <description/> child tag, which should give brief information about what is new - in the release, in a way which is understandable by non-technical users. + If your application ships a binary in a location in the default PATH, it is useful to add at least a child of type + <binary/> to make it easily possible to find your application's metadata using the name of its binary. diff -Nru appstream-0.9.4/docs/sources/quickstart/packaging.xml appstream-0.12.0/docs/sources/quickstart/packaging.xml --- appstream-0.9.4/docs/sources/quickstart/packaging.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/docs/sources/quickstart/packaging.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,38 @@ + + +%BOOK_ENTITIES; +]> + +
+ For distributors packaging Appstream metadata + +
+ Guidelines for distributors + + Distributors of projects with AppStream metadata perform an important role + by making the software available to more people. There are a few guidelines + distributors should follow in order for software centers to present + the correct information to users. + +
+ +
+ Guidelines for distributors + + A binary package that contains AppStream desktop metadata () + must also contain both the .desktop file for the application and the application itself. + + + A binary package must not contain more than one AppStream metadata file. The one exception is + that it is permissable for a binary package that is extended by addons to include those addons + () and their AppStream metadata files. Note that users + will be unable to remove those addons separately. + + + Except for the extended package, no other package may contain more than one Appstream addon metadata file. + + +
+ +
diff -Nru appstream-0.9.4/docs/sources/quickstart/Quickstart.xml appstream-0.12.0/docs/sources/quickstart/Quickstart.xml --- appstream-0.9.4/docs/sources/quickstart/Quickstart.xml 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/sources/quickstart/Quickstart.xml 2018-04-04 15:53:56.000000000 +0000 @@ -14,6 +14,7 @@ + diff -Nru appstream-0.9.4/docs/sources/quickstart/translation.xml appstream-0.12.0/docs/sources/quickstart/translation.xml --- appstream-0.9.4/docs/sources/quickstart/translation.xml 2016-02-28 03:51:08.000000000 +0000 +++ appstream-0.12.0/docs/sources/quickstart/translation.xml 2018-04-04 15:53:56.000000000 +0000 @@ -31,13 +31,35 @@
Each translatable element in the .xml.in file needs to be prefixed with an underscore (_) to be marked as translatable. - Apart from that, the same specifications apply to this file as for any other AppStream metadata. + This should include the name, summary, and caption tags, as well as each paragraph in the + description. Apart from that, the same specifications apply to this file as for any other AppStream metadata. - TODO: Fill in some generic examples how Intltool can be used. + To translate the appstream data, first add the .xml.in file to po/POTFILES.in, along with any other + translatable files. Then create the translation template file <package name>.pot. + ]]> + + + For each supported language, copy the template file to po/<language>-[<COUNTRY>].po, where + po/<language> and the optional po/<COUNTRY> are standard two-letter codes. + Edit the file to add translated strings. + + + + As the translatable content is updated, recreate the template file, and update the .po files. + + + ]]> + + + Create the translated .xml with the following command. + + + .xml.in .xml]]> +
Integrating with Autotools (the AppStream way) diff -Nru appstream-0.9.4/docs/sources/services/screenshots.xml appstream-0.12.0/docs/sources/services/screenshots.xml --- appstream-0.9.4/docs/sources/services/screenshots.xml 2015-09-08 02:18:16.000000000 +0000 +++ appstream-0.12.0/docs/sources/services/screenshots.xml 2018-04-04 15:53:56.000000000 +0000 @@ -27,7 +27,7 @@ file of libappstream, whis is usually located at /etc/appstream.conf. - The screenshot data will be inserted transparently into AsScreenshot, if + The screenshot data will be inserted transparently into AsScreenshot, if the distributor has set the configuration flag. Authors of software-centers don't need to take care of this implementation detail. diff -Nru appstream-0.9.4/docs/sources/services/urlhandler.xml appstream-0.12.0/docs/sources/services/urlhandler.xml --- appstream-0.9.4/docs/sources/services/urlhandler.xml 2015-11-04 19:58:56.000000000 +0000 +++ appstream-0.12.0/docs/sources/services/urlhandler.xml 2018-04-04 15:53:56.000000000 +0000 @@ -25,13 +25,41 @@ Software-centers handling appstream:// URLs must provide a handler for the x-scheme-handler/appstream mimetype. - An AppStream URL follows the schema appstream://%{component-id}. + An AppStream URL follows the schema appstream:%{component-id}. Example HTML code: - Install KDE Discover -Install GNOME-Software -Install libappstream]]> + Install KDE Discover +Install GNOME-Software +Install libappstream]]> +
+ +
+ AppStream Buttons + + If you want to allow users to open your software in their local software center from your website, you might want to use + one of the easily recognizable AppStream buttons for your appstream: link. + + + + + + + + SVG + + + + + + + + + + SVG + + +
diff -Nru appstream-0.9.4/meson.build appstream-0.12.0/meson.build --- appstream-0.9.4/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,107 @@ +project('AppStream', 'c', + meson_version: '>=0.42', + default_options: ['c_std=gnu11', 'cpp_std=gnu++14'], + + license: 'LGPL-2.1+ and GPL-2.0+', + version: '0.12.0', +) + +ccompiler = meson.get_compiler('c') +source_root = meson.source_root() + +as_version = meson.project_version() +as_api_level = '4' + +# +# Configure files +# +conf = configuration_data() +conf.set_quoted('PACKAGE_VERSION', as_version) +conf.set_quoted('GETTEXT_PACKAGE', 'appstream') +conf.set_quoted('LOCALEDIR', get_option('localedir')) +conf.set_quoted('LOCALSTATEDIR', get_option('localstatedir')) + +if get_option('apt-support') + conf.set('HAVE_APT_SUPPORT', 1) +endif +if get_option('stemming') + conf.set('HAVE_STEMMING', 1) +endif + +configure_file(output: 'config.h', configuration: conf) + +# +# Custom C flags +# +sanitizer_libs = [] +if get_option('maintainer') + maintainer_c_args = ['-Werror', + '-Wall', + '-Wextra', + '-Wcast-align', + '-Wno-uninitialized', + '-Wempty-body', + '-Wformat-security', + '-Winit-self', + '-Wnull-dereference', + '-Wfloat-equal', + #'-Wformat-signedness', + '-Winline' + ] + add_global_arguments(maintainer_c_args, language: 'c') + add_global_arguments(maintainer_c_args, language: 'cpp') +endif + +# a few compiler warning flags we always want enabled +add_global_arguments('-Werror=implicit-function-declaration', '-Wno-unused-parameter', language: 'c') +add_global_arguments('-Werror=implicit-function-declaration', '-Wno-unused-parameter', language: 'cpp') +add_global_arguments('-DAS_COMPILATION', language : 'c') + +# +# Dependencies +# +glib_dep = dependency('glib-2.0', version : '>=2.46') +gobject_dep = dependency('gobject-2.0', version : '>=2.46') +gio_dep = dependency('gio-2.0', version : '>=2.46') +gio_unix_dep = dependency('gio-unix-2.0', version : '>=2.46') +xml2_dep = dependency('libxml-2.0') +yaml_dep = dependency('yaml-0.1') + +if get_option ('gir') + # ensure we have a version of GIR that isn't broken with Meson + # (prior versions failed when any non-GObject library was linked) + dependency('gobject-introspection-1.0', version: '>=1.54') +endif + +stemmer_inc_dirs = include_directories(['/usr/include']) +if get_option('stemming') + stemmer_lib = ccompiler.find_library('stemmer', required: true) + if not ccompiler.has_header('libstemmer.h') + if ccompiler.has_header('libstemmer/libstemmer.h') + stemmer_inc_dirs = include_directories('/usr/include/libstemmer') + else + error('Unable to find Snowball header "libstemmer.h". Please ensure libstemmer/Snowball is installed properly in order to continue.') + endif + endif +endif + +# +# Modules +# +glib = import('gnome') +i18n = import('i18n') +pkgc = import('pkgconfig') + +# +# Directories +# +subdir('src/') +subdir('tools/') +subdir('data/') +subdir('contrib/') +subdir('po/') +subdir('docs/') +subdir('tests/') +if get_option('qt') + subdir('qt/') +endif diff -Nru appstream-0.9.4/meson_options.txt appstream-0.12.0/meson_options.txt --- appstream-0.9.4/meson_options.txt 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/meson_options.txt 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,44 @@ +option('stemming', + type : 'boolean', + value : true, + description : 'Use stemming while searching. Requires Snowball (libstemmer)' +) +option('vapi', + type : 'boolean', + value : false, + description : 'Create and install a Vala API file. Requires "gir" to be enabled as well' +) +option('qt', + type : 'boolean', + value : false, + description : 'Build libappstream-qt' +) +option('docs', + type : 'boolean', + value : false, + description : 'Build documentation for API and specification' +) +option('apidocs', + type : 'boolean', + value : true, + description : 'Build API documentation (automatically enabled when "-Ddocs=true" is passed)' +) +option('apt-support', + type : 'boolean', + value : false, + description : 'Enable integration with APT on Debian' +) +option('gir', + type : 'boolean', + value : true, + description : 'Build introspection data' +) + +# +# For development +# +option('maintainer', + type : 'boolean', + value : false, + description : 'Enable maintainer mode (use strict compiler flags, e.g. -Werror)' +) diff -Nru appstream-0.9.4/NEWS appstream-0.12.0/NEWS --- appstream-0.9.4/NEWS 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/NEWS 2018-04-04 15:53:56.000000000 +0000 @@ -1,3 +1,885 @@ +Version 0.12.0 +~~~~~~~~~~~~~~ +Released: 2018-04-04 + +Features: + * Implement release types (Matthias Klumpp) + * qt: Support release types (Matthias Klumpp) + * Update static data lists (Matthias Klumpp) + * Make as_str_replace use as_gstring_replace internally (Matthias Klumpp) + * spdx: Add some compatibility workarounds for SPDX 3.0 (Matthias Klumpp) + * validator: Validate SPDX license expressions for metadata_license (Matthias Klumpp) + * apt: Add config snippets to enable icon downloads (Matthias Klumpp) + * yaml: Ensure all string values have whitespaces stripped (Matthias Klumpp) + * Make as_component_get_launchables public API (Matthias Klumpp) + * Implement support for requires/recommends (Matthias Klumpp) + * Add recommends/requires data to the cache (Matthias Klumpp) + * Add a quick way to check if a version satisfies an AsRelation requirement (Matthias Klumpp) + * ascli: Properly document the --no-net flag (Matthias Klumpp) + * ascli: Allow to disable network acces via an environment variable (Matthias Klumpp) + * apt: Support 48x48px icons (Matthias Klumpp) + * yaml: Make Requires/Recommends data more compact and easier to emit (Matthias Klumpp) + * validator: Validate requires/recommends tags (Matthias Klumpp) + * Default to format version 0.12 (Matthias Klumpp) + +Specification: + * spec: Add a "type" property to tag. (Jehan) + * spec: Initial draft for requires/recommends (Matthias Klumpp) + * spec: Document the YAML Rquires/Recommends fields (Matthias Klumpp) + * spec: Clarify that the memory requirement uses MiB as unit (Matthias Klumpp) + +Bugfixes: + * qt: Implement missing constructors (Aleix Pol) + * apt: escape the icon scale factor as it is using the arobase character (Corentin Noël) + * Check plain language string in as_component_localized_get as well (Antonio Rojas) + * qt: Define location and soname for all configurations, not just Debug (Gabriel Souza Franco) + * Never override high-quality data with incomplete .desktop data (Matthias Klumpp) + * Make data update script work with recent SPDX (Matthias Klumpp) + * Add a timeout to URL validity checks (Matthias Klumpp) + +Translation: + * Ukrainian + - AB + - Yuri Chornoivan + * Norwegian Bokmål + - Allan Nordhøy + * Swedish + - Anders Jonsson + * Indonesian + - Andika Triwidada + - se7entime + * German + - Andreas Kleinert + * Hungarian + - Balázs Meskó + - Balázs Úr + * Chinese (Traditional) + - Chang-Chia Tseng + * Russian + - Igor + * Finnish + - Juhani Numminen + * Korean + - Jung-Kyu Park + * Portuguese (Brazil) + - Luiz Fernando Ranghetti + - Rafael Fontenelle + - Rafael Henrique Mendes de Oliv + * Slovak + - Matúš Baňas + * Arabic + - Michal Čihař + - Mutaz Tayyeb AbuSaad + * Italian + - Milo Casagrande + * Lithuanian + - Moo + * Czech + - Pavel Borecki + * Polish + - Piotr Drąg + * Catalan + - Robert Antoni Buj Gelonch + +Version 0.11.8 +~~~~~~~~~~~~~~ +Released: 2018-01-22 + +Features: + * validator: Emit a hint in case a discouraged AppStream ID style is used (Matthias Klumpp) + * l10n: Renamed Norwegian Bokmål language file (Matthias Klumpp) + +Specification: + * docs: Add quickstart instructions for intltool (David Steele) + * spec: Discourage use of hyphens and digit-started segments for IDs (Matthias Klumpp) + +Bugfixes: + * qt: Export the AppStreamQt target (Aleix Pol) + * Various string improvements (Allan Nordhøy) + * validator: Don't make HEAD requests for URL checks, fetch first byte instead (Matthias Klumpp) + * Enforce a non-broken version of gobject-introspection (Matthias Klumpp) + * Ensure LINGUAS update is only run explicitly (Matthias Klumpp) + * Fix a minor memory and fd leak (Matthias Klumpp) + +Translation: + * Norwegian Bokmål + - Allan Nordhøy + - Petter Reinholdtsen + * Swedish + - Anders Jonsson + - Allan Nordhøy + * German + - Andreas Kleinert + * Chinese (Traditional) + - Chang-Chia Tseng + * Chinese (Simplified) + - Dingzhong Chen + * French + - Emmanuel Gil Peyrot + - Yvan Masson + * Dutch + - Heimen Stoffels + * Russian + - Igor + * Slovak + - Martina Tatranská + * Italian + - Milo Casagrande + * Czech + - Pavel Borecki + * Polish + - Piotr Drąg + * Ukrainian + - Yuri Chornoivan + +Version 0.11.7 +~~~~~~~~~~~~~~ +Released: 2017-10-22 + +Notes: + * The appstreamcli validation commands now use curl if it is available to check all + URLs in the metadata for existence. + If you don't want this behavior, pass "--nonet" to appstreamcli. There might also + be false positives (one is known with the KDE bugtracker) that need to be investigated, + so feedback on this new feature is welcome. + +Features: + * validator: Check all urls for validity (Matthias Klumpp) + * validator: Check web-application components for missing tags (Matthias Klumpp) + * Add API to retrieve the AppStream library version (Matthias Klumpp) + * apt: Allow fetching 128x128@2 HiDPI icons (Rico Tzschichholz) + +Specification: + * Add the "url" launchable type (Dimitrios Christidis) + * spec: Clarify some icon details in the collection data (Marius Vollmer) + * spec: Allow tags in generic components (Marius Vollmer) + * spec: Specify the web-application component type (Matthias Klumpp) + +Bugfixes: + * Fix endless loop when validating screenshots (Matthias Klumpp) + * ascli: Show a list of component-types when --help is passed to new-template (Matthias Klumpp) + * validator: Drop the wget fallback, making missing curl only an info (Matthias Klumpp) + * meson: Properly define header-file in gir (Rico Tzschichholz) + +Translation: + * Norwegian Bokmål [new!] + - Allan Nordhøy + * Swedish + - Anders Jonsson + * German + - Andreas Kleinert + * Chinese (Traditional) + - Chang-Chia Tseng + * Dutch + - Heimen Stoffels + * Italian + - Milo Casagrande + * Czech + - Pavel Borecki + * Polish + - Piotr Drąg + * Ukrainian + - Yuri Chornoivan + +Version 0.11.6 +~~~~~~~~~~~~~~ +Released: 2017-10-02 + +Features: + * Improve screenshot validation (Matthias Klumpp) + * Allow to disable introspection (Matthias Klumpp) + +Bugfixes: + * Revert back to the old build option names (Matthias Klumpp) + * Apply maintainer flags equally to C++ and C (Matthias Klumpp) + * Explicitly set C/C++ standard versions (Matthias Klumpp) + * vapi: Include the right header (Matthias Klumpp) + * xml: Correctly write screenshots tag again (Matthias Klumpp) + * Do not cache a screenshot that doesn't have images (Matthias Klumpp) + * xml: Support legacy screenshot tags again (Matthias Klumpp) + +Translation: + * Swedish + - Anders Jonsson + * Portuguese (Brazil) + - Davi da Silva Böger + - Rafael Fontenelle + +Version 0.11.5 +~~~~~~~~~~~~~~ +Released: 2017-09-04 + +Features: + * Restructure build feature flags (Matthias Klumpp) + * Allow disabling API documentation build (Matthias Klumpp) + +Bugfixes: + * qt: Don't check bitness when finding AppStreamQt (Matthias Klumpp) + +Translation: + * Indonesian + - se7entime + +Version 0.11.4 +~~~~~~~~~~~~~~ +Released: 2017-08-30 + +Notes: + * This release switches the build system from CMake to Meson. You will need + Meson (>= 0.42) in order to build AppStream. Please test for any regressions. + +Features: + * Implement Meson support (Matthias Klumpp) + * meson: Make build with sanitizers (partially) work again (Matthias Klumpp) + * meson: Add helper script for building documentation (Matthias Klumpp) + * docs: Always rebuild documentation on-demand (Matthias Klumpp) + * Update README for Meson (Matthias Klumpp) + * Implement cockpit-manifest launchable type (Matthias Klumpp) + * validator: Actually validate the type property of "launchable" tags (Matthias Klumpp) + * Allow to search the pool for components that provide a launchable (Matthias Klumpp) + * qt: Add new function to search components by launchable (Matthias Klumpp) + +Specification: + * spec: New "cockpit-manifest" launchable type (Marius Vollmer) + +Bugfixes: + * validator: Complain if a component has no ID (Matthias Klumpp) + +Translation: + * Chinese (Traditional) + - Chang-Chia Tseng + * Polish + - Piotr Drąg + +Version 0.11.3 +~~~~~~~~~~~~~~ +Released: 2017-08-04 + +Bugfixes: + * qt: Don't crash when an error is found and no error string is passed (Aleix Pol) + * Propagate document context to the context object for XML files (Matthias Klumpp) + * validator: Correctly recognize "launchable" as valid tag (Matthias Klumpp) + +Translation: + * Swedish + - Anders Jonsson + * Czech + - Pavel Borecki + * Catalan + - Robert Antoni Buj Gelonch + +Version 0.11.2 +~~~~~~~~~~~~~~ +Released: 2017-07-18 + +Features: + * cache: Refactor cache functions (Matthias Klumpp) + * Deduplicate origin/locale/arch with AsContext (Matthias Klumpp) + * Get rid of a couple of internal helper methods (Matthias Klumpp) + * cli: When using convert, always assume collection style for YAML (Matthias Klumpp) + +Specification: + * Adjust docs to clearly state that licenses are SPDX expressions (Harald Sitter) + +Bugfixes: + * qt: Improve Icon QDebug information (Aleix Pol) + * Resolve crash when serializing lots of XML documents (Matthias Klumpp) + * xml: Don't truncate translated entries after encounting a wrong locale (Matthias Klumpp) + * Set a real locale if locale is set to "ALL" (Matthias Klumpp) + * validator: Make ending dot in component name only a pedantic issue (Matthias Klumpp) + + +Translation: + * Arabic + - Heba ahmed + * Russian + - Igor + * Italian + - Milo Casagrande + * Lithuanian + - Moo + * Spanish + - Piotr Drąg + +Version 0.11.1 +~~~~~~~~~~~~~~ +Released: 2017-07-02 + +Notes: + * This release contains refactoring of the XML/YAML parsers and some other changes that are more invasive + than usual. + +Features: + * qt: Add new getters/setters and classes to be on par with the GObject library (Jan Grulich) + * qt: Add AS::Metadata class used for parsing desktop and appstream metadata files (Jan Grulich) + * Refactor the XML parser and serialization code (Matthias Klumpp) + * Refactor the YAML parser and emitter code (Matthias Klumpp) + * Implement 'service' component type (Matthias Klumpp) + * Improve speed of metainfo description parsing slightly (Matthias Klumpp) + * test: Add additional testcase for reading metainfo description tags (Matthias Klumpp) + * test: Test metainfo descriptions starting with enumerations (Matthias Klumpp) + +Specification: + * doc: Add Distro Packaging page (Jeremy Bicha) + * doc: Add "service" components and their launchables (Marius Vollmer) + * Allow components to provide other components (provides -> id) (Matthias Klumpp) + +Bugfixes: + * doc: Uncomment line in middle of paragraph (Jeremy Bicha) + * doc: A releases tag is not essential for components, but summary is (Matthias Klumpp) + * Allow descriptions to start with an enumeration (Matthias Klumpp) + * Ensure we always update with fresh data when refreshing the cache (Matthias Klumpp) + * Replace invalid components in the pool with new ones of the same name (Matthias Klumpp) + * Resolve a few potential bugs (found by static checks) (Matthias Klumpp) + * xml: Check if we are trying to parse a real component (Matthias Klumpp) + +Translation: + * Spanish + - Adolfo Jayme-Barrientos + * Hungarian + - Balázs Úr + * Dutch + - Heimen Stoffels + * Russian + - Igor + * French + - Jean-Baptiste + * Lithuanian + - Moo + * Czech + - Pavel Borecki + * Polish + - Piotr Drąg + * Ukrainian + - Yuri Chornoivan + * Serbian (latin) + - Слободан Симић(Slobodan Simić) + +Version 0.11.0 +~~~~~~~~~~~~~~ +Released: 2017-05-03 + +Features: + * Implement read/write support for content ratings (Matthias Klumpp) + * tests: Test the content_rating tag XML read/write (Matthias Klumpp) + * yaml: Read/write ContentRating (Matthias Klumpp) + * cache: Handle the content-rating property (Matthias Klumpp) + * Add new AsLaunch type (Matthias Klumpp) + * Fully implement the launchable tag (Matthias Klumpp) + * Recognize scaling factor for HiDPI icons (Matthias Klumpp) + * apt: Allow fetching HiDPI icons (Matthias Klumpp) + +Specification: + * spec: Don't give wrong information about the tag (Matthias Klumpp) + * spec: Specify content_rating tag for content age ratings (Matthias Klumpp) + * spec: Specify the new launchable tag and apply its effects (Matthias Klumpp) + * spec: Add note on where to place icons with a scaling factor (Matthias Klumpp) + +Bugfixes: + * Add missing word in string (Anders Jonsson) + * yaml: Fix crash when serializing component with a dbus:user provided item (Matthias Klumpp) + * cache: Don't write cache if there are no valid components (Matthias Klumpp) + * docs: Clarify "permissive" for metadata_license and make the paragraph more explicit (Matthias Klumpp) + * Ensure GVFS never starts in root user slice (Matthias Klumpp) + * Correctly tokenize values with dash or plus (Matthias Klumpp) + * vapi: Add appstream.deps file (Rico Tzschichholz) + +Translation: + * Swedish + - Anders Jonsson + - Josef + * Indonesian + - Andika Triwidada + * Chinese (Traditional) + - Chang-Chia Tseng + * Chinese (China) + - Dingzhong Chen + - 陈鼎中 + * Gaelic + - GunChleoc + * Dutch + - Heimen Stoffels + * Russian + - Igor + - Maxim Taranov + * French + - Jean-Baptiste + * Italian + - Milo Casagrande + * Lithuanian + - Moo + * Turkish + - Muhammet Kara + * Polish + - Piotr Drąg + * Ukrainian + - Yuri Chornoivan + * Serbian + - Slobodan Simić + +Version 0.10.6 +~~~~~~~~~~~~~~ +Released: 2017-01-22 + +Features: + * validator: Be more strict about the tag types in metainfo files (Matthias Klumpp) + * validator: Unconditionally check for name and summary (Matthias Klumpp) + * Move all merge logic to AsComponent (Matthias Klumpp) + * Allow making AppStream consume data from metainfo instead of collection files (Matthias Klumpp) + * apt: Do not enable any icon downloads by default (Matthias Klumpp) + * validator: Check categories in XML as well (Matthias Klumpp) + * cli: Make templates for different component-types a bit more useful (Matthias Klumpp) + * Allow a few more permissive licenses for metadata_license (Matthias Klumpp) + * Add support for "+" operator at the end of SPDX license identifiers (Kalev Lember, Matthias Klumpp) + * cli: Print tiny summary after validation (very useful for validate-tree) (Matthias Klumpp) + * validator: Validate for hyperlinks in description / summary / developer-name (Matthias Klumpp) + * validator: Make missing long description a pedantic issue in more cases (Matthias Klumpp) + * Also recognize "FSFUL" license as pemissive (Matthias Klumpp) + * validator: Adjust priorities of missing modalias/font tags in driver/font components (Matthias Klumpp) + * Skip loading desktop-entries if we know their component already (Matthias Klumpp) + * Be lazier, only parse what is necessary in the data pool (Matthias Klumpp) + +Specification: + * spec: Clarify that name/summary are now always required for metainfo files (Matthias Klumpp) + * spec: Clarify desktop vs. desktop-application (Matthias Klumpp) + * spec: Add a small paragraph about whether and what xmlns to use (Matthias Klumpp) + * spec: Make it clear can be used in metainfo files too (Matthias Klumpp) + * spec: Make clear that update_contact's value is case-insensitive (Matthias Klumpp) + * docs: Make sure all examples follow the reverse-DNS scheme (Matthias Klumpp) + +Bugfixes: + * Don't hardcode share dir but use CMAKE_INSTALL.. (Heiko Becker) + * validator: Don't enforce .desktop suffix on desktop-app component IDs (Matthias Klumpp) + * qt: Allow catching error strings returned by Pool::load (Aleix Pol) + * Always drop data from desktop-entry files if we have better metadata (Matthias Klumpp) + * apt: Install icons back if they went completely missing (Matthias Klumpp) + * Update SPDX and TLD data (Matthias Klumpp) + * yaml: Read release/urgency key (Matthias Klumpp) + +Translation: + * Chinese (Taiwan) + - Chang-Chia Tseng + * Dutch (new!) + - Heimen Stoffels + * Russian + - Igor + * Finnish + - Juhani Numminen + - Lari Oesch + * Portuguese + - Manuela Silva + * Italian + - Milo Casagrande + * Czech + - Pavel Borecki + * Polish + - Piotr Drąg + * Ukrainian + - Yuri Chornoivan + * French + - Yvan Masson + +Version 0.10.5 +~~~~~~~~~~~~~~ +Released: 2016-12-22 + +Features: + * Match modalias wildcards on regular searches (Matthias Klumpp) + * xml: Add methods to get/set custom data in metainfo/collection files (Matthias Klumpp) + * Make cache update issue messages slightly more verbose (Matthias Klumpp) + * Add preliminary code for reading metainfo files in addition to .desktop files (Matthias Klumpp) + * cache: Cache custom fields as well (Matthias Klumpp) + +Bugfixes: + * qt: Make sure dependencies are fetched when looking for the package (Aleix Pol) + * yaml: Consistently read/write the Suggests field (Matthias Klumpp) + * Correctly read bundle kind from XML data (Matthias Klumpp) + +Translation: + * Russian + - Igor + * German + - Lukas Selch + * Italian + - Milo Casagrande + * Turkish + - Muhammet Kara + * Polish + - Piotr Drąg + * Ukrainian + - Yuri Chornoivan + * Portuguese (Brazil) + - dsboger + +Version 0.10.4 +~~~~~~~~~~~~~~ +Released: 2016-11-27 + +Features: + * qt: Introduce AppStream::Suggested in the Qt frontend (Aleix Pol) + +Bugfixes: + * Properly validate suggests tag (Matthias Klumpp) + * qt: Add an empty check to Provided and return it if necessary (Matthias Klumpp) + * Add path search to find libstemmer headers (#91) (Neal Gompa) + +Translation: + * Indonesian + - John Vandenberg + - Prasasto Adi + - Sandy Kurniawan + * English (United Kingdom) + - John Vandenberg + * Lithuanian + - Moo + +Version 0.10.3 +~~~~~~~~~~~~~~ +Released: 2016-11-01 + +Notes: + * The release breaks the Qt library API. Patches to make KDE Discover use the new API exist + in its Git master branch, and will be available with Plasma 5.9. + The patches will likely not enter the stable branch, so if you want to upgrade AppStream, + you might need to ship patches for Discover downstream to use the new API. + +Features: + * qt: Update API to reflect more recent AppStream features, be easier to + extend and also a bit faster due to removing needless data conversions. + (Matthias Klumpp, Aleix Pol) + * Make components record their origin kind internally (Matthias Klumpp) + * Provide a file:/ URL for icons when we know a file name (Matthias Klumpp) + * Add support for Snappy/Snap bundles (Matthias Klumpp) + +Specification: + * Add new AppStream logo and button (Ken Vermette) + * Add new AppStream logo and buttons to the docs (Matthias Klumpp) + +Bugfixes: + * ascli: When converting, always include all translations (Matthias Klumpp) + * Match .desktop files and metainfo data properly if ID is lacking .desktop suffix (Matthias Klumpp) + +Translation: + * Chinese (Taiwan) + - Mingye Wang + * Chinese (China) + - Mingye Wang + * English (United Kingdom) + - Sandy Kurniawan + * Indonesian + - Sandy Kurniawan + +Version 0.10.2 +~~~~~~~~~~~~~~ +Released: 2016-10-10 + +Features: + * test: Add unittests for reading urls (Matthias Klumpp) + * qt: Add AppStream::Category class (Matthias Klumpp) + * qt: Add missing URL type (Matthias Klumpp) + * Handle "font" provided type in XML and YAML (Matthias Klumpp) + * Replace Intltool with modern Gettext/Itstool (Matthias Klumpp) + * Add logic to parse desktop entries (Matthias Klumpp) + * Don't add ignored components to the pool (Matthias Klumpp) + * validator: Validate fd.o domain name, make GNOME warning only pedantic (Matthias Klumpp) + * validator: Allow languages tag in metainfo files (Matthias Klumpp) + * Read information from .desktop files and add it to the pool (Matthias Klumpp) + * Give the client app full control on what data sources we load (Matthias Klumpp) + * Add private API for component scoping (Matthias Klumpp) + +Specification: + * docs: Clarify name/summary essentialness for desktop-apps (Matthias Klumpp) + * spec: Clarify how fonts provides should be handled (Matthias Klumpp) + * spec: Simplify font metainfo, add more examples and clarify requirements (Matthias Klumpp) + +Bugfixes: + * ascli: Replace refresh-index with refresh-cache in help text (#81) (Larry Price) + * qt: nullptr access on unopened databases resulting in a crash (Harald Sitter) + * qt: The data pool must always be valid during the Database lifetime (Matthias Klumpp) + * If search results are going to be sorted, it makes sense for higher scores to be at the top of the list. Fixes #77. (Larry Price) + * validator: Don't enforce long descriptions on fonts (Matthias Klumpp) + * Hardcode metainfo directory (Matthias Klumpp) + * ascli: Make every module use the global no-color flag properly (Matthias Klumpp) + * validator: Don't emit excess warnings on missing type properties (Matthias Klumpp) + +Translation: + * Hungarian + - Balázs Úr + * German + - James Bond + * Italian + - Milo Casagrande + * Lithuanian (new!) + - Moo + * Polish + - Piotr Drąg + * Portuguese (Brazil) + - Rafael Capaci Pereira + * Ukrainian + - Yuri Chornoivan + +Version 0.10.1 +~~~~~~~~~~~~~~ +Released: 2016-09-16 + +Features: + * Add AppStream button image (Ken Vermette) + * Ship a metainfo file (Matthias Klumpp) + * Don't use an extra hash table for AsProvided (Matthias Klumpp) + * Register bundle type for AppImageKit (Matthias Klumpp) + * Implement localization component type (Matthias Klumpp) + * validator: Complain less-loudly when encontering GNOME-specific tags (Matthias Klumpp) + * validator: Check for superfluous dots (Matthias Klumpp) + * validator: Strictly validate ID for KDE and GNOME (Matthias Klumpp) + * ascli: Modernize the way we handle subcommands (Matthias Klumpp) + * qt: Allow retrieving the desktop-id of a component (Matthias Klumpp) + +Specification: + * Add new driver component type (Matthias Klumpp) + * spec: Describe localization component type (Matthias Klumpp) + +Bugfixes: + * docs: Add a few missing classes to the API docs (Matthias Klumpp) + * Fix cache (de)serialization for screenshots and suggestions (Matthias Klumpp) + * yaml: Set screenshot image type correctly (Matthias Klumpp) + * cache: Iterate the right dictionary when looking at checksums (#71) (Iain Lane) + * apt: Ignore broken symlinks in /var/lib/apt/lists (Iain Lane) + * as_get_yml_data_origin: Error out if opening the file fails for any reason (Iain Lane) + * Make addons find their target component again (Matthias Klumpp) + * yaml: Don't fail if we encounter a translated node without template (Matthias Klumpp) + * Don't use GObject ref on GPtrArray (Matthias Klumpp) + * ascli: Read metainfo files correctly when converting files (Matthias Klumpp) + * xml: Properly serialize provides tag (Matthias Klumpp) + * pool: Correctly update addon info when loading data from a cache object (Matthias Klumpp) + * ascli: Auto-disable colors if we are not on a tty (Matthias Klumpp) + * yaml: Enforce string/int type on YAML scalars (Matthias Klumpp) + * yaml: Fix loading of cached icons in all formats (Matthias Klumpp) + * qt: Never lie about a component kind (Matthias Klumpp) + +Translation: + * Hungarian + - Balázs Úr + * Chinese (Taiwan) + - Chang-Chia Tseng + * German + - Matthias Klumpp + * Italian + - Milo Casagrande + * Indonesian + - Mohamad Hasan Al Banna + * Polish + - Piotr Drąg + * Kurdish Sorani [NEW!] + - Rasti K5 + * Ukrainian + - Yuri Chornoivan + +Version 0.10.0 +~~~~~~~~~~~~~~ +Released: 2016-08-30 + +Notes: + * This release breaks API/ABI in order to support multiple metadata sets describing the same + component (needed for bundling support), moving away from the database as central data store + and general cleanup. + * Porting is relatively straightforward, if you were using AsDatabase, you should switch to AsPool + now (AsDatabase has been a wrapper around AsPool for a while anyway). + * Many methods became private API with this release, file a bug if you miss anything. + * The 'categories.xml' file is gone - please account for that if you were reading it directly, + and consider using AsCategory instead, which offers the same functionality. + +Features: + * Remove the AsDatabase class (Matthias Klumpp) + * Use cmakedefine for compile-time features (Matthias Klumpp) + * Rename AsDataPool -> AsPool (Matthias Klumpp) + * Add placeholder enum for web applications (Matthias Klumpp) + * qt: Implement Appstream::Release for the Qt interface (Aleix Pol) + * Recognize the "Pantheon" desktop for Elementary (Matthias Klumpp) + * Get rid of the menu parser and make AsCategory more useful instead (Matthias Klumpp) + * Allow AsComponent to automatically check for list-value duplicates (Matthias Klumpp) + * Give bundles their own class (Matthias Klumpp) + * Stop shipping the categories.xml file (Matthias Klumpp) + * Allow multiple metadata sets in the pool to describe a component (Matthias Klumpp) + * Name AppStream metadata styles consistently (Matthias Klumpp) + * Allow the 'C' description fallback to be turned off (Iain Lane) + * Make AsScreenshot return localized images by default (Matthias Klumpp) + * Allow to compare AsRelease versions easily (Matthias Klumpp) + * Make get_icon_repository_paths private API (Matthias Klumpp) + * ascli: Allow dumping metadata as YAML (Matthias Klumpp) + * Use GVariant instead of ProtoBuf based cache (Matthias Klumpp) + * Enable stemming by default (Matthias Klumpp) + * Make components directly reference their addons, avoiding to query twice (Matthias Klumpp) + * Refactor data pool metadata loading (Matthias Klumpp) + * Allow setting the AppStream format version when (de)serializing data (Matthias Klumpp) + * Always write modern metadata, unless a lower format version is requested explicitly (Matthias Klumpp) + * Also find components in searches which have the search keyword in an addon (Matthias Klumpp) + * ascli: Add function to convert XML to YAML and vice versa (Matthias Klumpp) + * Consistent naming for metadata format and style (Matthias Klumpp) + +Specification: + * spec: Add hint on how the keywords tag should be localized (Matthias Klumpp) + +Bugfixes: + * Resolve unit test failures on arm and mips (Matthias Klumpp) + * gir: Correctly annotate ownership transference of GPtrArrays (Matthias Klumpp) + * l10n: Drop languages without translations (Matthias Klumpp) + * Don't hide symbols in public headers (Matthias Klumpp) + * Properly validate desktop-environment strings (Matthias Klumpp) + * validator: Fix name/summary check in validate-tree (Matthias Klumpp) + * xml: Properly write localized keywords (Matthias Klumpp) + * Avoid watching superfluous directories for metadata (Matthias Klumpp) + * Update architecture diagrams and optimize PNGs (Matthias Klumpp) + * Get rid of Xapian-isms (Matthias Klumpp) + +Translation: + * Chinese (Taiwan) + - Chang-Chia Tseng + * Chinese (China) + - Dingzhong Chen + - wsxy162 + * French: + - Christophe CHAUVET + - Claude Paroz + * German: + - Mario Blättermann + * Czech: + - Michal Čihař + * Italian: + - Milo Casagrande + * Russian: + - Nataliia + * Polish + - Piotr Drąg + * Catalan: + - Robert Antoni Buj Gelonch + * Ukrainian: + - Yuri Chornoivan + * Hungarian: + - kelemeng + +Version 0.9.8 +~~~~~~~~~~~~~~ +Released: 2016-08-10 + +Features: + * qt: Different approach for storing the icon size and url relation (Aleix Pol) + * Strictly validate AppStream IDs (Matthias Klumpp) + * Add AsSuggested class (Lucas Moura) + * tests: Test merges for suggestions (Lucas Moura) + * Add functions handling SPDX license ids and expressions (Matthias Klumpp) + * validator: Include a line-hint in the issue report (Matthias Klumpp) + * Implement console-application component type (Matthias Klumpp) + * validator: Validate files following the new cid scheme properly (Matthias Klumpp) + * validator: Validate metadata_license for permissiveness (Matthias Klumpp) + * Compress cache data (Matthias Klumpp) + * Implement "translate" URL type (Matthias Klumpp) + * xml: Implement the suggests tag (Matthias Klumpp) + * yaml: Implement reading and writing of Suggests field (Matthias Klumpp) + * Consider merge components valid if they have at least an ID (Matthias Klumpp) + * yaml: Read/write merge components (Matthias Klumpp) + +Specification: + * spec: Add console-application component type (Matthias Klumpp) + * spec: Streamline the requirements for component-ids (Matthias Klumpp) + * spec: Define a "translate" URL type (Matthias Klumpp) + * spec: Specify the suggests tag (Matthias Klumpp) + * spec: Describe the merge property (Matthias Klumpp) + * spec: Proofreading fixes (Philip Withnall) + +Bugfixes: + * Make searching for multiple terms work properly again (Matthias Klumpp) + * Don't fail on invalid search terms (Matthias Klumpp) + * Don't re-instantiate stemmer on each use (Matthias Klumpp) + * ascli: Line-wrap unicode texts properly on the console (Matthias Klumpp) + * Add missing docs to the API reference (Matthias Klumpp) + * tests: Add test description to each test (Matthias Klumpp) + * Sort search results by default (Matthias Klumpp) + * Fix a few issues with merging (Matthias Klumpp) + +Version 0.9.7 +~~~~~~~~~~~~~~ +Released: 2016-07-20 + +Notes: + * This release contains a lot of very invasive changes and deprecates some API, most + notably AsDatabase. Please test this release carefully. + There will be an API/ABI break in a future release, so if possible please adjust your + code to not use deprecated interfaces. + +Features: + * Don't fall back to Debian screenshots server if none is specified for the distro (Matthias Klumpp) + * Split out distro-specific helpers (Matthias Klumpp) + * Implement Xapian-less search (Matthias Klumpp) + * Use a pure PB cache instead of Xapian (Matthias Klumpp) + * qt: Don't rely on Xapian for searches (Matthias Klumpp) + * Deprecate AsDatabase (Matthias Klumpp) + * Hide internal symbols from the symbols table (Matthias Klumpp) + * Allow injecting components into the pool and unittest the cache (Matthias Klumpp) + * Add by-category filter to AsDataPool (Matthias Klumpp) + * Validate Freedesktop category names (Matthias Klumpp) + * Allow building AppStream with stemming support (Matthias Klumpp) + * Cache search tokens (Matthias Klumpp) + +Specification: + * docs/quickstart: Clarify the role of releases/provides (Matthias Klumpp) + * docs/quickstart: Screenshot images don't need to define width/height (Matthias Klumpp) + +Bugfixes: + * qt: Properly expose enums for introspection (Aleix Pol) + * qt: Make it possible to easily output data types using QDebug (Aleix Pol) + * xml: Fix formatting of tag (Matthias Klumpp) + * xml: Work around non-threadsafe behavior of libxml2 (Matthias Klumpp) + * xml: Properly write provides tag (Matthias Klumpp) + * Fix code documentation for as_component_get_id (Lucas Moura) + * Fix some xmldata methods documentation (Lucas Moura) + * cli: Create metainfo directory if it is missing and respect DESTDIR (Matthias Klumpp) + +Version 0.9.6 +~~~~~~~~~~~~~~ +Released: 2016-05-12 + +Features: + * Improve metadata file decompression code (Matthias Klumpp) + * validator: Simplify loading of data too (Matthias Klumpp) + * Make it easy to compile with Address Sanitizer enabled (Matthias Klumpp) + * Allow compiling with UBSan as well (Matthias Klumpp) + * Add back support for Travis CI (Matthias Klumpp) + * yaml: Write Releases field (Matthias Klumpp) + +Bugfixes: + * qt: Properly check for component validity (Matthias Klumpp) + * Ensure decompressed metadata is null-terminated (Neil Mayhew) + * validator: Long descriptions are not needed for generic components (Matthias Klumpp) + * Make VAPI generation depend on GIR typelibs explicitly (Matthias Klumpp) + * Be more verbose when failing to move the cache directory (Matthias Klumpp) + * Handle format errors when parsing YAML metadata (Neil Mayhew) + +Version 0.9.5 +~~~~~~~~~~~~~~ +Released: 2016-05-02 + +Features: + * Update README (Matthias Klumpp) + * Provide a bit more hints for translators (Matthias Klumpp) + * Improve error messages when reading broken XML (Matthias Klumpp) + * Load all XML in AsXMLData (Matthias Klumpp) + * Implement reading localized images from metadata (Matthias Klumpp) + * Write localized images in XML/YAML serialize routines (Matthias Klumpp) + * Unify codepaths for checking compatible locales (Matthias Klumpp) + * yaml: Implement read/write support for the Languages field (Matthias Klumpp) + * xml: Serialize and read languages tag properly (Matthias Klumpp) + * validator: Validate files in legacy paths too (Matthias Klumpp) + +Specification: + * spec: Allow localized screenshot images (Matthias Klumpp) + +Bugfixes: + * Refactor icon-finding code and fix rare double-free corruption (Matthias Klumpp) + * Properly validate randomly ordered XML tags for duplicates (Matthias Klumpp) + * validator: The translation tag is only valid in metainfo files (Matthias Klumpp) + * Be slightly less pedantic about size info when reading screenshot images (Matthias Klumpp) + * xml: Properly write description tag (Matthias Klumpp) + Version 0.9.4 ~~~~~~~~~~~~~~ Released: 2016-04-18 diff -Nru appstream-0.9.4/po/appstream.pot appstream-0.12.0/po/appstream.pot --- appstream-0.9.4/po/appstream.pot 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/appstream.pot 2018-04-04 15:53:56.000000000 +0000 @@ -6,345 +6,934 @@ #, fuzzy msgid "" msgstr "Project-Id-Version: appstream\n" - "Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" - "POT-Creation-Date: 2016-04-18 16:09+0200\n" + "Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" + "POT-Creation-Date: 2018-04-04 17:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=CHARSET\n" + "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" msgstr "" -#, c-format -msgid "AppStream CLI tool version: %s" +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" msgstr "" -msgid "AppStream Status:" +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" msgstr "" -msgid "AppStream cache update completed successfully." +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "" + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" msgstr "" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream cache update completed, but some metadata was ignored due to errors." +msgid "AppStream CLI tool version: %s\n" + "AppStream library version: %s" msgstr "" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 +msgid "AppStream Status:" +msgstr "" + +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 +msgid "AppStream cache update completed successfully." +msgstr "" + +#: src/as-pool.c:1560 #, c-format -msgid "AppStream cache update failed." +msgid "AppStream cache update failed. Turn on verbose mode to get more detailed issue information." msgstr "" +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "" -msgid "AppStream software component cache was not found. This could mean AppStream was set up incorrectly, or your distribution does not provide any AppStream metadata." +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 +msgid "AppStream is a cross-distribution specification to provide metadata about software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" msgstr "" +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "" + +#: tools/ascli-actions-mdata.c:324 #, c-format -msgid "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' extension." +msgid "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' suffix." msgstr "" +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "" -#, c-format -msgid "Command '%s' is unknown." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" msgstr "" +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "" + +#: tools/appstream-cli.c:620 +msgid "Create a template for a metainfo file (to be filled out by the upstream project)." +msgstr "" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" msgstr "" +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "" + +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." msgstr "" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "" -msgid "Enforce a cache refresh" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "" + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" msgstr "" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "" -msgid "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" msgstr "" +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "" + +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 msgid "Fonts" msgstr "" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." msgstr "" -msgid "Manually set the location of the AppStream cache" +#: src/as-pool.c:758 +msgid "Metadata files have errors:" msgstr "" -msgid "Mimetypes" +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" msgstr "" +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "" -#, c-format -msgid "No component matching '%s' found." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" msgstr "" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." +msgid "No component matching '%s' found." msgstr "" +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "" +#: tools/ascli-actions-pkgmgr.c:53 msgid "No suitable package manager CLI found. Please make sure that e.g. \"pkcon\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" msgstr "" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "" + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "" -msgid "Print detailed output about found components" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" msgstr "" -msgid "Print even pedantic hints when validating" +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." msgstr "" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "" +#: src/as-provided.c:157 msgid "Python 3" msgstr "" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "" + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "" + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" msgstr "" -msgid "Remove software matching the component-id." +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" msgstr "" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +#: tools/appstream-cli.c:187 +#, c-format +msgid "Run '%s --help' to see a list of available commands and options, and '%s %s --help' to see a list of options specific for this subcommand." +msgstr "" + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" msgstr "" +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "" + +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "" -msgid "Select a value for the provides-item which needs to be found." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." msgstr "" -msgid "Show extra debugging information" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." msgstr "" -msgid "Show the program version" +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" msgstr "" -#. these are commands we can use with appstream-cli +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "" -msgid "The system metadata cache does not exist." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" msgstr "" -msgid "The system metadata cache exists." +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" msgstr "" +#: tools/ascli-actions-mdata.c:464 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "The .desktop file '%s' does not exist." msgstr "" -msgid "Tried to perform query on closed database." +#: src/as-pool.c:1544 +msgid "The AppStream system cache was updated, but some errors were detected, which might lead to missing metadata. Refer to the verbose log for more information." msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "The software component type '%s' is not valid in AppStream. Possible values are:" +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "This command takes optional TYPE and FILE positional arguments, FILE being a file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "This tool allows for reading, writing, validating and transformation of AppStream XML or YAML metadata. It also gives access to the system metadata pool, for example to query for software that provides a specific MIME-type, and installing it by its software component identifier." +msgstr "" + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "Unable to convert file: Could not determine output format, please set it explicitly using '--format='." +msgstr "" + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" +msgid "Unable to find component with ID '%s'!" msgstr "" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to read the .desktop file: %s" msgstr "" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" msgstr "" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "" +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." +msgid "Validation was successful: %s" msgstr "" +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "" + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "Version: %s" +msgstr "" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" msgstr "" +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "" + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" + +#: tools/appstream-cli.c:623 +msgid "You can find information about subcommand-specific options by passing \"--help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +#: tools/ascli-actions-mdata.c:444 +msgid "You need to give an AppStream software component type to generate a template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "" -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "" +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "" +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "" + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" diff -Nru appstream-0.9.4/po/ar.po appstream-0.12.0/po/ar.po --- appstream-0.9.4/po/ar.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ar.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,362 +1,981 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. +# FIRST AUTHOR , YEAR. # -# Translators: msgid "" msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Arabic (http://www.transifex.com/freedesktop/appstream/" -"language/ar/)\n" +"Project-Id-Version: appstream\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-02-05 15:34+0000\n" +"Last-Translator: Michal Čihař \n" +"Language-Team: Arabic \n" "Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " -"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" +"X-Generator: Weblate 2.19-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "أمر ’%s’" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "الرسومات ثلاثية الأبعاد" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "عمل" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "الوسائل الإضافية" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "مغامرة" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "أظهر التلميحات الإصطلاحية أيضًا." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" msgstr "" +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "أداة للتعامل مع بيانات AppStream الوصفية" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "حالة آب-ستريم:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "" +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +"فشل تحديث ذاكرة تخزين آب-ستريم المؤقتة. فعّل وضع التفصيل (verbose) للحصول على " +"معلومات أكثر تفصيلاً عن المشكلة." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "" +msgstr "تحديث محتويات ذاكرة تخزين آب-ستريم المؤقتة ليس ضروري." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "" +msgstr "شاشة توجيه الأوامر لآب-ستريم" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"آب-ستريم هو جزء من المواصفات المشتركة لجميع الإصدارات والذي يوفّر البيانات " +"الوصفية للمكوّنات البرمجية." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" msgstr "" +"تم تحديث محتويات ذاكرة تخزين أب-ستريم المؤقتة، لكن تم العثور على مشكلة: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "الذكاء الاصطناعي" +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "علم الفلك" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "علم الفلك" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "الصوت و الصورة" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "إنشاء وتعديل الصوتيات" + +#: src/as-provided.c:147 msgid "Binaries" +msgstr "الثنائيات" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "القوالب" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" msgstr "" +#: tools/ascli-utils.c:286 msgid "Bundle" -msgstr "" +msgstr "حزمة" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "" +msgstr "لا يمكن الكتابة في هذا الموقع من ذاكرة التخزين المؤقت '%s'." + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "التقويم" +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +"لم نتمكن من نسخ ’%s‘: لا يحتوي الملف على تذييل '.metainfo.xml' ولا '.appdata." +"xml'." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "البطاقة" +#: tools/ascli-utils.c:356 msgid "Categories" -msgstr "" +msgstr "الفئات" + +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "المحادثة" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "الإنسجام/الكيمياء" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "برامج الترميز" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "التواصل والأخبار" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "مكون" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format -msgid "Command '%s' is unknown." +msgid "Component '%s' has no installation candidate." +msgstr "المكوّن '%s' ليس لديه أي وسيلة مرشًحة للتثبيت." + +#: tools/ascli-utils.c:364 +msgid "Compulsory for" +msgstr "أساسي لـ" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." msgstr "" +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 #, c-format -msgid "Component '%s' has no installation candidate." +msgid "Could not find component providing '%s::%s'." msgstr "" -msgid "Compulsory for" +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." msgstr "" +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." msgstr "" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "" -msgid "Enforce a cache refresh" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" msgstr "" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "" + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "" -msgid "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" msgstr "" +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "" + +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "" + +#: src/as-provided.c:149 +msgid "MIME types" msgstr "" -msgid "Manually set the location of the AppStream cache" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." msgstr "" -msgid "Mimetypes" +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." msgstr "" +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "" -#, c-format -msgid "No component matching '%s' found." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" msgstr "" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." +msgid "No component matching '%s' found." msgstr "" +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "" +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" msgstr "" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "" + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "" -msgid "Print detailed output about found components" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" msgstr "" -msgid "Print even pedantic hints when validating" +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." msgstr "" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "" +#: src/as-provided.c:157 msgid "Python 3" msgstr "" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." msgstr "" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "" +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" msgstr "" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "" -msgid "Select a value for the provides-item which needs to be found." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" msgstr "" -msgid "Show extra debugging information" +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." msgstr "" -msgid "Show the program version" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." msgstr "" -#. these are commands we can use with appstream-cli +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "" -msgid "The system metadata cache does not exist." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" -msgid "The system metadata cache exists." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." msgstr "" +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "Unable to build the template metainfo file: %s" msgstr "" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" +msgid "Unable to find component with ID '%s'!" msgstr "" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to read the .desktop file: %s" msgstr "" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" msgstr "" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" msgstr "" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "" +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." +msgid "Validation was successful: %s" msgstr "" +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "" + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "Version: %s" +msgstr "" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" msgstr "" +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "" + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "" -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "" +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "" +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "" + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" diff -Nru appstream-0.9.4/po/as.po appstream-0.12.0/po/as.po --- appstream-0.9.4/po/as.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/as.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Assamese (http://www.transifex.com/freedesktop/appstream/" -"language/as/)\n" -"Language: as\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/az.po appstream-0.12.0/po/az.po --- appstream-0.9.4/po/az.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/az.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Azerbaijani (http://www.transifex.com/freedesktop/appstream/" -"language/az/)\n" -"Language: az\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/bg.po appstream-0.12.0/po/bg.po --- appstream-0.9.4/po/bg.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/bg.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Bulgarian (http://www.transifex.com/freedesktop/appstream/" -"language/bg/)\n" -"Language: bg\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/bn_IN.po appstream-0.12.0/po/bn_IN.po --- appstream-0.9.4/po/bn_IN.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/bn_IN.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Bengali (India) (http://www.transifex.com/freedesktop/" -"appstream/language/bn_IN/)\n" -"Language: bn_IN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/ca.po appstream-0.12.0/po/ca.po --- appstream-0.9.4/po/ca.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ca.po 2018-04-04 15:53:56.000000000 +0000 @@ -3,219 +3,604 @@ # This file is distributed under the same license as the appstream package. # # Translators: -# Robert Antoni Buj i Gelonch , 2015-2016 +# Robert Antoni Buj Gelonch , 2016 +# Robert Antoni Buj Gelonch , 2015-2016 msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-14 10:47+0000\n" -"Last-Translator: Robert Antoni Buj i Gelonch \n" -"Language-Team: Catalan (http://www.transifex.com/freedesktop/appstream/" -"language/ca/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-30 18:58+0000\n" +"Last-Translator: Robert Antoni Buj Gelonch \n" +"Language-Team: Catalan \n" "Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.20-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Un tipus de «provides-item» (p. ex. lib, bin, python3, etc.)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Ordre «%s»" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Gràfics 3D" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Acció" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Complements" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Aventura" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Mostra també els consells redundants." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Un tipus d'element (p. ex. lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Una utilitat per treballar amb les metadades AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "Interfície de línia d'ordres d'AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Versió de l'eina de la interfície de línia d'ordres d'AppStream: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Versió de l'eina de la interfície de línia d'ordres d'AppStream: %s\n" +"Versió de la biblioteca d'AppStream: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "Estat d'AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "" "S'ha completat correctament l'actualització de la memòria cau d'AppStream." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"S'ha completat l'actualització de la memòria cau d'AppStream, però es van " -"ignorar algunes metadades a causa d'errors." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Ha fallat l'actualització de la memòria cau d'AppStream." +"Ha fallat l'actualització de la memòria cau d'AppStream. Activeu el mode " +"detallat per obtenir informació detallada de la incidència." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "L'actualització de memòria cau d'AppStream no és necessària." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Interfície de línia d'ordres d'AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"No s'ha trobat la memòria cau dels components de programari d'AppStream. " -"Això podria significar que AppStream estigui configurat de forma incorrecta, " -"o la vostra distribució no proporciona cap metadada AppStream." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream és una especificació independent de la distribució que proporciona " +"metadades quant als components de programari." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"S'ha actualitzat la memòria cau de sistema d'AppStream, però s'han trobat " +"problemes: %s" +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "Versió d'AppStream: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Videojoc recreatiu" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Intel·ligència artificial" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomia" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomia" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Àudio i vídeo" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Creació i edició d'àudio" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Binaris" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Blocs" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Placa" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Agrupació" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "L'àrea d'emmagatzematge temporal «%s» no és d'escriptura." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Calendari" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"No es pot copiar «%s»: El fitxer no té una extensió «.metainfo.xml» o «." -"appdata.xml»." +"No es pot copiar «%s»: El fitxer no té un sufix «.metainfo.xml» o «.appdata." +"xml»." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Targeta" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Categories" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Es desconeix l'ordre «%s»." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Xat" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Química" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Química" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Còdecs" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Comunicació i notícies" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Component" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "El component «%s» no té cap candidat d'instal·lació." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Obligatori per" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Converteix la col·lecció XML a YAML o viceversa." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "No s'ha pogut trobar el component que proporciona «%s::%s»." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Crea una plantilla per a un fitxer metainfo (per ser omplert pel projecte de " +"desenvolupament)." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "Serveis de sistema de DBus" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "Serveis de sistema de DBus" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Base de dades" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Depuradors" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL de la captura de pantalla predeterminada" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" +"Format predeterminat de les metadades (els valors vàlids són 'xml' i 'yaml')." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Descripció" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Desenvolupador" -msgid "Display various information about installed AppStream metadata." -msgstr "Mostra informació diversa sobre metadades instal·lades d'AppStream." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Eines de desenvolupador" +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "" +"Mostra informació de l'estat sobre les metadades disponibles d'AppStream." + +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Metadades de la distribució:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "No utilitzis la memòria cau del Xapian quan facis una petició" - -msgid "Don't show colored output" -msgstr "No mostris una sortida acolorida" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "No utilitzis l'accés a la xarxa." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "No mostris la sortida amb colors." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" "Bolca les metadades XML en pla per a un component que coincideixi amb l'id." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Educació" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Buit." -msgid "Enforce a cache refresh" -msgstr "Força una actualització de la memòria cau" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emuladors" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Força una actualització de la memòria cau." +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" +"S'ha produït un error mentre es carregava l'agrupació de les metadades: %s" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Estén" -msgid "Extensions" -msgstr "Extensions" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "No es va trobar el fitxer %s o es va denegar el permís!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Destacat" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Destacat" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Destacat" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Destacat" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Destacat" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Destacat" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Destacat" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Destacat" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Destacat" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Sistema de fitxers" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finances" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Microprogramari flaix" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Tipus de lletres" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "Tipus de lletres" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "S'han trobat %i components als camins del llegat." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "S'han trobat %i components." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Jocs" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "Obté els components que proporcionen un element indicat." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "Obté la informació sobre un component amb el seu id." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Gràfics i fotografia" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Pàgina inicial" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Entorns de desenvolupament integrat" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Icona" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Conjunts d'icones" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identificador" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Orígens d'entrada" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Instal·la un fitxer de metadades al lloc correcte." -msgid "Install software matching the component-id." -msgstr "Instal·la aquell programari que coincideixi amb «component-id»." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Instal·la el programari que coincideixi amb «component-ID»." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" "Tipus no vàlid per a l'ítem proporcionat que s'ha seleccionat. Els valors " "vàlids són:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Nens" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Paquets d'idiomes" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Idiomes" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Biblioteques" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Llicència" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Localització" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Lògica" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "Tipus MIME" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Fes la sol·licitud sense cap emmagatzematge en memòria cau." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Ubicació seleccionada manualment de la memòria cau d'AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." msgstr "" -"Estableix manualment la ubicació de les metadades d'AppStream per a la " -"regeneració de la memòria cau" +"Ubicació seleccionada manualment de les metadades d'AppStream a explorar." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matemàtiques" -msgid "Manually set the location of the AppStream cache" -msgstr "Estableix manualment la ubicació de la memòria cau d'AppStream." +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matemàtiques" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "No existeix el fitxer de metadades «%s»." -msgid "Mimetypes" -msgstr "Mini tipus" +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Els fitxers de metadades tenen errors:" +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Fitxers Metainfo:" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Modaliases" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Reproductors de música" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nom" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Notícies" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "No s'ha trobat cap component que coincideixi «%s»." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "No s'ha trobat cap component que proporcioni '%s;%s'." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "Sense icones." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -223,163 +608,462 @@ "No s'ha trobat cap interfície de línia d'ordres adequada. Si us plau, " "assegureu-vos que p. ex. «pkcon» (part de PackageKit) estigui disponible." -msgid "No value for the item to search for defined." -msgstr "Es desconeix el valor de l'ítem definit en la cerca." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "No s'ha definit cap valor per a l'element a cercar." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Ofimàtica" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Es desconeix l'opció «%s»." +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paquet" -msgid "Print detailed output about found components" -msgstr "Imprimeix la sortida detallada sobre els components trobats" - -msgid "Print even pedantic hints when validating" -msgstr "Imprimeix els consells en la validació, fins i tot els redundants" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografia" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Imprimeix la sortida detallada quant als components trobats." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Grup del projecte" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Elements proporcionats" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (versió 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Reconstrueix la memòria cau de la informació del component." - -msgid "Remove software matching the component-id." -msgstr "Suprimeix aquell programari que coincideixi amb «component-id»." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Reconstrueix la memòria cau de les metadades del component." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Suprimeix el programari que coincideixi amb «component-ID»." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robòtica" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Jocs de rol" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" -"Executeu '%s --help' per veure una llista completa de les opcions " +"Executeu «%s --help» per veure una llista completa de les opcions " "disponibles de la línia d'ordres." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Executeu «%s --help» per veure una llista completa de les ordres i opcions " +"disponibles, i «%s %s --help» per veure les opcions específiques per a " +"aquesta subordre." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Microprogramari en temps d'execució" -msgid "Sample Screenshot URL" -msgstr "URL de la captura de pantalla de mostra" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Escaneig" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Ciència" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Cerca a la base de dades de components." -msgid "Select a value for the provides-item which needs to be found." -msgstr "Selecciona un valor per al «provides-item» que s'hagi de trobar." - -msgid "Show extra debugging information" -msgstr "Mostra la informació extra de depuració" - -msgid "Show the program version" -msgstr "Mostra la versió de l'aplicació" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Seguretat" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Mostra informació extra de depuració." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Mostra la versió de l'aplicació." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Esports" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Estratègia" -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Subordres:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Resum" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Resum:" -msgid "The system metadata cache does not exist." -msgstr "La memòria cau de les metadades del sistema no existeix." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Monitoratge del sistema" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emuladors de terminals" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Editors de text" -msgid "The system metadata cache exists." -msgstr "La memòria cau de les metadades del sistema existeix." +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "No existeix el fitxer .desktop «%s»." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"S'ha actualitzat la memòria cau del sistema d'AppStream, però s'han detectat " +"alguns errors, aquests errors poden provocar la pèrdua de metadades. " +"Consulteu el registre per obtenir informació més detallada." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "El TIPUS ha de ser un tipus de component vàlid, com ara: %s" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"El tipus de component de programari «%s» no és vàlid a AppStream. Els valors " +"possibles són:" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" -"S'ha produït un error mentre s'intentava trobar la informació addicional: %s" +"Aquesta ordre pren els arguments posicionals i opcionals TIPUS i FITXER, " +"FITXER és un fitxer on s'hi escriu (o \"-\" per a la sortida estàndard)." -msgid "Tried to perform query on closed database." -msgstr "Es va intentar de fer la consulta sobre la base de dades tancada." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Aquesta eina permet llegir, escriure, validar i transformar les metadades " +"XML o YAML d'AppStream. També dóna accés a l'agrupació de metadades del " +"sistema, per exemple consultar quin programari proporciona un tipus MIME " +"específic i instal·lar-lo pel seu identificador de component de programari." -#. TRANSLATORS: We failed to find any component in the database due to an error +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "No es pot construir el fitxer metainfo de la plantilla: %s" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"No es pot convertir el fitxer: No s'ha pogut determinar el format de " +"sortida, establiu-ho de forma explícita amb '--format='." + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "No es pot trobar la coincidència del component %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "No s'ha pogut trobar el component que proporciona '%s;%s'!" +msgid "Unable to find component with ID '%s'!" +msgstr "No s'ha pogut trobar el component amb l'id. «%s»!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "No s'ha pogut trobar cap component amb l'id. «%s»!" +msgid "Unable to read the .desktop file: %s" +msgstr "No es pot llegir el fitxer .desktop: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" -"No s'ha pogut obrir la memòria cau dels components de programari d'AppStream." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "No es pot desar el fitxer metainfo de plantilla: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "No s'ha pogut generar el gestor de paquets: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "No es pot escriure a «%s», no es pot instal·lar el fitxer metainfo." -msgid "Upstream metadata:" -msgstr "Metadades de la línia de desenvolupament:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Ordre desconeguda «%s»." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Utilitza el fitxer .desktop que s'indica com a base per omplir els valors " +"del fitxer metainfo." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Utilitats" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "Valida els fitxers XML d'AppStream per incidències." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" "Valida un arbre de fitxers instal·lats d'una aplicació per validar-ne les " "metadades." -msgid "Validation failed." -msgstr "Ha fallat la validació." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Ha fallat la validació: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "S'ha validat correctament." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "S'ha validat correctament: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "El valor de l'element que s'ha de trobar." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Gràfics vectorials" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Versió: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Visualitzadors" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "Tenim informació sobre %i components de programari." -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "El fitxer XML del menú XDG «%s» està malmès." +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Navegadors web" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Processadors de text" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Podeu trobar informació sobre les opcions específiques de la subordre en " +"passar \"--help\" a la subordre." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" "És probable que es necessitin els permisos de superusuari per realitzar " "aquesta acció." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Heu d'indicar un tipus de component de programari d'AppStream per generar " +"una plantilla. Els valors possibles són:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Heu d'especificar una ordre." -msgid "You need to specify a component-id." -msgstr "Heu d'especificar un «component-id»." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Heu d'especificar un ID-component." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Heu d'especificar un fitxer per validar!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "Heu d'especificar un fitxer de metadades." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Heu d'especificar un directori arrel per iniciar la validació!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Heu d'especificar un terme per a la cerca." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Heu d'especificar un fitxer d'entrada i de sortida." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" -msgstr "" +msgstr "aplicació;programari;paquet;aplicació;programa" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "errors: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "informació: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "redundant: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "advertències: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Es desconeix l'ordre «%s»." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "No utilitzis cap memòria cau quan es realitza la petició." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Ha fallat l'actualització de la memòria cau d'AppStream." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "S'han carregat l'agrupació de dades d'AppStream, però s'han ignorat " +#~ "algunes metadades a causa d'errors." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "No es pot cercar un tipus de component desconegut." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Categories" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Categories" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Categories" + +#~ msgid "Extensions" +#~ msgstr "Extensions" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "No es va trobar el fitxer %s o es va denegar el permís!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "No s'ha trobat cap component que proporcioni '%s;%s'." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "El fitxer XML del menú XDG «%s» està malmès." diff -Nru appstream-0.9.4/po/ca@valencia.po appstream-0.12.0/po/ca@valencia.po --- appstream-0.9.4/po/ca@valencia.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ca@valencia.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Catalan (Valencian) (http://www.transifex.com/freedesktop/" -"appstream/language/ca@valencia/)\n" -"Language: ca@valencia\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/ckb.po appstream-0.12.0/po/ckb.po --- appstream-0.9.4/po/ckb.po 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/po/ckb.po 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,978 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Matthias Klumpp +# This file is distributed under the same license as the appstream package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: appstream\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2016-09-06 13:56+0000\n" +"Last-Translator: Rasti K5 \n" +"Language-Team: Kurdish Sorani \n" +"Language: ckb\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.8\n" + +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "وێنەی سێ دووری" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "زیادکراوەکان" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "سەرکێشی" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "" + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +#, fuzzy +msgid "AppStream CLI" +msgstr "دۆخی AppStream:" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "AppStream CLI وەشانی ئامراز: %s" + +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 +msgid "AppStream Status:" +msgstr "دۆخی AppStream:" + +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 +msgid "AppStream cache update completed successfully." +msgstr "" + +#: src/as-pool.c:1560 +#, c-format +msgid "" +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." +msgstr "" + +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 +msgid "AppStream cache update is not necessary." +msgstr "" + +#. TRANSLATORS: This is the header to the --help menu for subcommands +#. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 +msgid "AppStream command-line interface" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 +msgid "" +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "AppStream CLI وەشانی ئامراز: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "زیرەکی دەستکرد" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "گەردوونناسی" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "گەردوونناسی" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "دەنگ و ڤیدیۆ" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "دروستکردن و دەستکاریکردنی دەنگ" + +#: src/as-provided.c:147 +msgid "Binaries" +msgstr "دووانەیی" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "تەختە" + +#: tools/ascli-utils.c:286 +msgid "Bundle" +msgstr "" + +#: src/as-pool.c:1486 +#, c-format +msgid "Cache location '%s' is not writable." +msgstr "" + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "ساڵنامە" + +#: tools/ascli-actions-mdata.c:324 +#, c-format +msgid "" +"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " +"suffix." +msgstr "" + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "کارت" + +#: tools/ascli-utils.c:356 +msgid "Categories" +msgstr "هاوپۆلەکان" + +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "پەیڤین" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "کیمیا" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "کیمیا" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "هەواڵ و گەیاندن" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 +#, c-format +msgid "Component '%s' has no installation candidate." +msgstr "" + +#: tools/ascli-utils.c:364 +msgid "Compulsory for" +msgstr "" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "" + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 +msgid "DBus Session Services" +msgstr "" + +#: src/as-provided.c:159 +msgid "DBus System Services" +msgstr "" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "بنکەدراوە" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "هەڵەدۆزەکان" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 +msgid "Description" +msgstr "پێناسە" + +#. developer name +#: tools/ascli-utils.c:308 +msgid "Developer" +msgstr "گەشەپێدەر" + +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "ئامرازەکانی گەشەپێدەر" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "" + +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 +msgid "Distribution metadata:" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "" + +#: tools/appstream-cli.c:607 +msgid "Dump raw XML metadata for a component matching the ID." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "پەروەردە" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 +msgid "Empty." +msgstr "بەتاڵ." + +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "لاسایکردنەوە" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "" + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" + +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "درێژکردنەوەکان" + +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "پەڕگەی سیستەم" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "سەرمایەگوزاری" + +#: src/as-provided.c:165 +msgid "Flashed Firmware" +msgstr "" + +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "جۆرەپیت" + +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "جۆرەپیت" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 +#, c-format +msgid "Found %i components in legacy paths." +msgstr "" + +#: tools/ascli-actions-misc.c:121 +#, c-format +msgid "Found %i components." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "یارییەکان" + +#: tools/appstream-cli.c:603 +msgid "Get components which provide the given item." +msgstr "" + +#: tools/appstream-cli.c:602 +msgid "Get information about a component by its ID." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "وێنە و فۆتۆگرافی" + +#: tools/ascli-utils.c:287 +msgid "Homepage" +msgstr "ماڵپەڕ" + +#: src/as-category.c:89 +#, fuzzy +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDEs" + +#: tools/ascli-utils.c:288 +msgid "Icon" +msgstr "وێنۆچکە" + +#: tools/ascli-actions-misc.c:92 +msgid "Iconsets" +msgstr "" + +#: tools/ascli-utils.c:282 +msgid "Identifier" +msgstr "ناسێنەر" + +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "" + +#: tools/appstream-cli.c:617 +msgid "Install a metadata file into the right location." +msgstr "" + +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "" + +#: tools/ascli-actions-mdata.c:210 +msgid "Invalid type for provided item selected. Valid values are:" +msgstr "" + +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "منداڵان" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "گورزەی زمان" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "زمانەکان" + +#: src/as-provided.c:145 +msgid "Libraries" +msgstr "پەڕتووکخانە" + +#. license +#: tools/ascli-utils.c:350 +msgid "License" +msgstr "بڕوانامە" + +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "ژیربێژی" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "بیرکاری" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "بیرکاری" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "" + +#: src/as-provided.c:153 +msgid "Modaliases" +msgstr "" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "لێدەری مۆسیقا" + +#: tools/ascli-utils.c:283 +msgid "Name" +msgstr "ناو" + +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "هەواڵ" + +#: tools/ascli-actions-mdata.c:179 +#, c-format +msgid "No component matching '%s' found." +msgstr "" + +#: tools/ascli-actions-misc.c:103 +msgid "No icons." +msgstr "هیچ وێنۆچکەیەک نییە." + +#: tools/ascli-actions-pkgmgr.c:53 +msgid "" +"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" +"\" (part of PackageKit) is available." +msgstr "" + +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "نووسینگە" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, fuzzy, c-format +msgid "Option '%s' is unknown." +msgstr "فرمانی '%s' نەناسراوە." + +#: tools/ascli-utils.c:285 +msgid "Package" +msgstr "گورزە" + +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "فۆتۆگرافی" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "" + +#. project group +#: tools/ascli-utils.c:347 +msgid "Project Group" +msgstr "دەستەی پڕۆژە" + +#: tools/ascli-utils.c:392 +msgid "Provided Items" +msgstr "" + +#: src/as-provided.c:155 +msgid "Python (Version 2)" +msgstr "پایسۆن )وەشانی 2(" + +#: src/as-provided.c:157 +msgid "Python 3" +msgstr "پایسۆن 3" + +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "" + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "" + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "ڕۆبۆتی" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 +#, c-format +msgid "Run '%s --help' to see a full list of available command line options." +msgstr "" + +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" + +#: src/as-provided.c:163 +msgid "Runtime Firmware" +msgstr "" + +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "زانست" + +#: tools/appstream-cli.c:601 +msgid "Search the component database." +msgstr "" + +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "پاراستن" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "پیشاندانی وەشانی بەرنامە." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "وەرزش" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "ستراتیژی" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 +msgid "Subcommands:" +msgstr "" + +#: tools/ascli-utils.c:284 +msgid "Summary" +msgstr "پوختە" + +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 +msgid "Summary:" +msgstr "پوختە:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "دەستکاریکەری دەق" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 +#, c-format +msgid "Unable to find component matching %s!" +msgstr "" + +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 +#, c-format +msgid "Unable to find component with ID '%s'!" +msgstr "" + +#: tools/ascli-actions-mdata.c:470 +#, c-format +msgid "Unable to read the .desktop file: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "" + +#: tools/ascli-actions-pkgmgr.c:67 +#, c-format +msgid "Unable to spawn package manager: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:319 +#, c-format +msgid "Unable to write to '%s', can not install metainfo file." +msgstr "" + +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "کاربەری" + +#: tools/appstream-cli.c:610 +msgid "Validate AppStream XML files for issues." +msgstr "" + +#: tools/appstream-cli.c:611 +msgid "Validate an installed file-tree of an application for valid metadata." +msgstr "" + +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "" + +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 +msgid "Validation was successful." +msgstr "" + +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "" + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "وەشان: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "بینەر" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "" + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "وێبگەڕ" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 +msgid "You might need superuser permissions to perform this action." +msgstr "" + +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 +msgid "You need to specify a command." +msgstr "" + +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "" + +#: tools/ascli-actions-validate.c:223 +msgid "You need to specify a file to validate!" +msgstr "" + +#: tools/ascli-actions-mdata.c:306 +msgid "You need to specify a metadata file." +msgstr "" + +#: tools/ascli-actions-validate.c:281 +msgid "You need to specify a root directory to start validation!" +msgstr "" + +#: tools/ascli-actions-mdata.c:161 +msgid "You need to specify a term to search for." +msgstr "" + +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "" + +#. TRANSLATORS: List of "grey-listed" words sperated with ";" +#. * Do not translate this list directly. Instead, +#. * provide a list of words in your language that people are likely +#. * to include in a search but that should normally be ignored in +#. * the search. +#. +#: src/as-pool.c:104 +msgid "app;application;package;program;programme;suite;tool" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "فرمانی '%s' نەناسراوە." diff -Nru appstream-0.9.4/po/CMakeLists.txt appstream-0.12.0/po/CMakeLists.txt --- appstream-0.9.4/po/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -# CMakeLists for AppStream-Core localisation - -find_program (LC_INTLTOOL_UPDATE intltool-update) -mark_as_advanced (LC_INTLTOOL_UPDATE) - -find_package (Gettext REQUIRED) - -if (LC_INTLTOOL_UPDATE STREQUAL "") - message (FATAL_ERROR "Intltool was not found! Please install it to continue!") -endif (LC_INTLTOOL_UPDATE STREQUAL "") - -set(LPKNAME "appstream") - -add_custom_target (l10n-update - ${LC_INTLTOOL_UPDATE} -p -g "${LPKNAME}" - DEPENDS POTFILES.in - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) - -add_custom_target (l10n-maintain - ${LC_INTLTOOL_UPDATE} -m "${LPKNAME}" - DEPENDS POTFILES.in - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) - -file (GLOB _translations ${CMAKE_CURRENT_SOURCE_DIR}/*.po) - gettext_create_translations (${LPKNAME}.pot - ALL ${_translations} -) diff -Nru appstream-0.9.4/po/cs.po appstream-0.12.0/po/cs.po --- appstream-0.9.4/po/cs.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/cs.po 2018-04-04 15:53:56.000000000 +0000 @@ -8,364 +8,976 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Czech (http://www.transifex.com/freedesktop/appstream/" -"language/cs/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-29 04:30+0000\n" +"Last-Translator: Pavel Borecki \n" +"Language-Team: Czech \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"X-Generator: Weblate 2.20-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Typ poskytující položky (např. lib, bin, python3, …)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Příkaz „%s“" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D grafika" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Akce" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Doplňky" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Dobrodružství" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Při ověřování vypisovat i nalezené drobnosti." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Typ položky (např. lib, bin, python3, …)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Nástroj pro práci s AppStream metadaty" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "Textové uživatelské rozhraní pro AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Verze nástroje AppStream CLI: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Verze nástroje AppStream pro textové uživatelské rozhraní: %s\n" +"Verze knihovny AppStream: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "Stav AppStreamu:" +msgstr "Stav nástroje AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "Aktualizace mezipaměti AppStreamu byla úspěšně dokončena." +msgstr "Aktualizace mezipaměti AppStream byla úspěšně dokončena." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Aktualizace mezipaměti AppStreamu byla dokončena, ale některé metadata byla " -"ignorována kvůli chybám." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Aktualizace mezipaměti AppStreamu selhala." +"Aktualizace mezipaměti AppStream se nezdařila. Zapněte výřečnější režim, ze " +"kterého obdržíte podrobnější informace." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "Aktualizace mezipaměti AppStreamu není zapotřebí." +msgstr "Aktualizace mezipaměti AppStream není v tuto chvíli zapotřebí." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Rozhraní příkazového řádku pro AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"Nebyla nalezena mezipaměť se softwarovými komponentami z AppStream. To může " -"znamenat, že AppStream nebyl správně nastaven, nebo že vaše distribuce " -"neposkytuje žádná metadata pro AppStream." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream je standard pro poskytování metadat o programovém vybavení, " +"používaný napříč linuxovými distribucemi." +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"Systémová mezipaměť AppStream byla aktualizována, ale byly zjištěny " +"problémy: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "Verze nástroje AppStream: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arkády" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Umělá inteligence" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomie" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomie" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Zvuk a video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Vytváření a úprava zvuku" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Spustitelné soubory" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Bloky" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Deskové" + +#: tools/ascli-utils.c:286 msgid "Bundle" -msgstr "Zabaleno pomocí" +msgstr "Zabaleno s" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "Do umístění mezipaměti „%s“ nelze zapisovat." +msgstr "Do umístění mezipaměti „%s“ se nedaří zapisovat." + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalendář" +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"Nelze zkopírovat „%s“: Soubor nemá příponu „.metainfo.xml“ nebo „.appdata." -"xml“." +"Nedaří se zkopírovat „%s“: Soubor nemá příponu „.metainfo.xml“ nebo „." +"appdata.xml“." +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Karetní" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategorie" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Příkaz „%s“ není znám." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Okamžitá textová komunikace" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Chemie" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Chemie" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodeky" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Komunikace a novinky" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Součást" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "Komponenta „%s“ nemá kandidáta na instalaci." +msgstr "Součást „%s“ nemá kandidáta na instalaci." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Povinné pro" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Převádí z XML na YAML formát a obráceně." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Nepodařilo se najít součást poskytující „%s::%s“." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Vytvořit šablonu pro metainfo soubor (pro vyplnění v upstream projektu)." + +#: src/as-provided.c:161 msgid "DBus Session Services" -msgstr "Služba sezení pro D-Bus" +msgstr "Služby relace D-Bus" +#: src/as-provided.c:159 msgid "DBus System Services" -msgstr "Systémová služba pro D-Bus" +msgstr "Systémové služby D-Bus" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Databáze" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Ladící nástroje" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL výchozího ukázkového snímku obrazovky" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Výchozí formát metadat (platné hodnoty jsou „xml“ a „yaml“)." +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Popis" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" -msgstr "Vývojář" +msgstr "Vývojáři" -msgid "Display various information about installed AppStream metadata." -msgstr "Zobrazit různorodé informace o nainstalovaných metadatech AppStream." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Nástroje pro vývoj" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Zobrazit stavové informace o dostupných AppStream metadatech." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Metadata distribuce:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Nepoužívat mezipaměť Xapian, když se provádí požadavek" - -msgid "Don't show colored output" -msgstr "Nezobrazovat výstup obarvený" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Nepoužívat síť." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Neobarvovat výstup." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." -msgstr "Vypsat surová metadata XML pro komponentu s odpovídajícím ID." +msgstr "Vypsat surová XML metadata součásti s tímto identifikátorem." + +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Výuka" +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Prázdné." -msgid "Enforce a cache refresh" -msgstr "Vynutit aktualizaci mezipaměti" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulátory" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Vynutit aktualizaci mezipaměti." +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Chyba při načítání fondu metadat: %s" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Rozšiřuje" -msgid "Extensions" -msgstr "Rozšíření" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Soubor %s nebyl nalezen nebo byl odepřen přístup." +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Zajímavé" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Zajímavé" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Zajímavé" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Zajímavé" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Zajímavé" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Zajímavé" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Zajímavé" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Zajímavé" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Zajímavé" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Souborový systém" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finance" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Trvalý firmware" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Písma" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" -msgstr "Fonty" +msgstr "Písma" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Nalezeno %i součástí v umístěních, jak se už nově nepoužívají." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Nalezeno %i součástí." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Hry" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "Získat komponenty, které poskytují danou položku." +msgstr "Získat součásti, které poskytují danou položku." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "Získat informace o komponentě podle jejího ID." +msgstr "Získat informace o součásti podle jejího identifikátoru." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafika a fotografie" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Domovská stránka" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Integrovaná vývojová prostředí" + +#: tools/ascli-utils.c:288 msgid "Icon" -msgstr "Ikonka" +msgstr "Ikona" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Sady ikon" +#: tools/ascli-utils.c:282 msgid "Identifier" -msgstr "ID" +msgstr "Identifikátor" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Vstupní zdroje" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Nainstalovat soubor s metadaty na správné místo." -msgid "Install software matching the component-id." -msgstr "Nainstalovat software odpovídající ID komponenty." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Nainstalovat software odpovídající identifikátoru součásti." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "Vybrán neplatný typ pro poskytovanou položku. Platné hodnoty jsou:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Dětské" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Jazyková data" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Jazyky" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Knihovny" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licence" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "Ručně nastavit umístění metadat AppStream pro obnovení mezipaměti" - -msgid "Manually set the location of the AppStream cache" -msgstr "Ručně nastavit umístění mezipaměti AppStream" - -msgid "Mimetypes" -msgstr "Typ MIME" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Překlady" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logické" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "MIME typy" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Vytvářet požadavky bez použití mezipaměti." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Ručně nastavené umístění mezipaměti AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Ručně nastavené umístění, ve kterém hledat metadata AppStream." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematika" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematika" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Soubor s metadaty „%s“ neexistuje." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Soubory s metadaty obsahují chyby:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Soubory s metainformacemi:" +#: src/as-provided.c:153 msgid "Modaliases" -msgstr "Modul" +msgstr "Alternativní názvy modulů" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Přehrávače hudby" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Název" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Novinky" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Nebyla nalezena žádná komponenta odpovídající „%s“." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "Nebyla nalezena žádná komponenta poskytující „%s;%s“." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "Žádné ikony." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" "Nebyl nalezen žádný použitelný správné balíčků pro příkazový řádek. " -"Zajistěte prosím, aby byl dostupný například „pkcon“ (součást PackageKit)" +"Zajistěte, aby byl k dispozici například „pkcon“ (součást PackageKit)." + +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "Nezadali jste co se má hledat." -msgid "No value for the item to search for defined." -msgstr "Není určena žádná hodnota pro položku, která se má najít." +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Kancelář" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Neznámá předvolba „%s“." +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Balíček" -msgid "Print detailed output about found components" -msgstr "O nalezené komponentě vypsat podrobnosti" - -msgid "Print even pedantic hints when validating" -msgstr "Při ověřování vypisovat i pedantské rady" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografie" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Vypsat podrobnosti o nalezené součásti." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Skupina projektu" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Poskytované položky" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (veze 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Znovu sestavit mezipaměť s informacemi o komponentách." - -msgid "Remove software matching the component-id." -msgstr "Odebrat software odpovídající komponentě s ID." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Znovu vytvořit mezipaměť metadat součástí." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Odebrat software odpovídající identifikátoru součásti." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotika" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "RPG" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" -"Spuštěním „%s --help“ si zobrazíte úplný seznam možných přepínačů " +"Spuštěním „%s --help“ si zobrazíte úplný seznam možných předvoleb " "příkazového řádku." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Spuštěním „%s --help“ si zobrazíte úplný seznam možných předvoleb " +"příkazového řádku a „%s %s --help“ těch pro konkrétní dílčí příkaz." + +#: src/as-provided.c:163 msgid "Runtime Firmware" -msgstr "Nahrávaný firmware" +msgstr "Dočasně nahrávaný firmware" -msgid "Sample Screenshot URL" -msgstr "URL snímku obrazovky s ukázkou" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Skenování" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Věda" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "Prohledat databázi komponent." - -msgid "Select a value for the provides-item which needs to be found." -msgstr "Vybrat hodnotu pro poskytující položku, kterou potřebujete najít." +msgstr "Prohledat databázi součástí." -msgid "Show extra debugging information" -msgstr "Zobrazovat doplňující informace pro ladění" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Zabezpečení" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Zobrazovat doplňující informace pro ladění." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Zobrazit verzi programu." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sporty" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategie" -msgid "Show the program version" -msgstr "Zobrazit verzi programu" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Dílčí příkazy:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Shrnutí" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Shrnutí:" -msgid "The system metadata cache does not exist." -msgstr "Mezipaměť se systémovými metadaty neexistuje." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Dohledování systému" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emulátory terminálu" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Textové editory" -msgid "The system metadata cache exists." -msgstr "Mezipaměť se systémovými metadaty existuje." +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Soubor .desktop pro „%s“ neexistuje." +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"Mezipaměť systému AppStream byla aktualizována, ale byly zjištěny některé " +"chyby, což může vést k chybějícím metadatům. Podrobnější informace naleznete " +"ve výřečněji nastaveném záznamu událostí." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "Je třeba, aby TYPE (typ) byl platný typ komponenty, jako např.: %s" + +#: tools/ascli-actions-mdata.c:446 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "Při pokusu vyhledat doplňující informace nastala chyba: %s" +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"Typ „%s“ softwarové součásti není platný pro AppStream. Možné hodnoty jsou:" -msgid "Tried to perform query on closed database." -msgstr "Pokus o provedení dotazu na zavřené databázi." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"Tento příkaz přijímá volitelné poziční parametry TYPE (typ) a FILE (soubor), " +"kde FILE je soubor do kterého zapsat (nebo „-“ pro standardní výstup)." -#. TRANSLATORS: We failed to find any component in the database due to an error +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Tento nástroj umožňuje čtení, zápis, ověřování a přeměnu AppStream XML nebo " +"YAML metadat. Také zpřístupňuje systémový fond metadat například pro " +"dotazování se na software, poskytující konkrétní MIME typ a jeho instalaci " +"na základě identifikátoru softwarové součásti." + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "Nepodařilo se vytvořit soubor s šablonou metainformací: „%s“" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Nedaří se převést soubor: Nepodařilo se zjistit výstupní formát, nastavte ho " +"výslovně pomocí přepínače „--format“." + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "Nelze najít komponentu odpovídající %s." +msgstr "Nepodařilo se nalézt součást odpovídající %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Nelze najít komponentu poskytující „%s;%s“" +msgid "Unable to find component with ID '%s'!" +msgstr "Nepodařilo se nalézt součást s identifikátorem „%s“!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Nelze najít komponentu s ID „%s“." +msgid "Unable to read the .desktop file: %s" +msgstr "Nedaří se načíst .desktop soubor: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "Nelze otevřít mezipaměť softwarových komponent AppStream." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Nedaří se uložit soubor s metainformacemi šablony: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "Nelze spustit správce balíčků: %s" +msgstr "Nepodařilo se spustit správce balíčků: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -"Nelze zapisovat do „%s“, proto nelze nainstalovat soubor s metainformacemi." +"Nedaří se zapisovat do „%s“, proto nelze nainstalovat soubor s " +"metainformacemi." + +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Neznámý příkaz „%s“." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Použít daný .desktop soubor pro vyplnění základních hodnot do souboru s " +"metainformacemi." -msgid "Upstream metadata:" -msgstr "Metadata z projektu:" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Nástroje" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." -msgstr "Ověřit, jestli soubor XML ve formátu AppStream neobsahuje chyby." +msgstr "Ověřit zda XML AppStream soubor neobsahuje chyby." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -"Ověřit nainstalovaný strom souborů aplikace, jestli obsahuje platná metadata." +"Ověřit zda nainstalovaný strom souborů aplikace obsahuje platná metadata." -msgid "Validation failed." -msgstr "Ověření selhalo." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Ověření se nezdařilo: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Ověření bylo úspěšné." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "Ověření bylo úspěšné: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Hodnota položky která má být nalezena." +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vektorová grafika" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "Soubor XML „%s“ s XDG Menu je poškozený." +msgid "Version: %s" +msgstr "Verze: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Prohlížeče" +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "Je k dispozici informace o %i softwarové součásti." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Webové prohlížeče" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Textový procesor" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Informace o přepínačích pro konkrétní dílčí příkazy obdržíte připojením „--" +"help“ (nápověda) k dílčímu příkazu." + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" -"K provedení této činnosti možná budete potřebovat oprávnění superuživatele." +"K provedení této činnosti možná budete potřebovat oprávnění správce systému." + +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Aby bylo možné vytvořit šablonu, je třeba zadat typ softwarové součásti " +"AppStream. Možné hodnoty jsou:" +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." -msgstr "Musíte zadat příkaz." +msgstr "Je třeba zadat příkaz." -msgid "You need to specify a component-id." -msgstr "Musíte určit ID komponenty" +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Je třeba zadat identifikátor součásti." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "Musíte určit soubor, který se má ověřit." +msgstr "Je třeba určit soubor, který má být ověřen!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "Musíte uvést soubor s metadaty." +msgstr "Je třeba určit soubor s metadaty." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" -msgstr "Aby mohlo začít ověřování, musíte zadat kořenovou složku." +msgstr "Aby mohlo začít ověřování, je třeba zadat kořenovou složku!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." -msgstr "Musíte zadat výraz, který se má hledat." +msgstr "Je třeba zadat výraz, který se má hledat." + +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Je třeba zadat vstupní a výstupní soubor." #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, @@ -373,6 +985,65 @@ #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" -"app;apka;aplikace;balíček;balík;program;sada;příslušenství;nástroj;pomůcka;" +"app;apka;aplikace;balíček;balík;program;sada;příslušenství;nástroj;pomůcka" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "chyby: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "informace: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "drobnosti: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "varování: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Neznámý příkaz „%s“." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Při dotazování nepoužívat žádné mezipaměti." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Aktualizace mezipaměti AppStreamu selhala." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategorie" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategorie" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategorie" + +#~ msgid "Extensions" +#~ msgstr "Rozšíření" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Soubor %s nebyl nalezen nebo byl odepřen přístup!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Nebyla nalezena žádná komponenta poskytující „%s;%s“." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "Soubor XML „%s“ s XDG Menu je poškozený." diff -Nru appstream-0.9.4/po/cy.po appstream-0.12.0/po/cy.po --- appstream-0.9.4/po/cy.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/cy.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,362 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Welsh (http://www.transifex.com/freedesktop/appstream/" -"language/cy/)\n" -"Language: cy\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != " -"11) ? 2 : 3;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/da.po appstream-0.12.0/po/da.po --- appstream-0.9.4/po/da.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/da.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,10 +7,10 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2016-08-15 18:48+0000\n" +"Last-Translator: Matthias Klumpp \n" "Language-Team: Danish (http://www.transifex.com/freedesktop/appstream/" "language/da/)\n" "Language: da\n" @@ -19,349 +19,1001 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "En provides-item-type (f.eks. lib, bin, python3 ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "" + +#: src/as-category.c:168 +#, fuzzy +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Kategorier" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "" + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "AppStreams opdatering af mellemlageret er færdig." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"AppStreams mellemlageropdatering er færdig, men nogle metatdata blev " -"ignoreret på grund af fejl." - -#, c-format -msgid "AppStream cache update failed." -msgstr "AppStreams mellemlageropdatering mislykkedes." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" msgstr "" +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." +msgstr "" + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" msgstr "" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategorier" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Kommandoen »%s« er ukendt." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Tvungen for" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, fuzzy, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Kan ikke finde komponent med id »%s«!" + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +#, fuzzy +msgid "Default Screenshot URL" +msgstr "Prøv på skærmbilledeadresse" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Beskrivelse" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Udvikler" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +#, fuzzy +msgid "Developer Tools" +msgstr "Udvikler" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +#, fuzzy +msgid "Don't show colored output." msgstr "Vis ikke farvet resultat" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "" -msgid "Enforce a cache refresh" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +#, fuzzy +msgid "Enforce a cache refresh." msgstr "Fremtving en opdatering af mellemlageret" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "" -msgid "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Filen %s blev ikke fundet eller tilladelse nægtet!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Hjemmeside" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ikon" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identifikator" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licens" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" msgstr "" -"Sæt manuelt placeringen af AppStream-metadata for mellemlagerregenerering" -msgid "Manually set the location of the AppStream cache" +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." msgstr "Sæt manuelt placeringen af AppStreams mellemlager" -msgid "Mimetypes" +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" +"Sæt manuelt placeringen af AppStream-metadata for mellemlagerregenerering" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" msgstr "" +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Navn" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Ingen komponent der matcher »%s« blev fundet." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "" +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, fuzzy, c-format +msgid "Option '%s' is unknown." +msgstr "Kommandoen »%s« er ukendt." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Pakke" -msgid "Print detailed output about found components" -msgstr "Udskriv et detaljeret resultat om fundne komponenter" - -msgid "Print even pedantic hints when validating" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" msgstr "" +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +#, fuzzy +msgid "Print detailed output about found components." +msgstr "Udskriv et detaljeret resultat om fundne komponenter" + #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Projektgruppe" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Tilbudte elementer" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "" +#: src/as-provided.c:157 msgid "Python 3" msgstr "" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." msgstr "" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "" +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Kør »%s --help« for at se en fuld liste over tilgængelige tilvalg for " "kommandolinjen." +#: tools/appstream-cli.c:187 +#, fuzzy, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Kør »%s --help« for at se en fuld liste over tilgængelige tilvalg for " +"kommandolinjen." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" -msgstr "Prøv på skærmbilledeadresse" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "" -msgid "Select a value for the provides-item which needs to be found." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" msgstr "" -msgid "Show extra debugging information" +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +#, fuzzy +msgid "Show extra debugging information." msgstr "Vis ekstra fejlsøgningsinformation" -msgid "Show the program version" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +#, fuzzy +msgid "Show the program version." msgstr "Vis programversionen" -#. these are commands we can use with appstream-cli +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Underkommandoer:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Resume" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "" -msgid "The system metadata cache does not exist." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" msgstr "" -msgid "The system metadata cache exists." +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" msgstr "" +#: tools/ascli-actions-mdata.c:464 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "The .desktop file '%s' does not exist." msgstr "" -msgid "Tried to perform query on closed database." +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 #, c-format -msgid "Unable to find component matching %s!" -msgstr "Kan ikke finde komponent der matcher %s!" +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "Unable to find component providing '%s;%s'!" +msgid "Unable to build the template metainfo file: %s" +msgstr "" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to find component matching %s!" +msgstr "Kan ikke finde komponent der matcher %s!" + +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 +#, fuzzy, c-format +msgid "Unable to find component with ID '%s'!" msgstr "Kan ikke finde komponent med id »%s«!" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:470 +#, c-format +msgid "Unable to read the .desktop file: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, fuzzy, c-format +msgid "Validation failed: %s" msgstr "Validering mislykkedes." +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "" +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." +msgid "Validation was successful: %s" +msgstr "" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." msgstr "" +#: src/as-category.c:177 +#, fuzzy +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Kategorier" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XDG Menu XML-file »%s« er ødelagt." +msgid "Version: %s" +msgstr "" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "" + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Du skal specificere en kommando." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +#, fuzzy +msgid "You need to specify a component-ID." msgstr "Du skal specificere en komponent-id." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Du skal specificere en fil at validere!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Du skal specificere en term at søge for." +#: tools/ascli-actions-mdata.c:354 +#, fuzzy +msgid "You need to specify an input and output file." +msgstr "Du skal specificere en kommando." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;applikation;pakke;program;suite;programpakke;værktøj;redskab" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Kommandoen »%s« er ukendt." + +#~ msgid "AppStream cache update failed." +#~ msgstr "AppStreams mellemlageropdatering mislykkedes." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategorier" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategorier" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategorier" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Filen %s blev ikke fundet eller tilladelse nægtet!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Ingen komponent der matcher »%s« blev fundet." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XDG Menu XML-file »%s« er ødelagt." diff -Nru appstream-0.9.4/po/de.po appstream-0.12.0/po/de.po --- appstream-0.9.4/po/de.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/de.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,221 +1,603 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: # Ettore Atalan , 2014-2016 # Mario Blättermann , 2016 -# Matthias K. , 2014 +# Matthias Klumpp , 2014 msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: German (http://www.transifex.com/freedesktop/appstream/" -"language/de/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-01-24 12:14+0000\n" +"Last-Translator: Andreas Kleinert \n" +"Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.19-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Ein Stellt-bereit-Eintragstyp (z.B. lib, bin, python3, …)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Befehl „%s”" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D-Grafik" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Aktion" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Erweiterungen" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Abenteuer" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Auch kleinste Hinweise anzeigen." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Ein Elementtyp (z.B. lib, bin, python3, …)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Ein Dienstprogramm zum Arbeiten mit AppStream-Metadaten" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream CLI" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "AppStream-CLI-Werkzeugversion: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"AppStream-CLI-Werkzeugversion: %s\n" +"AppStream-Bibliothekenversion: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "AppStream-Status:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "AppStream-Zwischenspeicher wurde erfolgreich vervollständigt." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Aktualisierung des AppStream-Zwischenspeichers war erfolgreich, aber einige " -"Metadaten wurden wegen Fehlern ignoriert." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Aktualisierung des AppStream-Zwischenspeichers ist fehlgeschlagen." +"AppStream-Zwischenspeicheraktualisierung fehlgeschlagen. Aktivieren Sie den " +"Ausführungsmodus, um detailliertere Fehlerinformationen zu erhalten." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "Aktualisierung des AppStream-Zwischenspeichers ist nicht nötig." +msgstr "" +"Zwischenspeicher wurde nicht aktualisiert, so dass das Aktualisierung nicht " +"notwendig war." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "AppStream-Befehlszeilenoberfläche" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"AppStream-Softwarekomponenten-Zwischenspeicher wurde nicht gefunden. Dies " -"könnte bedeuten, dass AppStream falsch eingerichtet wurde oder Ihre " -"Distribution keine AppStream-Metadaten bereitstellt." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream ist eine Distributionsübergreifende Spezifikation zur " +"Bereitstellung von Metadaten über Softwarekomponenten." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"AppStream-Systemzwischenspeicher wurde aktualisiert, aber es wurden folgende " +"Probleme gefunden: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream-Version: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arkade" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Künstliche Intelligenz" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomie" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomie" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Audio und Video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Audioerstellung und Bearbeitung" +#: src/as-provided.c:147 msgid "Binaries" msgstr "Binärdateien" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Blockspiele" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Brettspiele" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Bündel" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "Zwischenspeicheradresse '%s' ist nicht schreibbar." +msgstr "Zwischenspeicheradresse „%s” ist nicht beschreibbar." + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalender" +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"Kann '%s' nicht kopieren: Datei hat keine '.metainfo.xml'- oder '.appdata." -"xml'-Erweiterung." +"„%s” konnte nicht kopiert werden: Datei besitzt keine „. metainfo.xml”- oder " +"„.appdata.xml”-Dateiendung." +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kartenspiele" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategorien" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Kommando '%s' ist unbekannt." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Textunterhaltung" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Chemie" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Chemie" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Codecs" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Kommunikation und Nachrichten" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Komponente" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "Komponente »%s« hat keinen Installationskandidaten." +msgstr "Die Komponente „%s” besitzt keinen Installationskandidaten." +#: tools/ascli-utils.c:364 msgid "Compulsory for" -msgstr "Obligatorisch für" +msgstr "Verpflichtend für" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Konvertiert XML-Sammlungen nach YAML und umgekehrt" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Es konnte keine Komponente gefunden werden, die „%s;%s” bereitstellt." + +#: tools/appstream-cli.c:620 +#, fuzzy +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Erstellen Sie eine Vorlage für eine Metainfo-Datei (die vom vorgelagerten " +"Projekt auszufüllen ist)." +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "DBus-Sitzungsdienste" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "DBus-Systemdienste" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Datenbank" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Fehlerdiagnose" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Standardadresse für Bildschirmfotos" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Standard-Metadatenformat (gültige Werte sind „XML” und „YAML”)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Beschreibung" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Entwickler" -msgid "Display various information about installed AppStream metadata." -msgstr "" -"Verschiedene Informationen über installierte AppStream-Metadaten anzeigen." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Entwicklerwerkzeuge" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Statusinformationen über verfügbare AppStream-Metadaten anzeigen." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Distributions-Metadaten:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Xapian-Zwischenspeicher beim Ausführen der Anfrage nicht verwenden" - -msgid "Don't show colored output" -msgstr "Keine farbige Ausgabe anzeigen" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Keinen Netzwerkzugriff verwenden." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Keine farbige Ausgabe anzeigen." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "Roh-XML-Metadaten für eine zur Kennung passende Komponente ausgeben." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Bildung" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Leer." -msgid "Enforce a cache refresh" -msgstr "Aktualisierung des Zwischenspeichers erzwingen" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulatoren" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Aktualisierung des Zwischenspeichers erzwingen." + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Fehler beim Laden das Metadatenpools: %s" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Erweitert" -msgid "Extensions" -msgstr "Erweiterungen" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Datei %s nicht gefunden oder Zugriff verweigert!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Vorgestellt" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Vorgestellt" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Vorgestellt" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Vorgestellt" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Vorgestellt" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Vorgestellt" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Vorgestellt" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Vorgestellt" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Vorgestellt" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Dateisystem" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finanzen" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Aufgespielte Firmware" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Schriftarten" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "Schriftarten" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "%i Komponenten in veralteten Pfaden gefunden." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "%i Komponenten gefunden." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Spiele" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "Komponenten ermitteln, die das angegebene Objekt bereitstellen." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "Informationen zu einer Komponente anhand deren ID ermitteln." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafik und Fotografie" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Homepage" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Entwicklungsumgebungen" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Symbol" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Symbolsätze" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Bezeichner" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Eingabequellen" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Metadaten im richtigen Ort installieren." -msgid "Install software matching the component-id." -msgstr "Software mit passender Komponentenkennung installieren." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Anwendung mit passender Komponentenkennung installieren." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" "Ungültiger Typ für bereitgestelltes Objekt angegeben. Gültige Werte sind:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Kinder" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Sprachpakete" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Sprachen" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Bibliotheken" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Lizenz" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" -"Ort der AppStream-Metadaten zur Neuerstellung des Zwischenspeichers manuell " -"angeben" - -msgid "Manually set the location of the AppStream cache" -msgstr "Ort des AppStream-Zwischenspeichers manuell angeben" - -msgid "Mimetypes" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Lokalisierung" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logik" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" msgstr "MIME-Typen" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Stellen Sie eine Anfrage ohne Zwischenspeicherung." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Ort des AppStream-Zwischenspeichers manuell angeben." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Ort der AppStream-Metadaten manuell angeben." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Mathematik" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Mathematik" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Metadaten-Datei »%s« existiert nicht." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Metadaten-Dateien haben Fehler:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Metainfo-Dateien:" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Modaliase" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Musikwiedergabe" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Name" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Nachrichten" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Es wurde keine auf »%s« passende Komponente gefunden." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "Keine Komponente gefunden, die »%s;%s« bereitstellt." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "Keine Symbole" +msgstr "Keine Symbole." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -224,166 +606,464 @@ "Bitte stellen Sie sicher, dass zum Beispiel »pkcon« (Teil von PackageKit) " "verfügbar ist." -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "Kein Wert für das zu suchende Objekt angegeben." +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Büro" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Option '%s' ist unbekannt." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paket" -msgid "Print detailed output about found components" -msgstr "Detaillierte Ausgabe über gefundene Komponenten ausgeben" - -msgid "Print even pedantic hints when validating" -msgstr "Sogar pedantische Hinweise bei der Validierung ausgeben" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografie" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Detaillierte Ausgabe über gefundene Komponenten ausgeben." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Projektgruppe" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Bereitgestellte Objekte" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (Version 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Informations-Zwischenspeicher der Komponente neu erstellen." - -msgid "Remove software matching the component-id." -msgstr "Software mit passender Komponentenkennung entfernen." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Metadaten-Zwischenspeicher der Komponente neu erstellen." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Anwendung mit passender Komponentenkennung entfernen." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotik" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Rollenspiele" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Rufen Sie »%s --help« auf, um eine vollständige Liste der verfügbaren " "Befehlszeilenoptionen zu sehen." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Rufen Sie »%s --help« auf, um eine Liste der verfügbaren Befehle und " +"Optionen zu sehen. Rufen Sie »%s %s --help« auf, um eine Liste der " +"spezifischen Optionen für diesen Unterbefehl zu erhalten." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Laufzeit-Firmware" -msgid "Sample Screenshot URL" -msgstr "Adresse des Beispiel-Bildschirmfotos" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Scannen" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Wissenschaft" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Komponentendatenbank durchsuchen." -msgid "Select a value for the provides-item which needs to be found." -msgstr "" -"Einen Wert für den Stellt-bereit-Eintrag wählen, der gefunden werden soll." - -msgid "Show extra debugging information" -msgstr "Zusätzliche Fehlersuchinformationen anzeigen" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Sicherheit" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Zusätzliche Fehlersuchinformationen anzeigen." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Programmversion anzeigen." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sport" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategie" -msgid "Show the program version" -msgstr "Programmversion anzeigen" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Unterbefehle:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Zusammenfassung" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Zusammenfassung:" -msgid "The system metadata cache does not exist." -msgstr "Der Systemmetadaten-Zwischenspeicher ist nicht vorhanden." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Systemüberwachung" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Terminal-Emulatoren" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Textbearbeitung" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Die .desktop Datei »%s« ist nicht vorhanden." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"Der AppStream-Systemzwischenspeicher wurde aktualisiert, aber es wurden " +"einige Fehler entdeckt, die zu fehlenden Metadaten führen könnten. Weitere " +"Informationen finden Sie im ausführlichen Protokoll." -msgid "The system metadata cache exists." -msgstr "Der Systemmetadaten-Zwischenspeicher ist vorhanden." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "Der TYPE muss ein gültiger Komponententyp sein, Beispielsweise: %s" +#: tools/ascli-actions-mdata.c:446 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" -"Es gab einen Fehler beim Versuch zusätzliche Informationen zu finden: %s" +"Der Software-Komponententyp „%s” ist in AppStream nicht gültig. Mögliche " +"Werte sind:" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"Dieser Befehl verwendet optionale TYPE- und FILE-Positionsargumente, wobei " +"FILE eine Datei ist, in die geschrieben werden muss (oder „-” für die " +"Standardausgabe)." + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Dieses Werkzeug ermöglicht das Lesen, Schreiben, Überprüfen und Umwandeln " +"von AppStream XML- oder YAML-Metadaten. Es erlaubt auch den Zugriff auf den " +"System-Metadaten-Pool, z. B. Abfrage nach Anwendungen, die einen bestimmten " +"MIME-Typ liefert und Installation anhand der Softwarekomponentenkennung." + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "Nicht in der Lage, die Metainfo Vorlagendatei zu erstellen: %s" -msgid "Tried to perform query on closed database." -msgstr "Es wurde versucht, eine geschlossene Datenbank abzufragen." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Datei kann nicht umgewandelt werden: Das Ausgabeformat konnte nicht bestimmt " +"werden. Bitte legen Sie es explizit mit »--format=« fest." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "Eine %s entsprechende Komponente konnte nicht gefunden werden!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Es konnte keine Komponente gefunden werden, die »%s;%s« bereitstellt!" +msgid "Unable to find component with ID '%s'!" +msgstr "Komponente mit Kennung »%s« kann nicht gefunden werden!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Komponente mit Kennung »%s« kann nicht gefunden werden!" +msgid "Unable to read the .desktop file: %s" +msgstr "Die .desktop-Datei konnte nicht gelesen werden: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" -"Der Zwischenspeicher der AppStream-Softwarekomponente konnte nicht geöffnet " -"werden." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Die Metainfo-Datei der Vorlage kann nicht gespeichert werden: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Paketverwaltung konnte nicht aufgerufen werden: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" "'%s' kann nicht geschrieben werden, kann metainfo-Datei nicht installieren." -msgid "Upstream metadata:" -msgstr "Vorgeschaltete Metadaten:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Unbekannter Befehl „%s”" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Verwenden Sie die angegebene .desktop-Datei, um Grundwerte in die Metainfo-" +"Datei einzutragen." +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Hilfsprogramme" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "AppStream-XML-Dateien für Probleme validieren." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" "Einen installierten Dateibaum einer Anwendung auf gültige Metadaten " "validieren." -msgid "Validation failed." -msgstr "Validierung fehlgeschlagen." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Validierung fehlgeschlagen: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Validierung war erfolgreich." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "Validierung war erfolgreich: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Wert des Objekts, das gefunden werden soll." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vectorgrafik" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Version: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Betrachter" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "Wir haben Informationen zu %i Softwarekomponenten." -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XDG-Menü-XML-Datei »%s« ist beschädigt." +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Internet-Browser" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Textverarbeitung" +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Sie erhalten Informationen zu Optionen für einen Unterbefehl, indem Sie »--" +"help« an den Unterbefehl weitergeben." + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" "Sie brauchen vielleicht Administratorrechte, um diese Aktion auszuführen." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Um eine Vorlage zu erstellen, müssen Sie einen Softwarekomponententyp " +"AppStream angeben. Mögliche Werte sind:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Sie müssen einen Befehl angeben." -msgid "You need to specify a component-id." -msgstr "Sie müssen eine Komponentenkennung angeben." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Sie müssen eine Komponenten-ID angeben." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "Sie müssen eine Datei zum Überprüfen angeben." +msgstr "Sie müssen eine Datei zum Überprüfen angeben!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "Sie müssen eine Metadatendatei angeben." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" "Sie müssen ein Root-Verzeichnis angeben, um die Validierung zu starten!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Sie müssen einen Suchbegriff angeben." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Sie müssen eine Eingabe- und Ausgabedatei angeben." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;anwendung;paket;programm;programme;suite;werkzeug" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "Fehler: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "Informationen: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "Genau: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "Warnhinweise: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Unbekanntes Kommando „%s”" + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Keinen Zwischenspeicher beim Ausführen des Anfrage verwenden." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Aktualisierung des AppStream-Zwischenspeichers ist fehlgeschlagen." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "AppStream-Datenpool wurde geladen, aber einige Metadaten wurden wegen " +#~ "Fehlern ignoriert." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "Kann nicht nach unbekanntem Komponententyp suchen." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategorien" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategorien" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategorien" + +#~ msgid "Extensions" +#~ msgstr "Erweiterungen" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Datei %s nicht gefunden oder Zugriff verweigert!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Keine Komponente gefunden, die »%s;%s« bereitstellt." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XDG-Menü-XML-Datei »%s« ist beschädigt." diff -Nru appstream-0.9.4/po/el.po appstream-0.12.0/po/el.po --- appstream-0.9.4/po/el.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/el.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Greek (http://www.transifex.com/freedesktop/appstream/" -"language/el/)\n" -"Language: el\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/en_GB.po appstream-0.12.0/po/en_GB.po --- appstream-0.9.4/po/en_GB.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/en_GB.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,207 +7,590 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: English (United Kingdom) (http://www.transifex.com/" -"freedesktop/appstream/language/en_GB/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2016-11-08 04:33+0000\n" +"Last-Translator: John Vandenberg \n" +"Language-Team: English (United Kingdom) \n" "Language: en_GB\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "A provides-item type (e.g. lib, bin, python3, ...)" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.9\n" +#: tools/appstream-cli.c:146 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "'%s' command" +msgstr "" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D Graphics" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +#, fuzzy +msgid "Also show pedantic hints." +msgstr "Also print pedantic hints when validating." + +#: tools/appstream-cli.c:604 +#, fuzzy +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "An item type (e.g. lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +#, fuzzy +msgid "AppStream CLI" +msgstr "AppStream Status:" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "AppStream CLI tool version: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "AppStream Status:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "AppStream cache update completed successfully." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." - -#, c-format -msgid "AppStream cache update failed." -msgstr "AppStream cache update failed." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "AppStream cache update is not necessary." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "AppStream command-line interface" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "AppStream CLI tool version: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "" +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Binaries" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Bundle" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "Cache location '%s' is not writable." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Categories" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Command '%s' is unknown." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "" +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "Component '%s' has no installation candidate." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Compulsory for" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, fuzzy, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Unable to find component providing '%s;%s'!" + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "DBus Session Services" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "DBus System Services" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +#, fuzzy +msgid "Default Screenshot URL" +msgstr "Sample Screenshot URL" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Description" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Developer" -msgid "Display various information about installed AppStream metadata." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +#, fuzzy +msgid "Developer Tools" +msgstr "Developer" +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Display status information about available AppStream metadata." + +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" -msgstr "" +msgstr "Distribution metadata:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +#, fuzzy +msgid "Don't show colored output." msgstr "Don't show coloured output" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "Dump raw XML metadata for a component matching the ID." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." +msgstr "Empty." + +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" msgstr "" -msgid "Enforce a cache refresh" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +#, fuzzy +msgid "Enforce a cache refresh." msgstr "Enforce a cache refresh" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Extends" -msgid "Extensions" -msgstr "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "File %s not found or permission denied!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "" + +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Flashed Firmware" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Fonts" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "Fonts" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Found %i components in legacy paths." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." +msgstr "Found %i components." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" msgstr "" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "Get components which provide the given item." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "Get information about a component by its ID." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Homepage" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Icon" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Iconsets" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identifier" -msgid "Install a metadata file into the right location." +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:617 +msgid "Install a metadata file into the right location." +msgstr "Install a metadata file into the right location." + +#: tools/appstream-cli.c:613 +#, fuzzy +msgid "Install software matching the component-ID." msgstr "Install software matching the component-id." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "Invalid type for provided item selected. Valid values are:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Libraries" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licence" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "" -msgid "Manually set the location of the AppStream cache" -msgstr "Manually set the location of the AppStream cache" +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "" -msgid "Mimetypes" +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" msgstr "Mimetypes" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "Manually set the location of the AppStream cache" + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Manually set the location of AppStream metadata for cache regeneration" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Metainfo files:" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Modaliases" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Name" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "No component matching '%s' found." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "No component providing '%s;%s' found." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "No icons." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -215,155 +598,433 @@ "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +#, fuzzy +msgid "No value for the item to search for was defined." msgstr "No value for the item to search for defined." +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, fuzzy, c-format +msgid "Option '%s' is unknown." +msgstr "Command '%s' is unknown." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Package" -msgid "Print detailed output about found components" -msgstr "Print detailed output about found components" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "" -msgid "Print even pedantic hints when validating" -msgstr "Print even pedantic hints when validating" +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +#, fuzzy +msgid "Print detailed output about found components." +msgstr "Print detailed output about found components" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Project Group" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Provided Items" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (Version 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Rebuild the component metadata cache." + +#: tools/appstream-cli.c:614 +#, fuzzy +msgid "Remove software matching the component-ID." +msgstr "Remove software matching the component-id." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "" -msgid "Remove software matching the component-id." +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" msgstr "" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "Run '%s --help' to see a full list of available command line options." +#: tools/appstream-cli.c:187 +#, fuzzy, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "Run '%s --help' to see a full list of available command line options." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Runtime Firmware" -msgid "Sample Screenshot URL" -msgstr "Sample Screenshot URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Search the component database." -msgid "Select a value for the provides-item which needs to be found." -msgstr "Select a value for the provides-item which needs to be found." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "" -msgid "Show extra debugging information" +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +#, fuzzy +msgid "Show extra debugging information." msgstr "Show extra debugging information" -msgid "Show the program version" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +#, fuzzy +msgid "Show the program version." msgstr "Show the program version" -#. these are commands we can use with appstream-cli +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Subcommands:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Summary" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Summary:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" msgstr "" -msgid "The system metadata cache does not exist." +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" msgstr "" -msgid "The system metadata cache exists." +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" msgstr "" +#: tools/ascli-actions-mdata.c:464 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "The .desktop file '%s' does not exist." msgstr "" -msgid "Tried to perform query on closed database." -msgstr "Tried to perform query on closed database." +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 #, c-format -msgid "Unable to find component matching %s!" -msgstr "Unable to find component matching %s!" +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" +#: tools/ascli-actions-mdata.c:446 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Unable to find component providing '%s;%s'!" +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" + +#: tools/ascli-actions-mdata.c:541 +#, fuzzy, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "Unable to write to '%s', can not install metainfo file." + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to find component matching %s!" +msgstr "Unable to find component matching %s!" + +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 +#, fuzzy, c-format +msgid "Unable to find component with ID '%s'!" msgstr "Unable to find component with id '%s'!" -msgid "Unable to open the AppStream software component cache." -msgstr "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:470 +#, c-format +msgid "Unable to read the .desktop file: %s" +msgstr "" +#: tools/ascli-actions-mdata.c:549 +#, fuzzy, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Unable to write to '%s', can not install metainfo file." + +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Unable to spawn package manager: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." +msgstr "Unable to write to '%s', can not install metainfo file." + +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" msgstr "" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "Validate AppStream XML files for issues." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "Validate an installed file-tree of an application for valid metadata." -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, fuzzy, c-format +msgid "Validation failed: %s" msgstr "Validation failed." +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Validation was successful." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, fuzzy, c-format +msgid "Validation was successful: %s" +msgstr "Validation was successful." + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Value of the item that should be found." + +#: src/as-category.c:177 +#, fuzzy +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Categories" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "We have information on %i software components." +msgid "Version: %s" +msgstr "Version: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" msgstr "" +#: tools/ascli-actions-misc.c:151 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XDG Menu XML file '%s' is damaged." +msgid "We have information on %i software components." +msgstr "We have information on %i software components." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "You might need superuser permissions to perform this action." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "You need to specify a command." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +#, fuzzy +msgid "You need to specify a component-ID." msgstr "You need to specify a component-id." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "You need to specify a file to validate!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "You need to specify a metadata file." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "You need to specify a root directory to start validation!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "You need to specify a term to search for." +#: tools/ascli-actions-mdata.c:354 +#, fuzzy +msgid "You need to specify an input and output file." +msgstr "You need to specify a metadata file." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;application;package;program;programme;suite;tool" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Command '%s' is unknown." + +#, fuzzy +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Do not use the Xapian cache when performing the request" + +#~ msgid "AppStream cache update failed." +#~ msgstr "AppStream cache update failed." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Categories" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Categories" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Categories" + +#~ msgid "Extensions" +#~ msgstr "Extensions" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "File %s not found or permission denied!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "No component providing '%s;%s' found." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XDG Menu XML file '%s' is damaged." diff -Nru appstream-0.9.4/po/eo.po appstream-0.12.0/po/eo.po --- appstream-0.9.4/po/eo.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/eo.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Esperanto (http://www.transifex.com/freedesktop/appstream/" -"language/eo/)\n" -"Language: eo\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/es.po appstream-0.12.0/po/es.po --- appstream-0.9.4/po/es.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/es.po 2018-04-04 15:53:56.000000000 +0000 @@ -3,365 +3,1067 @@ # This file is distributed under the same license as the appstream package. # # Translators: -# Adolfo Jayme Barrientos, 2014 -# Adolfo Jayme Barrientos, 2016 +# Adolfo Jayme-Barrientos, 2014 +# Adolfo Jayme-Barrientos, 2016 msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Spanish (http://www.transifex.com/freedesktop/appstream/" -"language/es/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2017-07-02 00:00+0000\n" +"Last-Translator: Piotr Drąg \n" +"Language-Team: Spanish \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.16-dev\n" +#: tools/appstream-cli.c:146 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" +msgid "'%s' command" +msgstr "Orden «%s»" +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Gráficos en 3D" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Acción" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Complementos" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Aventura" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "" + +#: tools/appstream-cli.c:604 +#, fuzzy +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Un tipo de elemento (p. ej., lib, bin, python3…)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Utilidad para trabajar con metadatos de AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "Interfaz de consola de AppStream" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "Versión de la herramienta de consola de AppStream: %s" + +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "Estado de AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "" +"Ha finalizado la actualización de la antememoria de AppStream correctamente." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +"Falló la actualización de la antememoria de AppStream. Active el modo " +"detallado para obtener más información sobre el problema." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "" +msgstr "No es necesaria la actualización de antememoria de AppStream." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Interfaz de consola de AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" +"AppStream es una especificación diseñada para funcionar en cualquier " +"distribución cuyo fin es proporcionar metadatos sobre componentes de " +"«software»." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"Se ha actualizado la antememoria de sistema de AppStream, pero se han " +"encontrado problemas: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "Versión de la herramienta de consola de AppStream: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Máquina recreativa" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Inteligencia artificial" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomía" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomía" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Audio y vídeo" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Creación y edición de audio" +#: src/as-provided.c:147 msgid "Binaries" msgstr "Binarios" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Bloques" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "De mesa" + +#: tools/ascli-utils.c:286 msgid "Bundle" -msgstr "" +msgstr "Agrupación" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "" +msgstr "La zona de almacenamiento temporal «%s» no es de escritura." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Calendario" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +"No se puede copiar «%s»: el archivo no tiene el sufijo «.metainfo.xml» o «." +"appdata.xml»." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Tarjeta" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Categorías" -#, c-format -msgid "Command '%s' is unknown." -msgstr "La orden «%s» es desconocida." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Charla" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Química" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Química" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Códecs" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Comunicación y noticias" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "El componente «%s» no posee ningún candidato de instalación." +#: tools/ascli-utils.c:364 msgid "Compulsory for" +msgstr "Obligatorio para" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Convertir XML de colecta en YAML o viceversa." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "No se pudo encontrar un componente que proporcione «%s::%s»." + +#: tools/appstream-cli.c:620 +#, fuzzy +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." msgstr "" +"Crear una plantilla de archivo «metainfo» (que rellenará el proyecto " +"original)." +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "Servicios de sesión de DBus" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "Servicios de sistema de DBus" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Base de datos" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Depuradores" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL predeterminado de captura de pantalla" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +#, fuzzy +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" +"Utilizar de manera predeterminada el formato de metadatos dado (valores " +"válidos: «xml» y «yaml»)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Descripción" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" -msgstr "Desarrollador" +msgstr "Programador" + +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Herramientas de programación" -msgid "Display various information about installed AppStream metadata." +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +"Mostrar información de estado sobre los metadatos disponibles de AppStream." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" -msgstr "" +msgstr "Metadatos de la distribución:" -msgid "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." msgstr "" -msgid "Don't show colored output" -msgstr "" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "No mostrar salida coloreada." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +"Volcar los metadatos XML en bruto para un componente que coincida con el " +"identificador." -msgid "Empty." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Educación" -msgid "Enforce a cache refresh" -msgstr "" +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 +msgid "Empty." +msgstr "Vacío." -msgid "Extends" -msgstr "" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emuladores" -msgid "Extensions" -msgstr "Extensiones" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Ejecutar una actualización de antememoria." +#: tools/ascli-actions-misc.c:157 #, c-format -msgid "File %s not found or permission denied!" -msgstr "No se encontró el archivo «%s» o se denegó el acceso." +msgid "Error while loading the metadata pool: %s" +msgstr "Se produjo un error al cargar el grupo de metadatos: %s" + +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Amplía" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "En destaque" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "En destaque" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "En destaque" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "En destaque" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "En destaque" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "En destaque" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "En destaque" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "En destaque" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "En destaque" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Sistema de archivos" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finanzas" + +#: src/as-provided.c:165 msgid "Flashed Firmware" -msgstr "" +msgstr "Microprograma instalado" +#: src/as-provided.c:151 msgid "Fonts" msgstr "Tipos de letra" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Tipos de letra" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Se han encontrado %i componentes en rutas de acceso heredadas." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Se han encontrado %i componentes." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Juegos" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "Obtener componentes que proporcionen el elemento dado." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "Obtener información sobre un componente mediante su id." +msgstr "Obtener información sobre un componente mediante su identificador." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Imágenes y fotografía" +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Sitio web" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "EID" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Icono" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Conjuntos de iconos" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identificador" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Fuentes de entrada" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." -msgstr "" +msgstr "Instalar un archivo de metadatos en el sitio correcto." -msgid "Install software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:613 +#, fuzzy +msgid "Install software matching the component-ID." +msgstr "Instalar el programa que coincida con el «component-id»." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +"Se ha seleccionado un tipo no válido para el elemento proporcionado. Los " +"valores válidos son:" + +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Niños" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Paquetes de idiomas" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Idiomas" +#: src/as-provided.c:145 msgid "Libraries" msgstr "Bibliotecas" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licencia" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Regionalización" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Lógica" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" msgstr "Tipos MIME" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "Establezca manualmente la ubicación de la antememoria de AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" +"Establezca manualmente la ubicación de los metadatos de AppStream que se " +"analizarán." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matemáticas" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matemáticas" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "El archivo de metadatos «%s» no existe." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Los archivos de metadatos tienen errores:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Archivos Metainfo:" + +#: src/as-provided.c:153 msgid "Modaliases" -msgstr "" +msgstr "Modalias" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Reproductores de música" +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nombre" -#, c-format -msgid "No component matching '%s' found." -msgstr "No se encontró ningún componente que coincida con «%s»." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Noticias" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "No se encontró ningún componente que proporcione «%s;%s»." +msgid "No component matching '%s' found." +msgstr "No se encontró ningún componente que coincidiera con «%s»." +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Sin iconos." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" +"No se ha encontrado ninguna interfaz de consola de gestor de paquetes " +"adecuada. Asegúrese de que, p. ej., «pkcon» (parte de PackageKit) esté " +"disponible." + +#: tools/ascli-actions-mdata.c:203 +#, fuzzy +msgid "No value for the item to search for was defined." +msgstr "El valor del elemento que se debe encontrar." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Oficina" -msgid "No value for the item to search for defined." -msgstr "" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Se desconoce la opción «%s»." +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paquete" -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografía" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Mostrar información detallada sobre los componentes encontrados." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Grupo de proyecto" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Elementos proporcionados" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (versión 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Reconstruir la antememoria de metadatos de componentes." + +#: tools/appstream-cli.c:614 +#, fuzzy +msgid "Remove software matching the component-ID." +msgstr "Desinstalar el programa que coincida con el «component-id»." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robótica" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Juegos de rol" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Ejecute «%s --help» para ver una lista competa de las opciones de consola " "disponibles." -msgid "Runtime Firmware" +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." msgstr "" +"Ejecute «%s --help» para ver una lista competa de las opciones de consola " +"disponibles, o bien «%s %s --help» para ver una lista de opciones " +"específicas de esta suborden." -msgid "Sample Screenshot URL" -msgstr "" +#: src/as-provided.c:163 +msgid "Runtime Firmware" +msgstr "Microprograma en tiempo de ejecución" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Escaneo" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Ciencias" + +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Buscar en la base de datos de componentes." -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "Mostrar información adicional de depuración" - -msgid "Show the program version" -msgstr "Mostrar la versión del programa" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Seguridad" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Mostrar información adicional de depuración." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Mostrar la versión del programa." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Deportes" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Estrategia" -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Subórdenes:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Resumen" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Resumen:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Monitorización de sistema" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emuladores de terminal" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Editores de texto" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "El archivo .desktop «%s» no existe." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" +"Se ha actualizado la antememoria de sistema de AppStream, pero se detectaron " +"algunos errores que podrían conducir a faltas de metadatos. Consulte el " +"registro detallado para obtener más información." -msgid "The system metadata cache does not exist." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +"El tipo de componente de programa «%s» no es válido en AppStream. Los " +"valores posibles son:" -msgid "The system metadata cache exists." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +#, fuzzy +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." msgstr "" +"Esta herramienta permite leer, escribir, validar y transformar metadatos de " +"AppStream en XML o YAML. Además, permite acceder a los metadatos del sistema " +"para, por ejemplo, realizar consultas de programas a través de tipos MIME " +"específicos e instalarlos por sus identificadores de componente." +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "Unable to build the template metainfo file: %s" msgstr "" +"No se ha podido crear el archivo de metainformación de la plantilla: %s" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" +"No se ha podido convertir el archivo: no se pudo determinar el formato de " +"salida; establézcalo explícitamente mediante «--format=»." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "No se pudo encontrar un componente que coincida con %s." +msgstr "No se ha podido encontrar un componente que coincida con %s." +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "No se pudo encontrar un componente que proporcione «%s;%s»." +msgid "Unable to find component with ID '%s'!" +msgstr "No se ha podido encontrar el componente cuyo identificador es «%s»." +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "No se pudo encontrar el componente cuyo id. es «%s»." +msgid "Unable to read the .desktop file: %s" +msgstr "No se ha podido leer el archivo .desktop: %s" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +"No se ha podido guardar el archivo de metainformación de la plantilla: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "" +msgstr "No se ha podido iniciar el gestor de paquetes: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" +"No se puede escribir en «%s»; no se puede instalar el archivo de " +"metainformación." -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." msgstr "" +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +#, fuzzy +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Utilizar el archivo .desktop proporcionado para rellenar valores básicos en " +"el archivo de metainformación." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Utilidades" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." -msgstr "Validar archivos XML de AppStream para buscar errores." +msgstr "Validar archivos XML de AppStream en busca de errores." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." -msgstr "Falló la validación." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Falló la validación: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Se realizó la validación correctamente." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "Se realizó la validación correctamente: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "El valor del elemento que se debe encontrar." +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Gráficos vectorizados" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "El archivo XML de menú XDG «%s» está dañado." +msgid "Version: %s" +msgstr "Versión: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Visores" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "Se ha encontrado información sobre %i componentes de «software»." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Navegadores web" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Procesador de textos" +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Obtendrá información sobre opciones específicas de las subórdenes si añade " +"«--help» a la suborden." + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" "Es posible que necesite privilegios administrativos para realizar esta " "acción." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Debe proporcionar un tipo de componente de «software» a AppStream para " +"generar una plantilla. Los valores posibles son:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Debe especificar una orden." -msgid "You need to specify a component-id." -msgstr "Debe especificar un id. de componente." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Debe especificar un identificador de componente." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Debe especificar el archivo que se validará." +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "Debe especificar un archivo de metadatos." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Debe especificar una carpeta raíz para comenzar con la validación." +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Debe especificar un término de búsqueda." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Debe especificar un archivo de entrada y uno de salida." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;aplicación;paquete;programa;suite;conjunto;herramienta" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "errores: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "información: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "alertas: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Se desconoce la orden «%s»." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "No emplear ninguna antememoria al realizar la solicitud." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Categorías" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Categorías" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Categorías" + +#~ msgid "Extensions" +#~ msgstr "Extensiones" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "No se encontró el archivo «%s» o se denegó el acceso." + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "No se encontró ningún componente que proporcione «%s;%s»." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "El archivo XML de menú XDG «%s» está dañado." diff -Nru appstream-0.9.4/po/et.po appstream-0.12.0/po/et.po --- appstream-0.9.4/po/et.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/et.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Estonian (http://www.transifex.com/freedesktop/appstream/" -"language/et/)\n" -"Language: et\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/eu.po appstream-0.12.0/po/eu.po --- appstream-0.9.4/po/eu.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/eu.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,10 +7,10 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2016-08-15 18:48+0000\n" +"Last-Translator: Matthias Klumpp \n" "Language-Team: Basque (http://www.transifex.com/freedesktop/appstream/" "language/eu/)\n" "Language: eu\n" @@ -19,344 +19,973 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" msgstr "" -#, c-format -msgid "AppStream CLI tool version: %s" +#: src/as-category.c:168 +#, fuzzy +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Kategoriak" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" msgstr "" -msgid "AppStream Status:" +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" msgstr "" -msgid "AppStream cache update completed successfully." +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." msgstr "" +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 +msgid "AppStream Status:" +msgstr "" + +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 +msgid "AppStream cache update completed successfully." +msgstr "" + +#: src/as-pool.c:1560 #, c-format -msgid "AppStream cache update failed." +msgid "" +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" msgstr "" +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." +msgstr "" + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" msgstr "" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategoriak" -#, c-format -msgid "Command '%s' is unknown." -msgstr "'%s' komandoa ezezaguna da." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "" +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "" + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Garatzailea" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +#, fuzzy +msgid "Developer Tools" +msgstr "Garatzailea" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." msgstr "" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "" -msgid "Enforce a cache refresh" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" msgstr "" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "" + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "" -msgid "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" msgstr "" +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "" + +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 msgid "Fonts" msgstr "" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ikonoa" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Lizentzia" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" msgstr "" -msgid "Manually set the location of the AppStream cache" +#: src/as-provided.c:149 +msgid "MIME types" msgstr "" -msgid "Mimetypes" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." msgstr "" +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Izena" -#, c-format -msgid "No component matching '%s' found." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" msgstr "" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." +msgid "No component matching '%s' found." msgstr "" +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "" +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" msgstr "" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, fuzzy, c-format +msgid "Option '%s' is unknown." +msgstr "'%s' komandoa ezezaguna da." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paketea" -msgid "Print detailed output about found components" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" msgstr "" -msgid "Print even pedantic hints when validating" +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." msgstr "" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "" +#: src/as-provided.c:157 msgid "Python 3" msgstr "" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "" + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "" + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" msgstr "" -msgid "Remove software matching the component-id." +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" msgstr "" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" msgstr "" +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "" + +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "" -msgid "Select a value for the provides-item which needs to be found." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." msgstr "" -msgid "Show extra debugging information" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." msgstr "" -msgid "Show the program version" +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" msgstr "" -#. these are commands we can use with appstream-cli +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "" -msgid "The system metadata cache does not exist." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" msgstr "" -msgid "The system metadata cache exists." +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" msgstr "" +#: tools/ascli-actions-mdata.c:464 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "The .desktop file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" +msgid "Unable to find component with ID '%s'!" msgstr "" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to read the .desktop file: %s" msgstr "" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" msgstr "" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "" +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." +msgid "Validation was successful: %s" +msgstr "" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "" + +#: src/as-category.c:177 +#, fuzzy +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Kategoriak" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" msgstr "" +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "" + +#: tools/ascli-actions-misc.c:151 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "We have information on %i software components." msgstr "" +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "" -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "" +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "" +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "" + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "'%s' komandoa ezezaguna da." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategoriak" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategoriak" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategoriak" diff -Nru appstream-0.9.4/po/fa.po appstream-0.12.0/po/fa.po --- appstream-0.9.4/po/fa.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/fa.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Persian (http://www.transifex.com/freedesktop/appstream/" -"language/fa/)\n" -"Language: fa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/fi.po appstream-0.12.0/po/fi.po --- appstream-0.9.4/po/fi.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/fi.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,362 +1,996 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: # Jiri Grönroos , 2014 +# Ville Skyttä , 2016 +# Juhani Numminen , 2017 msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Finnish (http://www.transifex.com/freedesktop/appstream/" -"language/fi/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-04-02 19:15+0000\n" +"Last-Translator: Juhani Numminen \n" +"Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.20-dev\n" +#: tools/appstream-cli.c:146 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" +msgid "'%s' command" +msgstr "”%s”-komento" -msgid "AppStream Status:" +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D-grafiikka" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Toiminta" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Lisäosat" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Seikkailu" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Näytä myös pedanttiset ohjeet." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" msgstr "" -msgid "AppStream cache update completed successfully." +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" msgstr "" +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream-komentorivityökalu" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +"AppStream-komentorivityökalun versio: %s\n" +"AppStream-kirjaston versio: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 +msgid "AppStream Status:" +msgstr "AppStreamin tila:" + +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 +msgid "AppStream cache update completed successfully." +msgstr "AppStreamin välimuisti päivitetty onnistuneesti." + +#: src/as-pool.c:1560 #, c-format -msgid "AppStream cache update failed." +msgid "" +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "" +msgstr "AppStreamin välimuistin päivittäminen ei ole tarpeellista." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "" +msgstr "AppStreamin komentorivikäyttöliittymä" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" -msgid "Binaries" +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" msgstr "" +"AppStreamin järjestelmävälimuisti päivitettiin, mutta havaittiin ongelmia: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream-versio: %s" +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arcade" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Tekoäly" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomia" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomia" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Ääni ja video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Äänen muokkaus" + +#: src/as-provided.c:147 +msgid "Binaries" +msgstr "Binääritiedostoja" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Palikat" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Lauta" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "" +msgstr "Välimuistin sijaintiin ”%s” ei voi kirjoittaa." + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalenteri" +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +"Ei voida kopioida tiedostoa ”%s”: Tiedostopääte ei ole ”.metainfo.xml” tai”." +"appdata.xml”." +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kortit" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Luokat" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Komento '%s' on tuntematon." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Keskustelu" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Kemia" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Kemia" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Koodekit" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Viestintä ja uutiset" +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "" +#: tools/ascli-utils.c:364 msgid "Compulsory for" -msgstr "" +msgstr "Tarvitaan työpöytäympäristössä" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Muuta keräilty XML YAML-muotoon tai toisin päin." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Ei löydetty komponenttia, joka tarjoaisi ”%s::%s”." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "Luo metainfo-tiedoston malli (johon pitää vielä täyttää kohtia)." +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Tietokannat" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Oletusnäyttökuvan URL" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Metadatan oletusmuoto (vaihtoehdot: ”xml” tai ”yaml”)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Kuvaus" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Kehittäjä" -msgid "Display various information about installed AppStream metadata." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Kehitystyökalut" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Näytä tilatietoja saatavilla olevista AppStream-metatiedoista." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Älä käytä verkkoyhteyttä." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Älä käytä värejä." + +#: tools/appstream-cli.c:607 +msgid "Dump raw XML metadata for a component matching the ID." msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Opetus" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 +msgid "Empty." +msgstr "Tyhjä." + +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulaattorit" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Pakota välimuistin päivitys." + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" msgstr "" -msgid "Dump raw XML metadata for a component matching the ID." +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Laajentaa" + +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Esittelyssä" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" msgstr "" -msgid "Empty." +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" msgstr "" -msgid "Enforce a cache refresh" +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" msgstr "" -msgid "Extends" +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" msgstr "" -msgid "Extensions" +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" msgstr "" +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Tiedostojärjestelmä" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Rahoitus" + +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 msgid "Fonts" -msgstr "" +msgstr "Fontit" + +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Fontit" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Vanhentuneista poluista löydettiin %i komponenttia." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Löydettiin %i komponenttia." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Pelit" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "" +msgstr "Hae komponentit, jotka tarjoavat pyydetyn kohteen." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "" +msgstr "Hae tiedot komponentista sen ID:n perusteella." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafiikka ja valokuvaus" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Verkkosivusto" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Kehitysympäristöt" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Kuvake" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Tunniste" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Syöttötavat" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." -msgstr "" +msgstr "Asenna metadata-tiedosto oikeaan sijaintiin." -msgid "Install software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Asenna komponentti-ID:tä vastaava ohjelmisto." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Lasten pelit" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Kielipaketit" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Kielet" + +#: src/as-provided.c:145 msgid "Libraries" -msgstr "" +msgstr "Kirjastot" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Lisenssi" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Kotoistus" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logiikka" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "MIME-tyypit" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." msgstr "" -msgid "Manually set the location of the AppStream cache" +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." msgstr "" -msgid "Mimetypes" +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematiikka" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematiikka" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Metadata-tiedostoa ”%s” ei ole olemassa." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Metadata-tiedostoissa on virheitä:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" msgstr "" +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Musiikkitoistimet" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nimi" -#, c-format -msgid "No component matching '%s' found." -msgstr "" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Uutiset" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." +msgid "No component matching '%s' found." msgstr "" +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Ei kuvakkeita." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Toimisto" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Valitsin ”%s” on tuntematon." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paketti" -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Valokuvaus" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." msgstr "" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" -msgstr "" +msgstr "Projektiryhmä" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "" +msgstr "Python (versio 2)" +#: src/as-provided.c:157 msgid "Python 3" -msgstr "" +msgstr "Python 3" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." msgstr "" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "" +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotiikka" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Roolipelit" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." +msgstr "Näet kaikki saatavilla olevat valitsimet komennolla ”%s --help”." + +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." msgstr "" +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" -msgstr "" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Skannaus" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Tiede" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "" -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Tietoturva" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Näytä ohjelmaversio." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Urheilu" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategia" -msgid "Show the program version" -msgstr "Näytä ohjelman versio" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" -msgstr "" +msgstr "Alikomennot:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Yhteenveto" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Yhteenveto:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Järjestelmänvalvonta" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Pääte-emulaattorit" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Tekstimuokkaimet" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr ".desktop-tiedostoa ”%s” ei ole olemassa." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" -msgid "The system metadata cache does not exist." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" -msgid "The system metadata cache exists." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." msgstr "" +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "Unable to build the template metainfo file: %s" msgstr "" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" +msgid "Unable to find component with ID '%s'!" msgstr "" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" +msgid "Unable to read the .desktop file: %s" +msgstr ".desktop-tiedostoa ei voida lukea: %s" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "" +msgstr "Ei voitu käynnistää pakettienhallintaa: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." msgstr "" -msgid "Validate AppStream XML files for issues." +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Apuohjelmat" + +#: tools/appstream-cli.c:610 +msgid "Validate AppStream XML files for issues." +msgstr "Tarkasta AppStream XML -tiedostojen virheettömyys." + +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." -msgstr "" +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Tarkastus epäonnistui: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." +msgstr "Tarkastus onnistui." + +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" msgstr "" +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "" + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vektorigrafiikka" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Versio: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Kuvankatselimet" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "" -#, c-format -msgid "XDG Menu XML file '%s' is damaged." +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Selaimet" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Tekstinkäsittely" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." msgstr "" +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +"Tämän toiminnon suorittamiseen tarvitaan mahdollisesti pääkäyttäjän oikeudet." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "" -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "" +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "" +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "" + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "virheitä: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "ilmoituksia: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "pedanttisia: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "varoituksia: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Komento ”%s” on tuntematon." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Luokat" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Luokat" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Luokat" diff -Nru appstream-0.9.4/po/fo.po appstream-0.12.0/po/fo.po --- appstream-0.9.4/po/fo.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/fo.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Faroese (http://www.transifex.com/freedesktop/appstream/" -"language/fo/)\n" -"Language: fo\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/fr.po appstream-0.12.0/po/fr.po --- appstream-0.9.4/po/fr.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/fr.po 2018-04-04 15:53:56.000000000 +0000 @@ -6,350 +6,1001 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: French (http://www.transifex.com/freedesktop/appstream/" -"language/fr/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2017-12-29 00:03+0000\n" +"Last-Translator: Yvan Masson \n" +"Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 2.19-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "commande « %s »" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Graphismes 3D" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Action" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Extensions" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Aventure" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Afficher également des conseils détaillés." + +#: tools/appstream-cli.c:604 +#, fuzzy +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Un type d'élément (ex : lib, bin, python3…)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Un utilitaire travaillant sur les métadonnées AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "Interface en ligne de commande AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +"Version de l'outil AppStream en ligne de commande : %s\n" +"Version de la bibliothèque AppStream : %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "État AppStream :" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "" +msgstr "La mise à jour du cache AppStream a été réalisé avec succès." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +"La mise à jour du cache AppStream a échoué. Activez le mode verbeux pour " +"obtenir des informations détaillées." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "" +msgstr "La mise à jour du cache AppStream n'est pas nécessaire." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "" +msgstr "Interface AppStream en ligne de commande" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" +"AppStream est une spécification multi-distribution qui fournit des méta-" +"données concernant les composants logiciels." -msgid "Binaries" +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" msgstr "" +"Le système de cache AppStream a été mis à jour, mais des problèmes ont été " +"trouvés : %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "Version d’AppStream : %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arcade" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Intelligence Artificielle" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomie" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomie" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Audio & Vidéo" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Création & Édition Audio" + +#: src/as-provided.c:147 +msgid "Binaries" +msgstr "Binaires" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Blocs" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Plateau" +#: tools/ascli-utils.c:286 msgid "Bundle" -msgstr "" +msgstr "Groupe" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "" +msgstr "L'emplacement de cache « %s » n'est pas accessible en écriture." + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Calendrier" +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +"Impossible de copier « %s » : le fichier ne possède pas le suffixe « ." +"metainfo.xml » ou « .appdata.xml »." +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Carte" + +#: tools/ascli-utils.c:356 msgid "Categories" -msgstr "" +msgstr "Catégories" -#, c-format -msgid "Command '%s' is unknown." -msgstr "" +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Messagerie instantanée" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Chimie" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Chimie" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Codecs" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Communications & actualités" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Composant" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "" +msgstr "Le composant « %s » ne possède pas de candidat à l'installation." +#: tools/ascli-utils.c:364 msgid "Compulsory for" +msgstr "Obligatoire pour" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Convertit une collection XML vers YAML ou inversement." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Impossible de trouver des composants qui fournissent « %s::%s »." + +#: tools/appstream-cli.c:620 +#, fuzzy +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." msgstr "" +"Créer un modèle pour un fichier metainfo (à compléter par le projet " +"« upstream »)." +#: src/as-provided.c:161 msgid "DBus Session Services" -msgstr "" +msgstr "Services de Session DBus" +#: src/as-provided.c:159 msgid "DBus System Services" +msgstr "Services de Système DBus" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Base de données" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Débogueurs" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL de la capture d'écran par défaut" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +#, fuzzy +msgid "Default metadata format (valid values are 'xml' and 'yaml')." msgstr "" +"Correspond par défaut au format de métadonnées fourni (les valeurs valides " +"sont « xml » et « yaml »)." +#: tools/ascli-utils.c:320 msgid "Description" -msgstr "" +msgstr "Description" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" -msgstr "" +msgstr "Développeur" -msgid "Display various information about installed AppStream metadata." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Outils pour développeurs" -msgid "Distribution metadata:" +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +"Affiche des informations d'état sur les métadonnées AppStream disponibles." -msgid "Do not use the Xapian cache when performing the request" -msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 +msgid "Distribution metadata:" +msgstr "Métadonnées de la distribution :" -msgid "Don't show colored output" -msgstr "" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Ne pas utiliser l’accès au réseau." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Ne pas afficher de sortie colorée." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +"Produire des métadonnées XML brutes pour un composant correspondant à l'ID." -msgid "Empty." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Éducation" -msgid "Enforce a cache refresh" -msgstr "" +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 +msgid "Empty." +msgstr "Vide." -msgid "Extends" -msgstr "" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Émulateurs" -msgid "Extensions" -msgstr "" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Forcer une mise à jour du cache." +#: tools/ascli-actions-misc.c:157 #, c-format -msgid "File %s not found or permission denied!" -msgstr "" +msgid "Error while loading the metadata pool: %s" +msgstr "Erreur durant le chargement du pool de métadonnées : %s" + +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Étend" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Mises en avant" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Mises en avant" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Mises en avant" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Mises en avant" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Mises en avant" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Mises en avant" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Mises en avant" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Mises en avant" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Mises en avant" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Système de fichiers" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finance" + +#: src/as-provided.c:165 msgid "Flashed Firmware" -msgstr "" +msgstr "Micrologiciel flashé" +#: src/as-provided.c:151 msgid "Fonts" -msgstr "" +msgstr "Polices" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Polices" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "%i composants trouvés dans des anciens chemins." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "%i composants trouvés." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Jeux" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "" +msgstr "Obtenir les composants qui fournissent l'élément indiqué." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "" +msgstr "Obtenir des informations sur un composant par son ID." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Graphismes & Photographie" +#: tools/ascli-utils.c:287 msgid "Homepage" -msgstr "" +msgstr "Page Web" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Environnements de développement" + +#: tools/ascli-utils.c:288 msgid "Icon" -msgstr "" +msgstr "Icône" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Jeux d'icônes" +#: tools/ascli-utils.c:282 msgid "Identifier" -msgstr "" +msgstr "Identifiant" + +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Sources de saisie" +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." -msgstr "" +msgstr "Installer un fichier de métadonnées au bon emplacement." -msgid "Install software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:613 +#, fuzzy +msgid "Install software matching the component-ID." +msgstr "Installer un logiciel correspondant à l'ID du composant." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +"Type invalide pour l'objet fourni sélectionné. Les valeurs valides sont :" + +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Enfants" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Packs de langue" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Langues" +#: src/as-provided.c:145 msgid "Libraries" -msgstr "" +msgstr "Bibliothèques" #. license +#: tools/ascli-utils.c:350 msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" +msgstr "Licence" -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Localisation" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logique" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" +msgstr "Types MIME" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "Défini manuellement l'emplacement du cache AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" +"Défini manuellement l'emplacement des métadonnées AppStream à utiliser." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Mathématiques" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Mathématiques" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Le fichier de métadonnées « %s » n'existe pas." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Les fichiers de métadonnées comportent des erreurs :" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Fichiers de méta-info :" +#: src/as-provided.c:153 msgid "Modaliases" -msgstr "" +msgstr "Modalias" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Lecteurs de musique" +#: tools/ascli-utils.c:283 msgid "Name" -msgstr "" +msgstr "Nom" -#, c-format -msgid "No component matching '%s' found." -msgstr "" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Actualités" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "" +msgid "No component matching '%s' found." +msgstr "Aucun composant correspondant à « %s » trouvé." +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Aucune icône." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" +"Aucun gestionnaire de paquet en ligne de commande approprié n'a été trouvé. " +"Veuillez vérifier par exemple que « pkcon » (faisant partie de PackageKit) " +"est disponible." + +#: tools/ascli-actions-mdata.c:203 +#, fuzzy +msgid "No value for the item to search for was defined." +msgstr "Pas de valeur définie pour l'objet recherché." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Bureautique" -msgid "No value for the item to search for defined." -msgstr "" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "L'option « %s » est inconnue." +#: tools/ascli-utils.c:285 msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" +msgstr "Paquet" -msgid "Print even pedantic hints when validating" -msgstr "" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Photographie" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Afficher des informations détaillées au sujet des composants trouvés." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" -msgstr "" +msgstr "Groupe de projet" +#: tools/ascli-utils.c:392 msgid "Provided Items" -msgstr "" +msgstr "Éléments fournis" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "" +msgstr "Python (version 2)" +#: src/as-provided.c:157 msgid "Python 3" -msgstr "" +msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Reconstruire le cache des métadonnées du composant." + +#: tools/appstream-cli.c:614 +#, fuzzy +msgid "Remove software matching the component-ID." +msgstr "Désinstaller le logiciel correspondant à l'identifiant du composant." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotique" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Jeu de rôle" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 +#, c-format +msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +"Lancer « %s --help » pour afficher la liste des options disponibles en ligne " +"de commande." +#: tools/appstream-cli.c:187 #, c-format -msgid "Run '%s --help' to see a full list of available command line options." +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." msgstr "" +"Lancer « %s --help » pour afficher la liste des commandes et options " +"disponibles, et « %s %s --help » pour afficher les options spécifiques à " +"cette sous-commande." +#: src/as-provided.c:163 msgid "Runtime Firmware" -msgstr "" +msgstr "Micrologiciel à l’exécution" -msgid "Sample Screenshot URL" -msgstr "" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Numérisation" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Science" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" +msgstr "Chercher dans la base de données des composants." -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Sécurité" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Afficher des informations de débogage supplémentaires." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Afficher la version du programme." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sports" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Stratégie" -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" -msgstr "" +msgstr "Sous-commandes :" +#: tools/ascli-utils.c:284 msgid "Summary" -msgstr "" +msgstr "Résumé" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Résumé :" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Surveillance du système" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Émulateurs de terminal" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Éditeurs de texte" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Le fichier .desktop « %s » n'existe pas." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" +"Le cache système d'AppStream a été mis à jour, mais des erreurs ont été " +"détectées, ce qui pourrait conduire à des métadonnées manquantes. Consulter " +"les journaux verbeux pour plus d'information." -msgid "The system metadata cache does not exist." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "Le TYPE doit être un type de composant valide, comme : %s" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +"Le type de composant logiciel « %s » n'est pas valide dans AppStream. Les " +"valeurs possibles sont :" -msgid "The system metadata cache exists." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" +"Cette commande prend les arguments positionnels optionels TYPE et FILE, FILE " +"étant un fichier dans lequel écrire (ou « - » pour la sortie standard)." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +#, fuzzy +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Cet outil permet la lecture, l'écriture, la validation et la transformation " +"des métadonnées XML ou YAML d'AppStream. Il permet également d'accéder à " +"l'ensemble de métadonnées système pour, par exemple, chercher un logiciel " +"supportant un type mime spécifique et l'installer en utilisant son " +"identifiant de composant logiciel." + +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" +msgid "Unable to build the template metainfo file: %s" +msgstr "Impossible de construire le fichier de méta-info modèle : %s" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" +"Impossible de convertir le fichier : le format de sortie n'a pas pu être " +"déterminé, veuillez le définir explicitement en utilisant « --format= »." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "" +msgstr "Impossible de trouver le composant correspondant à %s !" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" +msgid "Unable to find component with ID '%s'!" +msgstr "Impossible de trouver le composant ayant l'ID « %s » !" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" +msgid "Unable to read the .desktop file: %s" +msgstr "Impossible de lire le fichier .desktop : %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Impossible d'enregistrer le modèle de fichier de méta-info : %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "" +msgstr "Impossible de lancer le gestionnaire de paquet : %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" +"Impossible d'écrire dans « %s », le fichier de méta-info ne peut pas être " +"installé." -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." msgstr "" -msgid "Validate AppStream XML files for issues." +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +#, fuzzy +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +"Utiliser le fichier .desktop donné pour compléter les valeurs de base du " +"fichier de méta-info." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Utilitaires" + +#: tools/appstream-cli.c:610 +msgid "Validate AppStream XML files for issues." +msgstr "Valider les fichiers XML AppStream." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" +"Valider les métadonnées d'une arborescence de fichiers installée d'une " +"application." -msgid "Validation failed." -msgstr "" +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Validation échouée : %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." -msgstr "" +msgstr "La validation a réussi." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "La validation a réussi : %s" +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Valeur de l'élément devant être trouvé." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Graphismes vectoriel" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "Version: %s" +msgstr "Version : %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Visionneuses" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "Il y a des informations sur %i composants logiciels." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Navigateurs web" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Traitement de texte" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." msgstr "" +"Vous pouvez trouver des informations concernant les options spécifiques à " +"une sous-commande en passant « --help » à la sous-commande." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +"Vous avez probablement besoin des permissions du super-utilisateur pour " +"réaliser cette action." -msgid "You need to specify a command." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" msgstr "" +"Vous devez préciser un type de composant logiciel AppStream pour générer un " +"modèle. Les valeurs possibles sont :" -msgid "You need to specify a component-id." -msgstr "" +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 +msgid "You need to specify a command." +msgstr "Vous devez spécifier une commande." + +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Vous devez spécifier l'ID du composant." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "" +msgstr "Vous devez spécifier le fichier à valider !" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "Vous devez spécifier un fichier de métadonnées." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" +"Vous devez spécifier un répertoire racine pour commencer la validation !" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." -msgstr "" +msgstr "Vous devez spécifier un terme à rechercher." + +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Vous devez spécifier un fichier d'entrée et de sortie." #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, @@ -357,5 +1008,67 @@ #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" -msgstr "" +msgstr "app;application;logiciel;paquet;programme;suite;outil;software" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "erreurs : %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "informations : %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "tatillon : %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "alertes : %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "La commande « %s » est inconnue." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Ne pas utiliser de cache lors de l'exécution de la requête." + +#~ msgid "AppStream cache update failed." +#~ msgstr "La mise à jour du cache AppStream a échoué." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "Le pool de données AppStream a été chargé, mais certaines métadonnées ont " +#~ "été ignorées en raison d'erreurs." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "Impossible de rechercher un type de composant inconnu." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Catégories" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Catégories" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Catégories" + +#~ msgid "Extensions" +#~ msgstr "Extensions" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Fichier %s introuvable ou permission refusée !" diff -Nru appstream-0.9.4/po/ga.po appstream-0.12.0/po/ga.po --- appstream-0.9.4/po/ga.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ga.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,362 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Irish (http://www.transifex.com/freedesktop/appstream/" -"language/ga/)\n" -"Language: ga\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : " -"4);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/gd.po appstream-0.12.0/po/gd.po --- appstream-0.9.4/po/gd.po 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/po/gd.po 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,1036 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Matthias Klumpp +# This file is distributed under the same license as the appstream package. +# GunChleoc , 2017. +msgid "" +msgstr "" +"Project-Id-Version: appstream\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2017-03-10 22:24+0000\n" +"Last-Translator: GunChleoc \n" +"Language-Team: Gaelic \n" +"Language: gd\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : " +"(n > 2 && n < 20) ? 2 : 3;\n" +"X-Generator: Weblate 2.12\n" + +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Àithne “%s”" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Grafaigeachd 3D" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Gnìomhan" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Tuilleadain" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Dàna-thuras" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +#, fuzzy +msgid "Also show pedantic hints." +msgstr "Seall oidheaman beadaganach cuideachd leis an dearbhadh." + +#: tools/appstream-cli.c:604 +#, fuzzy +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Seòrsa de nì (can lib, bin, python3, …)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Goireas gus obair le meata-dàta AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream CLI" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "Tionndadh an inneil AppStream CLI: %s" + +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 +msgid "AppStream Status:" +msgstr "Staid AppStream:" + +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 +msgid "AppStream cache update completed successfully." +msgstr "Chaidh an tasgadan aig AppStream ùrachadh." + +#: src/as-pool.c:1560 +#, c-format +msgid "" +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." +msgstr "" +"Cha deach leinn an tasgadan aig AppStream ùrachadh. Cuir air am modh " +"briathrach gus barrachd fiosrachadh fhaighinn mun duilgheadas." + +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 +msgid "AppStream cache update is not necessary." +msgstr "Chan eil feum air ùrachadh an tasgadain aig AppStream." + +#. TRANSLATORS: This is the header to the --help menu for subcommands +#. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 +msgid "AppStream command-line interface" +msgstr "Eadar-aghaidh loidhne-àithne AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 +msgid "" +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"’S e sònrachadh thar-sgaoilidh a th’ ann an AppStream gus meata-dàta mu cho-" +"phàirtean bathair-bhog a sholar." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"Chaidh an tasgadan aig AppStream ùrachadh ach bha duilgheadas no dhà ann " +"leis: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "Tionndadh an inneil AppStream CLI: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Faoin-chleas" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Inntinn fuadain" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Reul-eòlas" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Reul-eòlas" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Fuaim ⁊ video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Clàradh ⁊ deasachadh fuaime" + +#: src/as-provided.c:147 +msgid "Binaries" +msgstr "Faidhlichean bìnearaidh" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Blocaichean" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Bòrd" + +#: tools/ascli-utils.c:286 +msgid "Bundle" +msgstr "Trusgan" + +#: src/as-pool.c:1486 +#, c-format +msgid "Cache location '%s' is not writable." +msgstr "Cha ghabh sgrìobhadh ann an ionad “%s” an tasgadain." + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Mìosachan" + +#: tools/ascli-actions-mdata.c:324 +#, c-format +msgid "" +"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " +"suffix." +msgstr "" +"Cha b’ urrainn dhuinn lethbhreac dhe “%s” a dhèanamh: Chan eil iar-" +"leasachan “.metainfo.xml” no “.appdata.xml” aig an fhaidhle." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Cairt" + +#: tools/ascli-utils.c:356 +msgid "Categories" +msgstr "Roinnean-seòrsa" + +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Cabadaich" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Ceimigeachd" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Ceimigeachd" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Codecs" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Conaltradh ⁊ naidheachdan" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 +#, c-format +msgid "Component '%s' has no installation candidate." +msgstr "Chan eil tagraiche stàlaidh aig a’ cho-phàirt “%s”." + +#: tools/ascli-utils.c:364 +msgid "Compulsory for" +msgstr "Riatanach airson" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Iompaich XML cruinneachaidh gu YAML no an caochladh." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Cha do lorg sinn co-phàirt a sholaireas “%s::%s”." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 +msgid "DBus Session Services" +msgstr "Seirbheisean seisein DBus" + +#: src/as-provided.c:159 +msgid "DBus System Services" +msgstr "Seirbheisean siostaim DBus" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Stòr-dàta" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Dì-bhugadairean" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL a’ ghlacaidh-sgrìn thùsail" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +#, fuzzy +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" +"Cleachd am fòrmat meata-dàta sònraichte mar a’ bhun-roghainn (’s e “xml” " +"agus “yaml” a tha sna roghainnean dligheach)." + +#: tools/ascli-utils.c:320 +msgid "Description" +msgstr "Tuairisgeul" + +#. developer name +#: tools/ascli-utils.c:308 +msgid "Developer" +msgstr "Luchd-leasachaidh" + +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Innealan luchd-leasachaidh" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Seall fiosrachadh staide mun mheata-dàta AppStream a tha ri fhaighinn." + +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 +msgid "Distribution metadata:" +msgstr "Meata-dàta an sgaoilidh:" + +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Na seall às-chur dathte." + +#: tools/appstream-cli.c:607 +msgid "Dump raw XML metadata for a component matching the ID." +msgstr "" +"Seall am meata-dàta XML amh airson co-phàirt a fhreagras ris an aithnichear." + +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Foghlam" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 +msgid "Empty." +msgstr "Falamh." + +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Aithrisichean" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Sparr ath-nuadhachadh an tasgadain air." + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Mearachd le luchdadh amar a’ mheata-dàta: %s" + +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Leudaichidh e" + +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Brosnaichte" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Brosnaichte" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Brosnaichte" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Brosnaichte" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Brosnaichte" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Brosnaichte" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Brosnaichte" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Brosnaichte" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Brosnaichte" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Siostam fhaidhlichean" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Ionmhas" + +#: src/as-provided.c:165 +msgid "Flashed Firmware" +msgstr "Firmware an sàs" + +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Cruthan-clò" + +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Cruthan-clò" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 +#, c-format +msgid "Found %i components in legacy paths." +msgstr "Chaidh %i co-phàirt(ean) a lorg ann an slighean dìleabach." + +#: tools/ascli-actions-misc.c:121 +#, c-format +msgid "Found %i components." +msgstr "Chaidh %i co-phàirt(ean) a lorg." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Geamannan" + +#: tools/appstream-cli.c:603 +msgid "Get components which provide the given item." +msgstr "Fhaigh na co-phàirtean a bheir an nì sònraichte dhut." + +#: tools/appstream-cli.c:602 +msgid "Get information about a component by its ID." +msgstr "Faigh fiosrachadh mu cho-phàirt a-rèir aithnicheir." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafaigeachd ⁊ togail dhealbhan" + +#: tools/ascli-utils.c:287 +msgid "Homepage" +msgstr "Duilleag-dhachaigh" + +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Àrainneachdan leasachaidh co-fhillte" + +#: tools/ascli-utils.c:288 +msgid "Icon" +msgstr "Ìomhaigheag" + +#: tools/ascli-actions-misc.c:92 +msgid "Iconsets" +msgstr "Buidhnean ìomhaigheagan" + +#: tools/ascli-utils.c:282 +msgid "Identifier" +msgstr "Aithnichear" + +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Tùsan ion-chuir" + +#: tools/appstream-cli.c:617 +msgid "Install a metadata file into the right location." +msgstr "Stàlaich faidhle meata-dàta gun ionad cheart." + +#: tools/appstream-cli.c:613 +#, fuzzy +msgid "Install software matching the component-ID." +msgstr "Stàlaich bathar-bog a fhreagras ris an aithnichear co-phàirt." + +#: tools/ascli-actions-mdata.c:210 +msgid "Invalid type for provided item selected. Valid values are:" +msgstr "" +"Chan eil an seòrsa a thagh thu dhan nì a chaidh a sholar dligheach. Seo na " +"luachan dligheach:" + +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Clann" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Pacaidean cànain" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Cànain" + +#: src/as-provided.c:145 +msgid "Libraries" +msgstr "Leabhar-lannan" + +#. license +#: tools/ascli-utils.c:350 +msgid "License" +msgstr "Ceadachas" + +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Ionadaileadh" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Loidig" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" +msgstr "Seòrsaichean MIME" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "Suidhich ionad an tasgadain aig AppStream a làimh." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Suidhich ionad a’ mheata-dàta AppStream a làimh." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matamataig" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matamataig" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Chan eil am faidhle meata-dàta “%s” ann." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Tha mearachd sna faidhlichean meata-dàta:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Faidhlichean meata-fhiosrachaidh:" + +#: src/as-provided.c:153 +msgid "Modaliases" +msgstr "Aliasan atharraichean" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Cluicheadairean ciùil" + +#: tools/ascli-utils.c:283 +msgid "Name" +msgstr "Ainm" + +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Naidheachdan" + +#: tools/ascli-actions-mdata.c:179 +#, c-format +msgid "No component matching '%s' found." +msgstr "Cha deach co-phàirt a fhreagras ri “%s” a lorg." + +#: tools/ascli-actions-misc.c:103 +msgid "No icons." +msgstr "Chan eil ìomhaigheag ann." + +#: tools/ascli-actions-pkgmgr.c:53 +msgid "" +"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" +"\" (part of PackageKit) is available." +msgstr "" +"Cha deach manaidsear phacaidean CLI iomchaidh a lorg. Dèan cinnteach gu " +"bheil “pkcon” (pàirt dhe PackageKit) ri fhaighinn, mar eisimpleir." + +#: tools/ascli-actions-mdata.c:203 +#, fuzzy +msgid "No value for the item to search for was defined." +msgstr "Cha deach luach an nì ri lorg a shònrachadh." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Oifis" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Chan aithne dhuinn an roghainn “%s”." + +#: tools/ascli-utils.c:285 +msgid "Package" +msgstr "Pacaid" + +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Togail dhealbhan" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Seall fiosrachadh mionaideach mu na co-phàirtean a chaidh a lorg." + +#. project group +#: tools/ascli-utils.c:347 +msgid "Project Group" +msgstr "Buidhean pròiseict" + +#: tools/ascli-utils.c:392 +msgid "Provided Items" +msgstr "Nithean ’gan solar" + +#: src/as-provided.c:155 +msgid "Python (Version 2)" +msgstr "Python (Tionndadh 2)" + +#: src/as-provided.c:157 +msgid "Python 3" +msgstr "Python 3" + +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Ath-thog tasgadan meata-dàta nan co-phàirtean." + +#: tools/appstream-cli.c:614 +#, fuzzy +msgid "Remove software matching the component-ID." +msgstr "Thoir air falbh bathar-bog a fhreagras ris an aithnichear co-phàirt." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotaireachd" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Cluich mas-fhìor" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 +#, c-format +msgid "Run '%s --help' to see a full list of available command line options." +msgstr "" +"Ruith “%s --help” gus liosta shlàn dhe roghainnean na loidhne-àithne a tha " +"ri fhaighinn a shealltainn." + +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Ruith “%s --help” gus liosta shlàn dhe dh’àitheantan ’s roghainnean na " +"loidhne-àithne a tha ri fhaighinn a shealltainn agus “%s %s --help” airson " +"liosta dhe na roghainnean a tha sònraichte dhan fho-àithne seo." + +#: src/as-provided.c:163 +msgid "Runtime Firmware" +msgstr "Firmware ruith" + +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Sganadh" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Saidheans" + +#: tools/appstream-cli.c:601 +msgid "Search the component database." +msgstr "Lorg ann an stòr-dàta nan co-phàirtean." + +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Tèarainteachd" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Seall fiosrachadh dì-bhugachaidh a bharrachd." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Seall an tionndadh dhen phrògram." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Spòrs" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Ro-innleachd" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 +msgid "Subcommands:" +msgstr "Fo-àitheantan:" + +#: tools/ascli-utils.c:284 +msgid "Summary" +msgstr "Gearr-chunntas" + +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 +msgid "Summary:" +msgstr "Gearr-chunntas:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Monatairean an t-siostaim" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Aithrisichean tèirmineil" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Deasaichean teacsa" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Chan eil am faidhle .desktop “%s” ann." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"Chaidh tasgadan an t-siostaim aig AppStream ùrachadh ach mhothaich sinn dha " +"mhearachd no dhà a dh’adhbharaicheas gum bi meata-dàta a dhìth ma " +"dh’fhaoidte. Thoir sùil air an loga bhriathrach airson barrachd fiosrachaidh." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"Chan eil seòrsa “%s” a’ cho-phàirt bathair-bhog dligheach an an AppStream. " +"Seo na luachan dligheach:" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +#, fuzzy +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Leigidh an t-inneal seo leat meata-dàta XML AppStream no YAML a leughadh, a " +"sgrìobhadh, a dhearbhadh agus cruth-atharrachadh. Leigidh e leat cuideachd " +"amar meata-dàta an t-siostaim inntrigeadh airson ceist-shampaill air bathar-" +"bog a bheir seòrsa MIME sònraichte dhut agus a stàladh a-rèir an aithnichear " +"co-phàirt bathair-bhog aige." + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "Cha b’ urrainn dhuinn faidhle teamplaid a’ mheata-dàta a thogail: %s" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Cha b’ urrainn dhuinn am faidhle iompachadh: Cha deach leinn mothachadh dha " +"dh’fhòrmat an às-chuir, suidhich a làimh e le “--format=”." + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 +#, c-format +msgid "Unable to find component matching %s!" +msgstr "Cha do lorg sinn co-phàirt a fhreagras ri %s!" + +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 +#, c-format +msgid "Unable to find component with ID '%s'!" +msgstr "Cha do lorg sinn co-phàirt leis an aithnichear %s!" + +#: tools/ascli-actions-mdata.c:470 +#, c-format +msgid "Unable to read the .desktop file: %s" +msgstr "Cha deach leinn am faidhle .desktop a leughadh: %s" + +#: tools/ascli-actions-mdata.c:549 +#, fuzzy, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "" +"Cha b’ urrainn dhuinn faidhle teamplaid a’ mheata-dàta a shàbhaladh: %s" + +#: tools/ascli-actions-pkgmgr.c:67 +#, c-format +msgid "Unable to spawn package manager: %s" +msgstr "Cha deach leinn manaidsear phacaidean a shìoladh: %s" + +#: tools/ascli-actions-mdata.c:319 +#, c-format +msgid "Unable to write to '%s', can not install metainfo file." +msgstr "" +"Cha deach leinn sgrìobhadh gu “%s” ’s chan urrainn dhuinn faidhle a’ mheata-" +"fhiosrachaidh a stàladh." + +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +#, fuzzy +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Cleachd am faidhle .desktop sònraiche gus luachan bunaiteach a lìonadh ann " +"am faidhle a’ mheata-fhiosrachaidh." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Goireasan" + +#: tools/appstream-cli.c:610 +msgid "Validate AppStream XML files for issues." +msgstr "Dearbhaich faidhlichean XML AppStream feuch a bheil duilgheadasan ann." + +#: tools/appstream-cli.c:611 +msgid "Validate an installed file-tree of an application for valid metadata." +msgstr "" +"Dearbhaich craobh fhaidhlichean aig aplacaid a chaidh a stàladh feuch a " +"bheil am meata-dàta a tha ann dligheach." + +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Dh’fhaillig leis an dearbhadh: %s" + +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 +msgid "Validation was successful." +msgstr "Chaidh leis an dearbhadh." + +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "Chaidh leis an dearbhadh: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Luach an nì a bu choir lorg." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Grafaigeachd vectoran" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Tionndadh: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Sealladairean" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "Tha fiosrachadh againn mu %i co-phàirt(ean) bathair-bhog." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Brabhsairean-lìn" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Pròiseasadh fhaclan" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Cuir “--help” ri fo-àithne gus fiosrachadh fhaighinn mu na roghainnean a tha " +"sònraichte dhan fho-àithne sin." + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 +msgid "You might need superuser permissions to perform this action." +msgstr "Feumaidh tu ceadan superuser gus an gnìomh seo a dhèanamh." + +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Feumaidh tu seòrsa a’ cho-phàirt bathair-bhog AppStream a thoirt seachad gus " +"teamplaid a ghintinn. Seo na luachan dligheach:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 +msgid "You need to specify a command." +msgstr "Feumaidh tu àithne a shònrachadh." + +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Feumaidh tu aithnichear co-phàirt a shònrachadh." + +#: tools/ascli-actions-validate.c:223 +msgid "You need to specify a file to validate!" +msgstr "Feumaidh tu faidhle ri dhearbhadh a shònrachadh!" + +#: tools/ascli-actions-mdata.c:306 +msgid "You need to specify a metadata file." +msgstr "Feumaidh tu ainm faidhle meata-dàta a shònrachadh." + +#: tools/ascli-actions-validate.c:281 +msgid "You need to specify a root directory to start validation!" +msgstr "" +"Feumaidh tu pasgan freumha a shònrachadh gus tòiseachadh air an dearbhadh!" + +#: tools/ascli-actions-mdata.c:161 +msgid "You need to specify a term to search for." +msgstr "Feumaidh tu facal-luirg a shònrachadh." + +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Feumaidh tu na faidhlichean ion-chur is às-chur a shònrachadh." + +#. TRANSLATORS: List of "grey-listed" words sperated with ";" +#. * Do not translate this list directly. Instead, +#. * provide a list of words in your language that people are likely +#. * to include in a search but that should normally be ignored in +#. * the search. +#. +#: src/as-pool.c:104 +msgid "app;application;package;program;programme;suite;tool" +msgstr "" +"app;application;package;program;programme;suite;tool;aplacaid;paca;pacaid;" +"pacadh;pasgan;prògram;inneal" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "mearachdan: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "fiosrachadh: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "beadaganach: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "rabhaidhean: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Chan aithne dhuinn an àithne “%s”." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Na cleachd tasgadan nuair thèid an iarrtas a chur an sàs." diff -Nru appstream-0.9.4/po/gl.po appstream-0.12.0/po/gl.po --- appstream-0.9.4/po/gl.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/gl.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,10 +7,10 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2016-08-15 18:48+0000\n" +"Last-Translator: Matthias Klumpp \n" "Language-Team: Galician (http://www.transifex.com/freedesktop/appstream/" "language/gl/)\n" "Language: gl\n" @@ -19,350 +19,1007 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Un tipo de elemento fornecedor (p.ex. lib, bin, python3, …)" - +#: tools/appstream-cli.c:146 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "'%s' command" +msgstr "" + +#: src/as-category.c:168 +#, fuzzy +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Categorías" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "" + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +#, fuzzy +msgid "AppStream CLI" +msgstr "Versión da ferramenta cliente de AppStream: %s" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "Versión da ferramenta cliente de AppStream: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Actualización de caché de AppStream completada con éxito." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Completouse a actualización da caché de AppStream, porén algúns metadatos " -"foron ignorados debido a erros." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Fallou a actualización da caché de AppStream." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Interface por liña de ordes de AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "Versión da ferramenta cliente de AppStream: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" msgstr "" +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Paquete" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." +msgstr "" + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" msgstr "" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Categorías" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Orde «%s» descoñecida." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Obrigatorio para" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, fuzzy, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Non foi posíbel atopar compoñentes co id «%s»!" + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +#, fuzzy +msgid "Default Screenshot URL" +msgstr "URL da captura de pantalla de exemplo" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Descrición" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Desenvolvedor" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +#, fuzzy +msgid "Developer Tools" +msgstr "Desenvolvedor" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Non usar a caché de Xapian ao levar a cabo a consulta" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +#, fuzzy +msgid "Don't show colored output." msgstr "Non mostrar a saída con cores" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "" -msgid "Enforce a cache refresh" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +#, fuzzy +msgid "Enforce a cache refresh." msgstr "Forzar a actualización da caché" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "" -msgid "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Non se atopou o ficheiro %s ou denegouse o permiso!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "" + +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 msgid "Fonts" msgstr "" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Páxina principal" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Icona" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identificador" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licenza" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "Estabelecer manualmente a localización da caché de AppStream" + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." msgstr "" "Estabelecer manualmente a localización do metadato de AppStream para a " "rexeneración da caché" -msgid "Manually set the location of the AppStream cache" -msgstr "Estabelecer manualmente a localización da caché de AppStream" +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "" -msgid "Mimetypes" +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" msgstr "" +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nome" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Non hai ningún compoñente que coincida con «%s»." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "" +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, fuzzy, c-format +msgid "Option '%s' is unknown." +msgstr "Orde «%s» descoñecida." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paquete" -msgid "Print detailed output about found components" -msgstr "Mostrar a información detallada sobre os compoñentes atopados" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "" -msgid "Print even pedantic hints when validating" -msgstr "Mostrar suxestións incluso pedantes ao validar" +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +#, fuzzy +msgid "Print detailed output about found components." +msgstr "Mostrar a información detallada sobre os compoñentes atopados" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Grupo do proxecto" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Elementos fornecidos" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "" +#: src/as-provided.c:157 msgid "Python 3" msgstr "" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." msgstr "" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "" +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Execute «%s --help» para ver a lista completa de opcións de liña de ordes " "dispoñíbeis." +#: tools/appstream-cli.c:187 +#, fuzzy, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Execute «%s --help» para ver a lista completa de opcións de liña de ordes " +"dispoñíbeis." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" -msgstr "URL da captura de pantalla de exemplo" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "" -msgid "Select a value for the provides-item which needs to be found." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" msgstr "" -msgid "Show extra debugging information" +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +#, fuzzy +msgid "Show extra debugging information." msgstr "Mostra información de depuración adicional" -msgid "Show the program version" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +#, fuzzy +msgid "Show the program version." msgstr "Mostra a versión do programa" -#. these are commands we can use with appstream-cli +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Subordes:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Resumo" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "" -msgid "The system metadata cache does not exist." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" msgstr "" -msgid "The system metadata cache exists." +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" msgstr "" +#: tools/ascli-actions-mdata.c:464 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "The .desktop file '%s' does not exist." msgstr "" -msgid "Tried to perform query on closed database." +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 #, c-format -msgid "Unable to find component matching %s!" -msgstr "Non foi posíbel atopar os compoñentes que coinciden con %s!" +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "Unable to find component providing '%s;%s'!" +msgid "Unable to build the template metainfo file: %s" +msgstr "" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to find component matching %s!" +msgstr "Non foi posíbel atopar os compoñentes que coinciden con %s!" + +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 +#, fuzzy, c-format +msgid "Unable to find component with ID '%s'!" msgstr "Non foi posíbel atopar compoñentes co id «%s»!" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:470 +#, c-format +msgid "Unable to read the .desktop file: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, fuzzy, c-format +msgid "Validation failed: %s" msgstr "Fallou a validación." +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Validación rematada con éxito." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, fuzzy, c-format +msgid "Validation was successful: %s" +msgstr "Validación rematada con éxito." + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "" + +#: src/as-category.c:177 +#, fuzzy +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Categorías" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "We have information on %i software components." +msgid "Version: %s" +msgstr "" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" msgstr "" +#: tools/ascli-actions-misc.c:151 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "O ficheiro XML «%s» do menú XDG está danado." +msgid "We have information on %i software components." +msgstr "" + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "" +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Debe especificar unha orde." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +#, fuzzy +msgid "You need to specify a component-ID." msgstr "Debe especificar un id de compoñente." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Debe especificar un ficheiro a validar!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Debe especificar un directorio raíz para comezar a validación!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Debe especificar o termo a buscar." +#: tools/ascli-actions-mdata.c:354 +#, fuzzy +msgid "You need to specify an input and output file." +msgstr "Debe especificar unha orde." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;aplicativo;aplicación;paquete;programa;suite;ferramenta" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Orde «%s» descoñecida." + +#, fuzzy +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Non usar a caché de Xapian ao levar a cabo a consulta" + +#~ msgid "AppStream cache update failed." +#~ msgstr "Fallou a actualización da caché de AppStream." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Categorías" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Categorías" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Categorías" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Non se atopou o ficheiro %s ou denegouse o permiso!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Non hai ningún compoñente que coincida con «%s»." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "O ficheiro XML «%s» do menú XDG está danado." diff -Nru appstream-0.9.4/po/gu.po appstream-0.12.0/po/gu.po --- appstream-0.9.4/po/gu.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/gu.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Gujarati (http://www.transifex.com/freedesktop/appstream/" -"language/gu/)\n" -"Language: gu\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/he.po appstream-0.12.0/po/he.po --- appstream-0.9.4/po/he.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/he.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Hebrew (http://www.transifex.com/freedesktop/appstream/" -"language/he/)\n" -"Language: he\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/hi.po appstream-0.12.0/po/hi.po --- appstream-0.9.4/po/hi.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/hi.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Hindi (http://www.transifex.com/freedesktop/appstream/" -"language/hi/)\n" -"Language: hi\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/hr.po appstream-0.12.0/po/hr.po --- appstream-0.9.4/po/hr.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/hr.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,362 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Croatian (http://www.transifex.com/freedesktop/appstream/" -"language/hr/)\n" -"Language: hr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/hu.po appstream-0.12.0/po/hu.po --- appstream-0.9.4/po/hu.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/hu.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,220 +1,598 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: -# Balázs Úr , 2014-2016 -# kelemeng , 2015-2016 +# Balázs Úr , 2014-2016. +# kelemeng , 2015-2016. +# Gabor Kelemen , 2016. msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Hungarian (http://www.transifex.com/freedesktop/appstream/" -"language/hu/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-01-27 14:37+0000\n" +"Last-Translator: Balázs Meskó \n" +"Language-Team: Hungarian \n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.19-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Egy szolgáltatás-elem típus (például lib, bin, python3, …)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "„%s” parancs" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D grafika" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Akció" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Kiegészítők" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Kaland" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Az akadékoskodó tippeket is írja ki." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Egy elemtípus (például lib, bin, python3, …)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Egy segédprogram az AppStream metaadatokkal való munkához" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream parancssori felület" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "AppStream CLI eszközverzió: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"AppStream CLI eszközverzió: %s\n" +"AppStream programkönyvtár verzió: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "AppStream állapot:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Az AppStream gyorsítótár-frissítés sikeresen befejeződött." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Az AppStream gyorsítótár-frissítés befejeződött, de néhány metaadat mellőzve " -"lett a hibák miatt." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Az AppStream gyorsítótár-frissítés meghiúsult." +"Az AppStream gyorsítótár frissítése sikertelen. Kapcsolja be a bőbeszédű " +"módot a részletesebb problémainformációkért." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "Az AppStream gyorsítótár frissítése nem szükséges." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "AppStream parancssoros felület" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"Az AppStream szoftverkomponens-gyorsítótár nem található. Ez jelentheti azt, " -"hogy az AppStream hibásan lett beállítva, vagy hogy a disztribúció nem " -"biztosít AppStream metaadatokat." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"Az AppStream egy disztribúciók közötti specifikáció, amely metaadatokat " +"biztosít a szoftverkomponensekről." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"Az AppStream rendszergyorsítótár frissítve lett, de problémák találhatók: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream verzió: %s" +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Ügyességi" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Mesterséges intelligencia" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Csillagászat" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Csillagászat" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Hang/videó" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Zeneszerkesztés" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Binárisok" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Kockák" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Tábla" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Csomag" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "„%s” gyorsítótárhely nem írható." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Naptár" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"„%s” nem másolható. A fájl nem rendelkezik „.metainfo.xml” vagy „.appdata." -"xml” kiterjesztéssel." +"A(z) „%s” nem másolható: a fájlnak nincs „.metainfo.xml” vagy „.appdata.xml” " +"végződése." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kártya" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategóriák" -#, c-format -msgid "Command '%s' is unknown." -msgstr "A(z) „%s” parancs ismeretlen." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Csevegés" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Kémia" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Kémia" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodekek" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Kommunikáció és hírek" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Összetevő" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "A(z) „%s” összetevőnek nincs telepítésre jelölt változata." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Kötelező ehhez" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Gyűjtemény átalakítása XML-ről YAML-ra vagy fordítva." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Nem található a következőt biztosító összetevő: „%s::%s”." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Sablon létrehozása egy metainformációs fájlhoz (a fő projekt általi " +"kitöltéshez)." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "D-Bus munkamenet-szolgáltatások" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "D-Bus rendszerszolgáltatások" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Adatbázis" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Hibakeresők" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Alapértelmezett képernyőkép URL" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Alapértelmezett metaadat-formátum (érvényes értékek: „xml” és „yaml”)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Leírás" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Fejlesztő" -msgid "Display various information about installed AppStream metadata." -msgstr "" -"Különböző információk megjelenítése a telepített AppStream metaadatokról." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Fejlesztői eszközök" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Állapotinformációk megjelenítése az elérhető AppStream metaadatokról." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Disztribúció metaadatok:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Ne használja a Xapian gyorsítótárat a kérés végrehajtásakor" - -msgid "Don't show colored output" -msgstr "Ne jelenítsen meg színes kimenetet" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Ne használjon hálózati hozzáférést." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Ne jelenítsen meg színes kimenetet." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "Nyers XML-metaadatok kiírása az azonosítóra illeszkedő összetevőhöz." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Oktatás" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Üres." -msgid "Enforce a cache refresh" -msgstr "Gyorsítótár-frissítés kényszerítése" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulátorok" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Gyorsítótár-frissítés kényszerítése." +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Hiba a metaadat-tároló betöltésekor: %s" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Kibővíti" -msgid "Extensions" -msgstr "Kiterjesztések" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "A(z) %s fájl nem található vagy a hozzáférés megtagadva!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Kiemelt" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Kiemelt" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Kiemelt" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Kiemelt" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Kiemelt" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Kiemelt" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Kiemelt" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Kiemelt" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Kiemelt" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Fájlrendszer" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Pénzügy" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Flashelt firmware" +#: src/as-provided.c:151 msgid "Fonts" msgstr "Betűkészletek" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Betűkészletek" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "%i komponens található örökölt útvonalakon." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "%i komponens található" +msgstr "%i komponens található." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Játékok" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "Összetevők lekérése, amelyek a megadott elemet biztosítják." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "Információk kérése egy összetevőről az azonosítója szerint." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafika és fényképészet" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Honlap" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDE-k" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ikon" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Ikonkészletek" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Azonosító" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Beviteli források" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Metaadatfájl telepítése a megfelelő helyre." -msgid "Install software matching the component-id." -msgstr "A component-id-nek megfelelő szoftver telepítése." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Az összetevő-azonosítónak megfelelő szoftver telepítése." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" "Érvénytelen típus a kiválasztott biztosított elemhez. Az érvényes értékek:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Gyerekjátékok" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Nyelvi csomagok" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Nyelvek" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Programkönyvtárak" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licenc" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" -"Az AppStream metaadatok helyének kézi beállítása a gyorsítótár újra " -"előállításához" - -msgid "Manually set the location of the AppStream cache" -msgstr "Az AppStream gyorsítótár helyének kézi beállítása" - -msgid "Mimetypes" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Lokalizáció" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logikai" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" msgstr "MIME-típusok" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Kérés küldése gyorsítótárazás nélkül." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Az AppStream gyorsítótár kézileg kiválasztott helye." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Az AppStream metaadatok kézileg kiválasztott helye a kereséshez." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematika" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematika" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "A(z) „%s” metaadatfájl nem létezik." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "A metaadat fájlok hibákat tartalmaznak:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Metainfo fájlok:" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Modaliasok" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Zenelejátszók" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Név" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Hírek" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Nem található erre illeszkedő összetevő: „%s”." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "Nem található „%s;%s” szolgáltatását biztosító összetevő." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "Nincsenek ikonok." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -222,160 +600,459 @@ "Nem található megfelelő csomagkezelő CLI. Győződjön meg arról, hogy például " "a „pkcon” (a PackageKit része) elérhető-e." -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "Nincs érték az elemhez a meghatározott kereséséhez." +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Iroda" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "A(z) „%s” kapcsoló ismeretlen." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Csomag" -msgid "Print detailed output about found components" -msgstr "Részletes kimenet írása a megtalált összetevőről" - -msgid "Print even pedantic hints when validating" -msgstr "Még az akadékoskodó tippeket is nyomtassa ellenőrzéskor" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fényképészet" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Részletes kimenet kiírása a megtalált összetevőkről." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Projektcsoport" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Szolgáltatott elemek" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (2-es verzió)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Az összetevő információs gyorsítótár újraépítése." - -msgid "Remove software matching the component-id." -msgstr "A component-id-nek megfelelő szoftver eltávolítása." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Az összetevő-metaadat gyorsítótár újraépítése." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Az összetevő-azonosítónak megfelelő szoftver eltávolítása." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotika" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Szerepjátékok" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Futtassa a(z) „%s --help” parancsot az elérhető parancssori kapcsolók teljes " "listájáért." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Futtassa a(z) „%s --help” parancsot az elérhető parancsok és kapcsolók " +"listájáért, illetve a(z) „%s %s --help” parancsot az erre az alparancsra " +"jellemző kapcsolók listájának megtekintéséhez." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Futásidejű firmware" -msgid "Sample Screenshot URL" -msgstr "Minta képernyőkép URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Képolvasás" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Tudomány" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Keresés az összetevő adatbázisban." -msgid "Select a value for the provides-item which needs to be found." -msgstr "" -"Válasszon egy értéket ahhoz a provides-item-hez, amelyet meg kell találni." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Biztonság" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "További hibakeresési információk megjelenítése." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "A programverzió megjelenítése." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sport" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Stratégia" -msgid "Show extra debugging information" -msgstr "További hibakeresési információk megjelenítése" - -msgid "Show the program version" -msgstr "A programverzió megjelenítése" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Alparancsok:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Összegzés" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Összegzés:" -msgid "The system metadata cache does not exist." -msgstr "A rendszer metaadat-gyorsítótára nem létezik." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Rendszerfigyelés" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Terminálemulátorok" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Szövegszerkesztők" -msgid "The system metadata cache exists." -msgstr "A rendszer metaadat-gyorsítótára létezik." +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "A(z) „%s” .desktop fájl nem létezik." +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"Az AppStream rendszergyorsítótár frissítve lett, de néhány hiba lett " +"észlelve, amely hiányzó metaadatokhoz vezethet. További információkért nézze " +"meg a részletes naplót." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "A TÍPUS értéke érvényes komponenstípus kell legyen, mint például: %s" + +#: tools/ascli-actions-mdata.c:446 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" -"Hiba történt a további információk megkeresésére tett kísérlet közben: %s" +"A(z) „%s” szoftverkomponens-típus nem érvényes az AppStreamben. A lehetséges " +"értékek:" -msgid "Tried to perform query on closed database." -msgstr "Kísérlet lezárt adatbázison keresésre." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"Ez a parancs a nem kötelező TÍPUS és FÁJL argumentumokat fogadja, ahol a " +"FÁJL a kimeneti fájl (vagy szabványos kimenet esetén „-”)." + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Ezzel az eszközzel AppStream XML vagy YAML metaadatokat olvashat, írhat, " +"érvényesíthet és transzformálhat. Hozzáférést is biztosít a rendszer " +"metaadataihoz, például le tudja kérdezni a szoftvereket, amelyek bizonyos " +"MIME-típusokat biztosítanak, és telepíteni tudja a szoftverkomponens-" +"azonosítója alapján." + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "Nem lehet összeállítani a sablon metainformációs fájlt: %s" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Nem lehet átalakítani a fájlt: nem sikerült meghatározni a kimeneti " +"formátumot, állítsa be egyértelműen a „--format=” használatával." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "Nem található a következőre illeszkedő összetevő: %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Nem található a következőt biztosító összetevő: „%s;%s”!" +msgid "Unable to find component with ID '%s'!" +msgstr "Nem található összetevő a következő azonosítóval: „%s”!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Nem található összetevő a következő azonosítóval: „%s”!" +msgid "Unable to read the .desktop file: %s" +msgstr "A .desktop fájl nem olvasható: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "Nem nyitható meg az AppStream szoftverösszetevő-gyorsítótár." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Nem lehet elmenteni a sablon metainformációs fájlt: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Nem lehet elindítani a csomagkezelőt: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "Nem lehet írni ide: „%s”. A metainformációs fájl nem telepíthető." -msgid "Upstream metadata:" -msgstr "Eredeti metaadatok:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Ismeretlen parancs: „%s”." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"A megadott .desktop fájl használata a metainfo fájl alapvető értékeinek " +"kitöltésére." +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Segédprogramok" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "AppStream XML-fájlok ellenőrzése a kiadásoknál." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" "Egy alkalmazás telepített fájlfájának összevetése az érvényes metaadatokkal." -msgid "Validation failed." -msgstr "Az ellenőrzés nem sikerült." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Az ellenőrzés sikertelen: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Az ellenőrzés sikeres volt." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "Az ellenőrzés sikeres volt: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "A keresendő elemérték." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vektorgrafika" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Verzió: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Megjelenítők" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "%i szoftverkomponensről van információnk." -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "A(z) „%s” XDG menü XML fájl sérült." +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Webböngészők" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Szövegszerkesztő" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Információkat találhat az alparancsra jellemző kapcsolókról a „--help” " +"átadásával az alparancsnak." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "A művelet végrehajtásához rendszergazdai jogokra lehet szükség." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Meg kell adnia egy AppStream szoftverkomponens-típust a sablon " +"előállításához. A lehetséges értékek:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Meg kell adnia egy parancsot." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "Meg kell adnia egy összetevő-azonosítót." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Meg kell adnia egy fájlt az ellenőrzéshez!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "Meg kell adnia egy metaadatfájlt." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Meg kell adnia egy gyökérkönyvtárat az ellenőrzés megkezdéséhez!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Meg kell adnia egy kifejezést a kereséshez." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Meg kell adnia egy bemeneti és egy kimeneti fájlt." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;alkalmazás;csomag;program;alkalmazáscsomag;eszköz" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "hiba: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "információ: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "akadékoskodó: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "figyelmeztetés: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "A(z) „%s” parancs ismeretlen." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Ne használjon semmilyen gyorsítótárat a kérés végrehajtásakor." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Az AppStream gyorsítótár-frissítés meghiúsult." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "Az AppStream adattároló be lett töltve, de néhány metaadat mellőzve lett " +#~ "a hibák miatt." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "Nem lehet rákeresni ismeretlen összetevőtípusra." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategóriák" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategóriák" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategóriák" + +#~ msgid "Extensions" +#~ msgstr "Kiterjesztések" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "A(z) %s fájl nem található vagy a hozzáférés megtagadva!" + +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Nem található „%s::%s” szolgáltatását biztosító összetevő." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "A(z) „%s” XDG menü XML fájl sérült." diff -Nru appstream-0.9.4/po/ia.po appstream-0.12.0/po/ia.po --- appstream-0.9.4/po/ia.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ia.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Interlingua (http://www.transifex.com/freedesktop/appstream/" -"language/ia/)\n" -"Language: ia\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/id.po appstream-0.12.0/po/id.po --- appstream-0.9.4/po/id.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/id.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,355 +7,974 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Indonesian (http://www.transifex.com/freedesktop/appstream/" -"language/id/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-31 06:24+0000\n" +"Last-Translator: se7entime \n" +"Language-Team: Indonesian \n" "Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 2.20-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Sebuah tipe buir-penyedia (mis. lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "perintah '%s'" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Grafis 3D" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Aksi" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Pengaya" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Petualangan" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Tampilkan juga saran pedantik." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Suatu tipe butir (mis. lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Utilitas untuk bekerja dengan metadata AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "CLI AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Alat CLI AppStream versi: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Alat CLI AppStream versi: %s\n" +"Pustaka AppStream versi: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "Status AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Pemutakhiran singgahan AppStream berakhir dengan sukses." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Pemutakhiran singgahan AppStream selesai, tapi beberapa metadata diabaikan " -"karena kesalahan." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Pemutakhiran singgahan AppStream gagal." +"Pemutakhiran singgahan AppStream gagal. Hidupkan mode rinci untuk memperoleh " +"informasi masalah lebih terrinci." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "Pemutakhiran singgahan AppStream tidak perlu." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "Antar muka baris perintah AppStream" +msgstr "Antarmuka baris perintah AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" +"AppStream adalah spesifikasi lintas-distribusi untuk menyediakan metadata " +"tentang komponen perangkat lunak." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "Singgahan sistem AppStream dimutakhirkan, tapi ditemukan masalah: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream versi: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arkade" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Kecerdasan Buatan" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomi" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomi" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Audio & Video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Pembuatan & Penyuntingan Audio" +#: src/as-provided.c:147 msgid "Binaries" msgstr "Biner" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Balok" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Papan" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Bundel" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "Lokasi singgahan '%s' tidak dapat ditulisi." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalender" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"Tidak bisa menyalin '%s': Berkas tidak memiliki ekstensi '.metainfo.xml' " -"atau '.appdata.xml'." +"Tidak bisa menyalin '%s': Berkas tidak memiliki akhiran '.metainfo.xml' atau " +"'.appdata.xml'." +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kartu" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategori" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Perintah '%s' tak dikenal." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Komunikasi" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Kimia" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Kimia" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodek" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Komunikasi & Berita" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Komponen" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "Komponen '%s' tidak punya kandidat instalasi." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Wajib bagi" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Mengonversi koleksi XML ke YAML atau sebaliknya." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Tidak bisa menemukan komponen yang menyediakan '%s::%s'." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Buat suatu templat bagi berkas metainfo (untuk diisi oleh projek upstream)." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "Layanan Sesi DBus" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "Layanan Sistem DBus" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Basis data" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Debugger" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Cuplikan Layar URL bawaan" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Format metadata baku (nilai yang valid adalah 'xml' dan 'yaml')." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Deskripsi" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Pengembang" -msgid "Display various information about installed AppStream metadata." -msgstr "" -"Tampilkan berbagai informasi tentang metadata AppStream yang terpasang." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Alat Pengembang" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Tampilkan informasi status tentang metadata AppStream yang tersedia." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Metadata distribusi:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Jangan gunakan singgahan Xapian ketika melaksanakan permintaan" - -msgid "Don't show colored output" -msgstr "Jangan tampilkan keluaran berwarna" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Jangan pakai akses jaringan." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Jangan tampilkan keluaran berwarna." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "Curahkan metadata XML mentah bagi suatu komponen yang cocok ID-nya." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Edukasi" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Kosong." -msgid "Enforce a cache refresh" -msgstr "Paksakan penyegaran singgahan" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulator" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Paksakan penyegaran tembolok." -msgid "Extends" -msgstr "" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Kesalahan ketika memuat pool metadata: %s" -msgid "Extensions" -msgstr "Ekstensi" +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Memperluas" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Berkas %s tak ditemukan atau tak diizinkan!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Unggulan" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Unggulan" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Unggulan" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Unggulan" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Unggulan" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Unggulan" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Unggulan" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Unggulan" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Unggulan" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Sistem Berkas" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finansial" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Firmware yang di-flash" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Fonta" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "Fonta" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Ditemukan %i komponan dalam path legasi." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "Ditemukan %i komponen." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Permainan" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "Dapatkan komponen yang menyediakan butir yang diberikan." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "Dapatkan informasi tentang suatu komponen berdasarkan ID-nya." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafis & Fotografi" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Beranda" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDE" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ikon" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Set ikon" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identifier" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Sumber Masukan" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Pasang suatu berkas metadata ke lokasi yang benar." -msgid "Install software matching the component-id." -msgstr "Pasang perangkat lunak yang cocok dengan id komponen." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Pasang perangkat lunak dengan component-ID yang cocok." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +"Tipe yang dipilih tak valid bagi butir yang disediakan. Nilai yang valid " +"adalah:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Anak-anak" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Paket Bahasa" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Bahasa" + +#: src/as-provided.c:145 msgid "Libraries" -msgstr "" +msgstr "Pustaka" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Lisensi" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Lokalisasi" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logika" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "jenis MIME" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Buat permintaan tanpa penyinggahan." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Lokasi singgahan AppStream yang dipilih secara manual." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Lokasi metadata AppStream yang dipilih secara manual untuk dipindai." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematika" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematika" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Berkas metadata '%s' tidak ada." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Berkas metadata punya kesalahan:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Berkas metainfo:" +#: src/as-provided.c:153 msgid "Modaliases" -msgstr "" +msgstr "Modalias" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Pemutar Musik" +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nama" -#, c-format -msgid "No component matching '%s' found." -msgstr "" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Berita" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "" +msgid "No component matching '%s' found." +msgstr "Tidak ditemukan komponen yang cocok '%s'." +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Tak ada ikon." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" +"Tidak ditemukan CLI manajer paket yang cocok. Harap pastikan bahwa mis. " +"\"pkcon\" (bagian dari PackageKit) tersedia." -msgid "No value for the item to search for defined." -msgstr "" +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "Tidak ada nilai yang didefinisikan bagi butir yang dicari." +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Perkantoran" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Opsi '%s' tak dikenal." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paket" -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografi" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Cetak keluaran terrinci tentang komponen yang ditemukan." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Grup Proyek" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Butir Yang Disediakan" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "" +msgstr "Python (Versi 2)" +#: src/as-provided.c:157 msgid "Python 3" -msgstr "" +msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Bangun ulang singgahan metadata komponen." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Buang perangkat lunak dengan component-ID yang cocok." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotika" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Bermain Peran" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 +#, c-format +msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +"Jalankan '%s --help' untuk melihat daftar lengkap opsi baris perintah yang " +"tersedia." +#: tools/appstream-cli.c:187 #, c-format -msgid "Run '%s --help' to see a full list of available command line options." +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." msgstr "" +"Jalankan '%s --help' untuk melihat daftar lengkap perintah dan opsi yang " +"tersedia, dan '%s %s --help' untuk melihat daftar opsi spesifik bagi sub " +"perintah ini." +#: src/as-provided.c:163 msgid "Runtime Firmware" -msgstr "" +msgstr "Firmware Runtime" -msgid "Sample Screenshot URL" -msgstr "" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Pemindaian" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Sains" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "" +msgstr "Cari basis data komponen." -msgid "Select a value for the provides-item which needs to be found." -msgstr "" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Keamanan" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Tampilkan informasi debug ekstra." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Tampilkan versi program." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Olah Raga" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategi" -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" -msgstr "" +msgstr "Subperintah:" +#: tools/ascli-utils.c:284 msgid "Summary" -msgstr "" +msgstr "Ringkasan" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Ringkasan:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Pemantauan Sistem" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emulator Terminal" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Penyunting Teks" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Berkas .desktop '%s' tidak ada." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" +"Singgahan sistem AppStream dimutakhirkan, tapi beberapa kesalahan " +"terdeteksi, yang mungkin mengantar ke metadata yang kurang. Lihatlah log " +"rinci untuk informasi lebih lanjut." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "TIPE mesti berupa suatu tipe komponen yang valid, seperti misalnya: %s" -msgid "The system metadata cache does not exist." +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +"Tipe komponen perangkat lunak '%s' tidak valid dalam AppStream. Nilai yang " +"mungkin adalah:" -msgid "The system metadata cache exists." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" +"Perintah ini menerima argumen posisional pilihan TIPE dan BERKAS, BERKAS " +"adalah berkas tujuan tulis (atau \"-\" untuk keluaran standar)." + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Alat ini memungkinkan pembacaan, penulisan, validasi, dan transformasi " +"metadata XML atau YAML AppStream. Ini memberi akses ke pool metadata sistem " +"untuk misalnya mengkueri perangkat lunak yang menyediakan MIME-type tertentu " +"dan memasangnya dengan identifier komponen perangkat lunaknya." +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" +msgid "Unable to build the template metainfo file: %s" +msgstr "Tidak bisa membangun templat berkas metainfo: %s" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" +"Tidak bisa mengonversi berkas: Tidak bisa menentukan format keluaran, harap " +"atur secara eksplisit memakai '--format='." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "" +msgstr "Tidak bisa menemukan komponen yang cocok %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" +msgid "Unable to find component with ID '%s'!" +msgstr "Tidak bisa menemukan komponen dengan ID '%s'!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" +msgid "Unable to read the .desktop file: %s" +msgstr "Tidak bisa membaca berkas .desktop: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Tidak bisa menyimpan templat berkas metainfo: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "" +msgstr "Tidak bisa men-spawn manajer paket: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" +msgstr "Tidak bisa menulis ke '%s', tidak bisa memasang berkas metainfo." -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Perintah tak dikenal '%s'." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +"Gunakan berkas .desktop yang diberikan untuk mengisi nilai-nilai dasar dari " +"berkas metainfo." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Utilitas" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." -msgstr "" +msgstr "Validasikan berkas XML AppStream apakah bermasalah." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" +msgstr "Validasikan metadata pohon berkas terpasang dari suatu aplikasi." -msgid "Validation failed." -msgstr "Validasi gagal." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Validasi gagal: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." -msgstr "" +msgstr "Validasi sukses." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "Validasi sukses: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Nilai dari butir yang mesti ditemukan." +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Grafik Vektor" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "Version: %s" +msgstr "Versi: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Penampil" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "Kami punya informasi atas %i komponen perangkat lunak." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Peramban Web" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Pengolah Kata" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." msgstr "" +"Anda dapat menemukan informasi tentang opsi spesifik sub perintah dengan " +"memberikan \"--help\" ke sub perintah." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." +msgstr "Anda mungkin perlu hak superuser untuk melakukan aksi ini." + +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" msgstr "" +"Anda perlu memberi tipe komponen perangkat lunak AppStream untuk " +"menjangkitkan suatu templat. Nilai yang mungkin adalah:" +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." -msgstr "" +msgstr "Anda perlu menyatakan suatu perintah." -msgid "You need to specify a component-id." -msgstr "" +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Anda perlu menyatakan sebuah ID komponen." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "" +msgstr "Anda perlu menyatakan sebuah berkas yang akan divalidasi!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "Anda perlu menyatakan suatu berkas metadata." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" -msgstr "" +msgstr "Anda perlu menyatakan suatu direktori akar untuk memulai validasi!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." -msgstr "" +msgstr "Anda perlu menyatakan istilah yang akan dicari." + +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Anda perlu menyatakan berkas masukan dan keluaran." #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, @@ -363,5 +982,74 @@ #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" -msgstr "" +msgstr "app;application;package;program;programme;suite;tool;aplikasi;paket" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "kesalahan: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "info: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "pedantik: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "peringatan: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Perintah '%s' tak dikenal." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Jangan gunakan tembolok apapun ketika melakukan permintaan." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Pemutakhiran singgahan AppStream gagal." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "Pool data AppStream dimuat, tapi beberapa metadata diabaikan karena " +#~ "kesalahan." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "Tidak bisa mencari tipe komponen yang tak dikenal." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategori" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategori" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategori" + +#~ msgid "Extensions" +#~ msgstr "Ekstensi" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Berkas %s tak ditemukan atau tak diizinkan!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Tidak ditemukan komponen yang menyediakan '%s;%s'." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "Berkas XML Menu XDG '%s' rusak." diff -Nru appstream-0.9.4/po/it.po appstream-0.12.0/po/it.po --- appstream-0.9.4/po/it.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/it.po 2018-04-04 15:53:56.000000000 +0000 @@ -6,378 +6,1064 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-12 06:18+0000\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-29 06:53+0000\n" "Last-Translator: Milo Casagrande \n" -"Language-Team: Italian (http://www.transifex.com/freedesktop/appstream/" -"language/it/)\n" +"Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.20-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Un tipo provides-item (lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Comando «%s»" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Grafica 3D" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Azione" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Componenti aggiuntivi" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Avventura" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Stampa suggerimenti prolissi" + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Un tipo di elemento (per esempio lib, bin, python3, …)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Uno strumento per lavorare con metadati AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "CLI AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Version strumento CLI AppStream: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Versione strumento CLI AppStream: %s\n" +"Versione libreria AppStream: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "Stato AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Aggiornamento cache AppStream completato con successo." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Aggiornamento cache AppStream completato, ma alcuni metadati sono stati " -"ignorati a causa di errori." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Aggiornamento cache AppStream non riuscito." +"Aggiornamento della cache AppStream non riuscito. Per maggiori informazioni, " +"abilitare la modalità prolissa." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "Aggiornamento cache AppStream non necessario." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Interfaccia a riga di comando AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"La cache software di AppStream non è stata trovata. Ciò può essere dovuto a " -"una configurazione errata di AppStream o alla mancanza di metadati AppStream " -"non forniti della propria distribuzione." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream è una specifica multi-distribuzione che fornisce metadati riguardo " +"ai componenti software." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"La cache AppStream di sistema è stata aggiornata, ma sono stati riscontrati " +"degli errori: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "Versione AppStream: %s" +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arcade" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Intelligenza artificiale" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomia" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomia" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Audio e video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Produzione e modifica audio" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Binari" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Blocchi" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Tavolo" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Bundle" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "Non è possibile scrivere sulla posizione cache \"%s\"" +msgstr "Non è possibile scrivere sulla posizione cache «%s»." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Calendario" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"Impossibile copiare \"%s\": il file non ha un'estensione \".metainfo.xml\" o " -"\".appdata.xml\"." +"Impossibile copiare «%s»: il file non ha un'estensione «.metainfo.xml» o «." +"appdata.xml»." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Carta" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Categorie" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Comando \"%s\" sconosciuto." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Chat" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Chimica" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Chimica" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Codec" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Comunicazione e notizie" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Componente" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "Il componente \"%s\" non ha alcun candidato per l'installazione." +msgstr "Il componente «%s» non ha alcun candidato per l'installazione." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Obbligatorio per" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Converte la collezione XML in YAML o vice versa" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Impossibile trovare un componente che fornisca «%s::%s»." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Crea un modello per un file metainfo (deve essere completato dal progetto " +"originario)" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "Servizi di sessione DBus" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "Servizi di sistema DBus" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Basi di dati" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Strumenti di debug" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL predefinito della schermata" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" +"Valore predefinito del formato dei metadati (valori validi sono «xml» e " +"«yaml»)" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Descrizione" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Sviluppatore" -msgid "Display various information about installed AppStream metadata." -msgstr "Visualizza informazioni riguardo ai metadati AppStream installati." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Strumenti di sviluppo" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "" +"Visualizza informazioni di stato riguardo ai metadati AppStream installati." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Metadati della distribuzione:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Non usa la cache Xapian durante le richieste" - -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Non usa l'accesso alla rete" + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." msgstr "Non mostra output colorato" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" -"Esegue il dump dei meta-dati XML per un componente che corrisponde all'ID" +"Esegue il dump dei metadati XML per un componente che corrisponde all'ID" + +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Educazione" +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Vuota." -msgid "Enforce a cache refresh" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulatori" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." msgstr "Forza l'aggiornamento della cache" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Errore nel caricare l'insieme dei metadati: %s" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Estende" -msgid "Extensions" -msgstr "Estensioni" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "File %s non trovato o permesso negato." +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "In evidenza" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "In evidenza" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "In evidenza" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "In evidenza" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "In evidenza" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "In evidenza" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "In evidenza" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "In evidenza" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "In evidenza" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "File system" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finanza" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Firmware caricato" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Caratteri" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "Caratteri" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "Trovati %i componenti in percorsi obsoleti." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "Trovati %i componenti." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Giochi" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "Ottiene i componenti che forniscono l'oggetto dato" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "Ottiene informazioni su un componente tramite il suo ID" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafica e fotografia" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Sito web" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDE" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Icona" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Insieme di icone" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identificatore" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Sorgenti d'input" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Installa un file metadati nella corretta posizione" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "Installa software che corrisponde all'ID del componente" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "Tipo non valido per l'elemento selezionato. Valori valido sono:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Ragazzi" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Traduzioni" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Lingue" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Librerie" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licenza" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" -"Imposta manualmente la posizione dei metadati AppStream per la rigenerazione " -"della cache" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Localizzazione" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logica" -msgid "Manually set the location of the AppStream cache" +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "Tipi MIME" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Esegue la richiesta senza cache" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." msgstr "Imposta manualmente la posizione della cache AppStream" -msgid "Mimetypes" -msgstr "Tipi MIME" +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Imposta manualmente la posizione dei metadati AppStream da analizzare" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematica" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematica" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Il file dei metadati «%s» non esiste." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "I file dei metadati presentano degli errori:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "File metainfo:" +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Modalias" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Riproduttori musicali" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nome" -#, c-format -msgid "No component matching '%s' found." -msgstr "Non è stato trovato alcun componente che corrisponde a \"%s\"." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Notizie" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "Non è stato trovato alcun componente che fornisce \"%s;%s\"." +msgid "No component matching '%s' found." +msgstr "Non è stato trovato alcun componente che corrisponde a «%s»." +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "Nessuna icona." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -"Nessun gestore di pacchetti CLI trovato. Assicurarsi che \"pkcon\" (parte di " +"Nessun gestore di pacchetti CLI trovato. Assicurarsi che «pkcon» (parte di " "PackageKit) sia disponibile." -msgid "No value for the item to search for defined." -msgstr "Nessun valore per l'elemento da cercare definito." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "Nessun valore definito per l'elemento da cercare." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Ufficio" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Opzione «%s» sconosciuta." +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Pacchetto" -msgid "Print detailed output about found components" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografia" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." msgstr "Stampa informazioni dettagliate riguardo ai componenti trovati" -msgid "Print even pedantic hints when validating" -msgstr "Stampa suggerimenti prolissi durante la validazione" - #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Gruppo progetto" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Elementi forniti" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (versione 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Rigenera la cache delle informazioni del componente" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Rigenera la cache dei metadati del componente." -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "Rimuove software tramite l'ID del componente" +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotica" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Di ruolo" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Eseguire \"%s --help\" per l'elenco completo delle opzioni a riga di comando." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Eseguire \"%s --help\" per l'elenco completo delle opzioni a riga di comando " +"e \"%s %s --help\" per l'elenco delle opzioni per il comando specificato." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Firmware di esecuzione" -msgid "Sample Screenshot URL" -msgstr "URL schermata esempio" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Scansione" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Scienze" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Cerca nel database dei componenti" -msgid "Select a value for the provides-item which needs to be found." -msgstr "Seleziona un valore per il provides-item da cercare" - -msgid "Show extra debugging information" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Sicurezza" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." msgstr "Mostra informazioni aggiuntive di debug" -msgid "Show the program version" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." msgstr "Mostra la versione del programma" -#. these are commands we can use with appstream-cli +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sport" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategia" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Sotto-comandi:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Riepilogo" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Riepilogo:" -msgid "The system metadata cache does not exist." -msgstr "La cache di sistema dei metadati non esiste." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Monitoraggio del sistema" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emulatori di terminale" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Editor di testi" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Il file .desktop \"%s\" non esiste." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"La cache AppStream di sistema è stata aggiornato, ma sono stati rilevati " +"degli errori che potrebbero causare la perdita di metadati. Per maggiori " +"informazioni fare riferimento al registro dei messaggi." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "TIPO deve essere un tipo di componente valido, come %s" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"Il componente software \"%s\" non è valido in AppStream. Valori possibili " +"sono:" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"Questo comando accetta gli argomenti opzionali TIPO e FILE, con FILE il file " +"su cui scrivere (oppure \"-\" per lo standard output)" -msgid "The system metadata cache exists." -msgstr "Trovata la cache di sistema dei metadati." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Questo strumento consente di leggere, scrivere, validare e trasformare " +"metadati AppStream XML o YAML. Consente inoltre di accedere all'insieme dei " +"metadati del sistema per, per esempio, eseguire ricerche su un software che " +"fornisce uno specifico tipo di MIME e installarlo attraverso il suo " +"identificativo." +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "Si è verificato un errore nel recuperare informazioni aggiuntive: %s" +msgid "Unable to build the template metainfo file: %s" +msgstr "Impossibile creare il file modello metainfo: \"%s\"" -msgid "Tried to perform query on closed database." -msgstr "Tentata interrogazione su un database chiuso." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Impossibile convertire il file: impossibile determinare il formato di " +"uscita, impostarlo esplicitamente con \"--format=\"." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "Impossibile trovare un componente che corrisponda a %s." +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Impossibile trovare un componente che fornisca \"%s;%s\"." +msgid "Unable to find component with ID '%s'!" +msgstr "Impossibile trovare un componente con ID \"%s\"." +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Impossibile trovare un componente con ID \"%s\"." +msgid "Unable to read the .desktop file: %s" +msgstr "Impossibile leggere il file .desktop: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "Impossibile aprire la cache dei componenti software di AppStream." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Impossibile salvare il file modello metainfo: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Impossibile lanciare il gestore di pacchetti: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" "Impossibile scrivere su \"%s\", impossibile installare il file metainfo." -msgid "Upstream metadata:" -msgstr "Metadati upstream:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Comando \"%s\" sconosciuto." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Usa il file .desktop dato per completare valori di base nel file metainfo" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Strumenti di utilità" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "Esegue la validazione dei file XML AppStream" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -"Esegue la validazione di un file di un'applicazione installata per meta-dati " +"Esegue la validazione di un file di un'applicazione installata per metadati " "validi" -msgid "Validation failed." -msgstr "Validazione non riuscita." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Validazione non riuscita: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Validazione eseguita con successo." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "Validazione eseguita con successo: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Valore dell'elemento da trovare." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Grafica vettoriale" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Versione: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Visualizzatori" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "Trovate informazioni su %i componenti software." -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "Il file XML XDG Menu \"%s\" è danneggiato." +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Browser web" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Editor di testi" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"È possibile trovare maggiori informazioni sulle opzioni del comando indicato " +"aggiungendo \"--help\"." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" "Potrebbero essere necessari i permessi di amministrazione per eseguire " "questa azione." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"È necessario fornire un tipo di componente software AppStream per generare " +"un modello. Possibili valori sono:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "È necessario specificare un comando." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "È necessario specificare l'ID di un componente." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "È necessario specificare un file da validare." +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "È necessario specificare un file di metadati." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" "È necessario specificare una directory principale per iniziare la " "validazione." +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "È necessario specificare un termine da cercare." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "È necessario specificare un file di ingresso e di uscita." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" "app;applicazione;applicazioni;pacchetto;programma;suite;tool;strumento;" "strumenti" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "errori: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "info: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "pignolerie: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "avvisi: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Comando «%s» sconosciuto." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Non usa alcuna cache durante le richieste" + +#~ msgid "AppStream cache update failed." +#~ msgstr "Aggiornamento cache AppStream non riuscito." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "Insieme di dati AppStream caricato, ma alcuni metadati sono stati " +#~ "ignorati a causa di errori." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "Impossibile cerare tipi di componenti sconosciuti." + +#, fuzzy +#~ msgid "Category of Education" +#~ msgstr "Educazione" + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Categorie" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Categorie" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Categorie" + +#~ msgid "Extensions" +#~ msgstr "Estensioni" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "File %s non trovato o permesso negato." + +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Non è stato trovato alcun componente che fornisce \"%s::%s\"." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "Il file XML XDG Menu \"%s\" è danneggiato." diff -Nru appstream-0.9.4/po/ja.po appstream-0.12.0/po/ja.po --- appstream-0.9.4/po/ja.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ja.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,10 +7,10 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2016-08-15 18:48+0000\n" +"Last-Translator: Matthias Klumpp \n" "Language-Team: Japanese (http://www.transifex.com/freedesktop/appstream/" "language/ja/)\n" "Language: ja\n" @@ -19,344 +19,957 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" msgstr "" -#, c-format -msgid "AppStream CLI tool version: %s" +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" msgstr "" -msgid "AppStream Status:" +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" msgstr "" -msgid "AppStream cache update completed successfully." +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." msgstr "" +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 +msgid "AppStream Status:" +msgstr "" + +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 +msgid "AppStream cache update completed successfully." +msgstr "" + +#: src/as-pool.c:1560 #, c-format -msgid "AppStream cache update failed." +msgid "" +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" msgstr "" +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." +msgstr "" + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" msgstr "" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "" -#, c-format -msgid "Command '%s' is unknown." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "" + +#: src/as-provided.c:167 +msgid "Component" msgstr "" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "" + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "説明" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." msgstr "" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "" -msgid "Enforce a cache refresh" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "" + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" msgstr "" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "" -msgid "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" msgstr "" +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "" + +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 msgid "Fonts" msgstr "" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "ホームページ" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "アイコン" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "ライセンス" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." msgstr "" -msgid "Manually set the location of the AppStream cache" +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" msgstr "" -msgid "Mimetypes" +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" msgstr "" +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "名前" -#, c-format -msgid "No component matching '%s' found." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" msgstr "" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." +msgid "No component matching '%s' found." msgstr "" +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "" +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" msgstr "" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "" + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "パッケージ" -msgid "Print detailed output about found components" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" msgstr "" -msgid "Print even pedantic hints when validating" +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." msgstr "" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "プロジェクトグループ" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "" +#: src/as-provided.c:157 msgid "Python 3" msgstr "" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "" + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "" + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" msgstr "" -msgid "Remove software matching the component-id." +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" msgstr "" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" msgstr "" +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "" + +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "" -msgid "Select a value for the provides-item which needs to be found." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." msgstr "" -msgid "Show extra debugging information" +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" msgstr "" -msgid "Show the program version" +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" msgstr "" -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "要約" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "" -msgid "The system metadata cache does not exist." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" msgstr "" -msgid "The system metadata cache exists." +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" msgstr "" +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "" + +#: tools/ascli-actions-mdata.c:464 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "The .desktop file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" +msgid "Unable to find component with ID '%s'!" msgstr "" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to read the .desktop file: %s" msgstr "" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" msgstr "" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" msgstr "" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "" +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." +msgid "Validation was successful: %s" +msgstr "" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "" + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" msgstr "" +#: tools/ascli-actions-misc.c:151 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "We have information on %i software components." +msgstr "" + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." msgstr "" +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "コマンドを指定する必要があります。" -msgid "You need to specify a component-id." -msgstr "" +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +#, fuzzy +msgid "You need to specify a component-ID." +msgstr "コマンドを指定する必要があります。" +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "" +#: tools/ascli-actions-mdata.c:354 +#, fuzzy +msgid "You need to specify an input and output file." +msgstr "コマンドを指定する必要があります。" + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" diff -Nru appstream-0.9.4/po/ka.po appstream-0.12.0/po/ka.po --- appstream-0.9.4/po/ka.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ka.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Georgian (http://www.transifex.com/freedesktop/appstream/" -"language/ka/)\n" -"Language: ka\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/kk.po appstream-0.12.0/po/kk.po --- appstream-0.9.4/po/kk.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/kk.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Kazakh (http://www.transifex.com/freedesktop/appstream/" -"language/kk/)\n" -"Language: kk\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/kn.po appstream-0.12.0/po/kn.po --- appstream-0.9.4/po/kn.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/kn.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Kannada (http://www.transifex.com/freedesktop/appstream/" -"language/kn/)\n" -"Language: kn\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/ko.po appstream-0.12.0/po/ko.po --- appstream-0.9.4/po/ko.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ko.po 2018-04-04 15:53:56.000000000 +0000 @@ -9,368 +9,1045 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Korean (http://www.transifex.com/freedesktop/appstream/" -"language/ko/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-02-05 04:37+0000\n" +"Last-Translator: Jung-Kyu Park \n" +"Language-Team: Korean \n" "Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 2.19-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "provides-item 형식(예: lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "'%s' 명령어" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D 그래픽" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "동작" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "애드-온" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "어드벤처" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "검증할 때 세세한 힌트도 출력." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "항목 형식 (예: lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "AppStream 메타 데이터 작업용 유틸리티" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream CLI" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "AppStream CLI 도구 버전: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"AppStream CLI 도구 버전: %s\n" +"AppStream 라이브러리 버전: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "AppStream 상태:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "AppStream 캐시를 업데이트하였습니다." +msgstr "AppStream 캐시 업데이트를 성공적으로 마쳤습니다." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"AppStream 캐시를 업데이트하였으나 일부 메타데이터는 오류로 인하여 무시하였습" -"니다." - -#, c-format -msgid "AppStream cache update failed." -msgstr "AppStream 캐시 업데이트가 실패하였습니다." +"AppStream 캐시 업데이트에 실패했습니다. 상세 정보를 얻으려면 자세한 정보 보" +"기 모드를 켜주세요." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "AppStream 캐시 업데이트가 불필요합니다." +msgstr "AppStream 캐시 업데이트가 필요하지 않습니다." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "AppStream 명령행 인터페이스" +msgstr "AppStream 명령문 인터페이스" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" -"AppStream 프로그램 구성요소 캐시를 찾을 수 없습니다. AppStream을 제대로 설정" -"하지 않았거나 배포판에서 AppStream 메타데이터를 제공하지 않았음을 의미합니다." +"AppStream은 소프트웨어 구성 요소에 대한 메타 데이터를 제공하는 교차 배포 사양" +"입니다." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "AppStream 시스템 캐시는 업데이트했지만 문제를 발견했습니다: %s" +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream 버전: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "아케이드" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "인공 지능" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "천문학" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "천문학" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "오디오 & 비디오" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "오디오 생성 & 편집" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "바이너리" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "블록" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "보드" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "번들" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "'%s' 캐시 위치에 기록할 수 없습니다." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "달력" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" "'%s'을(를) 복사할 수 없음: '.metainfo.xml' 또는 '.appdata.xml' 파일 확장자가 " "아닙니다." +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "카드" + +#: tools/ascli-utils.c:356 msgid "Categories" -msgstr "분류" +msgstr "카테고리" -#, c-format -msgid "Command '%s' is unknown." -msgstr "명령 '%s'이(가) 올바르지 않습니다." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "채팅" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "화학" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "화학" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "코덱" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "커뮤니케이션 & 뉴스" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "구성 요소" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "'%s' 구성 요소는 설치 대상이 아닙니다." +#: tools/ascli-utils.c:364 msgid "Compulsory for" -msgstr "다음의 필수 사항:" +msgstr "다음의 필수 사항" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "컬렉션 XML을 YAML로 변환하시거나 그 반대로 하세요." +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "'%s::%s' 을(를) 제공하는 구성요소를 찾을 수 없습니다." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "업스트림 프로젝트로 채울 metainfo 파일의 템플릿을 만듭니다." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "DBus 세션 서비스" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "DBus 시스템 서비스" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "데이터베이스" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "디버거" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "기본 스크린샷 URL" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "기본 메타데이터 포맷 (유효한 값은 'xml'과 'yaml'입니다)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "설명" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "개발자" -msgid "Display various information about installed AppStream metadata." -msgstr "설치한 AppStream 메타데이터의 다양한 정보를 나타냅니다." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "개발자 도구" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "설치한 AppStream 메타데이터의 상태 정보를 나타냅니다." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "배포판 메타데이터:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "요청을 수행할 때 Xapian 캐시 활용 안 함" - -msgid "Don't show colored output" -msgstr "출력에 색깔 사용하지 않기" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "네트워크 액세스를 사용하지 마십시오." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "출력에 색깔을 사용하지 마세요." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "ID와 일치하는 구성요소의 원시 XML 메타데이터 덤프." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "교육" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "비어 있음." -msgid "Enforce a cache refresh" -msgstr "캐시 강제로 새로 고침" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "에뮬레이터" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "캐시를 강제로 새로 고칩니다." + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "메타데이터 풀을 불러오는 동안 생긴 오류: %s" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "확장" -msgid "Extensions" -msgstr "확장 기능" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "파일 %s을(를) 찾을 수 없거나 권한이 거부되었습니다!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "추천" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "추천" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "추천" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "추천" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "추천" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "추천" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "추천" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "추천" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "추천" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "파일 시스템" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "재원" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "펌웨어를 플래싱했습니다" +#: src/as-provided.c:151 msgid "Fonts" msgstr "글꼴" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "글꼴" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "기존 경로에서 구성 요소 %i개를 찾았습니다." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "구성 요소 %i개를 찾았습니다." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "게임" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "주어진 항목을 제공하는 구성요소를 가져옵니다." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "ID와 일치하는 구성요소 정보를 가져옵니다." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "그래픽 & 사진" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "홈페이지" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDE" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "아이콘" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "아이콘셋" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "식별자" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "입력 소스" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "올바른 위치에 메타데이터 파일을 설치하십시오." -msgid "Install software matching the component-id." -msgstr "구성요소 ID와 일치하는 프로그램을 설치합니다." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "component-ID와 일치하는 소프트웨어를 설치합니다." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" "선택한 항목을 제공하는 형식이 잘못되었습니다. 올바른 값은 다음과 같습니다:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "어린이" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "언어 팩" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "언어" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "라이브러리" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "라이선스" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "캐시를 다시 생성할 AppStream 메타데이터 위치 직접 지정" - -msgid "Manually set the location of the AppStream cache" -msgstr "AppStream 캐시 위치 직접 지정" - -msgid "Mimetypes" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "현지화" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "로직" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" msgstr "MIME 형식" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "캐싱하지 말고 요청하세요." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "직접 지정한 AppStream 캐시 위치." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "직접 지정한 AppStream 메타데이터 스캔 위치." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "수학" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "수학" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "메타데이터 파일 '%s' 없습니다." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "메타데이터 파일에 오류가 있습니다:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Metainfo 파일:" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "모듈 별칭" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "음악 플레이어" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "이름" -#, c-format -msgid "No component matching '%s' found." -msgstr "'%s'와(과) 일치하는 구성 요소를 찾을 수 없습니다." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "뉴스" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "'%s;%s' 을(를) 제공하는 구성요소가 없습니다." +msgid "No component matching '%s' found." +msgstr "'%s'에 일치하는 구성 요소를 찾을 수 없습니다." +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "아이콘 없음." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -"적당한 꾸러미 관리자 CLI가 없습니다. \"pkcon\"(PackageKit 일부)과 같은 프로그" -"램이 있는지 확인하십시오" +"적당한 패키지 매니저 CLI가 없습니다. \"pkcon\"(PackageKit 일부)과 같은 프로그" +"램이 있는지 확인하십시오." -msgid "No value for the item to search for defined." -msgstr "항목 검색에 필요한 값을 지정하지 않았습니다." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "검색할 항목에 대한 값을 정의하지 않았습니다." -msgid "Package" -msgstr "꾸러미" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "오피스" -msgid "Print detailed output about found components" -msgstr "찾은 구성 요소에 대한 자세한 출력 표시" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "'%s'는(은) 알 수 없는 옵션입니다." -msgid "Print even pedantic hints when validating" -msgstr "검증할 때 세세한 힌트도 출력" +#: tools/ascli-utils.c:285 +msgid "Package" +msgstr "패키지" + +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "사진" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "찾은 구성 요소에 대한 자세한 출력 표시." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "프로젝트 그룹" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "제공하는 항목" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "파이썬(버전 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "파이썬 3" -msgid "Rebuild the component information cache." -msgstr "구성 요소 정보 캐시를 다시 만듭니다." - -msgid "Remove software matching the component-id." -msgstr "component-id에 일치하는 프로그램을 제거합니다." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "구성요소 메타데이터 캐시를 다시 만듭니다." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "component-ID와 일치하는 소프트웨어를 제거하세요." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "로봇 공학" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "롤 플레잉" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." -msgstr "'%s --help'를 입력하면 사용 가능한 명령행 옵션을 볼 수 있습니다." +msgstr "" +"'%s --help' 를 실행하면 사용 가능한 명령문 옵션 전체 목록을 볼 수 있습니다." + +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"'%s --help' 를 실행하면 사용 가능한 명령문과 옵션 목록을 볼 수 있습니다, 그리" +"고 '%s %s --help' 를 실행해서 사용 가능한 하위 명령어 옵션 목록을 봅니다." +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "런타임 펌웨어" -msgid "Sample Screenshot URL" -msgstr "예제 스크린샷 URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "스캐닝" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "과학" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "구성요소 데이터베이스를 검색합니다." -msgid "Select a value for the provides-item which needs to be found." -msgstr "찾아야 할 제공 항목의 값을 선택하십시오." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "보안" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "추가 디버깅 정보 보이기." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "프로그램 버전 보기." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "스포츠" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "전략" -msgid "Show extra debugging information" -msgstr "추가 디버깅 정보 보이기" - -msgid "Show the program version" -msgstr "프로그램 버전 보이기" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" -msgstr "하위 명령:" +msgstr "하위 명령어:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "요약" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "요약:" -msgid "The system metadata cache does not exist." -msgstr "시스템 메타데이터 캐시가 없습니다." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "시스템 모니터링" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "터미널 에뮬레이터" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "텍스트 에디터" -msgid "The system metadata cache exists." -msgstr "시스템 메타데이터 캐시가 있습니다." +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "해당 .desktop 파일 '%s'이 없습니다." +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"AppStream 시스템 캐시는 업데이트했지만 메타데이터를 유실할 수 있는 일부 오류" +"가 발견되었습니다. 자세한 정보는 로그를 참고하세요." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "추가 정보를 찾는 도중 오류가 발생했습니다: %s" +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "TYPE은 유효한 구성 요소 유형이어야 합니다, 예: %s" -msgid "Tried to perform query on closed database." -msgstr "닫아놓은 데이터베이스에 대해 요청 수행을 시도했습니다." +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"소프트웨어 구성 요소 유형 '%s'은 AppStream에서 유효하지 않습니다. 가능한 값" +"은 다음과 같습니다:" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"이 명령은 선택적인 TYPE 및 FILE 위치 인수를 사용하며, FILE은 기록할 파일 (또" +"는 표준 출력의 경우 \"-\")입니다." + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"이 도구는 AppStream XML 또는 YAML 메타 데이터의 읽기, 쓰기, 유효성 검사 및 변" +"환을 허용합니다. 또한 시스템 메타 데이터 풀에 대한 액세스를 제공합니다, 예를 " +"들면 특정 MIME 유형을 제공하는 소프트웨어를 쿼리 하며 소프트웨어 구성 요소 식" +"별자로 설치합니다." -#. TRANSLATORS: We failed to find any component in the database due to an error +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "Unable to find component matching %s!" -msgstr "%s와(과) 일치하는 구성 요소를 찾을 수 없습니다!" +msgid "Unable to build the template metainfo file: %s" +msgstr "metainfo 파일을 빌드할 수 없습니다: %s" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"파일을 변환할 수 없습니다: 출력 형식을 결정할 수 없습니다, '--format ='을 사" +"용하여 명확하게 설정하세요." +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "'%s;%s'을(를) 제공하는 구성요소를 찾을 수 없습니다!" +msgid "Unable to find component matching %s!" +msgstr "%s에 일치하는 구성 요소를 찾을 수 없습니다!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to find component with ID '%s'!" msgstr "ID가 '%s'인 구성 요소를 찾을 수 없습니다!" -msgid "Unable to open the AppStream software component cache." -msgstr "AppStream 프로그램 구성요소 캐시를 열 수 없습니다." +#: tools/ascli-actions-mdata.c:470 +#, c-format +msgid "Unable to read the .desktop file: %s" +msgstr "해당 .desktop 파일을 읽을 수 없습니다: %s" +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "템플릿 metainfo 파일을 저장할 수 없습니다: %s" + +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "꾸러미 관리자를 초기화 할 수 없습니다: %s" +msgstr "패키지 매니저를 시작할 수 없습니다: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." -msgstr "'%s'에 기록할 수 없어 메터 정보 파일을 설치할 수 없습니다." +msgstr "'%s'에 쓸 수 없습니다, metainfo 파일을 설치할 수 없습니다." + +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "알 수 없는 명령어 '%s'." -msgid "Upstream metadata:" -msgstr "업스트림 메타데이터:" +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "주어진 .desktop 파일을 사용하여 metainfo 파일의 기본 값을 채웁니다." +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "유틸리티" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "AppStream XML 파일의 문제를 검증합니다." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" "올바른 메타데이터를 가지고 있는지 프로그램의 설치 파일 트리를 검증합니다." -msgid "Validation failed." -msgstr "검증에 실패하였습니다." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "유효성 검사 실패: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." -msgstr "검증을 끝냈습니다." +msgstr "유효성 검사에 성공했습니다." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "소프트웨어 구성 요소 %i개 정보가 있습니다." +msgid "Validation was successful: %s" +msgstr "유효성 검사에 성공했습니다: %s" +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "찾아야 할 항목의 값입니다." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "벡터 그래픽" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XDG 메뉴 XML 파일 '%s'이(가) 손상되었습니다." +msgid "Version: %s" +msgstr "버전: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "뷰어" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "소프트웨어 구성 요소에 관한 %i개의 정보가 있습니다." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "웹 브라우저" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "워드 프로세서" +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"하위 명령어에 \"--help\"를 보내 하위 명령어에 관한 옵션 정보를 찾을 수 있습니" +"다." + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." -msgstr "이 동작을 수행하려면 최고 사용자 권한이 필요합니다." +msgstr "이 동작을 수행하려면 superuser 권한이 필요합니다." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"템플릿을 생성하려면 AppStream 소프트웨어 구성 요소 유형을 제공해야 합니다. 가" +"능한 값은 다음과 같습니다:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "명령을 지정해야 합니다." -msgid "You need to specify a component-id." -msgstr "component-id를 지정해야 합니다." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "component-ID를 지정해야 합니다." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "검증할 파일을 지정해야 합니다!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "메타데이터 파일을 지정해야합니다." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "검증을 시작하려면 루트 디렉터리를 지정해야합니다!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "검색할 항목을 지정해야 합니다." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "입출력 파일을 지정해야 합니다." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" -msgstr "" -"app;앱;application;애플리케이션;package;꾸러미;program;프로그램;programme;" -"suite;모음;tool;도구;" +msgstr "앱;애플리케이션;패키지;프로그램;프로그램;모음;도구" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "오류: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "정보: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "규칙: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "알림: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "명령 '%s'이(가) 올바르지 않습니다." + +#, fuzzy +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "요청을 수행할 때 Xapian 캐시 활용 안 함" + +#~ msgid "AppStream cache update failed." +#~ msgstr "AppStream 캐시 업데이트가 실패하였습니다." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "AppStream 데이터 풀을 불러왔지만, 오류가 발생하여 일부 메타데이터를 무시했" +#~ "습니다." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "알 수 없는 구성요소 형식으로 검색할 수 없습니다." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "분류" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "분류" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "분류" + +#~ msgid "Extensions" +#~ msgstr "확장 기능" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "파일 %s을(를) 찾을 수 없거나 권한이 거부되었습니다!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "'%s;%s' 을(를) 제공하는 구성요소가 없습니다." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XDG 메뉴 XML 파일 '%s'이(가) 손상되었습니다." diff -Nru appstream-0.9.4/po/LINGUAS appstream-0.12.0/po/LINGUAS --- appstream-0.9.4/po/LINGUAS 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/po/LINGUAS 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,35 @@ +ar +ca +ckb +cs +da +de +en_GB +es +eu +fi +fr +gd +gl +hu +id +it +ja +ko +lt +nb +nl +oc +pl +pt +pt_BR +ru +sk +sl +sr +sr@latin +sv +tr +uk +zh_CN +zh_TW diff -Nru appstream-0.9.4/po/lt.po appstream-0.12.0/po/lt.po --- appstream-0.9.4/po/lt.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/lt.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,356 +1,973 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. +# FIRST AUTHOR , YEAR. # -# Translators: msgid "" msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Lithuanian (http://www.transifex.com/freedesktop/appstream/" -"language/lt/)\n" +"Project-Id-Version: appstream\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-28 20:39+0000\n" +"Last-Translator: Moo \n" +"Language-Team: Lithuanian \n" "Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" -"%100<10 || n%100>=20) ? 1 : 2);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" +"Plural-Forms: nplurals=3; plural=(n % 10 == 1 && (n % 100 < 11 || n % 100 > " +"19)) ? 0 : ((n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) ? " +"1 : 2);\n" +"X-Generator: Weblate 2.20-dev\n" + +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "\"%s\" komanda" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Trimatė (3D) grafika" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Veiksmas" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Papildiniai" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Nuotykiai" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Taip pat rodyti pedantiškus patarimus." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Elemento tipas (pvz., lib, bin, python3, …)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Paslaugų programa, skirta darbui su AppStream metaduomenimis" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream komandų eilutė" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +"AppStream komandų eilutės įrankio versija: %s\n" +"AppStream bibliotekos versija: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "AppStream būsena:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "" +msgstr "AppStream podėlio atnaujinimas sėkmingai užbaigtas." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +"AppStream podėlio atnaujinimas nepavyko. Įjunkite išsamią veikseną, kad " +"gautumėte išsamesnę informaciją apie problemą." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "" +msgstr "AppStream podėlio atnaujinimas nėra būtinas." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "" +msgstr "AppStream komandų eilutės sąsaja" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" +"AppStream yra daugiadistribucinė specifikacija, skirta pateikti metaduomenis " +"apie programinės įrangos komponentus." -msgid "Binaries" +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" msgstr "" +"AppStream sistemos podėlis buvo atnaujintas, tačiau buvo rastos problemos: %s" -msgid "Bundle" +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream versija: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arkada" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Dirbtinis intelektas" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomija" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomija" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Garsas ir vaizdas" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" msgstr "" +#: src/as-provided.c:147 +msgid "Binaries" +msgstr "Dvejetainės" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Blokai" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Stalo" + +#: tools/ascli-utils.c:286 +msgid "Bundle" +msgstr "Rinkinys" + +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "" +msgstr "Podėlio vieta \"%s\" nėra įrašoma." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalendorius" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +"Nepavyksta nukopijuoti \"%s\": Failas neturi \".metainfo.xml\" ar \".appdata." +"xml\" povardžio." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kortų" +#: tools/ascli-utils.c:356 msgid "Categories" -msgstr "" +msgstr "Kategorijos" -#, c-format -msgid "Command '%s' is unknown." -msgstr "" +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Pokalbiai" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Chemija" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Chemija" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodekai" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Komponentas" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "" +msgstr "Komponentas \"%s\" neturi įdiegimo kandidatų." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "" -msgid "DBus Session Services" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Konvertuoti kolekciją iš XML į YAML arba atvirkščiai." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Nepavyko rasti komponento, pateikiančio \"%s::%s\"." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." msgstr "" +#: src/as-provided.c:161 +msgid "DBus Session Services" +msgstr "DBus seanso tarnybos" + +#: src/as-provided.c:159 msgid "DBus System Services" +msgstr "DBus sistemos tarnybos" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Duomenų bazė" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Derinimo programos" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Numatytosios ekrano kopijos URL" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." msgstr "" +"Numatytasis metaduomenų formatas (teisingos reikšmės yra \"xml\" ir \"yaml" +"\")." +#: tools/ascli-utils.c:320 msgid "Description" -msgstr "" +msgstr "Aprašas" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" -msgstr "" +msgstr "Kūrėjas" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" msgstr "" -msgid "Distribution metadata:" -msgstr "" +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Rodyti būsenos informaciją apie prieinamus AppStream metaduomenis." -msgid "Do not use the Xapian cache when performing the request" -msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 +msgid "Distribution metadata:" +msgstr "Distribucijos metaduomenys:" -msgid "Don't show colored output" -msgstr "" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Nenaudoti tinklo prieigą." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Nerodyti spalvotos išvesties." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Švietimas" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." -msgstr "" +msgstr "Tuščia." -msgid "Enforce a cache refresh" -msgstr "" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emuliatoriai" -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Priverstinai atlikti podėlio įkėlimą iš naujo." +#: tools/ascli-actions-misc.c:157 #, c-format -msgid "File %s not found or permission denied!" -msgstr "" +msgid "Error while loading the metadata pool: %s" +msgstr "Klaida, įkeliant metaduomenų telkinį: %s" + +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Išplečia" + +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Pasižymėjusios" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Pasižymėjusios" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Pasižymėjusios" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Pasižymėjusios" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Pasižymėjusios" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Pasižymėjusios" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Pasižymėjusios" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Pasižymėjusios" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Pasižymėjusios" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Failų sistema" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finansai" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 msgid "Fonts" -msgstr "" +msgstr "Šriftai" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Šriftai" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Rasta %i komponentų." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Žaidimai" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "" +msgstr "Gauti komponentus, kurie pateikia nurodytą elementą." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "" +msgstr "Gauti informaciją apie komponentą pagal jo ID." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafika ir fotografija" + +#: tools/ascli-utils.c:287 msgid "Homepage" +msgstr "Internetinė svetainė" + +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" msgstr "" +#: tools/ascli-utils.c:288 msgid "Icon" -msgstr "" +msgstr "Piktograma" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Piktogramų rinkiniai" +#: tools/ascli-utils.c:282 msgid "Identifier" -msgstr "" +msgstr "Identifikatorius" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Įvesties šaltiniai" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." -msgstr "" +msgstr "Įdiegti metaduomenų failą į tinkamą vietą." -msgid "Install software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Įdiegti komponento ID atitinkančią programinę įrangą." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +"Pasirinktas neteisingas pateikto elemento tipas. Teisingos reikšmės yra:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Vaikai" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Kalbos paketai" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Kalbos" + +#: src/as-provided.c:145 msgid "Libraries" -msgstr "" +msgstr "Bibliotekos" #. license +#: tools/ascli-utils.c:350 msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" +msgstr "Licencija" -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Lokalizavimas" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logika" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" +msgstr "MIME tipai" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Padaryti užklausą be podėliavimo." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Rankiniu būdu pasirinkta AppStream podėlio vieta." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Rankiniu būdu pasirinkta peržiūrima AppStream metaduomenų vieta." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematika" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematika" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Metaduomenų failo \"%s\" nėra." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Metaduomenų failuose yra klaidų:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Metainformacijos failai:" +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Muzikos grotuvai" + +#: tools/ascli-utils.c:283 msgid "Name" -msgstr "" +msgstr "Pavadinimas" -#, c-format -msgid "No component matching '%s' found." -msgstr "" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Naujienos" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "" +msgid "No component matching '%s' found." +msgstr "Nerasta komponento, atitinkančio \"%s\"." +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Nėra piktogramų." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" +"Nerasta jokios tinkamos komandų eilutės paketų tvarkytuvės. Įsitikinkite, " +"kad, pavyzdžiui, \"pkcon\" (PackageKit dalis) yra prieinama." -msgid "No value for the item to search for defined." -msgstr "" +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "Nebuvo apibrėžta elemento, kurį ieškoti, reikšmė." -msgid "Package" -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Raštinė" -msgid "Print detailed output about found components" -msgstr "" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Parametras \"%s\" nėra žinomas." -msgid "Print even pedantic hints when validating" -msgstr "" +#: tools/ascli-utils.c:285 +msgid "Package" +msgstr "Paketas" + +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografija" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Rodyti išsamią išvestį apie rastus komponentus." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" -msgstr "" +msgstr "Projekto grupė" +#: tools/ascli-utils.c:392 msgid "Provided Items" -msgstr "" +msgstr "Pateikti elementai" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "" +msgstr "Python (Versija 2)" +#: src/as-provided.c:157 msgid "Python 3" -msgstr "" +msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Iš naujo sukurti komponentų metaduomenų podėlį." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Šalinti komponento ID atitinkančią programinę įrangą." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotika" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Vaidmenimis" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 +#, c-format +msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +"Vykdykite \"%s --help\", kad pamatytumėte visą prieinamų komandų eilutės " +"parametrų sąrašą." +#: tools/appstream-cli.c:187 #, c-format -msgid "Run '%s --help' to see a full list of available command line options." +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." msgstr "" +"Vykdykite \"%s --help\", norėdami pamatyti prieinamų komandų ir parametrų " +"sąrašą, ir \"%s %s --help\", norėdami pamatyti tam tikro pokomandžio " +"parametrų sąrašą." +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" -msgstr "" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Skenavimas" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Mokslas" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "" +msgstr "Ieškoti komponentų duomenų bazėje." -msgid "Select a value for the provides-item which needs to be found." -msgstr "" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Saugumas" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Rodyti papildomą derinimo informaciją." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Rodyti programos versiją." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sportas" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategija" -msgid "Show extra debugging information" -msgstr "" +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 +msgid "Subcommands:" +msgstr "Pokomandžiai:" -msgid "Show the program version" -msgstr "" +#: tools/ascli-utils.c:284 +msgid "Summary" +msgstr "Santrauka" -#. these are commands we can use with appstream-cli -msgid "Subcommands:" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 +msgid "Summary:" +msgstr "Santrauka:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Sistemos stebėsena" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Terminalo emuliatoriai" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Tekstų redaktoriai" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr ".desktop failo \"%s\" nėra." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" +"AppStream sistemos podėlis buvo atnaujintas, tačiau buvo aptiktos kai kurios " +"klaidos, kurios gali privesti prie metaduomenų trūkumo. Išsamesnei " +"informacijai kreipkitės į išsamų žurnalą." -msgid "Summary" +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" msgstr "" -msgid "Summary:" +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +"Programinės įrangos komponento tipas \"%s\" nėra teisingas AppStream " +"specifikacijoje. Galimos reikšmės yra:" -msgid "The system metadata cache does not exist." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" -msgid "The system metadata cache exists." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." msgstr "" +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" +msgid "Unable to build the template metainfo file: %s" +msgstr "Nepavyko sukurti šablono metainformacijos failo: %s" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" +"Nepavyko konvertuoti failo: Nepavyko nustatyti išvesties formato, prašome " +"aiškiai jį nustatyti, naudojant \"--format=\"." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "" +msgstr "Nepavyko rasti komponento, atitinkančio %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" +msgid "Unable to find component with ID '%s'!" +msgstr "Nepavyko rasti komponentą, kurio ID \"%s\"!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" +msgid "Unable to read the .desktop file: %s" +msgstr "Nepavyko perskaityti .desktop failo: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Nepavyko įrašyti šablono metainformacijos failo: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "" +msgstr "Nepavyko paleisti paketų tvarkytuvės: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" +msgstr "Nepavyko įrašyti į \"%s\", nepavyksta įdiegti metainformacijos failo." + +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Nežinoma komanda \"%s\"." -msgid "Upstream metadata:" +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +"Naudoti nurodytą .desktop failą tam, kad metainformacijos faile būtų " +"užpildytos pagrindinės reikšmės." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Paslaugų programos" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." -msgstr "" +msgstr "Patikrinti ar AppStream XML failuose nėra problemų." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." -msgstr "" +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Patikrinimas nepavyko: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." -msgstr "" +msgstr "Patikrinimas buvo sėkmingas." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "Patikrinimas buvo sėkmingas: %s" +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Elemento, kuris turėtų būti rastas, reikšmė." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vektorinė grafika" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "Version: %s" +msgstr "Versija: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Žiūryklės" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "Turime informaciją apie %i programinės įrangos komponentų(-us)." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Saityno naršyklės" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Tekstų rengyklė" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." msgstr "" +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." +msgstr "Norint atlikti šį veiksmą, jums gali prireikti supernaudotojo teisių." + +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" msgstr "" +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." -msgstr "" +msgstr "Jūs turite nurodyti komandą." -msgid "You need to specify a component-id." -msgstr "" +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Jūs turite nurodyti komponento ID." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "" +msgstr "Turite nurodyti failą, kurį tikrinti!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "Jūs turite nurodyti metaduomenų failą." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" -msgstr "" +msgstr "Norėdami pradėti tikrinimą, turite nurodyti šakninį katalogą!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." -msgstr "" +msgstr "Jūs turite nurodyti paieškos žodžius, kurių ieškoti." + +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Jūs turite nurodyti įvesties ir išvesties failą." #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, @@ -358,5 +975,39 @@ #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" -msgstr "" +msgstr "programa;programėlė;aplikacija;paketas;įrankis;komplektas;rinkinys" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "klaidos: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "informacijos: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "pedantiški: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "įspėjimai: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Komanda \"%s\" yra nežinoma." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Atliekant užklausą, nenaudoti jokių podėlių." + +#~ msgid "AppStream cache update failed." +#~ msgstr "AppStream podėlio atnaujinimas nepavyko." diff -Nru appstream-0.9.4/po/lv.po appstream-0.12.0/po/lv.po --- appstream-0.9.4/po/lv.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/lv.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,362 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Latvian (http://www.transifex.com/freedesktop/appstream/" -"language/lv/)\n" -"Language: lv\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " -"2);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/Makevars appstream-0.12.0/po/Makevars --- appstream-0.9.4/po/Makevars 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/Makevars 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = appstream - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = ../ - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = -L C -i -s --keyword=_ --keyword=N_ --keyword=__ --no-wrap --no-location \ - --package-name="appstream" \ - --copyright-holder="Matthias Klumpp" - -COPYRIGHT_HOLDER = Copyright (c) 2012-2014 Matthias Klumpp - -MSGID_BUGS_ADDRESS = distributions@lists.freedesktop.org - -EXTRA_LOCALE_CATEGORIES = diff -Nru appstream-0.9.4/po/meson.build appstream-0.12.0/po/meson.build --- appstream-0.9.4/po/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/po/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,27 @@ + +as_gettext_domain = 'appstream' +i18n.gettext (as_gettext_domain, + preset : 'glib', + data_dirs: ['../data/its'], + args: [ + '--default-domain=' + as_gettext_domain, + '--from-code=UTF-8', + '-i', '-s', '--no-wrap', '-c', + '--package-name=' + as_gettext_domain, + '--copyright-holder=Matthias Klumpp', + '--msgid-bugs-address=appstream@lists.freedesktop.org' + ] +) + +run_target ('make-linguas', + command: ['sh', + join_paths(meson.source_root(), 'contrib/meson/update-linguas.sh')] +) + +# maintainer shortcut for updating l10n data +run_target ('l10n-update', + command: ['ninja', '-C', meson.build_root(), + 'make-linguas', + as_gettext_domain + '-pot', + as_gettext_domain + '-update-po'] +) diff -Nru appstream-0.9.4/po/ml.po appstream-0.12.0/po/ml.po --- appstream-0.9.4/po/ml.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ml.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Malayalam (http://www.transifex.com/freedesktop/appstream/" -"language/ml/)\n" -"Language: ml\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/mr.po appstream-0.12.0/po/mr.po --- appstream-0.9.4/po/mr.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/mr.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Marathi (http://www.transifex.com/freedesktop/appstream/" -"language/mr/)\n" -"Language: mr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/ms.po appstream-0.12.0/po/ms.po --- appstream-0.9.4/po/ms.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ms.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Malay (http://www.transifex.com/freedesktop/appstream/" -"language/ms/)\n" -"Language: ms\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/nb.po appstream-0.12.0/po/nb.po --- appstream-0.9.4/po/nb.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/nb.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,355 +1,981 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# -# Translators: +# FIRST AUTHOR , YEAR. msgid "" msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Norwegian Bokmål (http://www.transifex.com/freedesktop/" -"appstream/language/nb/)\n" +"Project-Id-Version: appstream\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-29 06:03+0000\n" +"Last-Translator: Allan Nordhøy \n" +"Language-Team: Norwegian Bokmål \n" "Language: nb\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.20-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "\"%s\"-kommando" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D-grafikk" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Handling" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Tillegg" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Eventyr" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Vis også pedantiske tips." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "En elementtype (f.eks. lib, bin, python3, …)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Et verktøy for å jobbe med AppStream-metadata" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "Kommandolinjegrensesnitt for AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +"Versjon av kommandolinjegrensesnitt for AppStream: %s\n" +"Versjon av AppStream-bibliotek: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "AppStream-status:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "" +msgstr "Metadata i AppStream-hurtiglager oppdatert." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +"Oppdatering av AppStream-hurtiglager mislyktes. Skru på ordrikt modus for å " +"få mer detaljert feilinformasjon." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "" +msgstr "AppStream-oppdatering var ikke nødvendig." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "" +msgstr "Kommandolinjegrensesnitt for AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" +"AppStream er spesifikasjon for flere distribusjoner som tilbyr metadata om " +"programvarekomponenter." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "AppStream-systemhurtiglager oppdatert, dog ikke uten problemer: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream-versjon: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arkade" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Kunstig intelligens" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomi" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomi" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Lyd og video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Lydinnspilling og redigering" +#: src/as-provided.c:147 msgid "Binaries" -msgstr "" +msgstr "Binærfiler" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Blokker" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Brett" +#: tools/ascli-utils.c:286 msgid "Bundle" -msgstr "" +msgstr "Programvarepakke" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "" +msgstr "Hurtiglagerplasseringen \"%s\" er ikke skrivbar." + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalender" +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +"Kan ikke kopiere \"%s\": Fila har ikke en \".metainfo.xml\"- eller \"." +"appdata.xml\"-endelse." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kort" +#: tools/ascli-utils.c:356 msgid "Categories" -msgstr "" +msgstr "Kategorier" -#, c-format -msgid "Command '%s' is unknown." -msgstr "" +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Sludring" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Kemi" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Kemi" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodek" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Kommunikasjon og nyheter" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Komponent" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "" +msgstr "Komponenten \"%s\" har ingen installasjonskandidat." +#: tools/ascli-utils.c:364 msgid "Compulsory for" +msgstr "Obligatorisk for" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Konverter XML-samling til YAML og vice versa." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Kunne ikke finne komponenten som tilbyr \"%s::%s\"." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." msgstr "" +"Opprett en map for ei metainfofil (for senere utfylling av prosjektet " +"oppstrøms)." +#: src/as-provided.c:161 msgid "DBus Session Services" -msgstr "" +msgstr "DBus-økttjenester" +#: src/as-provided.c:159 msgid "DBus System Services" -msgstr "" +msgstr "DBus-systemtjenester" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Database" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Feilrettere" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Forvalgt nettadresse for skjermavbildning" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Forvalgt metadataformat (gyldige verdier er \"xml\" og \"yaml\")." + +#: tools/ascli-utils.c:320 msgid "Description" -msgstr "" +msgstr "Beskrivelse" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" -msgstr "" +msgstr "Utvikler" -msgid "Display various information about installed AppStream metadata." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Utviklerverktøy" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Statusinformasjon om tilgjengelig AppStream-metadata." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" -msgstr "" +msgstr "Distribusjons-metadata:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Ikke bruk nettverkstilgang." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Ikke vis fargelagt utdata." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" +msgstr "Dumpa rå XML-metadata for en komponent som samsvarer med ID-en." -msgid "Empty." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Utdanning" -msgid "Enforce a cache refresh" -msgstr "" +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 +msgid "Empty." +msgstr "Tom." -msgid "Extends" -msgstr "" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulatorer" -msgid "Extensions" -msgstr "" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Tving gjennom en oppdatering av hurtiglageret." +#: tools/ascli-actions-misc.c:157 #, c-format -msgid "File %s not found or permission denied!" -msgstr "" +msgid "Error while loading the metadata pool: %s" +msgstr "Feil under innlasting av metadatagrunnlag: %s" + +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Utvider" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Framhevet" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Framhevet" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Framhevet" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Framhevet" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Framhevet" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Framhevet" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Framhevet" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Framhevet" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Framhevet" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Filsystem" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finans" + +#: src/as-provided.c:165 msgid "Flashed Firmware" -msgstr "" +msgstr "Innbrent fastvare" +#: src/as-provided.c:151 msgid "Fonts" -msgstr "" +msgstr "Skrifter" + +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Skrifter" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Fant %i komponenter på gjengrodde stier." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Fant %i komponenter." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Spill" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "" +msgstr "Hent inn komponentene som tilbyr det gitte elementet." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "" +msgstr "Hent informasjon om en komponent gitt av dens ID." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafikk og fotografi" +#: tools/ascli-utils.c:287 msgid "Homepage" -msgstr "" +msgstr "Hjemmeside" + +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Utviklingsmiljø" +#: tools/ascli-utils.c:288 msgid "Icon" -msgstr "" +msgstr "Ikon" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Ikonsett" +#: tools/ascli-utils.c:282 msgid "Identifier" -msgstr "" +msgstr "Identifikator" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Inndatakilder" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." -msgstr "" +msgstr "Installer ei metadatafil på rett plass." -msgid "Install software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Installer programvare som samsvarer med komponent-ID-en." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" +msgstr "Ugyldig type oppgitt for valgt element. Gyldige verdier er:" + +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Barn" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Språkpakker" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Språk" +#: src/as-provided.c:145 msgid "Libraries" -msgstr "" +msgstr "Bibliotek" #. license +#: tools/ascli-utils.c:350 msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" +msgstr "Lisens" -msgid "Mimetypes" -msgstr "" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Lokalisering" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logikk" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "MIME-typer" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Utfør forespørsel uten hurtiglagring." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Manuelt valgt plassering for AppStream-hurtiglager." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Manuelt valgt plassering for AppStream-metadata å skanne." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matte" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matte" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Metadatafilen \"%s\" finnes ikke." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Feil i metadatafiler:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Metainfofiler:" +#: src/as-provided.c:153 msgid "Modaliases" -msgstr "" +msgstr "Modalias" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Musikkspillere" +#: tools/ascli-utils.c:283 msgid "Name" -msgstr "" +msgstr "Navn" -#, c-format -msgid "No component matching '%s' found." -msgstr "" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Nyheter" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "" +msgid "No component matching '%s' found." +msgstr "Fant ingen komponent som samsvarer med \"%s\"." +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Ingen ikoner." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" +"Fant inget formålstjenlig kommandolinjegrensesnitt for pakkebehandler. Sørg " +"for at \"pkcon\" (som er en del av PackageKit) er installert." -msgid "No value for the item to search for defined." -msgstr "" +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "Ingen verdi for elementet å søke ble definert." -msgid "Package" -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Kontor" -msgid "Print detailed output about found components" -msgstr "" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Valget \"%s\" er ukjent." -msgid "Print even pedantic hints when validating" -msgstr "" +#: tools/ascli-utils.c:285 +msgid "Package" +msgstr "Pakke" + +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografi" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Skriv detaljert utdata om identifiserte komponenter." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" -msgstr "" +msgstr "Prosjektgruppe" +#: tools/ascli-utils.c:392 msgid "Provided Items" -msgstr "" +msgstr "Tilbudte elementer" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "" +msgstr "Python (versjon 2)" +#: src/as-provided.c:157 msgid "Python 3" -msgstr "" +msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Bygg opp igjen komponent- og metadata -hurtiglager." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Fjern programvare som samsvarer med komponent-ID-en." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotikk" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Rollespill" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 +#, c-format +msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +"Kjør \"%s --help\" for å se en full liste over tilgjengelige " +"kommandolinjevalg." +#: tools/appstream-cli.c:187 #, c-format -msgid "Run '%s --help' to see a full list of available command line options." +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." msgstr "" +"Kjør \"%s --help\" for å se en liste over tilgjengelige kommandoer og valg, " +"og \"%s %s --help\" for å se en liste over spesifikke valg for denne " +"underkommandoen." +#: src/as-provided.c:163 msgid "Runtime Firmware" -msgstr "" +msgstr "Kjøretids-fastvare" -msgid "Sample Screenshot URL" -msgstr "" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Skanning" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Vitenskap" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" +msgstr "Søk i komponentdatabasen." -msgid "Show the program version" -msgstr "" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Sikkerhet" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Vis ekstra feilrettingsinformasjon." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Vis programversjonen." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sport" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategi" -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" -msgstr "" +msgstr "Underkommandoer:" +#: tools/ascli-utils.c:284 msgid "Summary" -msgstr "" +msgstr "Sammendrag" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Sammendrag:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Systemovervåkning" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Terminalemulatorer" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Tekstbehandlere" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr ".dekstop-filen \"%s\" finnes ikke." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" +"AppStreams systemhurtiglager ble oppdatert, dog ble noen problemer oppdaget, " +"som kan føre til manglende metadata. Henvend deg til den sirlige loggen for " +"mer informasjon." -msgid "The system metadata cache does not exist." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "TYPE må være en gyldig komponenttype, som %s" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +"Programvarekomponentens type \"%s\" er ikke gyldig i AppStream. Mulige " +"verdier er:" -msgid "The system metadata cache exists." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" +"Denne kommandoen tar valgfrie posisjonsargument for TYPE og FILE, der FILE " +"er en fil å skrive til (eller \"-\" for forvalgt utdata)." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Dette verktøyet tillater lesing, skriving og godkjenning av transformering " +"av AppStream -XML eller -YAML-metadata. Det gir også tilgang til systemets " +"metadatagrunnlag, for eksempel for spørringer til programvare som tilbyr en " +"spesifikk MIME-type, og installasjon av dens " +"programvarekomponentidentifikator." + +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" +msgid "Unable to build the template metainfo file: %s" +msgstr "Kunne ikke bygge malfil for metainfo: %s" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" +"Kunne ikke konvertere fil: Problem med å bestemme utdataformat, sett det " +"eksplisitt ved bruk av \"--format=\"." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "" +msgstr "Klarer ikke å finne en komponent som samsvarer med %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" +msgid "Unable to find component with ID '%s'!" +msgstr "Klarer ikke å finne komponent med ID \"%s\"!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" +msgid "Unable to read the .desktop file: %s" +msgstr "Klarte ikke å lese .desktop-fila: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Klarte ikke å lagre malfil for metainfo: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "" +msgstr "Klarte ikke å starte pakkebehandler: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" +msgstr "Klarte ikke å skrive til \"%s\", kan ikke installere metainfo-fil." -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Ukjent kommando \"%s\"." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +"Bruk gitt .desktop-fil for å fylle inn grunnleggende verdier i metainfofila." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Verktøy" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." -msgstr "" +msgstr "Se gjennom AppStream-XML-filer for feil." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" +"Se gjennom et filtre tilhørende et installert program for gyldigheten av " +"metadata." -msgid "Validation failed." -msgstr "" +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Bekreftelse mislyktes: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." -msgstr "" +msgstr "Bekreftet." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "Bekreftet: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Verdien på elementet som skal finnes." +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vektorgrafikk" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "Version: %s" +msgstr "Versjon: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Fremvisere" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "Vi har informasjon om %i programvarekomponenter." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Nettlesere" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Tekstbehandler" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." msgstr "" +"Du kan finne informasjon om underordnede kommandoer ved å sende \"--help\" " +"til underkommandoen." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +"Det kan hende du trenger superbruker-rettigheter for å utføre denne " +"handlingen." -msgid "You need to specify a command." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" msgstr "" +"Du må angi en AppStream-programvarekomponenttype for å opprette en mal. " +"Mulige verdier er:" -msgid "You need to specify a component-id." -msgstr "" +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 +msgid "You need to specify a command." +msgstr "Du må angi en kommando." + +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Du må angi en komponent-ID." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "" +msgstr "Du må oppgi en fil som skal kontrolleres!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "Du må oppgi ei metadatafil." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" -msgstr "" +msgstr "Du må oppgi en rotmappe å starte kontrollen!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." -msgstr "" +msgstr "Du må oppgi et uttrykk å søke etter." + +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Du må angi ei inn- og ut-datafil." #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, @@ -357,5 +983,30 @@ #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" -msgstr "" +msgstr "app;applikasjon;program;pakke;programvarepakke;verktøy;redskap" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "feil: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "informasjon: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "pedantisk: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "advarsler: %lu" diff -Nru appstream-0.9.4/po/nl.po appstream-0.12.0/po/nl.po --- appstream-0.9.4/po/nl.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/nl.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,355 +1,993 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. +# FIRST AUTHOR , YEAR. # -# Translators: msgid "" msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Dutch (http://www.transifex.com/freedesktop/appstream/" -"language/nl/)\n" +"Project-Id-Version: appstream\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-01-14 10:43+0000\n" +"Last-Translator: Heimen Stoffels \n" +"Language-Team: Dutch \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.19-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Opdracht '%s'" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D-graphics" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Actie" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Extensies" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Avontuur" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Ook pedante tips weergeven." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Een item-type (bijv. lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Een hulpmiddel om te werken met AppStream-metagegevens" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream-CLI" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +"AppStream CLI-hulpmiddelversie: %s\n" +"AppStream-bibliotheekversie: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "AppStream-status:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "" +msgstr "De AppStream-cache is succesvol bijgewerkt." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +"Het bijwerken van de AppStream-cache is mislukt. Schakel de uitgebreide " +"modus in om meer informatie over het probleem te verkrijgen." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "" +msgstr "Het bijwerken van de AppStream-cache is niet nodig." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "" +msgstr "AppStream opdrachtregel-interface" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" +"AppStream is een distributie-onafhankelijke specificatie die metagegevens " +"beschikbaar stelt over software-onderdelen." -msgid "Binaries" +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" msgstr "" +"De AppStream-systeemcache is bijgewerkt, maar er zijn problemen gevonden: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream-versie: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arcade" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Kunstmatige intelligentie" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomie" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomie" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Audio & Video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Audiocreatie en -bewerking" + +#: src/as-provided.c:147 +msgid "Binaries" +msgstr "Uitvoerbare bestanden" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Blokken" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Bord" + +#: tools/ascli-utils.c:286 msgid "Bundle" -msgstr "" +msgstr "Bundel" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "" +msgstr "De cache-locatie '%s' is niet beschrijfbaar." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Agenda" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +"Het kopiëren van '%s' is mislukt: het bestand heeft geen 'metainfo.xml' of '." +"appdata.xml'-achtervoegsel." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kaart" +#: tools/ascli-utils.c:356 msgid "Categories" -msgstr "" +msgstr "Categorieën" -#, c-format -msgid "Command '%s' is unknown." -msgstr "" +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Chatten" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Scheikunde" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Scheikunde" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Codecs" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Communicatie & Nieuws" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Onderdeel" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "" +msgstr "Het onderdeel '%s' bevat geen installatie-kandidaat." +#: tools/ascli-utils.c:364 msgid "Compulsory for" +msgstr "Verplicht voor" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Een collectie XML naar YAML (of vice-versa) converteren." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Het onderdeel dat '%s::%s' bevat kan niet worden gevonden." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." msgstr "" +"Creëer een sjabloon voor een metainformatie-bestand (kan worden ingevuld " +"door een upstream-project)." +#: src/as-provided.c:161 msgid "DBus Session Services" -msgstr "" +msgstr "DBus-sessiediensten" +#: src/as-provided.c:159 msgid "DBus System Services" +msgstr "DBus-systeemdiensten" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Database" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Foutopsporingshulpmiddelen" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Standaard schermafbeelding-URL" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." msgstr "" +"Standaard opgegeven metagegevens-soort (geldige waarden zijn 'xml' en " +"'yaml')." +#: tools/ascli-utils.c:320 msgid "Description" -msgstr "" +msgstr "Omschrijving" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" -msgstr "" +msgstr "Ontwikkelaar" -msgid "Display various information about installed AppStream metadata." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Ontwikkelaarshulpmiddelen" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Statusinformatie weergeven over beschikbare AppStream-metagegevens." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" +msgstr "Distributie-metagegevens:" -msgid "Don't show colored output" -msgstr "" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Geen netwerkverbinding gebruiken." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Geen gekleurde uitvoer weergeven." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +"Onbewerkte XML-metagegevens dumpen voor een onderdeel dat overeenkomt met " +"het ID." -msgid "Empty." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Educatie" -msgid "Enforce a cache refresh" -msgstr "" +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 +msgid "Empty." +msgstr "Leeg." -msgid "Extends" -msgstr "" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulators" -msgid "Extensions" -msgstr "" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Een cache-verversing forceren." +#: tools/ascli-actions-misc.c:157 #, c-format -msgid "File %s not found or permission denied!" +msgid "Error while loading the metadata pool: %s" msgstr "" +"Er is een fout opgetreden tijdens het laden van de metagegevens-pool: %s" + +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Breidt uit" + +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Uitgelicht" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Uitgelicht" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Uitgelicht" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Uitgelicht" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Uitgelicht" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Uitgelicht" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Uitgelicht" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Uitgelicht" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Uitgelicht" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Bestandssysteem" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Financiën" +#: src/as-provided.c:165 msgid "Flashed Firmware" -msgstr "" +msgstr "Geflashte firmware" +#: src/as-provided.c:151 msgid "Fonts" -msgstr "" +msgstr "Lettertypen" + +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Lettertypen" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "%i onderdelen gevonden in verouderde paden." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "%i onderdelen gevonden." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Spellen" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "" +msgstr "Onderdelen verkrijgen die het opgegeven item beschikbaar stellen." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "" +msgstr "Informatie verkrijgen over een onderdeel door de ID." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafisch & Fotografie" +#: tools/ascli-utils.c:287 msgid "Homepage" -msgstr "" +msgstr "Website" + +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDE's" +#: tools/ascli-utils.c:288 msgid "Icon" -msgstr "" +msgstr "Pictogram" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Pictogrammensets" +#: tools/ascli-utils.c:282 msgid "Identifier" -msgstr "" +msgstr "Identificeerder" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Invoerbronnen" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." -msgstr "" +msgstr "Installeer een metagegevensbestand in de juiste locatie." -msgid "Install software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Installeer software die overeen komt met de onderdeel-id." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +"Ongeldig type geselecteerd voor het beschikbare item. Geldige waarden zijn:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Kinderen" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Taalpakketten" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Talen" + +#: src/as-provided.c:145 msgid "Libraries" -msgstr "" +msgstr "Bibliotheken" #. license +#: tools/ascli-utils.c:350 msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" +msgstr "Licentie" -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Lokalisering" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logisch" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" +msgstr "Mime-types" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Verzoek doen zonder te cachen." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Handmatig de locatie instellen van de AppStream-cache." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Handmatig de locatie instellen van te scannen AppStream-metagegevens." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Wiskunde" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Wiskunde" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Het metagegevens-bestand '%s' bestaat niet." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Metagegevens-bestanden bevatten fouten:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Metainformatie-bestanden:" +#: src/as-provided.c:153 msgid "Modaliases" -msgstr "" +msgstr "Modaliassen" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Muziekspelers" +#: tools/ascli-utils.c:283 msgid "Name" -msgstr "" +msgstr "Naam" -#, c-format -msgid "No component matching '%s' found." -msgstr "" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Nieuws" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "" +msgid "No component matching '%s' found." +msgstr "Er is geen onderdeel gevonden dat overeen komt met '%s'." +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Geen pictogrammen." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" +"Er is geen geschikt CLI-pakketbeheer gevonden. Zorg ervoor dat bijv. \"pkcon" +"\" (onderdeel van PackageKit) beschikbaar is." -msgid "No value for the item to search for defined." -msgstr "" +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "Geen waarde voor het te zoeken item opgegeven." -msgid "Package" -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Kantoor" -msgid "Print detailed output about found components" -msgstr "" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "De optie '%s' is onbekend." -msgid "Print even pedantic hints when validating" -msgstr "" +#: tools/ascli-utils.c:285 +msgid "Package" +msgstr "Pakket" + +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografie" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Gedetailleerde uitvoer weergeven over gevonden onderdelen." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" -msgstr "" +msgstr "Projectgroep" +#: tools/ascli-utils.c:392 msgid "Provided Items" -msgstr "" +msgstr "Geboden items" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "" +msgstr "Python (Versie 2)" +#: src/as-provided.c:157 msgid "Python 3" -msgstr "" +msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Herbouw de onderdeelmetagegevens-cache." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Verwijder software die overeenkomt met de onderdeel-id." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotica" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Rollenspellen" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 +#, c-format +msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +"Voer '%s --help' uit om een volledige lijst van beschikbare " +"opdrachtregelopties te weergeven." +#: tools/appstream-cli.c:187 #, c-format -msgid "Run '%s --help' to see a full list of available command line options." +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." msgstr "" +"Voer '%s --help' uit om een volledige lijst van beschikbare opdrachten en " +"opties te weergeven en '%s %s --help' om een lijst van opties te zien voor " +"dit subcommando." +#: src/as-provided.c:163 msgid "Runtime Firmware" -msgstr "" +msgstr "Runtime-firmware" -msgid "Sample Screenshot URL" -msgstr "" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Scannen" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Wetenschap" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "" +msgstr "Zoeken in de onderdelen-database." -msgid "Select a value for the provides-item which needs to be found." -msgstr "" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Veiligheid" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Extra foutopsporingsinformatie weergeven." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "De applicatieversie weergeven." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sport" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategie" -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" -msgstr "" +msgstr "Subcommando's:" +#: tools/ascli-utils.c:284 msgid "Summary" -msgstr "" +msgstr "Samenvatting" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Samenvatting:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Systeemmonitoring" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Terminalemulators" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Tekstbewerkers" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Het .desktop-bestand, '%s', bestaat niet." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" +"De AppStream-systeemcache is bijgewerkt maar er zijn fouten gevonden die " +"mogelijk kunnen leiden tot ontbrekende metagegevens. Bekijk het uitgebreide " +"log om meer informatie te verkrijgen." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "Het TYPE moet een geldig onderdeeltype zijn, bijv.: %s" -msgid "The system metadata cache does not exist." +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +"Het software-onderdeel van het type '%s' is ongeldig in AppStream. Geldige " +"waarden zijn:" -msgid "The system metadata cache exists." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" +"Deze opdracht ontvangt optioneel TYPE- en BESTANDsargumenten; BESTAND is het " +"bestand waarnaar moet worden weggeschreven (of \"-\" voor standaard uitvoer)." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Dit hulpprogramma stelt u in staat AppStream XML of YAML-metagegevens te " +"lezen, schrijven, valideren en wijzigen. Het stelt u tevens in staat om " +"toegang te krijgen tot de systeem-metagegevenspool. U kunt daar bijv. zoeken " +"naar software die een bepaald mimetype aanbiedt en deze installeren middels " +"de ID." + +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" +msgid "Unable to build the template metainfo file: %s" +msgstr "Het bouwen van het sjabloon-metainformatiebestand is mislukt: %s" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" +"Het converteren is mislukt: de uitvoersoort kon niet worden bepaald. Stel " +"deze handmatig in d.m.v. '--format='." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "" +msgstr "Het vinden van een onderdeel dat overeenkomt met %s is mislukt!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" +msgid "Unable to find component with ID '%s'!" +msgstr "Het vinden van een onderdeel met ID %s is mislukt!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" +msgid "Unable to read the .desktop file: %s" +msgstr "Het lezen van het .desktop-bestand is mislukt: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Het opslaan van het sjabloon-metainformatiebestand is mislukt: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "" +msgstr "De pakketbeheerder kon niet worden gestart: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" +"Het schrijven naar '%s' is mislukt: meta-informatiebestanden kunnen niet " +"worden geïnstalleerd." -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Onbekende opdracht '%s'." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +"Gebruik het opgegeven .desktop-bestand om basiswaarden in te vullen in het " +"metainformatie-bestand." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Hulpmiddelen" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." -msgstr "" +msgstr "Valideer de AppStream XML-bestanden op problemen." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" +"Valideert een geïnstalleerde bestandsstructuur van een applicatie op geldige " +"metagegevens." -msgid "Validation failed." -msgstr "" +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Het valideren is mislukt: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." -msgstr "" +msgstr "Het valideren is succesvol." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "Het valideren is succesvol: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Waarde van het te vinden item." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vectorafbeeldingen" +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "Version: %s" +msgstr "Versie: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Weergevers" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "We hebben informatie over %i software-onderdelen." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Webbrowsers" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Tekstverwerkers" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." msgstr "" +"U kunt informatie vinden over subopdracht-opties door \"--help\" toe te " +"voegen aan de subopdracht." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +"U heeft mogelijk administrator-rechten (su) nodig om deze actie uit te " +"kunnen voeren." -msgid "You need to specify a command." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" msgstr "" +"U moet een type AppStream-software-onderdeel opgeven om een sjabloon te " +"kunnen genereren. Geldige waarden zijn:" -msgid "You need to specify a component-id." -msgstr "" +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 +msgid "You need to specify a command." +msgstr "U moet een opdracht opgeven." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "U moet een onderdeel-ID opgeven." + +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "" +msgstr "U moet een te valideren bestand opgeven!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "U moet een metagegevens-bestand opgeven." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" -msgstr "" +msgstr "U moet een hoofdmap opgeven om te kunnen beginnen met valideren!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." -msgstr "" +msgstr "U moet een zoekterm opgeven." + +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "U moet een invoer- en uitvoerbestand opgeven." #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, @@ -357,5 +995,38 @@ #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" +"app;applicatie;pakket;programma;toepassing;hulpmiddel;hulpprogramma;" +"ontwikkeling" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "fouten: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "informatie: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "pedant: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "waarschuwingen: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "De opdracht '%s' is onbekend." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Geen caches gebruiken tijdens het uitvoeren van de opdracht." diff -Nru appstream-0.9.4/po/nn.po appstream-0.12.0/po/nn.po --- appstream-0.9.4/po/nn.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/nn.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Norwegian Nynorsk (http://www.transifex.com/freedesktop/" -"appstream/language/nn/)\n" -"Language: nn\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/oc.po appstream-0.12.0/po/oc.po --- appstream-0.9.4/po/oc.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/oc.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,10 +7,10 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2016-08-15 18:48+0000\n" +"Last-Translator: Matthias Klumpp \n" "Language-Team: Occitan (post 1500) (http://www.transifex.com/freedesktop/" "appstream/language/oc/)\n" "Language: oc\n" @@ -19,344 +19,975 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" msgstr "" -#, c-format -msgid "AppStream CLI tool version: %s" +#: src/as-category.c:168 +#, fuzzy +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Categorias" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" msgstr "" -msgid "AppStream Status:" +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" msgstr "" -msgid "AppStream cache update completed successfully." +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." msgstr "" +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 +msgid "AppStream Status:" +msgstr "" + +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 +msgid "AppStream cache update completed successfully." +msgstr "" + +#: src/as-pool.c:1560 #, c-format -msgid "AppStream cache update failed." +msgid "" +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "Version : %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" msgstr "" +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "" + +#: src/as-provided.c:147 msgid "Binaries" +msgstr "Binaris" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" msgstr "" +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." +msgstr "" + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" msgstr "" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Categorias" -#, c-format -msgid "Command '%s' is unknown." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" msgstr "" +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "" + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Descripcion" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Desvolopaire" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +#, fuzzy +msgid "Developer Tools" +msgstr "Desvolopaire" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." msgstr "" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." +msgstr "Void." + +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." msgstr "" -msgid "Enforce a cache refresh" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" msgstr "" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "" -msgid "Extensions" -msgstr "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "" -#, c-format -msgid "File %s not found or permission denied!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" msgstr "" +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "" + +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 msgid "Fonts" msgstr "Poliças" +#: src/as-category.c:211 +#, fuzzy +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Poliças" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Pagina d'acuèlh" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Icòna" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Bibliiotècas" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licéncia" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" msgstr "" -msgid "Manually set the location of the AppStream cache" +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" msgstr "" -msgid "Mimetypes" +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" msgstr "Tipes Mime" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nom" -#, c-format -msgid "No component matching '%s' found." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" msgstr "" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." +msgid "No component matching '%s' found." msgstr "" +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "" +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." msgstr "" +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paquetatge" -msgid "Print detailed output about found components" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" msgstr "" -msgid "Print even pedantic hints when validating" +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." msgstr "" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (Version 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "" + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "" -msgid "Remove software matching the component-id." +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" msgstr "" +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" msgstr "" +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "" + +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "" -msgid "Select a value for the provides-item which needs to be found." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." msgstr "" -msgid "Show extra debugging information" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." msgstr "" -msgid "Show the program version" +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" msgstr "" -#. these are commands we can use with appstream-cli +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Soscomandas :" +#: tools/ascli-utils.c:284 msgid "Summary" -msgstr "" +msgstr "Resumit" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Resumit :" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" -msgid "The system metadata cache does not exist." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" -msgid "The system metadata cache exists." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." msgstr "" +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "Unable to build the template metainfo file: %s" msgstr "" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" +msgid "Unable to find component with ID '%s'!" msgstr "" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to read the .desktop file: %s" msgstr "" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" msgstr "" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" msgstr "" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "" +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." +msgid "Validation was successful: %s" +msgstr "" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." msgstr "" +#: src/as-category.c:177 +#, fuzzy +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Categorias" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." +msgid "Version: %s" +msgstr "Version : %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." msgstr "" +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "" -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "" +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "" +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "" + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Categorias" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Categorias" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Categorias" + +#~ msgid "Extensions" +#~ msgstr "Extensions" diff -Nru appstream-0.9.4/po/or.po appstream-0.12.0/po/or.po --- appstream-0.9.4/po/or.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/or.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Oriya (http://www.transifex.com/freedesktop/appstream/" -"language/or/)\n" -"Language: or\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/pa.po appstream-0.12.0/po/pa.po --- appstream-0.9.4/po/pa.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/pa.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Panjabi (Punjabi) (http://www.transifex.com/freedesktop/" -"appstream/language/pa/)\n" -"Language: pa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/pl.po appstream-0.12.0/po/pl.po --- appstream-0.9.4/po/pl.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/pl.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,212 +7,590 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-12 12:03+0000\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-28 23:36+0000\n" "Last-Translator: Piotr Drąg \n" -"Language-Team: Polish (http://www.transifex.com/freedesktop/appstream/" -"language/pl/)\n" +"Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Typ elementu Provides (np. lib, bin, python3…)" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 2.20-dev\n" + +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Polecenie „%s”" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Grafika 3D" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Gry akcji" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Dodatki" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Gry przygodowe" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Wyświetla także drobiazgowe uwagi." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Typ elementu (np. lib, bin, python3…)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Narzędzie do działania z metadanymi AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "Interfejs AppStream dla wiersza poleceń" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Wersja narzędzia klienta AppStream w wierszu poleceń: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Wersja narzędzia AppStream w wierszu poleceń: %s\n" +"Wersja biblioteki AppStream: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "Stan AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Pomyślnie ukończono aktualizację pamięci podręcznej AppStream." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Pomyślnie ukończono aktualizację pamięci podręcznej AppStream, ale część " -"metadanych została zignorowana z powodu błędów." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Aktualizacja pamięci podręcznej AppStream się nie powiodła." +"Aktualizacja pamięci podręcznej AppStream się nie powiodła. Można włączyć " +"tryb wyświetlania dodatkowych informacji." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "Aktualizacja pamięci podręcznej AppStream jest niepotrzebna." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Interfejs wiersza poleceń AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"Nie odnaleziono pamięci podręcznej składników oprogramowania AppStream. Może " -"to oznaczać, że niepoprawnie ustawiono AppStream lub dystrybucja nie " -"dostarcza metadanych AppStream." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream to specyfikacja używana przez wiele dystrybucji do dostarczania " +"metadanych o składnikach oprogramowania." +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"Zaktualizowano systemową pamięć podręczną AppStream, ale odnaleziono błędy: " +"%s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "Wersja AppStream: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Gry platformowe" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Sztuczna inteligencja" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomia" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomia" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Dźwięk i obraz" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Tworzenie i edycja dźwięku" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Pliki binarne" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Gry w klocki" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Gry planszowe" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Paczka" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "Położenie pamięci podręcznej „%s” nie jest zapisywalne." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalendarze" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"Nie można skopiować „%s”: plik nie posiada rozszerzenia „.metainfo.xml” lub " -"„.appdata.xml”." +"Nie można skopiować „%s”: plik nie ma przyrostka „.metainfo.xml” lub „." +"appdata.xml”." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Gry karciane" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategorie" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Nieznane polecenie „%s”." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Komunikatory" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Chemia" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Chemia" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodeki" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Komunikacja i aktualności" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Składnik" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "Składnik „%s” nie posiada kandydata instalacji." +msgstr "Składnik „%s” nie ma kandydata instalacji." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Obowiązkowe dla" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Konwertuje XML kolekcji do YAML lub odwrotnie." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Nie można odnaleźć składnika dostarczającego „%s::%s”." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "Tworzy szablon pliku Metainfo (do wypełnienia przez projekt)." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "Usługi sesji D-Bus" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "Usługi systemowe D-Bus" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Bazy danych" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Debugery" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Adres URL domyślnego zrzutu ekranu" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Domyślny format metadanych (prawidłowe wartości to „xml” i „yaml”)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Opis" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Programista" -msgid "Display various information about installed AppStream metadata." -msgstr "Wyświetla różne informacje o zainstalowanych metadanych AppStream." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Narzędzia programistyczne" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Wyświetla informacje o stanie dostępnych metadanych AppStream." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Metadane dystrybucji:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Bez używania pamięci podręcznej Xapian podczas wykonywania żądania" - -msgid "Don't show colored output" -msgstr "Bez kolorowania wyjścia" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Bez używania dostępu do sieci." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Bez kolorowania wyjścia." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "Zrzuca surowe metadane XML dla składnika pasującego do identyfikatora." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Edukacja" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Puste." -msgid "Enforce a cache refresh" -msgstr "Wymusza odświeżenie pamięci podręcznej" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulatory" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Wymusza odświeżenie pamięci podręcznej." + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Błąd podczas wczytywania puli metadanych: %s" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Rozszerza" -msgid "Extensions" -msgstr "Rozszerzenia" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Nie odnaleziono pliku %s lub odmówiono uprawnień." +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Polecane" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Polecane" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Polecane" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Polecane" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Polecane" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Polecane" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Polecane" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Polecane" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Polecane" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Systemy plików" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finanse" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Wgrane oprogramowanie sprzętowe" +#: src/as-provided.c:151 msgid "Fonts" msgstr "Czcionki" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Czcionki" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "Odnaleziono składniki w przestarzałych ścieżkach: %i." +msgstr "Odnaleziono składniki w przestarzałych ścieżkach: %i." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "Odnaleziono składniki: %i." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Gry" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "Uzyskuje składniki dostarczające podany element." +msgstr "Pobiera składniki dostarczające podany element." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "Uzyskuje informacje o składniku według jego identyfikatora." +msgstr "Pobiera informacje o składniku według jego identyfikatora." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafika i fotografia" +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Strona domowa" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Środowiska programistyczne" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ikona" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Zestawy ikon" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identyfikator" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Źródła wprowadzania" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Instaluje plik metadanych we właściwym położeniu." -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "Instaluje oprogramowanie pasujące do identyfikatora składnika." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "Wybrano nieprawidłowy typ dla podanego elementu. Prawidłowe wartości:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Gry dla dzieci" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Pakiety językowe" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Języki" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Biblioteki" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licencja" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" -"Ręcznie ustawia położenie metadanych AppStream do tworzenia pamięci " -"podręcznej" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Tłumaczenia" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Gry logiczne" -msgid "Manually set the location of the AppStream cache" -msgstr "Ręcznie ustawia położenie metadanych AppStream" - -msgid "Mimetypes" +#: src/as-provided.c:149 +msgid "MIME types" msgstr "Typy MIME" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Tworzy żądanie bez pamięci podręcznej." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Ręcznie wybrane położenie pamięci podręcznej AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Ręcznie wybrane położenie metadanych AppStream do skanowania." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematyka" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematyka" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Plik metadanych „%s” nie istnieje." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Pliki metadanych mają błędy:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Pliki Metainfo:" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Pliki „modalias”" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Odtwarzacze muzyki" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nazwa" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Aktualności" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Nie odnaleziono składnika pasującego do „%s”." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "Nie odnaleziono składnika dostarczającego „%s;%s”." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "Brak ikon." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -221,159 +599,462 @@ "Proszę się upewnić, że dostępne jest np. polecenie „pkcon” (część pakietu " "PackageKit)." -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "Nie określono wartości dla wyszukiwanego elementu." +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Biuro" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Nieznana opcja „%s”." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Pakiet" -msgid "Print detailed output about found components" -msgstr "Wyświetla szczegółowe informacje o odnalezionych składnikach" - -msgid "Print even pedantic hints when validating" -msgstr "Wyświetla także drobiazgowe uwagi podczas sprawdzania poprawności" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografia" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Wyświetla szczegółowe informacje o odnalezionych składnikach." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Grupa projektu" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Dostarczane elementy" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (wersja 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Ponownie buduje pamięć podręczną informacji o składnikach." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Ponownie buduje pamięć podręczną metadanych składników." -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "Usuwa oprogramowanie pasujące do identyfikatora składnika." +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotyka" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Gry fabularne" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Polecenie „%s --help” wyświetli pełną listę dostępnych opcji wiersza poleceń." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Polecenie „%s --help” wyświetli listę dostępnych poleceń i opcji, a „%s %s --" +"help” wyświetli listę opcji dla danego podpolecenia." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Oprogramowanie sprzętowe wgrywane podczas uruchamiania systemu" -msgid "Sample Screenshot URL" -msgstr "Przykładowy adres URL zrzutu ekranu" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Skanowanie" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Nauka" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Przeszukuje bazę danych składników." -msgid "Select a value for the provides-item which needs to be found." -msgstr "Proszę wybrać wartość dla elementu Provides, który należy odnaleźć." - -msgid "Show extra debugging information" -msgstr "Wyświetla dodatkowe informacje debugowania" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Bezpieczeństwo" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Wyświetla dodatkowe informacje debugowania." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Wyświetla wersję programu." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Gry sportowe" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Gry strategiczne" -msgid "Show the program version" -msgstr "Wyświetla wersję programu" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Podpolecenia:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Podsumowanie" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Podsumowanie:" -msgid "The system metadata cache does not exist." -msgstr "Pamięć podręczna systemowych metadanych nie istnieje." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Monitorowanie komputera" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emulatory terminala" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Edytory tekstu" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Plik .desktop „%s” nie istnieje." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"Zaktualizowano systemową pamięć podręczną AppStream, ale wykryto błędy, " +"które mogą powodować brak metadanych. Można zobaczyć dodatkowe informacje " +"dziennika." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "TYP musi być prawidłowym typem składnika, na przykład: %s" -msgid "The system metadata cache exists." -msgstr "Pamięć podręczna systemowych metadanych istnieje." +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"Typ składnika oprogramowania „%s” nie jest prawidłowy w AppStream. Możliwe " +"wartości:" +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"To polecenie przyjmuje opcjonalne parametry pozycyjne TYP i PLIK, gdzie PLIK " +"to plik, do którego zapisać (lub „-”, co oznacza standardowe wyjście)." + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"To narzędzie umożliwia odczytywanie, zapisywanie, sprawdzanie poprawności " +"i przekształcanie metadanych AppStream w językach XML i YAML. Umożliwia " +"także dostęp do puli metadanych systemu, aby na przykład wyszukać " +"oprogramowanie dostarczające podany typ MIME i zainstalować je według jego " +"identyfikatora składnika oprogramowania." + +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "Wystąpił błąd podczas próby odnalezienia dodatkowych informacji: %s" +msgid "Unable to build the template metainfo file: %s" +msgstr "Nie można zbudować pliku szablonu Metainfo: %s" -msgid "Tried to perform query on closed database." -msgstr "Próbowano wykonać zapytanie na zamkniętej bazie danych." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Nie można konwertować pliku: nie można ustalić formatu wyjścia, proszę " +"ustawić go za pomocą „--format=”." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "Nie można odnaleźć składnika pasującego do %s." +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Nie można odnaleźć składnika dostarczającego „%s;%s”." +msgid "Unable to find component with ID '%s'!" +msgstr "Nie można odnaleźć składnika o identyfikatorze „%s”." +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Nie można odnaleźć składnika o identyfikatorze „%s”." +msgid "Unable to read the .desktop file: %s" +msgstr "Nie można odczytać pliku .desktop: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" -"Nie można otworzyć pamięci podręcznej składników oprogramowania AppStream." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Nie można zapisać pliku szablonu Metainfo: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Nie można wywołać menedżera pakietów: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "Nie można zapisać do „%s”, nie można zainstalować pliku metainfo." -msgid "Upstream metadata:" -msgstr "Zintegrowane metadane:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Nieznane polecenie „%s”." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Używa podanego pliku .desktop do wypełnienia podstawowych wartości pliku " +"Metainfo." +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Narzędzia" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "Sprawdza poprawność plików XML AppStream." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "Sprawdza poprawność metadanych zainstalowanego drzewa plików programu." -msgid "Validation failed." -msgstr "Sprawdzenie poprawności się nie powiodło." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Sprawdzenie poprawności się nie powiodło: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Pomyślnie sprawdzono poprawność." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "Informacje o składnikach oprogramowania: %i." +msgid "Validation was successful: %s" +msgstr "Pomyślnie sprawdzono poprawność: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Wartość wyszukiwanego elementu." +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Grafika wektorowa" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "Plik menu XDG w formacie XML „%s” jest uszkodzony." +msgid "Version: %s" +msgstr "Wersja: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Przeglądarki" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "Informacje o składnikach oprogramowania: %i." +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Przeglądarki WWW" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Procesory tekstu" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Przekazanie opcji „--help” do podpolecenia wyświetli informacje o opcjach " +"danego podpolecenia." + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "Wymagane są uprawnienia administratora, aby wykonać to działanie." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Należy podać typ składnika oprogramowania AppStream, aby utworzyć szablon. " +"Możliwe wartości:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Należy podać polecenie." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "Należy podać identyfikator składnika." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Należy podać plik do sprawdzenia poprawności." +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "Należy podać plik metadanych." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Należy podać główny katalog, aby rozpocząć sprawdzanie poprawności." +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Należy podać termin do wyszukania." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Należy podać plik wejściowy i wyjściowy." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" "aplikacja;apka;app;application;pakiet;paczka;package;program;programme;" "zestaw;suite;narzędzie;tool" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "błędy: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "informacje: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "drobne problemy: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "ostrzeżenia: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Nieznane polecenie „%s”." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Bez używania pamięci podręcznych podczas wykonywania żądania." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Aktualizacja pamięci podręcznej AppStream się nie powiodła." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "Wczytano pulę danych AppStream, ale zignorowano część metadanych z powodu " +#~ "błędów." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "Nie można szukać nieznanego typu składnika." + +#, fuzzy +#~ msgid "Category of Education" +#~ msgstr "Edukacja" + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategorie" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategorie" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategorie" + +#~ msgid "Extensions" +#~ msgstr "Rozszerzenia" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Nie odnaleziono pliku %s lub odmówiono uprawnień." + +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Nie odnaleziono składnika dostarczającego „%s::%s”." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "Plik menu XDG w formacie XML „%s” jest uszkodzony." diff -Nru appstream-0.9.4/po/POTFILES.in appstream-0.12.0/po/POTFILES.in --- appstream-0.9.4/po/POTFILES.in 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/POTFILES.in 2018-04-04 15:53:56.000000000 +0000 @@ -1,27 +1,32 @@ -[encoding: UTF-8] # List of source files containing translatable strings. # +# data +data/org.freedesktop.appstream.cli.metainfo.xml # library sources -src/as-cache-builder.c +src/as-bundle.c src/as-category.c +src/as-checksum.c src/as-component.c -src/as-database.c -src/as-data-pool.c +src/as-desktop-entry.c src/as-distro-details.c +src/as-distro-extras.c src/as-enums.c src/as-image.c -src/as-menu-parser.c src/as-metadata.c +src/as-pool.c src/as-provided.c +src/as-relation.c src/as-release.c src/as-screenshot.c +src/as-suggested.c src/as-translation.c src/as-utils.c src/as-validator.c src/as-validator-issue.c -src/as-xmldata.c -src/as-yamldata.c -# tools sources +src/as-xml.c +src/as-yaml.c +src/as-variant-cache.c +# tool sources tools/appstream-cli.c tools/ascli-utils.c tools/ascli-actions-mdata.c diff -Nru appstream-0.9.4/po/pt_BR.po appstream-0.12.0/po/pt_BR.po --- appstream-0.9.4/po/pt_BR.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/pt_BR.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,382 +1,1063 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: +# André Marcelo Alvarenga , 2016 # Rafael Fontenelle , 2015-2016 +# Rafael Fontenelle , 2017. msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/freedesktop/" -"appstream/language/pt_BR/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-29 02:14+0000\n" +"Last-Translator: Rafael Fontenelle \n" +"Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 2.20-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Um tipo provides-item (ex.: lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "comando “%s”" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Gráficos 3D" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Ação" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Extensões" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Aventura" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Também mostre dicas pedestrais." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Um tipo de item (ex.: lib, bin, python3, …)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Um utilitário para trabalhar com os metadados do AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "CLI do AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Versão da ferramenta CLI do AppStream: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Versão da ferramenta CLI do AppStream: %s\n" +"Versão da biblioteca do AppStream: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "Status do AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Atualização do cache do AppStream concluído com sucesso." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Atualização do cache do AppStream concluído, mas alguns metadados foram " -"ignorados por causa de erros." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Atualização do cache do AppStream falhou." +"Atualização do cache do AppStream falhou. Ative o modo verboso para obter " +"mais informações detalhadas de problemas." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "Atualização do cache do AppStream não é necessária." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Interface de linha de comando do AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"O cache de componente de software do AppStream não foi encontrado. Isso pode " -"significar que o AppStream foi configurado incorretamente ou que sua " -"distribuição não fornece qualquer metadados de AppStream." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream é uma especificação independente de distribuição para provimento " +"de metadados sobre componentes de software." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"Cache de sistema do AppStream foi atualizado, mas problemas foram " +"encontrados: %s" +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "Versão do AppStream: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arcade" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Inteligência artificial" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomia" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomia" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Áudio & vídeo" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Criação e edição de áudio" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Binários" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Bloqueados" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Tabuleiro" + +#: tools/ascli-utils.c:286 msgid "Bundle" -msgstr "Bundle" +msgstr "Pacote" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "A localização de cache \"%s\" não é gravável" +msgstr "A localização de cache “%s” não é gravável." + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Calendário" +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"Não foi possível copiar \"%s\": O arquivo não possui uma extensão \"." -"metainfo.xml\" ou \".appdata.xml\"." +"Não é possível copiar “%s”: O arquivo não tem um sufixo “.metainfo.xml” ou “." +"appdata.xml”." +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Cartão" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Categorias" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Comando \"%s\" é desconhecido." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Chat" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Química" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Química" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Codecs" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Comunicação & notícias" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Componente" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "O componente '%s' não possui candidato a instalação." +msgstr "O componente “%s” não possui candidato a instalação." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Compulsório para" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Converter XML para YAML ou vice-versa." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Não foi possível localizar componente fornecendo “%s::%s”." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Cria um modelo para um arquivo metainfo (a ser preenchido pelo projeto " +"upstream)." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "Serviços de sessão do DBus" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "Serviços de sistema do DBus" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Banco de dados" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Debuggers" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL padrão para captura de tela" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Formato de metadados padrão (valores válidos são “xml” e “yaml”)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Descrição" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Desenvolvedor" -msgid "Display various information about installed AppStream metadata." -msgstr "Exibe várias informações sobre metadados AppStream instalados." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Ferramentas do desenvolvedor" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Exibir informações sobre metadados disponíveis do AppStream." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Metadados de distribuição:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Não usar o cache do Xapian ao realizar a requisição" - -msgid "Don't show colored output" -msgstr "Não mostrar saída colorida" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Não usa acesso de rede." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Não exibir saída colorida." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" "Despejar metadados XML não tratados para um componente coincidindo com o ID." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Educação" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Vazio." -msgid "Enforce a cache refresh" -msgstr "Reforçar uma renovação do cache" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emuladores" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Reforçar uma atualização da cache." + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Erro ao carregar pool de metadados: %s" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Estende" -msgid "Extensions" -msgstr "Extensões" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Arquivo %s não localizado ou permissão negada!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Destaque" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Destaque" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Destaque" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Destaque" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Destaque" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Destaque" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Destaque" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Destaque" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Destaque" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Sistema de arquivos" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finanças" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Firmware descarregado" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Fontes" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "Fontes" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Encontrados %i componentes em caminhos antigos." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "Encontrados %i componentes." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Jogos" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "Obtém componentes que fornecem o item dado." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "Obtém informação sobre um componente por seu ID." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Gráficos & fotografia" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Página inícial" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDEs" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ícone" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Conjunto de ícones" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identificador" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Fontes de entrada" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Instala um arquivo de metadados na localização certa." -msgid "Install software matching the component-id." -msgstr "Instala software correspondente ao component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Instala software correspondente ao component-ID." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "Tipo inválido para o item fornecido selecionado. Valores válidos são:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Crianças" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Pacote de idiomas" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Idiomas" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Bibliotecas" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licença" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Localização" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Lógica" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "Tipos MIME" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Faz uma requisição sem qualquer cache." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Localização manualmente selecionada do cache do AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." msgstr "" -"Definir manualmente a localização dos metadados do AppStream para " -"regeneração do cache" +"Localização manualmente selecionada dos metadados do AppStream para varrer." -msgid "Manually set the location of the AppStream cache" -msgstr "Definir manualmente a localização do cache do AppStream" +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matemática" -msgid "Mimetypes" -msgstr "Tipos MIME" +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matemática" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Arquivo de metadados “%s” não existe." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Os arquivos de metadados possuem erros:" +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Arquivos de metainfo:" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Modos alternativos" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Reprodutores de música" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nome" -#, c-format -msgid "No component matching '%s' found." -msgstr "Nenhum componente encontrado que corresponda a \"%s\"." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Notícias" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "Nenhum componente fornecendo '%s;%s' encontrado." +msgid "No component matching '%s' found." +msgstr "Nenhum componente encontrado que corresponda a “%s”." +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "Nenhum ícone." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" "Nenhum gerenciado de pacotes CLI adequado encontrado. Por favor, certifique-" -"se de que, ex.: \"pkcon\" (parte de PackageKit), está disponível." +"se de que, ex.: “pkcon” (parte de PackageKit), está disponível." + +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "Nenhum valor para o item a ser pesquisado foi definido." -msgid "No value for the item to search for defined." -msgstr "Nenhum valor definido para o item pesquisar por." +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Escritório" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Comando “%s” é inválido." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Pacote" -msgid "Print detailed output about found components" -msgstr "Mostrar saída detalhada sobre componentes encontrados" - -msgid "Print even pedantic hints when validating" -msgstr "Mostrar até mesmo dicas pedantes ao validar" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografia" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Mostrar saída detalhada sobre componentes encontrados." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Grupo do projeto" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Itens fornecidos" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "Python (Versão 2)" +msgstr "Python (versão 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Recompilar o cache de informação do componente." - -msgid "Remove software matching the component-id." -msgstr "Remove software correspondendo ao component-id." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Reconstruir o cache de metadados de componentes." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Remove software correspondendo ao component-ID." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robótica" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "RPGs" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" -"Executar \"%s --help\" para ver uma lista completa das opções de linha de " +"Executar “%s --help” para ver uma lista completa das opções de linha de " "comando disponíveis." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Executar “%s --help” para ver uma lista de comandos e opções disponíveis, e " +"“%s %s --help” para ver uma lista de opções específicas para este subcomando." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Firmware de tempo real" -msgid "Sample Screenshot URL" -msgstr "URL de amostra de captura de tela" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Digitalização" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Ciência" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Pesquisa na base de dados de componente." -msgid "Select a value for the provides-item which needs to be found." -msgstr "Seleciona um valor para o provides-item que precisa ser encontrado." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Segurança" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Mostrar informações extras de depuração." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Mostrar a versão do programa." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Esportes" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Estratégia" -msgid "Show extra debugging information" -msgstr "Mostrar informação extra de depuração" - -msgid "Show the program version" -msgstr "Mostrar a versão do programa" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Subcomandos:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Resumo" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Resumo:" -msgid "The system metadata cache does not exist." -msgstr "O cache de metadados de sistema não existe." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Monitoramento do sistema" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emuladores de terminal" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Editores de texto" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "O arquivo .desktop “%s” não existe." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"O cache de sistema do AppStream foi atualizado, mas alguns erros foram " +"detectados, o que pode levar a metadados em falta. Veja o log verboso para " +"mais informações." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "O TIPO deve ser um component-type válido, como: %s" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"O tipo de componente de software “%s” não é válido no AppStream. Valores " +"possíveis são:" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"Esse comando leva os argumentos posicionais e opcionais TIPO e ARQUIVO, " +"ARQUIVO sendo um arquivo para escrever para (ou “-” para a saída padrão)." -msgid "The system metadata cache exists." -msgstr "O cache de metadados de sistema existe." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Esta ferramenta permite ler, escrever, validar e transformar metadados " +"AppStream em XML ou YAML. Também permite acessar o pool de metadados do " +"sistema para, por exemplo, consultar por um software fornecendo um Tipo MIME " +"específico e instalá-lo usando o identificador de componente de seu software." +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "Ocorreu um erro ao tentar localizar informações adicionais: %s" +msgid "Unable to build the template metainfo file: %s" +msgstr "Não foi possível construir o arquivo de modelo metainfo: %s" -msgid "Tried to perform query on closed database." -msgstr "Tentada consulta a banco de dados fechado." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Erro ao converter arquivo: Não foi possível determinar o formato de saída, " +"por favor, defina o formato explicitamente, utilizando “--format=”." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "Não foi possível encontrar um componente correspondendo a %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Não foi possível localizar componente fornecendo '%s;%s'!" +msgid "Unable to find component with ID '%s'!" +msgstr "Não foi possível encontrar um componente com ID “%s”!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Não foi possível encontrar um componente com ID \"%s\"!" +msgid "Unable to read the .desktop file: %s" +msgstr "Não foi possível ler o arquivo .desktop: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" -"Não foi possível abrir o cache de componentes de software do AppStream." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Não foi possível salvar o arquivo de modelo metainfo: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Não foi possível invocar o gerenciador de pacotes: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -"Não foi possível escrever em \"%s\", não foi possível instalar arquivo de " +"Não foi possível escrever em “%s”, não foi possível instalar arquivo de " +"metainfo." + +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Comando desconhecido “%s”." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Usa o arquivo .desktop dado para preencher valores básicos no arquivo " "metainfo." -msgid "Upstream metadata:" -msgstr "Metadados do upstream:" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Utilitários" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "Valida os arquivos XML de AppStream por problemas." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" "Valida uma árvore de arquivo instalado de um aplicativo para metadados " "válidos." -msgid "Validation failed." -msgstr "Validação falhou." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Validação falhou: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Validação bem sucedida." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "Validação bem sucedida: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Valor do item que deve ser encontrado." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Gráficos vetoriais" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Versão: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Visualizadores" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "Nós temos informação sobre %i componentes de software." -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "O arquivo XML \"%s\" de Menu XDG está corrompido." +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Navegadores" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Processadores de texto" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Você pode encontrar informações sobre opções de um subcomando específico " +"passando “--help” para o subcomando." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" -"Você pode precisar de permissões de super-usuário para realizar esta ação" +"Você pode precisar de permissões de super-usuário para realizar esta ação." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Você precisa fornecer um tipo AppStream de componente de software para gerar " +"um modelo. Valores possíveis são:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Você precisa especificar um comando." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "Você precisa especificar um ID de componente." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Você precisa especificar um arquivo para validar!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "Você precisa especificar um arquivo de metadados." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Você precisa especificar um diretório raiz para iniciar validação!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Você precisa especificar um termo para pesquisar por." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Você precisa especificar um arquivo de entrada e um de saída." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;aplicativo;pacote;programa;suíte;ferramenta" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "erros: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "infos: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "pedante: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "avisos: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Comando “%s” é desconhecido." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Não use qualquer cache ao realizar a requisição." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Atualização do cache do AppStream falhou." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "Pool de dados AppStream foi carregado, mas alguns metadados foram " +#~ "ignorados por causa de erros." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "Não é possível procurar por um tipo de componente desconhecido." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Categorias" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Categorias" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Categorias" + +#~ msgid "Extensions" +#~ msgstr "Extensões" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Arquivo %s não localizado ou permissão negada!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Nenhum componente fornecendo '%s;%s' encontrado." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "O arquivo XML \"%s\" de Menu XDG está corrompido." diff -Nru appstream-0.9.4/po/pt.po appstream-0.12.0/po/pt.po --- appstream-0.9.4/po/pt.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/pt.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,362 +7,1010 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Portuguese (http://www.transifex.com/freedesktop/appstream/" -"language/pt/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2017-01-16 01:24+0000\n" +"Last-Translator: Manuela Silva \n" +"Language-Team: Portuguese \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Um tipo provides-item (ex: lib, bin, python3, ...)" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.11-dev\n" +#: tools/appstream-cli.c:146 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "'%s' command" +msgstr "Comando %s" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Gráficos 3D" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Ação" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Add-ons" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Aventura" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "" + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +#, fuzzy +msgid "AppStream CLI" msgstr "Versão da ferramenta de cliente AppStream: %s" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "Versão da ferramenta de cliente AppStream: %s" + +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "Estado de AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "Atualização da cache da AppStream terminada com sucesso." +msgstr "Atualização da cache do AppStream terminada com sucesso." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Atualização da cache da AppStream terminada. mas alguns metadados foram " -"ignorados devido a erros." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Atualização da cache da AppStream falhou." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "Ambiente da linha de comandos do AppStream" +msgstr "Interface da linha de comandos do AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "Versão da ferramenta de cliente AppStream: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arcada" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Inteligência Artificial" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomia" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomia" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Áudio e Vídeo" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Criação e Edição de Áudio" + +#: src/as-provided.c:147 msgid "Binaries" +msgstr "Binários" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" msgstr "" +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Pacote" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Calendário" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." +msgstr "" + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" msgstr "" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Categorias" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Comando \"%s\" desconhecido." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Conversação" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Codecs" +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Comunicação e Notícias" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Obrigatório para" -msgid "DBus Session Services" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." msgstr "" +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Não foi possível encontrar o componente com a id.'%s::%s'." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 +msgid "DBus Session Services" +msgstr "Serviços de Sessão DBus" + +#: src/as-provided.c:159 msgid "DBus System Services" +msgstr "Serviços de Sistema DBus" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Base de Dados" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Depuradores" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL da captura de ecrã predefinida" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." msgstr "" +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Descrição" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Programador" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Ferramentas de Programador" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Não usar a cache Xapian ao realizar o pedido" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "" -msgid "Don't show colored output" -msgstr "Não mostrar saída colorida" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Não mostrar saída colorida." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Educação" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." -msgstr "" +msgstr "Vazio." + +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emuladores" -msgid "Enforce a cache refresh" -msgstr "Forçar a atualização da cache" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Forçar a atualização da cache." + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "" -msgid "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Ficheiro %s não encontrado ou permissão negada!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Sistema de Ficheiros" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finanças" + +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 msgid "Fonts" msgstr "" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Encontrados %i componentes." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Jogos" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Gráficos e Fotografia" + +#: tools/ascli-utils.c:287 msgid "Homepage" -msgstr "Página inicial" +msgstr "Página Inicial" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDEs" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ícone" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identificador" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Fontes de Entrada" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Pacotes de Idioma" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Idiomas" + +#: src/as-provided.c:145 msgid "Libraries" -msgstr "" +msgstr "Bibliotecas" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licença" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Localização" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" msgstr "" -"Definir manualmente a localização dos metadados da AppStream para " -"atualização da cache" -msgid "Manually set the location of the AppStream cache" -msgstr "Definir manualmente a localização da cache da AppStream" +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "" -msgid "Mimetypes" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." msgstr "" +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "Definir manualmente a localização da cache do AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" +"Definir manualmente a localização dos metadados do AppStream para pesquisar." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matemática" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matemática" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Reprodutores de Música" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Nome" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Notícias" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Sem correspondência para \"%s\"." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Sem ícones." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Escritório" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "A opção \"%s\" é desconhecida." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Pacote" -msgid "Print detailed output about found components" -msgstr "Imprimir saída detalhada sobre componentes encontrados" - -msgid "Print even pedantic hints when validating" -msgstr "Imprimir até dicas pedantes ao validar" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografia" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Imprimir saída detalhada sobre os componentes encontrados." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" -msgstr "Grupo do projeto" +msgstr "Grupo do Projeto" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Itens fornecidos" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "" +msgstr "Python (Versão 2)" +#: src/as-provided.c:157 msgid "Python 3" +msgstr "Python 3" + +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "" + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "" -msgid "Rebuild the component information cache." +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" msgstr "" -msgid "Remove software matching the component-id." +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" msgstr "" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" -"Execute \"%s --help\" para ver uma lista das opções de linha de comandos " -"disponíveis." +"Execute \"%s --help\" para ver uma lista completa das opções da linha de " +"comandos disponíveis." -msgid "Runtime Firmware" +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." msgstr "" +"Execute \"%s --help\" para ver uma lista das opções e de comandos " +"disponíveis, e '%s %s --help' para ver uma lista de opções específica para " +"este subcomando." -msgid "Sample Screenshot URL" -msgstr "URL da captura de ecrã amostra" +#: src/as-provided.c:163 +msgid "Runtime Firmware" +msgstr "" -msgid "Search the component database." +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" msgstr "" -msgid "Select a value for the provides-item which needs to be found." +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Ciências" + +#: tools/appstream-cli.c:601 +msgid "Search the component database." msgstr "" -msgid "Show extra debugging information" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Segurança" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +#, fuzzy +msgid "Show extra debugging information." msgstr "Mostrar informação extra de depuração" -msgid "Show the program version" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +#, fuzzy +msgid "Show the program version." msgstr "Mostrar versão do programa" -#. these are commands we can use with appstream-cli +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Desportos" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Estratégia" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" -msgstr "Subcomandos" +msgstr "Subcomandos:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Resumo" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Resumo:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Monitorização do Sistema" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emuladores de Terminal" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Editores de Texto" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." msgstr "" -msgid "The system metadata cache does not exist." +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" -msgid "The system metadata cache exists." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" msgstr "" +#: tools/ascli-actions-mdata.c:446 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" -msgid "Tried to perform query on closed database." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "Impossível encontrar componente como %s!" +msgstr "Não é possível encontrar o componente correspondente com %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" +msgid "Unable to find component with ID '%s'!" +msgstr "Não é possível encontrar o componente com a identificação \"%s\"!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Impossível encontrar componente com a id \"%s\"!" +msgid "Unable to read the .desktop file: %s" +msgstr "" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Utilitários" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, fuzzy, c-format +msgid "Validation failed: %s" msgstr "A validação falhou." +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." -msgstr "Validação com sucesso." +msgstr "A validação foi bem sucedida." + +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, fuzzy, c-format +msgid "Validation was successful: %s" +msgstr "A validação foi bem sucedida." + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "" +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Gráficos de Vetor" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Versão: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Visualizadores" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "" -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "Ficheiro XML XDG Menu \"%s\" está danificado." +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Navegadores da Web" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Processador de Texto" +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Tem de especificar um comando." -msgid "You need to specify a component-id." -msgstr "Tem de especificar uma id de componente." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Tem de especificar uma identificação de componente." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "Tem de especificar um ficheiro a validar!" +msgstr "Tem de especificar um ficheiro para validar!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "Tem de especificar um ficheiro de metadados." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Tem de especificar uma pasta raiz para começar a validação!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Tem de especificar um termo a procurar." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Tem de especificar um ficheiro de entrada e saída." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" -msgstr "app;aplicação;pacote;programa;conjunto;ferramenta" +msgstr "app;aplicação;pacote;programa;programar;conjunto;ferramenta" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Comando \"%s\" desconhecido." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Não utilizar quaisquer caches ao realizar o pedido." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Atualização da cache da AppStream falhou." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Categorias" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Categorias" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Categorias" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Ficheiro %s não encontrado ou permissão negada!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Sem correspondência para \"%s\"." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "Ficheiro XML XDG Menu \"%s\" está danificado." diff -Nru appstream-0.9.4/po/ro.po appstream-0.12.0/po/ro.po --- appstream-0.9.4/po/ro.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ro.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,362 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Romanian (http://www.transifex.com/freedesktop/appstream/" -"language/ro/)\n" -"Language: ro\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" -"2:1));\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/ru.po appstream-0.12.0/po/ru.po --- appstream-0.9.4/po/ru.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ru.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,217 +7,596 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-12 06:36+0000\n" -"Last-Translator: Serge Vylekzhanin \n" -"Language-Team: Russian (http://www.transifex.com/freedesktop/appstream/" -"language/ru/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-29 12:30+0000\n" +"Last-Translator: Igor \n" +"Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" -"%100>=11 && n%100<=14)? 2 : 3);\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 2.20-dev\n" + +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Команда «%s»" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D-графика" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Экшен" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Дополнения" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Приключения" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Кроме того, выводить педантичные подсказки." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Тип элемента (например lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Утилита для работы с метаданными AppStream" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Тип предоставляющего элемента (например, lib, bin, python3, …)" +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "Интерфейс командной строки AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Версия AppStream CLI-программы: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Версия CLI-программы AppStream: %s\n" +"Версия библиотеки AppStream: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "Статус AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Обновление кэша AppStream завершено успешно." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Обновление кэша AppStream завершено, но некоторые метаданные были " -"проигнорированы из-за ошибок." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Обновление кэша AppStream прошло неудачно" +"Не удалось обновить кэш AppStream. Включите подробный режим для получения " +"более детальной информации о проблеме." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "Обновление кэша AppStream необязательно" +msgstr "Обновление кэша AppStream необязательно." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Интерфейс командной строки AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"Не найден кэш компонентов программного обеспечения AppStream. Это может " -"означать, что AppStream настроен некорректно или Ваш дистрибутив не " -"предоставляет никаких метаданных AppStream." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream — это кросс-платформенная спецификация предоставления метаданных о " +"программных компонентах." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "Системный кэш AppStream обновлён, но найдены проблемы: %s" +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "Версия AppStream: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Аркада" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Искусственный интеллект" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Астрономия" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Астрономия" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Аудио и видео" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Создание и редактирование аудио" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Исполняемые файлы" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Блоки" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Настольные" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Пакет" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "Кэш, расположенный в '%s', недоступен для записи." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Календарь" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"Невозможно скопировать '%s': отсутствует расширение '.metainfo.xml' или '." -"appdata.xml'." +"Не удается скопировать \"%s\": у файла нет '.metainfo.xml' или '.appdata." +"xml' окончания." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Карточные" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Категории" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Команда '%s' неизвестна" +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Чат" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Химия" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Химия" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Кодеки" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Общение и новости" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Компонент" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "Компонент '%s' не имеет кандидата установки." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Обязательно для" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Конвертировать коллекцию из XML в YAML или наоборот." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Не удалось найти компоненту, предоставляющую \"%s::%s\"." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Создать шаблон для файла метаинформации (будет заполнен апстрим-проектом)." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "Сессионные DBus службы" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "Системные DBus службы" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "База данных" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Отладчики" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL-адрес снимка экрана по умолчанию" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" +"Формат метаданных по умолчанию (допустимые значения: \"xml\" и \"yaml\")." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Описание" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Разработчик" -msgid "Display various information about installed AppStream metadata." -msgstr "Отобразить различную информацию об установленных метаданных AppStream." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Инструменты разработки" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Показать информацию о состоянии доступных метаданных AppStream." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Метаданные дистрибуции:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Не использовать Xapian кэш при выполнении запроса" - -msgid "Don't show colored output" -msgstr "Не показывать цветной вывод" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Не использовать доступ к сети." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Не показывать цветной вывод." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" -"Создать дамп необработанных метаданных XML для компонента с соответствующим " +"Создать дамп необработанных метаданных XML для компоненты с соответствующим " "идентификатором." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Образование" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Пусто." -msgid "Enforce a cache refresh" -msgstr "Принудительно обновить кэш" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Эмуляторы" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Принудительно обновить кэш." +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Ошибка при загрузке пула метаданных: %s" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Расширения" -msgid "Extensions" -msgstr "Расширения" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Файл %s не найден или доступ к нему запрещён!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Отмеченные" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Отмеченные" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Отмеченные" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Отмеченные" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Отмеченные" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Отмеченные" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Отмеченные" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Отмеченные" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Отмеченные" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Файловая система" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Финансы" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Прошитая микропрограмма" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Шрифты" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "Шрифты" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "Найдено %i компонент в унаследованных путях." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "Найдено %i компонент(ы)" +msgstr "Найдено %i компонентов." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Игры" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "Получить компоненты, которые предоставляют данную запись." +msgstr "Получить компоненты, которые предоставляют данный элемент." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "Получить информацию о компоненте по его идентификатору." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Графика и фотография" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Домашняя станица" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Интегрированные среды разработки (IDE)" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Значок" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Наборы значков" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Идентификатор" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Источники" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Установить файл метаданных в нужное место." -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" "Установить программное обеспечение, соответствующее идентификатору " "компоненты." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" "Выбран неверный тип для предоставленного элемента. Допустимые значения:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Детские" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Языковые пакеты" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Языки" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Библиотеки" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Лицензия" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Локализация" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Логические" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "MIME-типы" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Сделать запрос без кэширования." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Установить вручную местоположение кэша AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." msgstr "" -"Установить вручную местоположение метаданных AppStream для регенерации кэша" +"Установить вручную местоположение метаданных AppStream для сканирования." -msgid "Manually set the location of the AppStream cache" -msgstr "Установить вручную местоположение кэша AppStream" +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Математика" -msgid "Mimetypes" -msgstr "MIME-типы" +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Математика" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Файл метаданных \"%s\" не существует." +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Файлы метаданных содержат ошибки:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Файлы метаинформации:" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Modalias'ы" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Музыкальные проигрыватели" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Имя" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Новости" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Не найдено компоненты, соответствующей '%s'." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "Не найдены компоненты, предоставляющие '%s;%s'" - +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "Нет значков" +msgstr "Нет значков." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -225,161 +604,463 @@ "Не найден подходящий CLI-менеджер пакетов. Пожалуйста, убедитесь, что, " "например, «pkcon» (часть PackageKit) доступен." -msgid "No value for the item to search for defined." -msgstr "Не определено значение для элемента поиска" +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "Не определено значение элемента для поиска." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Офис" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Опция \"%s 1\" неизвестна." +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Пакет" -msgid "Print detailed output about found components" -msgstr "Напечатать подробный вывод о найденных компонентах" - -msgid "Print even pedantic hints when validating" -msgstr "Выводить даже мельчайшие неточности при проверке" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Фотография" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Напечатать подробный вывод о найденных компонентах." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Проектная группа" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Предоставленные элементы" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (версия 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Перестроить кэш информации о компонентах." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Перестроить кэш метаданных компонентах." -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "" "Удалить программное обеспечение, соответствующее идентификатору компоненты." +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Роботы" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Ролевые" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Запустите '%s --help' чтоб увидеть полный список доступных параметров " "командной строки." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Запустите \"%s --help\", чтобы увидеть список доступных команд и опций, или " +"\"%s %s --help\", чтобы увидеть список опций для конкретной команды." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Выполняемая микропрограмма" -msgid "Sample Screenshot URL" -msgstr "URL-адрес примера снимка экрана" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Сканирование" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Наука" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Поиск по базе данных компонентов." -msgid "Select a value for the provides-item which needs to be found." -msgstr "Выберите значение для «provides-item», которое необходимо найти." - -msgid "Show extra debugging information" -msgstr "Показывать дополнительную отладочную информацию" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Безопасность" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Показывать дополнительную отладочную информацию." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Показать версию программы." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Спортивные" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Стратегии" -msgid "Show the program version" -msgstr "Показать версию программы" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Подкоманды:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Сводка" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Сводка:" -msgid "The system metadata cache does not exist." -msgstr "Кэш метаданных системы не существует." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Мониторинг системы" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Эмуляторы терминала" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Текстовые редакторы" -msgid "The system metadata cache exists." -msgstr "Кэш метаданных системы существует." +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr ".desktop файл \"%s\" не существует." +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"Системный кэш AppStream был обновлён, однако обнаружены некоторые ошибки, " +"которые могут привести к повреждённым метаданным. Обратитесь к подробному " +"логу для информации." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "TYPE должен быть типом программного компонента, таким как: %s" + +#: tools/ascli-actions-mdata.c:446 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "Была ошибка при попытке найти дополнительную информацию: %s" +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"Тип программного компонента \"%s\" не является допустимым в AppStream. " +"Возможные значения:" -msgid "Tried to perform query on closed database." -msgstr "Попытка выполнения запроса из закрытой базы данных." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"Эта команда принимает опциональные аргументы TYPE и FILE, FILE является " +"файлом для вывода (или \"-\" для стандартного потока вывода)." + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Эта утилита позволяет читать, записывать, проверять и преобразовывать " +"метаданные AppStream в формате XML или YAML. Она также даёт доступ к " +"системному пулу метаданных, например, для запроса ПО, работающего с " +"определённым типом файлов, и его установки по идентификатору программного " +"компонента." + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "Не удаётся создать файл шаблона метаданных: %s" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Невозможно конвертировать файл: не удалось определить выходной формат, " +"пожалуйста, укажите его явно, используя \"--format=\"." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "Не удаётся найти компоненту, соответствующую %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Не удаётся найти компоненту, предоставляющую '%s;%s'!" +msgid "Unable to find component with ID '%s'!" +msgstr "Не удаётся найти компоненту с идентификатором \"%s\"!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Не удаётся найти компоненту с идентификатором '%s'!" +msgid "Unable to read the .desktop file: %s" +msgstr "Не удаётся прочитать файл .desktop: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "Не удаётся открыть кэш компонентов программного обеспечения AppStream." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Не удаётся сохранить файл шаблона метаданных: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Не удаётся запустить процесс менеджера пакетов: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." -msgstr "Не удаётся записать в '%s', невозможно установить файл метаинформации." +msgstr "" +"Не удаётся записать в \"%s\", невозможно установить файл метаинформации." + +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Неизвестная команда \"%s\"." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Использовать заданный файл .desktop, чтобы заполнить основные поля в файле " +"метаинформации." -msgid "Upstream metadata:" -msgstr "Метаданные Upstream:" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Утилиты" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "Проверить файлы XML AppStream на недостатки." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" "Проверить установленную иерархию файлов приложения на корректность " "метаданных." -msgid "Validation failed." -msgstr "Проверка прошла неудачно" +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Проверка прошла неудачно: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Проверка успешно пройдена." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "У нас есть информация о компонентах программного обеспечения %i." +msgid "Validation was successful: %s" +msgstr "Проверка успешно пройдена: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Значение элемента, который должен быть найден." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Векторная графика" +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XML файл меню XDG '%s' повреждён." +msgid "Version: %s" +msgstr "Версия: %s" +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Просмотрщики" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "У нас есть информация о %i компонентах программного обеспечения." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Веб-браузеры" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Текстовые процессоры" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Вы можете получить информацию об опциях команды, запустив её с параметром " +"\"--help\"." + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" "Для выполнения этого действия Вам могут понадобиться права администратора." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Вам необходимо указать тип программного компонента AppStream для генерации " +"шаблона. Возможные значения:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." -msgstr "Вам необходимо указать команду" +msgstr "Вам необходимо указать команду." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "Вам необходимо указать идентификатор компоненты." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Вам необходимо указать файл для проверки!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "Вам необходимо указать файл метаданных." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Вам необходимо указать корневой каталог для начала проверки!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Вам необходимо указать термин для поиска." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Вам необходимо указать входной и выходной файлы." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" -msgstr "app;application;package;program;programme;suite;tool" +msgstr "приложение;приложения;пакет;программа;программы;комплект;инструмент" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "ошибки: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "инфо: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "строгие: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "предупреждения: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Команда \"%s\" неизвестна." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Не использовать кэши при выполнении запроса." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Обновление кэша AppStream прошло неудачно." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "Пул данных AppStream был загружен, но некоторые метаданные были " +#~ "проигнорированы из-за ошибок." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "Не удается найти неизвестный тип компоненты." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Категории" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Категории" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Категории" + +#~ msgid "Extensions" +#~ msgstr "Расширения" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Файл %s не найден или доступ к нему запрещён!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Не найдены компоненты, предоставляющие '%s 1;%s 2'." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XML файл меню XDG '%s' повреждён." diff -Nru appstream-0.9.4/po/sk.po appstream-0.12.0/po/sk.po --- appstream-0.9.4/po/sk.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/sk.po 2018-04-04 15:53:56.000000000 +0000 @@ -8,209 +8,592 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Slovak (http://www.transifex.com/freedesktop/appstream/" -"language/sk/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-04-01 11:41+0000\n" +"Last-Translator: Matúš Baňas \n" +"Language-Team: Slovak \n" "Language: sk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"X-Generator: Weblate 2.20-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Typ poskytuje-položku (napr. lib, bin, python3, ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Príkaz „%s“" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D Grafika" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Činnosť" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Doplnky" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Dobrodružstvo" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Pri overovaní ukazovať aj nájdené drobnosti." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Typ položky (napr. lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Nástroj pre prácu s AppStream mataúdajmi" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "Textové používateľské rozhranie pre AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Verzia nástroja AppStream CLI: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Verzia nástroja AppStream pre textové používateľské rozhranie: %s\n" +"Verzia knižnice AppStream: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "Stav nástroja AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Aktualizácia vyrovnávacej pamäti AppStream bola úspešne dokončená." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Aktualizácia vyrovnávacej pamäte AppStream bola dokončená, ale niektoré " -"metadáta boli ignorované z dôvodu chýb." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Aktualizácia vyrovnávacej pamäte AppStream zlyhala." +"Aktualizácie vyrovnávacej pamäti AppStream sa nepodarila. Zapnite výrečnejší " +"režim, z ktorého dostanete podrobnejšie informácie." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "Aktualizácia vyrovnávacej pamäte nástroja AppStream nie je potrebná." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Rozhranie príkazového riadku AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"Vyrovnávacia pamäť softvérovej súčasti AppStreamu nebola nájdená. Toto môže " -"znamenať, že AppStream nebol nainštalovaný správne, alebo že vaša " -"distribúcia neposkytuje žiadne metaúdaje pre AppStream." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream je štandard pre poskytovanie metaúdajov o programovom vybavení, " +"používaný cez linuxové distribúcie." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" +"Systémová vyrovnávacia pamäť AppStream bola aktualizovaná, ale boli zistené " +"problémy: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "Verzia nástroja AppStream CLI: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arkáda" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Umelá inteligencia" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronómia" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronómia" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Zvuk a video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Vytváranie a úprava zvuku" +#: src/as-provided.c:147 msgid "Binaries" -msgstr "Binárne súbory" +msgstr "Spustiteľné súbory" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Bloky" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Stolové" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Balík" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "Umiestnenie vyrovnávacej pamäte „%s“ nie je zapisovateľné." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalendár" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +"Nepodarilo sa skopírovať „%s“: Súbor nemá príponu „.metainfo.xml“ alebo " +"„appdata.xml“." +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kartové" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategórie" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Príkaz „%s“ je neznámy." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Okamžitá textová komunikácia" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Chémia" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Chémia" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodeky" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Komunikácia a novinky" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Súčasť" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "Komponent „%s“ nemá kandidáta na inštaláciu." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Povinné pre" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Prevádza z XML na YAML formát a obrátene." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Nie je možné nájsť komponent poskytujúci „%s;%s“." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Vytvoriť šablónu pre metainfo súbor (pre vyplnenie v upstream projektu)." + +#: src/as-provided.c:161 msgid "DBus Session Services" -msgstr "Služby relácie zbernice DBus" +msgstr "Služby relácie DBus" +#: src/as-provided.c:159 msgid "DBus System Services" -msgstr "Služby systému zbernice DBus" +msgstr "Služby relácie systému DBus" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Databáza" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Ladiace nástroje" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL predvolenej snímky obrazovky" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Predvolený metaúdajoví formát (platné hodnoty sú „xml“ a „yaml“)." +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Popis" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Vývojár" -msgid "Display various information about installed AppStream metadata." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Nástroje pre vývojárov" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Zobraziť stavové informácie o dostupných AppStream metaúdajoch." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Metaúdaje distribúcie:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Nepoužije vyrovnávaciu pamäť Xapian pri vykonávaní požiadavky" - -msgid "Don't show colored output" -msgstr "Nebude zobrazovať farebný výstup" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Nepoužívať sieť." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Nezobrazovať farebný výstup." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" +msgstr "Vypísať surové XML metaúdaje súčasti s týmto identifikátorom." + +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Výuka" +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Prázdne." -msgid "Enforce a cache refresh" -msgstr "Vynúti aktualizáciu vyrovnávacej pamäte" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulátory" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Vynútiť aktualizáciu vyrovnávacej pamäte." -msgid "Extends" -msgstr "" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Chyba pri načítaní fondu metaúdajov: %s" -msgid "Extensions" -msgstr "Rozšírenia" +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Rozširuje" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Súbor %s nebol nájdený alebo bolo zamietnuté oprávnenie." +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Zaujímavé" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Zaujímavé" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Zaujímavé" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Zaujímavé" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Zaujímavé" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Zaujímavé" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Zaujímavé" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Zaujímavé" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Zaujímavé" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Súborový systém" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Financie" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Nainštalovaný firmvér" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Písma" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "Písma" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Nájdené %i súčasti v umiestneniach, ako sa už nové nepoužívajú." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Nájdené %i súčastí." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Hry" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "Získa komponenty, ktoré poskytujú zadanú položku." +msgstr "Získať komponenty, ktoré poskytujú zadanú položku." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "Získa informácie o komponente podľa jeho ID." +msgstr "Získať informácie o komponente podľa jeho identifikátora." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafika a fotografie" +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Domovská stránka" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Integrované vývojové prostredie" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ikona" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Sady ikôn" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identifikátor" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Vstupné zdroje" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." -msgstr "" +msgstr "Nainštalovať súbor s metaúdajmi na správne miesto." -msgid "Install software matching the component-id." -msgstr "Nainštaluje softvér zhodujúci sa s položkou component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Nainštalovať softvér zodpovedajúci identifikátoru súčasti." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "Vybratý neplatný typ pre poskytnutú položku. Platné hodnoty sú:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Detské" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Jazykové balíky" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Jazyky" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Knižnice" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licencia" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Preklady" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logické" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "MIME typy" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Vytvárať požiadavky bez použitia vyrovnávacej pamäte." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Ručne nastavené umiestnenie vyrovnávacej pamäte AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." msgstr "" -"Ručne nastaví umiestnenie metaúdajov AppStream na znovuvytvorenie " +"Ručne nastavené umiestnenie metaúdajov AppStream na znovu vytvorenie " "vyrovnávacej pamäte." -msgid "Manually set the location of the AppStream cache" -msgstr "Ručne nastaví umiestnenie vyrovnávacej pamäte AppStream." - -msgid "Mimetypes" -msgstr "Typy MIME" +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematika" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematika" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Súbor s metaúdajmi „%s“ neexistuje." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Súbory s metaúdajmi obsahujú chyby:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Súbory s metainfomáciami:" +#: src/as-provided.c:153 msgid "Modaliases" -msgstr "Modaliasy" +msgstr "Alternatívne názvy modulov" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Prehrávače hudby" +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Názov" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Novinky" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Nebola nájdená súčasť zodpovedajúca „%s“." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "Nebol nájdený komponent poskytujúci „%s;%s“." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "Žiadne ikony." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -218,160 +601,454 @@ "Nenašiel sa vhodný CLI správca balíkov. Prosím, uistite sa, že máte " "dostupného napr. klienta „pkcon“ (je súčasťou nástroja PackageKit)." -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "Nebola definovaná hodnota položky, ktorá sa má hľadať." +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Kancelár" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Príkaz „%s“ je neznámy." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Balík" -msgid "Print detailed output about found components" -msgstr "Vypíše podrobnosti o nájdených súčastiach" - -msgid "Print even pedantic hints when validating" -msgstr "Vypíše ešte podrobnejšie rady pri overovaní" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografie" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Vytlačiť podrobnosti o nájdených súčastiach." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Skupina projektu" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Poskytované položky" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (verzia 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Znovu zostaví vyrovnávaciu pamäť informácií o komponentoch." - -msgid "Remove software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Znovu vytvoriť súčasť vyrovnávacej pamäti metaúdajov." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Odobrať softvér zodpovedajúci identifikátora súčasti." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotika" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "RPG" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Spustením „%s --help“ zobrazíte úplný zoznam dostupných volieb príkazového " "riadka." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Spustením „%s --help“ zobrazíte úplný zoznam dostupných volieb príkazového " +"riadka a možností, a „%s %s --help“ tých pre konkrétny rozdieloví príkaz." + +#: src/as-provided.c:163 msgid "Runtime Firmware" -msgstr "Firmvér rozhrania" +msgstr "Dočasne nahrávaný firmware" -msgid "Sample Screenshot URL" -msgstr "Vzorový URL snímky obrazovky" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Skenovanie" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Veda" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "Vyhľadá databázu komponentov." - -msgid "Select a value for the provides-item which needs to be found." -msgstr "Vyberte hodnotu položky provides-item, ktorú treba nájsť." +msgstr "Prehľadať databázu komponentov." -msgid "Show extra debugging information" -msgstr "Zobrazí ladiace informácie naviac" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Zabezpečenie" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Zobrazovať doplňujúce informácie pre ladenie." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Zobraziť verziu programu." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Športy" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Stratégie" -msgid "Show the program version" -msgstr "Zobrazí verziu programu" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" -msgstr "Podpríkazy" +msgstr "Čiastkové príkazy:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Zhrnutie" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Zhrnutie:" -msgid "The system metadata cache does not exist." -msgstr "Systémová vyrovnávacia pamäť metaúdajov neexistuje." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Monitorovanie systému" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emulátory terminálu" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Textové editory" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Súbor .desktop pre „%s“ neexistuje." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"Vyrovnávacia pamäť systému AppStream bola aktualizovaná, ale boli zistené " +"niektoré chyby, čo môže viesť k chýbajúcim metaúdajom. Podrobnejšie " +"informácie nájdete v podrobnejšom zázname udalostí." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" +"Je potrebné, aby TYPE (typ) bol platný typ komponentu, ako napríklad: %s" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"Typ „%s“ softvérovej súčasti nie je platný pre AppStream. Možné hodnoty sú:" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"Tento príkaz prijíma voliteľné pozičné parametre TYPE (typ) a FILE (súbor), " +"kde FILE je súbor do ktorého je potrebné zapísať (alebo '-' pre štandardný " +"výstup)." -msgid "The system metadata cache exists." -msgstr "Systémová vyrovnávacia pamäť metaúdajov existuje." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Tento nástroj umožňuje čítanie, zápis, overovanie a premenu AppStream XML " +"alebo Yamli metaúdajov. Tiež sprístupňuje systémový fond metaúdajov " +"napríklad pre dotazovanie sa na softvér, poskytujúci konkrétny MIME typ a " +"jeho inštaláciu na základe identifikátora softvérovej súčasti." +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "Vyskytla sa chyba pri hľadaní dodatočných informácií: %s" +msgid "Unable to build the template metainfo file: %s" +msgstr "Nepodarilo sa vytvoriť súbor so šablónou metainfomacií: „%s“" -msgid "Tried to perform query on closed database." -msgstr "Bol uskutočnený pokus o vykonanie požiadavky na zavretú databázu." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Nedarí sa previesť súbor: Nepodarilo sa zistiť výstupný formát, nastavte ho " +"výslovne pomocou prepínača '--format'." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "Nie je možné nájsť súčasť zodpovedajúcu %s!" +msgstr "Nepodarilo sa nájsť súčasť zodpovedajúcu %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Nie je možné nájsť komponent poskytujúci „%s;%s“!" +msgid "Unable to find component with ID '%s'!" +msgstr "Nepodarilo sa nájsť súčasť s identifikátorom „%s“!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Nie je možné nájsť súčasť s ID „%s“!" +msgid "Unable to read the .desktop file: %s" +msgstr "Nepodarilo sa načítať .desktop súbor: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" -"Nie je možné otvoriť vyrovnávaciu pamäť softvérového komponentu nástroja " -"AppStream." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Nepodarilo sa uložiť súbor s metainfomáciami šablóny: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "Nie je možné spustiť správcu balíkov: %s" +msgstr "Nepodarilo sa spustiť správcu balíkov: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" +"Nedarí sa zapisovať do „% s“, preto nie je možné nainštalovať súbor s " +"metainformáciami." + +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Neznámi príkaz „%s“." -msgid "Upstream metadata:" +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +"Použiť daný .desktop súbor pre vyplnenie základných hodnôt do súboru s " +"metainformáciami." +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Nástroje" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." -msgstr "" +msgstr "Overiť či XML AppStream súbor neobsahuje chyby." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" +"Overiť či nainštalovaný strom súborov programu obsahuje platné metaúdaje." -msgid "Validation failed." -msgstr "Overenie zlyhalo." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Overenie zlyhalo: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Overenie bolo úspešné." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "Overenie bolo úspešné: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Hodnota položky, ktorá by sa mala nájsť." +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vektorová grafika" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Verzia: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Diváci" + +#: tools/ascli-actions-misc.c:151 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XML súbor XDG Menu „%s“ je poškodený." +msgid "We have information on %i software components." +msgstr "Je k dispozícii informácie o %i softvérovej súčasti." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Webové prehliadače" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Textový procesor" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Informácie o prepínačoch pre konkrétne čiastkové príkazy obdržíte pripojením " +"'--help' (nápoveda) k čiastkovému príkazu." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" -"Na vykonanie tejto akcie možno budete musieť mať oprávnenia administrátora." +"Na vykonanie tejto akcie možno budete potrebovať oprávnenia administrátora " +"systému." + +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Aby bolo možné vytvoriť šablónu, je potrebné zadať typ softvérovej súčasti " +"AppStream. Možné hodnoty sú:" +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Musíte uviesť príkaz." -msgid "You need to specify a component-id." -msgstr "Musíte uviesť ID súčasti." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Musíte uviesť identifikátor súčasti." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "Musíte uviesť súbor, ktorý chcete overiť." +msgstr "Musíte uviesť súbor, ktorý chcete overiť!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "Musíte určiť súbor metaúdajov." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Na zahájenie overovania musíte určiť koreňový adresár!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Musíte uviesť, čo chcete hľadať." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Musíte určiť súbor metaúdajov." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;aplikácia;balík;program;balík;nástroj" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "chyby: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "informácie: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "drobnosti: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "varovania: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Príkaz „%s“ je neznámy." + +#, fuzzy +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Nepoužije vyrovnávaciu pamäť Xapian pri vykonávaní požiadavky" + +#~ msgid "AppStream cache update failed." +#~ msgstr "Aktualizácia vyrovnávacej pamäte AppStream zlyhala." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategórie" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategórie" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategórie" + +#~ msgid "Extensions" +#~ msgstr "Rozšírenia" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Súbor %s nebol nájdený alebo bolo zamietnuté oprávnenie." + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Nebol nájdený komponent poskytujúci „%s;%s“." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XML súbor XDG Menu „%s“ je poškodený." diff -Nru appstream-0.9.4/po/sl.po appstream-0.12.0/po/sl.po --- appstream-0.9.4/po/sl.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/sl.po 2018-04-04 15:53:56.000000000 +0000 @@ -7,10 +7,10 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2016-08-15 18:48+0000\n" +"Last-Translator: Matthias Klumpp \n" "Language-Team: Slovenian (http://www.transifex.com/freedesktop/appstream/" "language/sl/)\n" "Language: sl\n" @@ -20,348 +20,999 @@ "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" "%100==4 ? 2 : 3);\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Vrste ponuja-element (npr. lib, bin, python3 ...)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "" + +#: src/as-category.c:168 +#, fuzzy +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Kategorije" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "" + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Posodobitev predpomnilnika AppStream uspešno dokončana." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Posodobitev predpomnilnika AppStream je zaključena, del metapodatkov pa je " -"bil zaradi napak prezrt." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Posodobitev predpomnilnika AppStream je spodletela." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" msgstr "" +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Sveženj" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." +msgstr "" + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" msgstr "" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategorije" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Ukaz »%s« ni znan." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "" +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" + +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Obvezno za" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, fuzzy, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Komponente z id »%s« ni mogoče najti!" + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "" + +#: tools/ascli-utils.c:340 +#, fuzzy +msgid "Default Screenshot URL" +msgstr "Vzorec naslova URL zaslonske slike" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Opis" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Razvijalec" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +#, fuzzy +msgid "Developer Tools" +msgstr "Razvijalec" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." msgstr "" -msgid "Don't show colored output" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +#, fuzzy +msgid "Don't show colored output." msgstr "Ne pokaži izpisa v barvah" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "" -msgid "Enforce a cache refresh" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +#, fuzzy +msgid "Enforce a cache refresh." msgstr "Vsili osvežitev predpomnilnika" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "" -msgid "Extensions" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Datoteke %s ni mogoče najti ali dostop zaradi pravic zavrnjen!" +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Domača stran" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ikona" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identifikator" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Dovoljenje" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" msgstr "" -"Ročno določite mesto metapodatkov AppStream za regeneracijo predpomnilnika" -msgid "Manually set the location of the AppStream cache" +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." msgstr "Ročno določite mesto predpomnilnika AppStream" -msgid "Mimetypes" +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "" +"Ročno določite mesto metapodatkov AppStream za regeneracijo predpomnilnika" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" msgstr "" +#: src/as-provided.c:153 msgid "Modaliases" msgstr "" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Ime" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Komponente, ki se ujema z »%s«, ni mogoče najti." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "" +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, fuzzy, c-format +msgid "Option '%s' is unknown." +msgstr "Ukaz »%s« ni znan." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paket" -msgid "Print detailed output about found components" -msgstr "Natisni podroben izpis o najdenih komponentah" - -msgid "Print even pedantic hints when validating" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" msgstr "" +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +#, fuzzy +msgid "Print detailed output about found components." +msgstr "Natisni podroben izpis o najdenih komponentah" + #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Projektna skupina" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Ponujeni elementi" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "" +#: src/as-provided.c:157 msgid "Python 3" msgstr "" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." msgstr "" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "" +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Zaženite »%s --help«, da se izpiše poln seznam možnosti ukazne vrstice." +#: tools/appstream-cli.c:187 +#, fuzzy, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Zaženite »%s --help«, da se izpiše poln seznam možnosti ukazne vrstice." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "" -msgid "Sample Screenshot URL" -msgstr "Vzorec naslova URL zaslonske slike" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "" -msgid "Select a value for the provides-item which needs to be found." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" msgstr "" -msgid "Show extra debugging information" +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +#, fuzzy +msgid "Show extra debugging information." msgstr "Pokaži dodatne podatke razhroščevanja" -msgid "Show the program version" +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +#, fuzzy +msgid "Show the program version." msgstr "Pokaži različico programa" -#. these are commands we can use with appstream-cli +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "" + +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Podukazi:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Povzetek" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "" -msgid "The system metadata cache does not exist." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" msgstr "" -msgid "The system metadata cache exists." +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" msgstr "" +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "" + +#: tools/ascli-actions-mdata.c:464 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "The .desktop file '%s' does not exist." msgstr "" -msgid "Tried to perform query on closed database." +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 #, c-format -msgid "Unable to find component matching %s!" -msgstr "Komponente, ki se ujema z %s, ni mogoče najti." +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" +#: tools/ascli-actions-mdata.c:446 #, c-format -msgid "Unable to find component providing '%s;%s'!" +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" + +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "Unable to find component with id '%s'!" +msgid "Unable to build the template metainfo file: %s" +msgstr "" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 +#, c-format +msgid "Unable to find component matching %s!" +msgstr "Komponente, ki se ujema z %s, ni mogoče najti." + +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 +#, fuzzy, c-format +msgid "Unable to find component with ID '%s'!" msgstr "Komponente z id »%s« ni mogoče najti!" -msgid "Unable to open the AppStream software component cache." +#: tools/ascli-actions-mdata.c:470 +#, c-format +msgid "Unable to read the .desktop file: %s" +msgstr "" + +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" msgstr "" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -msgid "Validation failed." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, fuzzy, c-format +msgid "Validation failed: %s" msgstr "Preverjanje je spodletelo." +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "" +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." +msgid "Validation was successful: %s" +msgstr "" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." msgstr "" +#: src/as-category.c:177 +#, fuzzy +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Kategorije" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "Datoteka XML menija XDG »%s« je okvarjena." +msgid "Version: %s" +msgstr "" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "" + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "" +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Navesti morate ukaz." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +#, fuzzy +msgid "You need to specify a component-ID." msgstr "Navesti morate id komponente." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Navesti morate datoteko za preverjanje!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Določiti morate pojem, ki ga iščete." +#: tools/ascli-actions-mdata.c:354 +#, fuzzy +msgid "You need to specify an input and output file." +msgstr "Navesti morate ukaz." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;aplikacija;paket;program;programček;programje;orodje" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Ukaz »%s« ni znan." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Posodobitev predpomnilnika AppStream je spodletela." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategorije" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategorije" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategorije" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Datoteke %s ni mogoče najti ali dostop zaradi pravic zavrnjen!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Komponente, ki se ujema z »%s«, ni mogoče najti." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "Datoteka XML menija XDG »%s« je okvarjena." diff -Nru appstream-0.9.4/po/sq.po appstream-0.12.0/po/sq.po --- appstream-0.9.4/po/sq.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/sq.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Albanian (http://www.transifex.com/freedesktop/appstream/" -"language/sq/)\n" -"Language: sq\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/sr@latin.po appstream-0.12.0/po/sr@latin.po --- appstream-0.9.4/po/sr@latin.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/sr@latin.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,372 +1,1025 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: -# Марко М. Костић (Marko M. Kostić) , 2015 # Miloš Popović , 2015 -# Мирослав Николић , 2014 +# Marko M. Kostić (Marko M. Kostić) , 2015 +# Miroslav Nikolić , 2014,2016 msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Serbian (Latin) (http://www.transifex.com/freedesktop/" -"appstream/language/sr@latin/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2017-05-05 11:18+0000\n" +"Last-Translator: Слободан Симић(Slobodan Simić) \n" +"Language-Team: Serbian (latin) \n" "Language: sr@latin\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Vrsta dostavljene stavke (npr. „lib“, „bin“, „python3“, ...)" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Izdanje komandne alatke Programskog toka: %s" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 2.14-dev\n" + +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "„%s“ naredba" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D grafika" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Radnja" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Dodaci" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Avantura" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +#, fuzzy +msgid "Also show pedantic hints." +msgstr "Izbacuje pedantne savete pri proveri." + +#: tools/appstream-cli.c:604 +#, fuzzy +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Tip stavke (npr. lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "CLI za Programski tok" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "Izdanje CLI za Programski tok: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "Stanje Programskog toka:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "Osvežavanje ostave Programskog toka je uspešno obavljeno." +msgstr "Osvežavanje keša Programskog toka je uspešno obavljeno." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Osvežavanje ostave Programskog toka je obavljeno, ali neki metapodaci su " -"zanemareni zbog grešaka." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Osvežavanje ostave Programskog toka nije uspelo." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "" +msgstr "Osvežavanje keša Programskog toka nije potrebno." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "Naredbeno sučelje Programskog toka" +msgstr "Sučelje komandne linije za Programski tok" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" -msgid "Binaries" +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" msgstr "" +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "Izdanje CLI za Programski tok: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arkadne" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Veštačka inteligencija" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomija" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomija" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Audio i video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Kreiranje i uređivanje zvuka" + +#: src/as-provided.c:147 +msgid "Binaries" +msgstr "Izvršni" + +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Blokovi" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Na tabli" + +#: tools/ascli-utils.c:286 msgid "Bundle" -msgstr "Paket" +msgstr "Komplet" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "" +msgstr "Lokacija keša „%s“ nije upisiva." + +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalendar" +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Karte" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategorije" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Naredba „%s“ nije poznata." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Ćaskanje" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Hemija" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Hemija" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodeci" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Komunikacije i vesti" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "" +msgstr "Komponenta „%s“ nema kandidata za instalaciju." +#: tools/ascli-utils.c:364 msgid "Compulsory for" -msgstr "Obavezujući za" +msgstr "Neophodan za" -msgid "DBus Session Services" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Pretvara zbirku XML u YAML ili obrnuto." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Ne mogu da nađem komponentu koja omogućava „%s::%s“." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." msgstr "" +#: src/as-provided.c:161 +msgid "DBus Session Services" +msgstr "D-Bus servisi sesije" + +#: src/as-provided.c:159 msgid "DBus System Services" +msgstr "D-Bus sistemski servisi" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Baze podataka" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Otklanjanje grešaka" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL podrazumevanog snimka ekrana" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." msgstr "" +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Opis" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Programer" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Programerske alatke" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Ne koristi keš Zapijana (Xapian) prilikom slanja zahteva" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "" -msgid "Don't show colored output" -msgstr "Ne prikazuje obojeni izlaz" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Ne prikazuj obojeni izlaz." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" +msgstr "Izbacuje sirove XML metapodatke za komponentu odgovarajućeg ID-a." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Obrazovanje" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." -msgstr "" +msgstr "Prazno." -msgid "Enforce a cache refresh" -msgstr "Primorava osvežavanje ostave" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulatori" -msgid "Extends" -msgstr "" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Primorava osvežavanje keša." -msgid "Extensions" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" msgstr "" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Nisam pronašao datoteku „%s“ ili su ovlašćenja odbijena!" +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Proširuje" + +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Izdvojeno" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Izdvojeno" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Izdvojeno" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Izdvojeno" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Izdvojeno" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Izdvojeno" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Izdvojeno" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Izdvojeno" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Izdvojeno" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Fajl sistem" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finansije" +#: src/as-provided.c:165 msgid "Flashed Firmware" -msgstr "" +msgstr "Flešovani firmver" +#: src/as-provided.c:151 msgid "Fonts" -msgstr "" +msgstr "Fontovi" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Fontovi" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Nađeno komponenti: %i." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Igre" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "" +msgstr "Dobavlja komponente koji omogućavaju datu stavku." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "" +msgstr "Dobavlja podatke o komponenti prema ID-u." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafika i fotografija" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Matična stranica" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Razvojna okruženja" + +#: tools/ascli-utils.c:288 msgid "Icon" -msgstr "Ikonica" +msgstr "Ikona" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Kompleti ikona" +#: tools/ascli-utils.c:282 msgid "Identifier" -msgstr "Odrednik" +msgstr "Identifikator" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Ulazni izvori" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:613 +#, fuzzy +msgid "Install software matching the component-ID." +msgstr "Instalira softver koji odgovara ID-u komponente." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "" +"Izabran je neispravan tip za dostavljenu stavku. Ispravne vrednosti su:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Dečije" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Jezički paketi" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Jezici" + +#: src/as-provided.c:145 msgid "Libraries" -msgstr "" +msgstr "Biblioteke" #. license +#: tools/ascli-utils.c:350 msgid "License" -msgstr "Dozvola" +msgstr "Licenca" + +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Lokalizacije" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logičke" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" +msgstr "Mime-tipovi" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." msgstr "" -"Ručno postavite mesto metapodataka Programskog toka za ponovno stvaranje " -"ostave" -msgid "Manually set the location of the AppStream cache" -msgstr "Ručno postavite mesto ostave Programskog toka" +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "Ručno postavlja mesto keša Programskog toka." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Ručno postavlja lokaciju metapodataka Programskog toka za obradu." -msgid "Mimetypes" +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematika" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematika" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." msgstr "" -msgid "Modaliases" +#: src/as-pool.c:758 +msgid "Metadata files have errors:" msgstr "" +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "" + +#: src/as-provided.c:153 +msgid "Modaliases" +msgstr "Modalijasi" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Muzički plejeri" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Naziv" -#, c-format -msgid "No component matching '%s' found." -msgstr "Nisam našao sastojak koji odgovara „%s“." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Vesti" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "" +msgid "No component matching '%s' found." +msgstr "Nisam našao komponentu koja se poklapa sa „%s“." +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Nema ikona." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" +"Nema odgovarajućeg menadžera paketa iz komandne linije. Proverite da je npr. " +"„pkcon“ dostupan (deo „PackageKit“)." -msgid "No value for the item to search for defined." -msgstr "" +#: tools/ascli-actions-mdata.c:203 +#, fuzzy +msgid "No value for the item to search for was defined." +msgstr "Nema vrednosti stavke za traženje definisanog." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Kancelarija" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Opcija „%s“ nije poznata." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paket" -msgid "Print detailed output about found components" -msgstr "Ispisuje opširni izlaz o nađenim sastojcima" - -msgid "Print even pedantic hints when validating" -msgstr "Prikaži najmanje sitnice prilikom potvrđivanja" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografija" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Ispisuje opširni izlaz o nađenim komponentama." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Grupa projekta" +#: tools/ascli-utils.c:392 msgid "Provided Items" -msgstr "Obezbeđene stavke" +msgstr "Omogućene stavke" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "" +msgstr "Python (ver. 2)" +#: src/as-provided.c:157 msgid "Python 3" -msgstr "" +msgstr "Python 3" -msgid "Rebuild the component information cache." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." msgstr "" -msgid "Remove software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:614 +#, fuzzy +msgid "Remove software matching the component-ID." +msgstr "Instalira softver koji odgovara ID-u komponente." +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotika" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Igranje uloge" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" -"Pokrenite „%s --help“ da vidite čitav spisak dostupnih opcija linije naredbi." +"Pokrenite „%s --help“ da vidite spisak dostupnih opcija komandne linije." -msgid "Runtime Firmware" +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." msgstr "" +"Pokrenite „%s --help“ da vidite spisak dostupnih naredbi i opcija i „%s%s --" +"help“ da vidite spisak opcija za tu pod-naredbu." -msgid "Sample Screenshot URL" -msgstr "Adresa uzorka snimka ekrana" - -msgid "Search the component database." -msgstr "" +#: src/as-provided.c:163 +msgid "Runtime Firmware" +msgstr "Runtime firmver" -msgid "Select a value for the provides-item which needs to be found." -msgstr "" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Skeniranje" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Nauka" -msgid "Show extra debugging information" -msgstr "Prikazuje dodatne podatke pročišćavanja" +#: tools/appstream-cli.c:601 +msgid "Search the component database." +msgstr "Pretražuje bazu podataka komponenti." -msgid "Show the program version" -msgstr "Prikazuje izdanje programa" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Bezbednost" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Prikazuje dodatne podatke za otkanjanje grešaka." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Prikazuje izdanje programa." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sport" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategija" -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Podnaredbe:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Sažetak" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Sažetak:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Nadgledanje sistema" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Emulatori terminala" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Uređivači teksta" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr ".desktop fajl „%s“ ne postoji." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" -msgid "The system metadata cache does not exist." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" msgstr "" -msgid "The system metadata cache exists." +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" + +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "Unable to build the template metainfo file: %s" msgstr "" -msgid "Tried to perform query on closed database." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "Ne mogu da pronađem sastojak koji odgovara „%s“!" +msgstr "Ne mogu da pronađem komponentu koja se poklapa sa „%s“!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" +msgid "Unable to find component with ID '%s'!" +msgstr "Ne mogu da pronađem komponentu sa ID „%s“!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Ne mogu da pronađem sastojak sa ib-om „%s“!" - -msgid "Unable to open the AppStream software component cache." +msgid "Unable to read the .desktop file: %s" msgstr "" +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Ne mogu da sačuvam fajl meta-info šablona: %s" + +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "" +msgstr "Ne mogu da podignem menadžer paketa: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." msgstr "" -msgid "Validate AppStream XML files for issues." +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Pomoćne alatke" + +#: tools/appstream-cli.c:610 +msgid "Validate AppStream XML files for issues." +msgstr "Potvrdite XML fajlove Programskog toka za problemima." + +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" +"Potvrdite instalirano stablo fajlova programa za ispravnim metapodacima." -msgid "Validation failed." -msgstr "Potvrđivanje nije uspelo." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Overavanje nije uspelo: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Potvrđivanje je uspelo." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." +msgid "Validation was successful: %s" +msgstr "Potvrđivanje je uspelo: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." msgstr "" +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vektorska grafika" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "IksML datoteka „%s“ IksDG izbornika je oštećena." +msgid "Version: %s" +msgstr "Verzija: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Pregledači" +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "" + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Web pregledači" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Obrada teksta" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +"Biće vam potrebna administratorska ovlašćenja za obavljanje ove radnje." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Morate da navedete naredbu." -msgid "You need to specify a component-id." -msgstr "Morate da navedete ib sastojka." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Morate da navedete ID komponente." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "Morate da navedete datoteku za potvrđivanje!" +msgstr "Morate da navedete fajl za potvrđivanje!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" -msgstr "Morate navesti fasciklu najvišeg nivoa za počinjanje potvrđivanja!" +msgstr "Morate navesti korenu fasciklu za počinjanje potvrđivanja!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Morate da navedete pojam za traženje." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Morate da navedete ulazni i izlazni fajl." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" -"app;application;package;program;programme;suite;tool;app;aplikacija;paket;" -"program;komplet;alat;aplikacija;komplet;alat" +"app;application;package;program;programme;suite;tool;app;апликација;пакет;" +"program;комплет;алат;aplikacija;komplet;alat;paket" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Naredba „%s“ nije poznata." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Ne koristi keš pri obradi zahteva." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Osvežavanje ostave Programskog toka nije uspelo." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategorije" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategorije" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategorije" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Nisam pronašao datoteku „%s“ ili su ovlašćenja odbijena!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Nisam našao sastojak koji odgovara „%s“." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "IksML datoteka „%s“ IksDG izbornika je oštećena." diff -Nru appstream-0.9.4/po/sr.po appstream-0.12.0/po/sr.po --- appstream-0.9.4/po/sr.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/sr.po 2018-04-04 15:53:56.000000000 +0000 @@ -9,371 +9,1019 @@ msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Serbian (http://www.transifex.com/freedesktop/appstream/" -"language/sr/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2017-04-29 20:03+0000\n" +"Last-Translator: Слободан Симић(Slobodan Simić) \n" +"Language-Team: Serbian \n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Врста достављене ставке (нпр. „lib“, „bin“, „python3“, ...)" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Издање командне алатке Програмског тока: %s" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 2.14-dev\n" + +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "„%s“ наредба" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3Д графика" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Радња" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Додатак" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Авантура" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +#, fuzzy +msgid "Also show pedantic hints." +msgstr "Избацује педантне савете при провери." + +#: tools/appstream-cli.c:604 +#, fuzzy +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Тип ставке (нпр. lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "ЦЛИ за Програмски ток" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "Издање ЦЛИ за Програмски ток: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "Стање Програмског тока:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "Освежавање оставе Програмског тока је успешно обављено." +msgstr "Освежавање кеша Програмског тока је успешно обављено." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Освежавање оставе Програмског тока је обављено, али неки метаподаци су " -"занемарени због грешака." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Освежавање оставе Програмског тока није успело." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." -msgstr "Освежавање оставе Програмског тока није потребно." +msgstr "Освежавање кеша Програмског тока није потребно." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" -msgstr "Наредбено сучеље Програмског тока" +msgstr "Сучеље командне линије за Програмски ток" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" msgstr "" -"Нисам нашао оставу састојка софтвера Програмског тока. Ово може да значи да " -"Програмски ток није подешен како треба, или да ваша дистрибуција не " -"обезбеђује никакве метаподатке Програмског тока" +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "Издање ЦЛИ за Програмски ток: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Аркадне" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Вештачка интелигенција" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Астрономија" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Астрономија" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Аудио и видео" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Креирање и уређивање звука" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Извршни" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Блокови" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "На табли" + +#: tools/ascli-utils.c:286 msgid "Bundle" -msgstr "Пакет" +msgstr "Комплет" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "Место оставе „%s“ није за уписивање." +msgstr "Локација кеша „%s“ није уписива." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Календар" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Карте" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Категорије" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Наредба „%s“ није позната." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Ћаскање" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Хемија" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Хемија" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Кодеци" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Комуникације и вести" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." -msgstr "Састојак „%s“ нема кандидата за инсталацију." +msgstr "Компонента „%s“ нема кандидата за инсталацију." +#: tools/ascli-utils.c:364 msgid "Compulsory for" -msgstr "Обавезујући за" +msgstr "Неопходан за" + +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Претвара збирку XML у YAML или обрнуто." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Не могу да нађем компоненту која омогућава „%s::%s“." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +#: src/as-provided.c:161 msgid "DBus Session Services" -msgstr "Услуге сесије Д-сабирнице" +msgstr "Д-Бус сервиси сесије" +#: src/as-provided.c:159 msgid "DBus System Services" -msgstr "Услуге система Д-сабирнице" +msgstr "Д-Бус системски сервиси" + +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Базе података" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Отклањање грешака" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "УРЛ подразумеваног снимка екрана" +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Опис" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Програмер" -msgid "Display various information about installed AppStream metadata." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Програмерске алатке" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." msgstr "" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Не користи кеш Запијана (Xapian) приликом слања захтева" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "" -msgid "Don't show colored output" -msgstr "Не приказује обојени излаз" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Не приказуј обојени излаз." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." -msgstr "Избацује сирове ИксМЛ метаподатке за састојак који одговара ИБ-у." +msgstr "Избацује сирове ИксМЛ метаподатке за компоненту одговарајућег ИД-а." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Образовање" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." -msgstr "" +msgstr "Празно." + +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Емулатори" -msgid "Enforce a cache refresh" -msgstr "Приморава освежавање оставе" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Приморава освежавање кеша." + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Проширује" -msgid "Extensions" -msgstr "Проширења" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Нисам пронашао датотеку „%s“ или су овлашћења одбијена!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Издвојено" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Издвојено" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Издвојено" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Издвојено" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Издвојено" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Издвојено" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Издвојено" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Издвојено" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Издвојено" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Фајл систем" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Финансије" +#: src/as-provided.c:165 msgid "Flashed Firmware" -msgstr "Преточени уграђени програм" +msgstr "Флешовани фирмвер" + +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Фонтови" +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" -msgstr "Словни ликови" +msgstr "Фонтови" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Нађено компоненти: %i." + +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Игре" +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "Добавите састојке који достављају дату ставку." +msgstr "Добавља компоненте који омогућавају дату ставку." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "Добавите податке о састојку према његовом ИБ-у." +msgstr "Добавља податке о компоненти према ИД-у." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Графика и фотографија" +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Матична страница" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Развојна окружења" + +#: tools/ascli-utils.c:288 msgid "Icon" -msgstr "Иконица" +msgstr "Икона" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Комплети икона" +#: tools/ascli-utils.c:282 msgid "Identifier" -msgstr "Одредник" +msgstr "Идентификатор" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Улазни извори" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "" -msgid "Install software matching the component-id." -msgstr "Инсталирајте софтвер који одговара иб-у састојка." +#: tools/appstream-cli.c:613 +#, fuzzy +msgid "Install software matching the component-ID." +msgstr "Инсталира софтвер који одговара ИД-у компоненте." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" -"Изабрана је неисправна врста за достављену ставку. Исправне вредности су:" +msgstr "Изабран је неисправан тип за достављену ставку. Исправне вредности су:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Дечије" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Језички пакети" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Језици" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Библиотеке" #. license +#: tools/ascli-utils.c:350 msgid "License" -msgstr "Дозвола" +msgstr "Лиценца" + +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Локализације" -msgid "Manually set the location of AppStream metadata for cache regeneration" +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Логичке" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" +msgstr "Миме-типови" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "Ручно поставља место кеша Програмског тока." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Ручно поставља локацију метаподатака Програмског тока за обраду." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Математика" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Математика" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." msgstr "" -"Ручно поставите место метаподатака Програмског тока за поновно стварање " -"оставе" -msgid "Manually set the location of the AppStream cache" -msgstr "Ручно поставите место оставе Програмског тока" +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "" -msgid "Mimetypes" -msgstr "Миме врсте" +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "" +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Модалијаси" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Музички плејери" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Назив" -#, c-format -msgid "No component matching '%s' found." -msgstr "Нисам нашао састојак који одговара „%s“." +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Вести" +#: tools/ascli-actions-mdata.c:179 #, c-format -msgid "No component providing '%s;%s' found." -msgstr "Нисам нашао састојак који обезбеђује „%s;%s“." +msgid "No component matching '%s' found." +msgstr "Нисам нашао компоненту која се поклапа са „%s“." +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Нема икона." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" -"Нисам нашао одговарајућу конзолу управника пакета. Уверите се да је доступан " -"нпр. „pkcon“ (део Пакетског комплета)." +"Нема одговарајућег менаџера пакета из командне линије. Проверите да је нпр. " +"„pkcon“ доступан (део „PackageKit“)." -msgid "No value for the item to search for defined." -msgstr "Нема вредности за ставку за тражење за одређене." +#: tools/ascli-actions-mdata.c:203 +#, fuzzy +msgid "No value for the item to search for was defined." +msgstr "Нема вредности ставке за тражење дефинисаног." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Канцеларија" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Опција „%s“ није позната." +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Пакет" -msgid "Print detailed output about found components" -msgstr "Исписује опширни излаз о нађеним састојцима" - -msgid "Print even pedantic hints when validating" -msgstr "Прикажи најмање ситнице приликом потврђивања" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Фотографија" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Исписује опширни излаз о нађеним компонентама." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Група пројекта" +#: tools/ascli-utils.c:392 msgid "Provided Items" -msgstr "Обезбеђене ставке" +msgstr "Омогућене ставке" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "Питон (2. издање)" +msgstr "Питон (вер. 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Питон 3" -msgid "Rebuild the component information cache." -msgstr "Поново изградите оставу података састојка." - -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." msgstr "" +#: tools/appstream-cli.c:614 +#, fuzzy +msgid "Remove software matching the component-ID." +msgstr "Инсталира софтвер који одговара ИД-у компоненте." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Роботика" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Играње улоге" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" -"Покрените „%s --help“ да видите читав списак доступних опција линије наредби." +"Покрените „%s --help“ да видите списак доступних опција командне линије." + +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Покрените „%s --help“ да видите списак доступних наредби и опција и „%s%s --" +"help“ да видите списак опција за ту под-наредбу." +#: src/as-provided.c:163 msgid "Runtime Firmware" -msgstr "Уграђени програм времена покретања" +msgstr "Рантајм фирмвер" -msgid "Sample Screenshot URL" -msgstr "Адреса узорка снимка екрана" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Скенирање" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Наука" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "Претражите базу података састојака." - -msgid "Select a value for the provides-item which needs to be found." -msgstr "Изаберите вредност за достављање ставке која треба да се нађе." +msgstr "Претражује базу података компоненти." -msgid "Show extra debugging information" -msgstr "Приказује додатне податке прочишћавања" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Безбедност" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Приказује додатне податке за откањање грешака." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Приказује издање програма." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Спорт" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Стратегија" -msgid "Show the program version" -msgstr "Приказује издање програма" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Поднаредбе:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Сажетак" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Сажетак:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Надгледање система" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Емулатори терминала" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Уређивачи текста" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr ".desktop фајл „%s“ не постоји." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" -msgid "The system metadata cache does not exist." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" msgstr "" -msgid "The system metadata cache exists." +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" + +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" +msgid "Unable to build the template metainfo file: %s" msgstr "" -msgid "Tried to perform query on closed database." -msgstr "Покушах да обавим упит над затвореном базом података." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" -msgstr "Не могу да пронађем састојак који одговара „%s“!" +msgstr "Не могу да пронађем компоненту која се поклапа са „%s“!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Не могу да нађем састојак који доставља „%s;%s“!" +msgid "Unable to find component with ID '%s'!" +msgstr "Не могу да пронађем компоненту са ИД „%s“!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Не могу да пронађем састојак са иб-ом „%s“!" +msgid "Unable to read the .desktop file: %s" +msgstr "" -msgid "Unable to open the AppStream software component cache." -msgstr "Не могу да отворим оставу састојка софтвера Програмског тока." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Не могу да сачувам фајл мета-инфо шаблона: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" -msgstr "Не могу да изродим управника пакета: %s" +msgstr "Не могу да подигнем менаџер пакета: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Помоћне алатке" + +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." -msgstr "Потврдите ИксМЛ датотеке Програмског тока за проблемима." +msgstr "Потврдите ИксМЛ фајлове Програмског тока за проблемиме." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" -"Потврдите инсталирано стабло датотека програма за исправним метаподацима." +"Потврдите инсталирано стабло фајлова програма за исправним метаподацима." -msgid "Validation failed." -msgstr "Потврђивање није успело." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Оверавање није успело: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Потврђивање је успело." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." +msgid "Validation was successful: %s" +msgstr "Потврђивање је успело: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." msgstr "" +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Векторска графика" + +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "ИксМЛ датотека „%s“ ИксДГ изборника је оштећена." +msgid "Version: %s" +msgstr "Верзија: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Прегледачи" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "" + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Веб прегледачи" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Обрада текста" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." -msgstr "Биће вам потребна овлашћења администратора за обављање ове радње." +msgstr "Биће вам потребна администраторска овлашћења за обављање ове радње." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Морате да наведете наредбу." -msgid "You need to specify a component-id." -msgstr "Морате да наведете иб састојка." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "Морате да наведете ИД компоненте." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" -msgstr "Морате да наведете датотеку за потврђивање!" +msgstr "Морате да наведете фајл за потврђивање!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" -msgstr "Морате навести фасциклу највишег нивоа за почињање потврђивања!" +msgstr "Морате навести корену фасциклу за почињање потврђивања!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Морате да наведете појам за тражење." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Морате да наведете улазни и излазни фајл." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" "app;application;package;program;programme;suite;tool;апп;апликација;пакет;" -"програм;комплет;алат;aplikacija;komplet;alat" +"програм;комплет;алат;aplikacija;komplet;alat;paket" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Наредба „%s“ није позната." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Не користи кеш при обради захтева." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Освежавање оставе Програмског тока није успело." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Категорије" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Категорије" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Категорије" + +#~ msgid "Extensions" +#~ msgstr "Проширења" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Нисам пронашао датотеку „%s“ или су овлашћења одбијена!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Нисам нашао састојак који обезбеђује „%s;%s“." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "ИксМЛ датотека „%s“ ИксДГ изборника је оштећена." diff -Nru appstream-0.9.4/po/sv.po appstream-0.12.0/po/sv.po --- appstream-0.9.4/po/sv.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/sv.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,210 +1,594 @@ -# SOME DESCRIPTIVE TITLE. +# Swedish translation of AppStream. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: -# Josef Andersson , 2015 -# sebras , 2015 +# sebras , 2015-2016. +# Josef Andersson , 2015, 2017. msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Swedish (http://www.transifex.com/freedesktop/appstream/" -"language/sv/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-28 23:34+0000\n" +"Last-Translator: Anders Jonsson \n" +"Language-Team: Swedish \n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.20-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "En tillhandahåller-objekt-typ (t.ex. lib, bin, python3, …)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "”%s”-kommando" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D-grafik" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Action" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Tillägg" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Äventyr" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Visa också pedantiska tips." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Ett objekts typ (t.ex. lib, bin, python3, …)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Ett verktyg för att jobba med AppStream-metadata" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream-CLI" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Version av AppStreams CLI-verktyg: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Version av AppStreams CLI-verktyg: %s\n" +"Version av AppStream-bibliotek: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" -msgstr "" +msgstr "AppStream-status:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Uppdatering av AppStreams cache färdig." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Uppdatering av cache färdig, men en del metadata ignorerades på grund av fel." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Uppdatering av AppStreams cache misslyckades." +"Misslyckades med uppdatering av AppStream-cache. Slå på utförligt läge för " +"att se detaljerad felinformation." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "Uppdatering av AppStream-cache behövs inte." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "AppStreams kommandoradsgränssnitt" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." msgstr "" +"AppStream är en multiplattform-specifikation för att tillhandahålla metadata " +"om programkomponenter." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "AppStream-cache uppdaterades, men det fanns problem: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream-version: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arkad" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Artificiell intelligens" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomi" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomi" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Ljud och video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Ljudskapande och redigering" +#: src/as-provided.c:147 msgid "Binaries" msgstr "Binärer" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Block" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Brädspel" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Bunt" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "" +msgstr "Cacheplats ”%s” är inte skrivbar." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Kalender" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" +"Kan inte kopiera ”%s”: Filen har inte ett ”.metainfo.xml” eller ”.appdata." +"xml”-suffix." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kort" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Kategorier" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Kommando ”%s” är okänt." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Chatt" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Kemi" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Kemi" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodekar" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Kommunikation och nyheter" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Komponent" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "Komponenten ”%s” har ingen installationskandidat." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Obligatorisk för" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Konvertera Collection XML till YAML eller tvärtom." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Kunde inte hitta komponent som tillhandahåller ”%s;%s”." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Skapa en mall för en metainfofil (att fyllas i av projektet uppströms)." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "DBus-sessionstjänster" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "DBus-systemtjänster" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Databas" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Felsökare" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "URL för exempelbild" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Standardmetadataformat (giltiga värden är ”xml” och ”yaml”)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Beskrivning" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Utvecklare" -msgid "Display various information about installed AppStream metadata." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Utvecklarverktyg" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Visa statusinformation om tillgänglig AppStream-metadata." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" -msgstr "" +msgstr "Distributionsmetadata:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Använd inte Xapian-cachen när begäran hanteras" - -msgid "Don't show colored output" -msgstr "Visa inte färgad utdata" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Använd inte nätverksåtkomst." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Visa inte färgad utdata." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" +msgstr "Dumpa rå XML-metadata för en komponent som matchar ID:t." -msgid "Empty." -msgstr "" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Utbildning" -msgid "Enforce a cache refresh" -msgstr "Tvinga en cache-uppdatering" +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 +msgid "Empty." +msgstr "Tom." -msgid "Extends" -msgstr "" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emulatorer" -msgid "Extensions" -msgstr "" +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Tvinga en cache-uppdatering." +#: tools/ascli-actions-misc.c:157 #, c-format -msgid "File %s not found or permission denied!" -msgstr "Filen %s inte hittad eller tillstånd nekat!" +msgid "Error while loading the metadata pool: %s" +msgstr "Fel vid inläsning av poolen för metadata: %s" + +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Utökar" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "I blickfånget" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "I blickfånget" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "I blickfånget" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "I blickfånget" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "I blickfånget" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "I blickfånget" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "I blickfånget" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "I blickfånget" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "I blickfånget" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Filsystem" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finans" + +#: src/as-provided.c:165 msgid "Flashed Firmware" -msgstr "Programmerad fastmjukvara" +msgstr "Programmerad fast programvara" + +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "Typsnitt" +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "Typsnitt" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Hittade %i komponenter i föråldrade sökvägar." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "Hittade %i komponenter." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Spel" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "" +msgstr "Hämta komponenter som tillhandahåller det angivna objektet." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "" +msgstr "Hämta information om en komponent givet dess ID." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafik och bilder" +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Webbplats" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Utvecklingsmiljöer" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Ikon" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Ikonuppsättningar" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Identifierare" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Indatakällor" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." -msgstr "" +msgstr "Installera en metadatafil på rätt plats." -msgid "Install software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." +msgstr "Installera programvara som matchar komponent-ID:t." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "Ogiltig typ vald för tillhandahållet objekt. Giltiga värden är:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Barn" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Språkpaket" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Språk" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Bibliotek" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Licens" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "Ange manuellt platsen för AppStream-metadata för cache-ombyggnad" - -msgid "Manually set the location of the AppStream cache" -msgstr "Ange manuellt platsen för AppStream-cachen" - -msgid "Mimetypes" -msgstr "Mime-typer" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Lokalisering" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Logik" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "MIME-typer" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Gör förfrågan utan någon cachning." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Manuellt angiven plats för AppStream-cache." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Manuellt angiven plats för AppStream-metadata att söka av." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematik" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematik" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Metadatafilen ”%s” existerar inte." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Metadatafilen har fel:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Metainfo-filer:" +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Mod-alias" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Musikspelare" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Namn" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Nyheter" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Hittade ingen komponent matchande ”%s”." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "Ingen komponent som tillhandahåller ”%s;%s” hittades." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Inga ikoner." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -212,157 +596,448 @@ "Inget lämpligt CLI för pakethanterare hittades. Säkerställ att t.ex. " "”pkcon” (en del av PackageKit) finns tillgänglig." -msgid "No value for the item to search for defined." -msgstr "Inget värdet för objektet att leta efter finns definierat." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." +msgstr "Inget värde för objektet att leta efter finns definierat." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Kontor" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Flaggan ”%s” är okänd." +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paket" -msgid "Print detailed output about found components" -msgstr "Skriv ut detaljerad utdata om hittade komponenter" - -msgid "Print even pedantic hints when validating" -msgstr "Skriv ut även pedantiska tips vid validering" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotografi" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Skriv ut detaljerad utdata om identifierade komponenter." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Projektgrupp" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Tillhandahållna objekt" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (Version 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Bygg om cachen för komponentmetadata." + +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." +msgstr "Ta bort programvara som matchar komponent-ID:t." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotar" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Rollspel" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Kör ”%s --help” för att se en fullständig lista över tillgängliga " "kommandoradsflaggor." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Kör ”%s --help” för att se en fullständig lista över tillgängliga " +"kommandoradsflaggor, och ”%s %s --help” för att se en lista över flaggor " +"specifika för detta underkommando." + +#: src/as-provided.c:163 msgid "Runtime Firmware" -msgstr "Fasmjukvara för körtid" +msgstr "Fast progmvara för körtid" -msgid "Sample Screenshot URL" -msgstr "URL för samplingsskärmbild" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Skanning" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Vetenskap" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" +msgstr "Sök i komponentdatabasen." -msgid "Show extra debugging information" -msgstr "Visa extra felsökningsinformation" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Säkerhet" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Visa extra felsökningsinformation." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Visa programversion." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Sport" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strategi" -msgid "Show the program version" -msgstr "Visa programversionen" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Subkommandon:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Summering" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" +msgstr "Sammanfattning:" + +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Systemövervakning" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Terminaler" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Textredigerare" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr ".desktop-filen ”%s” existerar inte." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." msgstr "" +"Appstreams systemcache uppdaterades, men en del fel identifierades och kan " +"leda till saknad metadata. Se den utförliga loggen för mer information." -msgid "The system metadata cache does not exist." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "TYP måste vara en giltig komponenttyp, så som: %s" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" msgstr "" +"Programvarukomponenttypen ”%s” är inte giltig i AppStream. Möjliga värden är:" -msgid "The system metadata cache exists." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." msgstr "" +"Detta kommando tar valfria positionsargument TYP och FIL, där FIL är en fil " +"att skriva till (eller \"-\" för standard ut)." + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Det här verktyget möjliggör läsning, skrivning, validering och " +"transformering av AppStream XML- eller YAML-metadata. Det ger också åtkomst " +"till systemmetadatapoolen för att till exempel söka efter program som " +"innehåller en specifik MIME-typ och installera den med dess " +"programidentifierare." +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" +msgid "Unable to build the template metainfo file: %s" +msgstr "Kunde inte bygga mallmetainfo-filen: %s" -msgid "Tried to perform query on closed database." -msgstr "Försökte utföra en förfrågan mot en stängd databas." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Kunde inte konvertera filen: Det går inte att bestämma utmatningsformatet, " +"sätt det explict med ”--format=”." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "Kunde inte hitta komponenten matchandes %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Kunde inte hitta komponent som tillhandahåller ”%s;%s”!" +msgid "Unable to find component with ID '%s'!" +msgstr "Kunde inte identifiera komponenten med id ”%s”!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Kunde inte hitta komponenten med id ”%s”!" +msgid "Unable to read the .desktop file: %s" +msgstr "Kunde inte läsa .desktop-filen: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "Kan inte öppna AppStreams programvarukomponentscache." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Kunde inte spara mallmetainfo-filen: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Kunde inte starta pakethanterare: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" +msgstr "Kunde inte skriva till ”%s”, kan inte installera metainfo-fil." -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Okänt kommando ”%s”." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +"Använd den givna .desktop-filen för att fylla i grundläggande värden i " +"metainfofilen." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Verktyg" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." -msgstr "" +msgstr "Genomsök AppStream XML-filer efter fel." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" +"Genomsök ett installerat filträd för ett program efter giltig metadata." -msgid "Validation failed." -msgstr "Validering misslyckades." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Misslyckades med validering: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." -msgstr "Valideringen var framgångsrik" +msgstr "Valideringen var framgångsrik." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "Valideringen var framgångsrik: %s" +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Värdet för objektet som borde hittas." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vektorgrafik" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Version: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Visare" + +#: tools/ascli-actions-misc.c:151 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XDG Menu XML-filen ”%s” är skadad." +msgid "We have information on %i software components." +msgstr "Vi har inte information om %i programvarukomponenter." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Webbläsare" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Ordbehandlare" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Du kan hitta information om specifika underordnade kommandon genom att " +"skicka in ”--help” till underkommandot." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." +msgstr "Du kan behöva superanvändarrättigheter för att utföra denna åtgärd." + +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" msgstr "" +"Du behöver ange en AppStream-programkomponenttyp för att generera en mall. " +"Möljiga värden är:" +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Du måste specificera ett kommando." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "Du måste specificera ett komponent-id." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Du måste specificera en fil att validera!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "Du måste ange en metadata-fil." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Du måste ange en rotkatalog för att påbörja valideringen!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Du måste specificera en term att söka efter." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Du måste ange en in- och utdatafil." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;program;paket;svit;verktyg" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "fel: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "Infos: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "pedantiska: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "varningar: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Kommando ”%s” är okänt." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Använd inte cachar när begäran hanteras." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Uppdatering av AppStreams cache misslyckades." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Kategorier" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Kategorier" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Kategorier" + +#~ msgid "Extensions" +#~ msgstr "Tillägg" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Filen %s inte hittad eller tillstånd nekat!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Ingen komponent som tillhandahåller ”%s;%s” hittades." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XDG Menu XML-filen ”%s” är skadad." diff -Nru appstream-0.9.4/po/ta.po appstream-0.12.0/po/ta.po --- appstream-0.9.4/po/ta.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/ta.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Tamil (http://www.transifex.com/freedesktop/appstream/" -"language/ta/)\n" -"Language: ta\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/te.po appstream-0.12.0/po/te.po --- appstream-0.9.4/po/te.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/te.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Telugu (http://www.transifex.com/freedesktop/appstream/" -"language/te/)\n" -"Language: te\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/th.po appstream-0.12.0/po/th.po --- appstream-0.9.4/po/th.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/th.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Thai (http://www.transifex.com/freedesktop/appstream/language/" -"th/)\n" -"Language: th\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/tr.po appstream-0.12.0/po/tr.po --- appstream-0.9.4/po/tr.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/tr.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,373 +1,1054 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: # Muhammet Kara , 2015-2016 # Necdet Yücel , 2014-2015 +# Çağatay Yiğit Şahin , 2017. msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-17 20:00+0000\n" -"Last-Translator: Muhammet Kara \n" -"Language-Team: Turkish (http://www.transifex.com/freedesktop/appstream/" -"language/tr/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2017-03-25 16:36+0000\n" +"Last-Translator: Muhammet Kara \n" +"Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Bir sağlanan-öge türü (lib, bin, python3 gibi)" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 2.12\n" +#: tools/appstream-cli.c:146 #, c-format -msgid "AppStream CLI tool version: %s" +msgid "'%s' command" +msgstr "'%s' komutu" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3B Grafikler" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Eylem" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Eklentiler" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Macera" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +#, fuzzy +msgid "Also show pedantic hints." +msgstr "Doğrularken detaylı ipuçlarını da yaz." + +#: tools/appstream-cli.c:604 +#, fuzzy +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Bir öge türü (ör. lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "AppStream üst verisiyle çalışmak için bir araç" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream CLI" + +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" msgstr "AppStream CLI araç sürümü: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "AppStream Durumu:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." -msgstr "AppStream bellek güncellemesi başarıyla tamamlandı." +msgstr "AppStream önbellek güncellemesi başarıyla tamamlandı." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"AppStream ön bellek güncellemesi tamamlandı ama bazı meta veriler hatalar " -"yüzünden yok sayıldı." - -#, c-format -msgid "AppStream cache update failed." -msgstr "AppStream ön bellek güncellemesi başarısız oldu." +"AppStream önbellek güncellemesi başarısız oldu. Daha detaylı sorun bilgisi " +"almak için ayrıntılı kipi etkinleştirin." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "AppStream önbellek güncellemesi gerekli değil." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "AppStream komut satırı arayüzü" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"AppStream yazılım bileşeni önbelleği bulunamadı. Bu, AppStream'in yanlış " -"şekilde kurulduğu ya da dağıtımınızın hiç bir AppStream üst verisi " -"sağlamadığı anlamına gelebilir." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream yazılım bileşenleri hakkında üst veri sağlayan dağıtımlararası bir " +"spesifikasyondur." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "AppStream sistem önbelleği güncellendi, ama sorunlar bulundu: %s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, fuzzy, c-format +msgid "AppStream version: %s" +msgstr "AppStream CLI araç sürümü: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Arcade" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Yapay Zeka" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Astronomi" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Astronomi" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Ses ve Video" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Ses Oluşturma ve Düzenleme" +#: src/as-provided.c:147 msgid "Binaries" msgstr "İkili Kodlar" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Bloklar" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Tahta" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Takım" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "Önbellek konumu '%s', yazılabilir değil." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Takvim" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"'%s' kopyalanamıyor: Dosyanın bir '.metainfo.xml' ya da '.appdata.xml' " -"uzantısı yok." +"'%s' kopyalanamadı: Dosya '.metainfo.xml' veya '.appdata.xml' sonekine sahip " +"değil." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Kart" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Sınıflandırmalar" -#, c-format -msgid "Command '%s' is unknown." -msgstr "'%s' komutu bilinmiyor." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Sohbet" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Kimya" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Kimya" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Kodekler" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "İletişim ve Haberler" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "'%s' bileşeninin hiçbir kurulum adayı yok." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Zorunlu" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Koleksiyon XML'ini YAML'e veya ters yönde dönüştür." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "'%s::%s' sağlayan bileşen bulunamadı." + +#: tools/appstream-cli.c:620 +#, fuzzy +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"(Üst akım proje tarafından dosyalanmak üzere) bir üst veri dosyası için bir " +"şablon oluştur." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "DBus Oturum Hizmetleri" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "DBus Sistem Hizmetleri" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "Veritabanı" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Hata Ayıklayıcılar" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Öntanımlı Ekran Görüntüsü Adresi" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +#, fuzzy +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "" +"Belirli üst veri formatına öntanımla (geçerli seçenekler 'xml' ve 'yaml'dir)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Tanımlama" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Geliştirici" -msgid "Display various information about installed AppStream metadata." -msgstr "Kurulu AppStream üst verisi hakkındaki çeşitli bilgileri görüntüleyin." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Geliştirici Araçları" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "" +"Kullanılabilir AppStream üst verileri hakkındaki durum bilgilerini göster." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Dağıtım üst verisi:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "İstekte bulunurken Xapian belleğini kullanma" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "" -msgid "Don't show colored output" -msgstr "Çıktıyı renklendirilmiş gösterme" +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Renklendirilmiş çıktı gösterme." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "Kimlik ile eşleşen bileşen için ham XML üst verisini dök." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Eğitim" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Boş." -msgid "Enforce a cache refresh" -msgstr "Ön belleğin yenilenmesini zorla" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Emülatörler" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Ön belleği yenilenmeye zorla." -msgid "Extends" -msgstr "" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Üst veri havuzunu yüklerken hata: %s" -msgid "Extensions" -msgstr "Uzantılar" +#: tools/ascli-utils.c:314 +msgid "Extends" +msgstr "Genişletir" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "%s dosyası bulunamadı veya izin verilmedi!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Öne Çıkan" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Öne Çıkan" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Öne Çıkan" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Öne Çıkan" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Öne Çıkan" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Öne Çıkan" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Öne Çıkan" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Öne Çıkan" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Öne Çıkan" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Dosya Sistemi" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Finans" +#: src/as-provided.c:165 msgid "Flashed Firmware" -msgstr "" +msgstr "Aygıt Yazılımı" +#: src/as-provided.c:151 msgid "Fonts" msgstr "Yazı Tipleri" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Yazı Tipleri" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." -msgstr "" +msgstr "Eski veriyollarında %i bileşen bulundu." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." -msgstr "" +msgstr "%i bileşen bulundu." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Oyunlar" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "" +msgstr "Verilen ögeyi sağlayan bileşenleri edinin." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." -msgstr "" +msgstr "Kimliğiyle bir bileşen hakkında bilgi edin." + +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Grafik ve Fotoğrafçılık" +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Web Sitesi" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Bütünleşik Geliştirme Ortamları" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Simge" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" -msgstr "" +msgstr "Simge Kümeleri" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Tanımlayıcı" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Girdi Kaynakları" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." -msgstr "" +msgstr "Bir üst veri dosyasını doğru konuma yükle." -msgid "Install software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:613 +#, fuzzy +msgid "Install software matching the component-ID." +msgstr "Bileşen kimliğiyle eşleşen yazılım yükle." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" +msgstr "Sağlanmış öge için geçersiz tip seçildi. Geçerli değerler:" + +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Çocuklar" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Dil Paketleri" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Diller" +#: src/as-provided.c:145 msgid "Libraries" msgstr "Kütüphaneler" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Lisans" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" -"Ön belleğin yeniden oluşturulması için AppStream meta verisinin konumunu " -"elle ayarlayın" - -msgid "Manually set the location of the AppStream cache" -msgstr "AppStream ön belleğinin konumunu elle ayarlayın" - -msgid "Mimetypes" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Yerelleştirme" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Mantık" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" msgstr "Mime Türleri" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "AppStream önbelleğinin konumunu elle ayarlayın." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Taranacak AppStream üst verisinin konumunu elle ayarlayın." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Matematik" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Matematik" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Üst veri dosyası '%s' bulunmuyor." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Üst veri dosyalarında hata var:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Üst veri dosyaları:" + +#: src/as-provided.c:153 msgid "Modaliases" -msgstr "" +msgstr "Modaliaslar" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Müzik Oynatıcılar" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "İsim" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Haber" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "'%s' ile eşleşen bileşen bulunamadı." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "'%s;%s' sağlayan hiçbir bileşen bulunamadı." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." -msgstr "" +msgstr "Simge yok." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." msgstr "" +"Uygun paket yöneticisi komut satırı arayüzü bulunamadı. Lütfen örneğin " +"\"pkcon\"un (PackageKit'in parçası) kullanılabilir olduğuna emin olun." -msgid "No value for the item to search for defined." -msgstr "" +#: tools/ascli-actions-mdata.c:203 +#, fuzzy +msgid "No value for the item to search for was defined." +msgstr "Aranacak öge için değer tanımlanmadı." + +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Ofis" +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "'%s' seçeneği bilinmiyor." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Paket" -msgid "Print detailed output about found components" -msgstr "Bulunan bileşenlerin ayrıntılı çıktılarını yazdır" - -msgid "Print even pedantic hints when validating" -msgstr "" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Fotoğrafçılık" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Bulunan bileşenler hakkında ayrıntılı çıktı yazdır." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Proje Grubu" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Sağlanan Ögeler" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (Sürüm 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Bileşen üst veri önbelleğini yeniden inşa et." + +#: tools/appstream-cli.c:614 +#, fuzzy +msgid "Remove software matching the component-ID." +msgstr "Bileşen kimliğiyle eşleşen yazılım kaldır." + +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Robotik" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Rol Yapma" +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Tüm komut satırı işlemlerini görmek için '%s --help' komutunu çalıştırın." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Kullanılabilir komutların ve seçeneklerin listesini görmek için '%s --" +"help'i, bu alt komuta özel seçeneklerin listesini görmek için '%s %s --" +"help'i çalıştırın." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Çalışma Zamanı Ürün Yazılımı" -msgid "Sample Screenshot URL" -msgstr "Örnek Ekran Görüntüsü Adresi" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Tarama" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Bilim" +#: tools/appstream-cli.c:601 msgid "Search the component database." -msgstr "" +msgstr "Bileşen veri tabanında arama yapın." -msgid "Select a value for the provides-item which needs to be found." -msgstr "" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Güvenlik" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Ek hata ayıklama bilgisi göster." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Program sürümünü göster." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Spor" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Strateji" -msgid "Show extra debugging information" -msgstr "Ek hata ayıklama bilgisi göster" - -msgid "Show the program version" -msgstr "Program sürümünü göster" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Alt komutlar:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Özet" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Özet:" -msgid "The system metadata cache does not exist." -msgstr "Sistem üst veri önbelleği mevcut değil." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Sistem Gözlemleme" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Uçbirim Emülatörleri" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Metin Düzenleyiciler" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr ".desktop dosyası '%s' bulunmuyor." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"AppStream sistem önbelleği güncellendi, ama eksik üst veriye yol açabilecek " +"bazı hatalar tespit edildi. Daha fazla bilgi için ayrıntılı günlüğe başvurun." -msgid "The system metadata cache exists." -msgstr "Sistem üst veri önbelleği mevcut." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "" +#: tools/ascli-actions-mdata.c:446 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "Ek bilgiler bulunmaya çalışılırken bir hata oluştu: %s" +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "Yazılım bileşen tipi '%s' AppStream'de geçerli değil. Olası değerler:" -msgid "Tried to perform query on closed database." -msgstr "Kapalı veri tabanı üzerinde sorgu yürütmeye çalışıldı." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" -#. TRANSLATORS: We failed to find any component in the database due to an error +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +#, fuzzy +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"Bu araç AppStream XML veya YAML üst verisi okumaya, yazmaya, doğrulamaya ve " +"dönüştürmeye izin verir. Aynı zamanda sistem üst veri havuzuna, örneğin " +"belirli bir mimetype'ı sağlayan yazılım aramak ve yazılım bileşen kimliğini " +"kullanarak yüklemek üzere, erişim sağlar." + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "Şablon metainfo dosyası inşa edilemedi: %s" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Dosya dönüştürülemedi: Çıktı formatı belirlenemedi, lütfen '--format=' " +"kullanarak belirtin." + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "%s ile eşleşen bileşen bulunamadı!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "'%s;%s' sağlayan bileşen bulunamadı!" +msgid "Unable to find component with ID '%s'!" +msgstr "'%s' kimliğine sahip bileşen bulunamadı!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "'%s' kimliğine sahip bileşen bulunamadı!" +msgid "Unable to read the .desktop file: %s" +msgstr ".desktop dosyası okunamadı: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "AppStream yazılım bileşeni önbelleği açılamadı." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Şablon üst bilgi dosyası kaydedilemedi: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Paket yöneticisi meydana getirilemiyor: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "'%s'e yazılamadı, üst bilgi dosyası kurulamıyor." -msgid "Upstream metadata:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." msgstr "" -msgid "Validate AppStream XML files for issues." +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +#, fuzzy +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." msgstr "" +"Metainfo dosyasındaki basit değerleri doldurmak için belirli .desktop " +"dosyasını kullan." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Araçlar" +#: tools/appstream-cli.c:610 +msgid "Validate AppStream XML files for issues." +msgstr "AppStream XML dosyalarını sorunlar için doğrula." + +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" +"Bir uygulamanın yüklenmiş dosya ağacını geçerli üst veri için doğrulayın." -msgid "Validation failed." -msgstr "Doğrulama başarısız." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Doğrulama başarısız: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Doğrulama işlemi tamamlandı." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 #, c-format -msgid "We have information on %i software components." -msgstr "" +msgid "Validation was successful: %s" +msgstr "Doğrulama işlemi tamamlandı: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Bulunması gereken ögenin değeri." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Vektörel Grafik" +#: tools/ascli-actions-misc.c:46 #, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XDG Menü XML dosyası '%s' hasar görmüş." +msgid "Version: %s" +msgstr "Sürüm: %s" +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Görüntüleyiciler" + +#: tools/ascli-actions-misc.c:151 +#, c-format +msgid "We have information on %i software components." +msgstr "%i yazılım bileşeni hakkındaki bilgilere sahibiz." + +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Web Tarayıcıları" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Kelime İşlemci" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Alt komuta \"--help\" vererek alt komuta özel seçenekler hakkında bilgi " +"bulabilirsiniz." + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "" +"Bu eylemi gerçekleştirmek için yetkili kullanıcı izinlerine ihtiyaç " +"duyabilirsiniz." + +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Bir şablon oluşturmak için bir AppStream yazılım bileşeni tipi " +"sağlamalısınız. Olası değerler:" +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Bir komut belirtmelisiniz." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "Bir bileşen kimliği belirtmelisiniz." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Doğrulamak için bir dosya belirtmelisiniz!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." -msgstr "" +msgstr "Bir üst veri dosyası belirtmeniz gerekiyor." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Doğrulamayı başlatmak için bir kök dizini belirtmelisiniz!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Arama için bir terim belirtmelisiniz." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Bir girdi ve bir çıktı dosyası belirtmelisiniz." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "app;uygulama;paket;program;program;takım;araç" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "hatalar: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "bilgiler: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "detaylı: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "uyarılar: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "'%s' komutu bilinmiyor." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Talebi yerine getirirken herhangi bir önbellek kullanma." + +#~ msgid "AppStream cache update failed." +#~ msgstr "AppStream ön bellek güncellemesi başarısız oldu." + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "Sınıflandırmalar" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "Sınıflandırmalar" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "Sınıflandırmalar" + +#~ msgid "Extensions" +#~ msgstr "Uzantılar" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "%s dosyası bulunamadı veya izin verilmedi!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "'%s;%s' sağlayan hiçbir bileşen bulunamadı." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XDG Menü XML dosyası '%s' hasar görmüş." diff -Nru appstream-0.9.4/po/uk.po appstream-0.12.0/po/uk.po --- appstream-0.9.4/po/uk.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/uk.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,220 +1,596 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: -# Yuri Chornoivan , 2014-2016 +# Yuri Chornoivan , 2014-2016. msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-12 04:59+0000\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-03-29 04:53+0000\n" "Last-Translator: Yuri Chornoivan \n" -"Language-Team: Ukrainian (http://www.transifex.com/freedesktop/appstream/" -"language/uk/)\n" +"Language-Team: Ukrainian \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "Тип запису provides (наприклад lib, bin, python3, ...)" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 2.20-dev\n" + +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "Команда «%s»" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "Тривимірна графіка" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "Бойові ігри" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "Додатки" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "Пригоди" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "Також виводити підказки щодо найдрібніших неточностей." + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "Тип запису (наприклад lib, bin, python3, ...)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "Інструмент для обробки метаданих AppStream" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "Командний рядок AppStream" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "Версія інструмента командного рядка AppStream: %s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"Версія інструмента командного рядка AppStream: %s\n" +"Версія бібліотеки AppStream: %s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "Стан AppStream:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "Оновлення кешу AppStream успішно завершено." +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." msgstr "" -"Оновлення кешу AppStream завершено, але деякі метадані було проігноровано " -"через помилки." - -#, c-format -msgid "AppStream cache update failed." -msgstr "Спроба оновити кеш AppStream зазнала невдачі." +"Не вдалося оновити кеш AppStream. Докладніші пояснення щодо проблеми можна " +"отримати після вмикання режиму докладних повідомлень." +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "Оновлення кешу AppStream непотрібне." +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "Інтерфейс командного рядка AppStream" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"Не знайдено кешу компонентів програмного забезпечення AppStream. Це може " -"означати, що AppStream налаштовано некоректним чином або у дистрибутиві не " -"передбачено надання метаданих AppStream." +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "" +"AppStream — багатоплатформова специфікація надання метаданих щодо " +"компонентів програмного забезпечення." + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "Кеш системи AppStream оновлено, але виявлено проблеми: %s" +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "Версія AppStream: %s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "Аркади" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "Штучний інтелект" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "Астрономія" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "Астрономія" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "Звук і відео" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "Створення і редагування звукових даних" + +#: src/as-provided.c:147 msgid "Binaries" msgstr "Двійкові файли" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "Кубики" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "Ігри на дошці" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "Кортеж" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "Запис до адреси каталогу кешу, «%s», неможливий." +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "Календарі" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." +"suffix." msgstr "" -"Не вдалося скопіювати «%s»: назва файла не має суфікса «.metainfo.xml» або «." -"appdata.xml»." +"Не вдалося скопіювати «%s»: назва файла не містить суфікса «.metainfo.xml» " +"або «'.appdata.xml»." + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "Карткові ігри" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "Категорії" -#, c-format -msgid "Command '%s' is unknown." -msgstr "Невідома команда «%s»." +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "Спілкування" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "Хімія" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "Хімія" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "Кодеки" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "Спілкування і новини" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "Компонент" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "Для компонента «%s» немає кандидата для встановлення." +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "Обов’язкове для" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "Перетворити XML збірки на YAML або навпаки." + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "Не вдалося знайти компонент, що містить «%s::%s»." + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "" +"Створити шаблон файла метаінформації (для заповнення у основному проекті)." + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "Служби сеансів DBus" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "Служби системи DBus" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "База даних" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "Засоби діагностики" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "Адреса типового знімка вікна" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "Типовий формат метаданих (коректними є значення «xml» і «yaml»)." + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "Опис" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "Розробник" -msgid "Display various information about installed AppStream metadata." -msgstr "Вивести різноманітні дані щодо встановлених метаданих AppStream." +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "Інструменти розробника" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "Вивести дані щодо стану доступних метаданих AppStream." +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "Метадані дистрибутива:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "Не використовувати кеш Xapian під час виконання запиту" - -msgid "Don't show colored output" -msgstr "Не розфарбовувати виведені дані" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "Не використовувати доступ до мережі." + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "Не розфарбовувати виведені дані." +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "" "Створити дамп необроблених метаданих XML для компонента з відповідним " "ідентифікатором." +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "Освіта" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "Порожньо." -msgid "Enforce a cache refresh" -msgstr "Примусове оновлення кешу" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "Імітатори" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "Примусове оновлення кешу." +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "Помилка під час спроби завантаження сховища метаданих: %s" + +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "Розширення" -msgid "Extensions" -msgstr "Розширення" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "Файл %s не знайдено або доступ до нього заборонено!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "Рекомендовані" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "Рекомендовані" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "Рекомендовані" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "Рекомендовані" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "Рекомендовані" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "Рекомендовані" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "Рекомендовані" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "Рекомендовані" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "Рекомендовані" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "Файлова система" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "Фінанси" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "Записувані мікропрограми" +#: src/as-provided.c:151 msgid "Fonts" msgstr "Шрифти" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "Шрифти" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "За застарілими шляхами знайдено %i компонентів." +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "Знайдено %i компонентів." +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "Ігри" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "Отримати компоненти, які надають вказаний запис." +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "Отримати інформацію щодо компонента за його ідентифікатором." +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "Графіка і фотомистецтво" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "Домашня сторінка" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "Інтегровані середовища розробки (IDE)" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "Піктограма" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "Набори піктограм" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "Ідентифікатор" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "Вхідні коди" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "Встановити файл метаданих у належному місці." -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "" "Встановити програмне забезпечення, що відповідає ідентифікатору компонента." +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "Вибрано некоректний тип для запису «provided». Коректні значення:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "Для дітей" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "Пакунки перекладів" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "Мови" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "Бібліотеки" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "Ліцензія" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" -"Встановити розташування метаданих AppStream для повторного створення кешу" - -msgid "Manually set the location of the AppStream cache" -msgstr "Встановити розташування кешу AppStream вручну" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "Локалізація" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "Логічні ігри" -msgid "Mimetypes" +#: src/as-provided.c:149 +msgid "MIME types" msgstr "Типи MIME" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "Виконати запит без будь-якого кешування." + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "Встановити вручну розташування кешу AppStream." + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "Встановити вручну розташування метаданих AppStream для сканування." + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "Математика" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "Математика" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "Файла метаданих «%s» не існує." + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "Помилки у файлах метаданих:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "Файли metainfo:" + +#: src/as-provided.c:153 msgid "Modaliases" msgstr "Альтернативні режими" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "Музичні програвачі" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "Назва" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "Новини" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "Не знайдено компонентів, що відповідали б запиту «%s»." -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "Не знайдено компонента, що містить «%s;%s»." - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "Немає піктограм." +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -222,160 +598,459 @@ "Не знайдено відповідного засобу керування пакунками з командного рядка. Будь " "ласка, встановіть, наприклад, «pkcon» (частину PackageKit)." -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "Не визначено значення запису, яке слід знайти." +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "Офіс" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "Параметр «%s» є невідомим програмі." + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "Пакунок" -msgid "Print detailed output about found components" -msgstr "Вивести докладні дані щодо знайдених компонентів" - -msgid "Print even pedantic hints when validating" -msgstr "Виводити навіть найдрібніші неточності під час перевірки" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "Фотографія" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "Вивести докладні дані щодо знайдених компонентів." #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "Група проектів" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "Надані записи" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (версія 2)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "Перебудувати кеш інформації щодо компонентів." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "Перебудувати кеш метаданих щодо компонентів." -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "Вилучити програмне забезпечення, вказане ідентифікатором компонента." +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "Робототехніка" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "Рольові ігри" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "" "Щоб переглянути повний список можливих параметрів командного рядка, віддайте " "команду «%s --help»." +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"Щоб переглянути повний список можливих команд і параметрів командного рядка, " +"віддайте команду «%s --help» або команду «%s %s --help», щоб переглянути " +"список параметрів, які є специфічними для цієї підкоманди." + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "Виконувана мікропрограма" -msgid "Sample Screenshot URL" -msgstr "Адреса простого знімка вікна" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "Сканування" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "Наука" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "Шукати у базі даних компонентів." -msgid "Select a value for the provides-item which needs to be found." -msgstr "Вибрати значення для запису provides, яке слід знайти." +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "Безпека" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "Вивести додаткові діагностичні дані." + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "Вивести дані щодо версії програми." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "Спортивні ігри" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "Стратегії" -msgid "Show extra debugging information" -msgstr "Показати додаткові діагностичні дані" - -msgid "Show the program version" -msgstr "Вивести дані щодо версії програми" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "Підкоманди:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "Резюме" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "Резюме:" -msgid "The system metadata cache does not exist." -msgstr "Кешу метаданих системи не існує." +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "Стеження за системою" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "Емулятори термінала" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "Текстові редактори" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "Файла .desktop «%s» не існує." + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"Кеш системи AppStream оновлено, але виявлено декілька помилок, які можуть " +"призвести до втрати метаданих. Зверніться до докладного журналу обробки, щоб " +"дізнатися про це більше." + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 +#, c-format +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "Значенням ТИП має бути коректний запис компонент-тип, зокрема: %s" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "" +"Тип компонента програмного забезпечення «%s» є некоректним у AppStream. " +"Коректні типи:" -msgid "The system metadata cache exists." -msgstr "Кеш метаданих системи існує." +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"Цій команді передаються додаткові позиційні аргументи ТИП і ФАЙЛ, аргумент " +"ФАЙЛ визначає файл, до якого слід записати дані (або «-», якщо дані слід " +"вивести до стандартного виведення)." +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"За допомогою цієї програми ви зможете читати, записувати, перевіряти та " +"перетворювати метадані AppStream у форматах XML і YAML. Також за її " +"допомогою можна отримувати доступ до буфера загальносистемних метаданих, " +"наприклад, для того, щоб визначити програмне забезпечення для обробки даних " +"певного типу MIME та його встановлення за ідентифікатором компонента " +"програмного забезпечення." + +#: tools/ascli-actions-mdata.c:541 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "Під час спроби знайти додаткову інформацію сталася помилка: %s" +msgid "Unable to build the template metainfo file: %s" +msgstr "Не вдалося побудувати файл шаблона метаінформації: %s" -msgid "Tried to perform query on closed database." -msgstr "Спроба виконання дії над закритою базою даних." +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "" +"Не вдалося перетворити файл: програма не змогла визначити формат виведення " +"даних; будь ласка, вкажіть його явно за допомогою параметра «--format=»." -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "Не вдалося знайти компонент, що відповідає запиту %s!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "Не вдалося знайти компонент, що забезпечує «%s;%s»!" +msgid "Unable to find component with ID '%s'!" +msgstr "Не вдалося знайти компонент з ідентифікатором «%s»!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "Не вдалося знайти компонент з ідентифікатором «%s»!" +msgid "Unable to read the .desktop file: %s" +msgstr "Не вдалося прочитати файл .desktop: %s" -msgid "Unable to open the AppStream software component cache." -msgstr "" -"Не вдалося відкрити кеш компонентів програмного забезпечення AppStream." +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "Не вдалося зберегти файл метаінформації шаблона: %s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "Не вдалося запустити засіб керування пакунками: %s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "" "Не вдалося виконати запис до «%s», не вдалося встановити файл metainfo." -msgid "Upstream metadata:" -msgstr "Метадані з основної гілки розробки:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "Невідома команда «%s»." + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "" +"Використати вказаний файл .desktop для заповнення основних пунктів у файлі " +"метаінформації." + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "Інструменти" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "Перевірити файли XML AppStream на вади." +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "" "Перевіряти на коректність метаданих усю встановлену ієрархію файлів програми." -msgid "Validation failed." -msgstr "Спроба перевірки зазнала невдачі." +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "Не пройдено перевірку: %s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "Перевірку пройдено." +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "Перевірку пройдено: %s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "Значення запису, який має бути знайдено." + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "Векторна графіка" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "Версія: %s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "Переглядачі" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "Маємо дані щодо %i компонентів програмного забезпечення." -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "Файл XML меню XDG «%s» пошкоджено." +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "Переглядачі інтернету" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "Текстові процесори" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "" +"Переглянути усі специфічні для підкоманди параметри можна передавши " +"підкоманді параметр «--help»." +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "Для виконання цієї дії потрібні права адміністративного доступу." +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "" +"Для створення шаблона вам слід вказати тип компонента програмного " +"забезпечення у AppStream. Можливі значення типу:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "Вам слід вказати команду." -msgid "You need to specify a component-id." +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." msgstr "Вам слід вказати ідентифікатор компонента." +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "Вам слід вказати файл для перевірки!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "Вам слід вказати файл метаданих." +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "Для перевірки слід вказати кореневий каталог!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "Вам слід вказати ключ пошуку." +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "Вам слід вказати файл вхідних і вихідних даних." + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" -msgstr "додаток;застосунок;пакет;програма;програма;комплект;інструмент" +msgstr "застосунок;застосунок;пакет;програма;програма;комплект;інструмент" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "помилок: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "повідомлень: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "педантичних зауважень: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "попереджень: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "Невідома команда «%s»." + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "Не використовувати кеш взагалі під час виконання запиту." + +#~ msgid "AppStream cache update failed." +#~ msgstr "Спроба оновити кеш AppStream зазнала невдачі." + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "" +#~ "Сховище даних AppStream завантажено, але деякі метадані проігноровано " +#~ "через помилки." + +#~ msgid "Can not search for unknown component type." +#~ msgstr "Пошук із невідомим типом компонента неможливий." + +#~ msgid "Category of Games" +#~ msgstr "Категорії" + +#~ msgid "Category of Office" +#~ msgstr "Категорії" + +#~ msgid "Category of Science" +#~ msgstr "Категорії" + +#~ msgid "Extensions" +#~ msgstr "Розширення" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "Файл %s не знайдено або доступ до нього заборонено!" + +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "Не знайдено компонента, що містить «%s::%s»." + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "Файл XML меню XDG «%s» пошкоджено." diff -Nru appstream-0.9.4/po/vi.po appstream-0.12.0/po/vi.po --- appstream-0.9.4/po/vi.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/vi.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Vietnamese (http://www.transifex.com/freedesktop/appstream/" -"language/vi/)\n" -"Language: vi\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/wa.po appstream-0.12.0/po/wa.po --- appstream-0.9.4/po/wa.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/wa.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Walloon (http://www.transifex.com/freedesktop/appstream/" -"language/wa/)\n" -"Language: wa\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/zh_CN.po appstream-0.12.0/po/zh_CN.po --- appstream-0.9.4/po/zh_CN.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/zh_CN.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,213 +1,601 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: # Boyuan YANG <073plan@gmail.com>, 2015 # Dz Chen , 2016 # Mingcong Bai , 2016 +# Mingye Wang , 2016 # Mingcong Bai , 2015-2016 +# zh-TW translators, 2016. msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-13 17:47+0000\n" -"Last-Translator: Dz Chen \n" -"Language-Team: Chinese (China) (http://www.transifex.com/freedesktop/" -"appstream/language/zh_CN/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2017-12-02 15:44+0000\n" +"Last-Translator: Dingzhong Chen \n" +"Language-Team: Chinese (Simplified) \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 2.18-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "提供的项目类型(如:lib、bin、python3...等)" - +#: tools/appstream-cli.c:146 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "AppStream CLI 工具版本: %s" +msgid "'%s' command" +msgstr "“%s”命令" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D 图形" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "动作" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "附加组件" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "冒险" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +#, fuzzy +msgid "Also show pedantic hints." +msgstr "验证的同时输出教条的提示。" + +#: tools/appstream-cli.c:604 +#, fuzzy +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "一个项目类型(如:lib、bin、python3…)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "用于操作 AppStream 元数据的实用工具" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream 命令行界面" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 +#, fuzzy, c-format +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"AppStream CLI 工具版本:%s\n" +"AppStream 库版本:%s" + +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "AppStream 状态:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "AppStream 缓存更新成功完成。" -#, c-format +#: src/as-pool.c:1560 +#, fuzzy, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "AppStream 缓存更新已完成,但某些元数据因为出错而被忽略。" - -#, c-format -msgid "AppStream cache update failed." -msgstr "AppStream 缓存更新失败。" +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." +msgstr "AppStream 缓存更新失败了。请打开详情模式以获取更多详细的问题信息。" +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "无需更新 AppStream 缓存。" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "AppStream 命令行界面" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"未找到 AppStream 软件组件缓存。这可能意味着 AppStream 未正确配置,或你的发行" -"版没有提供人呢和 AppStream 元数据。" +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "AppStream 为一个跨散布版的规范,旨在提供软件组件的元数据。" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "AppStream 系统缓存已更新,但发现了一些问题:%s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream 版本:%s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "机台" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "人工智能" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "天文" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "天文" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "音频和视频" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "音频创作和编辑" +#: src/as-provided.c:147 msgid "Binaries" msgstr "二进制" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "方块" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "棋盘" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "套件" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." -msgstr "缓存位置“%s“不可写" +msgstr "缓存位置“%s”不可写。" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "日历" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "无法复制“%s”:文件没有“.metainfo.xml”或“.appdata.xml”扩展名。" +"suffix." +msgstr "无法复制“%s”:文件没有“.metainfo.xml”或“.appdata.xml”后缀。" + +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "纸牌" +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "类别" -#, c-format -msgid "Command '%s' is unknown." -msgstr "命令“%s”未知。" +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "聊天" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "化学" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "化学" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "编解码器" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "沟通和新闻" + +#: src/as-provided.c:167 +#, fuzzy +msgid "Component" +msgstr "组件" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "'%s' 组件没有安装候选版本。" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "强制项目以供" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "将收藏集 XML 转换成 YAML,或是相反。" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "未找到提供“%s;%s”的组件。" + +#: tools/appstream-cli.c:620 +#, fuzzy +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "为元信息文件创建模板(由上游项目所填写)。" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "DBus 会话服务" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "DBus 系统服务" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "数据库" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "除错器" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "默认屏幕截图 URL" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +#, fuzzy +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "给定元数据格式的默认值 (有效的值为“xml”和“yaml”)。" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "描述" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "开发者" -msgid "Display various information about installed AppStream metadata." -msgstr "显示关于已安装的 AppStream 元数据的各类信息。" +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "开发者工具" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "显示关于可用的 AppStream 元数据的状态信息。" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "发行版元数据:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "处理请求时不要使用 Xapian 缓存" - -msgid "Don't show colored output" -msgstr "不要显示带色彩的输出" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +#, fuzzy +msgid "Do not use network access." +msgstr "不使用网络访问。" + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "不要显示彩色输出。" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "为 ID 匹配的组件转储原始 XML 元数据。" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "教育" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "空。" -msgid "Enforce a cache refresh" -msgstr "强制刷新缓存" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "模拟器" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "强制刷新缓存。" -msgid "Extends" -msgstr "扩展" +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "载入元数据池时出错:%s" -msgid "Extensions" +#: tools/ascli-utils.c:314 +msgid "Extends" msgstr "扩展" -#, c-format -msgid "File %s not found or permission denied!" -msgstr "文件 %s 未找到,或没有操作权限!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "精选" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "精选" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "精选" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "精选" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "精选" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "精选" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "精选" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "精选" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "精选" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "文件系统" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "财经" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "已刷入的固件" +#: src/as-provided.c:151 msgid "Fonts" msgstr "字体" +#: src/as-category.c:211 +msgctxt "Category of Addons" +msgid "Fonts" +msgstr "字体" + +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "在旧版路径中找到了 %i 个组件。" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "找到 %i 个组件。" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "游戏" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." msgstr "获取可提供指定项目的组件。" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "根据 ID 获取相应组件的信息。" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "图形和摄影" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "主页" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDE" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "图标" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "图标集" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "识别码" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "输入来源" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "将元数据文件安装到正确的位置。" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +#, fuzzy +msgid "Install software matching the component-ID." msgstr "安装匹配组件 ID 的软件。" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "选取的提供项目类型无效。有效的值为:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "孩童" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "语言包" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "语言" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "库" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "授权条款" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "为重新生成缓存而手动设置 AppStream 元数据的位置" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "本地化" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "逻辑" + +#: src/as-provided.c:149 +#, fuzzy +msgid "MIME types" +msgstr "MIME 类型" -msgid "Manually set the location of the AppStream cache" -msgstr "手动设置 AppStream 缓存的位置" +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "" -msgid "Mimetypes" -msgstr "MIME 类型" +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +#, fuzzy +msgid "Manually selected location of AppStream cache." +msgstr "手动设置 AppStream 缓存的位置。" + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +#, fuzzy +msgid "Manually selected location of AppStream metadata to scan." +msgstr "手动设置要扫描的 AppStream 元数据的位置。" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "数学" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "数学" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "“%s”元数据文件并不存在。" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "元数据文件有错误:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "元信息文件:" +#: src/as-provided.c:153 msgid "Modaliases" msgstr "模块别名" +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "音乐播放器" + +#: tools/ascli-utils.c:283 msgid "Name" msgstr "名称" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "新闻" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "未找到符合“%s”的组件。" -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "未找到提供“%s;%s”的组件。" - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "无图标。" +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." @@ -215,157 +603,447 @@ "未找到可用的软件包管理器 CLI。请确定已安装类似“pkcon”(PackageKit 的一部分)" "的程序。" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +#, fuzzy +msgid "No value for the item to search for was defined." msgstr "没有定义要搜索的提供项目值。" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "办公" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "选项“%s”未知。" + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "软件包" -msgid "Print detailed output about found components" -msgstr "打印寻找到的组件的详细输出" - -msgid "Print even pedantic hints when validating" -msgstr "验证时同样输出冗余的提示" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "摄影" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "打印关于寻找到的组件的详细输出。" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "项目群组" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "提供的项目" +#: src/as-provided.c:155 msgid "Python (Version 2)" -msgstr "Python (版本 2)" +msgstr "Python 2" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "重建组件信息缓存。" - -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "重建组件元数据缓存。" + +#: tools/appstream-cli.c:614 +#, fuzzy +msgid "Remove software matching the component-ID." msgstr "卸载匹配 component-id 的软件。" +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "机器人" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "角色扮演" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "运行“%s --help”以查看可用命令行选项完整的列表。" +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"运行“%s --help”以查看可用命令和选项列表;“%s %s --help”可查看专属于某个子命令" +"的选项列表。" + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "运行时固件" -msgid "Sample Screenshot URL" -msgstr "示例屏幕截图 URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "扫描" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "科学" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "搜索组件数据库。" -msgid "Select a value for the provides-item which needs to be found." -msgstr "选择需要查找的提供项目值。" - -msgid "Show extra debugging information" -msgstr "显示额外的调试信息" - -msgid "Show the program version" -msgstr "显示程序版本" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "安全" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "显示额外的调试信息。" + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "显示程序版本." + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "运动" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "策略" -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "子命令:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "摘要" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "概览:" -msgid "The system metadata cache does not exist." -msgstr "未找到系统元数据缓存。" +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "系统监控" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "终端机仿真器" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "文本编辑器" -msgid "The system metadata cache exists." -msgstr "找到系统元数据缓存。" +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr ".desktop 文件“%s”并不存在。" + +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"AppStream 系统缓存已更新,但是检测到了一些错误可能导致元数据丢失。 请参阅详细" +"日志获取更多信息。" +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "尝试查找附加信息时出错:%s" +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "TYPE 必须为有效的组件类型,例如:%s" + +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "软件组件类型“%s”在 AppStream 中无效。可用的值有:" + +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +#, fuzzy +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"此命令引用可选的 TYPE 和 FILE 位置参数,FILE 为要写入的文件(或用“-”表示标准" +"输出)。" -msgid "Tried to perform query on closed database." -msgstr "试图在已关闭的数据库中进行查询。" +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +#, fuzzy +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"本工具可用于读写、验证与变换 AppStream XML 或 YAML 元数据;此外还可访问系统元" +"数据库,进行诸如搜索提供某种 mime 类型的软件,并按照其软件组件辨识码安装。" + +#: tools/ascli-actions-mdata.c:541 +#, fuzzy, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "无法生成模板元信息文件:%s" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "无法转换文件:无法判定输出格式,请使用“--format=”明确设置。" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "未找到符合 %s 的组件!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "未找到提供“%s;%s”的组件!" +msgid "Unable to find component with ID '%s'!" +msgstr "未找到 id 为“%s”的组件!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "未找到 id 为“%s”的组件!" +msgid "Unable to read the .desktop file: %s" +msgstr "无法读取 .desktop 文件:%s" -msgid "Unable to open the AppStream software component cache." -msgstr "无法打开 AppStream 软件组件缓存。" +#: tools/ascli-actions-mdata.c:549 +#, fuzzy, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "无法保存模板源信息文件:%s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "无法启动软件包管理器:%s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "无法写入到“%s”,无法安装元信息文件。" -msgid "Upstream metadata:" -msgstr "上游元数据:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +#, fuzzy +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "使用给定的 .desktop 文件来填充元信息文件里的基本值。" + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "公用程序" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "验证 AppStream XML 文件以寻找问题。" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "检验已安装应用程序的文件树以查找有效元数据。" -msgid "Validation failed." -msgstr "验证失败。" +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "验证失败:%s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "验证成功。" +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "验证成功:%s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "应该要找到的物品值。" + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "矢量图形" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "版本:%s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "查看器" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "已获取到 %i 个软件组件的信息。" -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XDG 菜单 XML 文件“%s”已损坏。" +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "网页浏览器" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "文字处理器" + +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "您可以借由传递“--help”给子命令来查找子命令专属的选项信息。" +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "你可能需要超级用户权限以进行此动作。" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "您需要给定 AppStream 软件组件类型以生成模板。可用的值有:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "您需要指定一个命令。" -msgid "You need to specify a component-id." -msgstr "您需要指定一个组件 ID。" +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "您需要指定一个组件-ID。" +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "您需要指定用来验证的文件!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "你需要指定一个元数据文件。" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "您需要指定根目录以开始验证!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "您需要指定用来搜索的关键字。" +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "你需要指定输入和输出文件。" + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" -"app;application;package;program;programme;suite;tool;应用;应用程序;软件包;程" -"序;套装;工具" +"app;application;package;program;programme;suite;tool;应用;程序;包;程序;套装;" +"工具;套件;软件" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "错误:%lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "信息:%lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "警告:%lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "命令“%s”未知。" + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "处理请求时不要使用任何缓存。" + +#~ msgid "AppStream cache update failed." +#~ msgstr "AppStream 缓存更新失败。" + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "已载入 AppStream 数据池,但忽略了一部分包含错误的元数据。" + +#~ msgid "Can not search for unknown component type." +#~ msgstr "无法搜索未知组件类型。" + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "类别" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "类别" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "类别" + +#~ msgid "Extensions" +#~ msgstr "扩展" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "文件 %s 未找到,或没有操作权限!" + +#, fuzzy +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "未找到提供“%s;%s”的组件。" + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XDG 菜单 XML 文件“%s”已损坏。" diff -Nru appstream-0.9.4/po/zh_HK.po appstream-0.12.0/po/zh_HK.po --- appstream-0.9.4/po/zh_HK.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/zh_HK.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Matthias Klumpp -# This file is distributed under the same license as the appstream package. -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-11 23:59+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Chinese (Hong Kong) (http://www.transifex.com/freedesktop/" -"appstream/language/zh_HK/)\n" -"Language: zh_HK\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "" - -#, c-format -msgid "AppStream CLI tool version: %s" -msgstr "" - -msgid "AppStream Status:" -msgstr "" - -msgid "AppStream cache update completed successfully." -msgstr "" - -#, c-format -msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "" - -#, c-format -msgid "AppStream cache update failed." -msgstr "" - -msgid "AppStream cache update is not necessary." -msgstr "" - -#. TRANSLATORS: This is the header to the --help menu -msgid "AppStream command-line interface" -msgstr "" - -msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" - -msgid "Binaries" -msgstr "" - -msgid "Bundle" -msgstr "" - -#, c-format -msgid "Cache location '%s' is not writable." -msgstr "" - -#, c-format -msgid "" -"Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "" - -msgid "Categories" -msgstr "" - -#, c-format -msgid "Command '%s' is unknown." -msgstr "" - -#, c-format -msgid "Component '%s' has no installation candidate." -msgstr "" - -msgid "Compulsory for" -msgstr "" - -msgid "DBus Session Services" -msgstr "" - -msgid "DBus System Services" -msgstr "" - -msgid "Description" -msgstr "" - -#. developer name -msgid "Developer" -msgstr "" - -msgid "Display various information about installed AppStream metadata." -msgstr "" - -msgid "Distribution metadata:" -msgstr "" - -msgid "Do not use the Xapian cache when performing the request" -msgstr "" - -msgid "Don't show colored output" -msgstr "" - -msgid "Dump raw XML metadata for a component matching the ID." -msgstr "" - -msgid "Empty." -msgstr "" - -msgid "Enforce a cache refresh" -msgstr "" - -msgid "Extends" -msgstr "" - -msgid "Extensions" -msgstr "" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "" - -msgid "Flashed Firmware" -msgstr "" - -msgid "Fonts" -msgstr "" - -#, c-format -msgid "Found %i components in legacy paths." -msgstr "" - -#, c-format -msgid "Found %i components." -msgstr "" - -msgid "Get components which provide the given item." -msgstr "" - -msgid "Get information about a component by its ID." -msgstr "" - -msgid "Homepage" -msgstr "" - -msgid "Icon" -msgstr "" - -msgid "Iconsets" -msgstr "" - -msgid "Identifier" -msgstr "" - -msgid "Install a metadata file into the right location." -msgstr "" - -msgid "Install software matching the component-id." -msgstr "" - -msgid "Invalid type for provided item selected. Valid values are:" -msgstr "" - -msgid "Libraries" -msgstr "" - -#. license -msgid "License" -msgstr "" - -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "" - -msgid "Manually set the location of the AppStream cache" -msgstr "" - -msgid "Mimetypes" -msgstr "" - -msgid "Modaliases" -msgstr "" - -msgid "Name" -msgstr "" - -#, c-format -msgid "No component matching '%s' found." -msgstr "" - -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "" - -msgid "No icons." -msgstr "" - -msgid "" -"No suitable package manager CLI found. Please make sure that e.g. \"pkcon" -"\" (part of PackageKit) is available." -msgstr "" - -msgid "No value for the item to search for defined." -msgstr "" - -msgid "Package" -msgstr "" - -msgid "Print detailed output about found components" -msgstr "" - -msgid "Print even pedantic hints when validating" -msgstr "" - -#. project group -msgid "Project Group" -msgstr "" - -msgid "Provided Items" -msgstr "" - -msgid "Python (Version 2)" -msgstr "" - -msgid "Python 3" -msgstr "" - -msgid "Rebuild the component information cache." -msgstr "" - -msgid "Remove software matching the component-id." -msgstr "" - -#, c-format -msgid "Run '%s --help' to see a full list of available command line options." -msgstr "" - -msgid "Runtime Firmware" -msgstr "" - -msgid "Sample Screenshot URL" -msgstr "" - -msgid "Search the component database." -msgstr "" - -msgid "Select a value for the provides-item which needs to be found." -msgstr "" - -msgid "Show extra debugging information" -msgstr "" - -msgid "Show the program version" -msgstr "" - -#. these are commands we can use with appstream-cli -msgid "Subcommands:" -msgstr "" - -msgid "Summary" -msgstr "" - -msgid "Summary:" -msgstr "" - -msgid "The system metadata cache does not exist." -msgstr "" - -msgid "The system metadata cache exists." -msgstr "" - -#, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "" - -msgid "Tried to perform query on closed database." -msgstr "" - -#. TRANSLATORS: We failed to find any component in the database due to an error -#, c-format -msgid "Unable to find component matching %s!" -msgstr "" - -#, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "" - -#, c-format -msgid "Unable to find component with id '%s'!" -msgstr "" - -msgid "Unable to open the AppStream software component cache." -msgstr "" - -#, c-format -msgid "Unable to spawn package manager: %s" -msgstr "" - -#, c-format -msgid "Unable to write to '%s', can not install metainfo file." -msgstr "" - -msgid "Upstream metadata:" -msgstr "" - -msgid "Validate AppStream XML files for issues." -msgstr "" - -msgid "Validate an installed file-tree of an application for valid metadata." -msgstr "" - -msgid "Validation failed." -msgstr "" - -msgid "Validation was successful." -msgstr "" - -#, c-format -msgid "We have information on %i software components." -msgstr "" - -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "" - -msgid "You might need superuser permissions to perform this action." -msgstr "" - -msgid "You need to specify a command." -msgstr "" - -msgid "You need to specify a component-id." -msgstr "" - -msgid "You need to specify a file to validate!" -msgstr "" - -msgid "You need to specify a metadata file." -msgstr "" - -msgid "You need to specify a root directory to start validation!" -msgstr "" - -msgid "You need to specify a term to search for." -msgstr "" - -#. TRANSLATORS: List of "grey-listed" words sperated with ";" -#. * Do not translate this list directly. Instead, -#. * provide a list of words in your language that people are likely -#. * to include in a search but that should normally be ignored in -#. * the search. -#. -msgid "app;application;package;program;programme;suite;tool" -msgstr "" diff -Nru appstream-0.9.4/po/zh_TW.po appstream-0.12.0/po/zh_TW.po --- appstream-0.9.4/po/zh_TW.po 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/po/zh_TW.po 2018-04-04 15:53:56.000000000 +0000 @@ -1,367 +1,1034 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Matthias Klumpp # This file is distributed under the same license as the appstream package. -# # Translators: # Hotellook, 2014 # Matjaž Mozetič , 2015 msgid "" msgstr "" "Project-Id-Version: AppStream\n" -"Report-Msgid-Bugs-To: distributions@lists.freedesktop.org\n" -"POT-Creation-Date: 2016-04-18 16:09+0200\n" -"PO-Revision-Date: 2016-04-12 13:51+0000\n" -"Last-Translator: Matthias K. \n" -"Language-Team: Chinese (Taiwan) (http://www.transifex.com/freedesktop/" -"appstream/language/zh_TW/)\n" +"Report-Msgid-Bugs-To: appstream@lists.freedesktop.org\n" +"POT-Creation-Date: 2018-04-04 17:28+0200\n" +"PO-Revision-Date: 2018-04-02 04:02+0000\n" +"Last-Translator: Chang-Chia Tseng \n" +"Language-Team: Chinese (Traditional) \n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 2.20-dev\n" -msgid "A provides-item type (e.g. lib, bin, python3, ...)" -msgstr "提供項目的類型 (如:lib、bin、python3...等)" +#: tools/appstream-cli.c:146 +#, c-format +msgid "'%s' command" +msgstr "「%s」指令" + +#: src/as-category.c:168 +msgctxt "Category of Graphics" +msgid "3D Graphics" +msgstr "3D 圖形" + +#: src/as-category.c:123 +msgctxt "Category of Games" +msgid "Action" +msgstr "動作" + +#. TRANSLATORS: this is the main category for Add-ons +#. TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor +#: src/as-category.c:320 tools/ascli-utils.c:385 +msgid "Add-ons" +msgstr "附加元件" + +#: src/as-category.c:126 +msgctxt "Category of Games" +msgid "Adventure" +msgstr "冒險" + +#. TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) +#: tools/appstream-cli.c:115 +msgid "Also show pedantic hints." +msgstr "也列印詳盡的提示。" + +#: tools/appstream-cli.c:604 +msgid "An item type (e.g. lib, bin, python3, …)" +msgstr "項目類型(例:lib、bin、python3…等)" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:9 +msgid "An utility to work with AppStream metadata" +msgstr "處理 AppStream 中介資料的公用程式" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:8 +msgid "AppStream CLI" +msgstr "AppStream 命令列介面" +#. TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. +#: tools/appstream-cli.c:696 #, c-format -msgid "AppStream CLI tool version: %s" -msgstr "AppStream CLI 工具版本:%s" +msgid "" +"AppStream CLI tool version: %s\n" +"AppStream library version: %s" +msgstr "" +"AppStream CLI 工具版本:%s\n" +"AppStream 函式庫版本:%s" +#. TRANSLATORS: In the status report of ascli: Header +#: tools/ascli-actions-misc.c:45 msgid "AppStream Status:" msgstr "AppStream 狀態:" +#. we performed a cache refresh +#. TRANSLATORS: Updating the metadata cache succeeded +#: tools/ascli-actions-mdata.c:80 msgid "AppStream cache update completed successfully." msgstr "AppStream 快取更新成功完成。" +#: src/as-pool.c:1560 #, c-format msgid "" -"AppStream cache update completed, but some metadata was ignored due to " -"errors." -msgstr "AppStream 快取更新完成,但有些中介資料因為錯誤而被忽略。" - -#, c-format -msgid "AppStream cache update failed." -msgstr "AppStream 快取更新失敗。" +"AppStream cache update failed. Turn on verbose mode to get more detailed " +"issue information." +msgstr "AppStream 快取更新失敗。請開啟詳盡模式取得更多該議題相關的資訊細節。" +#. cache wasn't updated, so the update wasn't necessary +#: tools/ascli-actions-mdata.c:86 msgid "AppStream cache update is not necessary." msgstr "不必更新 AppStream 快取。" +#. TRANSLATORS: This is the header to the --help menu for subcommands #. TRANSLATORS: This is the header to the --help menu +#: tools/appstream-cli.c:143 tools/appstream-cli.c:597 msgid "AppStream command-line interface" msgstr "AppStream 指令列介面" +#: data/org.freedesktop.appstream.cli.metainfo.xml:12 msgid "" -"AppStream software component cache was not found. This could mean AppStream " -"was set up incorrectly, or your distribution does not provide any AppStream " -"metadata." -msgstr "" -"找不到 AppStream 軟體組件快取。這可能代表 AppStream 設置不正確,或是您的散布" -"版未提供任何 AppStream 中介資料。" +"AppStream is a cross-distribution specification to provide metadata about " +"software components." +msgstr "AppStream 為一個跨散佈版的規範,旨在提供軟體組件的中介資料。" + +#: src/as-pool.c:1546 +#, c-format +msgid "AppStream system cache was updated, but problems were found: %s" +msgstr "AppStream 系統快取已更新,但發現一些問題:%s" + +#. TRANSLATORS: Output if appstreamcli --version is executed. +#: tools/appstream-cli.c:693 +#, c-format +msgid "AppStream version: %s" +msgstr "AppStream 版本:%s" + +#: src/as-category.c:129 +msgctxt "Category of Games" +msgid "Arcade" +msgstr "機臺" + +#: src/as-category.c:234 +msgctxt "Category of Science" +msgid "Artificial Intelligence" +msgstr "人工智慧" + +#: src/as-category.c:101 +msgctxt "Category of Education" +msgid "Astronomy" +msgstr "天文" + +#: src/as-category.c:237 +msgctxt "Category of Science" +msgid "Astronomy" +msgstr "天文" + +#. TRANSLATORS: this is the menu spec main category for Audio & Video +#: src/as-category.c:302 +msgid "Audio & Video" +msgstr "音訊和視訊" + +#: src/as-category.c:68 +msgctxt "Category of AudioVideo" +msgid "Audio Creation & Editing" +msgstr "音訊創作和編輯" +#: src/as-provided.c:147 msgid "Binaries" msgstr "二進位檔" +#: src/as-category.c:132 +msgctxt "Category of Games" +msgid "Blocks" +msgstr "方塊" + +#: src/as-category.c:135 +msgctxt "Category of Games" +msgid "Board" +msgstr "棋盤" + +#: tools/ascli-utils.c:286 msgid "Bundle" msgstr "套組" +#: src/as-pool.c:1486 #, c-format msgid "Cache location '%s' is not writable." msgstr "無法寫入「%s」快取位置。" +#: src/as-category.c:191 +msgctxt "Category of Office" +msgid "Calendar" +msgstr "行事曆" + +#: tools/ascli-actions-mdata.c:324 #, c-format msgid "" "Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' " -"extension." -msgstr "無法複製「%s」:檔案沒有「.metainfo.xml」或「.appdata.xml」擴展名。" +"suffix." +msgstr "無法複製「%s」:檔案沒有「.metainfo.xml」或「.appdata.xml」後綴字。" +#: src/as-category.c:138 +msgctxt "Category of Games" +msgid "Card" +msgstr "紙牌" + +#: tools/ascli-utils.c:356 msgid "Categories" msgstr "類別" -#, c-format -msgid "Command '%s' is unknown." -msgstr "指令「%s」未知。" +#: src/as-category.c:259 +msgctxt "Category of Communication" +msgid "Chat" +msgstr "聊天" + +#: src/as-category.c:104 +msgctxt "Category of Education" +msgid "Chemistry" +msgstr "化學" + +#: src/as-category.c:240 +msgctxt "Category of Science" +msgid "Chemistry" +msgstr "化學" + +#: src/as-category.c:214 +msgctxt "Category of Addons" +msgid "Codecs" +msgstr "編解碼器" + +#. TRANSLATORS: this is the menu spec main category for Communication +#: src/as-category.c:326 +msgid "Communication & News" +msgstr "溝通和新聞" + +#: src/as-provided.c:167 +msgid "Component" +msgstr "組件" +#. TRANSLATORS: We found no distribution package or bundle to install to make this software available +#: tools/ascli-actions-pkgmgr.c:106 #, c-format msgid "Component '%s' has no installation candidate." msgstr "「%s」組件尚無安裝候選。" +#: tools/ascli-utils.c:364 msgid "Compulsory for" msgstr "強制項目為" +#. TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. +#: tools/appstream-cli.c:619 +msgid "Convert collection XML to YAML or vice versa." +msgstr "將收藏集 XML 轉換成 YAML,或是相反。" + +#. TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results +#: tools/ascli-actions-mdata.c:225 +#, c-format +msgid "Could not find component providing '%s::%s'." +msgstr "找不到提供「%s::%s」的組件。" + +#: tools/appstream-cli.c:620 +msgid "" +"Create a template for a metainfo file (to be filled out by the upstream " +"project)." +msgstr "製作中介資訊檔的範本(由上游專案填寫)。" + +#: src/as-provided.c:161 msgid "DBus Session Services" msgstr "DBus 作業階段服務" +#: src/as-provided.c:159 msgid "DBus System Services" msgstr "DBus 系統服務" +#: src/as-category.c:195 +msgctxt "Category of Office" +msgid "Database" +msgstr "資料庫" + +#: src/as-category.c:86 +msgctxt "Category of Development" +msgid "Debuggers" +msgstr "除錯器" + +#: tools/ascli-utils.c:340 +msgid "Default Screenshot URL" +msgstr "預設螢幕快照 URL" + +#. TRANSLATORS: ascli flag description for: --format +#: tools/appstream-cli.c:83 +msgid "Default metadata format (valid values are 'xml' and 'yaml')." +msgstr "預設中介資料格式(有效的值為「xml」和「yaml」)。" + +#: tools/ascli-utils.c:320 msgid "Description" msgstr "描述" #. developer name +#: tools/ascli-utils.c:308 msgid "Developer" msgstr "開發者" -msgid "Display various information about installed AppStream metadata." -msgstr "顯示各種已安裝之 AppStream 中介資料的相關資訊。" +#. TRANSLATORS: this is the menu spec main category for Development +#: src/as-category.c:305 +msgid "Developer Tools" +msgstr "開發者工具" + +#: tools/appstream-cli.c:616 +msgid "Display status information about available AppStream metadata." +msgstr "顯示可用的 AppStream 中介資料相關狀態資訊。" +#. TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions +#: tools/ascli-actions-misc.c:50 msgid "Distribution metadata:" msgstr "散佈版中介資料:" -msgid "Do not use the Xapian cache when performing the request" -msgstr "執行請求時不要使用 Xapian 快取" - -msgid "Don't show colored output" -msgstr "不要顯示色彩化的輸出" +#. TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) +#: tools/appstream-cli.c:120 +msgid "Do not use network access." +msgstr "不使用網路存取。" + +#. TRANSLATORS: ascli flag description for: --no-color +#: tools/appstream-cli.c:657 +msgid "Don't show colored output." +msgstr "不要顯示色彩化的輸出。" +#: tools/appstream-cli.c:607 msgid "Dump raw XML metadata for a component matching the ID." msgstr "傾印符合該 ID 的組件原生 XML 中介資料。" +#. TRANSLATORS: this is the menu spec main category for Education +#: src/as-category.c:308 +msgid "Education" +msgstr "教育" + +#. TRANSLATORS: No metainfo files have been found +#: tools/ascli-actions-misc.c:107 tools/ascli-actions-misc.c:127 msgid "Empty." msgstr "空的。" -msgid "Enforce a cache refresh" -msgstr "強制快取重新整理" +#: src/as-category.c:141 +msgctxt "Category of Games" +msgid "Emulators" +msgstr "模擬器" + +#. TRANSLATORS: ascli flag description for: --force +#: tools/appstream-cli.c:234 +msgid "Enforce a cache refresh." +msgstr "強制重新整理快取。" + +#: tools/ascli-actions-misc.c:157 +#, c-format +msgid "Error while loading the metadata pool: %s" +msgstr "載入中介資料集池時發生錯誤:%s" +#: tools/ascli-utils.c:314 msgid "Extends" msgstr "擴展" -msgid "Extensions" -msgstr "擴充套件" - -#, c-format -msgid "File %s not found or permission denied!" -msgstr "找不到檔案 %s,或未獲得存取許可!" +#: src/as-category.c:65 +msgctxt "Category of AudioVideo" +msgid "Featured" +msgstr "特選" + +#: src/as-category.c:256 +msgctxt "Category of Communication" +msgid "Featured" +msgstr "特選" + +#: src/as-category.c:83 +msgctxt "Category of Development" +msgid "Featured" +msgstr "特選" + +#: src/as-category.c:98 +msgctxt "Category of Education" +msgid "Featured" +msgstr "特選" + +#: src/as-category.c:120 +msgctxt "Category of Games" +msgid "Featured" +msgstr "特選" + +#: src/as-category.c:165 +msgctxt "Category of Graphics" +msgid "Featured" +msgstr "特選" + +#: src/as-category.c:188 +msgctxt "Category of Office" +msgid "Featured" +msgstr "特選" + +#: src/as-category.c:231 +msgctxt "Category of Science" +msgid "Featured" +msgstr "特選" + +#: src/as-category.c:278 +msgctxt "Category of Utility" +msgid "Featured" +msgstr "特選" + +#: src/as-category.c:287 +msgctxt "Category of Utility" +msgid "File System" +msgstr "檔案系統" + +#: src/as-category.c:198 +msgctxt "Category of Office" +msgid "Finance" +msgstr "財經" +#: src/as-provided.c:165 msgid "Flashed Firmware" msgstr "快閃記憶韌體" +#: src/as-provided.c:151 +msgid "Fonts" +msgstr "字型" + +#: src/as-category.c:211 +msgctxt "Category of Addons" msgid "Fonts" msgstr "字型" +#. TRANSLATORS: Found metainfo files in legacy directories +#: tools/ascli-actions-misc.c:136 #, c-format msgid "Found %i components in legacy paths." msgstr "遺留路徑中找到 %i 個組件。" +#: tools/ascli-actions-misc.c:121 #, c-format msgid "Found %i components." msgstr "找到 %i 個組件。" +#. TRANSLATORS: this is the menu spec main category for Game +#: src/as-category.c:311 +msgid "Games" +msgstr "遊戲" + +#: tools/appstream-cli.c:603 msgid "Get components which provide the given item." -msgstr "取得提供指定項目的組件" +msgstr "取得提供指定項目的組件。" +#: tools/appstream-cli.c:602 msgid "Get information about a component by its ID." msgstr "根據 ID 取得組件的資訊。" +#. TRANSLATORS: this is the menu spec main category for Graphics +#: src/as-category.c:314 +msgid "Graphics & Photography" +msgstr "圖形和攝影" + +#: tools/ascli-utils.c:287 msgid "Homepage" msgstr "首頁" +#: src/as-category.c:89 +msgctxt "Category of Development" +msgid "IDEs" +msgstr "IDE" + +#: tools/ascli-utils.c:288 msgid "Icon" msgstr "圖示" +#: tools/ascli-actions-misc.c:92 msgid "Iconsets" msgstr "圖示集" +#: tools/ascli-utils.c:282 msgid "Identifier" msgstr "辨識碼" +#: src/as-category.c:217 +msgctxt "Category of Addons" +msgid "Input Sources" +msgstr "輸入來源" + +#: tools/appstream-cli.c:617 msgid "Install a metadata file into the right location." msgstr "安裝中介資料檔到適當位置。" -msgid "Install software matching the component-id." +#: tools/appstream-cli.c:613 +msgid "Install software matching the component-ID." msgstr "安裝符合組件 ID 的軟體。" +#: tools/ascli-actions-mdata.c:210 msgid "Invalid type for provided item selected. Valid values are:" msgstr "選取的供應項目類型無效。有效的值有:" +#: src/as-category.c:144 +msgctxt "Category of Games" +msgid "Kids" +msgstr "孩童" + +#: src/as-category.c:220 +msgctxt "Category of Addons" +msgid "Language Packs" +msgstr "語言包" + +#: src/as-category.c:107 +msgctxt "Category of Education" +msgid "Languages" +msgstr "語言" + +#: src/as-provided.c:145 msgid "Libraries" msgstr "函式庫" #. license +#: tools/ascli-utils.c:350 msgid "License" msgstr "授權條款" -msgid "Manually set the location of AppStream metadata for cache regeneration" -msgstr "手動設定快取重製用的 AppStream 中介資料位置" - -msgid "Manually set the location of the AppStream cache" -msgstr "手動設定 AppStream 快取的位置" - -msgid "Mimetypes" -msgstr "Mimetypes" +#: src/as-category.c:223 +msgctxt "Category of Addons" +msgid "Localization" +msgstr "在地化" + +#: src/as-category.c:147 +msgctxt "Category of Games" +msgid "Logic" +msgstr "邏輯" + +#: src/as-provided.c:149 +msgid "MIME types" +msgstr "MIME 類型" + +#. TRANSLATORS: ascli flag description for: --no-cache +#: tools/appstream-cli.c:67 +msgid "Make request without any caching." +msgstr "提出請求但不作快取。" + +#. TRANSLATORS: ascli flag description for: --cachepath +#: tools/appstream-cli.c:57 +msgid "Manually selected location of AppStream cache." +msgstr "手動選取 AppStream 快取的位置。" + +#. TRANSLATORS: ascli flag description for: --datapath +#: tools/appstream-cli.c:62 +msgid "Manually selected location of AppStream metadata to scan." +msgstr "手動選取要掃描的 AppStream 中介資料位置。" + +#: src/as-category.c:111 +msgctxt "Category of Education" +msgid "Math" +msgstr "數學" + +#: src/as-category.c:243 +msgctxt "Category of Science" +msgid "Math" +msgstr "數學" + +#: tools/ascli-actions-mdata.c:361 +#, c-format +msgid "Metadata file '%s' does not exist." +msgstr "「%s」中介資料檔並不存在。" + +#: src/as-pool.c:758 +msgid "Metadata files have errors:" +msgstr "中介資料檔中有誤:" + +#. TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report +#: tools/ascli-actions-misc.c:114 +msgid "Metainfo files:" +msgstr "中介資料檔:" +#: src/as-provided.c:153 msgid "Modaliases" -msgstr "Modaliases" +msgstr "Modalias 檔" + +#: src/as-category.c:74 +msgctxt "Category of AudioVideo" +msgid "Music Players" +msgstr "音樂播放器" +#: tools/ascli-utils.c:283 msgid "Name" msgstr "名稱" +#: src/as-category.c:266 +msgctxt "Category of Communication" +msgid "News" +msgstr "新聞" + +#: tools/ascli-actions-mdata.c:179 #, c-format msgid "No component matching '%s' found." msgstr "找不到符合「%s」的組件。" -#, c-format -msgid "No component providing '%s;%s' found." -msgstr "找不到供應「%s;%s」的組件。" - +#: tools/ascli-actions-misc.c:103 msgid "No icons." msgstr "無圖示。" +#: tools/ascli-actions-pkgmgr.c:53 msgid "" "No suitable package manager CLI found. Please make sure that e.g. \"pkcon" "\" (part of PackageKit) is available." -msgstr "s" +msgstr "" +"找不到適當的軟體包管理程式 CLI。例如請確認「pkcon」是否可以使用(PackageKit " +"的一部分)。" -msgid "No value for the item to search for defined." +#: tools/ascli-actions-mdata.c:203 +msgid "No value for the item to search for was defined." msgstr "要搜尋的項目未定義該值。" +#. TRANSLATORS: this is the menu spec main category for Office +#: src/as-category.c:317 +msgid "Office" +msgstr "辦公" + +#. TRANSLATORS: An unknown option was passed to appstreamcli. +#: tools/appstream-cli.c:181 +#, c-format +msgid "Option '%s' is unknown." +msgstr "「%s」選項不明。" + +#: tools/ascli-utils.c:285 msgid "Package" msgstr "軟體包" -msgid "Print detailed output about found components" -msgstr "列印有關找到之組件的詳細輸出" - -msgid "Print even pedantic hints when validating" -msgstr "驗證時也列印出繁冗的提示" +#: src/as-category.c:171 +msgctxt "Category of Graphics" +msgid "Photography" +msgstr "攝影" + +#. TRANSLATORS: ascli flag description for: --details +#: tools/appstream-cli.c:98 +msgid "Print detailed output about found components." +msgstr "列印有關找到之組件的詳細輸出。" #. project group +#: tools/ascli-utils.c:347 msgid "Project Group" msgstr "專案群組" +#: tools/ascli-utils.c:392 msgid "Provided Items" msgstr "提供的項目" +#: src/as-provided.c:155 msgid "Python (Version 2)" msgstr "Python (第 2 版)" +#: src/as-provided.c:157 msgid "Python 3" msgstr "Python 3" -msgid "Rebuild the component information cache." -msgstr "重建組件資訊快取。" +#: tools/appstream-cli.c:608 +msgid "Rebuild the component metadata cache." +msgstr "重建組件的中介資料快取。" -msgid "Remove software matching the component-id." +#: tools/appstream-cli.c:614 +msgid "Remove software matching the component-ID." msgstr "移除符合該組件 ID 的軟體。" +#: src/as-category.c:248 +msgctxt "Category of Science" +msgid "Robotics" +msgstr "機器人" + +#: src/as-category.c:150 +msgctxt "Category of Games" +msgid "Role Playing" +msgstr "角色扮演" + +#: tools/appstream-cli.c:185 tools/appstream-cli.c:675 #, c-format msgid "Run '%s --help' to see a full list of available command line options." msgstr "執行「%s --help」查看可用指令列選項的完整清單。" +#: tools/appstream-cli.c:187 +#, c-format +msgid "" +"Run '%s --help' to see a list of available commands and options, and '%s %s " +"--help' to see a list of options specific for this subcommand." +msgstr "" +"執行「%s --help」查看可用指令和選項的清單,而「%s %s --help」則可查看此子指令" +"下專屬的選項清單。" + +#: src/as-provided.c:163 msgid "Runtime Firmware" msgstr "執行時期韌體" -msgid "Sample Screenshot URL" -msgstr "樣本螢幕快照 URL" +#: src/as-category.c:174 +msgctxt "Category of Graphics" +msgid "Scanning" +msgstr "掃描" + +#. TRANSLATORS: this is the menu spec main category for Science +#: src/as-category.c:323 +msgid "Science" +msgstr "科學" +#: tools/appstream-cli.c:601 msgid "Search the component database." msgstr "搜尋組件資料庫。" -msgid "Select a value for the provides-item which needs to be found." -msgstr "選取需要尋找的項目提供之值。" +#: src/as-category.c:293 +msgctxt "Category of Utility" +msgid "Security" +msgstr "安全" + +#. TRANSLATORS: ascli flag description for: --verbose +#: tools/appstream-cli.c:652 +msgid "Show extra debugging information." +msgstr "顯示額外除錯資訊。" + +#. TRANSLATORS: ascli flag description for: --version +#: tools/appstream-cli.c:646 +msgid "Show the program version." +msgstr "顯示程式版本。" + +#: src/as-category.c:153 +msgctxt "Category of Games" +msgid "Sports" +msgstr "運動" + +#: src/as-category.c:157 +msgctxt "Category of Games" +msgid "Strategy" +msgstr "策略" -msgid "Show extra debugging information" -msgstr "顯示額外除錯資訊" - -msgid "Show the program version" -msgstr "顯示程式版本" - -#. these are commands we can use with appstream-cli +#. these are commands we can use with appstreamcli +#: tools/appstream-cli.c:599 msgid "Subcommands:" msgstr "子指令:" +#: tools/ascli-utils.c:284 msgid "Summary" msgstr "摘要" +#. TRANSLATORS: Status summary in ascli +#: tools/ascli-actions-misc.c:143 msgid "Summary:" msgstr "摘要:" -msgid "The system metadata cache does not exist." -msgstr "不存在系統中介資料快取。" +#: src/as-category.c:290 +msgctxt "Category of Utility" +msgid "System Monitoring" +msgstr "系統監控" + +#: src/as-category.c:284 +msgctxt "Category of Utility" +msgid "Terminal Emulators" +msgstr "終端機模擬器" + +#: src/as-category.c:281 +msgctxt "Category of Utility" +msgid "Text Editors" +msgstr "文字編輯器" + +#: tools/ascli-actions-mdata.c:464 +#, c-format +msgid "The .desktop file '%s' does not exist." +msgstr "「%s」.desktop 檔並不存在。" -msgid "The system metadata cache exists." -msgstr "系統中介資料快取已存在。" +#: src/as-pool.c:1544 +msgid "" +"The AppStream system cache was updated, but some errors were detected, which " +"might lead to missing metadata. Refer to the verbose log for more " +"information." +msgstr "" +"AppStream 系統快取已更新,但偵測到一些錯誤可能導致中介資料遺失。請參考詳盡模" +"式記錄瞭解更多資訊。" +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows +#: tools/appstream-cli.c:565 #, c-format -msgid "There was an error while trying to find additional information: %s" -msgstr "試圖尋找額外資訊時發生錯誤:%s" +msgid "The TYPE must be a valid component-type, such as: %s" +msgstr "TYPE 必須是有效組件類型,例如:%s" -msgid "Tried to perform query on closed database." -msgstr "已試圖查詢關閉的資料庫。" +#: tools/ascli-actions-mdata.c:446 +#, c-format +msgid "" +"The software component type '%s' is not valid in AppStream. Possible values " +"are:" +msgstr "「%s」軟體組件類型在 AppStream 中無效。可用的值有:" -#. TRANSLATORS: We failed to find any component in the database due to an error +#. TRANSLATORS: Additional help text for the 'new-template' ascli subcommand +#: tools/appstream-cli.c:562 +msgid "" +"This command takes optional TYPE and FILE positional arguments, FILE being a " +"file to write to (or \"-\" for standard output)." +msgstr "" +"這個指令會取用選填的 TYPE 和 FILE 位置引數,FILE 代表要寫入的檔案(或用「-」" +"表示標準輸出)。" + +#: data/org.freedesktop.appstream.cli.metainfo.xml:15 +msgid "" +"This tool allows for reading, writing, validating and transformation of " +"AppStream XML or YAML metadata. It also gives access to the system metadata " +"pool, for example to query for software that provides a specific MIME-type, " +"and installing it by its software component identifier." +msgstr "" +"本工具可以讀寫、驗證與變換 AppStream XML 或 YAML 中介資料;此外還能存取系統中" +"介資料池,搜尋諸如提供某特定 MIME 類型使用的軟體,並按照其軟體組件辨識碼安裝" +"等。" + +#: tools/ascli-actions-mdata.c:541 +#, c-format +msgid "Unable to build the template metainfo file: %s" +msgstr "無法建置中介資訊檔:%s" + +#. TRANSLATORS: User is trying to convert a file in ascli +#: tools/ascli-actions-mdata.c:397 +msgid "" +"Unable to convert file: Could not determine output format, please set it " +"explicitly using '--format='." +msgstr "無法轉換檔案:無法判定輸出格式,請使用「--format=」明確設定。" + +#. TRANSLATORS: We failed to find any component in the database, likely due to an error +#: tools/ascli-actions-mdata.c:174 #, c-format msgid "Unable to find component matching %s!" msgstr "找不到符合 %s 的組件!" +#: tools/ascli-actions-mdata.c:141 tools/ascli-actions-mdata.c:263 +#: tools/ascli-actions-pkgmgr.c:93 #, c-format -msgid "Unable to find component providing '%s;%s'!" -msgstr "找不到供應「%s;%s」的組件!" +msgid "Unable to find component with ID '%s'!" +msgstr "找不到 ID 為「%s」的組件!" +#: tools/ascli-actions-mdata.c:470 #, c-format -msgid "Unable to find component with id '%s'!" -msgstr "找不到 id 為「%s」的組件!" +msgid "Unable to read the .desktop file: %s" +msgstr "無法讀取 .desktop 檔:%s" -msgid "Unable to open the AppStream software component cache." -msgstr "無法開啟 AppStream 軟體組件快取。" +#: tools/ascli-actions-mdata.c:549 +#, c-format +msgid "Unable to save the template metainfo file: %s" +msgstr "無法儲存範本中介資訊檔:%s" +#: tools/ascli-actions-pkgmgr.c:67 #, c-format msgid "Unable to spawn package manager: %s" msgstr "無法多重啟動軟體包管理程式:%s" +#: tools/ascli-actions-mdata.c:319 #, c-format msgid "Unable to write to '%s', can not install metainfo file." msgstr "無法寫入「%s」,無法安裝中介資料檔。" -msgid "Upstream metadata:" -msgstr "上游中介資料:" +#. TRANSLATORS: ascli has been run with unknown command. +#: tools/appstream-cli.c:750 +#, c-format +msgid "Unknown command '%s'." +msgstr "未知指令「%s」。" + +#. TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) +#: tools/appstream-cli.c:557 +msgid "" +"Use the given .desktop file to fill in the basic values of the metainfo file." +msgstr "使用給定的 .deskotp 檔以在中介資訊檔中填入基礎值。" + +#. TRANSLATORS: this is the menu spec main category for Utilities +#: src/as-category.c:329 +msgid "Utilities" +msgstr "公用程式" +#: tools/appstream-cli.c:610 msgid "Validate AppStream XML files for issues." msgstr "驗證 AppStream XML 檔是否有問題。" +#: tools/appstream-cli.c:611 msgid "Validate an installed file-tree of an application for valid metadata." msgstr "驗證已安裝應用程式的檔案樹是否存在有效的中介資料。" -msgid "Validation failed." -msgstr "驗證失敗。" +#: tools/ascli-actions-validate.c:255 tools/ascli-actions-validate.c:316 +#, c-format +msgid "Validation failed: %s" +msgstr "驗證失敗:%s" +#: tools/ascli-actions-validate.c:243 tools/ascli-actions-validate.c:304 msgid "Validation was successful." msgstr "驗證成功。" +#: tools/ascli-actions-validate.c:245 tools/ascli-actions-validate.c:306 +#, c-format +msgid "Validation was successful: %s" +msgstr "驗證成功:%s" + +#: tools/appstream-cli.c:605 +msgid "Value of the item that should be found." +msgstr "應找到的項目值。" + +#: src/as-category.c:177 +msgctxt "Category of Graphics" +msgid "Vector Graphics" +msgstr "向量圖形" + +#: tools/ascli-actions-misc.c:46 +#, c-format +msgid "Version: %s" +msgstr "版本:%s" + +#: src/as-category.c:180 +msgctxt "Category of Graphics" +msgid "Viewers" +msgstr "檢視器" + +#: tools/ascli-actions-misc.c:151 #, c-format msgid "We have information on %i software components." msgstr "我們有 %i 個軟體組件的相關資訊。" -#, c-format -msgid "XDG Menu XML file '%s' is damaged." -msgstr "XDG 選單 XML 檔案「%s」已損毀。" +#: src/as-category.c:270 +msgctxt "Category of Communication" +msgid "Web Browsers" +msgstr "網頁瀏覽器" + +#: src/as-category.c:202 +msgctxt "Category of Office" +msgid "Word Processor" +msgstr "文書處理器" +#: tools/appstream-cli.c:623 +msgid "" +"You can find information about subcommand-specific options by passing \"--" +"help\" to the subcommand." +msgstr "您可以藉由傳遞「--help」給子指令來查詢子指令專屬的選項資訊。" + +#. TRANSLATORS: In ascli: The requested action needs higher permissions. +#: tools/ascli-actions-mdata.c:70 msgid "You might need superuser permissions to perform this action." msgstr "您也許需要超級使用者權利才能執行此動作。" +#: tools/ascli-actions-mdata.c:444 +msgid "" +"You need to give an AppStream software component type to generate a " +"template. Possible values are:" +msgstr "您需要給予 AppStream 軟體組件類型以生成範本。可用的值有:" + +#. TRANSLATORS: ascli has been run without command. +#: tools/appstream-cli.c:674 msgid "You need to specify a command." msgstr "您需要指定個指令。" -msgid "You need to specify a component-id." -msgstr "您需要指定個組件 id。" +#. TRANSLATORS: An AppStream component-id is missing in the command-line arguments +#. TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. +#: tools/ascli-actions-mdata.c:129 tools/ascli-actions-mdata.c:251 +#: tools/ascli-actions-pkgmgr.c:80 +msgid "You need to specify a component-ID." +msgstr "您需要指定組件 ID。" +#: tools/ascli-actions-validate.c:223 msgid "You need to specify a file to validate!" msgstr "您需要指定個檔案來驗證!" +#: tools/ascli-actions-mdata.c:306 msgid "You need to specify a metadata file." msgstr "您需要指定中介資料檔。" +#: tools/ascli-actions-validate.c:281 msgid "You need to specify a root directory to start validation!" msgstr "您需要指定根基目錄才能開始驗證!" +#: tools/ascli-actions-mdata.c:161 msgid "You need to specify a term to search for." msgstr "您需要指定個關鍵字來搜尋。" +#: tools/ascli-actions-mdata.c:354 +msgid "You need to specify an input and output file." +msgstr "您需要指定輸入檔和輸出檔。" + #. TRANSLATORS: List of "grey-listed" words sperated with ";" #. * Do not translate this list directly. Instead, #. * provide a list of words in your language that people are likely #. * to include in a search but that should normally be ignored in #. * the search. #. +#: src/as-pool.c:104 msgid "app;application;package;program;programme;suite;tool" msgstr "" "app;application;package;program;programme;suite;tool;程式;應用程式;軟體包;套" "件;套裝軟體;工具;公用程式" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:183 +#, c-format +msgid "errors: %lu" +msgstr "errors: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:197 +#, c-format +msgid "infos: %lu" +msgstr "infos: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:204 +#, c-format +msgid "pedantic: %lu" +msgstr "pedantic: %lu" + +#. TRANSLATORS: Used for small issue-statistics in appstreamcli-validate +#: tools/ascli-actions-validate.c:190 +#, c-format +msgid "warnings: %lu" +msgstr "warnings: %lu" + +#~ msgid "Command '%s' is unknown." +#~ msgstr "指令「%s」未知。" + +#~ msgid "Do not use any caches when performing the request." +#~ msgstr "執行請求時不要使用任何快取。" + +#~ msgid "AppStream cache update failed." +#~ msgstr "AppStream 快取更新失敗。" + +#~ msgid "" +#~ "AppStream data pool was loaded, but some metadata was ignored due to " +#~ "errors." +#~ msgstr "已載入 AppStrem 資料集池,但是有些中介資料因錯誤而忽略。" + +#~ msgid "Can not search for unknown component type." +#~ msgstr "無法搜尋未知的組件類型。" + +#, fuzzy +#~ msgid "Category of Education" +#~ msgstr "教育" + +#, fuzzy +#~ msgid "Category of Games" +#~ msgstr "類別" + +#, fuzzy +#~ msgid "Category of Office" +#~ msgstr "類別" + +#, fuzzy +#~ msgid "Category of Science" +#~ msgstr "類別" + +#~ msgid "Extensions" +#~ msgstr "擴充套件" + +#~ msgid "File %s not found or permission denied!" +#~ msgstr "找不到檔案 %s,或未獲得存取許可!" + +#~ msgid "No component providing '%s::%s' found." +#~ msgstr "找不到供應「%s::%s」的組件。" + +#~ msgid "XDG Menu XML file '%s' is damaged." +#~ msgstr "XDG 選單 XML 檔案「%s」已損毀。" diff -Nru appstream-0.9.4/qt/AppstreamQtConfig.cmake.in appstream-0.12.0/qt/AppstreamQtConfig.cmake.in --- appstream-0.9.4/qt/AppstreamQtConfig.cmake.in 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/AppstreamQtConfig.cmake.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -@PACKAGE_INIT@ - -include("${CMAKE_CURRENT_LIST_DIR}/AppstreamQtTargets.cmake") diff -Nru appstream-0.9.4/qt/appstreamqt_export.h appstream-0.12.0/qt/appstreamqt_export.h --- appstream-0.9.4/qt/appstreamqt_export.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/appstreamqt_export.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,42 @@ + +#ifndef APPSTREAMQT_EXPORT_H +#define APPSTREAMQT_EXPORT_H + +#ifdef APPSTREAMQT_STATIC_DEFINE +# define APPSTREAMQT_EXPORT +# define APPSTREAMQT_NO_EXPORT +#else +# ifndef APPSTREAMQT_EXPORT +# ifdef AppStreamQt_EXPORTS + /* We are building this library */ +# define APPSTREAMQT_EXPORT __attribute__((visibility("default"))) +# else + /* We are using this library */ +# define APPSTREAMQT_EXPORT __attribute__((visibility("default"))) +# endif +# endif + +# ifndef APPSTREAMQT_NO_EXPORT +# define APPSTREAMQT_NO_EXPORT __attribute__((visibility("hidden"))) +# endif +#endif + +#ifndef APPSTREAMQT_DEPRECATED +# define APPSTREAMQT_DEPRECATED __attribute__ ((__deprecated__)) +#endif + +#ifndef APPSTREAMQT_DEPRECATED_EXPORT +# define APPSTREAMQT_DEPRECATED_EXPORT APPSTREAMQT_EXPORT APPSTREAMQT_DEPRECATED +#endif + +#ifndef APPSTREAMQT_DEPRECATED_NO_EXPORT +# define APPSTREAMQT_DEPRECATED_NO_EXPORT APPSTREAMQT_NO_EXPORT APPSTREAMQT_DEPRECATED +#endif + +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef APPSTREAMQT_NO_DEPRECATED +# define APPSTREAMQT_NO_DEPRECATED +# endif +#endif + +#endif diff -Nru appstream-0.9.4/qt/bundle.cpp appstream-0.12.0/qt/bundle.cpp --- appstream-0.9.4/qt/bundle.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/bundle.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" +#include "bundle.h" + +#include +#include +#include +#include "chelpers.h" + +using namespace AppStream; + +QString Bundle::kindToString(Bundle::Kind kind) +{ + return as_bundle_kind_to_string((AsBundleKind) kind); +} + +Bundle::Kind Bundle::stringToKind(const QString& kindString) +{ + return Bundle::Kind(as_bundle_kind_from_string(qPrintable(kindString))); +} + +class AppStream::BundleData : public QSharedData { +public: + BundleData() + { + m_bundle = as_bundle_new(); + } + + BundleData(AsBundle *bundle) + : m_bundle(bundle) + { + g_object_ref(m_bundle); + } + + ~BundleData() + { + g_object_unref(m_bundle); + } + + bool operator==(const BundleData& rd) const + { + return rd.m_bundle == m_bundle; + } + + AsBundle *bundle() const + { + return m_bundle; + } + + AsBundle* m_bundle; +}; + +Bundle::Bundle() + : d(new BundleData()) +{} + +Bundle::Bundle(_AsBundle* bundle) + : d(new BundleData(bundle)) +{} + +Bundle::Bundle(const Bundle &bundle) = default; + +Bundle::~Bundle() = default; + +Bundle& Bundle::operator=(const Bundle &bundle) = default; + +bool Bundle::operator==(const Bundle &other) const +{ + if(this->d == other.d) { + return true; + } + if(this->d && other.d) { + return *(this->d) == *other.d; + } + return false; +} + +_AsBundle * AppStream::Bundle::asBundle() const +{ + return d->bundle(); +} + +Bundle::Kind Bundle::kind() const +{ + return Bundle::Kind(as_bundle_get_kind(d->m_bundle)); +} + +void Bundle::setKind(Kind kind) +{ + as_bundle_set_kind(d->m_bundle, (AsBundleKind) kind); +} + +QString Bundle::id() const +{ + return valueWrap(as_bundle_get_id(d->m_bundle)); +} + +void Bundle::setId(const QString& id) +{ + as_bundle_set_id(d->m_bundle, qPrintable(id)); +} + +bool Bundle::isEmpty() const +{ + return as_bundle_get_id(d->m_bundle) == NULL; +} + +QDebug operator<<(QDebug s, const AppStream::Bundle& bundle) +{ + s.nospace() << "AppStream::Bundle(" << bundle.id() << ")"; + return s.space(); +} diff -Nru appstream-0.9.4/qt/bundle.h appstream-0.12.0/qt/bundle.h --- appstream-0.9.4/qt/bundle.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/bundle.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_BUNDLE_H +#define APPSTREAMQT_BUNDLE_H + +#include +#include +#include +#include "appstreamqt_export.h" + +struct _AsBundle; +namespace AppStream { + +class BundleData; +class APPSTREAMQT_EXPORT Bundle { + Q_GADGET + public: + Bundle(); + Bundle(_AsBundle *bundle); + Bundle(const Bundle& bundle); + ~Bundle(); + + Bundle& operator=(const Bundle& bundle); + bool operator==(const Bundle& r) const; + + /** + * \returns the internally stored AsBundle + */ + _AsBundle *asBundle() const; + + enum Kind { + KindUnknown, + KindPackage, + KindLimba, + KindFlatpak, + KindAppImage, + KindSnap + }; + Q_ENUM(Kind) + + static Kind stringToKind(const QString& kindString); + static QString kindToString(Kind kind); + + /** + * \return the bundle kind. + */ + Kind kind() const; + void setKind(Kind kind); + + /** + * \return the bundle ID. + */ + QString id() const; + void setId(const QString& id); + + bool isEmpty() const; + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Bundle& bundle); + +#endif // APPSTREAMQT_BUNDLE_H diff -Nru appstream-0.9.4/qt/category.cpp appstream-0.12.0/qt/category.cpp --- appstream-0.9.4/qt/category.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/category.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" +#include "category.h" + +#include +#include "chelpers.h" + +using namespace AppStream; + +class AppStream::CategoryData : public QSharedData { +public: + CategoryData(AsCategory* cat) : m_category(cat) + { + g_object_ref(m_category); + } + + ~CategoryData() + { + g_object_unref(m_category); + } + + bool operator==(const CategoryData& rd) const + { + return rd.m_category == m_category; + } + + AsCategory *category() const + { + return m_category; + } + + AsCategory* m_category; +}; + +Category::Category(_AsCategory* category) + : d(new CategoryData(category)) +{} + +Category::Category(const Category &category) = default; + +Category::~Category() = default; + +Category& Category::operator=(const Category &category) = default; + +bool Category::operator==(const Category &other) const +{ + if(this->d == other.d) { + return true; + } + if(this->d && other.d) { + return *(this->d) == *other.d; + } + return false; +} + +_AsCategory * AppStream::Category::asCategory() const +{ + return d->category(); +} + +QString Category::id() const +{ + return valueWrap(as_category_get_id(d->m_category)); +} + +QString Category::name() const +{ + return valueWrap(as_category_get_name(d->m_category)); +} + +QString Category::summary() const +{ + return valueWrap(as_category_get_summary(d->m_category)); +} + +QString Category::icon() const +{ + return valueWrap(as_category_get_icon(d->m_category)); +} + +QList Category::children() const +{ + auto children = as_category_get_children(d->m_category); + QList ret; + ret.reserve(children->len); + for(uint i = 0; i < children->len; i++) { + auto ccat = AS_CATEGORY (g_ptr_array_index (children, i)); + ret << Category(ccat); + } + return ret; +} + +QStringList Category::desktopGroups() const +{ + auto dgs = as_category_get_desktop_groups(d->m_category); + QStringList ret; + ret.reserve(dgs->len); + for(uint i = 0; i < dgs->len; i++) { + auto dg = (const gchar*) g_ptr_array_index (dgs, i); + ret << valueWrap(dg); + } + return ret; +} + +QDebug operator<<(QDebug s, const AppStream::Category& category) +{ + s.nospace() << "AppStream::Category(" << category.id() << ")"; + return s.space(); +} + +QList getDefaultCategories(bool withSpecial) +{ + auto cats = as_get_default_categories(withSpecial); + QList ret; + ret.reserve(cats->len); + for(uint i = 0; i < cats->len; i++) { + auto cat = AS_CATEGORY (g_ptr_array_index (cats, i)); + ret << Category(cat); + } + return ret; +} diff -Nru appstream-0.9.4/qt/category.h appstream-0.12.0/qt/category.h --- appstream-0.9.4/qt/category.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/category.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_CATEGORY_H +#define APPSTREAMQT_CATEGORY_H + +#include +#include +#include +#include "appstreamqt_export.h" + +struct _AsCategory; + +namespace AppStream { + +class CategoryData; + +class APPSTREAMQT_EXPORT Category { + Q_GADGET + public: + Category(_AsCategory* category); + Category(const Category& category); + ~Category(); + + Category& operator=(const Category& category); + bool operator==(const Category& r) const; + + /** + * \returns the internally stored AsCategory + */ + _AsCategory *asCategory() const; + + QString id() const; + QString name() const; + QString summary() const; + QString icon() const; + + QList children() const; + QStringList desktopGroups() const; + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Category& category); + +QList getDefaultCategories(bool withSpecial); + +#endif // APPSTREAMQT_CATEGORY_H diff -Nru appstream-0.9.4/qt/chelpers.h appstream-0.12.0/qt/chelpers.h --- appstream-0.9.4/qt/chelpers.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/chelpers.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_CHELPERS_H +#define APPSTREAMQT_CHELPERS_H + +#include +#include + +namespace AppStream { + +inline QString valueWrap(const gchar *cstr) +{ + return QString::fromUtf8(cstr); +} + +inline QStringList valueWrap(gchar **strv) +{ + QStringList res; + if (strv == NULL) + return res; + for (uint i = 0; strv[i] != NULL; i++) { + res.append (QString::fromUtf8(strv[i])); + } + return res; +} + +inline QStringList valueWrap(GPtrArray *array) +{ + QStringList res; + res.reserve(array->len); + for (uint i = 0; i < array->len; i++) { + auto strval = (const gchar*) g_ptr_array_index (array, i); + res.append (QString::fromUtf8(strval)); + } + return res; +} + +inline QStringList valueWrap(GList *list) +{ + GList *l; + QStringList res; + res.reserve(g_list_length(list)); + for (l = list; l != NULL; l = l->next) { + auto strval = (const gchar*) l->data; + res.append (QString::fromUtf8(strval)); + } + return res; +} + +inline char ** stringListToCharArray(const QStringList& list) +{ + char **array = (char**) g_malloc(sizeof(char*) * list.size()); + for (int i = 0; i < list.size(); ++i) { + const QByteArray string = list[i].toLocal8Bit(); + array[i] = (char*) g_malloc(sizeof(char) * (string.size() + 1)); + strcpy(array[i], string.constData()); + } + return array; +} + +} + +#endif // APPSTREAMQT_CHELPERS_H diff -Nru appstream-0.9.4/qt/cmake/AppStreamQtConfig.cmake.in appstream-0.12.0/qt/cmake/AppStreamQtConfig.cmake.in --- appstream-0.9.4/qt/cmake/AppStreamQtConfig.cmake.in 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/cmake/AppStreamQtConfig.cmake.in 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,41 @@ + +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../" ABSOLUTE) + +# Use original install prefix when loaded through a "/usr move" +# cross-prefix symbolic link such as /lib -> /usr/lib. +get_filename_component(_realCurr "${CMAKE_CURRENT_LIST_DIR}" REALPATH) +get_filename_component(_realOrig "@LIBDIR_FULL@/cmake/AppStreamQt" REALPATH) +if(_realCurr STREQUAL _realOrig) + set(PACKAGE_PREFIX_DIR "@PREFIX@") +endif() +unset(_realOrig) +unset(_realCurr) + +macro(set_and_check _var _file) + set(${_var} "${_file}") + if(NOT EXISTS "${_file}") + message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") + endif() +endmacro() + +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +add_library(AppStreamQt SHARED IMPORTED) +set_target_properties(AppStreamQt PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/include/" + INTERFACE_LINK_LIBRARIES "Qt5::Core" + IMPORTED_LOCATION "@LIBDIR_FULL@/libAppStreamQt.so.${AppStreamQt_VERSION}" + IMPORTED_SONAME "libAppStreamQt.${AppStreamQt_VERSION_MAJOR}" +) + +#################################################################################### + +check_required_components(Qt5Core) diff -Nru appstream-0.9.4/qt/cmake/AppStreamQtConfigVersion.cmake.in appstream-0.12.0/qt/cmake/AppStreamQtConfigVersion.cmake.in --- appstream-0.9.4/qt/cmake/AppStreamQtConfigVersion.cmake.in 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/cmake/AppStreamQtConfigVersion.cmake.in 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,32 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, +# but only if the requested major version is the same as the current one. +# The variable CVF_VERSION must be set before calling configure_file(). + +set(PACKAGE_VERSION "@VERSION@") + +if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + + if("@VERSION@" MATCHES "^([0-9]+)\\.") + set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") + else() + set(CVF_VERSION_MAJOR "@VERSION@") + endif() + + if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff -Nru appstream-0.9.4/qt/CMakeLists.txt appstream-0.12.0/qt/CMakeLists.txt --- appstream-0.9.4/qt/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -project(AppstreamQt) -cmake_minimum_required(VERSION 3.2.0 FATAL_ERROR) - -include(CMakePackageConfigHelpers) -include(GenerateExportHeader) -add_compiler_export_flags() - -find_package(Xapian 1.2 REQUIRED) -find_package(Protobuf REQUIRED) -find_package(Qt5 REQUIRED COMPONENTS Core) -include(GNUInstallDirs) - -set(APPSTREAMQT_SO_VERSION 1) -set(APPSTREAMQT_VERSION ${AS_VERSION}) - -set(CMAKE_AUTOMOC on) -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) -set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) - -if(COMMAND cmake_policy) - cmake_policy(SET CMP0003 NEW) -endif(COMMAND cmake_policy) - -set(APPSTREAMQT_SRC - component.cpp - database.cpp - image.cpp - provides.cpp - screenshot.cpp -) - -set(APPSTREAMQT_PUBLIC_HEADERS - component.h - database.h - image.h - provides.h - screenshot.h -) - -set(ASCACHEPROTO_SRC - ${CMAKE_BINARY_DIR}/src/asxentries.pb.h - ${CMAKE_BINARY_DIR}/src/asxentries.pb.cc -) -set_source_files_properties(${ASCACHEPROTO_SRC} PROPERTIES GENERATED TRUE) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/src/xapian - ${CMAKE_BINARY_DIR}/src -) - -add_library(AppstreamQt SHARED ${APPSTREAMQT_SRC} ${ASCACHEPROTO_SRC}) -add_dependencies(AppstreamQt appstream) -target_link_libraries(AppstreamQt PUBLIC Qt5::Core PRIVATE ${XAPIAN_LIBRARIES} ${PROTOBUF_LITE_LIBRARIES}) -target_include_directories(AppstreamQt PUBLIC "$") -generate_export_header(AppstreamQt) - -set_property(TARGET AppstreamQt PROPERTY VERSION "${APPSTREAMQT_VERSION}") -set_property(TARGET AppstreamQt PROPERTY SOVERSION "${APPSTREAMQT_SO_VERSION}" ) - -install(TARGETS AppstreamQt EXPORT AppstreamQtTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -) - -install(FILES ${APPSTREAMQT_PUBLIC_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/appstreamqt_export.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/AppstreamQt") - -write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/AppstreamQtConfigVersion.cmake VERSION ${APPSTREAMQT_VERSION} COMPATIBILITY SameMajorVersion ) - -export(TARGETS AppstreamQt - FILE "${CMAKE_CURRENT_BINARY_DIR}/AppstreamQtTargets.cmake") - -set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/AppstreamQt) - -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/AppstreamQtConfig.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/AppstreamQtConfig.cmake" - @ONLY -) - -install(EXPORT AppstreamQtTargets - FILE AppstreamQtTargets.cmake - DESTINATION ${ConfigPackageLocation}) - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/AppstreamQtConfigVersion.cmake ${CMAKE_CURRENT_BINARY_DIR}/AppstreamQtConfig.cmake DESTINATION ${ConfigPackageLocation}) - -add_subdirectory(test) diff -Nru appstream-0.9.4/qt/component.cpp appstream-0.12.0/qt/component.cpp --- appstream-0.9.4/qt/component.cpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/component.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -1,431 +1,692 @@ /* - * Part of Appstream, a library for accessing AppStream on-disk database - * Copyright 2014 Sune Vuorela + * Copyright (C) 2016 Matthias Klumpp * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . */ +#include "appstream.h" #include "component.h" -#include "screenshot.h" + #include #include #include +#include #include +#include "chelpers.h" +#include "icon.h" +#include "screenshot.h" +#include "release.h" +#include "bundle.h" +#include "suggested.h" +#include "contentrating.h" +#include "launchable.h" +#include "translation.h" + +using namespace AppStream; + +typedef QHash KindMap; +Q_GLOBAL_STATIC_WITH_ARGS(KindMap, kindMap, ( { + { Component::KindGeneric, QLatin1String("generic") }, + { Component::KindDesktopApp, QLatin1String("desktop-application") }, + { Component::KindConsoleApp, QLatin1String("console-application") }, + { Component::KindWebApp, QLatin1String("web-application") }, + { Component::KindAddon, QLatin1String("addon") }, + { Component::KindFont, QLatin1String("font") }, + { Component::KindCodec, QLatin1String("codec") }, + { Component::KindInputmethod, QLatin1String("inputmethod") }, + { Component::KindFirmware, QLatin1String("firmware") }, + { Component::KindDriver, QLatin1String("driver") }, + { Component::KindLocalization, QLatin1String("localization") }, + { Component::KindUnknown, QLatin1String("unknown") } + } +)); + +QString Component::kindToString(Component::Kind kind) { + return kindMap->value(kind); +} + +Component::Kind Component::stringToKind(const QString& kindString) { + if(kindString.isEmpty()) { + return KindGeneric; + } + if(kindString == QLatin1String("generic")) + return KindGeneric; + + if (kindString == QLatin1String("desktop-application")) + return KindDesktopApp; + + if (kindString == QLatin1String("console-application")) + return KindConsoleApp; -using namespace Appstream; + if (kindString == QLatin1String("web-application")) + return KindWebApp; -class Appstream::ComponentData : public QSharedData { - public: - QStringList m_categories; - QStringList m_compulsoryForDesktops; - QString m_description; - QString m_developerName; - QStringList m_extends; - QStringList m_extensions; - QString m_icon; - QString m_id; - Component::Kind m_kind; - QString m_name; - QStringList m_packageNames; - QString m_projectGroup; - QString m_projectLicense; - QString m_summary; - QHash m_iconUrls; - QMultiHash m_urls; - QList m_screenshots; - QMultiHash m_provides; - QHash m_bundles; - bool operator==(const ComponentData& other) const { - if(m_categories != other.m_categories) { - return false; - } - if(m_compulsoryForDesktops != other.m_compulsoryForDesktops) { - return false; - } - if(m_description != other.m_description) { - return false; - } - if(m_developerName != other.m_developerName) { - return false; - } - if(m_extends != other.m_extends) { - return false; - } - if(m_icon != other.m_icon) { - return false; - } - if(m_iconUrls != other.m_iconUrls) { - return false; - } - if(m_id != other.m_id) { - return false; - } - if(m_kind != other.m_kind) { - return false; - } - if(m_name != other.m_name) { - return false; - } - if(m_packageNames != other.m_packageNames) { - return false; - } - if(m_projectGroup != other.m_projectGroup) { - return false; - } - if(m_projectLicense != other.m_projectLicense) { - return false; - } - if(m_summary != other.m_summary) { - return false; - } - if(m_urls != other.m_urls) { - return false; - } - if(m_screenshots != other.m_screenshots) { - return false; - } - if(m_provides != other.m_provides) { - return false; - } - if(m_bundles != other.m_bundles) { - return false; - } + if (kindString == QLatin1String("addon")) + return KindAddon; - // we don't check for m_extensions, since this is auto-generated and not a specific property of a component. + if (kindString == QLatin1String("font")) + return KindFont; - return true; - } -}; + if (kindString == QLatin1String("codec")) + return KindCodec; + if (kindString==QLatin1String("inputmethod")) + return KindInputmethod; + + if (kindString == QLatin1String("firmware")) + return KindFirmware; + + if (kindString == QLatin1String("driver")) + return KindDriver; + + if (kindString == QLatin1String("localization")) + return KindLocalization; + + return KindUnknown; -QStringList Component::categories() const { - return d->m_categories; } -QStringList Component::compulsoryForDesktops() const { - return d->m_compulsoryForDesktops; +Component::UrlKind Component::stringToUrlKind(const QString& urlKindString) { + if (urlKindString == QLatin1String("homepage")) { + return UrlKindHomepage; + } + if (urlKindString == QLatin1String("bugtracker")) { + return UrlKindBugtracker; + } + if (urlKindString == QLatin1String("faq")) { + return UrlKindFaq; + } + if (urlKindString == QLatin1String("help")) { + return UrlKindHelp; + } + if (urlKindString == QLatin1String("donation")) { + return UrlKindDonation; + } + return UrlKindUnknown; } -QString Component::description() const { - return d->m_description; +typedef QHash UrlKindMap; +Q_GLOBAL_STATIC_WITH_ARGS(UrlKindMap, urlKindMap, ({ + { Component::UrlKindBugtracker, QLatin1String("bugtracker") }, + { Component::UrlKindDonation, QLatin1String("donation") }, + { Component::UrlKindFaq, QLatin1String("faq") }, + { Component::UrlKindHelp, QLatin1String("help") }, + { Component::UrlKindHomepage, QLatin1String("homepage") }, + { Component::UrlKindUnknown, QLatin1String("unknown") }, + })); + +QString Component::urlKindToString(Component::UrlKind kind) { + return urlKindMap->value(kind); } -QString Component::developerName() const { - return d->m_developerName; +Component::Component(const Component& other) + : m_cpt(other.m_cpt) +{ + g_object_ref(m_cpt); } -bool Component::hasCategory(const QString& category) const { - return d->m_categories.contains(category); +Component::Component() +{ + m_cpt = as_component_new(); } -QString Component::icon() const { - return d->m_icon; +Component::Component(_AsComponent *cpt) + : m_cpt(cpt) +{ + g_object_ref(m_cpt); } -QUrl Component::iconUrl(const QSize& size) const { - QString sizeStr; - // if no size was specified, we assume 64x64 - if (size.isValid()) - sizeStr = QStringLiteral("%1x%2").arg(size.width()).arg(size.height()); - else - sizeStr = QStringLiteral("64x64"); - return d->m_iconUrls.value(sizeStr); +Component::~Component() +{ + g_object_unref(m_cpt); } -QString Component::id() const { - return d->m_id; +Component& Component::operator=(const Component& other) +{ + if (&other != this) { + g_object_unref(m_cpt); + m_cpt = AS_COMPONENT(g_object_ref(other.m_cpt)); + } + return *this; } -bool Component::isCompulsoryForDesktop(const QString& desktop) const { - return d->m_compulsoryForDesktops.contains(desktop); +Component::Component(Component&& other) + : m_cpt(other.m_cpt) +{ } -Component::Kind Component::kind() const { - return d->m_kind; +_AsComponent * AppStream::Component::asComponent() const +{ + return m_cpt; } -QString Component::name() const { - return d->m_name; +uint AppStream::Component::valueFlags() const +{ + return (uint) as_component_get_value_flags(m_cpt); } -QStringList Component::packageNames() const { - return d->m_packageNames; +void AppStream::Component::setValueFlags(uint flags) +{ + as_component_set_value_flags(m_cpt, (AsValueFlags) flags); } -QString Component::projectGroup() const { - return d->m_projectGroup; +QString AppStream::Component::activeLocale() const +{ + return valueWrap(as_component_get_active_locale(m_cpt)); } -QString Component::projectLicense() const { - return d->m_projectLicense; +void AppStream::Component::setActiveLocale(const QString& locale) +{ + as_component_set_active_locale(m_cpt, qPrintable(locale)); } -void Component::setCategories(const QStringList& categories) { - d->m_categories = categories; +Component::Kind Component::kind() const +{ + return static_cast(as_component_get_kind (m_cpt)); } -void Component::setCompulsoryForDesktops(const QStringList& desktops) { - d->m_compulsoryForDesktops = desktops; +void Component::setKind(Component::Kind kind) +{ + as_component_set_kind(m_cpt, static_cast(kind)); } -void Component::setDescription(const QString& description) { - d->m_description = description; +QString AppStream::Component::origin() const +{ + return valueWrap(as_component_get_origin(m_cpt)); } -void Component::setDeveloperName(const QString& developerName) { - d->m_developerName = developerName; +void AppStream::Component::setOrigin(const QString& origin) +{ + as_component_set_origin(m_cpt, qPrintable(origin)); } -void Component::setIcon(const QString& icon) { - d->m_icon = icon; +QString Component::id() const +{ + return valueWrap(as_component_get_id(m_cpt)); } -void Component::addIconUrl(const QUrl& iconUrl, const QSize& size) { - QString sizeStr; - // if no size was specified, we assume 64x64 - if (size.isValid()) - sizeStr = QStringLiteral("%1x%2").arg(size.width()).arg(size.height()); - else - sizeStr = QStringLiteral("64x64"); - d->m_iconUrls.insert(sizeStr, iconUrl); +void Component::setId(const QString& id) +{ + as_component_set_id(m_cpt, qPrintable(id)); } -void Component::setId(const QString& id) { - d->m_id = id; +QString Component::dataId() const +{ + return valueWrap(as_component_get_data_id(m_cpt)); } -void Component::setKind(Component::Kind kind) { - d->m_kind = kind; +void Component::setDataId(const QString& cdid) +{ + as_component_set_data_id(m_cpt, qPrintable(cdid)); } -void Component::setName(const QString& name) { - d->m_name = name; +QStringList Component::packageNames() const +{ + return valueWrap(as_component_get_pkgnames(m_cpt)); } -void Component::setPackageNames(const QStringList& packageNames) { - d->m_packageNames = packageNames; +void AppStream::Component::setPackageNames(const QStringList& list) +{ + char **packageList = stringListToCharArray(list); + as_component_set_pkgnames(m_cpt, packageList); + g_strfreev(packageList); } -void Component::setProjectGroup(const QString& group) { - d->m_projectGroup = group; +QString AppStream::Component::sourcePackageName() const +{ + return valueWrap(as_component_get_source_pkgname(m_cpt)); } -void Component::setProjectLicense(const QString& license){ - d->m_projectLicense = license; +void AppStream::Component::setSourcePackageName(const QString& sourcePkg) +{ + as_component_set_source_pkgname(m_cpt, qPrintable(sourcePkg)); } -void Component::setSummary(const QString& summary){ - d->m_summary = summary; +QString Component::name() const +{ + return valueWrap(as_component_get_name(m_cpt)); } -QString Component::summary() const { - return d->m_summary; +void Component::setName(const QString& name, const QString& lang) +{ + as_component_set_name(m_cpt, qPrintable(name), lang.isEmpty()? NULL : qPrintable(lang)); } -QStringList Component::extends() const { - return d->m_extends; +QString Component::summary() const +{ + return valueWrap(as_component_get_summary(m_cpt)); } -void Component::setExtends(const QStringList& extends) { - d->m_extends = extends; +void Component::setSummary(const QString& summary, const QString& lang) +{ + as_component_set_summary(m_cpt, qPrintable(summary), lang.isEmpty()? NULL : qPrintable(lang)); } -QStringList Component::extensions() const { - return d->m_extensions; +QString Component::description() const +{ + return valueWrap(as_component_get_description(m_cpt)); } -void Component::setExtensions(const QStringList& extensions) { - d->m_extensions = extensions; +void Component::setDescription(const QString& description, const QString& lang) +{ + as_component_set_description(m_cpt, qPrintable(description), lang.isEmpty()? NULL : qPrintable(lang)); } -Component::Component(const Component& other) : d(other.d) { +AppStream::Launchable AppStream::Component::launchable(AppStream::Launchable::Kind kind) const +{ + auto launch = as_component_get_launchable(m_cpt, (AsLaunchableKind) kind); + if (launch == NULL) + return Launchable(); + return Launchable(launch); +} +void AppStream::Component::addLaunchable(const AppStream::Launchable& launchable) +{ + as_component_add_launchable(m_cpt, launchable.asLaunchable()); } -Component::Component() : d(new ComponentData) { +QString AppStream::Component::metadataLicense() const +{ + return valueWrap(as_component_get_metadata_license(m_cpt)); +} +void AppStream::Component::setMetadataLicense(const QString& license) +{ + as_component_set_metadata_license(m_cpt, qPrintable(license)); } -Component& Component::operator=(const Component& other) { - this->d = other.d; - return *this; +QString Component::projectLicense() const +{ + return valueWrap(as_component_get_project_license(m_cpt)); +} + +void Component::setProjectLicense(const QString& license) +{ + as_component_set_project_license(m_cpt, qPrintable(license)); } -void Component::setUrls(const QMultiHash< Component::UrlKind, QUrl >& urls) { - d->m_urls = urls; +QString Component::projectGroup() const +{ + return valueWrap(as_component_get_project_group(m_cpt)); } -QList< QUrl > Component::urls(Component::UrlKind kind) const { - return d->m_urls.values(kind); + +void Component::setProjectGroup(const QString& group) +{ + as_component_set_project_group(m_cpt, qPrintable(group)); } -QMultiHash< Component::UrlKind, QUrl > Component::urls() const { - return d->m_urls; +QString Component::developerName() const +{ + return valueWrap(as_component_get_developer_name(m_cpt)); } -void Component::setBundles(const QHash< Component::BundleKind, QString >& bundles) { - d->m_bundles = bundles; +void Component::setDeveloperName(const QString& developerName, const QString& lang) +{ + as_component_set_developer_name(m_cpt, qPrintable(developerName), lang.isEmpty()? NULL : qPrintable(lang)); } -QString Component::bundle(Component::BundleKind kind) const { - return d->m_bundles.value(kind); + +QStringList Component::compulsoryForDesktops() const +{ + return valueWrap(as_component_get_compulsory_for_desktops(m_cpt)); } -QHash< Component::BundleKind, QString > Component::bundles() const { - return d->m_bundles; +void AppStream::Component::setCompulsoryForDesktop(const QString& desktop) +{ + as_component_set_compulsory_for_desktop(m_cpt, qPrintable(desktop)); } +bool Component::isCompulsoryForDesktop(const QString& desktop) const +{ + return as_component_is_compulsory_for_desktop(m_cpt, qPrintable(desktop)); +} +QStringList Component::categories() const +{ + return valueWrap(as_component_get_categories(m_cpt)); +} +void AppStream::Component::addCategory(const QString& category) +{ + as_component_add_category(m_cpt, qPrintable(category)); +} +bool Component::hasCategory(const QString& category) const +{ + return as_component_has_category(m_cpt, qPrintable(category)); +} -bool Component::operator==(const Component& other) { - if(this->d == other.d) { - return true; - } - if(this->d && other.d) { - return *(this->d) == *other.d; - } - return false; +QStringList Component::extends() const +{ + return valueWrap(as_component_get_extends(m_cpt)); } -Component::~Component() = default; +void AppStream::Component::addExtends(const QString& extend) +{ + as_component_add_extends(m_cpt, qPrintable(extend)); +} -typedef QHash KindMap; -Q_GLOBAL_STATIC_WITH_ARGS(KindMap, kindMap, ( { - { Component::KindAddon, QLatin1String("addon") }, - { Component::KindCodec, QLatin1String("codec") }, - { Component::KindDesktop, QLatin1String("desktop") }, - { Component::KindFont, QLatin1String("font") }, - { Component::KindGeneric, QLatin1String("generic") }, - { Component::KindInputmethod, QLatin1String("inputmethod") }, - { Component::KindAddon, QLatin1String("firmware") }, - { Component::KindUnknown, QLatin1String("unknown") } +QList Component::addons() const +{ + QList res; + + auto addons = as_component_get_addons (m_cpt); + res.reserve(addons->len); + for (uint i = 0; i < addons->len; i++) { + auto cpt = AS_COMPONENT (g_ptr_array_index (addons, i)); + res.append(Component(cpt)); } -)); + return res; +} -QString Component::kindToString(Component::Kind kind) { - return kindMap->value(kind); +void AppStream::Component::addAddon(const AppStream::Component& addon) +{ + as_component_add_addon(m_cpt, addon.asComponent()); } -Component::Kind Component::stringToKind(const QString& kindString) { - if(kindString == QLatin1String("generic")) { - return KindGeneric; - } - if (kindString == QLatin1String("desktop")) { - return KindDesktop; - } - if (kindString == QLatin1String("font")) { - return KindFont; - } - if (kindString == QLatin1String("codec")) { - return KindCodec; - } - if (kindString==QLatin1String("inputmethod")) { - return KindInputmethod; - } - if (kindString == QLatin1String("addon")) { - return KindAddon; - } - if (kindString == QLatin1String("firmware")) { - return KindFirmware; - } - return KindUnknown; +QStringList AppStream::Component::languages() const +{ + return valueWrap(as_component_get_languages(m_cpt)); +} +int AppStream::Component::language(const QString& locale) const +{ + return as_component_get_language(m_cpt, qPrintable(locale)); } -void Component::setScreenshots(const QList< Screenshot >& screenshots) { - d->m_screenshots = screenshots; +void AppStream::Component::addLanguage(const QString& locale, int percentage) +{ + as_component_add_language(m_cpt, qPrintable(locale), percentage); } -QList< Screenshot > Component::screenshots() const { - return d->m_screenshots; +QList AppStream::Component::translations() const +{ + QList res; + + auto translations = as_component_get_translations(m_cpt); + res.reserve(translations->len); + for (uint i = 0; i < translations->len; i++) { + auto translation = AS_TRANSLATION (g_ptr_array_index (translations, i)); + res.append(Translation(translation)); + } + return res; } +void AppStream::Component::addTranslation(const AppStream::Translation& translation) +{ + as_component_add_translation(m_cpt, translation.asTranslation()); +} +QUrl Component::url(Component::UrlKind kind) const +{ + auto url = as_component_get_url(m_cpt, static_cast(kind)); + if (url == NULL) + return QUrl(); + return QUrl(url); +} +void AppStream::Component::addUrl(AppStream::Component::UrlKind kind, const QString& url) +{ + as_component_add_url(m_cpt, (AsUrlKind) kind, qPrintable(url)); +} -Component::UrlKind Component::stringToUrlKind(const QString& urlKindString) { - if (urlKindString == QLatin1String("homepage")) { - return UrlKindHomepage; - } - if (urlKindString == QLatin1String("bugtracker")) { - return UrlKindBugtracker; +QList Component::icons() const +{ + QList res; + + auto icons = as_component_get_icons(m_cpt); + res.reserve(icons->len); + for (uint i = 0; i < icons->len; i++) { + auto icon = AS_ICON (g_ptr_array_index (icons, i)); + res.append(Icon(icon)); } - if (urlKindString == QLatin1String("faq")) { - return UrlKindFaq; + return res; +} + +Icon Component::icon(const QSize& size) const +{ + auto res = as_component_get_icon_by_size (m_cpt, size.width(), size.height()); + if (res == NULL) + return Icon(); + return Icon(res); +} + +void AppStream::Component::addIcon(const AppStream::Icon& icon) +{ + as_component_add_icon(m_cpt, icon.asIcon()); +} + +QList Component::provided() const +{ + QList res; + + auto provEntries = as_component_get_provided(m_cpt); + res.reserve(provEntries->len); + for (uint i = 0; i < provEntries->len; i++) { + auto prov = AS_PROVIDED (g_ptr_array_index (provEntries, i)); + res.append(Provided(prov)); } - if (urlKindString == QLatin1String("help")) { - return UrlKindHelp; + return res; +} + +AppStream::Provided Component::provided(Provided::Kind kind) const +{ + auto prov = as_component_get_provided_for_kind(m_cpt, (AsProvidedKind) kind); + if (prov == NULL) + return Provided(); + return Provided(prov); +} + +void AppStream::Component::addProvided(const AppStream::Provided& provided) +{ + as_component_add_provided(m_cpt, provided.asProvided()); +} + +QList Component::screenshots() const +{ + QList res; + + auto screenshots = as_component_get_screenshots(m_cpt); + res.reserve(screenshots->len); + for (uint i = 0; i < screenshots->len; i++) { + auto scr = AS_SCREENSHOT (g_ptr_array_index (screenshots, i)); + res.append(Screenshot(scr)); } - if (urlKindString == QLatin1String("donation")) { - return UrlKindDonation; + return res; +} + +void AppStream::Component::addScreenshot(const AppStream::Screenshot& screenshot) +{ + as_component_add_screenshot(m_cpt, screenshot.asScreenshot()); +} + +QList Component::releases() const +{ + QList res; + + auto rels = as_component_get_releases(m_cpt); + res.reserve(rels->len); + for (uint i = 0; i < rels->len; i++) { + auto rel = AS_RELEASE (g_ptr_array_index (rels, i)); + res.append(Release(rel)); } - return UrlKindUnknown; + return res; } -typedef QHash UrlKindMap; -Q_GLOBAL_STATIC_WITH_ARGS(UrlKindMap, urlKindMap, ({ - { Component::UrlKindBugtracker, QLatin1String("bugtracker") }, - { Component::UrlKindDonation, QLatin1String("donation") }, - { Component::UrlKindFaq, QLatin1String("faq") }, - { Component::UrlKindHelp, QLatin1String("help") }, - { Component::UrlKindHomepage, QLatin1String("homepage") }, - { Component::UrlKindUnknown, QLatin1String("unknown") }, - })); +void AppStream::Component::addRelease(const AppStream::Release& release) +{ + as_component_add_release(m_cpt, release.asRelease()); +} -QString Component::urlKindToString(Component::UrlKind kind) { - return urlKindMap->value(kind); +bool AppStream::Component::hasBundle() const +{ + return as_component_has_bundle(m_cpt); } -QString Component::bundleKindToString(Component::BundleKind kind) { - switch (kind) { - case Component::BundleKindLimba: - return QStringLiteral("limba"); - case Component::BundleKindXdgApp: - return QStringLiteral("xdg-app"); - default: - return QString(); +QList Component::bundles() const +{ + QList res; + + auto bdls = as_component_get_bundles(m_cpt); + res.reserve(bdls->len); + for (uint i = 0; i < bdls->len; i++) { + auto bundle = AS_BUNDLE (g_ptr_array_index (bdls, i)); + res.append(Bundle(bundle)); } + return res; } -Component::BundleKind Component::stringToBundleKind(const QString& bundleKindString) { - if (bundleKindString == QLatin1String("limba")) { - return BundleKindLimba; +Bundle Component::bundle(Bundle::Kind kind) const +{ + auto bundle = as_component_get_bundle(m_cpt, (AsBundleKind) kind); + if (bundle == NULL) + return Bundle(); + return Bundle(bundle); +} + +void AppStream::Component::addBundle(const AppStream::Bundle& bundle) const +{ + as_component_add_bundle(m_cpt, bundle.asBundle()); +} + +QList AppStream::Component::suggested() const +{ + QList res; + + auto suggestions = as_component_get_suggested(m_cpt); + res.reserve(suggestions->len); + for (uint i = 0; i < suggestions->len; i++) { + auto suggestion = AS_SUGGESTED (g_ptr_array_index (suggestions, i)); + res.append(Suggested(suggestion)); } - if (bundleKindString == QLatin1String("xdg-app")) { - return BundleKindXdgApp; + return res; +} + +void AppStream::Component::addSuggested(const AppStream::Suggested& suggested) +{ + as_component_add_suggested(m_cpt, suggested.suggested()); +} + +QStringList AppStream::Component::searchTokens() const +{ + return valueWrap(as_component_get_search_tokens(m_cpt)); +} + +uint AppStream::Component::searchMatches(const QString& term) const +{ + return as_component_search_matches(m_cpt, qPrintable(term)); +} + +uint AppStream::Component::searchMatchesAll(const QStringList& terms) const +{ + char **termList = stringListToCharArray(terms); + const uint searchMatches = as_component_search_matches_all(m_cpt, termList); + g_strfreev(termList); + return searchMatches; +} + +AppStream::Component::MergeKind AppStream::Component::mergeKind() const +{ + return static_cast(as_component_get_merge_kind(m_cpt)); +} + +void AppStream::Component::setMergeKind(AppStream::Component::MergeKind kind) +{ + as_component_set_merge_kind(m_cpt, (AsMergeKind) kind); +} + +QHash AppStream::Component::custom() const +{ + QHash result; + GHashTableIter iter; + gpointer key, value; + + auto custom = as_component_get_custom(m_cpt); + g_hash_table_iter_init(&iter, custom); + while (g_hash_table_iter_next(&iter, &key, &value)) { + result.insert(valueWrap(static_cast(key)), valueWrap(static_cast(value))); } - return BundleKindUnknown; + return result; } -QList< Appstream::Provides > Component::provides() const { - return d->m_provides.values(); +QString AppStream::Component::customValue(const QString& key) +{ + return valueWrap(as_component_get_custom_value(m_cpt, qPrintable(key))); } -QList Component::provides(Provides::Kind kind) const { - return d->m_provides.values(kind); +bool AppStream::Component::insertCustomValue(const QString& key, const QString& value) +{ + return as_component_insert_custom_value(m_cpt, qPrintable(key), qPrintable(value)); } +QList AppStream::Component::contentRatings() const +{ + QList res; -void Component::setProvides(const QList& provides) { - Q_FOREACH(const Appstream::Provides& provide, provides) { - d->m_provides.insertMulti(provide.kind(), provide); + auto ratings = as_component_get_content_ratings(m_cpt); + res.reserve(ratings->len); + for (uint i = 0; i < ratings->len; i++) { + auto rating = AS_CONTENT_RATING (g_ptr_array_index (ratings, i)); + res.append(ContentRating(rating)); } + return res; +} + +AppStream::ContentRating AppStream::Component::contentRating(const QString& kind) const +{ + auto rating = as_component_get_content_rating(m_cpt, qPrintable(kind)); + if (rating == NULL) + return ContentRating(); + return ContentRating(rating); +} + +void AppStream::Component::addContentRating(const AppStream::ContentRating& contentRating) +{ + as_component_add_content_rating(m_cpt, contentRating.asContentRating()); +} + +bool AppStream::Component::isMemberOfCategory(const AppStream::Category& category) const +{ + return as_component_is_member_of_category(m_cpt, category.asCategory()); +} + +bool AppStream::Component::isIgnored() const +{ + return as_component_is_ignored(m_cpt); } bool Component::isValid() const { - return !d->m_name.isEmpty(); + return as_component_is_valid(m_cpt); +} + +QString AppStream::Component::toString() const +{ + return valueWrap(as_component_to_string(m_cpt)); } +QString Component::desktopId() const +{ + auto de_launchable = as_component_get_launchable (m_cpt, AS_LAUNCHABLE_KIND_DESKTOP_ID); + if (de_launchable == NULL) + return QString(); + + auto entries = as_launchable_get_entries (de_launchable); + if (entries->len <= 0) + return QString(); + + auto desktop_id = (const gchar*) g_ptr_array_index (entries, 0); + return QString::fromUtf8(desktop_id); +} diff -Nru appstream-0.9.4/qt/component.h appstream-0.12.0/qt/component.h --- appstream-0.9.4/qt/component.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/component.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,21 +1,20 @@ /* - * Part of Appstream, a library for accessing AppStream on-disk database - * Copyright 2014 Sune Vuorela + * Copyright (C) 2016 Matthias Klumpp * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . */ #ifndef APPSTREAMQT_COMPONENT_H @@ -27,69 +26,125 @@ #include #include #include "appstreamqt_export.h" -#include "provides.h" - +#include "provided.h" +#include "bundle.h" +#include "category.h" +#include "contentrating.h" +#include "launchable.h" +#include "translation.h" -namespace Appstream { +struct _AsComponent; +namespace AppStream { +class Icon; class Screenshot; +class Release; +class Suggested; class ComponentData; /** - * Describes a Component (package) in appstream + * Describes a software component (application, driver, font, ...) */ class APPSTREAMQT_EXPORT Component { - Q_GADGET - Q_ENUMS(Kind UrlKind) +Q_GADGET + friend class Pool; public: enum Kind { KindUnknown, KindGeneric, - KindDesktop, + KindDesktopApp, + KindConsoleApp, + KindWebApp, + KindAddon, KindFont, KindCodec, KindInputmethod, - KindAddon, - KindFirmware + KindFirmware, + KindDriver, + KindLocalization }; + Q_ENUM(Kind) + + enum MergeKind { + MergeKindNone, + MergeKindReplace, + MergeKindAppend + }; + Q_ENUM(MergeKind) + enum UrlKind { UrlKindUnknown, UrlKindHomepage, UrlKindBugtracker, UrlKindFaq, UrlKindHelp, - UrlKindDonation + UrlKindDonation, + UrlTranslate }; - enum BundleKind { - BundleKindUnknown, - BundleKindLimba, - BundleKindXdgApp + Q_ENUM(UrlKind) + + enum ValueFlags { + FlagNone = 0, + FlagDuplicateCheck = 1 << 0, + FlagNoTranslationFallback = 1 << 1 }; + Q_ENUM(ValueFlags) + static Kind stringToKind(const QString& kindString); + static QString kindToString(Kind kind); + + static UrlKind stringToUrlKind(const QString& urlKindString); + static QString urlKindToString(AppStream::Component::UrlKind kind); + + Component(_AsComponent *cpt); Component(); Component(const Component& other); + Component(Component&& other); ~Component(); - Component& operator=(const Component& other); - bool operator==(const Component& other); + + Component& operator=(const Component& c); + + _AsComponent *asComponent() const; + + uint valueFlags() const; + void setValueFlags(uint flags); + + QString activeLocale() const; + void setActiveLocale(const QString& locale); Kind kind () const; void setKind (Component::Kind kind); + QString origin() const; + void setOrigin(const QString& origin); + QString id() const; void setId(const QString& id); + QString dataId() const; + void setDataId(const QString& cdid); + QStringList packageNames() const; - void setPackageNames(const QStringList& packageName); + void setPackageNames(const QStringList& list); + + QString sourcePackageName() const; + void setSourcePackageName(const QString& sourcePkg); QString name() const; - void setName(const QString& name); + void setName(const QString& name, const QString& lang = {}); QString summary() const; - void setSummary(const QString& summary); + void setSummary(const QString& summary, const QString& lang = {}); QString description() const; - void setDescription(const QString& description); + void setDescription(const QString& description, const QString& lang = {}); + + AppStream::Launchable launchable(AppStream::Launchable::Kind kind) const; + void addLaunchable(const AppStream::Launchable& launchable); + + QString metadataLicense() const; + void setMetadataLicense(const QString& license); QString projectLicense() const; void setProjectLicense(const QString& license); @@ -98,84 +153,90 @@ void setProjectGroup(const QString& group); QString developerName() const; - void setDeveloperName(const QString& developerName); + void setDeveloperName(const QString& developerName, const QString& lang = {}); QStringList compulsoryForDesktops() const; - void setCompulsoryForDesktops(const QStringList& desktops); + void setCompulsoryForDesktop(const QString& desktop); bool isCompulsoryForDesktop(const QString& desktop) const; QStringList categories() const; - void setCategories(const QStringList& categories); + void addCategory(const QString& category); bool hasCategory(const QString& category) const; QStringList extends() const; void setExtends(const QStringList& extends); + void addExtends(const QString& extend); - QStringList extensions() const; - void setExtensions(const QStringList& extensions); + QList addons() const; + void addAddon(const AppStream::Component& addon); - /** - * \return generic (stock) icon name - */ - QString icon() const; - void setIcon(const QString& icon); + QStringList languages() const; + int language(const QString& locale) const; + void addLanguage(const QString& locale, int percentage); + + QList translations() const; + void addTranslation(const AppStream::Translation& translation); + + QUrl url(UrlKind kind) const; + void addUrl(UrlKind kind, const QString& url); + + QList icons() const; + AppStream::Icon icon(const QSize& size) const; + void addIcon(const AppStream::Icon& icon); /** - * \return absolute (local or remote) path to an icon of the given size + * \return the full list of provided entries for all kinds. */ - QUrl iconUrl(const QSize& size) const; + QList provided() const; /** - * Sets the url for an icon - * - * The url can be an absolute filepath or a HTTP remote link. + * \param kind for provides + * \return provided items for this \param kind */ - void addIconUrl(const QUrl& iconUrl, const QSize& size); + AppStream::Provided provided(Provided::Kind kind) const; + void addProvided(const AppStream::Provided& provided); + QList screenshots() const; + void addScreenshot(const AppStream::Screenshot& screenshot); - void setUrls(const QMultiHash& urls); - QMultiHash urls() const; - QList urls(UrlKind kind) const; + QList releases() const; + void addRelease(const AppStream::Release& release); + bool hasBundle() const; + QList bundles() const; + AppStream::Bundle bundle(Bundle::Kind kind) const; + void addBundle(const AppStream::Bundle& bundle) const; - /** - * \param kind for provides - * \return a list of all provides for this \param kind - */ - QList provides(Provides::Kind kind) const; - void setProvides(const QList& provides); - /** - * \return the full list of provides for all kinds. - * Note that it might be ordered differently than the list given with - * \ref setProvides, but it will have the same entries. - */ - QList provides() const; + QList suggested() const; + void addSuggested(const AppStream::Suggested& suggested); - QList screenshots() const; - void setScreenshots(const QList& screenshots); + QStringList searchTokens() const; + uint searchMatches(const QString& term) const; + uint searchMatchesAll(const QStringList& terms) const; + MergeKind mergeKind() const; + void setMergeKind(MergeKind kind); - void setBundles(const QHash& bundles); - QHash bundles() const; - QString bundle(BundleKind kind) const; + QHash custom() const; + QString customValue(const QString& key); + bool insertCustomValue(const QString& key, const QString& value); + QList contentRatings() const; + AppStream::ContentRating contentRating(const QString& kind) const; + void addContentRating(const AppStream::ContentRating& contentRating); - /** - * \returns whether the component is fully initialized - */ - bool isValid() const; + bool isMemberOfCategory(const AppStream::Category& category) const; - static Kind stringToKind(const QString& kindString); - static QString kindToString(Kind kind); + bool isIgnored() const; + bool isValid() const; - static UrlKind stringToUrlKind(const QString& urlKindString); - static QString urlKindToString(Appstream::Component::UrlKind kind); + QString toString() const; - static BundleKind stringToBundleKind(const QString& bundleKindString); - static QString bundleKindToString(Appstream::Component::BundleKind kind); + // DEPRECATED + Q_DECL_DEPRECATED QString desktopId() const; private: - QSharedDataPointer d; + _AsComponent *m_cpt; }; } diff -Nru appstream-0.9.4/qt/contentrating.cpp appstream-0.12.0/qt/contentrating.cpp --- appstream-0.9.4/qt/contentrating.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/contentrating.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2017 Jan Grulich + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" +#include "contentrating.h" + +#include +#include "chelpers.h" + +using namespace AppStream; + +class AppStream::ContentRatingData : public QSharedData { +public: + ContentRatingData() + { + m_contentRating = as_content_rating_new(); + } + + ContentRatingData(AsContentRating* cat) : m_contentRating(cat) + { + g_object_ref(m_contentRating); + } + + ~ContentRatingData() + { + g_object_unref(m_contentRating); + } + + bool operator==(const ContentRatingData& rd) const + { + return rd.m_contentRating == m_contentRating; + } + + AsContentRating *contentRating() const + { + return m_contentRating; + } + + AsContentRating* m_contentRating; +}; + +typedef QHash RatingMap; +Q_GLOBAL_STATIC_WITH_ARGS(RatingMap, ratingMap, ( { + { ContentRating::RatingValueUnknown, QLatin1String("unknown") }, + { ContentRating::RatingValueNone, QLatin1String("none") }, + { ContentRating::RatingValueMild, QLatin1String("mild") }, + { ContentRating::RatingValueModerate, QLatin1String("moderate") }, + { ContentRating::RatingValueIntense, QLatin1String("intense") } + } +)); + +AppStream::ContentRating::RatingValue AppStream::ContentRating::stringToRatingValue(const QString& ratingValue) +{ + return ratingMap->key(ratingValue, AppStream::ContentRating::RatingValueUnknown); +} + +QString AppStream::ContentRating::ratingValueToString(AppStream::ContentRating::RatingValue ratingValue) +{ + return ratingMap->value(ratingValue); +} + +ContentRating::ContentRating() + : d(new ContentRatingData) +{} + +ContentRating::ContentRating(_AsContentRating* contentRating) + : d(new ContentRatingData(contentRating)) +{} + +ContentRating::ContentRating(const ContentRating &contentRating) = default; + +ContentRating::~ContentRating() = default; + +ContentRating& ContentRating::operator=(const ContentRating &contentRating) = default; + +bool ContentRating::operator==(const ContentRating &other) const +{ + if(this->d == other.d) { + return true; + } + if(this->d && other.d) { + return *(this->d) == *other.d; + } + return false; +} + +_AsContentRating * AppStream::ContentRating::asContentRating() const +{ + return d->contentRating(); +} + +QString AppStream::ContentRating::kind() const +{ + return valueWrap(as_content_rating_get_kind(d->m_contentRating)); +} + +void AppStream::ContentRating::setKind(const QString& kind) +{ + as_content_rating_set_kind(d->m_contentRating, qPrintable(kind)); +} + +uint AppStream::ContentRating::minimumAge() const +{ + return as_content_rating_get_minimum_age(d->m_contentRating); +} + +AppStream::ContentRating::RatingValue AppStream::ContentRating::value(const QString& id) const +{ + return static_cast(as_content_rating_get_value(d->m_contentRating, qPrintable(id))); +} + +void AppStream::ContentRating::setValue(const QString& id, AppStream::ContentRating::RatingValue ratingValue) +{ + as_content_rating_set_value(d->m_contentRating, qPrintable(id), (AsContentRatingValue) ratingValue); +} + +QDebug operator<<(QDebug s, const AppStream::ContentRating& contentRating) +{ + s.nospace() << "AppStream::ContentRating(" << contentRating.kind() << contentRating.minimumAge() << ")"; + return s.space(); +} + diff -Nru appstream-0.9.4/qt/contentrating.h appstream-0.12.0/qt/contentrating.h --- appstream-0.9.4/qt/contentrating.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/contentrating.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,82 @@ + +/* + * Copyright (C) 2017 Jan Grulich + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_CONTENT_RATING_H +#define APPSTREAMQT_CONTENT_RATING_H + +#include +#include +#include +#include "appstreamqt_export.h" + +struct _AsContentRating; + +namespace AppStream { + +class ContentRatingData; + +class APPSTREAMQT_EXPORT ContentRating { + Q_GADGET + + public: + enum RatingValue { + RatingValueUnknown, + RatingValueNone, + RatingValueMild, + RatingValueModerate, + RatingValueIntense + }; + Q_ENUM(RatingValue) + + ContentRating(); + ContentRating(_AsContentRating* category); + ContentRating(const ContentRating& category); + ~ContentRating(); + + static RatingValue stringToRatingValue(const QString& ratingValue); + static QString ratingValueToString(RatingValue ratingValue); + + ContentRating& operator=(const ContentRating& category); + bool operator==(const ContentRating& r) const; + + /** + * \returns the internally stored AsContentRating + */ + _AsContentRating *asContentRating() const; + + QString kind() const; + void setKind(const QString& kind); + + uint minimumAge() const; + + RatingValue value(const QString& id) const; + void setValue(const QString& id, RatingValue ratingValue); + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::ContentRating& category); + +#endif // APPSTREAMQT_CONTENT_RATING_H + + diff -Nru appstream-0.9.4/qt/database.cpp appstream-0.12.0/qt/database.cpp --- appstream-0.9.4/qt/database.cpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/database.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,460 +0,0 @@ -/* - * Part of Appstream, a library for accessing AppStream on-disk database - * Copyright (C) 2014 Sune Vuorela - * Copyright (C) 2015 Matthias Klumpp - * - * Based upon database-read.hpp - * Copyright (C) 2012-2014 Matthias Klumpp - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#define QT_NO_KEYWORDS - -#include "database.h" - -#include -#include -#include -#include -#include -#include - -#include "image.h" -#include "screenshot.h" - -Q_LOGGING_CATEGORY(APPSTREAMQT_DB, "appstreamqt.database") - -using namespace Appstream; -using namespace ASCache; - -class Appstream::DatabasePrivate { - public: - DatabasePrivate(const QString& dbpath) : m_dbPath(dbpath) { - } - - QString m_dbPath; - QString m_errorString; - Xapian::Database m_db; - - bool open() { - try { - m_db = Xapian::Database (m_dbPath.trimmed().toStdString()); - } catch (const Xapian::Error &error) { - m_errorString = QString::fromStdString (error.get_msg()); - return false; - } - - int schemaVersion = 0; - try { - schemaVersion = stoi (m_db.get_metadata ("db-schema-version")); - } catch (...) { - qCWarning(APPSTREAMQT_DB, "Unable to read database schema version, assuming 0."); - } - - if (schemaVersion != AS_DB_SCHEMA_VERSION) { - qCWarning(APPSTREAMQT_DB, "Attempted to open an old version of the AppStream cache. Please refresh the cache and try again!"); - return false; - } - - return true; - } - - ~DatabasePrivate() { - m_db.close(); - } -}; - -Database::Database(const QString& dbPath) : d(new DatabasePrivate(dbPath)) { - -} - -bool Database::open() { - return d->open(); -} - -QString Database::errorString() const { - return d->m_errorString; -} - -Database::~Database() { - // empty. needed for the scoped pointer for the private pointer -} - -QString value(Xapian::Document document, XapianValues::XapianValues index) { - return QString::fromStdString(document.get_value(index)); -} - -Component xapianDocToComponent(Xapian::Document document) { - Component component; - std::string str; - - // kind - QString kindString = value (document, XapianValues::TYPE); - component.setKind(Component::stringToKind(kindString)); - - // Identifier - QString id = value(document, XapianValues::IDENTIFIER); - component.setId(id); - - // Component name - QString name = value(document,XapianValues::CPTNAME); - component.setName(name); - - // Package name - QStringList packageNames = value(document,XapianValues::PKGNAMES).split(QLatin1Char(';'),QString::SkipEmptyParts); - component.setPackageNames(packageNames); - - // Bundles - ASCache::Bundles pb_bundles; - str = document.get_value (XapianValues::BUNDLES); - pb_bundles.ParseFromString (str); - QHash bundles; - bundles.reserve (pb_bundles.bundle_size ()); - for (int i = 0; i < pb_bundles.bundle_size (); i++) { - const Bundles_Bundle& bdl = pb_bundles.bundle (i); - auto bkind = (Component::BundleKind) bdl.type (); - auto bdlid = QString::fromStdString(bdl.id ()); - - if (bkind != Component::BundleKindUnknown) { - bundles.insertMulti(bkind, bdlid); - } else { - qCWarning(APPSTREAMQT_DB, "Found bundle of unknown type for '%s': %s", qPrintable(id), qPrintable(bdlid)); - } - - } - component.setBundles(bundles); - - // URLs - ASCache::Urls pb_urls; - str = document.get_value (XapianValues::URLS); - pb_urls.ParseFromString (str); - QMultiHash urls; - for (int i = 0; i < pb_urls.url_size (); i++) { - const Urls_Url& pb_url = pb_urls.url (i); - auto ukind = (Component::UrlKind) pb_url.type (); - QUrl url = QUrl::fromUserInput(QString::fromStdString(pb_url.url ())); - - if (ukind != Component::UrlKindUnknown) { - urls.insertMulti(ukind, url); - } else { - qCWarning(APPSTREAMQT_DB, "URL of unknown type found for '%s': %s", qPrintable(id), qPrintable(url.toString())); - } - } - component.setUrls(urls); - - // Provided items - ASCache::ProvidedItems pbPI; - str = document.get_value (XapianValues::PROVIDED_ITEMS); - pbPI.ParseFromString (str); - QList provideslist; - for (int i = 0; i < pbPI.provided_size (); i++) { - const ProvidedItems_Provided& pbProv = pbPI.provided (i); - - for (int j = 0; j < pbProv.item_size (); j++) { - Provides provides; - provides.setKind((Provides::Kind) pbProv.type ()); - provides.setValue(QString::fromStdString(pbProv.item (j))); - provideslist << provides; - } - } - component.setProvides(provideslist); - - // Icons - ASCache::Icons pbIcons; - str = document.get_value (XapianValues::ICONS); - pbIcons.ParseFromString (str); - for (int i = 0; i < pbIcons.icon_size (); i++) { - const Icons_Icon& pbIcon = pbIcons.icon (i); - - auto size = QSize(pbIcon.width(), pbIcon.height()); - QUrl url = QUrl::fromUserInput(QString::fromStdString(pbIcon.url())); - component.addIconUrl(url, size); - } - - // Summary - QString summary = value(document,XapianValues::SUMMARY); - component.setSummary(summary); - - // Long description - QString description = value(document,XapianValues::DESCRIPTION); - component.setDescription(description); - - // Categories - QStringList categories = value(document, XapianValues::CATEGORIES).split(QLatin1Char(';')); - component.setCategories(categories); - - // Extends - const QStringList extends = value(document, XapianValues::EXTENDS).split(QLatin1Char(';')); - component.setExtends(extends); - - // Extensions - const QStringList extensions = value(document, XapianValues::EXTENSIONS).split(QLatin1Char(';')); - component.setExtensions(extensions); - - // Screenshots - ASCache::Screenshots pb_scrs; - str = document.get_value (XapianValues::SCREENSHOTS); - pb_scrs.ParseFromString (str); - QList screenshots; - screenshots.reserve(pb_scrs.screenshot_size ()); - for (int i = 0; i < pb_scrs.screenshot_size (); i++) { - const Screenshots_Screenshot& pb_scr = pb_scrs.screenshot (i); - Appstream::Screenshot scr; - - if (pb_scr.primary()) - scr.setDefault(true); - if (pb_scr.has_caption()) - scr.setCaption(QString::fromStdString(pb_scr.caption())); - - QList images; - images.reserve(pb_scr.image_size()); - for (int j = 0; j < pb_scr.image_size(); j++) { - const Screenshots_Image& pb_img = pb_scr.image(j); - Appstream::Image image; - - image.setUrl(QUrl(QString::fromStdString(pb_img.url()))); - image.setWidth(pb_img.width ()); - image.setHeight(pb_img.height ()); - - if (pb_img.source ()) { - image.setKind(Appstream::Image::Kind::Plain); - } else { - image.setKind(Appstream::Image::Kind::Thumbnail); - } - - images.append(image); - } - scr.setImages(images); - - screenshots.append(scr); - } - component.setScreenshots(screenshots); - - // Compulsory-for-desktop information - QStringList compulsory = value(document, XapianValues::COMPULSORY_FOR).split(QLatin1Char(';')); - component.setCompulsoryForDesktops(compulsory); - - // License - QString license = value(document,XapianValues::LICENSE); - component.setProjectLicense(license); - - // Project group - QString projectGroup = value(document,XapianValues::PROJECT_GROUP); - component.setProjectGroup(projectGroup); - - // Developer name - QString developerName = value(document,XapianValues::DEVELOPER_NAME); - component.setDeveloperName(developerName); - - // Releases - Releases pb_rels; - str = document.get_value (XapianValues::RELEASES); - pb_rels.ParseFromString (str); - Q_UNUSED(pb_rels); - - return component; -} - -QList parseSearchResults(Xapian::MSet matches) { - QList components; - components.reserve(matches.size()); - for (Xapian::MSetIterator it = matches.begin(); it != matches.end(); ++it) { - Xapian::Document document = it.get_document (); - components << xapianDocToComponent(document); - } - return components; -} - -QList< Component > Database::allComponents() const { - QList components; - components.reserve(d->m_db.get_termfreq(std::string())); - - // Iterate through all Xapian documents - Xapian::PostingIterator it = d->m_db.postlist_begin (std::string()); - for (Xapian::PostingIterator it = d->m_db.postlist_begin(std::string());it != d->m_db.postlist_end(std::string()); ++it) { - Xapian::Document doc = d->m_db.get_document (*it); - Component component = xapianDocToComponent (doc); - components << component; - } - - return components; -} - -Component Database::componentById(const QString& id) const { - Xapian::Query id_query = Xapian::Query (Xapian::Query::OP_OR, - Xapian::Query("AI" + id.trimmed().toStdString()), - Xapian::Query ()); - id_query.serialise (); - - Xapian::Enquire enquire = Xapian::Enquire (d->m_db); - enquire.set_query (id_query); - - Xapian::MSet matches = enquire.get_mset (0, d->m_db.get_doccount ()); - if (matches.size () > 1) { - qCWarning(APPSTREAMQT_DB, "Found more than one component with id '%s'! Returning the first one.", qPrintable(id)); - Q_ASSERT(false); - } - if (matches.empty()) { - return Component(); - } - - Xapian::Document document = matches[matches.get_firstitem ()].get_document (); - - return xapianDocToComponent(document); -} - -QList< Component > Database::componentsByKind(Component::Kind kind) const { - Xapian::Query item_query; - item_query = Xapian::Query ("AT" + Component::kindToString(kind).toStdString()); - - item_query.serialise (); - - Xapian::Enquire enquire = Xapian::Enquire (d->m_db); - enquire.set_query (item_query); - Xapian::MSet matches = enquire.get_mset (0, d->m_db.get_doccount ()); - return parseSearchResults(matches); -} - -Xapian::QueryParser newAppStreamParser (Xapian::Database db) { - Xapian::QueryParser xapian_parser = Xapian::QueryParser (); - xapian_parser.set_database (db); - xapian_parser.add_boolean_prefix ("id", "AI"); - xapian_parser.add_boolean_prefix ("pkg", "AP"); - xapian_parser.add_boolean_prefix ("provides", "AE"); - xapian_parser.add_boolean_prefix ("section", "XS"); - xapian_parser.add_prefix ("pkg_wildcard", "XP"); - xapian_parser.add_prefix ("pkg_wildcard", "AP"); - xapian_parser.set_default_op (Xapian::Query::OP_AND); - return xapian_parser; -} - -typedef QPair QueryPair; - -QueryPair buildQueries(QString searchTerm, const QStringList& categories, Xapian::Database db) { - // empty query returns a query that matches nothing (for performance - // reasons) - if (searchTerm.isEmpty() && categories.isEmpty()) { - return QueryPair(); - } - - // generate category query - Xapian::Query categoryQuery = Xapian::Query (); - Q_FOREACH(const QString& category, categories) { - categoryQuery = Xapian::Query(Xapian::Query::OP_OR, - categoryQuery, - Xapian::Query(category.trimmed().toLower().toStdString())); - } - - // we cheat and return a match-all query for single letter searches - if (searchTerm.size() < 2) { - Xapian::Query allQuery = Xapian::Query(Xapian::Query::OP_OR,Xapian::Query (""), categoryQuery); - return QueryPair(allQuery,allQuery); - } - - // get a pkg query - Xapian::Query pkgQuery = Xapian::Query (); - - // try split on one magic char - if(searchTerm.contains(QLatin1Char(','))) { - QStringList parts = searchTerm.split(QLatin1Char(',')); - Q_FOREACH(const QString& part, parts) { - pkgQuery = Xapian::Query (Xapian::Query::OP_OR, - pkgQuery, - Xapian::Query ("XP" + part.trimmed().toStdString())); - pkgQuery = Xapian::Query (Xapian::Query::OP_OR, - pkgQuery, - Xapian::Query ("AP" + part.trimmed().toStdString())); - } - } else { - // try another - QStringList parts = searchTerm.split(QLatin1Char('\n')); - Q_FOREACH(const QString& part, parts) { - pkgQuery = Xapian::Query (Xapian::Query::OP_OR, - Xapian::Query("XP" + part.trimmed().toStdString()), - pkgQuery); - } - } - if(!categoryQuery.empty()) { - pkgQuery = Xapian::Query(Xapian::Query::OP_AND,pkgQuery, categoryQuery); - } - - // get a search query - if (!searchTerm.contains (QLatin1Char(':'))) { // ie, not a mimetype query - // we need this to work around xapian oddness - searchTerm = searchTerm.replace(QLatin1Char('-'), QLatin1Char('_')); - } - - Xapian::QueryParser parser = newAppStreamParser (db); - Xapian::Query fuzzyQuery = parser.parse_query (searchTerm.trimmed().toStdString(), - Xapian::QueryParser::FLAG_PARTIAL | - Xapian::QueryParser::FLAG_BOOLEAN); - // if the query size goes out of hand, omit the FLAG_PARTIAL - // (LP: #634449) - if (fuzzyQuery.get_length () > 1000) { - fuzzyQuery = parser.parse_query(searchTerm.trimmed().toStdString(), - Xapian::QueryParser::FLAG_BOOLEAN); - } - - // now add categories - if(!categoryQuery.empty()) { - fuzzyQuery = Xapian::Query(Xapian::Query::OP_AND,fuzzyQuery, categoryQuery); - } - - return QueryPair(pkgQuery, fuzzyQuery); -} - -QList< Component > Database::findComponentsByString(const QString& searchTerm, const QStringList& categories) { - QPair queryPair = buildQueries(searchTerm.trimmed(), categories, d->m_db); - - // "normal" query - Xapian::Query query = queryPair.first; - query.serialise (); - - Xapian::Enquire enquire = Xapian::Enquire (d->m_db); - enquire.set_query (query); - QList result = parseSearchResults (enquire.get_mset(0,d->m_db.get_doccount())); - - // do fuzzy query if we got no results - if (result.isEmpty()) { - query = queryPair.second; - query.serialise (); - - enquire = Xapian::Enquire (d->m_db); - enquire.set_query (query); - result = parseSearchResults(enquire.get_mset(0,d->m_db.get_doccount())); - } - - return result; -} - -QList Database::findComponentsByPackageName(const QString& packageName) const -{ - Xapian::Query pkgQuery(Xapian::Query::OP_OR, - Xapian::Query(), - Xapian::Query ("AP" + packageName.trimmed().toStdString())); - - Xapian::Enquire enquire(d->m_db); - enquire.set_query (pkgQuery); - - QList result = parseSearchResults (enquire.get_mset(0,d->m_db.get_doccount())); - return result; -} - - -Database::Database() : d(new DatabasePrivate(QStringLiteral("/var/cache/app-info/xapian/default"))) { - -} diff -Nru appstream-0.9.4/qt/database.h appstream-0.12.0/qt/database.h --- appstream-0.9.4/qt/database.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/database.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* - * Part of Appstream, a library for accessing AppStream on-disk database - * - * Copyright 2014 Sune Vuorela - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef APPSTREAMQT_DATABASE_H -#define APPSTREAMQT_DATABASE_H - -#include "appstreamqt_export.h" - -#include -#include -#include -#include "component.h" - -namespace Appstream { - -/** - * Represents a handle to an Appstream database. - * - * See http://www.freedesktop.org/wiki/Distributions/AppStream/ for details - */ -class DatabasePrivate; -class APPSTREAMQT_EXPORT Database { - public: - /** - * Constructs a database object - */ - Database(const QString& dbPath); - /** - * Constructs a database object pointing to the default system path - * ( /var/cache/app-info/xapian ) - */ - Database(); - /** - * \return true on success. False on failure - */ - bool open(); - /** - * \return an error string describing what went wrong with open - */ - QString errorString() const; - /** - * \param id - * \return component with the given id - */ - Component componentById(const QString& id) const; - /** - * \return all components - */ - QList allComponents() const; - /** - * \return all components with a given kind - */ - QList componentsByKind(Component::Kind kind) const; - /** - * \return all components matching \param searchTerm in \param category - */ - QList findComponentsByString(const QString& searchTerm, const QStringList& categories = QStringList()); - /** - * \return all components that have \param packageName assigned as the package - */ - QList findComponentsByPackageName(const QString& packageName) const; - ~Database(); - private: - Q_DISABLE_COPY(Database); - QScopedPointer d; -}; -} - -#endif // APPSTREAMQT_DATABASE_H diff -Nru appstream-0.9.4/qt/icon.cpp appstream-0.12.0/qt/icon.cpp --- appstream-0.9.4/qt/icon.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/icon.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" +#include "icon.h" + +#include +#include +#include +#include +#include "chelpers.h" + +using namespace AppStream; + +class AppStream::IconData : public QSharedData { +public: + IconData() + { + m_icon = as_icon_new(); + } + + IconData(AsIcon *icon) + : m_icon(icon) + { + g_object_ref(m_icon); + } + + ~IconData() + { + g_object_unref(m_icon); + } + + bool operator==(const IconData& rd) const + { + return rd.m_icon == m_icon; + } + + AsIcon *icon() const { + return m_icon; + } + + AsIcon *m_icon; +}; + +Icon::Icon(const Icon& other) + : d(other.d) +{} + +Icon::Icon() + : d(new IconData) +{} + +Icon::Icon(_AsIcon *icon) + : d(new IconData(icon)) +{} + +Icon::~Icon() +{} + +Icon& Icon::operator=(const Icon& other) +{ + this->d = other.d; + return *this; +} + +AsIcon * AppStream::Icon::asIcon() const +{ + return d->icon(); +} + +Icon::Kind Icon::kind() const +{ + return Icon::Kind(as_icon_get_kind(d->m_icon)); +} + +void Icon::setKind(Icon::Kind kind) +{ + as_icon_set_kind(d->m_icon, (AsIconKind) kind); +} + +uint Icon::height() const +{ + return as_icon_get_height(d->m_icon); +} + +void Icon::setHeight(uint height) { + as_icon_set_height(d->m_icon, height); +} + +uint Icon::width() const +{ + return as_icon_get_width(d->m_icon); +} + +void Icon::setWidth(uint width) +{ + as_icon_set_width(d->m_icon, width); +} + +void Icon::setUrl(const QUrl& url) +{ + if (url.isLocalFile()) + as_icon_set_filename(d->m_icon, qPrintable(url.toString())); + else + as_icon_set_url(d->m_icon, qPrintable(url.toString())); +} + +const QUrl Icon::url() const { + if (as_icon_get_kind(d->m_icon) == AS_ICON_KIND_REMOTE) + return QUrl(as_icon_get_url(d->m_icon)); + else + return QUrl::fromLocalFile(as_icon_get_filename(d->m_icon)); +} + +const QString Icon::name() const +{ + return valueWrap(as_icon_get_name(d->m_icon)); +} + +void Icon::setName(const QString& name) +{ + as_icon_set_name(d->m_icon, qPrintable(name)); +} + +bool Icon::isEmpty() const +{ + return url().isEmpty() && as_icon_get_name(d->m_icon) == NULL; +} + +QSize AppStream::Icon::size() const +{ + return QSize(width(), height()); +} + +QDebug operator<<(QDebug s, const AppStream::Icon& image) { + s.nospace() << "AppStream::Icon(" << image.kind(); + if (!image.url().isEmpty()) + s.nospace() << ',' << image.url(); + if (!image.name().isEmpty()) + s.nospace() << ',' << image.name(); + s.nospace() << "[" << image.width() << "x" << image.height() << "])"; + return s; +} diff -Nru appstream-0.9.4/qt/icon.h appstream-0.12.0/qt/icon.h --- appstream-0.9.4/qt/icon.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/icon.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_ICON_H +#define APPSTREAMQT_ICON_H + +#include +#include +#include "appstreamqt_export.h" + +class QUrl; +class QString; +struct _AsIcon; +namespace AppStream { + +class IconData; + +/** + * A reference to n icon which can be loaded from a locale file + * or remote URI. + */ +class APPSTREAMQT_EXPORT Icon { + Q_GADGET + public: + enum Kind { + KindUnknown, + KindCached, + KindStock, + KindLocal, + KindRemote + }; + Q_ENUM(Kind) + + Icon(); + Icon(_AsIcon *icon); + Icon(const Icon& other); + ~Icon(); + + Icon& operator=(const Icon& other); + + /** + * \returns the internally stored AsIcon + */ + _AsIcon *asIcon() const; + + /** + * \return the kind of icon + */ + Kind kind() const; + void setKind(Kind kind); + + /** + * \return the local or remote url for this image + */ + const QUrl url() const; + void setUrl(const QUrl& url); + + /** + * \return the icon (stock) name + */ + const QString name() const; + void setName(const QString& name); + + /** + * \return the expected width of this image + */ + uint width() const; + void setWidth(uint width); + + /** + * \return the expected height of this image + */ + uint height() const; + void setHeight(uint height); + + /** + * \returns the expected size of the image + */ + QSize size() const; + + bool isEmpty() const; + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Icon& image); + +#endif // APPSTREAMQT_ICON_H diff -Nru appstream-0.9.4/qt/image.cpp appstream-0.12.0/qt/image.cpp --- appstream-0.9.4/qt/image.cpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/image.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -1,131 +1,133 @@ /* - * - * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2016 Matthias Klumpp * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . */ +#include "appstream.h" #include "image.h" + #include +#include #include +#include -using namespace Appstream; - -class Appstream::ImageData : public QSharedData { - public: - ImageData() : m_height(0), m_width(0), m_kind(Image::Unknown) { - } - int m_height; - int m_width; - Image::Kind m_kind; - QUrl m_url; - bool operator==(const ImageData& other) { - if(m_height != other.m_height) { - return false; - } - if(m_width != other.m_width) { - return false; - } - if(m_kind != other.m_kind) { - return false; - } - if(m_url != other.m_url) { - return false; - } - return true; - } -}; - -int Image::height() const { - return d->m_height; -} - -Image::Image(const Image& other) : d(other.d) { +using namespace AppStream; -} +class AppStream::ImageData : public QSharedData { +public: + ImageData() + { + m_img = as_image_new(); + } -Image::Image() : d(new ImageData) { + ImageData(AsImage *img) : m_img(img) + { + g_object_ref(m_img); + } -} + ~ImageData() + { + g_object_unref(m_img); + } -Image::~Image() { + bool operator==(const ImageData& rd) const + { + return rd.m_img == m_img; + } -} + AsImage *image() const + { + return m_img; + } -Image::Kind Image::kind() const { - return d->m_kind; -} + AsImage *m_img; +}; +Image::Image(const Image& other) + : d(other.d) +{} + +Image::Image() + : d(new ImageData) +{} + +Image::Image(_AsImage *img) + : d(new ImageData(img)) +{} +Image::~Image() +{} -Image& Image::operator=(const Image& other) { +Image& Image::operator=(const Image& other) +{ this->d = other.d; return *this; } -bool Image::operator==(const Image& other) { - if(d == other.d) { - return true; - } - if(d && other.d) { - return *d == *other.d; - } - return false; +_AsImage * AppStream::Image::asImage() const +{ + return d->image(); } -void Image::setHeight(int height) { - d->m_height = height; +Image::Kind Image::kind() const +{ + return Image::Kind(as_image_get_kind(d->m_img)); } -void Image::setKind(Image::Kind kind) { - d->m_kind = kind; +void Image::setKind(Image::Kind kind) +{ + as_image_set_kind(d->m_img, (AsImageKind) kind); } -void Image::setUrl(const QUrl& url) { - d->m_url = url; +uint Image::height() const +{ + return as_image_get_height(d->m_img); } -void Image::setWidth(int width) { - d->m_width = width; +void Image::setHeight(uint height) { + as_image_set_height(d->m_img, height); } -Image::Kind Image::stringToKind(const QString& string) { - if(string == QLatin1String("thumbnail")) { - return Thumbnail; - } - if(string == QLatin1String("source")) { - return Plain; - } - return Unknown; +uint Image::width() const +{ + return as_image_get_width(d->m_img); } -const QUrl& Image::url() const { - return d->m_url; +void Image::setWidth(uint width) +{ + as_image_set_width(d->m_img, width); } -int Image::width() const { - return d->m_width; +void Image::setUrl(const QUrl& url) +{ + as_image_set_url(d->m_img, qPrintable(url.toString())); } +const QUrl Image::url() const { + return QUrl(as_image_get_url(d->m_img)); +} +QSize AppStream::Image::size() const +{ + return QSize(width(), height()); +} - - - - - - - +QDebug operator<<(QDebug s, const AppStream::Image& image) { + s.nospace() << "AppStream::Image(" << image.url() << ',' << image.kind() << "[" << image.width() << "x" << image.height() << "])"; + return s.space(); +} diff -Nru appstream-0.9.4/qt/image.h appstream-0.12.0/qt/image.h --- appstream-0.9.4/qt/image.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/image.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,21 +1,21 @@ /* - * - * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2016 Matthias Klumpp * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . */ #ifndef APPSTREAMQT_IMAGE_H @@ -27,64 +27,77 @@ class QUrl; class QString; -namespace Appstream { +struct _AsImage; +namespace AppStream { class ImageData; /** - * A reference to a image that can be accessed thru a URL + * A reference to a image that can be accessed via a URL * * This class doesn't contain any image data, but only a reference to * a url and the expected size for the image. * - * "expected size" means that the data is read out from the database, and - * there is somehow a chance that the information might not fit with the + * "expected size" means that the data is read out from the AppStream metadata. + * Discrepancies between the data and the actual data are very rare, but might happen. * image at the end of the url. */ class APPSTREAMQT_EXPORT Image { Q_GADGET - Q_ENUMS(Kind) public: enum Kind { - Unknown, - Thumbnail, - Plain + KindUnknown, + KindSource, + KindThumbnail }; + Q_ENUM(Kind) + Image(); + Image(_AsImage *img); Image(const Image& other); ~Image(); + Image& operator=(const Image& other); - bool operator==(const Image& other); + + /** + * \returns the internally stored AsImage + */ + _AsImage *asImage() const; + + /** + * \return the kind of image + */ + Kind kind() const; + void setKind(Kind kind); + /** * \return the url for this image */ - const QUrl& url() const; + const QUrl url() const; void setUrl(const QUrl& url); /** * \return the expected width of this image */ - int width() const; - void setWidth(int width); + uint width() const; + void setWidth(uint width); + /** * \return the expected height of this image */ - int height() const; - void setHeight(int height); - + uint height() const; + void setHeight(uint height); /** - * \return the kind of image + * \returns the expected size of the image */ - Kind kind() const; - void setKind(Kind stringToKind); + QSize size() const; - static Kind stringToKind(const QString& string); private: QSharedDataPointer d; }; } -#endif // APPSTREAMQT_IMAGE_H +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Image& image); -class QUrl; +#endif // APPSTREAMQT_IMAGE_H diff -Nru appstream-0.9.4/qt/launchable.cpp appstream-0.12.0/qt/launchable.cpp --- appstream-0.9.4/qt/launchable.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/launchable.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2017 Jan Grulich + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" +#include "launchable.h" + +#include +#include "chelpers.h" + +using namespace AppStream; + +class AppStream::LaunchableData : public QSharedData { +public: + LaunchableData() + { + m_launchable = as_launchable_new(); + } + + LaunchableData(AsLaunchable* cat) : m_launchable(cat) + { + g_object_ref(m_launchable); + } + + ~LaunchableData() + { + g_object_unref(m_launchable); + } + + bool operator==(const LaunchableData& rd) const + { + return rd.m_launchable == m_launchable; + } + + AsLaunchable *launchable() const + { + return m_launchable; + } + + AsLaunchable* m_launchable; +}; + + +AppStream::Launchable::Kind AppStream::Launchable::stringToKind(const QString& kindString) +{ + if (kindString == QLatin1String("desktop-id")) { + return AppStream::Launchable::KindDesktopId; + } + return AppStream::Launchable::KindUnknown; +} + +QString AppStream::Launchable::kindToString(AppStream::Launchable::Kind kind) +{ + if (kind == AppStream::Launchable::KindDesktopId) { + return QLatin1String("desktop-id"); + } + return QLatin1String("unknown"); +} + +Launchable::Launchable() + : d(new LaunchableData) +{} + +Launchable::Launchable(_AsLaunchable* launchable) + : d(new LaunchableData(launchable)) +{} + +Launchable::Launchable(const Launchable &launchable) = default; + +Launchable::~Launchable() = default; + +Launchable& Launchable::operator=(const Launchable &launchable) = default; + +bool Launchable::operator==(const Launchable &other) const +{ + if(this->d == other.d) { + return true; + } + if(this->d && other.d) { + return *(this->d) == *other.d; + } + return false; +} + +_AsLaunchable * AppStream::Launchable::asLaunchable() const +{ + return d->launchable(); +} + +AppStream::Launchable::Kind AppStream::Launchable::kind() const +{ + return static_cast(as_launchable_get_kind(d->m_launchable)); +} + +void AppStream::Launchable::setKind(AppStream::Launchable::Kind kind) +{ + as_launchable_set_kind(d->m_launchable, (AsLaunchableKind) kind); +} + +QStringList AppStream::Launchable::entries() const +{ + return valueWrap(as_launchable_get_entries(d->m_launchable)); +} + +void AppStream::Launchable::addEntry(const QString& entry) +{ + as_launchable_add_entry(d->m_launchable, qPrintable(entry)); +} + +QDebug operator<<(QDebug s, const AppStream::Launchable& launchable) +{ + s.nospace() << "AppStream::Launchable(" << launchable.entries() << ")"; + return s.space(); +} diff -Nru appstream-0.9.4/qt/launchable.h appstream-0.12.0/qt/launchable.h --- appstream-0.9.4/qt/launchable.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/launchable.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2017 Jan Grulich + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_LAUNCHABLE_H +#define APPSTREAMQT_LAUNCHABLE_H + +#include +#include +#include +#include "appstreamqt_export.h" + +struct _AsLaunchable; + +namespace AppStream { + +class LaunchableData; + +class APPSTREAMQT_EXPORT Launchable { + Q_GADGET + public: + enum Kind { + KindUnknown, + KindDesktopId, + KindService, + KindCockpitManifest + }; + Q_ENUM(Kind) + + Launchable(); + Launchable(_AsLaunchable* category); + Launchable(const Launchable& category); + ~Launchable(); + + static Kind stringToKind(const QString& kindString); + static QString kindToString(Kind kind); + + Launchable& operator=(const Launchable& category); + bool operator==(const Launchable& r) const; + + /** + * \returns the internally stored AsLaunchable + */ + _AsLaunchable *asLaunchable() const; + + Kind kind() const; + void setKind(Kind kind); + + QStringList entries() const; + void addEntry(const QString& entry); + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Launchable& category); + +#endif // APPSTREAMQT_LAUNCHABLE_H + diff -Nru appstream-0.9.4/qt/meson.build appstream-0.12.0/qt/meson.build --- appstream-0.9.4/qt/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,95 @@ +# Meson definition for AppStream Qt + +asqt_api_level = '2' + +add_languages('cpp') + +qt = import('qt5') +qt5_dep = dependency('qt5', modules: ['Core']) + +asqt_src = [ + 'category.cpp', + 'component.cpp', + 'pool.cpp', + 'image.cpp', + 'screenshot.cpp', + 'icon.cpp', + 'provided.cpp', + 'release.cpp', + 'bundle.cpp', + 'suggested.cpp', + 'contentrating.cpp', + 'launchable.cpp', + 'translation.cpp', + 'metadata.cpp' +] + +asqt_pub_headers = [ + 'appstreamqt_export.h', + 'category.h', + 'component.h', + 'pool.h', + 'image.h', + 'screenshot.h', + 'icon.h', + 'provided.h', + 'release.h', + 'bundle.h', + 'suggested.h', + 'contentrating.h', + 'launchable.h', + 'translation.h', + 'metadata.h' +] + +asqt_priv_headers = [ +] + +asqt_moc = qt.preprocess ( + moc_headers: asqt_pub_headers + asqt_priv_headers, + #moc_sources: asqt_src +) + +appstreamqt_lib = library ('AppStreamQt', + [asqt_src, + asqt_pub_headers, + asqt_priv_headers, + asqt_moc], + soversion: asqt_api_level, + version: as_version, + dependencies: [qt5_dep, + glib_dep, + gobject_dep, + gio_dep], + link_with: [appstream_lib], + include_directories: [appstream_lib_inc], + install: true +) + +install_headers(asqt_pub_headers, subdir: 'AppStreamQt') + +subdir('tests/') + +# +# CMake support +# + +cmake_data = configuration_data() +cmake_data.set('LIBDIR_FULL', join_paths(get_option('prefix'), get_option('libdir'))) +cmake_data.set('PREFIX', get_option('prefix')) +cmake_data.set('VERSION', as_version) + +configure_file (input: 'cmake/AppStreamQtConfig.cmake.in', + output: 'AppStreamQtConfig.cmake', + configuration: cmake_data +) +configure_file (input: 'cmake/AppStreamQtConfigVersion.cmake.in', + output: 'AppStreamQtConfigVersion.cmake', + configuration: cmake_data +) + +install_data ( + join_paths(meson.current_build_dir(), 'AppStreamQtConfig.cmake'), + join_paths(meson.current_build_dir(), 'AppStreamQtConfigVersion.cmake'), + install_dir: join_paths(get_option('libdir'), 'cmake', 'AppStreamQt') +) diff -Nru appstream-0.9.4/qt/metadata.cpp appstream-0.12.0/qt/metadata.cpp --- appstream-0.9.4/qt/metadata.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/metadata.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,315 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * Copyright (C) 2017 Jan Grulich + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" +#include "metadata.h" +#include "chelpers.h" + +#include + +using namespace AppStream; + +class AppStream::MetadataData : public QSharedData { +public: + MetadataData() + { + m_metadata = as_metadata_new(); + } + + MetadataData(AsMetadata *metadata) + : m_metadata(metadata) + { + g_object_ref(m_metadata); + } + + ~MetadataData() + { + g_object_unref(m_metadata); + } + + bool operator==(const MetadataData& rd) const + { + return rd.m_metadata == m_metadata; + } + + AsMetadata *metadata() const + { + return m_metadata; + } + + AsMetadata* m_metadata; +}; + +AppStream::Metadata::FormatKind AppStream::Metadata::stringToFormatKind(const QString& kindString) +{ + if (kindString == QLatin1String("xml")) { + return FormatKind::FormatKindXml; + } else if (kindString == QLatin1String("yaml")) { + return FormatKind::FormatKindYaml; + } + return FormatKind::FormatKindUnknown; +} + +QString AppStream::Metadata::formatKindToString(AppStream::Metadata::FormatKind kind) +{ + if (kind == FormatKind::FormatKindXml) { + return QLatin1String("xml"); + } else if (kind == FormatKind::FormatKindYaml) { + return QLatin1String("yaml"); + } + return QLatin1String("unknown"); +} + +typedef QHash VersionMap; +Q_GLOBAL_STATIC_WITH_ARGS(VersionMap, versionMap, ( { + { Metadata::FormatVersionV06, QLatin1String("0.6") }, + { Metadata::FormatVersionV07, QLatin1String("0.7") }, + { Metadata::FormatVersionV08, QLatin1String("0.8") }, + { Metadata::FormatVersionV09, QLatin1String("0.9") }, + { Metadata::FormatVersionV010, QLatin1String("0.10") }, + { Metadata::FormatVersionV011, QLatin1String("0.11") }, + } +)); + +AppStream::Metadata::FormatVersion AppStream::Metadata::stringToFormatVersion(const QString& formatVersionString) +{ + return versionMap->key(formatVersionString, AppStream::Metadata::FormatVersionV010); +} + +QString AppStream::Metadata::formatVersionToString(AppStream::Metadata::FormatVersion version) +{ + const QString value = versionMap->value(version); + if (value.isEmpty()) { + return QLatin1String("?.??"); + } + return value; +} + +Metadata::Metadata() + : d(new MetadataData()) +{} + +Metadata::Metadata(_AsMetadata* metadata) + : d(new MetadataData(metadata)) +{} + +Metadata::Metadata(const Metadata &metadata) = default; + +Metadata::~Metadata() = default; + +Metadata& Metadata::operator=(const Metadata &metadata) = default; + +bool Metadata::operator==(const Metadata &other) const +{ + if (this->d == other.d) { + return true; + } + if (this->d && other.d) { + return *(this->d) == *other.d; + } + return false; +} + +_AsMetadata * AppStream::Metadata::asMetadata() const +{ + return d->metadata(); +} + +AppStream::Metadata::MetadataError AppStream::Metadata::parseFile(const QString& file, AppStream::Metadata::FormatKind format) +{ + g_autoptr(GError) error = nullptr; + g_autoptr(GFile) gFile = g_file_new_for_path(qPrintable(file)); + as_metadata_parse_file(d->m_metadata, gFile, (AsFormatKind) format, &error); + + if (error != nullptr) { + return static_cast(error->code); + } + + return AppStream::Metadata::MetadataErrorNoError; +} + +AppStream::Metadata::MetadataError AppStream::Metadata::parse(const QString& data, AppStream::Metadata::FormatKind format) +{ + g_autoptr(GError) error = nullptr; + as_metadata_parse(d->m_metadata, qPrintable(data), (AsFormatKind) format, &error); + + if (error != nullptr) { + return static_cast(error->code); + } + + return AppStream::Metadata::MetadataErrorNoError; +} + +AppStream::Metadata::MetadataError AppStream::Metadata::parseDesktopData(const QString& data, const QString& cid) +{ + g_autoptr(GError) error = nullptr; + as_metadata_parse_desktop_data(d->m_metadata, qPrintable(data), qPrintable(cid), &error); + + if (error != nullptr) { + return static_cast(error->code); + } + + return AppStream::Metadata::MetadataErrorNoError; +} + +AppStream::Component AppStream::Metadata::component() const +{ + auto component = as_metadata_get_component(d->m_metadata); + if (component == nullptr) + return AppStream::Component(); + return AppStream::Component(component); +} + +QList AppStream::Metadata::components() const +{ + QList res; + + auto components = as_metadata_get_components(d->m_metadata); + res.reserve(components->len); + for (uint i = 0; i < components->len; i++) { + auto component = AS_COMPONENT (g_ptr_array_index (components, i)); + res.append(Component(component)); + } + return res; +} + +void AppStream::Metadata::clearComponents() +{ + as_metadata_clear_components(d->m_metadata); +} + +void AppStream::Metadata::addComponent(const AppStream::Component& component) +{ + as_metadata_add_component(d->m_metadata, component.asComponent()); +} + +QString AppStream::Metadata::componentToMetainfo(AppStream::Metadata::FormatKind format) const +{ + return valueWrap(as_metadata_component_to_metainfo(d->m_metadata, (AsFormatKind) format, nullptr)); +} + +AppStream::Metadata::MetadataError AppStream::Metadata::saveMetainfo(const QString& fname, AppStream::Metadata::FormatKind format) +{ + g_autoptr(GError) error = nullptr; + as_metadata_save_metainfo(d->m_metadata, qPrintable(fname), (AsFormatKind) format, &error); + + if (error != nullptr) { + return static_cast(error->code); + } + + return AppStream::Metadata::MetadataErrorNoError; +} + +QString AppStream::Metadata::componentsToCollection(AppStream::Metadata::FormatKind format) const +{ + return valueWrap(as_metadata_components_to_collection(d->m_metadata, (AsFormatKind) format, nullptr)); +} + +AppStream::Metadata::MetadataError AppStream::Metadata::saveCollection(const QString& collection, AppStream::Metadata::FormatKind format) +{ + g_autoptr(GError) error = nullptr; + as_metadata_save_collection(d->m_metadata, qPrintable(collection), (AsFormatKind) format, &error); + + if (error != nullptr) { + return static_cast(error->code); + } + + return AppStream::Metadata::MetadataErrorNoError; +} + +AppStream::Metadata::FormatVersion AppStream::Metadata::formatVersion() const +{ + return static_cast(as_metadata_get_format_version(d->m_metadata)); +} + +void AppStream::Metadata::setFormatVersion(AppStream::Metadata::FormatVersion formatVersion) +{ + as_metadata_set_format_version(d->m_metadata, (AsFormatVersion) formatVersion); +} + +AppStream::Metadata::FormatStyle AppStream::Metadata::formatStyle() const +{ + return static_cast(as_metadata_get_format_style(d->m_metadata)); +} + +void AppStream::Metadata::setFormatStyle(AppStream::Metadata::FormatStyle format) +{ + as_metadata_set_format_style(d->m_metadata, (AsFormatStyle) format); +} + +QString AppStream::Metadata::locale() const +{ + return valueWrap(as_metadata_get_locale(d->m_metadata)); +} + +void AppStream::Metadata::setLocale(const QString& locale) +{ + as_metadata_set_locale(d->m_metadata, qPrintable(locale)); +} + +QString AppStream::Metadata::origin() const +{ + return valueWrap(as_metadata_get_origin(d->m_metadata)); +} + +void AppStream::Metadata::setOrigin(const QString& origin) +{ + as_metadata_set_origin(d->m_metadata, qPrintable(origin)); +} + +bool AppStream::Metadata::updateExisting() const +{ + return as_metadata_get_update_existing(d->m_metadata); +} + +void AppStream::Metadata::setUpdateExisting(bool updateExisting) +{ + as_metadata_set_update_existing(d->m_metadata, updateExisting); +} + +bool AppStream::Metadata::writeHeader() const +{ + return as_metadata_get_write_header(d->m_metadata); +} + +void AppStream::Metadata::setWriteHeader(bool writeHeader) +{ + as_metadata_set_write_header(d->m_metadata, writeHeader); +} + +QString AppStream::Metadata::architecture() const +{ + return valueWrap(as_metadata_get_architecture(d->m_metadata)); +} + +void AppStream::Metadata::setArchitecture(const QString& architecture) +{ + as_metadata_set_architecture(d->m_metadata, qPrintable(architecture)); +} + +QDebug operator<<(QDebug s, const AppStream::Metadata& metadata) +{ + QStringList list; + foreach (const AppStream::Component& component, metadata.components()) { + list << component.id(); + } + s.nospace() << "AppStream::Metadata(" << list << ")"; + return s.space(); +} diff -Nru appstream-0.9.4/qt/metadata.h appstream-0.12.0/qt/metadata.h --- appstream-0.9.4/qt/metadata.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/metadata.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * Copyright (C) 2017 Jan Grulich + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_METADATA_H +#define APPSTREAMQT_METADATA_H + +#include +#include +#include +#include "appstreamqt_export.h" + +#include "component.h" + +struct _AsMetadata; +namespace AppStream { + +class MetadataData; +class APPSTREAMQT_EXPORT Metadata { + Q_GADGET + public: + enum FormatStyle { + FormatStyleUnknown, + FormatStyleMetainfo, + FormatStyleCollection + }; + Q_ENUM(FormatStyle) + + enum FormatKind { + FormatKindUnknown, + FormatKindXml, + FormatKindYaml, + FormatKindDesktopEntry + }; + Q_ENUM(FormatKind) + + enum FormatVersion { + FormatVersionV06, + FormatVersionV07, + FormatVersionV08, + FormatVersionV09, + FormatVersionV010, + FormatVersionV011 + }; + Q_ENUM(FormatVersion) + + enum MetadataError { + /* + * Needed to identify whether parsing was successful or not + */ + MetadataErrorNoError = -1, + MetadataErrorFailed, + MetadataErrorParse, + MetadataErrorFormatUnexpected, + MetadataErrorNoComponent, + MetadataErrorValueMissing + }; + Q_ENUM(MetadataError) + + static FormatKind stringToFormatKind(const QString& kindString); + static QString formatKindToString(FormatKind format); + + static FormatVersion stringToFormatVersion(const QString& formatVersionString); + static QString formatVersionToString(FormatVersion version); + + Metadata(); + explicit Metadata(_AsMetadata *metadata); + Metadata(const Metadata& metadata); + ~Metadata(); + + Metadata& operator=(const Metadata& metadata); + bool operator==(const Metadata& r) const; + + /** + * \returns the internally stored AsMetadata + */ + _AsMetadata *asMetadata() const; + + MetadataError parseFile(const QString& file, FormatKind format); + + MetadataError parse(const QString& data, FormatKind format); + + MetadataError parseDesktopData(const QString& data, const QString& cid); + + AppStream::Component component() const; + QList components() const; + void clearComponents(); + void addComponent(const AppStream::Component& component); + + QString componentToMetainfo(FormatKind format) const; + + MetadataError saveMetainfo(const QString& fname, FormatKind format); + + QString componentsToCollection(FormatKind format) const; + + MetadataError saveCollection(const QString& collection, FormatKind format); + + FormatVersion formatVersion() const; + void setFormatVersion(FormatVersion formatVersion); + + FormatStyle formatStyle() const; + void setFormatStyle(FormatStyle format); + + QString locale() const; + void setLocale(const QString& locale); + + QString origin() const; + void setOrigin(const QString& origin); + + bool updateExisting() const; + void setUpdateExisting(bool updateExisting); + + bool writeHeader() const; + void setWriteHeader(bool writeHeader); + + QString architecture() const; + void setArchitecture(const QString& architecture); + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Metadata& metadata); + +#endif // APPSTREAMQT_METADATA_H + diff -Nru appstream-0.9.4/qt/pool.cpp appstream-0.12.0/qt/pool.cpp --- appstream-0.9.4/qt/pool.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/pool.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include +#include "pool.h" + +#include +#include +#include + +Q_LOGGING_CATEGORY(APPSTREAMQT_POOL, "appstreamqt.pool") + +using namespace AppStream; + +class AppStream::PoolPrivate { + public: + AsPool *m_pool; + + PoolPrivate() + { + m_pool = as_pool_new(); + } + + ~PoolPrivate() { + g_object_unref(m_pool); + } +}; + +static QList cptArrayToQList(GPtrArray *cpts) +{ + QList res; + res.reserve(cpts->len); + for (uint i = 0; i < cpts->len; i++) { + auto cpt = AS_COMPONENT(g_ptr_array_index(cpts, i)); + Component x(cpt); + res.append(x); + } + return res; +} + +Pool::Pool(QObject *parent) + : QObject (parent), + d(new PoolPrivate()) +{} + +Pool::~Pool() +{ + // empty. needed for the scoped pointer for the private pointer +} + +bool AppStream::Pool::load() +{ + return load(nullptr); +} + +bool Pool::load(QString* strerror) +{ + g_autoptr(GError) error = nullptr; + bool ret = as_pool_load (d->m_pool, NULL, &error); + if (!ret && error && strerror) { + *strerror = QString::fromUtf8(error->message); + } + return ret; +} + +void Pool::clear() +{ + return as_pool_clear (d->m_pool); +} + +bool Pool::addComponent(const AppStream::Component& cpt) +{ + // FIXME: We ignore errors for now. + return as_pool_add_component (d->m_pool, cpt.m_cpt, NULL); +} + +QList Pool::components() const +{ + return cptArrayToQList(as_pool_get_components(d->m_pool)); +} + +QList Pool::componentsById(const QString& cid) const +{ + return cptArrayToQList(as_pool_get_components_by_id(d->m_pool, qPrintable(cid))); +} + +QList Pool::componentsByProvided(Provided::Kind kind, const QString& item) const +{ + return cptArrayToQList(as_pool_get_components_by_provided_item(d->m_pool, + static_cast(kind), + qPrintable(item))); +} + +QList Pool::componentsByKind(Component::Kind kind) const +{ + return cptArrayToQList(as_pool_get_components_by_kind(d->m_pool, static_cast(kind))); +} + +QList Pool::componentsByCategories(const QStringList categories) const +{ + // FIXME: Todo + QList res; + //! return cptArrayToQList(as_pool_get_components_by_categories (d->m_pool, ); + return res; +} + +QList Pool::componentsByLaunchable(Launchable::Kind kind, const QString& value) const +{ + return cptArrayToQList(as_pool_get_components_by_launchable(d->m_pool, + static_cast(kind), + qPrintable(value))); +} + +QList Pool::search(const QString& term) const +{ + return cptArrayToQList(as_pool_search(d->m_pool, qPrintable(term))); +} + +void Pool::clearMetadataLocations() +{ + as_pool_clear_metadata_locations(d->m_pool); +} + +void Pool::addMetadataLocation(const QString& directory) +{ + as_pool_add_metadata_location (d->m_pool, qPrintable(directory)); +} + +void Pool::setLocale(const QString& locale) +{ + as_pool_set_locale (d->m_pool, qPrintable(locale)); +} + +uint Pool::flags() const +{ + return (uint) as_pool_get_flags(d->m_pool); +} + +void Pool::setFlags(uint flags) +{ + as_pool_set_flags (d->m_pool, (AsPoolFlags) flags); +} + +uint Pool::cacheFlags() const +{ + return (uint) as_pool_get_cache_flags(d->m_pool); +} + +void Pool::setCacheFlags(uint flags) +{ + as_pool_set_cache_flags (d->m_pool, (AsCacheFlags) flags); +} diff -Nru appstream-0.9.4/qt/pool.h appstream-0.12.0/qt/pool.h --- appstream-0.9.4/qt/pool.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/pool.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_POOL_H +#define APPSTREAMQT_POOL_H + +#include "appstreamqt_export.h" + +#include +#include +#include +#include "component.h" + +namespace AppStream { + +/** + * Access the AppStream metadata pool. + * + * See http://www.freedesktop.org/wiki/Distributions/AppStream/ for details + */ +class PoolPrivate; +class APPSTREAMQT_EXPORT Pool : QObject{ +Q_OBJECT + public: + Pool(QObject *parent = nullptr); + ~Pool(); + + /** + * Pool::Flags: + * FlagNone: No flags. + * FlagReadCollection: Add AppStream collection metadata to the pool. + * FlagReadMetainfo: Add data from AppStream metainfo files to the pool. + * FlagReadDesktopFiles: Add metadata from .desktop files to the pool. + * + * Flags on how caching should be used. + **/ + enum Flags { + FlagNone = 0, + FlagReadCollection = 1 << 0, + FlagReadMetainfo = 1 << 1, + FlagReadDesktopFiles = 1 << 2, + }; + + /** + * Pool::CacheFlags: + * None: No flags. + * UseUser: Create an user-specific metadata cache. + * UseSystem: Use and - if possible - update the global metadata cache. + * + * Flags on how caching should be used. + **/ + enum CacheFlags { + CacheFlagNone = 0, + CacheFlagUseUser = 1 << 0, + CacheFlagUseSystem = 1 << 1, + }; + + /** + * \return true on success. False on failure + */ + bool load(); + + /** + * \return true on success. False on failure + * + * In case of failure, @p error will be initialized with the error message + */ + bool load(QString* error); + + /** + * Remove all software component information from the pool. + */ + void clear(); + + /** + * Add a component to the pool. + */ + bool addComponent(const AppStream::Component& cpt); + + QList components() const; + + QList componentsById(const QString& cid) const; + + QList componentsByProvided(Provided::Kind kind, const QString& item) const; + + QList componentsByKind(Component::Kind kind) const; + + QList componentsByCategories(const QStringList categories) const; + + QList componentsByLaunchable(Launchable::Kind kind, const QString& value) const; + + QList search(const QString& term) const; + + void clearMetadataLocations(); + void addMetadataLocation(const QString& directory); + + void setLocale(const QString& locale); + + uint flags() const; + void setFlags(uint flags); + + uint cacheFlags() const; + void setCacheFlags(uint flags); + + private: + Q_DISABLE_COPY(Pool); + QScopedPointer d; +}; +} + +#endif // APPSTREAMQT_POOL_H diff -Nru appstream-0.9.4/qt/provided.cpp appstream-0.12.0/qt/provided.cpp --- appstream-0.9.4/qt/provided.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/provided.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" +#include "provided.h" + +#include +#include +#include +#include + +#include "chelpers.h" + +using namespace AppStream; + +class AppStream::ProvidedData : public QSharedData { +public: + ProvidedData() + { + m_prov = as_provided_new(); + } + + ProvidedData(AsProvided *prov) + : m_prov(prov) + { + g_object_ref(m_prov); + } + + ~ProvidedData() + { + g_object_unref(m_prov); + } + + bool operator==(const ProvidedData& rd) const + { + return rd.m_prov == m_prov; + } + + AsProvided *provided() const + { + return m_prov; + } + + AsProvided *m_prov; +}; + +QString Provided::kindToString(Provided::Kind kind) +{ + return valueWrap(as_provided_kind_to_string((AsProvidedKind) kind)); +} + +Provided::Kind Provided::stringToKind(const QString& kindString) +{ + return Provided::Kind(as_provided_kind_from_string(qPrintable(kindString))); +} + +Provided::Provided(const Provided& other) + : d(other.d) +{} + +Provided::Provided(_AsProvided *prov) + : d(new ProvidedData(prov)) +{} + +Provided::Provided() + : d(new ProvidedData) +{} + +Provided::~Provided() +{} + +Provided& Provided::operator=(const Provided& other) +{ + this->d = other.d; + return *this; +} + +bool Provided::operator==(const Provided& other) const +{ + if(d == other.d) { + return true; + } + if(d && other.d) { + return *d == *other.d; + } + return false; +} + +_AsProvided * AppStream::Provided::asProvided() const +{ + return d->provided(); +} + +Provided::Kind Provided::kind() const +{ + return Provided::Kind(as_provided_get_kind(d->m_prov)); +} + +QStringList Provided::items() const +{ + return valueWrap(as_provided_get_items(d->m_prov)); +} + +bool Provided::hasItem(const QString& item) const +{ + return as_provided_has_item (d->m_prov, qPrintable(item)); +} + +bool Provided::isEmpty() const +{ + auto array = as_provided_get_items(d->m_prov); + if (!array) + return true; + return array->len == 0; +} + +QDebug operator<<(QDebug s, const AppStream::Provided& Provided) { + s.nospace() << "AppStream::Provided(" << Provided.kind() << ',' << Provided.items() << "])"; + return s.space(); +} diff -Nru appstream-0.9.4/qt/provided.h appstream-0.12.0/qt/provided.h --- appstream-0.9.4/qt/provided.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/provided.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_PROVIDED_H +#define APPSTREAMQT_PROVIDED_H + +#include +#include +#include +#include "appstreamqt_export.h" + +struct _AsProvided; + +namespace AppStream { + +class ProvidedData; + +class APPSTREAMQT_EXPORT Provided { + Q_GADGET + public: + Provided(); + Provided(_AsProvided *prov); + Provided(const Provided& other); + ~Provided(); + Provided& operator=(const Provided& other); + bool operator==(const Provided& other) const; + + /** + * \returns the internally stored AsProvided + */ + _AsProvided *asProvided() const; + + enum Kind { + KindUnknown, + KindLibrary, + KindBinary, + KindMimetype, + KindFont, + KindModalias, + KindPython2Module, + KindPython3Module, + KindDBusSystemService, + KindDBusUserService, + KindFirmwareRuntime, + KindFirmwareFlashed + }; + Q_ENUM(Kind) + + static Kind stringToKind(const QString& kind); + static QString kindToString(Kind kind); + + Kind kind() const; + + QStringList items() const; + bool hasItem(const QString &item) const; + + bool isEmpty() const; + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Provided& provides); + +#endif // APPSTREAMQT_PROVIDED_H diff -Nru appstream-0.9.4/qt/provides.cpp appstream-0.12.0/qt/provides.cpp --- appstream-0.9.4/qt/provides.cpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/provides.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,167 +0,0 @@ -/* - * - * Copyright (C) 2014 Sune Vuorela - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "provides.h" -#include -#include -#include - -using namespace Appstream; - -class Appstream::ProvidesData : public QSharedData { - public: - Provides::Kind m_kind; - QString m_value; - QString m_extraData; - bool operator==(const ProvidesData& other) const { - if(m_kind != other.m_kind) { - return false; - } - if(m_value != other.m_value) { - return false; - } - if(m_extraData != other.m_extraData) { - return false; - } - return true; - } -}; - -QString Provides::extraData() const { - return d->m_extraData; -} - -Provides::Kind Provides::kind() const { - return d->m_kind; -} - -typedef QHash KindToString; -Q_GLOBAL_STATIC_WITH_ARGS(KindToString, s_providesKindMap, ({ - { Provides::KindLibrary, QLatin1String("lib") }, - { Provides::KindBinary, QLatin1String("bin") }, - { Provides::KindMimetype, QLatin1String("mimetype") }, - { Provides::KindFont, QLatin1String("font") }, - { Provides::KindModAlias, QLatin1String("modalias") }, - { Provides::KindPython2Module, QLatin1String("python2") }, - { Provides::KindPython3Module, QLatin1String("python") }, - { Provides::KindDBusSystemService, QLatin1String("dbus:system") }, - { Provides::KindDBusUserService, QLatin1String("dbus:user") }, - { Provides::KindFirmwareRuntime, QLatin1String("firmware:runtime") }, - { Provides::KindFirmwareFlashed, QLatin1String("firmware:flashed") }, - { Provides::KindUnknown, QLatin1String("unknown") } -})) - - -QString Provides::kindToString(Provides::Kind kind) { - return s_providesKindMap->value(kind); -} - -Provides& Provides::operator=(const Provides& other) { - this->d = other.d; - return *this; -} - -bool Provides::operator==(const Provides& other) const { - if(d == other.d) { - return true; - } - if(d && other.d) { - return *d == *other.d; - } - return false; -} - -Provides::Provides(const Provides& other) : d(other.d) { - -} - -Provides::Provides() : d(new ProvidesData) { - -} - -void Provides::setExtraData(const QString& string) { - d->m_extraData = string; -} - -void Provides::setKind(Provides::Kind kind) { - d->m_kind = kind; -} - -void Provides::setValue(const QString& string) { - d->m_value = string; -} - -Provides::Kind Provides::stringToKind(const QString& kindString) { - if(kindString == QLatin1String("lib")) { - return Provides::KindLibrary; - } - if(kindString == QLatin1String("bin")) { - return Provides::KindBinary; - } - if(kindString == QLatin1String("mimetype")) { - return Provides::KindMimetype; - } - if(kindString == QLatin1String("font")) { - return Provides::KindFont; - } - if(kindString == QLatin1String("modalias")) { - return Provides::KindModAlias; - } - if(kindString == QLatin1String("python2")) { - return Provides::KindPython2Module; - } - if(kindString == QLatin1String("python")) { - return Provides::KindPython3Module; - } - if(kindString == QLatin1String("dbus:system")) { - return Provides::KindDBusSystemService; - } - if(kindString == QLatin1String("dbus:user")) { - return Provides::KindDBusUserService; - } - if(kindString == QLatin1String("firmware:runtime")) { - return Provides::KindFirmwareRuntime; - } - if(kindString == QLatin1String("firmware:flashed")) { - return Provides::KindFirmwareFlashed; - } - return Provides::KindUnknown; -} - -QString Provides::value() const { - return d->m_value; -} - -Provides::~Provides() { - -} - - - - - - - - - - - - - diff -Nru appstream-0.9.4/qt/provides.h appstream-0.12.0/qt/provides.h --- appstream-0.9.4/qt/provides.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/provides.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -/* - * - * Copyright (C) 2014 Sune Vuorela - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef APPSTREAMQT_PROVIDES_H -#define APPSTREAMQT_PROVIDES_H - -#include -#include -#include -#include "appstreamqt_export.h" - -namespace Appstream { - -class ProvidesData; - -class APPSTREAMQT_EXPORT Provides { - Q_GADGET - Q_ENUMS(Kind) - public: - Provides(); - Provides(const Provides& other); - ~Provides(); - Provides& operator=(const Provides& other); - bool operator==(const Provides& other) const; - - enum Kind { - KindUnknown, - KindLibrary, - KindBinary, - KindMimetype, - KindFont, - KindModAlias, - KindPython2Module, - KindPython3Module, - KindDBusSystemService, - KindDBusUserService, - KindFirmwareRuntime, - KindFirmwareFlashed - }; - - void setKind(Kind kind); - Kind kind() const; - - static Kind stringToKind(const QString& kind); - static QString kindToString(Kind kind); - - void setValue(const QString& string); - QString value() const; - - void setExtraData(const QString& string); - QString extraData() const; - - private: - QSharedDataPointer d; -}; -} - -#endif // APPSTREAMQT_PROVIDES_H diff -Nru appstream-0.9.4/qt/release.cpp appstream-0.12.0/qt/release.cpp --- appstream-0.9.4/qt/release.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/release.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2016 Aleix Pol Gonzalez + * Copyright (C) 2018 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" + +#include "release.h" + +#include +#include +#include + +using namespace AppStream; + +class AppStream::ReleaseData : public QSharedData { +public: + ReleaseData(AsRelease* rel) : m_release(rel) + { + g_object_ref(m_release); + } + + ~ReleaseData() + { + g_object_unref(m_release); + } + + bool operator==(const ReleaseData& rd) const + { + return rd.m_release == m_release; + } + + AsRelease *release() const + { + return m_release; + } + + AsRelease* m_release; +}; + +Release::Release(_AsRelease* release) + : d(new ReleaseData(release)) +{} + +Release::Release(const Release &release) = default; + +Release::~Release() = default; + +Release& Release::operator=(const Release &release) = default; + +bool Release::operator==(const Release &other) const +{ + if(this->d == other.d) { + return true; + } + if(this->d && other.d) { + return *(this->d) == *other.d; + } + return false; +} + +_AsRelease * AppStream::Release::asRelease() const +{ + return d->release(); +} + +Release::Kind Release::kind() const +{ + return Release::Kind(as_release_get_kind(d->m_release)); +} + +QString Release::version() const +{ + return QString::fromUtf8(as_release_get_version(d->m_release)); +} + +QDateTime Release::timestamp() const +{ + return QDateTime::fromTime_t(as_release_get_timestamp(d->m_release)); +} + +QString Release::description() const +{ + return QString::fromUtf8(as_release_get_description(d->m_release)); +} + +QString Release::activeLocale() const +{ + return QString::fromUtf8(as_release_get_active_locale(d->m_release)); +} + +QList Release::locations() const +{ + auto urls = as_release_get_locations(d->m_release); + QList ret; + ret.reserve(urls->len); + for(uint i = 0; ilen; ++i) { + auto strval = (const gchar*) g_ptr_array_index (urls, i); + ret << QUrl(QString::fromUtf8(strval)); + } + return ret; +} + +Checksum Release::checksum() const +{ + { + auto cs = as_release_get_checksum(d->m_release, AS_CHECKSUM_KIND_SHA256); + if (cs) + return Checksum { Checksum::KindSha256, QByteArray(as_checksum_get_value (cs)) }; + } + + { + auto cs = as_release_get_checksum(d->m_release, AS_CHECKSUM_KIND_SHA1); + if (cs) + return Checksum { Checksum::KindSha1, QByteArray(as_checksum_get_value (cs)) }; + } + return Checksum { Checksum::KindNone, "" }; +} + +QHash Release::sizes() const +{ + return { + { SizeInstalled, as_release_get_size(d->m_release, AS_SIZE_KIND_INSTALLED) }, + { SizeDownload, as_release_get_size(d->m_release, AS_SIZE_KIND_DOWNLOAD) } + }; +} + +Release::UrgencyKind Release::urgency() const +{ + return Release::UrgencyKind(as_release_get_urgency(d->m_release)); +} + +QDebug operator<<(QDebug s, const AppStream::Release& release) +{ + s.nospace() << "AppStream::Release(" << release.version() << ": " << release.description() << ")"; + return s.space(); +} diff -Nru appstream-0.9.4/qt/release.h appstream-0.12.0/qt/release.h --- appstream-0.9.4/qt/release.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/release.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2016 Aleix Pol Gonzalez + * Copyright (C) 2018 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_RELEASE_H +#define APPSTREAMQT_RELEASE_H + +#include +#include +#include +#include +#include "appstreamqt_export.h" + +struct _AsRelease; + +namespace AppStream { + +class ReleaseData; + +struct Checksum { + enum ChecksumKind { + KindNone, + KindSha256, + KindSha1 + }; + const ChecksumKind kind; + const QByteArray data; +}; + +class APPSTREAMQT_EXPORT Release { + Q_GADGET + public: + Release(_AsRelease* release); + Release(const Release& release); + ~Release(); + + Release& operator=(const Release& release); + bool operator==(const Release& r) const; + + /** + * \returns the internally stored AsRelease + */ + _AsRelease *asRelease() const; + + enum Kind { + KindUnknown, + KindStable, + KindDevelopment + }; + Q_ENUM(Kind) + + enum SizeKind { + SizeUnknown, + SizeDownload, + SizeInstalled + }; + Q_ENUM(SizeKind) + + enum UrgencyKind { + UrgencyUnknown, + UrgencyLow, + UrgencyMedium, + UrgencyHigh, + UrgencyCritical + }; + Q_ENUM(UrgencyKind) + + Kind kind() const; + + QString version() const; + + QDateTime timestamp() const; + + QString description() const; + + QString activeLocale() const; + + QList locations() const; + + Checksum checksum() const; + + QHash sizes() const; + + UrgencyKind urgency() const; + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Release& release); + +#endif // APPSTREAMQT_RELEASE_H diff -Nru appstream-0.9.4/qt/screenshot.cpp appstream-0.12.0/qt/screenshot.cpp --- appstream-0.9.4/qt/screenshot.cpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/screenshot.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -1,98 +1,122 @@ /* - * - * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2016 Matthias Klumpp * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . */ +#include "appstream.h" #include "screenshot.h" + #include #include +#include +#include "chelpers.h" #include "image.h" -using namespace Appstream; +using namespace AppStream; -class Appstream::ScreenshotData : public QSharedData { - public: - ScreenshotData() : m_default(false) { - } - bool m_default; - QString m_caption; - QList m_images; - bool operator==(const ScreenshotData& other) { - if(m_default != other.m_default) { - return false; - } - if(m_caption != other.m_caption) { - return false; - } - if(m_images != other.m_images) { - return false; - } - return true; - } -}; +class AppStream::ScreenshotData : public QSharedData { +public: + ScreenshotData() + { + m_scr = as_screenshot_new(); + } -QString Screenshot::caption() const { - return d->m_caption; -} + ScreenshotData(AsScreenshot *scr) : m_scr(scr) + { + g_object_ref(m_scr); + } -QList< Image > Screenshot::images() const { - return d->m_images; -} + ~ScreenshotData() + { + g_object_unref(m_scr); + } -bool Screenshot::isDefault() const { - return d->m_default; -} + bool operator==(const ScreenshotData& rd) const + { + return rd.m_scr == m_scr; + } + + AsScreenshot *screenshot() const + { + return m_scr; + } + + AsScreenshot *m_scr; +}; -Screenshot& Screenshot::operator=(const Screenshot& other) { +Screenshot::Screenshot(const Screenshot& other) + : d(other.d) +{} + +Screenshot::Screenshot() + : d(new ScreenshotData) +{} + +Screenshot::Screenshot(_AsScreenshot *scr) + : d(new ScreenshotData(scr)) +{} + +Screenshot::~Screenshot() +{} + +Screenshot& Screenshot::operator=(const Screenshot& other) +{ d = other.d; return *this; } -bool Screenshot::operator==(const Screenshot& other) { - if(d == other.d) { - return true; - } - if(d && other.d) { - return *d == *other.d; - } - return false; +_AsScreenshot * AppStream::Screenshot::asScreenshot() const +{ + return d->screenshot(); } -Screenshot::Screenshot(const Screenshot& other) : d(other.d) { - +bool Screenshot::isDefault() const +{ + return as_screenshot_get_kind(d->m_scr) == AS_SCREENSHOT_KIND_DEFAULT; } -Screenshot::Screenshot() : d(new ScreenshotData) { - +QString Screenshot::caption() const +{ + return valueWrap(as_screenshot_get_caption(d->m_scr)); } -void Screenshot::setCaption(const QString& caption) { - d->m_caption = caption; +void Screenshot::setCaption(const QString& caption, const QString& lang) +{ + as_screenshot_set_caption(d->m_scr, qPrintable(caption), lang.isEmpty()? NULL : qPrintable(lang)); } -void Screenshot::setDefault(bool default_) { - d->m_default = default_; -} +QList Screenshot::images() const +{ + QList res; -void Screenshot::setImages(const QList< Image >& images) { - d->m_images = images; + auto images = as_screenshot_get_images(d->m_scr); + res.reserve(images->len); + for (uint i = 0; i < images->len; i++) { + auto img = AS_IMAGE (g_ptr_array_index (images, i)); + res.append(Image(img)); + } + return res; } -Screenshot::~Screenshot() { - +QDebug operator<<(QDebug s, const AppStream::Screenshot& screenshot) { + s.nospace() << "AppStream::Screenshot("; + if (!screenshot.caption().isEmpty()) + s.nospace() << screenshot.caption() << ":"; + s.nospace() << screenshot.images() << ')'; + return s.space(); } diff -Nru appstream-0.9.4/qt/screenshot.h appstream-0.12.0/qt/screenshot.h --- appstream-0.9.4/qt/screenshot.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/screenshot.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,36 +1,37 @@ /* - * - * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2014 Sune Vuorela + * Copyright (C) 2016 Matthias Klumpp * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . */ #ifndef APPSTREAMQT_SCREENSHOT_H #define APPSTREAMQT_SCREENSHOT_H #include - #include "appstreamqt_export.h" #include #include -namespace Appstream { -class Image; +struct _AsScreenshot; +namespace AppStream { + +class Image; class ScreenshotData; /** @@ -41,29 +42,32 @@ class APPSTREAMQT_EXPORT Screenshot { public: Screenshot(); + Screenshot(_AsScreenshot *scr); Screenshot(const Screenshot& other); ~Screenshot(); Screenshot& operator=(const Screenshot& other); - bool operator==(const Screenshot& other); + + /** + * \returns the internally stored AsScreenshot + */ + _AsScreenshot *asScreenshot() const; /** * \return true if it is the default screenshot * A \ref Component should in general only have one default */ bool isDefault() const; - void setDefault(bool default_); - void setImages(const QList& images); /** * \return the images for this screenshot */ - QList images() const; + QList images() const; /** * \return caption for this image or a null QString if no caption */ QString caption() const; - void setCaption(const QString& caption); + void setCaption(const QString& caption, const QString& lang = {}); private: QSharedDataPointer d; @@ -71,4 +75,6 @@ }; } +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Screenshot& screenshot); + #endif // APPSTREAMQT_SCREENSHOT_H diff -Nru appstream-0.9.4/qt/suggested.cpp appstream-0.12.0/qt/suggested.cpp --- appstream-0.9.4/qt/suggested.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/suggested.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2016 Aleix Pol Gonzalez + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" +#include "suggested.h" + +#include +#include +#include +#include +#include "chelpers.h" + +using namespace AppStream; + +class AppStream::SuggestedData : public QSharedData { +public: + SuggestedData() + { + m_suggested = as_suggested_new(); + } + + SuggestedData(AsSuggested *suggested) + : m_suggested(suggested) + { + g_object_ref(m_suggested); + } + + ~SuggestedData() + { + g_object_unref(m_suggested); + } + + bool operator==(const SuggestedData& rd) const + { + return rd.m_suggested == m_suggested; + } + + AsSuggested *suggested() const + { + return m_suggested; + } + + AsSuggested *m_suggested; +}; + +Suggested::Suggested(const Suggested& other) + : d(other.d) +{} + +Suggested::Suggested() + : d(new SuggestedData) +{} + +Suggested::Suggested(_AsSuggested *suggested) + : d(new SuggestedData(suggested)) +{} + +Suggested::~Suggested() +{} + +Suggested& Suggested::operator=(const Suggested& other) +{ + this->d = other.d; + return *this; +} + +_AsSuggested * AppStream::Suggested::suggested() const +{ + return d->suggested(); +} + +Suggested::Kind Suggested::kind() const +{ + return Suggested::Kind(as_suggested_get_kind(d->m_suggested)); +} + +void Suggested::setKind(Suggested::Kind kind) +{ + as_suggested_set_kind(d->m_suggested, (AsSuggestedKind) kind); +} + +const QStringList AppStream::Suggested::ids() const +{ + return valueWrap(as_suggested_get_ids(d->m_suggested)); +} + +void AppStream::Suggested::addSuggested(const QString& id) +{ + as_suggested_add_id(d->m_suggested, qPrintable(id)); +} + +QDebug operator<<(QDebug s, const AppStream::Suggested& suggested) +{ + s.nospace() << "AppStream::Suggested(" << suggested.ids() << ")"; + return s.space(); +} diff -Nru appstream-0.9.4/qt/suggested.h appstream-0.12.0/qt/suggested.h --- appstream-0.9.4/qt/suggested.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/suggested.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2016 Aleix Pol Gonzalez + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_SUGGESTED_H +#define APPSTREAMQT_SUGGESTED_H + +#include +#include +#include "appstreamqt_export.h" + +class QUrl; +class QString; +struct _AsSuggested; +namespace AppStream { + +class SuggestedData; + +/** + * This class provides a list of other component-ids suggested by a software component, as well + * as an origin of the suggestion (manually suggested by the upstream project, or + * automatically determined by heuristics).. + */ +class APPSTREAMQT_EXPORT Suggested { + Q_GADGET + public: + enum Kind { + KindUnknown, + KindUpstream, + KindHeuristic + }; + Q_ENUM(Kind) + + Suggested(); + Suggested(_AsSuggested *suggested); + Suggested(const Suggested& other); + ~Suggested(); + + Suggested& operator=(const Suggested& other); + + /** + * \returns the internally stored AsSuggested + */ + _AsSuggested *suggested() const; + + /** + * \return the kind of suggestion + */ + Kind kind() const; + void setKind(Kind kind); + + /** + * \return the local or remote url for this suggested + */ + const QStringList ids() const; + void addSuggested(const QString &id); + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Suggested& suggested); + +#endif // APPSTREAMQT_SUGGESTED_H diff -Nru appstream-0.9.4/qt/test/CMakeLists.txt appstream-0.12.0/qt/test/CMakeLists.txt --- appstream-0.9.4/qt/test/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/test/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - -find_package(Qt5 COMPONENTS Test REQUIRED) - -configure_file (${CMAKE_CURRENT_SOURCE_DIR}/testpaths.h.in ${CMAKE_CURRENT_BINARY_DIR}/testpaths.h @ONLY) - -add_executable(qtdbreadtest qtdbreadtest.cpp) -target_link_libraries(qtdbreadtest - Qt5::Core - Qt5::Test - AppstreamQt -) -add_test(qtdbreadtest qtdbreadtest) diff -Nru appstream-0.9.4/qt/test/qtdbreadtest.cpp appstream-0.12.0/qt/test/qtdbreadtest.cpp --- appstream-0.9.4/qt/test/qtdbreadtest.cpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/test/qtdbreadtest.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ - -#include -#include -#include "database.h" -#include "testpaths.h" - -class DatabaseReadTest : public QObject { - Q_OBJECT - private Q_SLOTS: - void testRead01(); -}; - -using namespace Appstream; - -void DatabaseReadTest::testRead01() -{ - // first, create a new database - QProcess *p = new QProcess(this); - QTemporaryDir dbdir; - QVERIFY(dbdir.isValid()); - - const QStringList args = { "refresh-index", "--datapath=" AS_SAMPLE_DATA, "--dbpath=" + dbdir.path()}; - p->start(ASCLI_EXECUTABLE, args); - p->waitForFinished(); - - qDebug() << p->readAllStandardOutput(); - qDebug() << p->readAllStandardError(); - - QCOMPARE(p->exitCode(), 0); - - // we now have a database, let's read some data - - auto *db = new Database(dbdir.path() + "/xapian/default"); - QVERIFY(db->open()); - - QList cpts = db->allComponents(); - QCOMPARE(cpts.size(), 18); - - Component cpt = db->componentById("neverball.desktop"); - QVERIFY(!cpt.id().isEmpty()); - - QCOMPARE(cpt.name(), QLatin1String("Neverball")); - - delete db; -} - -QTEST_MAIN(DatabaseReadTest) - -#include "qtdbreadtest.moc" diff -Nru appstream-0.9.4/qt/test/testpaths.h.in appstream-0.12.0/qt/test/testpaths.h.in --- appstream-0.9.4/qt/test/testpaths.h.in 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/qt/test/testpaths.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - -#ifndef __TEST_DATAPATHS_H -#define __TEST_DATAPATHS_H - -#define ASCLI_EXECUTABLE QStringLiteral("@CMAKE_BINARY_DIR@/tools/appstreamcli") -#define AS_SAMPLE_DATA "@CMAKE_SOURCE_DIR@/tests/samples/distro" - -#endif // __TEST_DATAPATHS_H diff -Nru appstream-0.9.4/qt/tests/asqt-pool-test.cpp appstream-0.12.0/qt/tests/asqt-pool-test.cpp --- appstream-0.9.4/qt/tests/asqt-pool-test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/tests/asqt-pool-test.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include +#include +#include +#include "pool.h" +#include "testpaths.h" + +class PoolReadTest : public QObject { + Q_OBJECT + private Q_SLOTS: + void testRead01(); +}; + +using namespace AppStream; + +void PoolReadTest::testRead01() +{ + // set up the data pool to read our sample data, without localization + auto pool = new Pool(); + + pool->clearMetadataLocations(); + pool->addMetadataLocation(AS_SAMPLE_DATA_PATH); + pool->setLocale("C"); + + // don't load system metainfo/desktop files + auto flags = pool->flags(); + flags &= ~Pool::FlagReadDesktopFiles; + pool->setFlags(flags); + + // don't use caches + pool->setCacheFlags(Pool::CacheFlagNone); + + // read metadata + QVERIFY(pool->load()); + + auto cpts = pool->components(); + QCOMPARE(cpts.size(), 18); + + cpts = pool->componentsById("org.neverball.Neverball"); + QCOMPARE(cpts.size(), 1); + + auto cpt = cpts[0]; + QVERIFY(!cpt.id().isEmpty()); + + QCOMPARE(cpt.name(), QLatin1String("Neverball")); + + delete pool; +} + +QTEST_MAIN(PoolReadTest) + +#include "asqt-pool-test.moc" diff -Nru appstream-0.9.4/qt/tests/meson.build appstream-0.12.0/qt/tests/meson.build --- appstream-0.9.4/qt/tests/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/tests/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,25 @@ +# Meson definition for AppStream Qt Tests + +qt5_test_dep = dependency('qt5', modules: ['Core', 'Test']) + +testpaths_h = configuration_data() +testpaths_h.set_quoted('AS_SAMPLE_DATA_PATH', join_paths(source_root, 'tests', 'samples', 'collection')) +configure_file (output: 'testpaths.h', configuration: testpaths_h) + +asqt_test_src = [ + 'asqt-pool-test.cpp' +] + +asqt_test_moc = qt.preprocess (moc_sources: asqt_test_src) + +as_test_qt_exe = executable ('as-test_qt', + [asqt_test_src, + asqt_test_moc], + dependencies: [qt5_test_dep], + include_directories: [include_directories('..')], + link_with: [appstreamqt_lib], +) +test ('as-test_qt', + as_test_qt_exe, + env: as_test_env +) diff -Nru appstream-0.9.4/qt/tests/testpaths.h.in appstream-0.12.0/qt/tests/testpaths.h.in --- appstream-0.9.4/qt/tests/testpaths.h.in 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/tests/testpaths.h.in 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,7 @@ + +#ifndef __TEST_DATAPATHS_H +#define __TEST_DATAPATHS_H + +#define AS_SAMPLE_DATA_PATH "@CMAKE_SOURCE_DIR@/tests/samples/collection" + +#endif // __TEST_DATAPATHS_H diff -Nru appstream-0.9.4/qt/translation.cpp appstream-0.12.0/qt/translation.cpp --- appstream-0.9.4/qt/translation.cpp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/translation.cpp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2017 Jan Grulich + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "appstream.h" +#include "translation.h" + +#include +#include "chelpers.h" + +using namespace AppStream; + +class AppStream::TranslationData : public QSharedData { +public: + TranslationData() + { + m_translation = as_translation_new(); + } + + TranslationData(AsTranslation* cat) : m_translation(cat) + { + g_object_ref(m_translation); + } + + ~TranslationData() + { + g_object_unref(m_translation); + } + + bool operator==(const TranslationData& rd) const + { + return rd.m_translation == m_translation; + } + + AsTranslation *translation() const + { + return m_translation; + } + + AsTranslation* m_translation; +}; + +AppStream::Translation::Kind AppStream::Translation::stringToKind(const QString& kindString) +{ + if (kindString == QLatin1String("gettext")) { + return AppStream::Translation::KindGettext; + } else if (kindString == QLatin1String("qt")) { + return AppStream::Translation::KindQt; + } + return AppStream::Translation::KindUnknown; +} + +QString AppStream::Translation::kindToString(AppStream::Translation::Kind kind) +{ + if (kind == AppStream::Translation::KindGettext) { + return QLatin1String("gettext"); + } else if (kind == AppStream::Translation::KindQt) { + return QLatin1String("qt"); + } + return QLatin1String("unknown"); +} + +Translation::Translation() + : d(new TranslationData) +{} + +Translation::Translation(_AsTranslation* translation) + : d(new TranslationData(translation)) +{} + +Translation::Translation(const Translation &translation) = default; + +Translation::~Translation() = default; + +Translation& Translation::operator=(const Translation &translation) = default; + +bool Translation::operator==(const Translation &other) const +{ + if(this->d == other.d) { + return true; + } + if(this->d && other.d) { + return *(this->d) == *other.d; + } + return false; +} + +_AsTranslation * AppStream::Translation::asTranslation() const +{ + return d->translation(); +} + +AppStream::Translation::Kind AppStream::Translation::kind() const +{ + return static_cast(as_translation_get_kind(d->m_translation)); +} + +void AppStream::Translation::setKind(AppStream::Translation::Kind kind) +{ + as_translation_set_kind(d->m_translation, (AsTranslationKind) kind); +} + +QString AppStream::Translation::id() const +{ + return valueWrap(as_translation_get_id(d->m_translation)); +} + +void AppStream::Translation::setId(const QString& id) +{ + as_translation_set_id(d->m_translation, qPrintable(id)); +} + +QDebug operator<<(QDebug s, const AppStream::Translation& translation) +{ + s.nospace() << "AppStream::Translation(" << translation.id() << ")"; + return s.space(); +} diff -Nru appstream-0.9.4/qt/translation.h appstream-0.12.0/qt/translation.h --- appstream-0.9.4/qt/translation.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/qt/translation.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2017 Jan Grulich + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef APPSTREAMQT_TRANSLATION_H +#define APPSTREAMQT_TRANSLATION_H + +#include +#include +#include +#include "appstreamqt_export.h" + +struct _AsTranslation; + +namespace AppStream { + +class TranslationData; + +class APPSTREAMQT_EXPORT Translation { + Q_GADGET + public: + enum Kind { + KindUnknown, + KindGettext, + KindQt + }; + Q_ENUM(Kind) + + Translation(); + Translation(_AsTranslation* category); + Translation(const Translation& category); + ~Translation(); + + static Kind stringToKind(const QString& kindString); + static QString kindToString(Kind kind); + + Translation& operator=(const Translation& category); + bool operator==(const Translation& r) const; + + /** + * \returns the internally stored AsTranslation + */ + _AsTranslation *asTranslation() const; + + Kind kind() const; + void setKind(Kind kind); + + QString id() const; + void setId(const QString& id); + + private: + QSharedDataPointer d; +}; +} + +APPSTREAMQT_EXPORT QDebug operator<<(QDebug s, const AppStream::Translation& category); + +#endif // APPSTREAMQT_TRANSLATION_H + + diff -Nru appstream-0.9.4/README.md appstream-0.12.0/README.md --- appstream-0.9.4/README.md 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/README.md 2018-04-04 15:53:56.000000000 +0000 @@ -1,14 +1,17 @@ AppStream ========= -AppStream is a cross-distro effort for enhancing the way we interact with the software repositories provided by the -distribution by standardizing sets of additional metadata. -AppStream provides the foundation to build software-center applications. It additionally provides specifications -for things like an unified software metadata database, screenshot services and various other things needed to create -user-friendly application-centers for (Linux) distributions. - -This repository contains the AppStream specification and a library for accessing the Xapian database which has been -generated from AppStream metadata. +AppStream is a cross-distro effort for providing metadata for software in the (Linux) ecosystem. It provides a convenient way +to get information about not installed software, and is one of the building blocks for software centers. +It consists of specifications for things like upstream metainfo files, an unified software metadata pool for distributors, +screenshot services and various other useful bits needed to create user-friendly software-centers or other tools requiring +rich metadata for software and other content. + +This repository contains: + * the AppStream specification + * the `appstreamcli` utility to access metadata, manipulate caches, show diagnostic information, etc. (see `man appstreamcli`) + * a GLib/GObject based library for reading and writing AppStream metadata in XML and YAML, accessing the system data pool, and for various other useful methods. + * a Qt5 based library for accessing AppStream. ![AppStream Architecture](docs/sources/images/architecture-small.png "AppStream Architecture") @@ -19,22 +22,25 @@ For help and development discussion, check out the [AppStream mailinglist](https://lists.freedesktop.org/mailman/listinfo/appstream). +If you are looking for a way to generate distribution AppStream metadata for a package repository, +you may want to take a look at [appstream-generator](https://github.com/ximion/appstream-generator). + ## Developers -[![Build Status](https://semaphoreci.com/api/v1/projects/c406ea75-a977-4100-8ae1-66b7ccc54f48/559622/badge.svg)](https://semaphoreci.com/ximion/appstream) +[![Build Status](https://travis-ci.org/ximion/appstream.svg?branch=master)](https://travis-ci.org/ximion/appstream) +[![Translation status](https://hosted.weblate.org/widgets/appstream/-/svg-badge.svg)](https://hosted.weblate.org/engage/appstream/?utm_source=widget) ### Dependencies #### Required - * cmake - * glib2 (>= 2.36) + * Meson (>= 0.42) + * glib2 (>= 2.46) * GObject-Introspection * libxml2 * libyaml - * Xapian - * ProtoBuf #### Optional * Vala Compiler (vapigen) (for Vala VAPI file) + * [Snowball](http://snowballstem.org/download.html) (for stemming support) #### Documentation / Specification * Publican @@ -42,31 +48,32 @@ #### Qt (for libappstream-qt) * Qt5 Core -### Compiling instructions +### Build instructions To compile AppStream, make sure that you have all required libraries (development files!) installed. -Then continue. (the build system will complain about missing dependencies) +Then continue (the build system will complain about missing dependencies). -Use CMake to configure AppStream and build it with make: +Use Meson to configure AppStream and build it with ninja: ```bash mkdir build cd build -cmake .. -make -make test +meson .. +ninja +ninja test ``` Possible AppStream-specific flags are: - -DQT=ON -- Build the Qt5 interface library. - -DVAPI=ON -- Build Vala API to use library with the Vala programming language. - -DDOCUMENTATION=ON -- (Re)generate API documentation. - -DMAINTAINER=ON -- Enable strict compiler options - use this if you write a patch for AppStream. - -DAPT_SUPPORT=ON -- Enable integration with the APT package manager on Debian. + -Dqt=true -- Build the Qt interface library (default: false) + -Dvapi=true -- Build Vala API to use the library with the Vala programming language (default: false) + -Ddocs=true -- Build specification and other documentation, requires Publican (default: false) + -Dmaintainer=true -- Enable strict compiler options - use this if you write a patch for AppStream (default: false) + -Dstemming=true -- Enable support for stemming in fulltext searches (default: true) + -Dapt-support=true -- Enable integration with the APT package manager on Debian (default: false) ### Installation -To install the compiled binaries and required data files, execute -"make install" with superuser rights. +To install the compiled binaries and required data, execute +`ninja install` with superuser permission. ## Translators -You can help translating AppStream via the Freedesktop.org group at Transifex. -Check out the [AppStream Transifex Page](https://www.transifex.com/freedesktop/appstream/). +You can help translating AppStream via Weblate. +Check out the [AppStream Weblate Page](https://hosted.weblate.org/projects/appstream/translations/). diff -Nru appstream-0.9.4/RELEASE appstream-0.12.0/RELEASE --- appstream-0.9.4/RELEASE 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/RELEASE 2018-04-04 15:53:56.000000000 +0000 @@ -2,12 +2,12 @@ 1. Write NEWS entries for AppStream in the same format as usual. -git shortlog APPSTREAM_0_9_3.. | grep -i -v trivial | grep -v Merge > NEWS.new +git shortlog APPSTREAM_0_11_8.. | grep -i -v trivial | grep -v Merge > NEWS.new -------------------------------------------------------------------------------- -Version 0.9.4 +Version 0.12.0 ~~~~~~~~~~~~~~ -Released: 2016-xx-xx +Released: 2018-xx-xx Notes: @@ -16,25 +16,27 @@ Specification: Bugfixes: + +Translation: -------------------------------------------------------------------------------- -2. Update library version if new ABI or API in CMakeLists.txt +2. Update library version if new ABI or API in meson.build 3. Commit changes in AppStream git: -git commit -a -m "Release version 0.9.4" -git tag -s -f -m "Release 0.9.4" APPSTREAM_0_9_4 +git commit -a -m "Release version 0.12.0" +git tag -s -f -m "Release 0.12.0" APPSTREAM_0_12_0 git push --tags git push -4. run './release.sh --version=0.9.4 --git-tag=APPSTREAM_0_9_4 --sign' +4. run './release.sh --version=0.12.0 --git-tag=APPSTREAM_0_12_0 --sign' 5. Upload tarball: scp -r *.tar.xz* annarchy.freedesktop.org:/srv/www.freedesktop.org/www/software/appstream/releases -6. Make documentation and upload it: - make -C build documentation && scp -r docs/html/* annarchy.freedesktop.org:/srv/www.freedesktop.org/www/software/appstream/docs +6. Upload documentation: + scp -r build/release_install/usr/local/share/doc/appstream/html/* annarchy.freedesktop.org:/srv/www.freedesktop.org/www/software/appstream/docs -7. Do post release version bump in CMakeLists.txt, RELEASE +7. Do post release version bump in meson.build, RELEASE 8. Commit trivial changes: @@ -44,7 +46,7 @@ 9. Send an email to appstream@lists.freedesktop.org ================================================= -AppStream 0.9.4 released! +AppStream 0.12.0 released! Tarballs available here: http://www.freedesktop.org/software/appstream/releases diff -Nru appstream-0.9.4/src/appstream.gresource.xml appstream-0.12.0/src/appstream.gresource.xml --- appstream-0.9.4/src/appstream.gresource.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/appstream.gresource.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,9 @@ + + + + xdg-category-names.txt + iana-filtered-tld-list.txt + spdx-license-ids.txt + desktop-environments.txt + + diff -Nru appstream-0.9.4/src/appstream.h appstream-0.12.0/src/appstream.h --- appstream-0.9.4/src/appstream.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/appstream.h 2018-04-04 15:53:56.000000000 +0000 @@ -30,19 +30,26 @@ #include #include #include -#include -#include +#include #include -#include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include #ifdef __cplusplus }; diff -Nru appstream-0.9.4/src/as-bundle.c appstream-0.12.0/src/as-bundle.c --- appstream-0.9.4/src/as-bundle.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-bundle.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,363 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +/** + * SECTION:as-bundle + * @short_description: Description of bundles the #AsComponent is shipped with. + * @include: appstream.h + * + * This class provides information contained in an AppStream bundle tag. + * See https://www.freedesktop.org/software/appstream/docs/chap-CollectionData.html#tag-ct-bundle + * for more information. + * + * See also: #AsComponent + */ + +#include "config.h" +#include "as-bundle-private.h" +#include "as-variant-cache.h" + +typedef struct +{ + AsBundleKind kind; + gchar *id; +} AsBundlePrivate; + +G_DEFINE_TYPE_WITH_PRIVATE (AsBundle, as_bundle, G_TYPE_OBJECT) +#define GET_PRIVATE(o) (as_bundle_get_instance_private (o)) + +/** + * as_bundle_kind_to_string: + * @kind: the %AsBundleKind. + * + * Converts the enumerated value to an text representation. + * + * Returns: string version of @kind + * + * Since: 0.8.0 + **/ +const gchar* +as_bundle_kind_to_string (AsBundleKind kind) +{ + if (kind == AS_BUNDLE_KIND_PACKAGE) + return "package"; + if (kind == AS_BUNDLE_KIND_LIMBA) + return "limba"; + if (kind == AS_BUNDLE_KIND_FLATPAK) + return "flatpak"; + if (kind == AS_BUNDLE_KIND_APPIMAGE) + return "appimage"; + if (kind == AS_BUNDLE_KIND_SNAP) + return "snap"; + return "unknown"; +} + +/** + * as_bundle_kind_from_string: + * @bundle_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsBundleKind or %AS_BUNDLE_KIND_UNKNOWN for unknown + **/ +AsBundleKind +as_bundle_kind_from_string (const gchar *bundle_str) +{ + if (g_strcmp0 (bundle_str, "package") == 0) + return AS_BUNDLE_KIND_PACKAGE; + if (g_strcmp0 (bundle_str, "limba") == 0) + return AS_BUNDLE_KIND_LIMBA; + if (g_strcmp0 (bundle_str, "flatpak") == 0) + return AS_BUNDLE_KIND_FLATPAK; + if (g_strcmp0 (bundle_str, "appimage") == 0) + return AS_BUNDLE_KIND_APPIMAGE; + if (g_strcmp0 (bundle_str, "snap") == 0) + return AS_BUNDLE_KIND_SNAP; + return AS_BUNDLE_KIND_UNKNOWN; +} + +static void +as_bundle_finalize (GObject *object) +{ + AsBundle *bundle = AS_BUNDLE (object); + AsBundlePrivate *priv = GET_PRIVATE (bundle); + + g_free (priv->id); + + G_OBJECT_CLASS (as_bundle_parent_class)->finalize (object); +} + +static void +as_bundle_init (AsBundle *bundle) +{ +} + +static void +as_bundle_class_init (AsBundleClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->finalize = as_bundle_finalize; +} + +/** + * as_bundle_get_id: + * @bundle: an #AsBundle instance. + * + * Gets the ID for this bundle. + * + * Returns: ID, e.g. "foobar-1.0.2" + * + * Since: 0.10 + **/ +const gchar* +as_bundle_get_id (AsBundle *bundle) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + return priv->id; +} + +/** + * as_bundle_set_id: + * @bundle: an #AsBundle instance. + * @id: the URL. + * + * Sets the ID for this bundle. + * + * Since: 0.10 + **/ +void +as_bundle_set_id (AsBundle *bundle, const gchar *id) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + g_free (priv->id); + priv->id = g_strdup (id); +} + +/** + * as_bundle_get_kind: + * @bundle: an #AsBundle instance. + * + * Gets the bundle kind. + * + * Returns: the #AsBundleKind + * + * Since: 0.10 + **/ +AsBundleKind +as_bundle_get_kind (AsBundle *bundle) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + return priv->kind; +} + +/** + * as_bundle_set_kind: + * @bundle: an #AsBundle instance. + * @kind: the #AsBundleKind, e.g. %AS_BUNDLE_KIND_LIMBA. + * + * Sets the bundle kind. + * + * Since: 0.10 + **/ +void +as_bundle_set_kind (AsBundle *bundle, AsBundleKind kind) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + priv->kind = kind; +} + +/** + * as_bundle_load_from_xml: + * @bundle: a #AsBundle instance. + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads data from an XML node. + **/ +gboolean +as_bundle_load_from_xml (AsBundle *bundle, AsContext *ctx, xmlNode *node, GError **error) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + g_autofree gchar *content = NULL; + g_autofree gchar *type_str = NULL; + + content = as_xml_get_node_value (node); + if (content == NULL) + return FALSE; + + type_str = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + priv->kind = as_bundle_kind_from_string (type_str); + if (priv->kind == AS_BUNDLE_KIND_UNKNOWN) + priv->kind = AS_BUNDLE_KIND_LIMBA; + + as_bundle_set_id (bundle, content); + + return TRUE; +} + +/** + * as_bundle_to_xml_node: + * @bundle: a #AsBundle instance. + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +void +as_bundle_to_xml_node (AsBundle *bundle, AsContext *ctx, xmlNode *root) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + xmlNode *n; + + if (priv->id == NULL) + return; + + n = xmlNewTextChild (root, NULL, + (xmlChar*) "bundle", + (xmlChar*) priv->id); + xmlNewProp (n, + (xmlChar*) "type", + (xmlChar*) as_bundle_kind_to_string (priv->kind)); +} + +/** + * as_bundle_load_from_yaml: + * @bundle: a #AsBundle instance. + * @ctx: the AppStream document context. + * @node: the YAML node. + * @error: a #GError. + * + * Loads data from a YAML field. + **/ +gboolean +as_bundle_load_from_yaml (AsBundle *bundle, AsContext *ctx, GNode *node, GError **error) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + GNode *n; + + for (n = node->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + const gchar *value = as_yaml_node_get_value (n); + + if (g_strcmp0 (key, "type") == 0) { + priv->kind = as_bundle_kind_from_string (value); + } else if (g_strcmp0 (key, "id") == 0) { + as_bundle_set_id (bundle, value); + } else { + as_yaml_print_unknown ("bundles", key); + } + } + + return TRUE; +} + +/** + * as_bundle_emit_yaml: + * @bundle: a #AsBundle instance. + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. + * + * Emit YAML data for this object. + **/ +void +as_bundle_emit_yaml (AsBundle *bundle, AsContext *ctx, yaml_emitter_t *emitter) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + + /* start mapping for this bundle */ + as_yaml_mapping_start (emitter); + + /* type */ + as_yaml_emit_entry (emitter, + "type", + as_bundle_kind_to_string (priv->kind)); + + /* ID */ + as_yaml_emit_entry (emitter, + "id", + priv->id); + + /* end mapping for the bundle */ + as_yaml_mapping_end (emitter); +} + +/** + * as_bundle_to_variant: + * @bundle: a #AsBundle instance. + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_bundle_to_variant (AsBundle *bundle, GVariantBuilder *builder) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + GVariantBuilder bundle_b; + + g_variant_builder_init (&bundle_b, G_VARIANT_TYPE_ARRAY); + + g_variant_builder_add_parsed (&bundle_b, "{'type', <%u>}", priv->kind); + g_variant_builder_add_parsed (&bundle_b, "{'id', <%s>}", priv->id); + + g_variant_builder_add_value (builder, g_variant_builder_end (&bundle_b)); +} + +/** + * as_bundle_set_from_variant: + * @bundle: a #AsBundle instance. + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_bundle_set_from_variant (AsBundle *bundle, GVariant *variant) +{ + AsBundlePrivate *priv = GET_PRIVATE (bundle); + GVariantDict tmp_dict; + GVariant *var2; + + g_variant_dict_init (&tmp_dict, variant); + priv->kind = as_variant_get_dict_uint32 (&tmp_dict, "type"); + as_bundle_set_id (bundle, + as_variant_get_dict_str (&tmp_dict, "id", &var2)); + g_variant_unref (var2); + + return TRUE; +} + +/** + * as_bundle_new: + * + * Creates a new #AsBundle. + * + * Returns: (transfer full): a #AsBundle + * + * Since: 0.10 + **/ +AsBundle* +as_bundle_new (void) +{ + AsBundle *bundle; + bundle = g_object_new (AS_TYPE_BUNDLE, NULL); + return AS_BUNDLE (bundle); +} diff -Nru appstream-0.9.4/src/as-bundle.h appstream-0.12.0/src/as-bundle.h --- appstream-0.9.4/src/as-bundle.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-bundle.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,84 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_BUNDLE_H +#define __AS_BUNDLE_H + +#include + +G_BEGIN_DECLS + +#define AS_TYPE_BUNDLE (as_bundle_get_type ()) +G_DECLARE_DERIVABLE_TYPE (AsBundle, as_bundle, AS, BUNDLE, GObject) + +struct _AsBundleClass +{ + GObjectClass parent_class; + /*< private >*/ + void (*_as_reserved1) (void); + void (*_as_reserved2) (void); + void (*_as_reserved3) (void); + void (*_as_reserved4) (void); + void (*_as_reserved5) (void); + void (*_as_reserved6) (void); +}; + +/** + * AsBundleKind: + * @AS_BUNDLE_KIND_UNKNOWN: Type invalid or not known + * @AS_BUNDLE_KIND_PACKAGE: A native package (currently not used) + * @AS_BUNDLE_KIND_LIMBA: A Limba bundle + * @AS_BUNDLE_KIND_FLATPAK: A Flatpak bundle + * @AS_BUNDLE_KIND_APPIMAGE: An AppImageKit bundle + * @AS_BUNDLE_KIND_SNAP: A Snap/Snappy bundle + * + * The bundle type. + **/ +typedef enum { + AS_BUNDLE_KIND_UNKNOWN, + AS_BUNDLE_KIND_PACKAGE, + AS_BUNDLE_KIND_LIMBA, + AS_BUNDLE_KIND_FLATPAK, + AS_BUNDLE_KIND_APPIMAGE, + AS_BUNDLE_KIND_SNAP, + /*< private >*/ + AS_BUNDLE_KIND_LAST +} AsBundleKind; + +const gchar *as_bundle_kind_to_string (AsBundleKind kind); +AsBundleKind as_bundle_kind_from_string (const gchar *bundle_str); + +AsBundle *as_bundle_new (void); + +AsBundleKind as_bundle_get_kind (AsBundle *bundle); +void as_bundle_set_kind (AsBundle *bundle, + AsBundleKind kind); + +const gchar *as_bundle_get_id (AsBundle *bundle); +void as_bundle_set_id (AsBundle *bundle, + const gchar *id); + +G_END_DECLS + +#endif /* __AS_BUNDLE_H */ diff -Nru appstream-0.9.4/src/as-bundle-private.h appstream-0.12.0/src/as-bundle-private.h --- appstream-0.9.4/src/as-bundle-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-bundle-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,55 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2014-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_BUNDLE_PRIVATE_H +#define __AS_BUNDLE_PRIVATE_H + +#include "as-bundle.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +gboolean as_bundle_load_from_xml (AsBundle *bundle, + AsContext *ctx, + xmlNode *node, + GError **error); +void as_bundle_to_xml_node (AsBundle *bundle, + AsContext *ctx, + xmlNode *root); + +gboolean as_bundle_load_from_yaml (AsBundle *bundle, + AsContext *ctx, + GNode *node, + GError **error); +void as_bundle_emit_yaml (AsBundle *bundle, + AsContext *ctx, + yaml_emitter_t *emitter); + +void as_bundle_to_variant (AsBundle *bundle, + GVariantBuilder *builder); +gboolean as_bundle_set_from_variant (AsBundle *bundle, + GVariant *variant); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_BUNDLE_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-cache-builder.c appstream-0.12.0/src/as-cache-builder.c --- appstream-0.9.4/src/as-cache-builder.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-cache-builder.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,600 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include "as-cache-builder.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "xapian/database-cwrap.hpp" -#include "as-utils.h" -#include "as-utils-private.h" -#include "as-data-pool.h" -#include "as-settings-private.h" - -typedef struct -{ - struct XADatabaseWrite* db_w; - gchar* db_path; - gchar* cache_path; - time_t cache_ctime; - AsDataPool *dpool; -} AsCacheBuilderPrivate; - -G_DEFINE_TYPE_WITH_PRIVATE (AsCacheBuilder, as_cache_builder, G_TYPE_OBJECT) -#define GET_PRIVATE(o) (as_cache_builder_get_instance_private (o)) - -/** - * as_cache_builder_error_quark: - * - * Return value: An error quark. - **/ -G_DEFINE_QUARK (as-cache-builder-error-quark, as_cache_builder_error) - -/** - * as_cache_builder_init: - **/ -static void -as_cache_builder_init (AsCacheBuilder *builder) -{ - AsCacheBuilderPrivate *priv = GET_PRIVATE (builder); - - priv->db_w = xa_database_write_new (); - priv->dpool = as_data_pool_new (); - priv->cache_path = NULL; - priv->cache_ctime = 0; -} - -/** - * as_cache_builder_finalize: - */ -static void -as_cache_builder_finalize (GObject *object) -{ - AsCacheBuilder *builder = AS_CACHE_BUILDER (object); - AsCacheBuilderPrivate *priv = GET_PRIVATE (builder); - - xa_database_write_free (priv->db_w); - g_object_unref (priv->dpool); - g_free (priv->cache_path); - g_free (priv->db_path); - - G_OBJECT_CLASS (as_cache_builder_parent_class)->finalize (object); -} - -/** - * as_cache_builder_class_init: - **/ -static void -as_cache_builder_class_init (AsCacheBuilderClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = as_cache_builder_finalize; -} - -/** - * as_cache_builder_check_cache_ctime: - * @builder: An instance of #AsCacheBuilder - * - * Update the cached cache-ctime. We need to cache it prior to potentially - * creating a new database, so we will always rebuild the database in case - * none existed previously. - */ -static void -as_cache_builder_check_cache_ctime (AsCacheBuilder *builder) -{ - struct stat cache_sbuf; - AsCacheBuilderPrivate *priv = GET_PRIVATE (builder); - - if (stat (priv->db_path, &cache_sbuf) < 0) - priv->cache_ctime = 0; - else - priv->cache_ctime = cache_sbuf.st_ctime; -} - -/** - * as_cache_builder_setup: - * @builder: An instance of #AsCacheBuilder. - * @dbpath: (nullable) (default NULL): Path to the database directory, or %NULL to use default. - * - * Initialize the cache builder. - */ -gboolean -as_cache_builder_setup (AsCacheBuilder *builder, const gchar *dbpath, GError **error) -{ - gboolean ret; - AsCacheBuilderPrivate *priv = GET_PRIVATE (builder); - - /* update database path if necessary */ - g_free (priv->cache_path); - if (as_str_empty (dbpath)) { - priv->cache_path = g_strdup (AS_APPSTREAM_CACHE_PATH); - } else { - priv->cache_path = g_strdup (dbpath); - } - priv->db_path = g_build_filename (priv->cache_path, "xapian", "default", NULL); - - /* users umask shouldn't interfere with us creating new files */ - as_reset_umask (); - - /* check the ctime of the cache directory, if it exists at all */ - as_cache_builder_check_cache_ctime (builder); - - /* try to create db directory, in case it doesn't exist */ - g_mkdir_with_parents (priv->db_path, 0755); - - if (!as_utils_is_writable (priv->db_path)) { - g_set_error (error, - AS_CACHE_BUILDER_ERROR, - AS_CACHE_BUILDER_ERROR_TARGET_NOT_WRITABLE, - _("Cache location '%s' is not writable."), priv->db_path); - return FALSE; - } - - ret = xa_database_write_initialize (priv->db_w, priv->db_path); - return ret; -} - -/** - * as_cache_builder_ctime_newer: - * - * Returns: %TRUE if ctime of file is newer than the cached time. - */ -static gboolean -as_cache_builder_ctime_newer (AsCacheBuilder *builder, const gchar *dir) -{ - struct stat sb; - AsCacheBuilderPrivate *priv = GET_PRIVATE (builder); - - if (stat (dir, &sb) < 0) - return FALSE; - - if (sb.st_ctime > priv->cache_ctime) - return TRUE; - - return FALSE; -} - -/** - * as_cache_builder_appstream_data_changed: - */ -static gboolean -as_cache_builder_appstream_data_changed (AsCacheBuilder *builder) -{ - guint i; - GPtrArray *locations; - AsCacheBuilderPrivate *priv = GET_PRIVATE (builder); - - locations = as_data_pool_get_metadata_locations (priv->dpool); - for (i = 0; i < locations->len; i++) { - g_autofree gchar *xml_dir = NULL; - g_autofree gchar *yaml_dir = NULL; - const gchar *dir_root = (const gchar*) g_ptr_array_index (locations, i); - - if (as_cache_builder_ctime_newer (builder, dir_root)) - return TRUE; - - xml_dir = g_build_filename (dir_root, "xmls", NULL); - if (as_cache_builder_ctime_newer (builder, xml_dir)) - return TRUE; - - yaml_dir = g_build_filename (dir_root, "yaml", NULL); - if (as_cache_builder_ctime_newer (builder, yaml_dir)) - return TRUE; - } - - return FALSE; -} - -#ifdef APT_SUPPORT - -#define YAML_SEPARATOR "---" -/* Compilers will optimise this to a constant */ -#define YAML_SEPARATOR_LEN strlen(YAML_SEPARATOR) - -/** - * as_cache_builder_get_yml_data_origin: - * - * Extract the data origin from the AppStream YAML file. - * We don't use the #AsYAMLData loader, because it is much - * slower than just loading the initial parts of the file and - * extracting the origin manually. - */ -gchar* -as_cache_builder_get_yml_data_origin (const gchar *fname) -{ - const gchar *data; - GZlibDecompressor *zdecomp; - g_autoptr(GFileInputStream) fistream = NULL; - g_autoptr(GMemoryOutputStream) mem_os = NULL; - g_autoptr(GInputStream) conv_stream = NULL; - g_autoptr(GFile) file = NULL; - g_autofree gchar *str = NULL; - g_auto(GStrv) strv = NULL; - guint i; - gchar *start, *end; - gchar *origin = NULL; - - file = g_file_new_for_path (fname); - fistream = g_file_read (file, NULL, NULL); - mem_os = (GMemoryOutputStream*) g_memory_output_stream_new (NULL, 0, g_realloc, g_free); - zdecomp = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP); - conv_stream = g_converter_input_stream_new (G_INPUT_STREAM (fistream), G_CONVERTER (zdecomp)); - g_object_unref (zdecomp); - - g_output_stream_splice (G_OUTPUT_STREAM (mem_os), conv_stream, 0, NULL, NULL); - data = (const gchar*) g_memory_output_stream_get_data (mem_os); - - /* faster than a regular expression? - * Get the first YAML document, then extract the origin string. - */ - if (data == NULL) - return NULL; - /* start points to the start of the document, i.e. "File:" normally */ - start = g_strstr_len (data, 400, YAML_SEPARATOR) + YAML_SEPARATOR_LEN; - if (start == NULL) - return NULL; - /* Find the end of the first document - can be NULL if there is only one, - * for example if we're given YAML for an empty archive */ - end = g_strstr_len (start, -1, YAML_SEPARATOR); - str = g_strndup (start, strlen(start) - (end ? strlen(end) : 0)); - - strv = g_strsplit (str, "\n", -1); - for (i = 0; strv[i] != NULL; i++) { - g_auto(GStrv) strv2 = NULL; - if (!g_str_has_prefix (strv[i], "Origin:")) - continue; - - strv2 = g_strsplit (strv[i], ":", 2); - g_strstrip (strv2[1]); - origin = g_strdup (strv2[1]); - - /* remove quotes, in case the string is quoted */ - if ((g_str_has_prefix (origin, "\"")) && (g_str_has_suffix (origin, "\""))) { - g_autofree gchar *tmp = NULL; - - tmp = origin; - origin = g_strndup (tmp + 1, strlen (tmp) - 2); - } - - break; - } - - return origin; -} - -/** - * as_cache_builder_extract_icons: - */ -static void -as_cache_builder_extract_icons (const gchar *asicons_target, const gchar *origin, const gchar *apt_basename, const gchar *apt_lists_dir, const gchar *icons_size) -{ - g_autofree gchar *icons_tarball = NULL; - g_autofree gchar *target_dir = NULL; - g_autofree gchar *cmd = NULL; - g_autofree gchar *stderr_txt = NULL; - gint res; - g_autoptr(GError) tmp_error = NULL; - - icons_tarball = g_strdup_printf ("%s/%sicons-%s.tar.gz", apt_lists_dir, apt_basename, icons_size); - if (!g_file_test (icons_tarball, G_FILE_TEST_EXISTS)) { - /* no icons found, stop here */ - return; - } - - target_dir = g_build_filename (asicons_target, origin, icons_size, NULL); - if (g_mkdir_with_parents (target_dir, 0755) > 0) { - g_debug ("Unable to create '%s': %s", target_dir, g_strerror (errno)); - return; - } - - if (!as_utils_is_writable (target_dir)) { - g_debug ("Unable to write to '%s': Can't add AppStream icon-cache from APT to the pool.", target_dir); - return; - } - - cmd = g_strdup_printf ("/bin/tar -xzf '%s' -C '%s'", icons_tarball, target_dir); - g_spawn_command_line_sync (cmd, NULL, &stderr_txt, &res, &tmp_error); - if (tmp_error != NULL) { - g_debug ("Failed to run tar: %s", tmp_error->message); - } - if (res != 0) { - g_debug ("Running tar failed with exit-code %i: %s", res, stderr_txt); - } -} - -/** - * as_cache_builder_scan: - * - * Scan for additional metadata in 3rd-party directories and move it to the right place. - */ -static void -as_cache_builder_scan_apt (AsCacheBuilder *builder, gboolean force, GError **error) -{ - const gchar *apt_lists_dir = "/var/lib/apt/lists/"; - const gchar *appstream_yml_target = "/var/lib/app-info/yaml"; - const gchar *appstream_icons_target = "/var/lib/app-info/icons"; - g_autoptr(GPtrArray) yml_files = NULL; - g_autoptr(GError) tmp_error = NULL; - gboolean data_changed = FALSE; - guint i; - AsCacheBuilderPrivate *priv = GET_PRIVATE (builder); - - /* skip this step if the APT lists directory doesn't exist */ - if (!g_file_test (apt_lists_dir, G_FILE_TEST_IS_DIR)) { - g_debug ("APT lists directory (%s) not found!", apt_lists_dir); - return; - } - - if (g_file_test (appstream_yml_target, G_FILE_TEST_IS_DIR)) { - g_autoptr(GPtrArray) ytfiles = NULL; - - /* we can't modify the files here if we don't have write access */ - if (!as_utils_is_writable (appstream_yml_target)) { - g_debug ("Unable to write to '%s': Can't add AppStream data from APT to the pool.", appstream_yml_target); - return; - } - - ytfiles = as_utils_find_files_matching (appstream_yml_target, "*", FALSE, &tmp_error); - if (tmp_error != NULL) { - g_warning ("Could not scan for broken symlinks in DEP-11 target: %s", tmp_error->message); - return; - } - for (i = 0; i < ytfiles->len; i++) { - const gchar *fname = (const gchar*) g_ptr_array_index (ytfiles, i); - if (!g_file_test (fname, G_FILE_TEST_EXISTS)) { - g_remove (fname); - data_changed = TRUE; - } - } - } - - yml_files = as_utils_find_files_matching (apt_lists_dir, "*Components-*.yml.gz", FALSE, &tmp_error); - if (tmp_error != NULL) { - g_warning ("Could not scan for APT-downloaded DEP-11 files: %s", tmp_error->message); - return; - } - - /* no data found? skip scan step */ - if (yml_files->len <= 0) { - g_debug ("Couldn't find DEP-11 data in APT directories."); - return; - } - - /* We have to check if our metadata is in the target directory at all, and - if not - trigger a cache refresh. - * This is needed because APT is putting files with the *server* ctime/mtime into it's lists directory, - * and that time might be lower than the time the metadata cache was last updated, which may result - * in no cache update being triggered at all. - */ - for (i = 0; i < yml_files->len; i++) { - g_autofree gchar *fbasename = NULL; - g_autofree gchar *dest_fname = NULL; - const gchar *fname = (const gchar*) g_ptr_array_index (yml_files, i); - - fbasename = g_path_get_basename (fname); - dest_fname = g_build_filename (appstream_yml_target, fbasename, NULL); - if (!g_file_test (dest_fname, G_FILE_TEST_EXISTS)) { - data_changed = TRUE; - g_debug ("File '%s' missing, cache update is needed.", dest_fname); - break; - } - } - - /* get the last time we touched the database */ - if (!data_changed) { - for (i = 0; i < yml_files->len; i++) { - struct stat sb; - const gchar *fname = (const gchar*) g_ptr_array_index (yml_files, i); - if (stat (fname, &sb) < 0) - continue; - if (sb.st_ctime > priv->cache_ctime) { - /* we need to update the cache */ - data_changed = TRUE; - break; - } - } - } - - /* no changes means nothing to do here */ - if ((!data_changed) && (!force)) - return; - - /* this is not really great, but we simply can't detect if we should remove an icons folder or not, - * or which specific icons we should drop from a folder. - * So, we hereby simply "own" the icons directory and all it's contents, anything put in there by 3rd-parties will - * be deleted. - * (And there should actually be no cases 3rd-parties put icons there on a Debian machine, since metadata in packages - * will land in /usr/share/app-info anyway) - */ - as_utils_delete_dir_recursive (appstream_icons_target); - if (g_mkdir_with_parents (appstream_yml_target, 0755) > 0) { - g_debug ("Unable to create '%s': %s", appstream_yml_target, g_strerror (errno)); - return; - } - - for (i = 0; i < yml_files->len; i++) { - g_autofree gchar *fbasename = NULL; - g_autofree gchar *dest_fname = NULL; - g_autofree gchar *origin = NULL; - g_autofree gchar *file_baseprefix = NULL; - const gchar *fname = (const gchar*) g_ptr_array_index (yml_files, i); - - fbasename = g_path_get_basename (fname); - dest_fname = g_build_filename (appstream_yml_target, fbasename, NULL); - - if (!g_file_test (dest_fname, G_FILE_TEST_EXISTS)) { - /* file not found, let's symlink */ - if (symlink (fname, dest_fname) != 0) { - g_debug ("Unable to set symlink (%s -> %s): %s", - fname, - dest_fname, - g_strerror (errno)); - continue; - } - } else if (!g_file_test (dest_fname, G_FILE_TEST_IS_SYMLINK)) { - /* file found, but it isn't a symlink, try to rescue */ - g_debug ("Regular file '%s' found, which doesn't belong there. Removing it.", dest_fname); - g_remove (dest_fname); - continue; - } - - /* get DEP-11 data origin */ - origin = as_cache_builder_get_yml_data_origin (dest_fname); - if (origin == NULL) { - g_warning ("No origin found for file %s", fbasename); - continue; - } - - /* get base prefix for this file in the APT download cache */ - file_baseprefix = g_strndup (fbasename, strlen (fbasename) - strlen (g_strrstr (fbasename, "_") + 1)); - - /* extract icons to their destination (if they exist at all */ - as_cache_builder_extract_icons (appstream_icons_target, - origin, - file_baseprefix, - apt_lists_dir, - "64x64"); - as_cache_builder_extract_icons (appstream_icons_target, - origin, - file_baseprefix, - apt_lists_dir, - "128x128"); - } - - /* ensure the cache-rebuild process notices these changes */ - as_touch_location (appstream_yml_target); -} -#endif - -/** - * as_cache_builder_refresh: - * @builder: An instance of #AsCacheBuilder. - * @force: Enforce refresh, even if source data has not changed. - * - * Update the AppStream Xapian cache. - * - * Returns: %TRUE if the cache was updated, %FALSE on error or if the cache update was not necessary and has been skipped. - */ -gboolean -as_cache_builder_refresh (AsCacheBuilder *builder, gboolean force, GError **error) -{ - gboolean ret = FALSE; - gboolean ret_poolupdate; - GList *cpt_list; - g_autoptr(GError) tmp_error = NULL; - AsCacheBuilderPrivate *priv = GET_PRIVATE (builder); - - /* collect metadata */ -#ifdef APT_SUPPORT - /* currently, we only do something here if we are running with explicit APT support compiled in */ - as_cache_builder_scan_apt (builder, force, &tmp_error); - if (tmp_error != NULL) { - /* the exact error is not forwarded here, since we might be able to partially update the cache */ - g_warning ("Error while collecting metadata: %s", tmp_error->message); - g_error_free (tmp_error); - tmp_error = NULL; - } -#endif - - /* check if we need to refresh the cache - * (which is only necessary if the AppStream data has changed) */ - if (!as_cache_builder_appstream_data_changed (builder)) { - g_debug ("Data did not change, no cache refresh needed."); - if (force) { - g_debug ("Forcing refresh anyway."); - } else { - return FALSE; - } - } - g_debug ("Refreshing AppStream cache"); - - /* find them wherever they are */ - ret_poolupdate = as_data_pool_update (priv->dpool, &tmp_error); - if (tmp_error != NULL) { - /* the exact error is not forwarded here, since we might be able to partially update the cache */ - g_warning ("Error while updating the in-memory data pool: %s", tmp_error->message); - g_error_free (tmp_error); - tmp_error = NULL; - } - - /* populate the cache */ - cpt_list = as_data_pool_get_components (priv->dpool); - ret = xa_database_write_rebuild (priv->db_w, cpt_list); - g_list_free (cpt_list); - - if (ret) { - if (!ret_poolupdate) { - g_set_error (error, - AS_CACHE_BUILDER_ERROR, - AS_CACHE_BUILDER_ERROR_CACHE_INCOMPLETE, - _("AppStream cache update completed, but some metadata was ignored due to errors.")); - } - /* update the cache mtime, to not needlessly rebuild it again */ - as_touch_location (priv->db_path); - as_cache_builder_check_cache_ctime (builder); - } else { - g_set_error (error, - AS_CACHE_BUILDER_ERROR, - AS_CACHE_BUILDER_ERROR_FAILED, - _("AppStream cache update failed.")); - } - - return TRUE; -} - -/** - * as_cache_builder_set_data_source_directories: - * @builder: a valid #AsCacheBuilder instance - * @dirs: (array zero-terminated=1): a zero-terminated array of data input directories. - * - * Set locations for the database builder to pull it's data from. - * This is mainly used for testing purposes. Each location should have an - * "xmls" and/or "yaml" subdirectory with the actual data as (compressed) - * AppStream XML or DEP-11 YAML in it. - */ -void -as_cache_builder_set_data_source_directories (AsCacheBuilder *builder, gchar **dirs) -{ - AsCacheBuilderPrivate *priv = GET_PRIVATE (builder); - as_data_pool_set_metadata_locations (priv->dpool, dirs); -} - -/** - * as_cache_builder_new: - * - * Creates a new #AsCacheBuilder. - * - * Returns: (transfer full): a new #AsCacheBuilder - **/ -AsCacheBuilder* -as_cache_builder_new (void) -{ - AsCacheBuilder *builder; - builder = g_object_new (AS_TYPE_CACHE_BUILDER, NULL); - return AS_CACHE_BUILDER (builder); -} diff -Nru appstream-0.9.4/src/as-cache-builder.h appstream-0.12.0/src/as-cache-builder.h --- appstream-0.9.4/src/as-cache-builder.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-cache-builder.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) -#error "Only can be included directly." -#endif - -#ifndef __AS_CACHE_BUILDER_H -#define __AS_CACHE_BUILDER_H - -#include - -#define AS_TYPE_CACHE_BUILDER (as_cache_builder_get_type ()) -G_DECLARE_DERIVABLE_TYPE (AsCacheBuilder, as_cache_builder, AS, CACHE_BUILDER, GObject) - -G_BEGIN_DECLS - -struct _AsCacheBuilderClass { - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - -#define AS_CACHE_BUILDER_ERROR as_cache_builder_error_quark () -GQuark as_cache_builder_error_quark (void); - -/** - * AsCacheBuilderError: - * @AS_CACHE_BUILDER_ERROR_FAILED: Generic failure - * @AS_CACHE_BUILDER_ERROR_CACHE_INCOMPLETE: The cache was built, but we had to ignore some metadata. - * @AS_CACHE_BUILDER_ERROR_TARGET_NOT_WRITABLE: We do not have write-access to the cache target location. - * - * The error type. - **/ -typedef enum { - AS_CACHE_BUILDER_ERROR_FAILED, - AS_CACHE_BUILDER_ERROR_CACHE_INCOMPLETE, - AS_CACHE_BUILDER_ERROR_TARGET_NOT_WRITABLE, - /*< private >*/ - AS_CACHE_BUILDER_ERROR_LAST -} AsCacheBuilderError; - -AsCacheBuilder *as_cache_builder_new (void); - -gboolean as_cache_builder_setup (AsCacheBuilder *builder, - const gchar *dbpath, - GError **error); -gboolean as_cache_builder_refresh (AsCacheBuilder *builder, - gboolean force, - GError **error); - -void as_cache_builder_set_data_source_directories (AsCacheBuilder *self, - gchar **dirs); - -G_END_DECLS - -#endif /* __AS_CACHE_BUILDER_H */ diff -Nru appstream-0.9.4/src/as-category.c appstream-0.12.0/src/as-category.c --- appstream-0.9.4/src/as-category.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-category.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2012-2015 Matthias Klumpp + * Copyright (C) 2012-2016 Matthias Klumpp + * Copyright (C) 2015-2016 Richard Hughes * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -20,15 +21,11 @@ #include "as-category.h" +#include "config.h" +#include #include -#include -#include -#include -#include -#include -#include -#include -#include + +#include "as-component.h" /** * SECTION:as-category @@ -38,53 +35,337 @@ * This object represents an XDG category, as defined at: * http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry * - * The #AsCategory object does not support all aspects of a menu. It's main purpose - * is to be used in software-centers to show information about application-groups, - * which are use to thematically group applications. + * The #AsCategory object does not support all aspects of a menu. Its main purpose + * is to be used in software-centers to group visual components (gui/web applications). * - * You can use #AsMenuParser to get a set of supported default categories. + * You can use %as_get_default_categories() to get a set of supported default categories. * - * See also: #AsMenuParser + * See also: #AsComponent */ +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wmissing-field-initializers" +#endif + +typedef struct { + const gchar *id; + const gchar *name; + const gchar *fdo_cats[16]; +} AsCategoryMap; + +typedef struct { + const gchar *id; + const AsCategoryMap *mapping; + const gchar *name; + const gchar *icon; +} AsCategoryData; + +/* AudioVideo */ +static const AsCategoryMap map_audiovideo[] = { + { "featured", NC_("Category of AudioVideo", "Featured"), + { "AudioVideo::Featured", + NULL} }, + { "creation-editing", NC_("Category of AudioVideo", "Audio Creation & Editing"), + { "AudioVideo::AudioVideoEditing", + "AudioVideo::Midi", + "AudioVideo::DiscBurning", + "AudioVideo::Sequencer", + NULL} }, + { "music-players", NC_("Category of AudioVideo", "Music Players"), + { "AudioVideo::Music", + "AudioVideo::Player", + NULL} }, + { NULL } +}; + +/* Development */ +static const AsCategoryMap map_developertools[] = { + { "featured", NC_("Category of Development", "Featured"), + { "Development::Featured", + NULL} }, + { "debuggers", NC_("Category of Development", "Debuggers"), + { "Development:Debugger", + NULL} }, + { "ide", NC_("Category of Development", "IDEs"), + { "Development::IDE", + "Development::GUIDesigner", + NULL} }, + { NULL } +}; + +/* Education */ +static const AsCategoryMap map_education[] = { + { "featured", NC_("Category of Education", "Featured"), + { "Education::Featured", + NULL} }, + { "astronomy", NC_("Category of Education", "Astronomy"), + { "Education::Astronomy", + NULL} }, + { "chemistry", NC_("Category of Education", "Chemistry"), + { "Education::Chemistry", + NULL} }, + { "languages", NC_("Category of Education", "Languages"), + { "Education::Languages", + "Education::Literature", + NULL} }, + { "math", NC_("Category of Education", "Math"), + { "Education::Math", + "Education::NumericalAnalysis", + NULL} }, + { NULL } +}; + +/* Games */ +static const AsCategoryMap map_games[] = { + { "featured", NC_("Category of Games", "Featured"), + { "Game::Featured", + NULL} }, + { "action", NC_("Category of Games", "Action"), + { "Game::ActionGame", + NULL} }, + { "adventure", NC_("Category of Games", "Adventure"), + { "Game::AdventureGame", + NULL} }, + { "arcade", NC_("Category of Games", "Arcade"), + { "Game::ArcadeGame", + NULL} }, + { "blocks", NC_("Category of Games", "Blocks"), + { "Game::BlocksGame", + NULL} }, + { "board", NC_("Category of Games", "Board"), + { "Game::BoardGame", + NULL} }, + { "card", NC_("Category of Games", "Card"), + { "Game::CardGame", + NULL} }, + { "emulator", NC_("Category of Games", "Emulators"), + { "Game::Emulator", + NULL} }, + { "kids", NC_("Category of Games", "Kids"), + { "Game::KidsGame", + NULL} }, + { "logic", NC_("Category of Games", "Logic"), + { "Game::LogicGame", + NULL} }, + { "role-playing", NC_("Category of Games", "Role Playing"), + { "Game::RolePlaying", + NULL} }, + { "sports", NC_("Category of Games", "Sports"), + { "Game::SportsGame", + "Game::Simulation", + NULL} }, + { "strategy", NC_("Category of Games", "Strategy"), + { "Game::StrategyGame", + NULL} }, + { NULL } +}; + +/* Graphics */ +static const AsCategoryMap map_graphics[] = { + { "featured", NC_("Category of Graphics", "Featured"), + { "Graphics::Featured", + NULL} }, + { "3d", NC_("Category of Graphics", "3D Graphics"), + { "Graphics::3DGraphics", + NULL} }, + { "photography", NC_("Category of Graphics", "Photography"), + { "Graphics::Photography", + NULL} }, + { "scanning", NC_("Category of Graphics", "Scanning"), + { "Graphics::Scanning", + NULL} }, + { "vector", NC_("Category of Graphics", "Vector Graphics"), + { "Graphics::VectorGraphics", + NULL} }, + { "viewers", NC_("Category of Graphics", "Viewers"), + { "Graphics::Viewer", + NULL} }, + { NULL } +}; + +/* Office */ +static const AsCategoryMap map_office[] = { + { "featured", NC_("Category of Office", "Featured"), + { "Office::Featured", + NULL} }, + { "calendar", NC_("Category of Office", "Calendar"), + { "Office::Calendar", + "Office::ProjectManagement", + NULL} }, + { "database", NC_("Category of Office", "Database"), + { "Office::Database", + NULL} }, + { "finance", NC_("Category of Office", "Finance"), + { "Office::Finance", + "Office::Spreadsheet", + NULL} }, + { "word-processor", NC_("Category of Office", "Word Processor"), + { "Office::WordProcessor", + "Office::Dictionary", + NULL} }, + { NULL } +}; + +/* Addons */ +static const AsCategoryMap map_addons[] = { + { "fonts", NC_("Category of Addons", "Fonts"), + { "Addons::Fonts", + NULL} }, + { "codecs", NC_("Category of Addons", "Codecs"), + { "Addons::Codecs", + NULL} }, + { "input-sources", NC_("Category of Addons", "Input Sources"), + { "Addons::InputSources", + NULL} }, + { "language-packs", NC_("Category of Addons", "Language Packs"), + { "Addons::LanguagePacks", + NULL} }, + { "localization", NC_("Category of Addons", "Localization"), + { "Addons::Localization", + NULL} }, + { NULL } +}; + +/* Science */ +static const AsCategoryMap map_science[] = { + { "featured", NC_("Category of Science", "Featured"), + { "Science::Featured", + NULL} }, + { "artificial-intelligence", NC_("Category of Science", "Artificial Intelligence"), + { "Science::ArtificialIntelligence", + NULL} }, + { "astronomy", NC_("Category of Science", "Astronomy"), + { "Science::Astronomy", + NULL} }, + { "chemistry", NC_("Category of Science", "Chemistry"), + { "Science::Chemistry", + NULL} }, + { "math", NC_("Category of Science", "Math"), + { "Science::Math", + "Science::Physics", + "Science::NumericalAnalysis", + NULL} }, + { "robotics", NC_("Category of Science", "Robotics"), + { "Science::Robotics", + NULL} }, + { NULL } +}; + +/* Communication */ +static const AsCategoryMap map_communication[] = { + { "featured", NC_("Category of Communication", "Featured"), + { "Network::Featured", + NULL} }, + { "chat", NC_("Category of Communication", "Chat"), + { "Network::Chat", + "Network::IRCClient", + "Network::Telephony", + "Network::VideoConference", + "Network::Email", + NULL} }, + { "news", NC_("Category of Communication", "News"), + { "Network::Feed", + "Network::News", + NULL} }, + { "web-browsers", NC_("Category of Communication", "Web Browsers"), + { "Network::WebBrowser", + NULL} }, + { NULL } +}; + +/* Utility */ +static const AsCategoryMap map_utilities[] = { + { "featured", NC_("Category of Utility", "Featured"), + { "Utility::Featured", + NULL} }, + { "text-editors", NC_("Category of Utility", "Text Editors"), + { "Utility::TextEditor", + NULL} }, + { "terminal-emulators", NC_("Category of Utility", "Terminal Emulators"), + { "System::TerminalEmulator", + NULL} }, + { "filesystem", NC_("Category of Utility", "File System"), + { "System::Filesystem", + NULL} }, + { "monitor", NC_("Category of Utility", "System Monitoring"), + { "System::Monitor", + NULL} }, + { "security", NC_("Category of Utility", "Security"), + { "System::Security", + NULL} }, + { NULL } +}; + +/* main categories */ +static const AsCategoryData msdata[] = { + /* TRANSLATORS: this is the menu spec main category for Audio & Video */ + { "audio-video", map_audiovideo, N_("Audio & Video"), + "applications-multimedia" }, + /* TRANSLATORS: this is the menu spec main category for Development */ + { "developer-tools", map_developertools, N_("Developer Tools"), + "applications-development" }, + /* TRANSLATORS: this is the menu spec main category for Education */ + { "education", map_education, N_("Education"), + "applications-education" }, + /* TRANSLATORS: this is the menu spec main category for Game */ + { "games", map_games, N_("Games"), + "applications-games" }, + /* TRANSLATORS: this is the menu spec main category for Graphics */ + { "graphics", map_graphics, N_("Graphics & Photography"), + "applications-graphics" }, + /* TRANSLATORS: this is the menu spec main category for Office */ + { "office", map_office, N_("Office"), + "applications-office" }, + /* TRANSLATORS: this is the main category for Add-ons */ + { "addons", map_addons, N_("Add-ons"), + "applications-other" }, + /* TRANSLATORS: this is the menu spec main category for Science */ + { "science", map_science, N_("Science"), + "applications-science" }, + /* TRANSLATORS: this is the menu spec main category for Communication */ + { "communication", map_communication, N_("Communication & News"), + "applications-internet" }, + /* TRANSLATORS: this is the menu spec main category for Utilities */ + { "utilities", map_utilities, N_("Utilities"), + "applications-utilities" }, + { NULL } +}; + typedef struct { + gchar *id; gchar *name; gchar *summary; gchar *icon; - gchar *directory; - GList *included; - GList *excluded; - gint level; - GList *subcats; + GPtrArray *children; + GPtrArray *desktop_groups; + + GPtrArray *components; } AsCategoryPrivate; G_DEFINE_TYPE_WITH_PRIVATE (AsCategory, as_category, G_TYPE_OBJECT) #define GET_PRIVATE(o) (as_category_get_instance_private (o)) enum { - AS_CATEGORY_DUMMY_PROPERTY, + AS_CATEGORY_DUMMY, + AS_CATEGORY_ID, AS_CATEGORY_NAME, AS_CATEGORY_SUMMARY, AS_CATEGORY_ICON, - AS_CATEGORY_DIRECTORY, - AS_CATEGORY_INCLUDED, - AS_CATEGORY_EXCLUDED, - AS_CATEGORY_LEVEL, - AS_CATEGORY_SUBCATEGORIES + AS_CATEGORY_CHILDREN }; /** * as_category_init: **/ static void -as_category_init (AsCategory *cat) +as_category_init (AsCategory *category) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); + AsCategoryPrivate *priv = GET_PRIVATE (category); - priv->included = NULL; - priv->excluded = NULL; - priv->subcats = NULL; + priv->children = g_ptr_array_new_with_free_func (g_object_unref); + priv->desktop_groups = g_ptr_array_new_with_free_func (g_free); + priv->components = g_ptr_array_new_with_free_func (g_object_unref); } /** @@ -93,308 +374,274 @@ static void as_category_finalize (GObject *object) { - AsCategory *cat = AS_CATEGORY (object); - AsCategoryPrivate *priv = GET_PRIVATE (cat); + AsCategory *category = AS_CATEGORY (object); + AsCategoryPrivate *priv = GET_PRIVATE (category); + g_free (priv->id); g_free (priv->name); g_free (priv->summary); g_free (priv->icon); - g_free (priv->directory); - g_list_free_full (priv->included, g_free); - g_list_free_full (priv->excluded, g_free); - g_list_free_full (priv->subcats, g_object_unref); + g_ptr_array_unref (priv->children); + g_ptr_array_unref (priv->desktop_groups); + g_ptr_array_unref (priv->components); G_OBJECT_CLASS (as_category_parent_class)->finalize (object); } /** - * as_category_complete: + * as_category_get_id: + * @category: An instance of #AsCategory. * - * Update incomplete category data with information from - * "/usr/share/desktop-directories". + * Get the ID of this category. */ -void -as_category_complete (AsCategory *cat) +const gchar* +as_category_get_id (AsCategory *category) { - GKeyFile* kfile = NULL; - GError *error = NULL; - gchar *path; - gchar *str = NULL; - AsCategoryPrivate *priv = GET_PRIVATE (cat); - - if (priv->directory == NULL) { - g_debug ("No directory set for category %s", priv->name); - return; - } - as_category_set_summary (cat, ""); - as_category_set_icon (cat, "applications-other"); - - kfile = g_key_file_new (); - path = g_strdup_printf ("/usr/share/desktop-directories/%s", priv->directory); - g_key_file_load_from_file (kfile, path, 0, &error); - g_free (path); - if (error != NULL) - goto out; - - str = g_key_file_get_string (kfile, "Desktop Entry", "Name", &error); - if (error != NULL) - goto out; - as_category_set_name (cat, str); - g_free (str); - str = NULL; - - if (g_key_file_has_key (kfile, "Desktop Entry", "Comment", NULL)) { - str = g_key_file_get_string (kfile, "Desktop Entry", "Comment", &error); - if (error != NULL) - goto out; - as_category_set_summary (cat, str); - g_free (str); - str = NULL; - } - - str = g_key_file_get_string (kfile, "Desktop Entry", "Icon", &error); - if (error != NULL) - goto out; - if (str == NULL) - as_category_set_icon (cat, ""); - else - as_category_set_icon (cat, str); - - if (priv->summary == NULL) - as_category_set_summary (cat, ""); - -out: - if (str != NULL) - g_free (str); - g_key_file_unref (kfile); - if (error != NULL) { - g_debug ("Error retrieving data for %s: %s\n", priv->directory, error->message); - g_error_free (error); - } + AsCategoryPrivate *priv = GET_PRIVATE (category); + return priv->id; } /** - * as_category_add_subcategory: - * @cat: An instance of #AsCategory. - * @subcat: A subcategory to add. + * as_category_set_id: + * @category: An instance of #AsCategory. * - * Add a subcategory to this category. + * Set the ID of this category. */ void -as_category_add_subcategory (AsCategory *cat, AsCategory *subcat) +as_category_set_id (AsCategory *category, const gchar *id) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); + AsCategoryPrivate *priv = GET_PRIVATE (category); - priv->subcats = g_list_append (priv->subcats, g_object_ref (subcat)); + g_free (priv->id); + priv->id = g_strdup (id); + g_object_notify (G_OBJECT (category), "id"); } +/** + * as_category_get_name: + * @category: An instance of #AsCategory. + * + * Get the name of this category. + */ +const gchar* +as_category_get_name (AsCategory *category) +{ + AsCategoryPrivate *priv = GET_PRIVATE (category); + return priv->name; +} /** - * as_category_remove_subcategory: - * @cat: An instance of #AsCategory. - * @subcat: A subcategory to remove. + * as_category_set_name: + * @category: An instance of #AsCategory. * - * Drop a subcategory from this #AsCategory. + * Set the name of this category. */ void -as_category_remove_subcategory (AsCategory *cat, AsCategory *subcat) +as_category_set_name (AsCategory *category, const gchar *value) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); - priv->subcats = g_list_remove (priv->subcats, subcat); + AsCategoryPrivate *priv = GET_PRIVATE (category); + + g_free (priv->name); + priv->name = g_strdup (value); + g_object_notify (G_OBJECT (category), "name"); } /** - * as_category_has_subcategory: - * @cat: An instance of #AsCategory. + * as_category_get_children: + * @category: An instance of #AsCategory. * - * Test for sub-categories. - * - * Returns: %TRUE if this category has any subcategory + * Returns: (element-type AsCategory) (transfer none): A list of subcategories. */ -gboolean -as_category_has_subcategory (AsCategory *cat) +GPtrArray* +as_category_get_children (AsCategory *category) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); - return g_list_length (priv->subcats) > 0; + AsCategoryPrivate *priv = GET_PRIVATE (category); + return priv->children; } /** - * as_category_get_name: - * @cat: An instance of #AsCategory. + * as_category_add_child: + * @category: An instance of #AsCategory. + * @subcat: A subcategory to add. * - * Get the name of this category. + * Add a subcategory to this category. */ -const gchar* -as_category_get_name (AsCategory *cat) +void +as_category_add_child (AsCategory *category, AsCategory *subcat) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); - return priv->name; + AsCategoryPrivate *priv = GET_PRIVATE (category); + g_ptr_array_add (priv->children, g_object_ref (subcat)); } /** - * as_category_set_name: - * @cat: An instance of #AsCategory. + * as_category_remove_child: + * @category: An instance of #AsCategory. + * @subcat: A subcategory to remove. * - * Set the name of this category. + * Drop a subcategory from this #AsCategory. */ void -as_category_set_name (AsCategory *cat, const gchar *value) +as_category_remove_child (AsCategory *category, AsCategory *subcat) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); + AsCategoryPrivate *priv = GET_PRIVATE (category); + g_ptr_array_remove (priv->children, subcat); +} - g_free (priv->name); - priv->name = g_strdup (value); - g_object_notify ((GObject*) cat, "name"); +/** + * as_category_has_children: + * @category: An instance of #AsCategory. + * + * Test for sub-categories. + * + * Returns: %TRUE if this category has any subcategory + */ +gboolean +as_category_has_children (AsCategory *category) +{ + AsCategoryPrivate *priv = GET_PRIVATE (category); + return priv->children->len > 0; } /** * as_category_get_summary: - * @cat: An instance of #AsCategory. + * @category: An instance of #AsCategory. * * Get the summary (short description) of this category. */ const gchar* -as_category_get_summary (AsCategory *cat) +as_category_get_summary (AsCategory *category) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); + AsCategoryPrivate *priv = GET_PRIVATE (category); return priv->summary; } /** * as_category_set_summary: - * @cat: An instance of #AsCategory. + * @category: An instance of #AsCategory. * @value: A new short summary of this category. * * Get the summary (short description) of this category. */ void -as_category_set_summary (AsCategory *cat, const gchar *value) +as_category_set_summary (AsCategory *category, const gchar *value) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); + AsCategoryPrivate *priv = GET_PRIVATE (category); g_free (priv->summary); priv->summary = g_strdup (value); - g_object_notify ((GObject*) cat, "summary"); + g_object_notify (G_OBJECT (category), "summary"); } /** * as_category_get_icon: - * @cat: An instance of #AsCategory. + * @category: An instance of #AsCategory. * * Get the stock icon name for this category. */ const gchar* -as_category_get_icon (AsCategory *cat) +as_category_get_icon (AsCategory *category) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); + AsCategoryPrivate *priv = GET_PRIVATE (category); return priv->icon; } /** * as_category_set_icon: - * @cat: An instance of #AsCategory. + * @category: An instance of #AsCategory. * * Set the stock icon name for this category. */ void -as_category_set_icon (AsCategory *cat, const gchar *value) +as_category_set_icon (AsCategory *category, const gchar *value) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); + AsCategoryPrivate *priv = GET_PRIVATE (category); g_free (priv->icon); priv->icon = g_strdup (value); - g_object_notify ((GObject*) cat, "icon"); + g_object_notify (G_OBJECT (category), "icon"); } /** - * as_category_get_directory: - * @cat: An instance of #AsCategory. + * as_category_get_desktop_groups: + * @category: An instance of #AsCategory. * - * Get associated XDG directory name for this category, - * in case one exists in "/usr/share/desktop-directories/". + * Returns: (transfer none) (element-type utf8): A list of desktop-file categories. */ -const gchar* -as_category_get_directory (AsCategory *cat) +GPtrArray* +as_category_get_desktop_groups (AsCategory *category) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); - return priv->directory; + AsCategoryPrivate *priv = GET_PRIVATE (category); + return priv->desktop_groups; } /** - * as_category_set_directory: - * @cat: An instance of #AsCategory. + * as_category_add_desktop_group: + * @category: An instance of #AsCategory. + * @group_name: A subcategory to add. * - * Set associated XDG directory name for this category. + * Add a desktop-file category to this #AsCategory. */ void -as_category_set_directory (AsCategory *cat, const gchar *value) +as_category_add_desktop_group (AsCategory *category, const gchar *group_name) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); - - g_free (priv->directory); - priv->directory = g_strdup (value); - g_object_notify ((GObject*) cat, "directory"); + AsCategoryPrivate *priv = GET_PRIVATE (category); + g_ptr_array_add (priv->desktop_groups, + g_strdup (group_name)); } /** - * as_category_get_included: - * @cat: An instance of #AsCategory. + * as_category_get_components: + * @category: An instance of #AsCategory. * - * Returns: (element-type utf8) (transfer none): A list of category names - */ -GList* -as_category_get_included (AsCategory *cat) -{ - AsCategoryPrivate *priv = GET_PRIVATE (cat); - return priv->included; -} - -/** - * as_category_get_excluded: - * @cat: An instance of #AsCategory. + * Get list of components which have been sorted into this category. * - * Returns: (element-type utf8) (transfer none): A list of category names + * Returns: (transfer none) (element-type AsComponent): List of #AsCategory */ -GList* -as_category_get_excluded (AsCategory *cat) +GPtrArray* +as_category_get_components (AsCategory *category) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); - return priv->excluded; + AsCategoryPrivate *priv = GET_PRIVATE (category); + return priv->components; } /** - * as_category_get_level: - */ -gint -as_category_get_level (AsCategory *cat) -{ - AsCategoryPrivate *priv = GET_PRIVATE (cat); - return priv->level; -} - -/** - * as_category_set_level: + * as_category_add_component: + * @category: An instance of #AsCategory. + * @cpt: The #AsComponent to add. + * + * Add a component to this category. */ void -as_category_set_level (AsCategory *cat, gint value) +as_category_add_component (AsCategory *category, AsComponent *cpt) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); - - priv->level = value; - g_object_notify ((GObject*) cat, "level"); + AsCategoryPrivate *priv = GET_PRIVATE (category); + g_ptr_array_add (priv->components, + g_object_ref (cpt)); } /** - * as_category_get_subcategories: - * @cat: An instance of #AsCategory. + * as_category_has_component: + * @category: An instance of #AsCategory. + * @cpt: The #AsComponent to look for. * - * Returns: (element-type AsCategory) (transfer none): A list of subcategories. + * Check if the exact #AsComponent @cpt is a member of this + * category already. + * + * returns: %TRUE if the component is present. */ -GList* -as_category_get_subcategories (AsCategory *cat) +gboolean +as_category_has_component (AsCategory *category, AsComponent *cpt) { - AsCategoryPrivate *priv = GET_PRIVATE (cat); - return priv->subcats; + AsCategoryPrivate *priv = GET_PRIVATE (category); + guint i; + + for (i = 0; i < priv->components->len; i++) { + AsComponent *ecpt = AS_COMPONENT (g_ptr_array_index (priv->components, i)); + if (ecpt == cpt) + return TRUE; + } + + return FALSE; } /** @@ -403,32 +650,23 @@ static void as_category_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { - AsCategory *cat; - cat = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_CATEGORY, AsCategory); + AsCategory *category; + category = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_CATEGORY, AsCategory); switch (property_id) { + case AS_CATEGORY_ID: + g_value_set_string (value, as_category_get_id (category)); + break; case AS_CATEGORY_NAME: - g_value_set_string (value, as_category_get_name (cat)); + g_value_set_string (value, as_category_get_name (category)); break; case AS_CATEGORY_SUMMARY: - g_value_set_string (value, as_category_get_summary (cat)); + g_value_set_string (value, as_category_get_summary (category)); break; case AS_CATEGORY_ICON: - g_value_set_string (value, as_category_get_icon (cat)); - break; - case AS_CATEGORY_DIRECTORY: - g_value_set_string (value, as_category_get_directory (cat)); + g_value_set_string (value, as_category_get_icon (category)); break; - case AS_CATEGORY_INCLUDED: - g_value_set_pointer (value, as_category_get_included (cat)); - break; - case AS_CATEGORY_EXCLUDED: - g_value_set_pointer (value, as_category_get_excluded (cat)); - break; - case AS_CATEGORY_LEVEL: - g_value_set_int (value, as_category_get_level (cat)); - break; - case AS_CATEGORY_SUBCATEGORIES: - g_value_set_pointer (value, as_category_get_subcategories (cat)); + case AS_CATEGORY_CHILDREN: + g_value_set_pointer (value, as_category_get_children (category)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -442,23 +680,20 @@ static void as_category_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { - AsCategory *cat; - cat = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_CATEGORY, AsCategory); + AsCategory *category; + category = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_CATEGORY, AsCategory); switch (property_id) { + case AS_CATEGORY_ID: + as_category_set_id (category, g_value_get_string (value)); + break; case AS_CATEGORY_NAME: - as_category_set_name (cat, g_value_get_string (value)); + as_category_set_name (category, g_value_get_string (value)); break; case AS_CATEGORY_SUMMARY: - as_category_set_summary (cat, g_value_get_string (value)); + as_category_set_summary (category, g_value_get_string (value)); break; case AS_CATEGORY_ICON: - as_category_set_icon (cat, g_value_get_string (value)); - break; - case AS_CATEGORY_DIRECTORY: - as_category_set_directory (cat, g_value_get_string (value)); - break; - case AS_CATEGORY_LEVEL: - as_category_set_level (cat, g_value_get_int (value)); + as_category_set_icon (category, g_value_get_string (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -478,6 +713,9 @@ object_class->finalize = as_category_finalize; g_object_class_install_property (object_class, + AS_CATEGORY_ID, + g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (object_class, AS_CATEGORY_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, @@ -487,20 +725,8 @@ AS_CATEGORY_ICON, g_param_spec_string ("icon", "icon", "icon", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, - AS_CATEGORY_DIRECTORY, - g_param_spec_string ("directory", "directory", "directory", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_object_class_install_property (object_class, - AS_CATEGORY_INCLUDED, - g_param_spec_pointer ("included", "included", "included", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_class_install_property (object_class, - AS_CATEGORY_EXCLUDED, - g_param_spec_pointer ("excluded", "excluded", "excluded", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); - g_object_class_install_property (object_class, - AS_CATEGORY_LEVEL, - g_param_spec_int ("level", "level", "level", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_object_class_install_property (object_class, - AS_CATEGORY_SUBCATEGORIES, - g_param_spec_pointer ("subcategories", "subcategories", "subcategories", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); + AS_CATEGORY_CHILDREN, + g_param_spec_pointer ("children", "children", "children", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); } /** @@ -513,7 +739,87 @@ AsCategory* as_category_new (void) { - AsCategory *cat; - cat = g_object_new (AS_TYPE_CATEGORY, NULL); - return AS_CATEGORY (cat); + AsCategory *category; + category = g_object_new (AS_TYPE_CATEGORY, NULL); + return AS_CATEGORY (category); +} + +/** + * as_get_default_categories: + * @with_special: Include special categories (e.g. "addons", and "all"/"featured" in submenus) + * + * Get a list of the default Freedesktop and AppStream categories + * that software components (especially GUI applications) can be sorted + * into in software centers. + * + * Returns: (transfer container) (element-type AsCategory): a list of #AsCategory + */ +GPtrArray* +as_get_default_categories (gboolean with_special) +{ + guint i; + gchar msgctxt[100]; + GPtrArray *main_cats; + + main_cats = g_ptr_array_new_with_free_func (g_object_unref); + for (i = 0; msdata[i].id != NULL; i++) { + guint j; + AsCategory *category; + GHashTableIter iter; + gpointer key; + g_autoptr(GHashTable) root_fdocats = NULL; + + if ((!with_special) && (g_strcmp0 (msdata[i].id, "addons") == 0)) + continue; + + category = as_category_new (); + as_category_set_id (category, msdata[i].id); + + as_category_set_name (category, gettext (msdata[i].name)); + as_category_set_icon (category, msdata[i].icon); + + g_ptr_array_add (main_cats, category); + g_snprintf (msgctxt, sizeof(msgctxt), + "Subcategory of %s", msdata[i].name); + + root_fdocats = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + NULL); + + /* add subcategories */ + for (j = 0; msdata[i].mapping[j].id != NULL; j++) { + guint k; + const AsCategoryMap *map = &msdata[i].mapping[j]; + g_autoptr(AsCategory) sub = NULL; + + if (!with_special) { + if (g_strcmp0 (msdata[i].id, "featured") == 0) + continue; + } + + sub = as_category_new (); + as_category_set_id (sub, map->id); + + for (k = 0; map->fdo_cats[k] != NULL; k++) { + g_auto(GStrv) split = g_strsplit (map->fdo_cats[k], "::", -1); + as_category_add_desktop_group (sub, map->fdo_cats[k]); + + g_hash_table_add (root_fdocats, g_strdup (split[0])); + } + as_category_set_name (sub, g_dpgettext2 (GETTEXT_PACKAGE, + msgctxt, + map->name)); + as_category_add_child (category, sub); + } + + /* ensure the root category has the right XDG group names set, which match the subcategories */ + g_hash_table_iter_init (&iter, root_fdocats); + while (g_hash_table_iter_next (&iter, &key, NULL)) { + const gchar *desktop_group = (const gchar*) key; + as_category_add_desktop_group (category, desktop_group); + } + } + + return main_cats; } diff -Nru appstream-0.9.4/src/as-category.h appstream-0.12.0/src/as-category.h --- appstream-0.9.4/src/as-category.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-category.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2012-2015 Matthias Klumpp + * Copyright (C) 2012-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -29,6 +29,8 @@ G_BEGIN_DECLS +typedef struct _AsComponent AsComponent; + #define AS_TYPE_CATEGORY (as_category_get_type ()) G_DECLARE_DERIVABLE_TYPE (AsCategory, as_category, AS, CATEGORY, GObject) @@ -40,43 +42,44 @@ void (*_as_reserved2) (void); void (*_as_reserved3) (void); void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); }; AsCategory *as_category_new (void); -void as_category_complete (AsCategory *cat); -const gchar *as_category_get_directory (AsCategory *cat); -void as_category_set_directory (AsCategory *cat, - const gchar* value); +const gchar *as_category_get_id (AsCategory *category); +void as_category_set_id (AsCategory *category, + const gchar *id); -const gchar *as_category_get_name (AsCategory *cat); -void as_category_set_name (AsCategory *cat, +const gchar *as_category_get_name (AsCategory *category); +void as_category_set_name (AsCategory *category, const gchar *value); -const gchar *as_category_get_summary (AsCategory *cat); -void as_category_set_summary (AsCategory *cat, +const gchar *as_category_get_summary (AsCategory *category); +void as_category_set_summary (AsCategory *category, const gchar *value); -const gchar *as_category_get_icon (AsCategory *cat); -void as_category_set_icon (AsCategory *cat, +const gchar *as_category_get_icon (AsCategory *category); +void as_category_set_icon (AsCategory *category, const gchar* value); -gboolean as_category_has_subcategory (AsCategory *cat); -void as_category_add_subcategory (AsCategory *cat, - AsCategory *subcat); -void as_category_remove_subcategory (AsCategory *cat, - AsCategory *subcat); - -GList *as_category_get_included (AsCategory *cat); -GList *as_category_get_excluded (AsCategory *cat); - -GList *as_category_get_subcategories (AsCategory *cat); - -gint as_category_get_level (AsCategory *cat); -void as_category_set_level (AsCategory *cat, - gint value); +GPtrArray *as_category_get_children (AsCategory *category); +gboolean as_category_has_children (AsCategory *category); +void as_category_add_child (AsCategory *category, + AsCategory *subcat); +void as_category_remove_child (AsCategory *category, + AsCategory *subcat); + +GPtrArray *as_category_get_desktop_groups (AsCategory *category); +void as_category_add_desktop_group (AsCategory *category, + const gchar *group_name); + +GPtrArray *as_category_get_components (AsCategory *category); +void as_category_add_component (AsCategory *category, + AsComponent *cpt); +gboolean as_category_has_component (AsCategory *category, + AsComponent *cpt); + +GPtrArray *as_get_default_categories (gboolean with_special); G_END_DECLS diff -Nru appstream-0.9.4/src/as-checksum.c appstream-0.12.0/src/as-checksum.c --- appstream-0.9.4/src/as-checksum.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-checksum.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,312 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +/** + * SECTION:as-checksum + * @short_description: A single checksum used in a release. + * @include: appstream.h + * + * A checksum for a file referenced in a release. + * + * See also: #AsRelease + */ + +#include "config.h" +#include "as-checksum-private.h" + +typedef struct +{ + AsChecksumKind kind; + gchar *value; +} AsChecksumPrivate; + +G_DEFINE_TYPE_WITH_PRIVATE (AsChecksum, as_checksum, G_TYPE_OBJECT) + +#define GET_PRIVATE(o) (as_checksum_get_instance_private (o)) + +/** + * as_checksum_kind_to_string: + * @kind: the %AsChecksumKind. + * + * Converts the enumerated value to an text representation. + * + * Returns: string version of @kind + **/ +const gchar* +as_checksum_kind_to_string (AsChecksumKind kind) +{ + if (kind == AS_CHECKSUM_KIND_NONE) + return "none"; + if (kind == AS_CHECKSUM_KIND_SHA1) + return "sha1"; + if (kind == AS_CHECKSUM_KIND_SHA256) + return "sha256"; + return "unknown"; +} + +/** + * as_checksum_kind_from_string: + * @kind_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsChecksumKind or %AS_CHECKSUM_KIND_NONE for unknown + **/ +AsChecksumKind +as_checksum_kind_from_string (const gchar *kind_str) +{ + if (g_strcmp0 (kind_str, "none") == 0) + return AS_CHECKSUM_KIND_NONE; + if (g_strcmp0 (kind_str, "sha1") == 0) + return AS_CHECKSUM_KIND_SHA1; + if (g_strcmp0 (kind_str, "sha256") == 0) + return AS_CHECKSUM_KIND_SHA256; + return AS_CHECKSUM_KIND_NONE; +} + +static void +as_checksum_finalize (GObject *object) +{ + AsChecksum *cs = AS_CHECKSUM (object); + AsChecksumPrivate *priv = GET_PRIVATE (cs); + + g_free (priv->value); + + G_OBJECT_CLASS (as_checksum_parent_class)->finalize (object); +} + +static void +as_checksum_init (AsChecksum *cs) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + priv->kind = AS_CHECKSUM_KIND_NONE; +} + +static void +as_checksum_class_init (AsChecksumClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->finalize = as_checksum_finalize; +} + +/** + * as_checksum_get_kind: + * @cs: a #AsChecksum instance. + * + * Gets the checksum type. + * + * Returns: the #AsChecksumKind + **/ +AsChecksumKind +as_checksum_get_kind (AsChecksum *cs) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + return priv->kind; +} + +/** + * as_checksum_set_kind: + * @cs: a #AsChecksum instance. + * @kind: the #AsChecksumKind, e.g. %AS_CHECKSUM_KIND_SHA256. + * + * Sets the checksum type. + **/ +void +as_checksum_set_kind (AsChecksum *cs, AsChecksumKind kind) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + priv->kind = kind; +} + +/** + * as_checksum_get_value: + * @cs: a #AsChecksum instance. + * + * Gets the checksum, usually in its hexadecimal form. + * + * Returns: the checksum. + **/ +const gchar* +as_checksum_get_value (AsChecksum *cs) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + return priv->value; +} + +/** + * as_checksum_set_value: + * @cs: a #AsChecksum instance. + * @value: the new value. + * + * Sets the checksum value filename. + **/ +void +as_checksum_set_value (AsChecksum *cs, const gchar *value) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + g_free (priv->value); + priv->value = g_strdup (value); +} + +/** + * as_checksum_load_from_xml: + * @cs: a #AsChecksum instance. + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads data from an XML node. + **/ +gboolean +as_checksum_load_from_xml (AsChecksum *cs, AsContext *ctx, xmlNode *node, GError **error) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + g_autofree gchar *prop = NULL; + g_autofree gchar *content = NULL; + + prop = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + priv->kind = as_checksum_kind_from_string (prop); + if (priv->kind == AS_CHECKSUM_KIND_NONE) + return FALSE; + + content = as_xml_get_node_value (node); + as_checksum_set_value (cs, content); + + return TRUE; +} + +/** + * as_checksum_to_xml_node: + * @cs: a #AsChecksum instance. + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +void +as_checksum_to_xml_node (AsChecksum *cs, AsContext *ctx, xmlNode *root) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + xmlNode *n; + + if (priv->kind == AS_CHECKSUM_KIND_NONE) + return; + + n = xmlNewTextChild (root, NULL, + (xmlChar*) "checksum", + (xmlChar*) priv->value); + xmlNewProp (n, + (xmlChar*) "type", + (xmlChar*) as_checksum_kind_to_string (priv->kind)); +} + +/** + * as_checksum_load_from_yaml: + * @cs: a #AsChecksum instance. + * @ctx: the AppStream document context. + * @node: the YAML node. + * @error: a #GError. + * + * Loads data from a YAML field. + **/ +gboolean +as_checksum_load_from_yaml (AsChecksum *cs, AsContext *ctx, GNode *node, GError **error) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + const gchar *key = as_yaml_node_get_key (node); + const gchar *value = as_yaml_node_get_value (node); + + priv->kind = as_checksum_kind_from_string (key); + if (priv->kind == AS_CHECKSUM_KIND_NONE) + return FALSE; + + as_checksum_set_value (cs, value); + + return TRUE; +} + +/** + * as_checksum_emit_yaml: + * @cs: a #AsChecksum instance. + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. + * + * Emit YAML data for this object. + **/ +void +as_checksum_emit_yaml (AsChecksum *cs, AsContext *ctx, yaml_emitter_t *emitter) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + if (priv->kind == AS_CHECKSUM_KIND_NONE) + return; + + as_yaml_emit_entry (emitter, as_checksum_kind_to_string (priv->kind), priv->value); +} + +/** + * as_checksum_to_variant: + * @cs: a #AsChecksum instance. + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_checksum_to_variant (AsChecksum *cs, GVariantBuilder *builder) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + + g_variant_builder_add (builder, "{us}", priv->kind, priv->value); +} + +/** + * as_checksum_set_from_variant: + * @cs: a #AsChecksum instance. + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_checksum_set_from_variant (AsChecksum *cs, GVariant *variant) +{ + AsChecksumPrivate *priv = GET_PRIVATE (cs); + + g_free (priv->value); + priv->value = NULL; + g_variant_get (variant, "{us}", &priv->kind, &priv->value); + + return TRUE; +} + +/** + * as_checksum_new: + * + * Creates a new #AsChecksum. + * + * Returns: (transfer full): an #AsChecksum + **/ +AsChecksum* +as_checksum_new (void) +{ + AsChecksum *cs; + cs = g_object_new (AS_TYPE_CHECKSUM, NULL); + return AS_CHECKSUM (cs); +} diff -Nru appstream-0.9.4/src/as-checksum.h appstream-0.12.0/src/as-checksum.h --- appstream-0.9.4/src/as-checksum.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-checksum.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,78 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_CHECKSUM_H +#define __AS_CHECKSUM_H + +#include + +G_BEGIN_DECLS + +#define AS_TYPE_CHECKSUM (as_checksum_get_type ()) +G_DECLARE_DERIVABLE_TYPE (AsChecksum, as_checksum, AS, CHECKSUM, GObject) + +struct _AsChecksumClass +{ + GObjectClass parent_class; + /*< private >*/ + void (*_as_reserved1) (void); + void (*_as_reserved2) (void); + void (*_as_reserved3) (void); + void (*_as_reserved4) (void); + void (*_as_reserved5) (void); + void (*_as_reserved6) (void); +}; + +/** + * AsChecksumKind: + * @AS_CHECKSUM_KIND_NONE: No checksum + * @AS_CHECKSUM_KIND_SHA1: SHA1 + * @AS_CHECKSUM_KIND_SHA256: SHA256 + * + * Checksums supported by #AsRelease + **/ +typedef enum { + AS_CHECKSUM_KIND_NONE, + AS_CHECKSUM_KIND_SHA1, + AS_CHECKSUM_KIND_SHA256, + /*< private >*/ + AS_CHECKSUM_KIND_LAST +} AsChecksumKind; + +const gchar *as_checksum_kind_to_string (AsChecksumKind kind); +AsChecksumKind as_checksum_kind_from_string (const gchar *kind_str); + +AsChecksum *as_checksum_new (void); + +AsChecksumKind as_checksum_get_kind (AsChecksum *cs); +void as_checksum_set_kind (AsChecksum *cs, + AsChecksumKind kind); + +const gchar *as_checksum_get_value (AsChecksum *cs); +void as_checksum_set_value (AsChecksum *cs, + const gchar *value); + +G_END_DECLS + +#endif /* __AS_CHECKSUM_H */ diff -Nru appstream-0.9.4/src/as-checksum-private.h appstream-0.12.0/src/as-checksum-private.h --- appstream-0.9.4/src/as-checksum-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-checksum-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,55 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2014-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_CHECKSUM_PRIVATE_H +#define __AS_CHECKSUM_PRIVATE_H + +#include "as-checksum.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +gboolean as_checksum_load_from_xml (AsChecksum *cs, + AsContext *ctx, + xmlNode *node, + GError **error); +void as_checksum_to_xml_node (AsChecksum *cs, + AsContext *ctx, + xmlNode *root); + +gboolean as_checksum_load_from_yaml (AsChecksum *cs, + AsContext *ctx, + GNode *node, + GError **error); +void as_checksum_emit_yaml (AsChecksum *cs, + AsContext *ctx, + yaml_emitter_t *emitter); + +void as_checksum_to_variant (AsChecksum *cs, + GVariantBuilder *builder); +gboolean as_checksum_set_from_variant (AsChecksum *cs, + GVariant *variant); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_CHECKSUM_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-component.c appstream-0.12.0/src/as-component.c --- appstream-0.9.4/src/as-component.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-component.c 2018-04-04 15:53:56.000000000 +0000 @@ -26,6 +26,20 @@ #include "as-utils.h" #include "as-utils-private.h" +#include "as-stemmer.h" +#include "as-variant-cache.h" + +#include "as-icon-private.h" +#include "as-screenshot-private.h" +#include "as-bundle-private.h" +#include "as-release-private.h" +#include "as-translation-private.h" +#include "as-suggested-private.h" +#include "as-content-rating-private.h" +#include "as-launchable-private.h" +#include "as-provided-private.h" +#include "as-relation-private.h" + /** * SECTION:as-component @@ -46,10 +60,14 @@ typedef struct { - AsComponentKind kind; - gchar *active_locale; + AsComponentKind kind; + AsComponentScope scope; + AsOriginKind origin_kind; + AsContext *context; /* the document context associated with this component */ + gchar *active_locale_override; gchar *id; + gchar *data_id; gchar *origin; gchar **pkgnames; gchar *source_pkgname; @@ -60,30 +78,59 @@ GHashTable *keywords; /* localized entry, value:strv */ GHashTable *developer_name; /* localized entry */ - gchar **categories; + gchar *metadata_license; gchar *project_license; gchar *project_group; - gchar **compulsory_for_desktops; - GPtrArray *extends; /* of string */ - GPtrArray *extensions; /* of string */ + GPtrArray *launchables; /* of #AsLaunchable */ + GPtrArray *categories; /* of utf8 */ + GPtrArray *compulsory_for_desktops; /* of utf8 */ + GPtrArray *extends; /* of utf8 */ + GPtrArray *addons; /* of AsComponent */ GPtrArray *screenshots; /* of AsScreenshot elements */ GPtrArray *releases; /* of AsRelease elements */ + GPtrArray *provided; /* of AsProvided */ + GPtrArray *bundles; /* of AsBundle */ + GPtrArray *suggestions; /* of AsSuggested elements */ + GPtrArray *content_ratings; /* of AsContentRating */ + GPtrArray *recommends; /* of AsRelation */ + GPtrArray *requires; /* of AsRelation */ - GHashTable *provided; /* of int:object */ GHashTable *urls; /* of int:utf8 */ GHashTable *languages; /* of utf8:utf8 */ - GHashTable *bundles; /* of int:utf8 */ GPtrArray *translations; /* of AsTranslation */ GPtrArray *icons; /* of AsIcon elements */ - GHashTable *icons_sizetab; /* of utf8:object (object owned by priv->icons array) */ gchar *arch; /* the architecture this data was generated from */ gint priority; /* used internally */ + AsMergeKind merge_kind; /* whether and how the component data should be merged */ + + guint sort_score; /* used to priorize components in listings */ + gsize token_cache_valid; + GHashTable *token_cache; /* of utf8:AsTokenType* */ + + AsValueFlags value_flags; + + gboolean ignored; /* whether we should ignore this component */ + + GHashTable *custom; /* free-form user-defined custom data */ } AsComponentPrivate; +typedef enum { + AS_TOKEN_MATCH_NONE = 0, + AS_TOKEN_MATCH_MIMETYPE = 1 << 0, + AS_TOKEN_MATCH_PKGNAME = 1 << 1, + AS_TOKEN_MATCH_DESCRIPTION = 1 << 2, + AS_TOKEN_MATCH_SUMMARY = 1 << 3, + AS_TOKEN_MATCH_KEYWORD = 1 << 4, + AS_TOKEN_MATCH_NAME = 1 << 5, + AS_TOKEN_MATCH_ID = 1 << 6, + + AS_TOKEN_MATCH_LAST +} AsTokenMatch; + G_DEFINE_TYPE_WITH_PRIVATE (AsComponent, as_component, G_TYPE_OBJECT) #define GET_PRIVATE(o) (as_component_get_instance_private (o)) @@ -116,15 +163,19 @@ static volatile gsize as_component_kind_type_id__volatile = 0; if (g_once_init_enter (&as_component_kind_type_id__volatile)) { static const GEnumValue values[] = { - {AS_COMPONENT_KIND_UNKNOWN, "AS_COMPONENT_KIND_UNKNOWN", "unknown"}, - {AS_COMPONENT_KIND_GENERIC, "AS_COMPONENT_KIND_GENERIC", "generic"}, - {AS_COMPONENT_KIND_DESKTOP_APP, "AS_COMPONENT_KIND_DESKTOP_APP", "desktop"}, - {AS_COMPONENT_KIND_FONT, "AS_COMPONENT_KIND_FONT", "font"}, - {AS_COMPONENT_KIND_CODEC, "AS_COMPONENT_KIND_CODEC", "codec"}, - {AS_COMPONENT_KIND_INPUTMETHOD, "AS_COMPONENT_KIND_INPUTMETHOD", "inputmethod"}, - {AS_COMPONENT_KIND_ADDON, "AS_COMPONENT_KIND_ADDON", "addon"}, - {AS_COMPONENT_KIND_FIRMWARE, "AS_COMPONENT_KIND_FIRMWARE", "firmware"}, - {AS_COMPONENT_KIND_LAST, "AS_COMPONENT_KIND_LAST", "last"}, + {AS_COMPONENT_KIND_UNKNOWN, "AS_COMPONENT_KIND_UNKNOWN", "unknown"}, + {AS_COMPONENT_KIND_GENERIC, "AS_COMPONENT_KIND_GENERIC", "generic"}, + {AS_COMPONENT_KIND_DESKTOP_APP, "AS_COMPONENT_KIND_DESKTOP_APP", "desktop-app"}, + {AS_COMPONENT_KIND_CONSOLE_APP, "AS_COMPONENT_KIND_CONSOLE_APP", "console-app"}, + {AS_COMPONENT_KIND_WEB_APP, "AS_COMPONENT_KIND_WEB_APP", "web-app"}, + {AS_COMPONENT_KIND_ADDON, "AS_COMPONENT_KIND_ADDON", "addon"}, + {AS_COMPONENT_KIND_FONT, "AS_COMPONENT_KIND_FONT", "font"}, + {AS_COMPONENT_KIND_CODEC, "AS_COMPONENT_KIND_CODEC", "codec"}, + {AS_COMPONENT_KIND_INPUTMETHOD, "AS_COMPONENT_KIND_INPUTMETHOD", "inputmethod"}, + {AS_COMPONENT_KIND_FIRMWARE, "AS_COMPONENT_KIND_FIRMWARE", "firmware"}, + {AS_COMPONENT_KIND_DRIVER, "AS_COMPONENT_KIND_DRIVER", "driver"}, + {AS_COMPONENT_KIND_LOCALIZATION, "AS_COMPONENT_KIND_LOCALIZATION", "localization"}, + {AS_COMPONENT_KIND_SERVICE, "AS_COMPONENT_KIND_SERVICE", "service"}, {0, NULL, NULL} }; GType as_component_type_type_id; @@ -136,29 +187,39 @@ /** * as_component_kind_to_string: - * @kind: the %AsComponentKind. + * @kind: the #AsComponentKind. * * Converts the enumerated value to an text representation. * * Returns: string version of @kind **/ -const gchar * +const gchar* as_component_kind_to_string (AsComponentKind kind) { if (kind == AS_COMPONENT_KIND_GENERIC) return "generic"; if (kind == AS_COMPONENT_KIND_DESKTOP_APP) - return "desktop"; + return "desktop-application"; + if (kind == AS_COMPONENT_KIND_CONSOLE_APP) + return "console-application"; + if (kind == AS_COMPONENT_KIND_WEB_APP) + return "web-application"; + if (kind == AS_COMPONENT_KIND_ADDON) + return "addon"; if (kind == AS_COMPONENT_KIND_FONT) return "font"; if (kind == AS_COMPONENT_KIND_CODEC) return "codec"; if (kind == AS_COMPONENT_KIND_INPUTMETHOD) return "inputmethod"; - if (kind == AS_COMPONENT_KIND_ADDON) - return "addon"; if (kind == AS_COMPONENT_KIND_FIRMWARE) return "firmware"; + if (kind == AS_COMPONENT_KIND_DRIVER) + return "driver"; + if (kind == AS_COMPONENT_KIND_LOCALIZATION) + return "localization"; + if (kind == AS_COMPONENT_KIND_SERVICE) + return "service"; return "unknown"; } @@ -173,24 +234,119 @@ AsComponentKind as_component_kind_from_string (const gchar *kind_str) { + if (kind_str == NULL) + return AS_COMPONENT_KIND_GENERIC; if (g_strcmp0 (kind_str, "generic") == 0) return AS_COMPONENT_KIND_GENERIC; - if (g_strcmp0 (kind_str, "desktop") == 0) + if (g_strcmp0 (kind_str, "desktop-application") == 0) return AS_COMPONENT_KIND_DESKTOP_APP; + if (g_strcmp0 (kind_str, "console-application") == 0) + return AS_COMPONENT_KIND_CONSOLE_APP; + if (g_strcmp0 (kind_str, "web-application") == 0) + return AS_COMPONENT_KIND_WEB_APP; + if (g_strcmp0 (kind_str, "addon") == 0) + return AS_COMPONENT_KIND_ADDON; if (g_strcmp0 (kind_str, "font") == 0) return AS_COMPONENT_KIND_FONT; if (g_strcmp0 (kind_str, "codec") == 0) return AS_COMPONENT_KIND_CODEC; if (g_strcmp0 (kind_str, "inputmethod") == 0) return AS_COMPONENT_KIND_INPUTMETHOD; - if (g_strcmp0 (kind_str, "addon") == 0) - return AS_COMPONENT_KIND_ADDON; if (g_strcmp0 (kind_str, "firmware") == 0) return AS_COMPONENT_KIND_FIRMWARE; + if (g_strcmp0 (kind_str, "driver") == 0) + return AS_COMPONENT_KIND_DRIVER; + if (g_strcmp0 (kind_str, "localization") == 0) + return AS_COMPONENT_KIND_LOCALIZATION; + if (g_strcmp0 (kind_str, "service") == 0) + return AS_COMPONENT_KIND_SERVICE; + + /* legacy */ + if (g_strcmp0 (kind_str, "desktop") == 0) + return AS_COMPONENT_KIND_DESKTOP_APP; + if (g_strcmp0 (kind_str, "desktop-app") == 0) + return AS_COMPONENT_KIND_DESKTOP_APP; + return AS_COMPONENT_KIND_UNKNOWN; } /** + * as_merge_kind_to_string: + * @kind: the #AsMergeKind. + * + * Converts the enumerated value to an text representation. + * + * Returns: string version of @kind + **/ +const gchar* +as_merge_kind_to_string (AsMergeKind kind) +{ + if (kind == AS_MERGE_KIND_NONE) + return "none"; + if (kind == AS_MERGE_KIND_REPLACE) + return "replace"; + if (kind == AS_MERGE_KIND_APPEND) + return "append"; + + return "unknown"; +} + +/** + * as_merge_kind_from_string: + * @kind_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsMergeKind or %AS_MERGE_KIND_NONE for unknown + **/ +AsMergeKind +as_merge_kind_from_string (const gchar *kind_str) +{ + if (g_strcmp0 (kind_str, "replace") == 0) + return AS_MERGE_KIND_REPLACE; + if (g_strcmp0 (kind_str, "append") == 0) + return AS_MERGE_KIND_APPEND; + + return AS_MERGE_KIND_NONE; +} + +/** + * as_component_scope_to_string: + * @scope: the #AsComponentScope. + * + * Converts the enumerated value to an text representation. + * + * Returns: string version of @scope + **/ +const gchar* +as_component_scope_to_string (AsComponentScope scope) +{ + if (scope == AS_COMPONENT_SCOPE_SYSTEM) + return "system"; + if (scope == AS_COMPONENT_SCOPE_USER) + return "user"; + return "unknown"; +} + +/** + * as_component_scope_from_string: + * @scope_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsComponentScope or %AS_COMPONENT_SCOPE_UNKNOWN for unknown + **/ +AsMergeKind +as_component_scope_from_string (const gchar *scope_str) +{ + if (g_strcmp0 (scope_str, "system") == 0) + return AS_COMPONENT_SCOPE_SYSTEM; + if (g_strcmp0 (scope_str, "user") == 0) + return AS_COMPONENT_SCOPE_USER; + return AS_COMPONENT_SCOPE_UNKNOWN; +} + +/** * as_component_init: **/ static void @@ -198,9 +354,6 @@ { AsComponentPrivate *priv = GET_PRIVATE (cpt); - /* our default locale is "unlocalized" */ - priv->active_locale = g_strdup ("C"); - /* translatable entities */ priv->name = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); priv->summary = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); @@ -208,18 +361,30 @@ priv->developer_name = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); priv->keywords = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_strfreev); + /* lists */ + priv->launchables = g_ptr_array_new_with_free_func (g_object_unref); + priv->categories = g_ptr_array_new_with_free_func (g_free); + priv->compulsory_for_desktops = g_ptr_array_new_with_free_func (g_free); priv->screenshots = g_ptr_array_new_with_free_func (g_object_unref); priv->releases = g_ptr_array_new_with_free_func (g_object_unref); - + priv->provided = g_ptr_array_new_with_free_func (g_object_unref); + priv->bundles = g_ptr_array_new_with_free_func (g_object_unref); + priv->extends = g_ptr_array_new_with_free_func (g_free); + priv->addons = g_ptr_array_new_with_free_func (g_object_unref); + priv->suggestions = g_ptr_array_new_with_free_func (g_object_unref); priv->icons = g_ptr_array_new_with_free_func (g_object_unref); - priv->icons_sizetab = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + priv->content_ratings = g_ptr_array_new_with_free_func (g_object_unref); + priv->recommends = g_ptr_array_new_with_free_func (g_object_unref); + priv->requires = g_ptr_array_new_with_free_func (g_object_unref); - priv->provided = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_object_unref); + /* others */ priv->urls = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free); - priv->bundles = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free); priv->languages = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + priv->custom = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); - as_component_set_priority (cpt, 0); + priv->token_cache = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + + priv->priority = 0; } /** @@ -232,10 +397,12 @@ AsComponentPrivate *priv = GET_PRIVATE (cpt); g_free (priv->id); + g_free (priv->data_id); g_strfreev (priv->pkgnames); + g_free (priv->metadata_license); g_free (priv->project_license); g_free (priv->project_group); - g_free (priv->active_locale); + g_free (priv->active_locale_override); g_free (priv->arch); g_hash_table_unref (priv->name); @@ -244,30 +411,54 @@ g_hash_table_unref (priv->developer_name); g_hash_table_unref (priv->keywords); - g_strfreev (priv->categories); - g_strfreev (priv->compulsory_for_desktops); + g_ptr_array_unref (priv->launchables); + g_ptr_array_unref (priv->categories); + g_ptr_array_unref (priv->compulsory_for_desktops); g_ptr_array_unref (priv->screenshots); g_ptr_array_unref (priv->releases); - g_hash_table_unref (priv->provided); + g_ptr_array_unref (priv->provided); + g_ptr_array_unref (priv->bundles); + g_ptr_array_unref (priv->extends); + g_ptr_array_unref (priv->addons); + g_ptr_array_unref (priv->suggestions); g_hash_table_unref (priv->urls); g_hash_table_unref (priv->languages); - g_hash_table_unref (priv->bundles); + g_hash_table_unref (priv->custom); + g_ptr_array_unref (priv->content_ratings); + g_ptr_array_unref (priv->icons); + + g_ptr_array_unref (priv->recommends); + g_ptr_array_unref (priv->requires); - if (priv->extends != NULL) - g_ptr_array_unref (priv->extends); - if (priv->extensions != NULL) - g_ptr_array_unref (priv->extensions); if (priv->translations != NULL) g_ptr_array_unref (priv->translations); - g_ptr_array_unref (priv->icons); - g_hash_table_unref (priv->icons_sizetab); + g_hash_table_unref (priv->token_cache); + + if (priv->context != NULL) + g_object_unref (priv->context); G_OBJECT_CLASS (as_component_parent_class)->finalize (object); } /** + * as_component_invalidate_data_id: + * + * Internal method to mark the metadata-ID as outdated, so + * it will be regenerated next time. + */ +static void +as_component_invalidate_data_id (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + if (priv->data_id == NULL) + return; + g_free (priv->data_id); + priv->data_id = NULL; +} + +/** * as_component_is_valid: * @cpt: a #AsComponent instance. * @@ -279,7 +470,6 @@ gboolean as_component_is_valid (AsComponent *cpt) { - gboolean ret = FALSE; const gchar *cname; const gchar *csummary; AsComponentKind ctype; @@ -288,16 +478,20 @@ ctype = priv->kind; if (ctype == AS_COMPONENT_KIND_UNKNOWN) return FALSE; + if (priv->merge_kind != AS_MERGE_KIND_NONE) { + /* merge components only need an ID to be valid */ + return !as_str_empty (priv->id); + } + cname = as_component_get_name (cpt); csummary = as_component_get_summary (cpt); - if ((!as_str_empty (priv->id)) && (!as_str_empty (cname)) && (!as_str_empty (csummary))) { - ret = TRUE; + return TRUE; } - return ret; + return FALSE; } /** @@ -313,38 +507,21 @@ as_component_to_string (AsComponent *cpt) { gchar* res = NULL; - const gchar *name; - const gchar *summary; - gchar *pkgs; + g_autofree gchar *pkgs = NULL; AsComponentPrivate *priv = GET_PRIVATE (cpt); if (as_component_has_package (cpt)) pkgs = g_strjoinv (",", priv->pkgnames); else - pkgs = g_strdup ("?"); - - name = as_component_get_name (cpt); - summary = as_component_get_summary (cpt); + pkgs = g_strdup (""); - switch (priv->kind) { - case AS_COMPONENT_KIND_DESKTOP_APP: - { - res = g_strdup_printf ("[DesktopApp::%s]> name: %s | package: %s | summary: %s", priv->id, name, pkgs, summary); - break; - } - case AS_COMPONENT_KIND_UNKNOWN: - { - res = g_strdup_printf ("[UNKNOWN::%s]> name: %s | package: %s | summary: %s", priv->id, name, pkgs, summary); - break; - } - default: - { - res = g_strdup_printf ("[Component::%s]> name: %s | package: %s | summary: %s", priv->id, name, pkgs, summary); - break; - } - } + res = g_strdup_printf ("[%s::%s]> name: %s | summary: %s | package: %s", + as_component_kind_to_string (priv->kind), + as_component_get_data_id (cpt), + as_component_get_name (cpt), + as_component_get_summary (cpt), + pkgs); - g_free (pkgs); return res; } @@ -365,6 +542,22 @@ } /** + * as_component_get_releases: + * @cpt: a #AsComponent instance. + * + * Get an array of the #AsRelease items this component + * provides. + * + * Return value: (element-type AsRelease) (transfer none): A list of releases + **/ +GPtrArray* +as_component_get_releases (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->releases; +} + +/** * as_component_add_release: * @cpt: a #AsComponent instance. * @release: The #AsRelease to add @@ -381,23 +574,6 @@ } /** - * as_component_get_urls_table: - * @cpt: a #AsComponent instance. - * - * Gets the URLs set for the component. - * - * Returns: (transfer none) (element-type AsUrlKind utf8): URLs - * - * Since: 0.6.2 - **/ -GHashTable* -as_component_get_urls_table (AsComponent *cpt) -{ - AsComponentPrivate *priv = GET_PRIVATE (cpt); - return priv->urls; -} - -/** * as_component_get_url: * @cpt: a #AsComponent instance. * @url_kind: the URL kind, e.g. %AS_URL_KIND_HOMEPAGE. @@ -452,8 +628,6 @@ as_component_get_extends (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - if (priv->extends == NULL) - priv->extends = g_ptr_array_new_with_free_func (g_free); return priv->extends; } @@ -470,131 +644,139 @@ as_component_add_extends (AsComponent* cpt, const gchar* cpt_id) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - if (priv->extends == NULL) - priv->extends = g_ptr_array_new_with_free_func (g_free); - g_ptr_array_add (priv->extends, g_strdup (cpt_id)); + + if (as_flags_contains (priv->value_flags, AS_VALUE_FLAG_DUPLICATE_CHECK)) { + /* check for duplicates */ + if (as_ptr_array_find_string (priv->extends, cpt_id) != NULL) + return; + } + g_ptr_array_add (priv->extends, + g_strdup (cpt_id)); } /** - * as_component_get_extensions: + * as_component_get_addons: * @cpt: an #AsComponent instance. * - * Returns a string list of IDs of components which + * Returns a list of #AsComponent objects which * are addons extending this component in functionality. * * This is the reverse of %as_component_get_extends() * - * Returns: (element-type utf8) (transfer none): A #GPtrArray or %NULL if not set. + * Returns: (transfer none) (element-type AsComponent): An array of #AsComponent. * * Since: 0.9.2 **/ GPtrArray* -as_component_get_extensions (AsComponent *cpt) +as_component_get_addons (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - if (priv->extensions == NULL) - priv->extensions = g_ptr_array_new_with_free_func (g_free); - return priv->extensions; + return priv->addons; } /** - * as_component_add_extension: + * as_component_add_addon: * @cpt: a #AsComponent instance. - * @cpt_id: The id of a component extending this component. + * @addon: The #AsComponent that extends @cpt * - * Add a reference to the extension enhancing this component. + * Add a reference to the addon that is enhancing this component. * * Since: 0.9.2 **/ void -as_component_add_extension (AsComponent* cpt, const gchar* cpt_id) +as_component_add_addon (AsComponent* cpt, AsComponent *addon) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - if (priv->extensions == NULL) - priv->extensions = g_ptr_array_new_with_free_func (g_free); - g_ptr_array_add (priv->extensions, g_strdup (cpt_id)); + g_ptr_array_add (priv->addons, g_object_ref (addon)); } /** - * as_component_get_bundles_table: + * as_component_get_bundles: * @cpt: a #AsComponent instance. * - * Gets the bundle-ids set for the component. + * Get a list of all software bundles associated with this component. * - * Returns: (transfer none) (element-type AsBundleKind utf8): Bundle ids + * Returns: (transfer none) (element-type AsBundle): A list of #AsBundle. * - * Since: 0.8.0 + * Since: 0.10 **/ -GHashTable* -as_component_get_bundles_table (AsComponent *cpt) +GPtrArray* +as_component_get_bundles (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); return priv->bundles; } /** - * as_component_get_bundle_id: + * as_component_set_bundles_array: + * @cpt: a #AsComponent instance. + * + * Internal helper. + **/ +void +as_component_set_bundles_array (AsComponent *cpt, GPtrArray *bundles) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + g_ptr_array_unref (priv->bundles); + priv->bundles = g_ptr_array_ref (bundles); + as_component_invalidate_data_id (cpt); +} + +/** + * as_component_get_bundle: * @cpt: a #AsComponent instance. * @bundle_kind: the bundle kind, e.g. %AS_BUNDLE_KIND_LIMBA. * * Gets a bundle identifier string. * - * Returns: (nullable): string, or %NULL if unset + * Returns: (transfer none): An #AsBundle, or %NULL if not set. * * Since: 0.8.0 **/ -const gchar* -as_component_get_bundle_id (AsComponent *cpt, AsBundleKind bundle_kind) +AsBundle* +as_component_get_bundle (AsComponent *cpt, AsBundleKind bundle_kind) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - return g_hash_table_lookup (priv->bundles, - GINT_TO_POINTER (bundle_kind)); + guint i; + + for (i = 0; i < priv->bundles->len; i++) { + AsBundle *bundle = AS_BUNDLE (g_ptr_array_index (priv->bundles, i)); + if (as_bundle_get_kind (bundle) == bundle_kind) + return bundle; + } + + return NULL; } /** - * as_component_add_bundle_id: + * as_component_add_bundle: * @cpt: a #AsComponent instance. - * @bundle_kind: the URL kind, e.g. %AS_BUNDLE_KIND_LIMBA - * @id: The bundle identification string + * @bundle: The #AsBundle to add. * - * Adds a bundle identifier to the component. + * Adds a bundle to the component. * * Since: 0.8.0 **/ void -as_component_add_bundle_id (AsComponent *cpt, AsBundleKind bundle_kind, const gchar *id) +as_component_add_bundle (AsComponent *cpt, AsBundle *bundle) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - g_hash_table_insert (priv->bundles, - GINT_TO_POINTER (bundle_kind), - g_strdup (id)); + g_ptr_array_add (priv->bundles, + g_object_ref (bundle)); + as_component_invalidate_data_id (cpt); } /** * as_component_has_bundle: * @cpt: a #AsComponent instance. * - * Returns: %TRUE if this component has a bundle-id associated. + * Returns: %TRUE if this component has a bundle associated. **/ gboolean as_component_has_bundle (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - return g_hash_table_size (priv->bundles) > 0; -} - -/** - * as_component_set_bundles_table: - * @cpt: a #AsComponent instance. - * - * Internal function. - **/ -void -as_component_set_bundles_table (AsComponent *cpt, GHashTable *bundles) -{ - AsComponentPrivate *priv = GET_PRIVATE (cpt); - g_hash_table_unref (priv->bundles); - priv->bundles = g_hash_table_ref (bundles); + return priv->bundles->len > 0; } /** @@ -670,20 +852,44 @@ } /** + * as_component_get_pkgname: + * @cpt: a #AsComponent instance. + * + * Get the first package name of the list of packages that need to be installed + * for this component to be present on the system. + * Since most components consist of only one package, this is safe to use for + * about 90% of all cases. + * + * However, to support a component fully, please use %as_component_get_pkgnames() for + * getting all packages that need to be installed, and use this method only to + * e.g. get the main package to perform a quick "is it installed?" check. + * + * Returns: (transfer none): String array of package names + */ +gchar* +as_component_get_pkgname (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + if ((priv->pkgnames == NULL) || (priv->pkgnames[0] == NULL)) + return NULL; + return priv->pkgnames[0]; +} + +/** * as_component_set_pkgnames: * @cpt: a #AsComponent instance. - * @value: (array zero-terminated=1): + * @packages: (array zero-terminated=1): * * Set a list of package names this component consists of. * (This should usually be just one package name) */ void -as_component_set_pkgnames (AsComponent *cpt, gchar** value) +as_component_set_pkgnames (AsComponent *cpt, gchar **packages) { AsComponentPrivate *priv = GET_PRIVATE (cpt); g_strfreev (priv->pkgnames); - priv->pkgnames = g_strdupv (value); + priv->pkgnames = g_strdupv (packages); g_object_notify ((GObject *) cpt, "pkgnames"); } @@ -718,9 +924,14 @@ * as_component_get_id: * @cpt: a #AsComponent instance. * - * Set the unique identifier for this component. + * Get the unique AppStream identifier for this component. + * This ID is unique for the described component, but does + * not uniquely identify the metadata set. + * + * For a unique ID for this metadata set in the current + * session, use %as_component_get_data_id() * - * Returns: the unique identifier. + * Returns: the unique AppStream identifier. */ const gchar* as_component_get_id (AsComponent *cpt) @@ -734,7 +945,7 @@ * @cpt: a #AsComponent instance. * @value: the unique identifier. * - * Set the unique identifier for this component. + * Set the AppStream identifier for this component. */ void as_component_set_id (AsComponent *cpt, const gchar* value) @@ -744,6 +955,52 @@ g_free (priv->id); priv->id = g_strdup (value); g_object_notify ((GObject *) cpt, "id"); + as_component_invalidate_data_id (cpt); +} + +/** + * as_component_get_data_id: + * @cpt: a #AsComponent instance. + * + * Get a unique identifier for this metadata set. + * This unique ID is only valid for the current session, + * as opposed to the AppStream ID which uniquely identifies + * a software component. + * + * The format of the unique id usually is: + * %{scope}/%{origin}/%{distribution_system}/%{appstream_id} + * + * For example: + * system/os/package/org.example.FooBar + * + * Returns: the unique session-specific identifier. + */ +const gchar* +as_component_get_data_id (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + if (priv->data_id == NULL) + priv->data_id = as_utils_build_data_id_for_cpt (cpt); + return priv->data_id; +} + +/** + * as_component_set_data_id: + * @cpt: a #AsComponent instance. + * @value: the unique session-specific identifier. + * + * Set the session-specific unique metadata identifier for this + * component. + * If two components have a different data_id but the same ID, + * they will be treated as independent sets of metadata describing + * the same component type. + */ +void +as_component_set_data_id (AsComponent *cpt, const gchar* value) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + g_free (priv->data_id); + priv->data_id = g_strdup (value); } /** @@ -754,6 +1011,8 @@ as_component_get_origin (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); + if ((priv->context != NULL) && (priv->origin == NULL)) + return as_context_get_origin (priv->context); return priv->origin; } @@ -768,6 +1027,7 @@ AsComponentPrivate *priv = GET_PRIVATE (cpt); g_free (priv->origin); priv->origin = g_strdup (origin); + as_component_invalidate_data_id (cpt); } /** @@ -780,6 +1040,8 @@ as_component_get_architecture (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); + if ((priv->context != NULL) && (priv->arch == NULL)) + return as_context_get_architecture (priv->context); return priv->arch; } @@ -805,11 +1067,23 @@ * * Returns: the current active locale. */ -gchar* +const gchar* as_component_get_active_locale (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - return priv->active_locale; + const gchar *locale; + + /* return context locale, if the locale isn't explicitly overridden for this component */ + if ((priv->context != NULL) && (priv->active_locale_override == NULL)) { + locale = as_context_get_locale (priv->context); + } else { + locale = priv->active_locale_override; + } + + if (locale == NULL) + return "C"; + else + return locale; } /** @@ -827,8 +1101,8 @@ { AsComponentPrivate *priv = GET_PRIVATE (cpt); - g_free (priv->active_locale); - priv->active_locale = g_strdup (locale); + g_free (priv->active_locale_override); + priv->active_locale_override = g_strdup (locale); } /** @@ -839,16 +1113,23 @@ * Helper function to get a localized property using the current * active locale for this component. */ -static gchar* +static const gchar* as_component_localized_get (AsComponent *cpt, GHashTable *lht) { - gchar *msg; AsComponentPrivate *priv = GET_PRIVATE (cpt); + const gchar *locale; + gchar *msg; - msg = g_hash_table_lookup (lht, priv->active_locale); - if (msg == NULL) { - /* fall back to untranslated / default */ - msg = g_hash_table_lookup (lht, "C"); + locale = as_component_get_active_locale (cpt); + msg = g_hash_table_lookup (lht, locale); + if ((msg == NULL) && (!as_flags_contains (priv->value_flags, AS_VALUE_FLAG_NO_TRANSLATION_FALLBACK))) { + g_autofree gchar *lang = as_utils_locale_to_language (locale); + /* fall back to language string */ + msg = g_hash_table_lookup (lht, lang); + if (msg == NULL) { + /* fall back to untranslated / default */ + msg = g_hash_table_lookup (lht, "C"); + } } return msg; @@ -866,12 +1147,10 @@ static void as_component_localized_set (AsComponent *cpt, GHashTable *lht, const gchar* value, const gchar *locale) { - AsComponentPrivate *priv = GET_PRIVATE (cpt); - /* if no locale was specified, we assume the default locale */ /* CAVE: %NULL does NOT mean lang=C! */ if (locale == NULL) - locale = priv->active_locale; + locale = as_component_get_active_locale (cpt); g_hash_table_insert (lht, as_locale_strip_encoding (g_strdup (locale)), @@ -911,19 +1190,6 @@ } /** - * as_component_get_name_table: - * @cpt: a #AsComponent instance. - * - * Internal method. - */ -GHashTable* -as_component_get_name_table (AsComponent *cpt) -{ - AsComponentPrivate *priv = GET_PRIVATE (cpt); - return priv->name; -} - -/** * as_component_get_summary: * @cpt: a #AsComponent instance. * @@ -956,19 +1222,6 @@ } /** - * as_component_get_summary_table: - * @cpt: a #AsComponent instance. - * - * Internal method. - */ -GHashTable* -as_component_get_summary_table (AsComponent *cpt) -{ - AsComponentPrivate *priv = GET_PRIVATE (cpt); - return priv->summary; -} - -/** * as_component_get_description: * @cpt: a #AsComponent instance. * @@ -1001,19 +1254,6 @@ } /** - * as_component_get_description_table: - * @cpt: a #AsComponent instance. - * - * Internal method. - */ -GHashTable* -as_component_get_description_table (AsComponent *cpt) -{ - AsComponentPrivate *priv = GET_PRIVATE (cpt); - return priv->description; -} - -/** * as_component_get_keywords: * @cpt: a #AsComponent instance. * @@ -1025,7 +1265,7 @@ gchar **strv; AsComponentPrivate *priv = GET_PRIVATE (cpt); - strv = g_hash_table_lookup (priv->keywords, priv->active_locale); + strv = g_hash_table_lookup (priv->keywords, as_component_get_active_locale (cpt)); if (strv == NULL) { /* fall back to untranslated */ strv = g_hash_table_lookup (priv->keywords, "C"); @@ -1049,29 +1289,16 @@ /* if no locale was specified, we assume the default locale */ if (locale == NULL) - locale = priv->active_locale; + locale = as_component_get_active_locale (cpt); g_hash_table_insert (priv->keywords, - g_strdup (locale), - g_strdupv (value)); + g_strdup (locale), + g_strdupv (value)); g_object_notify ((GObject *) cpt, "keywords"); } /** - * as_component_get_keywords_table: - * @cpt: a #AsComponent instance. - * - * Internal method. - */ -GHashTable* -as_component_get_keywords_table (AsComponent *cpt) -{ - AsComponentPrivate *priv = GET_PRIVATE (cpt); - return priv->keywords; -} - -/** * as_component_get_icons: * @cpt: an #AsComponent instance * @@ -1094,21 +1321,30 @@ * The icons are not filtered by type, and the first icon * which matches the size is returned. * If you want more control over which icons you use for displaying, - * use the as_component_get_icons() function to get a list of all icons. + * use the %as_component_get_icons() function to get a list of all icons. + * + * Note that this function is not HiDPI aware! It will never return an icon with + * a scaling factor > 1. * * Returns: (transfer none): An icon matching the given width/height, or %NULL if not found. */ AsIcon* as_component_get_icon_by_size (AsComponent *cpt, guint width, guint height) { - g_autofree gchar *size = NULL; AsComponentPrivate *priv = GET_PRIVATE (cpt); + guint i; - if ((width == 0) && (height == 0)) - return NULL; + for (i = 0; i < priv->icons->len; i++) { + AsIcon *icon = AS_ICON (g_ptr_array_index (priv->icons, i)); + /* ignore scaled icons */ + if (as_icon_get_scale (icon) > 1) + continue; + + if ((as_icon_get_width (icon) == width) && (as_icon_get_height (icon) == height)) + return icon; + } - size = g_strdup_printf ("%ix%i", width, height); - return g_hash_table_lookup (priv->icons_sizetab, size); + return NULL; } /** @@ -1121,23 +1357,17 @@ void as_component_add_icon (AsComponent *cpt, AsIcon *icon) { - gchar *size = NULL; AsComponentPrivate *priv = GET_PRIVATE (cpt); - g_ptr_array_add (priv->icons, g_object_ref (icon)); - size = g_strdup_printf ("%ix%i", - as_icon_get_width (icon), - as_icon_get_height (icon)); - g_hash_table_insert (priv->icons_sizetab, size, icon); } /** * as_component_get_categories: * @cpt: a #AsComponent instance. * - * Returns: (transfer none): String array of categories + * Returns: (transfer none) (element-type utf8): String array of categories */ -gchar** +GPtrArray* as_component_get_categories (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); @@ -1145,62 +1375,70 @@ } /** - * as_component_set_categories: + * as_component_add_category: * @cpt: a #AsComponent instance. - * @value: (array zero-terminated=1): the categories name + * @category: the categories name to add. + * + * Add a category. */ void -as_component_set_categories (AsComponent *cpt, gchar** value) +as_component_add_category (AsComponent *cpt, const gchar *category) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - g_strfreev (priv->categories); - priv->categories = g_strdupv (value); - g_object_notify ((GObject *) cpt, "categories"); + if (as_flags_contains (priv->value_flags, AS_VALUE_FLAG_DUPLICATE_CHECK)) { + /* check for duplicates */ + if (as_ptr_array_find_string (priv->categories, category) != NULL) + return; + } + g_ptr_array_add (priv->categories, + g_strdup (category)); } /** - * as_component_set_categories_from_str: - * @cpt: a valid #AsComponent instance - * @categories_str: Semicolon-separated list of category-names - * - * Set the categories list from a string - */ -void -as_component_set_categories_from_str (AsComponent *cpt, const gchar *categories_str) -{ - gchar** cats = NULL; - - g_return_if_fail (categories_str != NULL); - - cats = g_strsplit (categories_str, ";", 0); - as_component_set_categories (cpt, cats); - g_strfreev (cats); -} - -/** - * as_component_has_category: - * @cpt: an #AsComponent object - * @category: the specified category to check + * as_component_has_category: + * @cpt: an #AsComponent object + * @category: the specified category to check * * Check if component is in the specified category. * * Returns: %TRUE if the component is in the specified category. **/ gboolean -as_component_has_category (AsComponent *cpt, const gchar* category) +as_component_has_category (AsComponent *cpt, const gchar *category) { - gchar **categories; - guint i; AsComponentPrivate *priv = GET_PRIVATE (cpt); + return as_ptr_array_find_string (priv->categories, category) != NULL; +} - categories = priv->categories; - for (i = 0; categories[i] != NULL; i++) { - if (g_strcmp0 (categories[i], category) == 0) - return TRUE; - } +/** + * as_component_get_metadata_license: + * @cpt: a #AsComponent instance. + * + * The license the metadata iself is subjected to. + * + * Returns: the license. + */ +const gchar* +as_component_get_metadata_license (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->metadata_license; +} - return FALSE; +/** + * as_component_set_metadata_license: + * @cpt: a #AsComponent instance. + * @value: the metadata license. + * + * Set the license this metadata is licensed under. + */ +void +as_component_set_metadata_license (AsComponent *cpt, const gchar *value) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + g_free (priv->metadata_license); + priv->metadata_license = g_strdup (value); } /** @@ -1226,7 +1464,7 @@ * Set the project license. */ void -as_component_set_project_license (AsComponent *cpt, const gchar* value) +as_component_set_project_license (AsComponent *cpt, const gchar *value) { AsComponentPrivate *priv = GET_PRIVATE (cpt); @@ -1297,19 +1535,6 @@ } /** - * as_component_get_developer_name_table: - * @cpt: a #AsComponent instance. - * - * Internal method. - */ -GHashTable* -as_component_get_developer_name_table (AsComponent *cpt) -{ - AsComponentPrivate *priv = GET_PRIVATE (cpt); - return priv->developer_name; -} - -/** * as_component_get_screenshots: * @cpt: a #AsComponent instance. * @@ -1321,7 +1546,6 @@ as_component_get_screenshots (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - return priv->screenshots; } @@ -1329,30 +1553,35 @@ * as_component_get_compulsory_for_desktops: * @cpt: a #AsComponent instance. * - * Return value: (transfer none): A list of desktops where this component is compulsory + * Return value: (transfer none) (element-type utf8): A list of desktops where this component is compulsory **/ -gchar ** +GPtrArray* as_component_get_compulsory_for_desktops (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - return priv->compulsory_for_desktops; } /** - * as_component_set_compulsory_for_desktops: + * as_component_set_compulsory_for_desktop: * @cpt: a #AsComponent instance. - * @value: (array zero-terminated=1): the array of desktop ids. + * @desktop: The name of the desktop. * - * Set a list of desktops where this component is compulsory. + * Mark this component to be compulsory for the specified desktop environment. **/ void -as_component_set_compulsory_for_desktops (AsComponent *cpt, gchar** value) +as_component_set_compulsory_for_desktop (AsComponent *cpt, const gchar *desktop) { AsComponentPrivate *priv = GET_PRIVATE (cpt); + g_return_if_fail (desktop != NULL); - g_strfreev (priv->compulsory_for_desktops); - priv->compulsory_for_desktops = g_strdupv (value); + if (as_flags_contains (priv->value_flags, AS_VALUE_FLAG_DUPLICATE_CHECK)) { + /* check for duplicates */ + if (as_ptr_array_find_string (priv->compulsory_for_desktops, desktop) != NULL) + return; + } + g_ptr_array_add (priv->compulsory_for_desktops, + g_strdup (desktop)); } /** @@ -1365,19 +1594,10 @@ * Returns: %TRUE if compulsory, %FALSE otherwise. **/ gboolean -as_component_is_compulsory_for_desktop (AsComponent *cpt, const gchar* desktop) +as_component_is_compulsory_for_desktop (AsComponent *cpt, const gchar *desktop) { - gchar **compulsory_for_desktops; - guint i; AsComponentPrivate *priv = GET_PRIVATE (cpt); - - compulsory_for_desktops = priv->compulsory_for_desktops; - for (i = 0; compulsory_for_desktops[i] != NULL; i++) { - if (g_strcmp0 (compulsory_for_desktops[i], desktop) == 0) - return TRUE; - } - - return FALSE; + return as_ptr_array_find_string (priv->compulsory_for_desktops, desktop) != NULL; } /** @@ -1395,7 +1615,14 @@ as_component_get_provided_for_kind (AsComponent *cpt, AsProvidedKind kind) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - return AS_PROVIDED (g_hash_table_lookup (priv->provided, GINT_TO_POINTER (kind))); + guint i; + + for (i = 0; i < priv->provided->len; i++) { + AsProvided *prov = AS_PROVIDED (g_ptr_array_index (priv->provided, i)); + if (as_provided_get_kind (prov) == kind) + return prov; + } + return NULL; } /** @@ -1404,13 +1631,13 @@ * * Get a list of #AsProvided objects associated with this component. * - * Returns: (transfer container) (element-type AsProvided): A list of #AsProvided objects. + * Returns: (transfer none) (element-type AsProvided): A list of #AsProvided objects. **/ -GList* +GPtrArray* as_component_get_provided (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - return g_hash_table_get_values (priv->provided); + return priv->provided; } /** @@ -1426,9 +1653,23 @@ as_component_add_provided (AsComponent *cpt, AsProvided *prov) { AsComponentPrivate *priv = GET_PRIVATE (cpt); - g_hash_table_insert (priv->provided, - GINT_TO_POINTER (as_provided_get_kind (prov)), - g_object_ref (prov)); + + if (as_flags_contains (priv->value_flags, AS_VALUE_FLAG_DUPLICATE_CHECK)) { + guint i; + for (i = 0; i < priv->provided->len; i++) { + AsProvided *eprov = AS_PROVIDED (g_ptr_array_index (priv->provided, i)); + if (as_provided_get_kind (prov) == as_provided_get_kind (eprov)) { + /* replace existing entry */ + g_ptr_array_remove_index (priv->provided, i); + g_ptr_array_add (priv->provided, + g_object_ref (prov)); + return; + } + } + } + + g_ptr_array_add (priv->provided, + g_object_ref (prov)); } /** @@ -1439,7 +1680,7 @@ * * Adds a provided item to the component. * - * Internal function for use by the metadata reading classes. + * Internal convenience function for use by the metadata reading classes. **/ void as_component_add_provided_item (AsComponent *cpt, AsProvidedKind kind, const gchar *item) @@ -1455,27 +1696,74 @@ if (prov == NULL) { prov = as_provided_new (); as_provided_set_kind (prov, kind); - g_hash_table_insert (priv->provided, GINT_TO_POINTER (kind), prov); + g_ptr_array_add (priv->provided, prov); } as_provided_add_item (prov, item); } /** - * as_component_get_releases: + * as_component_add_suggested: * @cpt: a #AsComponent instance. + * @suggested: The #AsSuggested * - * Get an array of the #AsRelease items this component - * provides. - * - * Return value: (element-type AsRelease) (transfer none): A list of releases + * Add an #AsSuggested to this component. **/ +void +as_component_add_suggested (AsComponent *cpt, AsSuggested *suggested) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + g_ptr_array_add (priv->suggestions, + g_object_ref (suggested)); +} + +/** + * as_component_get_suggested: + * @cpt: a #AsComponent instance. + * + * Get a list of associated suggestions. + * + * Returns: (transfer none) (element-type AsSuggested): an array of #AsSuggested instances + */ GPtrArray* -as_component_get_releases (AsComponent *cpt) +as_component_get_suggested (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->suggestions; +} - return priv->releases; +/** + * as_component_get_merge_kind: + * @cpt: a #AsComponent instance. + * + * Get the merge method which should apply to duplicate components + * with this ID. + * + * Returns: the #AsMergeKind of this component. + * + * Since: 0.9.8 + */ +AsMergeKind +as_component_get_merge_kind (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->merge_kind; +} + +/** + * as_component_set_merge_kind: + * @cpt: a #AsComponent instance. + * @kind: the #AsMergeKind. + * + * Sets the #AsMergeKind for this component. + * + * Since: 0.9.8 + */ +void +as_component_set_merge_kind (AsComponent *cpt, AsMergeKind kind) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + priv->merge_kind = kind; } /** @@ -1487,7 +1775,7 @@ * * Since: 0.6.1 */ -int +gint as_component_get_priority (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); @@ -1505,13 +1793,44 @@ * Since: 0.6.1 */ void -as_component_set_priority (AsComponent *cpt, int priority) +as_component_set_priority (AsComponent *cpt, gint priority) { AsComponentPrivate *priv = GET_PRIVATE (cpt); priv->priority = priority; } /** + * as_component_get_sort_score: + * @cpt: a #AsComponent instance. + * + * Returns the sorting priority of this component. + * + * Since: 0.9.8 + */ +guint +as_component_get_sort_score (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->sort_score; +} + +/** + * as_component_set_sort_score: + * @cpt: a #AsComponent instance. + * @score: the given sorting score + * + * Sets the sorting score of this component. + * + * Since: 0.9.8 + */ +void +as_component_set_sort_score (AsComponent *cpt, guint score) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + priv->sort_score = score; +} + +/** * as_component_add_language: * @cpt: an #AsComponent instance. * @locale: (nullable): the locale, or %NULL. e.g. "en_GB" @@ -1578,7 +1897,7 @@ } /** - * as_component_get_languages_map: + * as_component_get_languages_table: * @cpt: an #AsComponent instance. * * Get a HashMap mapping languages to their completion percentage @@ -1588,7 +1907,7 @@ * Since: 0.7.0 **/ GHashTable* -as_component_get_languages_map (AsComponent *cpt) +as_component_get_languages_table (AsComponent *cpt) { AsComponentPrivate *priv = GET_PRIVATE (cpt); return priv->languages; @@ -1637,6 +1956,64 @@ } /** + * as_component_get_scope: + * @cpt: a #AsComponent instance. + * + * Returns: the #AsComponentScope of this component. + * + * Since: 0.10.2 + */ +AsComponentScope +as_component_get_scope (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->scope; +} + +/** + * as_component_set_scope: + * @cpt: a #AsComponent instance. + * @scope: the #AsComponentKind. + * + * Sets the #AsComponentScope of this component. + */ +void +as_component_set_scope (AsComponent *cpt, AsComponentScope scope) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + priv->scope = scope; +} + +/** + * as_component_get_origin_kind: + * @cpt: a #AsComponent instance. + * + * Returns: the #AsOriginKind of this component. + * + * Since: 0.10.2 + */ +AsOriginKind +as_component_get_origin_kind (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->origin_kind; +} + +/** + * as_component_set_origin_kind: + * @cpt: a #AsComponent instance. + * @okind: the #AsOriginKind. + * + * Sets the #AsOriginKind of this component. + */ +void +as_component_set_origin_kind (AsComponent *cpt, AsOriginKind okind) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + priv->origin_kind = okind; +} + +/** * as_component_add_icon_full: * * Internal helper function for as_component_refine_icons() @@ -1672,91 +2049,120 @@ * a component are properly set, by finding the icons in default directories. */ static void -as_component_refine_icons (AsComponent *cpt, gchar **icon_paths) +as_component_refine_icons (AsComponent *cpt, GPtrArray *icon_paths) { - const gchar *exensions[] = { "png", - "svg", - "svgz", - "gif", - "ico", - "xcf", - NULL }; + const gchar *extensions[] = { "png", + "svg", + "svgz", + "gif", + "ico", + "xcf", + NULL }; const gchar *sizes[] = { "", "64x64", "128x128", NULL }; - gchar *tmp_icon_path = NULL; - const gchar *icon_url = NULL; + const gchar *icon_fname = NULL; + const gchar *origin; guint i, j, k, l; g_autoptr(GPtrArray) icons = NULL; - g_autoptr(GHashTable) icons_sizetab = NULL; AsComponentPrivate *priv = GET_PRIVATE (cpt); if (priv->icons->len == 0) return; - /* take control of the old icon list and hashtable and rewrite it */ + /* take control of the old icon list and rewrite it */ icons = priv->icons; - icons_sizetab = priv->icons_sizetab; priv->icons = g_ptr_array_new_with_free_func (g_object_unref); - priv->icons_sizetab = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + + origin = as_component_get_origin (cpt); /* Process the icons we have and extract sizes */ for (i = 0; i < icons->len; i++) { + AsIconKind ikind; AsIcon *icon = AS_ICON (g_ptr_array_index (icons, i)); - /* we can't do anything about remote icons (yet?), so just don't do anything to them */ - if (as_icon_get_kind (icon) == AS_ICON_KIND_REMOTE) { + ikind = as_icon_get_kind (icon); + if (ikind == AS_ICON_KIND_REMOTE) { + /* no processing / icon-search is needed (and possible) for remote icons */ + as_component_add_icon (cpt, icon); + continue; + } else if (ikind == AS_ICON_KIND_STOCK) { + /* since AppStream 0.9, we are not expected to find stock icon names in cache + * directories anymore, so we can just add it without changes */ as_component_add_icon (cpt, icon); continue; } - /* get some icon name we want to resolve */ - if (as_icon_get_kind (icon) == AS_ICON_KIND_CACHED) - icon_url = as_icon_get_filename (icon); - if (as_icon_get_kind (icon) == AS_ICON_KIND_STOCK) - icon_url = as_icon_get_name (icon); - - if (g_str_has_prefix (icon_url, "/") || - g_str_has_prefix (icon_url, "http://")) { - /* looks like this component already has a full icon path, - * or is a weblink. */ + if ((ikind != AS_ICON_KIND_CACHED) && (ikind != AS_ICON_KIND_LOCAL)) { + g_warning ("Found icon of unknown type, skipping it: %s", as_icon_kind_to_string (ikind)); + continue; + } + + /* get icon name we want to resolve + * (it's "filename", because we should only get here if we have + * a CACHED or LOCAL icon) */ + icon_fname = as_icon_get_filename (icon); + + if (g_str_has_prefix (icon_fname, "/")) { + /* looks like this component already has a full icon path */ as_component_add_icon (cpt, icon); + + /* assume 64x64px icon, if not defined otherwise */ + if ((as_icon_get_width (icon) == 0) && (as_icon_get_height (icon) == 0)) { + as_icon_set_width (icon, 64); + as_icon_set_height (icon, 64); + } + continue; } /* skip the full cache search if we already have size information */ - if (as_icon_get_kind (icon) == AS_ICON_KIND_CACHED) { - if (as_icon_get_width (icon) > 0) { - gboolean icon_found = FALSE; - - for (l = 0; icon_paths[l] != NULL; l++) { - tmp_icon_path = g_strdup_printf ("%s/%s/%ix%i/%s", - icon_paths[l], - priv->origin, - as_icon_get_width (icon), - as_icon_get_height (icon), - icon_url); - if (g_file_test (tmp_icon_path, G_FILE_TEST_EXISTS)) { - as_icon_set_filename (icon, tmp_icon_path); - as_component_add_icon (cpt, icon); - icon_found = TRUE; - } - g_free (tmp_icon_path); - if (icon_found) - break; + if ((ikind == AS_ICON_KIND_CACHED) && (as_icon_get_width (icon) > 0)) { + for (l = 0; l < icon_paths->len; l++) { + g_autofree gchar *tmp_icon_path_wh = NULL; + const gchar *icon_path = (const gchar*) g_ptr_array_index (icon_paths, l); + + if (as_icon_get_scale (icon) <= 1) { + tmp_icon_path_wh = g_strdup_printf ("%s/%s/%ix%i/%s", + icon_path, + origin, + as_icon_get_width (icon), + as_icon_get_height (icon), + icon_fname); + } else { + tmp_icon_path_wh = g_strdup_printf ("%s/%s/%ix%i@%i/%s", + icon_path, + origin, + as_icon_get_width (icon), + as_icon_get_height (icon), + as_icon_get_scale (icon), + icon_fname); + } + + if (g_file_test (tmp_icon_path_wh, G_FILE_TEST_EXISTS)) { + as_icon_set_filename (icon, tmp_icon_path_wh); + as_component_add_icon (cpt, icon); + break; } - if (icon_found) - continue; } + + /* we don't need a full search anymore - the icon having size information means that + * it will be in the "origin" subdirectory with the appropriate size, so there is no + * reason to start a big icon-hunt */ + continue; } /* search local icon path */ - for (l = 0; icon_paths[l] != NULL; l++) { + for (l = 0; l < icon_paths->len; l++) { + const gchar *icon_path = (const gchar*) g_ptr_array_index (icon_paths, l); + for (j = 0; sizes[j] != NULL; j++) { + g_autofree gchar *tmp_icon_path = NULL; /* sometimes, the file already has an extension */ tmp_icon_path = g_strdup_printf ("%s/%s/%s/%s", - icon_paths[l], - priv->origin, + icon_path, + origin, sizes[j], - icon_url); + icon_fname); + if (g_file_test (tmp_icon_path, G_FILE_TEST_EXISTS)) { /* we have an icon! */ if (g_strcmp0 (sizes[j], "") == 0) { @@ -1771,55 +2177,45 @@ sizes[j], tmp_icon_path); } - - g_free (tmp_icon_path); - tmp_icon_path = NULL; continue; } - g_free (tmp_icon_path); - tmp_icon_path = NULL; /* file not found, try extensions (we will not do this forever, better fix AppStream data!) */ - for (k = 0; exensions[k] != NULL; k++) { - tmp_icon_path = g_strdup_printf ("%s/%s/%s/%s.%s", - icon_paths[l], - priv->origin, + for (k = 0; extensions[k] != NULL; k++) { + g_autofree gchar *tmp_icon_path_ext = NULL; + tmp_icon_path_ext = g_strdup_printf ("%s/%s/%s/%s.%s", + icon_path, + origin, sizes[j], - icon_url, - exensions[k]); - if (g_file_test (tmp_icon_path, G_FILE_TEST_EXISTS)) { + icon_fname, + extensions[k]); + + if (g_file_test (tmp_icon_path_ext, G_FILE_TEST_EXISTS)) { /* we have an icon! */ if (g_strcmp0 (sizes[j], "") == 0) { /* old icon directory, so assume 64x64 */ as_component_add_icon_full (cpt, as_icon_get_kind (icon), "64x64", - tmp_icon_path); + tmp_icon_path_ext); } else { as_component_add_icon_full (cpt, as_icon_get_kind (icon), sizes[j], - tmp_icon_path); + tmp_icon_path_ext); } } - - g_free (tmp_icon_path); - tmp_icon_path = NULL; } } } } - - if (tmp_icon_path != NULL) { - g_free (tmp_icon_path); - } } /** * as_component_complete: * @cpt: a #AsComponent instance. - * @scr_base_url: Base url for screenshot-service, obtain via #AsDistroDetails - * @icon_paths: Zero-terminated string array of possible (cached) icon locations + * @scr_service_url: Base url for screenshot-service, obtain via #AsDistroDetails + * @icon_paths: String array of possible (cached) icon locations * * Private function to complete a AsComponent with * additional data found on the system. @@ -1827,17 +2223,34 @@ * INTERNAL */ void -as_component_complete (AsComponent *cpt, gchar *scr_base_url, gchar **icon_paths) +as_component_complete (AsComponent *cpt, gchar *scr_service_url, GPtrArray *icon_paths) { AsComponentPrivate *priv = GET_PRIVATE (cpt); + /* improve icon paths */ + as_component_refine_icons (cpt, icon_paths); + + /* "fake" a launchable entry for desktop-apps that failed to include one. This is used for legacy compatibility */ + if ((priv->kind == AS_COMPONENT_KIND_DESKTOP_APP) && (priv->launchables->len <= 0)) { + if (g_str_has_suffix (priv->id, ".desktop")) { + g_autoptr(AsLaunchable) launchable = as_launchable_new (); + as_launchable_set_kind (launchable, AS_LAUNCHABLE_KIND_DESKTOP_ID); + as_launchable_add_entry (launchable, priv->id); + as_component_add_launchable (cpt, launchable); + } + } + + /* if there is no screenshot service URL, there is nothing left to do for us */ + if (scr_service_url == NULL) + return; + /* we want screenshot data from 3rd-party screenshot servers, if the component doesn't have screenshots defined already */ if ((priv->screenshots->len == 0) && (as_component_has_package (cpt))) { gchar *url; AsImage *img; - AsScreenshot *sshot; + g_autoptr(AsScreenshot) sshot = NULL; - url = g_build_filename (scr_base_url, "screenshot", priv->pkgnames[0], NULL); + url = g_build_filename (scr_service_url, "screenshot", priv->pkgnames[0], NULL); /* screenshots.debian.net-like services dont specify a size, so we choose the default sizes * (800x600 for source-type images, 160x120 for thumbnails) @@ -1853,7 +2266,7 @@ sshot = as_screenshot_new (); /* propagate locale */ - as_screenshot_set_active_locale (sshot, priv->active_locale); + as_screenshot_set_active_locale (sshot, as_component_get_active_locale (cpt)); as_screenshot_add_image (sshot, img); as_screenshot_set_kind (sshot, AS_SCREENSHOT_KIND_DEFAULT); @@ -1862,7 +2275,7 @@ g_free (url); /* add thumbnail */ - url = g_build_filename (scr_base_url, "thumbnail", priv->pkgnames[0], NULL); + url = g_build_filename (scr_service_url, "thumbnail", priv->pkgnames[0], NULL); img = as_image_new (); as_image_set_url (img, url); as_image_set_width (img, 160); @@ -1874,79 +2287,3461 @@ as_component_add_screenshot (cpt, sshot); g_object_unref (img); - g_object_unref (sshot); g_free (url); } - - /* improve icon paths */ - as_component_refine_icons (cpt, icon_paths); } /** - * as_component_get_property: + * as_component_add_token_helper: */ static void -as_component_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) +as_component_add_token_helper (AsComponent *cpt, + const gchar *value, + AsTokenMatch match_flag, + AsStemmer *stemmer) { - AsComponent *cpt; - cpt = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_COMPONENT, AsComponent); - switch (property_id) { - case AS_COMPONENT_KIND: - g_value_set_enum (value, as_component_get_kind (cpt)); - break; - case AS_COMPONENT_PKGNAMES: - g_value_set_boxed (value, as_component_get_pkgnames (cpt)); - break; - case AS_COMPONENT_ID: - g_value_set_string (value, as_component_get_id (cpt)); - break; - case AS_COMPONENT_NAME: - g_value_set_string (value, as_component_get_name (cpt)); - break; - case AS_COMPONENT_SUMMARY: - g_value_set_string (value, as_component_get_summary (cpt)); - break; - case AS_COMPONENT_DESCRIPTION: - g_value_set_string (value, as_component_get_description (cpt)); - break; - case AS_COMPONENT_KEYWORDS: - g_value_set_boxed (value, as_component_get_keywords (cpt)); - break; - case AS_COMPONENT_ICONS: - g_value_set_pointer (value, as_component_get_icons (cpt)); - break; - case AS_COMPONENT_URLS: - g_value_set_boxed (value, as_component_get_urls_table (cpt)); - break; - case AS_COMPONENT_CATEGORIES: - g_value_set_boxed (value, as_component_get_categories (cpt)); - break; - case AS_COMPONENT_PROJECT_LICENSE: - g_value_set_string (value, as_component_get_project_license (cpt)); - break; - case AS_COMPONENT_PROJECT_GROUP: - g_value_set_string (value, as_component_get_project_group (cpt)); - break; - case AS_COMPONENT_DEVELOPER_NAME: - g_value_set_string (value, as_component_get_developer_name (cpt)); - break; - case AS_COMPONENT_SCREENSHOTS: - g_value_set_boxed (value, as_component_get_screenshots (cpt)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; + AsComponentPrivate *priv = GET_PRIVATE (cpt); + AsTokenType *match_pval; + g_autofree gchar *token_stemmed = NULL; + + /* invalid */ + if (!as_utils_search_token_valid (value)) + return; + + /* create a stemmed version of our token */ + token_stemmed = as_stemmer_stem (stemmer, value); + + /* does the token already exist */ + match_pval = g_hash_table_lookup (priv->token_cache, token_stemmed); + if (match_pval != NULL) { + *match_pval |= match_flag; + return; } + + /* create and add */ + match_pval = g_new0 (AsTokenType, 1); + *match_pval = match_flag; + g_hash_table_insert (priv->token_cache, + g_steal_pointer (&token_stemmed), + match_pval); } /** - * as_component_set_property: + * as_component_add_token: */ static void -as_component_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) +as_component_add_token (AsComponent *cpt, + const gchar *value, + gboolean allow_split, + AsTokenMatch match_flag) +{ + g_autoptr(AsStemmer) stemmer = NULL; + + stemmer = g_object_ref (as_stemmer_get ()); + + /* add extra tokens for names like x-plane or half-life */ + if (allow_split && g_strstr_len (value, -1, "-") != NULL) { + guint i; + g_auto(GStrv) split = g_strsplit (value, "-", -1); + for (i = 0; split[i] != NULL; i++) + as_component_add_token_helper (cpt, split[i], match_flag, stemmer); + } + + /* add the whole token always, even when we split on hyphen */ + as_component_add_token_helper (cpt, value, match_flag, stemmer); +} + +/** + * as_component_value_tokenize: + * + * Split a component value string into tokens. + */ +static gboolean +as_component_value_tokenize (AsComponent *cpt, const gchar *value, gchar ***tokens_utf8, gchar ***tokens_ascii) { - AsComponent *cpt; - cpt = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_COMPONENT, AsComponent); + /* tokenize with UTF-8 fallbacks */ + if (g_strstr_len (value, -1, "+") == NULL && + g_strstr_len (value, -1, "-") == NULL) { + (*tokens_utf8) = g_str_tokenize_and_fold (value, + as_component_get_active_locale (cpt), + tokens_ascii); + } + + /* we might still be able to extract tokens if g_str_tokenize_and_fold() can't do it or +/- were found */ + if ((*tokens_utf8) == NULL) { + g_autofree gchar *delim = NULL; + delim = g_utf8_strdown (value, -1); + g_strdelimit (delim, "/,.;:", ' '); + (*tokens_utf8) = g_strsplit (delim, " ", -1); + } + + if (tokens_ascii == NULL) + return (*tokens_utf8) != NULL; + else + return ((*tokens_utf8) != NULL) || ((*tokens_ascii) != NULL); +} + +/** + * as_component_add_tokens: + */ +static void +as_component_add_tokens (AsComponent *cpt, + const gchar *value, + gboolean allow_split, + AsTokenMatch match_flag) +{ + guint i; + g_auto(GStrv) values_utf8 = NULL; + g_auto(GStrv) values_ascii = NULL; + + /* sanity check */ + if (value == NULL) { + g_critical ("trying to add NULL search token to %s", + as_component_get_id (cpt)); + return; + } + + /* create a set of tokens from the value string */ + if (!as_component_value_tokenize (cpt, value, &values_utf8, &values_ascii)) + return; + + /* add each token */ + for (i = 0; values_utf8 != NULL && values_utf8[i] != NULL; i++) + as_component_add_token (cpt, values_utf8[i], allow_split, match_flag); + for (i = 0; values_ascii != NULL && values_ascii[i] != NULL; i++) + as_component_add_token (cpt, values_ascii[i], allow_split, match_flag); +} + +/** + * as_component_create_token_cache_target: + */ +static void +as_component_create_token_cache_target (AsComponent *cpt, AsComponent *donor) +{ + AsComponentPrivate *priv = GET_PRIVATE (donor); + const gchar *tmp; + gchar **keywords; + AsProvided *prov; + guint i; + + /* tokenize all the data we have */ + if (priv->id != NULL) { + as_component_add_token (cpt, priv->id, FALSE, + AS_TOKEN_MATCH_ID); + } + + tmp = as_component_get_name (cpt); + if (tmp != NULL) { + as_component_add_tokens (cpt, tmp, TRUE, AS_TOKEN_MATCH_NAME); + } + + tmp = as_component_get_summary (cpt); + if (tmp != NULL) { + as_component_add_tokens (cpt, tmp, TRUE, AS_TOKEN_MATCH_SUMMARY); + } + + tmp = as_component_get_description (cpt); + if (tmp != NULL) { + as_component_add_tokens (cpt, tmp, FALSE, AS_TOKEN_MATCH_DESCRIPTION); + } + + keywords = as_component_get_keywords (cpt); + if (keywords != NULL) { + for (i = 0; keywords[i] != NULL; i++) + as_component_add_tokens (cpt, keywords[i], FALSE, AS_TOKEN_MATCH_KEYWORD); + } + + prov = as_component_get_provided_for_kind (donor, AS_PROVIDED_KIND_MIMETYPE); + if (prov != NULL) { + GPtrArray *items = as_provided_get_items (prov); + for (i = 0; i < items->len; i++) + as_component_add_token (cpt, + (const gchar*) g_ptr_array_index (items, i), + FALSE, + AS_TOKEN_MATCH_MIMETYPE); + } + + if (priv->pkgnames != NULL) { + for (i = 0; priv->pkgnames[i] != NULL; i++) + as_component_add_token (cpt, priv->pkgnames[i], FALSE, AS_TOKEN_MATCH_PKGNAME); + } +} + +/** + * as_component_create_token_cache: + */ +void +as_component_create_token_cache (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + guint i; + + as_component_create_token_cache_target (cpt, cpt); + + for (i = 0; i < priv->addons->len; i++) { + AsComponent *donor = g_ptr_array_index (priv->addons, i); + as_component_create_token_cache_target (cpt, donor); + } +} + +/** + * as_component_search_matches: + * @cpt: a #AsComponent instance. + * @term: the search term. + * + * Searches component data for a specific keyword. + * + * Returns: a match scrore, where 0 is no match and 100 is the best match. + * + * Since: 0.9.7 + **/ +guint +as_component_search_matches (AsComponent *cpt, const gchar *term) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + AsTokenType *match_pval; + GList *l; + AsTokenMatch result = 0; + g_autoptr(GList) keys = NULL; + + /* nothing to do */ + if (term == NULL) + return 0; + + /* ensure the token cache is created */ + if (g_once_init_enter (&priv->token_cache_valid)) { + as_component_create_token_cache (cpt); + g_once_init_leave (&priv->token_cache_valid, TRUE); + } + + /* find the exact match (which is more awesome than a partial match) */ + match_pval = g_hash_table_lookup (priv->token_cache, term); + if (match_pval != NULL) + return *match_pval << 2; + + /* need to do partial match */ + keys = g_hash_table_get_keys (priv->token_cache); + for (l = keys; l != NULL; l = l->next) { + const gchar *key = l->data; + if (g_str_has_prefix (key, term)) { + match_pval = g_hash_table_lookup (priv->token_cache, key); + result |= *match_pval; + } + } + + return result; +} + +/** + * as_component_search_matches_all: + * @cpt: a #AsComponent instance. + * @terms: the search terms. + * + * Searches component data for all the specific keywords. + * + * Returns: a match score, where 0 is no match and larger numbers are better + * matches. + * + * Since: 0.9.8 + */ +guint +as_component_search_matches_all (AsComponent *cpt, gchar **terms) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + guint i; + guint matches_sum = 0; + guint tmp; + + priv->sort_score = 0; + if (terms == NULL) { + /* if the terms list is NULL, we usually had a too short search term when + * tokenizing the search string. In any case, we treat NULL as match-all + * value. + * (users will see a full list of all entries that way, which they will + * recognize as hint to make their search more narrow) */ + priv->sort_score = 1; + return priv->sort_score; + } + + /* do *all* search keywords match */ + for (i = 0; terms[i] != NULL; i++) { + tmp = as_component_search_matches (cpt, terms[i]); + if (tmp == 0) + return 0; + matches_sum |= tmp; + } + + priv->sort_score = matches_sum; + return priv->sort_score; +} + +/** + * as_component_get_search_tokens: + * @cpt: a #AsComponent instance. + * + * Returns all search tokens for this component. + * + * Returns: (transfer container) (element-type utf8): The string search tokens + * + * Since: 0.9.7 + */ +GPtrArray* +as_component_get_search_tokens (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + GList *l; + GPtrArray *array; + g_autoptr(GList) keys = NULL; + + /* ensure the token cache is created */ + if (g_once_init_enter (&priv->token_cache_valid)) { + as_component_create_token_cache (cpt); + g_once_init_leave (&priv->token_cache_valid, TRUE); + } + + /* return all the token cache */ + keys = g_hash_table_get_keys (priv->token_cache); + array = g_ptr_array_new_with_free_func (g_free); + for (l = keys; l != NULL; l = l->next) + g_ptr_array_add (array, g_strdup (l->data)); + + return array; +} + +/** + * as_component_get_token_cache_table: + * @cpt: a #AsComponent instance. + * + * Get the raw token table. + * + * This is internal API. + **/ +GHashTable* +as_component_get_token_cache_table (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->token_cache; +} + +/** + * as_component_set_token_cache_valid: + * @cpt: a #AsComponent instance. + * @valid: Whether the token cache is considered to be valid. + * + * This is internal API. + **/ +void +as_component_set_token_cache_valid (AsComponent *cpt, gboolean valid) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + priv->token_cache_valid = valid; +} + +/** + * as_component_set_value_flags: + * @cpt: a #AsComponent instance. + * @flags: #AsValueFlags to set on @cpt. + * + */ +void +as_component_set_value_flags (AsComponent *cpt, AsValueFlags flags) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + priv->value_flags = flags; +} + +/** + * as_component_get_value_flags: + * @cpt: a #AsComponent instance. + * + * Returns: The #AsValueFlags that are set on @cpt. + * + */ +AsValueFlags +as_component_get_value_flags (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->value_flags; +} + +/** + * as_component_has_desktop_group: + * + * Internal helper method for %as_component_is_member_of_category + */ +static gboolean +as_component_has_desktop_group (AsComponent *cpt, const gchar *desktop_group) +{ + guint i; + g_auto(GStrv) split = g_strsplit (desktop_group, "::", -1); + for (i = 0; split[i] != NULL; i++) { + if (!as_component_has_category (cpt, split[i])) + return FALSE; + } + return TRUE; +} + +/** + * as_component_is_member_of_category: + * @cpt: a #AsComponent instance. + * @category: The category to test. + * + * Test if the component @cpt is a member of category @category. + */ +gboolean +as_component_is_member_of_category (AsComponent *cpt, AsCategory *category) +{ + GPtrArray *cdesktop_groups; + guint i; + + cdesktop_groups = as_category_get_desktop_groups (category); + for (i = 0; i < cdesktop_groups->len; i++) { + const gchar *cdg_name = (const gchar*) g_ptr_array_index (cdesktop_groups, i); + if (as_component_has_desktop_group (cpt, cdg_name)) + return TRUE; + } + + return FALSE; +} + +/** + * as_component_set_ignored: + * @cpt: a #AsComponent instance. + * @ignore: %TRUE if the metadata in @cpt should be ignored. + * + * Since: 0.10.2 + */ +void +as_component_set_ignored (AsComponent *cpt, gboolean ignore) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + priv->ignored = ignore; +} + +/** + * as_component_is_ignored: + * @cpt: a #AsComponent instance. + * + * Returns: Whether this component's metadata should be ignored. + * + * Since: 0.10.2 + */ +gboolean +as_component_is_ignored (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->ignored; +} + +/** + * as_component_get_custom: + * @cpt: An #AsComponent. + * + * Returns: (transfer none): Hash table of custom user defined data fields. + * + * Since: 0.10.5 + */ +GHashTable* +as_component_get_custom (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->custom; +} + +/** + * as_component_get_custom_value: + * @cpt: An #AsComponent. + * @key: Field name. + * + * Retrieve value for a custom data entry with the given key. + * + * Since: 0.10.5 + */ +gchar* +as_component_get_custom_value (AsComponent *cpt, const gchar *key) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + if (key == NULL) + return NULL; + return g_hash_table_lookup (priv->custom, key); +} + +/** + * as_component_insert_custom_value: + * @cpt: An #AsComponent. + * @key: Key name. + * @value: A string value. + * + * Add a key and value pair to the custom data table. + * + * Returns: %TRUE if the key did not exist yet. + * + * Since: 0.10.5 + */ +gboolean +as_component_insert_custom_value (AsComponent *cpt, const gchar *key, const gchar *value) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + if (key == NULL) + return FALSE; + return g_hash_table_insert (priv->custom, + g_strdup (key), + g_strdup (value)); +} + +/** + * as_component_get_content_ratings: + * @cpt: a #AsComponent instance. + * + * Gets all content ratings defined for this software. + * + * Returns: (element-type AsContentRating) (transfer none): an array + * + * Since: 0.11.0 + **/ +GPtrArray* +as_component_get_content_ratings (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->content_ratings; +} + +/** + * as_component_get_content_rating: + * @cpt: a #AsComponent instance. + * @kind: a ratings kind, e.g. "oars-1.0" + * + * Gets a content ratings of a specific type that are defined for this component. + * + * Returns: (transfer none): a #AsContentRating or %NULL if not found + * + * Since: 0.11.0 + **/ +AsContentRating* +as_component_get_content_rating (AsComponent *cpt, const gchar *kind) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + guint i; + + for (i = 0; i < priv->content_ratings->len; i++) { + AsContentRating *content_rating = AS_CONTENT_RATING (g_ptr_array_index (priv->content_ratings, i)); + if (g_strcmp0 (as_content_rating_get_kind (content_rating), kind) == 0) + return content_rating; + } + return NULL; +} + +/** + * as_component_add_content_rating: + * @cpt: a #AsComponent instance. + * @content_rating: a #AsContentRating instance. + * + * Adds a content rating to this component. + * + * Since: 0.11.0 + **/ +void +as_component_add_content_rating (AsComponent *cpt, AsContentRating *content_rating) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + g_ptr_array_add (priv->content_ratings, + g_object_ref (content_rating)); +} + +/** + * as_component_get_launchable: + * @cpt: a #AsComponent instance. + * @kind: a launch kind, e.g. %AS_LAUNCHABLE_KIND_DESKTOP_ID + * + * Gets a #AsLaunchable of a specific type that contains launchable entries for + * this component. + * + * Returns: (transfer none): a #AsLaunchable or %NULL if not found + * + * Since: 0.11.0 + **/ +AsLaunchable* +as_component_get_launchable (AsComponent *cpt, AsLaunchableKind kind) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + guint i; + + for (i = 0; i < priv->launchables->len; i++) { + AsLaunchable *launch = AS_LAUNCHABLE (g_ptr_array_index (priv->launchables, i)); + if (as_launchable_get_kind (launch) == kind) + return launch; + } + return NULL; +} + +/** + * as_component_get_launchables: + * @cpt: a #AsComponent instance. + * + * Returns: (transfer none) (element-type AsLaunchable): an array + * + * Since: 0.11.0 + **/ +GPtrArray* +as_component_get_launchables (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->launchables; +} + +/** + * as_component_add_launchable: + * @cpt: a #AsComponent instance. + * @launchable: a #AsLaunchable instance. + * + * Adds a #AsLaunchable containing launchables entries for this component. + * + * Since: 0.11.0 + **/ +void +as_component_add_launchable (AsComponent *cpt, AsLaunchable *launchable) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + g_ptr_array_add (priv->launchables, + g_object_ref (launchable)); +} + +/** + * as_component_get_recommends: + * @cpt: a #AsComponent instance. + * + * Get an array of items that are recommended by this component. + * + * Returns: (transfer none) (element-type AsRelation): an array + * + * Since: 0.12.0 + **/ +GPtrArray* +as_component_get_recommends (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->recommends; +} + +/** + * as_component_get_requires: + * @cpt: a #AsComponent instance. + * + * Get an array of items that are required by this component. + * + * Returns: (transfer none) (element-type AsRelation): an array + * + * Since: 0.12.0 + **/ +GPtrArray* +as_component_get_requires (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->requires; +} + +/** + * as_component_add_relation: + * @cpt: a #AsComponent instance. + * @relation: a #AsRelation instance. + * + * Adds a #AsRelation to set a recommends or requires relation of + * component @cpt on the item mentioned in the #AsRelation. + * + * Since: 0.12.0 + **/ +void +as_component_add_relation (AsComponent *cpt, AsRelation *relation) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + AsRelationKind kind = as_relation_get_kind (relation); + + if (kind == AS_RELATION_KIND_RECOMMENDS) { + g_ptr_array_add (priv->recommends, + g_object_ref (relation)); + } else if (kind == AS_RELATION_KIND_REQUIRES) { + g_ptr_array_add (priv->requires, + g_object_ref (relation)); + } else { + g_warning ("Tried to add relation of unknown kind to component %s", priv->data_id); + } +} + +/** + * as_component_get_context: + * @cpt: a #AsComponent instance. + * + * Returns: the #AsContext associated with this component. + * This function may return %NULL if no context is set. + * + * Since: 0.11.2 + */ +AsContext* +as_component_get_context (AsComponent *cpt) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + return priv->context; +} + +/** + * as_component_set_context: + * @cpt: a #AsComponent instance. + * @context: the #AsContext. + * + * Sets the document context this component is associated + * with. + * + * Since: 0.11.2 + */ +void +as_component_set_context (AsComponent *cpt, AsContext *context) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + if (priv->context != NULL) + g_object_unref (priv->context); + priv->context = g_object_ref (context); + + /* reset individual properties, so the new context overrides them */ + g_free (priv->active_locale_override); + priv->active_locale_override = NULL; + + g_free (priv->origin); + priv->origin = NULL; + + g_free (priv->arch); + priv->arch = NULL; +} + +/** + * as_copy_l10n_hashtable_hfunc: + */ +static void +as_copy_l10n_hashtable_hfunc (gpointer key, gpointer value, gpointer user_data) +{ + GHashTable *dest = (GHashTable*) user_data; + + g_hash_table_insert (dest, g_strdup (key), g_strdup (value)); +} + +/** + * as_copy_l10n_hashtable: + * + * Helper for as_component_merge_with_mode() + */ +static void +as_copy_l10n_hashtable (GHashTable *src, GHashTable *dest) +{ + /* don't copy if there is nothing to copy */ + if (g_hash_table_size (src) <= 0) + return; + + /* clear our destination table */ + g_hash_table_remove_all (dest); + + /* copy */ + g_hash_table_foreach (src, + &as_copy_l10n_hashtable_hfunc, + dest); +} + +/** + * as_copy_gobject_array: + * + * Helper for as_component_merge_with_mode() + * + * NOTE: Only the object references are copied. + */ +static void +as_copy_gobject_array (GPtrArray *src, GPtrArray *dest) +{ + guint i; + + /* don't copy if there is nothing to copy */ + if (src->len <= 0) + return; + + /* clear our destination table */ + g_ptr_array_remove_range (dest, 0, dest->len); + + /* copy */ + for (i = 0; i < src->len; i++) { + GObject *obj = G_OBJECT (g_ptr_array_index (src, i)); + g_ptr_array_add (dest, + g_object_ref (obj)); + } +} + +/** + * as_component_merge_with_mode: + * @cpt: An #AsComponent. + * @source: An #AsComponent to merge into @cpt. + * @merge_kind: How + * + * Merge data from component @source into @cpt, respecting the + * merge parameter @merge_kind. + */ +void +as_component_merge_with_mode (AsComponent *cpt, AsComponent *source, AsMergeKind merge_kind) +{ + guint i; + AsComponent *dest_cpt = cpt; + AsComponent *src_cpt = source; + AsComponentPrivate *dest_priv = GET_PRIVATE (dest_cpt); + AsComponentPrivate *src_priv = GET_PRIVATE (src_cpt); + + /* FIXME/TODO: We need to merge more attributes */ + + /* merge stuff in append mode */ + if (merge_kind == AS_MERGE_KIND_APPEND) { + GPtrArray *suggestions; + GPtrArray *cats; + + /* merge categories */ + cats = as_component_get_categories (src_cpt); + if (cats->len > 0) { + g_autoptr(GHashTable) cat_table = NULL; + GPtrArray *dest_categories; + + cat_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + for (i = 0; i < cats->len; i++) { + const gchar *cat = (const gchar*) g_ptr_array_index (cats, i); + g_hash_table_add (cat_table, g_strdup (cat)); + } + + dest_categories = as_component_get_categories (dest_cpt); + if (dest_categories->len > 0) { + for (i = 0; i < dest_categories->len; i++) { + const gchar *cat = (const gchar*) g_ptr_array_index (dest_categories, i); + g_hash_table_add (cat_table, g_strdup (cat)); + } + } + + g_ptr_array_set_size (dest_categories, 0); + as_hash_table_string_keys_to_array (cat_table, dest_categories); + } + + /* merge suggestions */ + suggestions = as_component_get_suggested (src_cpt); + if (suggestions != NULL) { + for (i = 0; i < suggestions->len; i++) { + as_component_add_suggested (dest_cpt, + AS_SUGGESTED (g_ptr_array_index (suggestions, i))); + } + } + + /* merge icons */ + for (i = 0; i < src_priv->icons->len; i++) { + AsIcon *icon = AS_ICON (g_ptr_array_index (src_priv->icons, i)); + + /* this function will not replace existing icons */ + as_component_add_icon (dest_cpt, icon); + } + } + + /* merge stuff in replace mode */ + if (merge_kind == AS_MERGE_KIND_REPLACE) { + /* names */ + as_copy_l10n_hashtable (src_priv->name, dest_priv->name); + + /* summary */ + as_copy_l10n_hashtable (src_priv->summary, dest_priv->summary); + + /* description */ + as_copy_l10n_hashtable (src_priv->description, dest_priv->description); + + /* merge package names */ + if ((src_priv->pkgnames != NULL) && (src_priv->pkgnames[0] != NULL)) + as_component_set_pkgnames (dest_cpt, src_priv->pkgnames); + + /* merge bundles */ + if (as_component_has_bundle (src_cpt)) + as_component_set_bundles_array (dest_cpt, as_component_get_bundles (src_cpt)); + + /* merge icons */ + as_copy_gobject_array (src_priv->icons, src_priv->icons); + + /* merge provided items */ + as_copy_gobject_array (src_priv->provided, src_priv->provided); + } + + /* the resulting component gets the origin of the highet value of both */ + if (as_component_get_origin_kind (src_cpt) > as_component_get_origin_kind (dest_cpt)) + as_component_set_origin_kind (dest_cpt, as_component_get_origin_kind (src_cpt)); + + g_debug ("Merged data for '%s'", as_component_get_data_id (dest_cpt)); +} + +/** + * as_component_merge: + * @cpt: An #AsComponent. + * @source: An #AsComponent with a merge type. + * + * Merge data from component @source into @cpt, respecting the + * merge mode of @source. + * + * Returns: %TRUE if the merge was successful. + */ +gboolean +as_component_merge (AsComponent *cpt, AsComponent *source) +{ + AsMergeKind merge_kind = as_component_get_merge_kind (source); + g_return_val_if_fail (merge_kind != AS_MERGE_KIND_NONE, FALSE); + + as_component_merge_with_mode (cpt, source, merge_kind); + return TRUE; +} + +/** + * as_component_set_kind_from_node: + */ +static void +as_component_set_kind_from_node (AsComponent *cpt, xmlNode *node) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + g_autofree gchar *cpttype = NULL; + + /* find out which kind of component we are dealing with */ + cpttype = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + if ((cpttype == NULL) || (g_strcmp0 (cpttype, "generic") == 0)) { + priv->kind = AS_COMPONENT_KIND_GENERIC; + } else { + priv->kind = as_component_kind_from_string (cpttype); + if (priv->kind == AS_COMPONENT_KIND_UNKNOWN) + g_debug ("Found unknown component type: %s", cpttype); + } +} + +/** + * as_xml_metainfo_description_to_cpt: + * + * Helper function for GHashTable + */ +static void +as_xml_metainfo_description_to_cpt (gchar *key, GString *value, AsComponent *cpt) +{ + as_component_set_description (cpt, value->str, key); + g_string_free (value, TRUE); +} + +/** + * as_component_load_provides_from_xml: + */ +static void +as_component_load_provides_from_xml (AsComponent *cpt, xmlNode *node) +{ + xmlNode *iter; + gchar *node_name; + + for (iter = node->children; iter != NULL; iter = iter->next) { + g_autofree gchar *content = NULL; + + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) + continue; + + node_name = (gchar*) iter->name; + content = as_xml_get_node_value (iter); + if (content == NULL) + continue; + + if (g_strcmp0 (node_name, "library") == 0) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_LIBRARY, content); + } else if (g_strcmp0 (node_name, "binary") == 0) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_BINARY, content); + } else if (g_strcmp0 (node_name, "font") == 0) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FONT, content); + } else if (g_strcmp0 (node_name, "modalias") == 0) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_MODALIAS, content); + } else if (g_strcmp0 (node_name, "firmware") == 0) { + g_autofree gchar *fwtype = NULL; + fwtype = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); + if (fwtype != NULL) { + if (g_strcmp0 (fwtype, "runtime") == 0) + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FIRMWARE_RUNTIME, content); + else if (g_strcmp0 (fwtype, "flashed") == 0) + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FIRMWARE_FLASHED, content); + } + } else if (g_strcmp0 (node_name, "python2") == 0) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_PYTHON_2, content); + } else if (g_strcmp0 (node_name, "python3") == 0) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_PYTHON, content); + } else if (g_strcmp0 (node_name, "dbus") == 0) { + g_autofree gchar *dbustype = NULL; + dbustype = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); + + if (g_strcmp0 (dbustype, "system") == 0) + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_DBUS_SYSTEM, content); + else if ((g_strcmp0 (dbustype, "user") == 0) || (g_strcmp0 (dbustype, "session") == 0)) + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_DBUS_USER, content); + } + } +} + +/** + * as_component_xml_parse_languages_node: + */ +static void +as_component_xml_parse_languages_node (AsComponent* cpt, xmlNode* node) +{ + xmlNode *iter; + + for (iter = node->children; iter != NULL; iter = iter->next) { + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) + continue; + + if (g_strcmp0 ((gchar*) iter->name, "lang") == 0) { + guint64 percentage = 0; + g_autofree gchar *locale = NULL; + g_autofree gchar *prop = NULL; + + prop = (gchar*) xmlGetProp (iter, (xmlChar*) "percentage"); + if (prop != NULL) + percentage = g_ascii_strtoll (prop, NULL, 10); + + locale = as_xml_get_node_value (iter); + as_component_add_language (cpt, locale, percentage); + } + } +} + +/** + * as_component_load_launchable_from_xml: + * + * Loads data from an XML node. + **/ +static void +as_component_load_launchable_from_xml (AsComponent *cpt, xmlNode *node) +{ + AsLaunchableKind lkind; + AsLaunchable *launchable; + g_autofree gchar *value = NULL; + + lkind = as_launchable_kind_from_string ((gchar*) xmlGetProp (node, (xmlChar*) "type")); + if (lkind == AS_LAUNCHABLE_KIND_UNKNOWN) + return; + + launchable = as_component_get_launchable (cpt, lkind); + if (launchable == NULL) { + launchable = as_launchable_new (); + as_launchable_set_kind (launchable, lkind); + as_component_add_launchable (cpt, launchable); + g_object_unref (launchable); + } + + value = as_xml_get_node_value (node); + if (value == NULL) + return; + as_launchable_add_entry (launchable, value); +} + +/** + * as_component_xml_parse_custom_node: + */ +static void +as_component_xml_parse_custom_node (AsComponent *cpt, xmlNode *node) +{ + xmlNode *iter; + GHashTable *custom; + + custom = as_component_get_custom (cpt); + for (iter = node->children; iter != NULL; iter = iter->next) { + gchar *key_str = NULL; + + if (iter->type != XML_ELEMENT_NODE) + continue; + if (g_strcmp0 ((gchar*) iter->name, "value") != 0) + continue; + + key_str = (gchar*) xmlGetProp (iter, (xmlChar*) "key"); + if (key_str == NULL) + continue; + g_hash_table_insert (custom, + key_str, + as_xml_get_node_value (iter)); + } +} + +/** + * as_component_load_relations_from_xml: + */ +static void +as_component_load_relations_from_xml (AsComponent *cpt, AsContext *ctx, xmlNode *node, AsRelationKind kind) +{ + xmlNode *iter; + + for (iter = node->children; iter != NULL; iter = iter->next) { + g_autoptr(AsRelation) relation = NULL; + g_autofree gchar *content = NULL; + + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) + continue; + + relation = as_relation_new (); + as_relation_set_kind (relation, kind); + + if (as_relation_load_from_xml (relation, ctx, iter, NULL)) + as_component_add_relation (cpt, relation); + } +} + +/** + * as_component_load_from_xml: + * @cpt: An #AsComponent. + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads data from an XML node. + **/ +gboolean +as_component_load_from_xml (AsComponent *cpt, AsContext *ctx, xmlNode *node, GError **error) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + xmlNode *iter; + const gchar *node_name; + g_autoptr(GPtrArray) pkgnames = NULL; + g_autofree gchar *priority_str = NULL; + g_autofree gchar *merge_str = NULL; + + /* sanity check */ + if ((g_strcmp0 ((gchar*) node->name, "component") != 0) && (g_strcmp0 ((gchar*) node->name, "application") != 0)) { + g_set_error (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "Expected 'component' tag, but got '%s' instead.", (gchar*) node->name); + return FALSE; + } + + pkgnames = g_ptr_array_new_with_free_func (g_free); + + /* set component kind */ + as_component_set_kind_from_node (cpt, node); + + /* set the priority for this component */ + priority_str = (gchar*) xmlGetProp (node, (xmlChar*) "priority"); + if (priority_str == NULL) { + priv->priority = as_context_get_priority (ctx); + } else { + priv->priority = g_ascii_strtoll (priority_str, NULL, 10); + } + + /* set the merge method for this component */ + merge_str = (gchar*) xmlGetProp (node, (xmlChar*) "merge"); + if (merge_str != NULL) { + priv->merge_kind = as_merge_kind_from_string (merge_str); + } + + /* set context for this component */ + as_component_set_context (cpt, ctx); + + for (iter = node->children; iter != NULL; iter = iter->next) { + g_autofree gchar *content = NULL; + g_autofree gchar *lang = NULL; + + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) + continue; + + node_name = (const gchar*) iter->name; + content = as_xml_get_node_value (iter); + lang = as_xmldata_get_node_locale (ctx, iter); + + if (g_strcmp0 (node_name, "id") == 0) { + as_component_set_id (cpt, content); + if ((as_context_get_style (ctx) == AS_FORMAT_STYLE_METAINFO) && (priv->kind == AS_COMPONENT_KIND_GENERIC)) { + /* parse legacy component type information */ + as_component_set_kind_from_node (cpt, iter); + } + } else if (g_strcmp0 (node_name, "pkgname") == 0) { + if (content != NULL) + g_ptr_array_add (pkgnames, g_strdup (content)); + } else if (g_strcmp0 (node_name, "source_pkgname") == 0) { + as_component_set_source_pkgname (cpt, content); + } else if (g_strcmp0 (node_name, "name") == 0) { + if (lang != NULL) + as_component_set_name (cpt, content, lang); + } else if (g_strcmp0 (node_name, "summary") == 0) { + if (lang != NULL) + as_component_set_summary (cpt, content, lang); + } else if (g_strcmp0 (node_name, "description") == 0) { + if (as_context_get_style (ctx) == AS_FORMAT_STYLE_COLLECTION) { + /* for collection XML, the "description" tag has a language property, so parsing it is simple */ + if (lang != NULL) { + gchar *desc; + desc = as_xml_dump_node_children (iter); + as_component_set_description (cpt, desc, lang); + g_free (desc); + } + } else { + as_xml_parse_metainfo_description_node (ctx, + iter, + (GHFunc) as_xml_metainfo_description_to_cpt, + cpt); + } + } else if (g_strcmp0 (node_name, "icon") == 0) { + g_autoptr(AsIcon) icon = NULL; + if (content == NULL) + continue; + icon = as_icon_new (); + if (as_icon_load_from_xml (icon, ctx, iter, NULL)) + as_component_add_icon (cpt, icon); + } else if (g_strcmp0 (node_name, "url") == 0) { + if (content != NULL) { + g_autofree gchar *urltype_str = NULL; + AsUrlKind url_kind; + urltype_str = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); + url_kind = as_url_kind_from_string (urltype_str); + if (url_kind != AS_URL_KIND_UNKNOWN) + as_component_add_url (cpt, url_kind, content); + } + } else if (g_strcmp0 (node_name, "categories") == 0) { + as_xml_add_children_values_to_array (iter, + "category", + priv->categories); + } else if (g_strcmp0 (node_name, "keywords") == 0) { + if (lang != NULL) { + g_auto(GStrv) kw_array = NULL; + kw_array = as_xml_get_children_as_strv (iter, "keyword"); + as_component_set_keywords (cpt, kw_array, lang); + } + } else if (g_strcmp0 (node_name, "mimetypes") == 0) { + g_autoptr(GPtrArray) mime_list = NULL; + guint i; + + /* Mimetypes are essentially provided interfaces, that's why they belong into AsProvided. + * However, due to historic reasons, the spec has an own toplevel tag for them, so we need + * to parse them here. */ + mime_list = as_xml_get_children_as_string_list (iter, "mimetype"); + for (i = 0; i < mime_list->len; i++) { + as_component_add_provided_item (cpt, + AS_PROVIDED_KIND_MIMETYPE, + (const gchar*) g_ptr_array_index (mime_list, i)); + } + } else if (g_strcmp0 (node_name, "provides") == 0) { + as_component_load_provides_from_xml (cpt, iter); + } else if (g_strcmp0 (node_name, "screenshots") == 0) { + xmlNode *iter2; + + for (iter2 = iter->children; iter2 != NULL; iter2 = iter2->next) { + if (iter2->type != XML_ELEMENT_NODE) + continue; + if (g_strcmp0 ((const gchar*) iter2->name, "screenshot") == 0) { + g_autoptr(AsScreenshot) screenshot = as_screenshot_new (); + if (as_screenshot_load_from_xml (screenshot, ctx, iter2, NULL)) + as_component_add_screenshot (cpt, screenshot); + } + } + } else if (g_strcmp0 (node_name, "metadata_license") == 0) { + as_component_set_metadata_license (cpt, content); + } else if (g_strcmp0 (node_name, "project_license") == 0) { + as_component_set_project_license (cpt, content); + } else if (g_strcmp0 (node_name, "project_group") == 0) { + as_component_set_project_group (cpt, content); + } else if (g_strcmp0 (node_name, "developer_name") == 0) { + if (lang != NULL) + as_component_set_developer_name (cpt, content, lang); + } else if (g_strcmp0 (node_name, "compulsory_for_desktop") == 0) { + if (content != NULL) + as_component_set_compulsory_for_desktop (cpt, content); + } else if (g_strcmp0 (node_name, "releases") == 0) { + xmlNode *iter2; + + for (iter2 = iter->children; iter2 != NULL; iter2 = iter2->next) { + if (iter2->type != XML_ELEMENT_NODE) + continue; + if (g_strcmp0 ((const gchar*) iter2->name, "release") == 0) { + g_autoptr(AsRelease) release = as_release_new (); + if (as_release_load_from_xml (release, ctx, iter2, NULL)) + as_component_add_release (cpt, release); + } + } + } else if (g_strcmp0 (node_name, "extends") == 0) { + as_component_add_extends (cpt, content); + } else if (g_strcmp0 (node_name, "languages") == 0) { + as_component_xml_parse_languages_node (cpt, iter); + } else if (g_strcmp0 (node_name, "launchable") == 0) { + as_component_load_launchable_from_xml (cpt, iter); + } else if (g_strcmp0 (node_name, "bundle") == 0) { + g_autoptr(AsBundle) bundle = as_bundle_new (); + if (as_bundle_load_from_xml (bundle, ctx, iter, NULL)) + as_component_add_bundle (cpt, bundle); + } else if (g_strcmp0 (node_name, "translation") == 0) { + if (content != NULL) { + g_autoptr(AsTranslation) tr = as_translation_new (); + if (as_translation_load_from_xml (tr, ctx, iter, NULL)) + as_component_add_translation (cpt, tr); + } + } else if (g_strcmp0 (node_name, "suggests") == 0) { + g_autoptr(AsSuggested) suggested = as_suggested_new (); + if (as_suggested_load_from_xml (suggested, ctx, iter, NULL)) + as_component_add_suggested (cpt, suggested); + } else if (g_strcmp0 (node_name, "custom") == 0) { + as_component_xml_parse_custom_node (cpt, iter); + } else if (g_strcmp0 (node_name, "content_rating") == 0) { + g_autoptr(AsContentRating) ctrating = as_content_rating_new (); + if (as_content_rating_load_from_xml (ctrating, ctx, iter, NULL)) + as_component_add_content_rating (cpt, ctrating); + } else if (g_strcmp0 (node_name, "recommends") == 0) { + as_component_load_relations_from_xml (cpt, ctx, iter, AS_RELATION_KIND_RECOMMENDS); + } else if (g_strcmp0 (node_name, "requires") == 0) { + as_component_load_relations_from_xml (cpt, ctx, iter, AS_RELATION_KIND_REQUIRES); + } + } + + /* add package name information to component */ + { + g_auto(GStrv) strv = as_ptr_array_to_strv (pkgnames); + as_component_set_pkgnames (cpt, strv); + } + + return TRUE; +} + +/** + * as_component_xml_keywords_to_node: + */ +static void +as_component_xml_keywords_to_node (AsComponent *cpt, xmlNode *root) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + GHashTableIter iter; + gpointer key, value; + + g_hash_table_iter_init (&iter, priv->keywords); + while (g_hash_table_iter_next (&iter, &key, &value)) { + xmlNode *node; + const gchar *locale = (const gchar*) key; + gchar **kws = (gchar**) value; + + /* skip cruft */ + if (as_is_cruft_locale (locale)) + continue; + + node = as_xml_add_node_list_strv (root, "keywords", "keyword", kws); + if (node == NULL) + continue; + if (g_strcmp0 (locale, "C") != 0) { + xmlNewProp (node, + (xmlChar*) "xml:lang", + (xmlChar*) locale); + } + } +} + +/** + * as_component_xml_serialize_provides: + */ +static void +as_component_xml_serialize_provides (AsComponent *cpt, xmlNode *cnode) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + xmlNode *node; + GPtrArray *items; + guint i; + AsProvided *prov_mime; + + if (priv->provided->len == 0) + return; + + prov_mime = as_component_get_provided_for_kind (cpt, AS_PROVIDED_KIND_MIMETYPE); + if (prov_mime != NULL) { + /* mimetypes get special treatment in XML for historical reasons */ + node = xmlNewChild (cnode, NULL, (xmlChar*) "mimetypes", NULL); + items = as_provided_get_items (prov_mime); + + for (i = 0; i < items->len; i++) { + xmlNewTextChild (node, + NULL, + (xmlChar*) "mimetype", + (xmlChar*) g_ptr_array_index (items, i)); + } + + /* check if we only had mimetype provided items, in that case we don't need to continue */ + if (priv->provided->len == 1) + return; + } + + node = xmlNewChild (cnode, NULL, (xmlChar*) "provides", NULL); + for (i = 0; i < priv->provided->len; i++) { + guint j; + AsProvided *prov = AS_PROVIDED (g_ptr_array_index (priv->provided, i)); + + items = as_provided_get_items (prov); + switch (as_provided_get_kind (prov)) { + case AS_PROVIDED_KIND_MIMETYPE: + /* we already handled those */ + break; + case AS_PROVIDED_KIND_LIBRARY: + as_xml_add_node_list (node, NULL, + "library", + items); + break; + case AS_PROVIDED_KIND_BINARY: + as_xml_add_node_list (node, NULL, + "binary", + items); + break; + case AS_PROVIDED_KIND_MODALIAS: + as_xml_add_node_list (node, NULL, + "modalias", + items); + break; + case AS_PROVIDED_KIND_PYTHON_2: + as_xml_add_node_list (node, NULL, + "python2", + items); + break; + case AS_PROVIDED_KIND_PYTHON: + as_xml_add_node_list (node, NULL, + "python3", + items); + break; + case AS_PROVIDED_KIND_FONT: + as_xml_add_node_list (node, NULL, + "font", + items); + break; + case AS_PROVIDED_KIND_FIRMWARE_RUNTIME: + for (j = 0; j < items->len; j++) { + xmlNode *n; + n = xmlNewTextChild (node, NULL, + (xmlChar*) "firmware", + (xmlChar*) g_ptr_array_index (items, j)); + xmlNewProp (n, + (xmlChar*) "type", + (xmlChar*) "runtime"); + } + break; + case AS_PROVIDED_KIND_FIRMWARE_FLASHED: + for (j = 0; j < items->len; j++) { + xmlNode *n; + n = xmlNewTextChild (node, NULL, + (xmlChar*) "firmware", + (xmlChar*) g_ptr_array_index (items, j)); + xmlNewProp (n, + (xmlChar*) "type", + (xmlChar*) "runtime"); + } + break; + case AS_PROVIDED_KIND_DBUS_SYSTEM: + for (j = 0; j < items->len; j++) { + xmlNode *n; + n = xmlNewTextChild (node, NULL, + (xmlChar*) "dbus", + (xmlChar*) g_ptr_array_index (items, j)); + xmlNewProp (n, + (xmlChar*) "type", + (xmlChar*) "system"); + } + break; + case AS_PROVIDED_KIND_DBUS_USER: + for (j = 0; j < items->len; j++) { + xmlNode *n; + n = xmlNewTextChild (node, NULL, + (xmlChar*) "dbus", + (xmlChar*) g_ptr_array_index (items, j)); + xmlNewProp (n, + (xmlChar*) "type", + (xmlChar*) "user"); + } + break; + + default: + g_debug ("Couldn't serialize provided-item type '%s'", as_provided_kind_to_string (as_provided_get_kind (prov))); + break; + } + } +} + +/** + * as_component_xml_serialize_languages: + */ +static void +as_component_xml_serialize_languages (AsComponent *cpt, xmlNode *cptnode) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + xmlNode *node; + GHashTableIter iter; + gpointer key, value; + + if (g_hash_table_size (priv->languages) == 0) + return; + + node = xmlNewChild (cptnode, NULL, (xmlChar*) "languages", NULL); + g_hash_table_iter_init (&iter, priv->languages); + while (g_hash_table_iter_next (&iter, &key, &value)) { + guint percentage; + const gchar *locale; + xmlNode *l_node; + g_autofree gchar *percentage_str = NULL; + + locale = (const gchar*) key; + percentage = GPOINTER_TO_INT (value); + percentage_str = g_strdup_printf("%i", percentage); + + l_node = xmlNewTextChild (node, + NULL, + (xmlChar*) "lang", + (xmlChar*) locale); + xmlNewProp (l_node, + (xmlChar*) "percentage", + (xmlChar*) percentage_str); + } +} + +/** + * as_component_xml_serialize_custom: + */ +static void +as_component_xml_serialize_custom (AsComponent *cpt, xmlNode *cptnode) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + xmlNode *node; + GHashTableIter iter; + gpointer key, value; + + if (g_hash_table_size (priv->custom) == 0) + return; + + node = xmlNewChild (cptnode, NULL, (xmlChar*) "custom", NULL); + g_hash_table_iter_init (&iter, priv->custom); + while (g_hash_table_iter_next (&iter, &key, &value)) { + xmlNode *snode; + + snode = xmlNewTextChild (node, + NULL, + (xmlChar*) "value", + (xmlChar*) value); + xmlNewProp (snode, + (xmlChar*) "key", + (xmlChar*) key); + } +} + +/** + * as_component_to_xml_node: + * @cpt: an #AsComponent. + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +xmlNode* +as_component_to_xml_node (AsComponent *cpt, AsContext *ctx, xmlNode *root) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + xmlNode *cnode; + guint i; + + /* define component root node properties */ + if (root == NULL) + cnode = xmlNewNode (NULL, (xmlChar*) "component"); + else + cnode = xmlNewChild (root, NULL, (xmlChar*) "component", NULL); + + if ((priv->kind != AS_COMPONENT_KIND_GENERIC) && (priv->kind != AS_COMPONENT_KIND_UNKNOWN)) { + const gchar *kind_str; + if ((as_context_get_format_version (ctx) < AS_FORMAT_VERSION_V0_10) && (priv->kind == AS_COMPONENT_KIND_DESKTOP_APP)) + kind_str = "desktop"; + else + kind_str = as_component_kind_to_string (priv->kind); + xmlNewProp (cnode, (xmlChar*) "type", + (xmlChar*) kind_str); + } + + if (as_context_get_style (ctx) == AS_FORMAT_STYLE_COLLECTION) { + /* write some propties which only exist in collection XML */ + if (priv->merge_kind != AS_MERGE_KIND_NONE) { + xmlNewProp (cnode, (xmlChar*) "merge", + (xmlChar*) as_merge_kind_to_string (priv->merge_kind)); + } + + if (priv->priority != 0) { + g_autofree gchar *priority_str = g_strdup_printf ("%i", priv->priority); + xmlNewProp (cnode, (xmlChar*) "priority", (xmlChar*) priority_str); + } + } + + /* component tags */ + as_xml_add_text_node (cnode, "id", as_component_get_id (cpt)); + + as_xml_add_localized_text_node (cnode, "name", priv->name); + as_xml_add_localized_text_node (cnode, "summary", priv->summary); + + /* order license and project group after name/summary */ + if (as_context_get_style (ctx) == AS_FORMAT_STYLE_METAINFO) + as_xml_add_text_node (cnode, "metadata_license", priv->metadata_license); + + as_xml_add_text_node (cnode, "project_license", priv->project_license); + as_xml_add_text_node (cnode, "project_group", priv->project_group); + + /* developer name */ + as_xml_add_localized_text_node (cnode, "developer_name", priv->developer_name); + + /* long description */ + as_xml_add_description_node (ctx, cnode, priv->description); + + as_xml_add_node_list_strv (cnode, NULL, "pkgname", priv->pkgnames); + + as_xml_add_node_list (cnode, NULL, "extends", priv->extends); + as_xml_add_node_list (cnode, NULL, "compulsory_for_desktop", priv->compulsory_for_desktops); + as_xml_add_node_list (cnode, "categories", "category", priv->categories); + + /* keywords */ + as_component_xml_keywords_to_node (cpt, cnode); + + /* urls */ + for (i = AS_URL_KIND_UNKNOWN; i < AS_URL_KIND_LAST; i++) { + xmlNode *n; + const gchar *value; + value = as_component_get_url (cpt, i); + if (value == NULL) + continue; + + n = xmlNewTextChild (cnode, NULL, (xmlChar*) "url", (xmlChar*) value); + xmlNewProp (n, (xmlChar*) "type", + (xmlChar*) as_url_kind_to_string (i)); + } + + /* icons */ + for (i = 0; i < priv->icons->len; i++) { + AsIcon *icon = AS_ICON (g_ptr_array_index (priv->icons, i)); + as_icon_to_xml_node (icon, ctx, cnode); + } + + /* bundles */ + for (i = 0; i < priv->bundles->len; i++) { + AsBundle *bundle = AS_BUNDLE (g_ptr_array_index (priv->bundles, i)); + as_bundle_to_xml_node (bundle, ctx, cnode); + } + + /* launchables */ + for (i = 0; i < priv->launchables->len; i++) { + AsLaunchable *launchable = AS_LAUNCHABLE (g_ptr_array_index (priv->launchables, i)); + as_launchable_to_xml_node (launchable, ctx, cnode); + } + + /* translations */ + if (priv->translations != NULL) { + for (i = 0; i < priv->translations->len; i++) { + AsTranslation *tr = AS_TRANSLATION (g_ptr_array_index (priv->translations, i)); + as_translation_to_xml_node (tr, ctx, cnode); + } + } + + /* screenshots */ + if (priv->screenshots->len > 0) { + xmlNode *rnode = xmlNewChild (cnode, NULL, (xmlChar*) "screenshots", NULL); + + for (i = 0; i < priv->screenshots->len; i++) { + AsScreenshot *scr = AS_SCREENSHOT (g_ptr_array_index (priv->screenshots, i)); + as_screenshot_to_xml_node (scr, ctx, rnode); + } + } + + /* releases */ + if (priv->releases->len > 0) { + xmlNode *rnode = xmlNewChild (cnode, NULL, (xmlChar*) "releases", NULL); + + for (i = 0; i < priv->releases->len; i++) { + AsRelease *rel = AS_RELEASE (g_ptr_array_index (priv->releases, i)); + as_release_to_xml_node (rel, ctx, rnode); + } + } + + /* provides & mimetypes node */ + as_component_xml_serialize_provides (cpt, cnode); + + /* languages node */ + as_component_xml_serialize_languages (cpt, cnode); + + /* suggests nodes */ + for (i = 0; i < priv->suggestions->len; i++) { + AsSuggested *suggested = AS_SUGGESTED (g_ptr_array_index (priv->suggestions, i)); + as_suggested_to_xml_node (suggested, ctx, cnode); + } + + /* content_rating nodes */ + for (i = 0; i < priv->content_ratings->len; i++) { + AsContentRating *ctrating = AS_CONTENT_RATING (g_ptr_array_index (priv->content_ratings, i)); + as_content_rating_to_xml_node (ctrating, ctx, cnode); + } + + /* recommends */ + if (priv->recommends->len > 0) { + xmlNode *rcnode = xmlNewChild (cnode, NULL, (xmlChar*) "recommends", NULL); + + for (i = 0; i < priv->recommends->len; i++) { + AsRelation *relation = AS_RELATION (g_ptr_array_index (priv->recommends, i)); + as_relation_to_xml_node (relation, ctx, rcnode); + } + } + + /* requires */ + if (priv->requires->len > 0) { + xmlNode *rqnode = xmlNewChild (cnode, NULL, (xmlChar*) "requires", NULL); + + for (i = 0; i < priv->requires->len; i++) { + AsRelation *relation = AS_RELATION (g_ptr_array_index (priv->requires, i)); + as_relation_to_xml_node (relation, ctx, rqnode); + } + } + + /* custom node */ + as_component_xml_serialize_custom (cpt, cnode); + + return cnode; +} + +/** + * as_component_yaml_parse_keywords: + * + * Process a keywords node and add the data to an #AsComponent + */ +static void +as_component_yaml_parse_keywords (AsComponent *cpt, AsContext *ctx, GNode *node) +{ + GNode *tnode; + g_autoptr(GPtrArray) keywords = NULL; + g_auto(GStrv) strv = NULL; + + keywords = g_ptr_array_new_with_free_func (g_free); + + tnode = as_yaml_get_localized_node (ctx, node, NULL); + /* no node found? */ + if (tnode == NULL) + return; + + as_yaml_list_to_str_array (tnode, keywords); + + strv = as_ptr_array_to_strv (keywords); + as_component_set_keywords (cpt, + strv, + as_yaml_node_get_key (tnode)); +} + +/** + * as_component_yaml_parse_urls: + */ +static void +as_component_yaml_parse_urls (AsComponent *cpt, GNode *node) +{ + GNode *n; + AsUrlKind url_kind; + + for (n = node->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + const gchar *value = as_yaml_node_get_value (n); + + url_kind = as_url_kind_from_string (key); + if ((url_kind != AS_URL_KIND_UNKNOWN) && (value != NULL)) + as_component_add_url (cpt, url_kind, value); + } +} + +/** + * as_component_yaml_parse_icon: + */ +static void +as_component_yaml_parse_icon (AsComponent *cpt, AsContext *ctx, GNode *node, AsIconKind kind) +{ + GNode *n; + guint64 size; + guint scale; + g_autoptr(AsIcon) icon = NULL; + + icon = as_icon_new (); + as_icon_set_kind (icon, kind); + + for (n = node->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + const gchar *value = as_yaml_node_get_value (n); + + if (g_strcmp0 (key, "width") == 0) { + size = g_ascii_strtoull (value, NULL, 10); + as_icon_set_width (icon, size); + } else if (g_strcmp0 (key, "height") == 0) { + size = g_ascii_strtoull (value, NULL, 10); + as_icon_set_height (icon, size); + } else if (g_strcmp0 (key, "scale") == 0) { + scale = g_ascii_strtoull (value, NULL, 10); + as_icon_set_scale (icon, scale); + } else { + if (kind == AS_ICON_KIND_REMOTE) { + if (g_strcmp0 (key, "url") == 0) { + if (as_context_has_media_baseurl (ctx)) { + /* handle the media baseurl */ + g_autofree gchar *url = NULL; + url = g_build_filename (as_context_get_media_baseurl (ctx), value, NULL); + as_icon_set_url (icon, url); + } else { + /* no baseurl, we can just set the value as URL */ + as_icon_set_url (icon, value); + } + } + } else { + if (g_strcmp0 (key, "name") == 0) { + as_icon_set_filename (icon, value); + } + } + } + } + + as_component_add_icon (cpt, icon); +} + +/** + * as_component_yaml_parse_icons: + */ +static void +as_component_yaml_parse_icons (AsComponent *cpt, AsContext *ctx, GNode *node) +{ + GNode *n; + for (n = node->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + const gchar *value = as_yaml_node_get_value (n); + + if (g_strcmp0 (key, "stock") == 0) { + g_autoptr(AsIcon) icon = as_icon_new (); + as_icon_set_kind (icon, AS_ICON_KIND_STOCK); + as_icon_set_name (icon, value); + as_component_add_icon (cpt, icon); + } else if (g_strcmp0 (key, "cached") == 0) { + if (value != NULL) { + g_autoptr(AsIcon) icon = as_icon_new (); + /* we have a legacy YAML file */ + as_icon_set_kind (icon, AS_ICON_KIND_CACHED); + as_icon_set_filename (icon, value); + as_component_add_icon (cpt, icon); + } else { + GNode *sn; + /* we have a recent YAML file */ + for (sn = n->children; sn != NULL; sn = sn->next) + as_component_yaml_parse_icon (cpt, ctx, sn, AS_ICON_KIND_CACHED); + } + } else if (g_strcmp0 (key, "local") == 0) { + GNode *sn; + for (sn = n->children; sn != NULL; sn = sn->next) + as_component_yaml_parse_icon (cpt, ctx, sn, AS_ICON_KIND_LOCAL); + } else if (g_strcmp0 (key, "remote") == 0) { + GNode *sn; + for (sn = n->children; sn != NULL; sn = sn->next) + as_component_yaml_parse_icon (cpt, ctx, sn, AS_ICON_KIND_REMOTE); + } + } +} + +/** + * as_component_yaml_parse_provides: + */ +static void +as_component_yaml_parse_provides (AsComponent *cpt, GNode *node) +{ + GNode *n; + GNode *sn; + + for (n = node->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + + if (g_strcmp0 (key, "libraries") == 0) { + for (sn = n->children; sn != NULL; sn = sn->next) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_LIBRARY, (gchar*) sn->data); + } + } else if (g_strcmp0 (key, "binaries") == 0) { + for (sn = n->children; sn != NULL; sn = sn->next) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_BINARY, (gchar*) sn->data); + } + } else if (g_strcmp0 (key, "fonts") == 0) { + for (sn = n->children; sn != NULL; sn = sn->next) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FONT, (gchar*) sn->data); + } + } else if (g_strcmp0 (key, "modaliases") == 0) { + for (sn = n->children; sn != NULL; sn = sn->next) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_MODALIAS, (gchar*) sn->data); + } + } else if (g_strcmp0 (key, "firmware") == 0) { + GNode *dn; + for (sn = n->children; sn != NULL; sn = sn->next) { + gchar *kind = NULL; + gchar *fwdata = NULL; + for (dn = sn->children; dn != NULL; dn = dn->next) { + gchar *dkey; + gchar *dvalue; + + dkey = (gchar*) dn->data; + if (dn->children) + dvalue = (gchar*) dn->children->data; + else + continue; + if (g_strcmp0 (dkey, "type") == 0) { + kind = dvalue; + } else if ((g_strcmp0 (dkey, "guid") == 0) || (g_strcmp0 (dkey, "file") == 0)) { + fwdata = dvalue; + } + } + /* we don't add malformed provides types */ + if ((kind == NULL) || (fwdata == NULL)) + continue; + + if (g_strcmp0 (kind, "runtime") == 0) + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FIRMWARE_RUNTIME, fwdata); + else if (g_strcmp0 (kind, "flashed") == 0) + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FIRMWARE_FLASHED, fwdata); + } + } else if (g_strcmp0 (key, "python2") == 0) { + for (sn = n->children; sn != NULL; sn = sn->next) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_PYTHON_2, (gchar*) sn->data); + } + } else if (g_strcmp0 (key, "python3") == 0) { + for (sn = n->children; sn != NULL; sn = sn->next) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_PYTHON, (gchar*) sn->data); + } + } else if (g_strcmp0 (key, "mimetypes") == 0) { + for (sn = n->children; sn != NULL; sn = sn->next) { + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_MIMETYPE, (gchar*) sn->data); + } + } else if (g_strcmp0 (key, "dbus") == 0) { + GNode *dn; + for (sn = n->children; sn != NULL; sn = sn->next) { + gchar *kind = NULL; + gchar *service = NULL; + for (dn = sn->children; dn != NULL; dn = dn->next) { + gchar *dkey; + gchar *dvalue; + + dkey = (gchar*) dn->data; + if (dn->children) + dvalue = (gchar*) dn->children->data; + else + dvalue = NULL; + if (g_strcmp0 (dkey, "type") == 0) { + kind = dvalue; + } else if (g_strcmp0 (dkey, "service") == 0) { + service = dvalue; + } + } + /* we don't add malformed provides types */ + if ((kind == NULL) || (service == NULL)) + continue; + + if (g_strcmp0 (kind, "system") == 0) + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_DBUS_SYSTEM, service); + else if ((g_strcmp0 (kind, "user") == 0) || (g_strcmp0 (kind, "session") == 0)) + as_component_add_provided_item (cpt, AS_PROVIDED_KIND_DBUS_USER, service); + } + } + } +} + +/** + * as_component_yaml_parse_languages: + */ +static void +as_component_yaml_parse_languages (AsComponent *cpt, GNode *node) +{ + GNode *sn; + + for (sn = node->children; sn != NULL; sn = sn->next) { + GNode *n; + g_autofree gchar *locale = NULL; + g_autofree gchar *percentage_str = NULL; + + for (n = sn->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + const gchar *value = as_yaml_node_get_value (n); + + if (g_strcmp0 (key, "locale") == 0) { + if (locale == NULL) + locale = g_strdup (value); + } else if (g_strcmp0 (key, "percentage") == 0) { + if (percentage_str == NULL) + percentage_str = g_strdup (value); + } else { + as_yaml_print_unknown ("Languages", key); + } + } + + if ((locale != NULL) && (percentage_str != NULL)) + as_component_add_language (cpt, + locale, + g_ascii_strtoll (percentage_str, NULL, 10)); + } +} + +/** + * as_component_yaml_parse_relations: + */ +static void +as_component_yaml_parse_relations (AsComponent *cpt, AsContext *ctx, GNode *node, AsRelationKind kind) +{ + GNode *n; + + for (n = node->children; n != NULL; n = n->next) { + g_autoptr(AsRelation) relation = as_relation_new (); + + as_relation_set_kind (relation, kind); + if (as_relation_load_from_yaml (relation, ctx, n, NULL)) + as_component_add_relation (cpt, relation); + } +} + +/** + * as_component_yaml_parse_custom: + */ +static void +as_component_yaml_parse_custom (AsComponent *cpt, GNode *node) +{ + GNode *sn; + + for (sn = node->children; sn != NULL; sn = sn->next) { + const gchar *key = as_yaml_node_get_key (sn); + const gchar *value = as_yaml_node_get_value (sn); + + as_component_insert_custom_value (cpt, key, value); + } +} + +/** + * as_component_load_from_yaml: + * @cpt: an #AsComponent. + * @ctx: the AppStream document context. + * @root: the YAML node. + * @error: a #GError. + * + * Loads data from a YAML field. + **/ +gboolean +as_component_load_from_yaml (AsComponent *cpt, AsContext *ctx, GNode *root, GError **error) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + GNode *node; + + /* set context for this component */ + as_component_set_context (cpt, ctx); + + /* set component default priority */ + priv->priority = as_context_get_priority (ctx); + + for (node = root->children; node != NULL; node = node->next) { + const gchar *key; + const gchar *value; + gchar *lvalue; + + if (node->children == NULL) + continue; + + key = as_yaml_node_get_key (node); + value = as_yaml_node_get_value (node); + + if (g_strcmp0 (key, "Type") == 0) { + if (g_strcmp0 (value, "generic") == 0) + priv->kind = AS_COMPONENT_KIND_GENERIC; + else + priv->kind = as_component_kind_from_string (value); + } else if (g_strcmp0 (key, "ID") == 0) { + as_component_set_id (cpt, value); + } else if (g_strcmp0 (key, "Priority") == 0) { + priv->priority = g_ascii_strtoll (value, NULL, 10); + } else if (g_strcmp0 (key, "Merge") == 0) { + priv->merge_kind = as_merge_kind_from_string (value); + } else if (g_strcmp0 (key, "Package") == 0) { + g_auto(GStrv) strv = NULL; + strv = g_new0 (gchar*, 1 + 1); + strv[0] = g_strdup (value); + strv[1] = NULL; + + as_component_set_pkgnames (cpt, strv); + } else if (g_strcmp0 (key, "SourcePackage") == 0) { + as_component_set_source_pkgname (cpt, value); + } else if (g_strcmp0 (key, "Name") == 0) { + lvalue = as_yaml_get_localized_value (ctx, node, "C"); + if (lvalue != NULL) { + as_component_set_name (cpt, lvalue, "C"); /* Unlocalized */ + g_free (lvalue); + } + lvalue = as_yaml_get_localized_value (ctx, node, NULL); + as_component_set_name (cpt, lvalue, NULL); + g_free (lvalue); + } else if (g_strcmp0 (key, "Summary") == 0) { + lvalue = as_yaml_get_localized_value (ctx, node, NULL); + as_component_set_summary (cpt, lvalue, NULL); + g_free (lvalue); + } else if (g_strcmp0 (key, "Description") == 0) { + lvalue = as_yaml_get_localized_value (ctx, node, NULL); + as_component_set_description (cpt, lvalue, NULL); + g_free (lvalue); + } else if (g_strcmp0 (key, "DeveloperName") == 0) { + lvalue = as_yaml_get_localized_value (ctx, node, NULL); + as_component_set_developer_name (cpt, lvalue, NULL); + g_free (lvalue); + } else if (g_strcmp0 (key, "ProjectLicense") == 0) { + as_component_set_project_license (cpt, value); + } else if (g_strcmp0 (key, "ProjectGroup") == 0) { + as_component_set_project_group (cpt, value); + } else if (g_strcmp0 (key, "Categories") == 0) { + as_yaml_list_to_str_array (node, priv->categories); + } else if (g_strcmp0 (key, "CompulsoryForDesktops") == 0) { + as_yaml_list_to_str_array (node, priv->compulsory_for_desktops); + } else if (g_strcmp0 (key, "Extends") == 0) { + as_yaml_list_to_str_array (node, priv->extends); + } else if (g_strcmp0 (key, "Keywords") == 0) { + as_component_yaml_parse_keywords (cpt, ctx, node); + } else if (g_strcmp0 (key, "Url") == 0) { + as_component_yaml_parse_urls (cpt, node); + } else if (g_strcmp0 (key, "Icon") == 0) { + as_component_yaml_parse_icons (cpt, ctx, node); + } else if (g_strcmp0 (key, "Bundles") == 0) { + GNode *n; + for (n = node->children; n != NULL; n = n->next) { + g_autoptr(AsBundle) bundle = as_bundle_new (); + if (as_bundle_load_from_yaml (bundle, ctx, n, NULL)) + as_component_add_bundle (cpt, bundle); + } + } else if (g_strcmp0 (key, "Launchable") == 0) { + GNode *n; + for (n = node->children; n != NULL; n = n->next) { + g_autoptr(AsLaunchable) launch = as_launchable_new (); + if (as_launchable_load_from_yaml (launch, ctx, n, NULL)) + as_component_add_launchable (cpt, launch); + } + } else if (g_strcmp0 (key, "Provides") == 0) { + as_component_yaml_parse_provides (cpt, node); + } else if (g_strcmp0 (key, "Screenshots") == 0) { + GNode *n; + for (n = node->children; n != NULL; n = n->next) { + g_autoptr(AsScreenshot) scr = as_screenshot_new (); + if (as_screenshot_load_from_yaml (scr, ctx, n, NULL)) + as_component_add_screenshot (cpt, scr); + } + } else if (g_strcmp0 (key, "Languages") == 0) { + as_component_yaml_parse_languages (cpt, node); + } else if (g_strcmp0 (key, "Releases") == 0) { + GNode *n; + for (n = node->children; n != NULL; n = n->next) { + g_autoptr(AsRelease) release = as_release_new (); + if (as_release_load_from_yaml (release, ctx, n, NULL)) + as_component_add_release (cpt, release); + } + } else if (g_strcmp0 (key, "Suggests") == 0) { + GNode *n; + for (n = node->children; n != NULL; n = n->next) { + g_autoptr(AsSuggested) suggested = as_suggested_new (); + if (as_suggested_load_from_yaml (suggested, ctx, n, NULL)) + as_component_add_suggested (cpt, suggested); + } + } else if (g_strcmp0 (key, "ContentRating") == 0) { + GNode *n; + for (n = node->children; n != NULL; n = n->next) { + g_autoptr(AsContentRating) rating = as_content_rating_new (); + if (as_content_rating_load_from_yaml (rating, ctx, n, NULL)) + as_component_add_content_rating (cpt, rating); + } + } else if (g_strcmp0 (key, "Recommends") == 0) { + as_component_yaml_parse_relations (cpt, ctx, node, AS_RELATION_KIND_RECOMMENDS); + } else if (g_strcmp0 (key, "Requires") == 0) { + as_component_yaml_parse_relations (cpt, ctx, node, AS_RELATION_KIND_REQUIRES); + } else if (g_strcmp0 (key, "Custom") == 0) { + as_component_yaml_parse_custom (cpt, node); + } else { + as_yaml_print_unknown ("root", key); + } + } + + return TRUE; +} + +/** + * as_component_yaml_emit_icons: + */ +static void +as_component_yaml_emit_icons (AsComponent* cpt, yaml_emitter_t *emitter, GPtrArray *icons) +{ + guint i; + GHashTableIter iter; + gpointer key, value; + gboolean stock_icon_added = FALSE; + g_autoptr(GHashTable) icons_table = NULL; + + /* we need to emit the icons in order, so we first need to sort them properly */ + icons_table = g_hash_table_new_full (g_direct_hash, + g_direct_equal, + NULL, + (GDestroyNotify) g_ptr_array_unref); + for (i = 0; i < icons->len; i++) { + GPtrArray *ilist; + AsIconKind ikind; + AsIcon *icon = AS_ICON (g_ptr_array_index (icons, i)); + + ikind = as_icon_get_kind (icon); + ilist = g_hash_table_lookup (icons_table, GINT_TO_POINTER (ikind)); + if (ilist == NULL) { + ilist = g_ptr_array_new (); + g_hash_table_insert (icons_table, GINT_TO_POINTER (ikind), ilist); + } + + g_ptr_array_add (ilist, icon); + } + + g_hash_table_iter_init (&iter, icons_table); + while (g_hash_table_iter_next (&iter, &key, &value)) { + GPtrArray *ilist; + AsIconKind ikind; + + ikind = (AsIconKind) GPOINTER_TO_INT (key); + ilist = (GPtrArray*) value; + + if (ikind == AS_ICON_KIND_STOCK) { + /* there can always be only one stock icon, so this is easy */ + if (!stock_icon_added) + as_yaml_emit_entry (emitter, + as_icon_kind_to_string (ikind), + as_icon_get_name (AS_ICON (g_ptr_array_index (ilist, 0)))); + stock_icon_added = TRUE; + } else { + as_yaml_emit_scalar (emitter, as_icon_kind_to_string (ikind)); + as_yaml_sequence_start (emitter); + + for (i = 0; i < ilist->len; i++) { + AsIcon *icon = AS_ICON (g_ptr_array_index (ilist, i)); + + as_yaml_mapping_start (emitter); + + if (ikind == AS_ICON_KIND_REMOTE) + as_yaml_emit_entry (emitter, "url", as_icon_get_url (icon)); + else if (ikind == AS_ICON_KIND_LOCAL) + as_yaml_emit_entry (emitter, "name", as_icon_get_filename (icon)); + else + as_yaml_emit_entry (emitter, "name", as_icon_get_name (icon)); + + if (as_icon_get_width (icon) > 0) { + as_yaml_emit_entry_uint (emitter, + "width", + as_icon_get_width (icon)); + } + + if (as_icon_get_height (icon) > 0) { + as_yaml_emit_entry_uint (emitter, + "height", + as_icon_get_height (icon)); + } + + if (as_icon_get_scale (icon) > 1) { + as_yaml_emit_entry_uint (emitter, + "scale", + as_icon_get_scale (icon)); + } + + as_yaml_mapping_end (emitter); + } + + as_yaml_sequence_end (emitter); + } + } +} + +/** + * as_component_yaml_emit_provides: + */ +static void +as_component_yaml_emit_provides (AsComponent *cpt, yaml_emitter_t *emitter) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + guint i; + + g_autoptr(GPtrArray) dbus_system = NULL; + g_autoptr(GPtrArray) dbus_user = NULL; + + g_autoptr(GPtrArray) fw_runtime = NULL; + g_autoptr(GPtrArray) fw_flashed = NULL; + + if (priv->provided->len == 0) + return; + + as_yaml_emit_scalar (emitter, "Provides"); + as_yaml_mapping_start (emitter); + for (i = 0; i < priv->provided->len; i++) { + AsProvidedKind kind; + GPtrArray *items; + guint j; + AsProvided *prov = AS_PROVIDED (g_ptr_array_index (priv->provided, i)); + + items = as_provided_get_items (prov); + if (items->len == 0) + continue; + + kind = as_provided_get_kind (prov); + switch (kind) { + case AS_PROVIDED_KIND_LIBRARY: + as_yaml_emit_sequence (emitter, + "libraries", + items); + break; + case AS_PROVIDED_KIND_BINARY: + as_yaml_emit_sequence (emitter, + "binaries", + items); + break; + case AS_PROVIDED_KIND_MIMETYPE: + as_yaml_emit_sequence (emitter, + "mimetypes", + items); + break; + case AS_PROVIDED_KIND_PYTHON_2: + as_yaml_emit_sequence (emitter, + "python2", + items); + break; + case AS_PROVIDED_KIND_PYTHON: + as_yaml_emit_sequence (emitter, + "python3", + items); + break; + case AS_PROVIDED_KIND_MODALIAS: + as_yaml_emit_sequence (emitter, + "modaliases", + items); + break; + case AS_PROVIDED_KIND_FONT: + as_yaml_emit_scalar (emitter, "fonts"); + + as_yaml_sequence_start (emitter); + for (j = 0; j < items->len; j++) { + as_yaml_mapping_start (emitter); + as_yaml_emit_entry (emitter, + "name", + (const gchar*) g_ptr_array_index (items, j)); + as_yaml_mapping_end (emitter); + } + as_yaml_sequence_end (emitter); + break; + case AS_PROVIDED_KIND_DBUS_SYSTEM: + if (dbus_system == NULL) { + dbus_system = g_ptr_array_ref (items); + } else { + g_critical ("Hit dbus:system twice, this should never happen!"); + } + break; + case AS_PROVIDED_KIND_DBUS_USER: + if (dbus_user == NULL) { + dbus_user = g_ptr_array_ref (items); + } else { + g_critical ("Hit dbus:user twice, this should never happen!"); + } + break; + case AS_PROVIDED_KIND_FIRMWARE_RUNTIME: + if (fw_runtime == NULL) { + fw_runtime = g_ptr_array_ref (items); + } else { + g_critical ("Hit firmware:runtime twice, this should never happen!"); + } + break; + case AS_PROVIDED_KIND_FIRMWARE_FLASHED: + if (fw_flashed == NULL) { + fw_flashed = g_ptr_array_ref (items); + } else { + g_critical ("Hit dbus-user twice, this should never happen!"); + } + break; + default: + g_warning ("Ignoring unknown type of provided items: %s", as_provided_kind_to_string (kind)); + break; + } + } + + /* dbus subsection */ + if ((dbus_system != NULL) || (dbus_user != NULL)) { + as_yaml_emit_scalar (emitter, "dbus"); + as_yaml_sequence_start (emitter); + + if (dbus_system != NULL) { + for (i = 0; i < dbus_system->len; i++) { + const gchar *value = (const gchar*) g_ptr_array_index (dbus_system, i); + as_yaml_mapping_start (emitter); + + as_yaml_emit_entry (emitter, "type", "system"); + as_yaml_emit_entry (emitter, "service", value); + + as_yaml_mapping_end (emitter); + } + } + + if (dbus_user != NULL) { + for (i = 0; i < dbus_user->len; i++) { + const gchar *value = (const gchar*) g_ptr_array_index (dbus_user, i); + + as_yaml_mapping_start (emitter); + + as_yaml_emit_entry (emitter, "type", "user"); + as_yaml_emit_entry (emitter, "service", value); + + as_yaml_mapping_end (emitter); + } + } + + as_yaml_sequence_end (emitter); + } + + /* firmware subsection */ + if ((fw_runtime != NULL) || (fw_flashed != NULL)) { + as_yaml_emit_scalar (emitter, "firmware"); + as_yaml_sequence_start (emitter); + + if (fw_runtime != NULL) { + for (i = 0; i < fw_runtime->len; i++) { + const gchar *value = g_ptr_array_index (fw_runtime, i); + as_yaml_mapping_start (emitter); + + as_yaml_emit_entry (emitter, "type", "runtime"); + as_yaml_emit_entry (emitter, "guid", value); + + as_yaml_mapping_end (emitter); + } + } + + if (fw_flashed != NULL) { + for (i = 0; i < fw_flashed->len; i++) { + const gchar *value = g_ptr_array_index (fw_flashed, i); + as_yaml_mapping_start (emitter); + + as_yaml_emit_entry (emitter, "type", "flashed"); + as_yaml_emit_entry (emitter, "file", value); + + as_yaml_mapping_end (emitter); + } + } + + as_yaml_sequence_end (emitter); + } + + as_yaml_mapping_end (emitter); +} + +/** + * as_component_yaml_emit_languages: + */ +static void +as_component_yaml_emit_languages (AsComponent *cpt, yaml_emitter_t *emitter) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + GHashTableIter iter; + gpointer key, value; + + if (g_hash_table_size (priv->languages) == 0) + return; + + as_yaml_emit_scalar (emitter, "Languages"); + as_yaml_sequence_start (emitter); + + g_hash_table_iter_init (&iter, priv->languages); + while (g_hash_table_iter_next (&iter, &key, &value)) { + guint percentage; + const gchar *locale; + + locale = (const gchar*) key; + percentage = GPOINTER_TO_INT (value); + + as_yaml_mapping_start (emitter); + as_yaml_emit_entry (emitter, "locale", locale); + as_yaml_emit_entry_uint (emitter, "percentage", percentage); + as_yaml_mapping_end (emitter); + } + + as_yaml_sequence_end (emitter); +} + +/** + * as_component_yaml_emit_custom: + */ +static void +as_component_yaml_emit_custom (AsComponent *cpt, yaml_emitter_t *emitter) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + GHashTableIter iter; + gpointer key, value; + + if (g_hash_table_size (priv->custom) == 0) + return; + + as_yaml_emit_scalar (emitter, "Custom"); + as_yaml_mapping_start (emitter); + + g_hash_table_iter_init (&iter, priv->custom); + while (g_hash_table_iter_next (&iter, &key, &value)) { + as_yaml_emit_entry (emitter, + (const gchar*) key, + (const gchar*) value); + } + + as_yaml_mapping_end (emitter); +} + +/** + * as_component_emit_yaml: + * @cpt: an #AsComponent. + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. + * + * Emit YAML data for this object. + **/ +void +as_component_emit_yaml (AsComponent *cpt, AsContext *ctx, yaml_emitter_t *emitter) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + guint i; + gint res; + const gchar *cstr; + yaml_event_t event; + + /* new document for this component */ + yaml_document_start_event_initialize (&event, NULL, NULL, NULL, FALSE); + res = yaml_emitter_emit (emitter, &event); + g_assert (res); + + /* open main mapping */ + as_yaml_mapping_start (emitter); + + /* write component kind */ + if ((as_context_get_format_version (ctx) < AS_FORMAT_VERSION_V0_10) && (priv->kind == AS_COMPONENT_KIND_DESKTOP_APP)) + cstr = "desktop-app"; + else + cstr = as_component_kind_to_string (priv->kind); + as_yaml_emit_entry (emitter, "Type", cstr); + + /* AppStream-ID */ + as_yaml_emit_entry (emitter, "ID", priv->id); + + /* Priority */ + if (priv->priority != 0) { + g_autofree gchar *priority_str = g_strdup_printf ("%i", priv->priority); + as_yaml_emit_entry (emitter, + "Priority", + priority_str); + } + + /* merge strategy */ + if (priv->merge_kind != AS_MERGE_KIND_NONE) { + as_yaml_emit_entry (emitter, + "Merge", + as_merge_kind_to_string (priv->merge_kind)); + } + + /* SourcePackage */ + as_yaml_emit_entry (emitter, "SourcePackage", priv->source_pkgname); + + /* Package */ + /* NOTE: a DEP-11 components do *not* support multiple packages per component */ + if ((priv->pkgnames != NULL) && (priv->pkgnames[0] != NULL)) + as_yaml_emit_entry (emitter, "Package", priv->pkgnames[0]); + + /* Extends */ + as_yaml_emit_sequence (emitter, "Extends", priv->extends); + + /* Name */ + as_yaml_emit_localized_entry (emitter, "Name", priv->name); + + /* Summary */ + as_yaml_emit_localized_entry (emitter, "Summary", priv->summary); + + /* Description */ + as_yaml_emit_long_localized_entry (emitter, "Description", priv->description); + + /* DeveloperName */ + as_yaml_emit_localized_entry (emitter, "DeveloperName", priv->developer_name); + + /* ProjectGroup */ + as_yaml_emit_entry (emitter, "ProjectGroup", priv->project_group); + + /* ProjectLicense */ + as_yaml_emit_entry (emitter, "ProjectLicense", priv->project_license); + + /* CompulsoryForDesktops */ + as_yaml_emit_sequence_from_str_array (emitter, "CompulsoryForDesktops", priv->compulsory_for_desktops); + + /* Categories */ + as_yaml_emit_sequence_from_str_array (emitter, "Categories", priv->categories); + + /* Keywords */ + as_yaml_emit_localized_strv (emitter, "Keywords", priv->keywords); + + /* Urls */ + if (g_hash_table_size (priv->urls) > 0) { + GHashTableIter iter; + gpointer key, value; + + as_yaml_emit_scalar (emitter, "Url"); + as_yaml_mapping_start (emitter); + + g_hash_table_iter_init (&iter, priv->urls); + while (g_hash_table_iter_next (&iter, &key, &value)) { + as_yaml_emit_entry (emitter, as_url_kind_to_string (GPOINTER_TO_INT (key)), (const gchar*) value); + } + as_yaml_mapping_end (emitter); + } + + /* Icons */ + if (priv->icons->len > 0) { + as_yaml_emit_scalar (emitter, "Icon"); + as_yaml_mapping_start (emitter); + as_component_yaml_emit_icons (cpt, emitter, priv->icons); + as_yaml_mapping_end (emitter); + } + + /* Bundles */ + if (priv->bundles->len > 0) { + as_yaml_emit_scalar (emitter, "Bundles"); + as_yaml_sequence_start (emitter); + + for (i = 0; i < priv->bundles->len; i++) { + AsBundle *bundle = AS_BUNDLE (g_ptr_array_index (priv->bundles, i)); + as_bundle_emit_yaml (bundle, ctx, emitter); + } + + as_yaml_sequence_end (emitter); + } + + /* Launchable */ + if (priv->launchables->len > 0) { + as_yaml_emit_scalar (emitter, "Launchable"); + as_yaml_mapping_start (emitter); + + for (i = 0; i < priv->launchables->len; i++) { + AsLaunchable *launch = AS_LAUNCHABLE (g_ptr_array_index (priv->launchables, i)); + as_launchable_emit_yaml (launch, ctx, emitter); + } + + as_yaml_mapping_end (emitter); + } + + /* Provides */ + as_component_yaml_emit_provides (cpt, emitter); + + /* Screenshots */ + if (priv->screenshots->len > 0) { + as_yaml_emit_scalar (emitter, "Screenshots"); + as_yaml_sequence_start (emitter); + + for (i = 0; i < priv->screenshots->len; i++) { + AsScreenshot *screenshot = AS_SCREENSHOT (g_ptr_array_index (priv->screenshots, i)); + as_screenshot_emit_yaml (screenshot, ctx, emitter); + } + + as_yaml_sequence_end (emitter); + } + + /* Translation details */ + as_component_yaml_emit_languages (cpt, emitter); + + /* Releases */ + if (priv->releases->len > 0) { + as_yaml_emit_scalar (emitter, "Releases"); + as_yaml_sequence_start (emitter); + + for (i = 0; i < priv->releases->len; i++) { + AsRelease *release = AS_RELEASE (g_ptr_array_index (priv->releases, i)); + as_release_emit_yaml (release, ctx, emitter); + } + + as_yaml_sequence_end (emitter); + } + + /* Suggests */ + if (priv->suggestions->len > 0) { + as_yaml_emit_scalar (emitter, "Suggests"); + as_yaml_sequence_start (emitter); + + for (i = 0; i < priv->suggestions->len; i++) { + AsSuggested *suggested = AS_SUGGESTED (g_ptr_array_index (priv->suggestions, i)); + as_suggested_emit_yaml (suggested, ctx, emitter); + } + + as_yaml_sequence_end (emitter); + } + + /* ContentRating */ + if (priv->content_ratings->len > 0) { + as_yaml_emit_scalar (emitter, "ContentRating"); + as_yaml_mapping_start (emitter); + + for (i = 0; i < priv->content_ratings->len; i++) { + AsContentRating *content_rating = AS_CONTENT_RATING (g_ptr_array_index (priv->content_ratings, i)); + as_content_rating_emit_yaml (content_rating, ctx, emitter); + } + + as_yaml_mapping_end (emitter); + } + + /* Recommends */ + if (priv->recommends->len > 0) { + as_yaml_emit_scalar (emitter, "Recommends"); + as_yaml_sequence_start (emitter); + + for (i = 0; i < priv->recommends->len; i++) { + AsRelation *relation = AS_RELATION (g_ptr_array_index (priv->recommends, i)); + as_relation_emit_yaml (relation, ctx, emitter); + } + + as_yaml_sequence_end (emitter); + } + + /* Requires */ + if (priv->requires->len > 0) { + as_yaml_emit_scalar (emitter, "Requires"); + as_yaml_sequence_start (emitter); + + for (i = 0; i < priv->requires->len; i++) { + AsRelation *relation = AS_RELATION (g_ptr_array_index (priv->requires, i)); + as_relation_emit_yaml (relation, ctx, emitter); + } + + as_yaml_sequence_end (emitter); + } + + /* Custom fields */ + as_component_yaml_emit_custom (cpt, emitter); + + /* close main mapping */ + as_yaml_mapping_end (emitter); + + /* finalize the document */ + yaml_document_end_event_initialize (&event, 1); + res = yaml_emitter_emit (emitter, &event); + g_assert (res); +} + +/** + * as_component_to_variant: + * @cpt: an #AsComponent. + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_component_to_variant (AsComponent *cpt, GVariantBuilder *builder) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + GVariantBuilder cb; + guint i; + + /* start serializing our component */ + g_variant_builder_init (&cb, G_VARIANT_TYPE_VARDICT); + + + /* type */ + as_variant_builder_add_kv (&cb, "type", + g_variant_new_uint32 (priv->kind)); + + /* id */ + as_variant_builder_add_kv (&cb, "id", + as_variant_mstring_new (priv->id)); + + /* name */ + as_variant_builder_add_kv (&cb, "name", + as_variant_mstring_new (as_component_get_name (cpt))); + + /* summary */ + as_variant_builder_add_kv (&cb, "summary", + as_variant_mstring_new (as_component_get_summary (cpt))); + + /* source package name */ + as_variant_builder_add_kv (&cb, "source_pkgname", + as_variant_mstring_new (priv->source_pkgname)); + + /* package name */ + as_variant_builder_add_kv (&cb, "pkgnames", + g_variant_new_strv ((const gchar* const*) priv->pkgnames, priv->pkgnames? -1 : 0)); + + /* origin */ + as_variant_builder_add_kv (&cb, "origin", + as_variant_mstring_new (as_component_get_origin (cpt))); + + /* bundles */ + if (priv->bundles->len > 0) { + GVariantBuilder array_b; + g_variant_builder_init (&array_b, G_VARIANT_TYPE_ARRAY); + + for (i = 0; i < priv->bundles->len; i++) { + as_bundle_to_variant (AS_BUNDLE (g_ptr_array_index (priv->bundles, i)), &array_b); + } + + as_variant_builder_add_kv (&cb, "bundles", g_variant_builder_end (&array_b)); + } + + /* launchables */ + if (priv->launchables->len > 0) { + GVariantBuilder array_b; + g_variant_builder_init (&array_b, G_VARIANT_TYPE_ARRAY); + + for (i = 0; i < priv->launchables->len; i++) { + as_launchable_to_variant (AS_LAUNCHABLE (g_ptr_array_index (priv->launchables, i)), &array_b); + } + + as_variant_builder_add_kv (&cb, "launchables", g_variant_builder_end (&array_b)); + } + + /* extends */ + as_variant_builder_add_kv (&cb, "extends", + as_variant_from_string_ptrarray (priv->extends)); + + /* URLs */ + if (g_hash_table_size (priv->urls) > 0) { + GHashTableIter iter; + gpointer key, value; + GVariantBuilder dict_b; + + g_variant_builder_init (&dict_b, G_VARIANT_TYPE_DICTIONARY); + g_hash_table_iter_init (&iter, priv->urls); + while (g_hash_table_iter_next (&iter, &key, &value)) { + g_variant_builder_add (&dict_b, + "{uv}", + (AsUrlKind) GPOINTER_TO_INT (key), + g_variant_new_string ((const gchar*) value)); + } + + as_variant_builder_add_kv (&cb, "urls", + g_variant_builder_end (&dict_b)); + } + + /* icons */ + if (priv->icons->len > 0) { + GVariantBuilder array_b; + g_variant_builder_init (&array_b, G_VARIANT_TYPE_ARRAY); + for (i = 0; i < priv->icons->len; i++) { + AsIcon *icon = AS_ICON (g_ptr_array_index (priv->icons, i)); + as_icon_to_variant (icon, &array_b); + } + + as_variant_builder_add_kv (&cb, "icons", + g_variant_builder_end (&array_b)); + } + + /* long description */ + as_variant_builder_add_kv (&cb, "description", + as_variant_mstring_new (as_component_get_description (cpt))); + + /* categories */ + as_variant_builder_add_kv (&cb, "categories", + as_variant_from_string_ptrarray (priv->categories)); + + + /* compulsory-for-desktop */ + as_variant_builder_add_kv (&cb, "compulsory_for", + as_variant_from_string_ptrarray (priv->compulsory_for_desktops)); + + /* project license */ + as_variant_builder_add_kv (&cb, "project_license", + as_variant_mstring_new (priv->project_license)); + + /* project group */ + as_variant_builder_add_kv (&cb, "project_group", + as_variant_mstring_new (priv->project_group)); + + /* developer name */ + as_variant_builder_add_kv (&cb, "developer_name", + as_variant_mstring_new (as_component_get_developer_name (cpt))); + + /* provided items */ + if (priv->provided->len > 0) { + GVariantBuilder array_b; + g_variant_builder_init (&array_b, G_VARIANT_TYPE_ARRAY); + for (i = 0; i < priv->provided->len; i++) { + AsProvided *prov = AS_PROVIDED (g_ptr_array_index (priv->provided, i)); + as_provided_to_variant (prov, &array_b); + } + + as_variant_builder_add_kv (&cb, "provided", + g_variant_builder_end (&array_b)); + } + + /* screenshots */ + if (priv->screenshots->len > 0) { + GVariantBuilder array_b; + gboolean screenshot_added = FALSE; + g_variant_builder_init (&array_b, G_VARIANT_TYPE_ARRAY); + for (i = 0; i < priv->screenshots->len; i++) { + AsScreenshot *scr = AS_SCREENSHOT (g_ptr_array_index (priv->screenshots, i)); + if (as_screenshot_to_variant (scr, &array_b)) + screenshot_added = TRUE; + } + + if (screenshot_added) + as_variant_builder_add_kv (&cb, "screenshots", + g_variant_builder_end (&array_b)); + } + + /* releases */ + if (priv->releases->len > 0) { + GVariantBuilder array_b; + g_variant_builder_init (&array_b, G_VARIANT_TYPE_ARRAY); + for (i = 0; i < priv->releases->len; i++) { + AsRelease *rel = AS_RELEASE (g_ptr_array_index (priv->releases, i)); + as_release_to_variant (rel, &array_b); + } + + as_variant_builder_add_kv (&cb, "releases", + g_variant_builder_end (&array_b)); + } + + /* languages */ + if (g_hash_table_size (priv->languages) > 0) { + GHashTableIter iter; + gpointer key, value; + GVariantBuilder dict_b; + + g_variant_builder_init (&dict_b, G_VARIANT_TYPE_DICTIONARY); + g_hash_table_iter_init (&iter, priv->languages); + while (g_hash_table_iter_next (&iter, &key, &value)) { + g_variant_builder_add (&dict_b, + "{su}", + (const gchar*) key, + GPOINTER_TO_INT (value)); + } + + as_variant_builder_add_kv (&cb, "languages", + g_variant_builder_end (&dict_b)); + } + + /* suggestions */ + if (priv->suggestions->len > 0) { + GVariantBuilder array_b; + g_variant_builder_init (&array_b, G_VARIANT_TYPE_ARRAY); + for (i = 0; i < priv->suggestions->len; i++) { + AsSuggested *suggested = AS_SUGGESTED (g_ptr_array_index (priv->suggestions, i)); + as_suggested_to_variant (suggested, &array_b); + } + + as_variant_builder_add_kv (&cb, "suggestions", + g_variant_builder_end (&array_b)); + } + + /* content ratings */ + if (priv->content_ratings->len > 0) { + GVariantBuilder array_b; + g_variant_builder_init (&array_b, G_VARIANT_TYPE_ARRAY); + for (i = 0; i < priv->content_ratings->len; i++) { + AsContentRating *rating = AS_CONTENT_RATING (g_ptr_array_index (priv->content_ratings, i)); + as_content_rating_to_variant (rating, &array_b); + } + + as_variant_builder_add_kv (&cb, + "content_ratings", + g_variant_builder_end (&array_b)); + } + + /* requires / recommends */ + if (priv->requires->len > 0 || priv->recommends->len > 0) { + GVariantBuilder array_b; + g_variant_builder_init (&array_b, G_VARIANT_TYPE_ARRAY); + + for (i = 0; i < priv->requires->len; i++) { + AsRelation *relation = AS_RELATION (g_ptr_array_index (priv->requires, i)); + as_relation_to_variant (relation, &array_b); + } + for (i = 0; i < priv->recommends->len; i++) { + AsRelation *relation = AS_RELATION (g_ptr_array_index (priv->recommends, i)); + as_relation_to_variant (relation, &array_b); + } + + as_variant_builder_add_kv (&cb, + "relations", + g_variant_builder_end (&array_b)); + } + + /* custom data */ + if (g_hash_table_size (priv->custom) > 0) { + GHashTableIter iter; + gpointer key, value; + GVariantBuilder dict_b; + + g_variant_builder_init (&dict_b, G_VARIANT_TYPE_DICTIONARY); + g_hash_table_iter_init (&iter, priv->custom); + while (g_hash_table_iter_next (&iter, &key, &value)) { + if ((key == NULL) || (value == NULL)) + continue; + g_variant_builder_add (&dict_b, + "{ss}", + (const gchar*) key, + (const gchar*) value); + } + + as_variant_builder_add_kv (&cb, "custom", + g_variant_builder_end (&dict_b)); + } + + /* search tokens */ + as_component_create_token_cache (cpt); + if (g_hash_table_size (priv->token_cache) > 0) { + GHashTableIter iter; + gpointer key, value; + GVariantBuilder dict_b; + + g_variant_builder_init (&dict_b, G_VARIANT_TYPE_DICTIONARY); + g_hash_table_iter_init (&iter, priv->token_cache); + while (g_hash_table_iter_next (&iter, &key, &value)) { + if (value == NULL) + continue; + + g_variant_builder_add (&dict_b, "{su}", + (const gchar*) key, *((AsTokenType*) value)); + } + + as_variant_builder_add_kv (&cb, "tokens", + g_variant_builder_end (&dict_b)); + } + + /* add to component list */ + g_variant_builder_add_value (builder, g_variant_builder_end (&cb)); +} + +/** + * as_component_set_from_variant: + * @cpt: an #AsComponent. + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_component_set_from_variant (AsComponent *cpt, GVariant *variant, const gchar *locale) +{ + AsComponentPrivate *priv = GET_PRIVATE (cpt); + GVariantDict dict; + const gchar **strv; + GVariant *var; + GVariantIter gvi; + + g_variant_dict_init (&dict, variant); + + /* type */ + priv->kind = as_variant_get_dict_uint32 (&dict, "type"); + + /* active locale */ + as_component_set_active_locale (cpt, locale); + + /* id */ + as_component_set_id (cpt, + as_variant_get_dict_mstr (&dict, "id", &var)); + g_variant_unref (var); + + /* name */ + as_component_set_name (cpt, + as_variant_get_dict_mstr (&dict, "name", &var), + locale); + g_variant_unref (var); + + /* summary */ + as_component_set_summary (cpt, + as_variant_get_dict_mstr (&dict, "summary", &var), + locale); + g_variant_unref (var); + + /* source package name */ + as_component_set_source_pkgname (cpt, + as_variant_get_dict_mstr (&dict, "source_pkgname", &var)); + g_variant_unref (var); + + /* package names */ + strv = as_variant_get_dict_strv (&dict, "pkgnames", &var); + as_component_set_pkgnames (cpt, (gchar **) strv); + g_free (strv); + g_variant_unref (var); + + /* origin */ + as_component_set_origin (cpt, as_variant_get_dict_mstr (&dict, "origin", &var)); + g_variant_unref (var); + + /* bundles */ + var = g_variant_dict_lookup_value (&dict, "bundles", G_VARIANT_TYPE_ARRAY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autoptr(AsBundle) bundle = as_bundle_new (); + if (as_bundle_set_from_variant (bundle, child)) + as_component_add_bundle (cpt, bundle); + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* launchables */ + var = g_variant_dict_lookup_value (&dict, "launchables", G_VARIANT_TYPE_ARRAY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autoptr(AsLaunchable) launch = as_launchable_new (); + if (as_launchable_set_from_variant (launch, child)) + as_component_add_launchable (cpt, launch); + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* extends */ + as_variant_to_string_ptrarray_by_dict (&dict, + "extends", + priv->extends); + + /* URLs */ + var = g_variant_dict_lookup_value (&dict, + "urls", + G_VARIANT_TYPE_DICTIONARY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + AsUrlKind kind; + g_autoptr(GVariant) url_var = NULL; + + g_variant_get (child, "{uv}", &kind, &url_var); + as_component_add_url (cpt, + kind, + g_variant_get_string (url_var, NULL)); + + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* icons */ + var = g_variant_dict_lookup_value (&dict, + "icons", + G_VARIANT_TYPE_ARRAY); + if (var != NULL) { + GVariant *child; + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autoptr(AsIcon) icon = as_icon_new (); + if (as_icon_set_from_variant (icon, child)) + as_component_add_icon (cpt, icon); + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* long description */ + as_component_set_description (cpt, + as_variant_get_dict_mstr (&dict, "description", &var), + locale); + g_variant_unref (var); + + /* categories */ + as_variant_to_string_ptrarray_by_dict (&dict, + "categories", + priv->categories); + + /* compulsory-for-desktop */ + as_variant_to_string_ptrarray_by_dict (&dict, + "compulsory_for", + priv->compulsory_for_desktops); + + /* project license */ + as_component_set_project_license (cpt, as_variant_get_dict_mstr (&dict, "project_license", &var)); + g_variant_unref (var); + + /* project group */ + as_component_set_project_group (cpt, as_variant_get_dict_mstr (&dict, "project_group", &var)); + g_variant_unref (var); + + /* developer name */ + as_component_set_developer_name (cpt, + as_variant_get_dict_mstr (&dict, "developer_name", &var), + locale); + g_variant_unref (var); + + + /* provided items */ + var = g_variant_dict_lookup_value (&dict, + "provided", + G_VARIANT_TYPE_ARRAY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autoptr(AsProvided) prov = as_provided_new (); + + if (as_provided_set_from_variant (prov, child)) + as_component_add_provided (cpt, prov); + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* screenshots */ + var = g_variant_dict_lookup_value (&dict, + "screenshots", + G_VARIANT_TYPE_ARRAY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autoptr(AsScreenshot) scr = as_screenshot_new (); + if (as_screenshot_set_from_variant (scr, child, locale)) + as_component_add_screenshot (cpt, scr); + + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* releases */ + var = g_variant_dict_lookup_value (&dict, + "releases", + G_VARIANT_TYPE_ARRAY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autoptr(AsRelease) rel = as_release_new (); + if (as_release_set_from_variant (rel, child, locale)) + as_component_add_release (cpt, rel); + + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* languages */ + var = g_variant_dict_lookup_value (&dict, + "languages", + G_VARIANT_TYPE_DICTIONARY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + guint percentage; + g_autofree gchar *lang; + + g_variant_get (child, "{su}", &lang, &percentage); + as_component_add_language (cpt, lang, percentage); + + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* suggestions */ + var = g_variant_dict_lookup_value (&dict, + "suggestions", + G_VARIANT_TYPE_ARRAY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autoptr(AsSuggested) suggested = as_suggested_new (); + if (as_suggested_set_from_variant (suggested, child)) + as_component_add_suggested (cpt, suggested); + + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* content ratings */ + var = g_variant_dict_lookup_value (&dict, + "content_ratings", + G_VARIANT_TYPE_ARRAY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autoptr(AsContentRating) rating = as_content_rating_new (); + if (as_content_rating_set_from_variant (rating, child)) + as_component_add_content_rating (cpt, rating); + + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* requires / recommends */ + var = g_variant_dict_lookup_value (&dict, + "relations", + G_VARIANT_TYPE_ARRAY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autoptr(AsRelation) relation = as_relation_new (); + if (as_relation_set_from_variant (relation, child)) + as_component_add_relation (cpt, relation); + + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* custom data */ + var = g_variant_dict_lookup_value (&dict, + "custom", + G_VARIANT_TYPE_DICTIONARY); + if (var != NULL) { + GVariant *child; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + g_autofree gchar *key = NULL; + g_autofree gchar *value = NULL; + + g_variant_get (child, "{ss}", &key, &value); + as_component_insert_custom_value (cpt, key, value); + + g_variant_unref (child); + } + g_variant_unref (var); + } + + /* search tokens */ + var = g_variant_dict_lookup_value (&dict, + "tokens", + G_VARIANT_TYPE_DICTIONARY); + if (var != NULL) { + GVariant *child; + gboolean tokens_added = FALSE; + + g_variant_iter_init (&gvi, var); + while ((child = g_variant_iter_next_value (&gvi))) { + guint score; + gchar *token; + AsTokenType *match_pval; + + g_variant_get (child, "{su}", &token, &score); + + match_pval = g_new0 (AsTokenType, 1); + *match_pval = score; + + g_hash_table_insert (priv->token_cache, + token, + match_pval); + tokens_added = TRUE; + + g_variant_unref (child); + } + + /* we added things to the token cache, so we just assume it's valid */ + if (tokens_added) + as_component_set_token_cache_valid (cpt, TRUE); + + g_variant_unref (var); + } + + return TRUE; +} + +/** + * as_component_get_desktop_id: + * @cpt: a #AsComponent instance. + * + * Get the Desktop Entry ID for this component, if it is + * of type "desktop-application". + * For most desktop-application components, this is the name + * of the .desktop file. + * + * Refer to https://specifications.freedesktop.org/desktop-entry-spec/latest/ape.html for more + * information. + * + * Returns: The desktop file id. + * + * Since: 0.9.8 + * Deprecated: 0.11.0: Replaced by #AsLaunchable and %as_component_get_launchable + */ +const gchar* +as_component_get_desktop_id (AsComponent *cpt) +{ + AsLaunchable *launch; + GPtrArray *entries; + + launch = as_component_get_launchable (cpt, AS_LAUNCHABLE_KIND_DESKTOP_ID); + if (launch == NULL) + return NULL; + + entries = as_launchable_get_entries (launch); + if (entries->len <= 0) + return 0; + + return (const gchar*) g_ptr_array_index (entries, 0); +} + +/** + * as_component_get_property: + */ +static void +as_component_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) +{ + AsComponent *cpt; + cpt = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_COMPONENT, AsComponent); + AsComponentPrivate *priv = GET_PRIVATE (cpt); + + switch (property_id) { + case AS_COMPONENT_KIND: + g_value_set_enum (value, as_component_get_kind (cpt)); + break; + case AS_COMPONENT_PKGNAMES: + g_value_set_boxed (value, as_component_get_pkgnames (cpt)); + break; + case AS_COMPONENT_ID: + g_value_set_string (value, as_component_get_id (cpt)); + break; + case AS_COMPONENT_NAME: + g_value_set_string (value, as_component_get_name (cpt)); + break; + case AS_COMPONENT_SUMMARY: + g_value_set_string (value, as_component_get_summary (cpt)); + break; + case AS_COMPONENT_DESCRIPTION: + g_value_set_string (value, as_component_get_description (cpt)); + break; + case AS_COMPONENT_KEYWORDS: + g_value_set_boxed (value, as_component_get_keywords (cpt)); + break; + case AS_COMPONENT_ICONS: + g_value_set_pointer (value, as_component_get_icons (cpt)); + break; + case AS_COMPONENT_URLS: + g_value_set_boxed (value, priv->urls); + break; + case AS_COMPONENT_CATEGORIES: + g_value_set_boxed (value, as_component_get_categories (cpt)); + break; + case AS_COMPONENT_PROJECT_LICENSE: + g_value_set_string (value, as_component_get_project_license (cpt)); + break; + case AS_COMPONENT_PROJECT_GROUP: + g_value_set_string (value, as_component_get_project_group (cpt)); + break; + case AS_COMPONENT_DEVELOPER_NAME: + g_value_set_string (value, as_component_get_developer_name (cpt)); + break; + case AS_COMPONENT_SCREENSHOTS: + g_value_set_boxed (value, as_component_get_screenshots (cpt)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +/** + * as_component_set_property: + */ +static void +as_component_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) +{ + AsComponent *cpt; + cpt = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_COMPONENT, AsComponent); switch (property_id) { case AS_COMPONENT_KIND: @@ -1970,9 +5765,6 @@ case AS_COMPONENT_KEYWORDS: as_component_set_keywords (cpt, g_value_get_boxed (value), NULL); break; - case AS_COMPONENT_CATEGORIES: - as_component_set_categories (cpt, g_value_get_boxed (value)); - break; case AS_COMPONENT_PROJECT_LICENSE: as_component_set_project_license (cpt, g_value_get_string (value)); break; @@ -2077,7 +5869,7 @@ */ g_object_class_install_property (object_class, AS_COMPONENT_CATEGORIES, - g_param_spec_boxed ("categories", "categories", "categories", G_TYPE_STRV, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_param_spec_boxed ("categories", "categories", "categories", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); /** * AsComponent:project-license: * diff -Nru appstream-0.9.4/src/as-component.h appstream-0.12.0/src/as-component.h --- appstream-0.9.4/src/as-component.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-component.h 2018-04-04 15:53:56.000000000 +0000 @@ -32,6 +32,12 @@ #include "as-screenshot.h" #include "as-release.h" #include "as-translation.h" +#include "as-suggested.h" +#include "as-category.h" +#include "as-bundle.h" +#include "as-content-rating.h" +#include "as-launchable.h" +#include "as-relation.h" G_BEGIN_DECLS @@ -55,11 +61,15 @@ * @AS_COMPONENT_KIND_UNKNOWN: Type invalid or not known * @AS_COMPONENT_KIND_GENERIC: A generic (= without specialized type) component * @AS_COMPONENT_KIND_DESKTOP_APP: An application with a .desktop-file + * @AS_COMPONENT_KIND_CONSOLE_APP: A console application + * @AS_COMPONENT_KIND_WEB_APP: A web application + * @AS_COMPONENT_KIND_ADDON: An extension of existing software, which does not run standalone * @AS_COMPONENT_KIND_FONT: A font * @AS_COMPONENT_KIND_CODEC: A multimedia codec * @AS_COMPONENT_KIND_INPUTMETHOD: An input-method provider - * @AS_COMPONENT_KIND_ADDON: An extension of existing software, which does not run standalone * @AS_COMPONENT_KIND_FIRMWARE: Firmware + * @AS_COMPONENT_KIND_DRIVER: A driver + * @AS_COMPONENT_KIND_LOCALIZATION: Software localization (usually l10n resources) * * The type of an #AsComponent. **/ @@ -67,49 +77,110 @@ AS_COMPONENT_KIND_UNKNOWN, AS_COMPONENT_KIND_GENERIC, AS_COMPONENT_KIND_DESKTOP_APP, + AS_COMPONENT_KIND_CONSOLE_APP, + AS_COMPONENT_KIND_WEB_APP, + AS_COMPONENT_KIND_ADDON, AS_COMPONENT_KIND_FONT, AS_COMPONENT_KIND_CODEC, AS_COMPONENT_KIND_INPUTMETHOD, - AS_COMPONENT_KIND_ADDON, AS_COMPONENT_KIND_FIRMWARE, + AS_COMPONENT_KIND_DRIVER, + AS_COMPONENT_KIND_LOCALIZATION, + AS_COMPONENT_KIND_SERVICE, /*< private >*/ AS_COMPONENT_KIND_LAST } AsComponentKind; #define AS_TYPE_COMPONENT_KIND (as_component_kind_get_type ()) - GType as_component_kind_get_type (void) G_GNUC_CONST; const gchar *as_component_kind_to_string (AsComponentKind kind); AsComponentKind as_component_kind_from_string (const gchar *kind_str); +/** + * AsMergeKind: + * @AS_MERGE_KIND_NONE: No merge is happening. + * @AS_MERGE_KIND_REPLACE: Merge replacing data of target. + * @AS_MERGE_KIND_APPEND: Merge appending data to target. + * + * Defines how #AsComponent data should be merged if the component is + * set for merge. + **/ +typedef enum { + AS_MERGE_KIND_NONE, + AS_MERGE_KIND_REPLACE, + AS_MERGE_KIND_APPEND, + /*< private >*/ + AS_MERGE_KIND_LAST +} AsMergeKind; + +const gchar *as_merge_kind_to_string (AsMergeKind kind); +AsMergeKind as_merge_kind_from_string (const gchar *kind_str); + +/** + * AsComponentScope: + * @AS_COMPONENT_SCOPE_UNKNOWN: Unknown scope + * @AS_COMPONENT_SCOPE_SYSTEM: System scope + * @AS_COMPONENT_SCOPE_USER: User scope + * + * Scope of the #AsComponent (system-wide or user-scope) + **/ +typedef enum { + AS_COMPONENT_SCOPE_UNKNOWN, + AS_COMPONENT_SCOPE_SYSTEM, + AS_COMPONENT_SCOPE_USER, + /*< private >*/ + AS_COMPONENT_SCOPE_LAST +} AsComponentScope; + +/** + * AsValueFlags: + * @AS_VALUE_FLAG_NONE: No flags. + * @AS_VALUE_FLAG_DUPLICATE_CHECK: Check for duplicates when adding items to list values. + * @AS_VALUE_FLAG_NO_TRANSLATION_FALLBACK: Don't fall back to C when retrieving translated values. + * + * Set how values assigned to an #AsComponent should be treated when + * they are set or retrieved. + */ +typedef enum { + AS_VALUE_FLAG_NONE = 0, + AS_VALUE_FLAG_DUPLICATE_CHECK = 1 << 0, + AS_VALUE_FLAG_NO_TRANSLATION_FALLBACK = 1 << 1 +} AsValueFlags; + AsComponent *as_component_new (void); -gboolean as_component_is_valid (AsComponent *cpt); -gchar *as_component_to_string (AsComponent *cpt); +AsValueFlags as_component_get_value_flags (AsComponent *cpt); +void as_component_set_value_flags (AsComponent *cpt, + AsValueFlags flags); -gchar *as_component_get_active_locale (AsComponent *cpt); +const gchar *as_component_get_active_locale (AsComponent *cpt); void as_component_set_active_locale (AsComponent *cpt, const gchar *locale); -AsComponentKind as_component_get_kind (AsComponent *cpt); -void as_component_set_kind (AsComponent *cpt, - AsComponentKind value); - const gchar *as_component_get_id (AsComponent *cpt); void as_component_set_id (AsComponent *cpt, const gchar *value); +const gchar *as_component_get_data_id (AsComponent *cpt); +void as_component_set_data_id (AsComponent *cpt, + const gchar *value); + +AsComponentKind as_component_get_kind (AsComponent *cpt); +void as_component_set_kind (AsComponent *cpt, + AsComponentKind value); + const gchar *as_component_get_origin (AsComponent *cpt); void as_component_set_origin (AsComponent *cpt, const gchar *origin); +gchar *as_component_get_pkgname (AsComponent *cpt); gchar **as_component_get_pkgnames (AsComponent *cpt); void as_component_set_pkgnames (AsComponent *cpt, - gchar **value); + gchar **packages); const gchar *as_component_get_source_pkgname (AsComponent *cpt); void as_component_set_source_pkgname (AsComponent *cpt, - const gchar* spkgname); + const gchar *spkgname); const gchar *as_component_get_name (AsComponent *cpt); void as_component_set_name (AsComponent *cpt, @@ -126,9 +197,19 @@ const gchar *value, const gchar *locale); +GPtrArray *as_component_get_launchables (AsComponent *cpt); +AsLaunchable *as_component_get_launchable (AsComponent *cpt, + AsLaunchableKind kind); +void as_component_add_launchable (AsComponent *cpt, + AsLaunchable *launchable); + +const gchar *as_component_get_metadata_license (AsComponent *cpt); +void as_component_set_metadata_license (AsComponent *cpt, + const gchar *value); + const gchar *as_component_get_project_license (AsComponent *cpt); void as_component_set_project_license (AsComponent *cpt, - const gchar *value); + const gchar *value); const gchar *as_component_get_project_group (AsComponent *cpt); void as_component_set_project_group (AsComponent *cpt, @@ -139,15 +220,15 @@ const gchar *value, const gchar *locale); -gchar **as_component_get_compulsory_for_desktops (AsComponent *cpt); -void as_component_set_compulsory_for_desktops (AsComponent *cpt, - gchar **value); +GPtrArray *as_component_get_compulsory_for_desktops (AsComponent *cpt); +void as_component_set_compulsory_for_desktop (AsComponent *cpt, + const gchar *desktop); gboolean as_component_is_compulsory_for_desktop (AsComponent *cpt, - const gchar *desktop); + const gchar *desktop); -gchar **as_component_get_categories (AsComponent *cpt); -void as_component_set_categories (AsComponent *cpt, - gchar **value); +GPtrArray *as_component_get_categories (AsComponent *cpt); +void as_component_add_category (AsComponent *cpt, + const gchar *category); gboolean as_component_has_category (AsComponent *cpt, const gchar *category); @@ -167,11 +248,11 @@ void as_component_add_icon (AsComponent *cpt, AsIcon *icon); +GPtrArray *as_component_get_provided (AsComponent *cpt); void as_component_add_provided (AsComponent *cpt, AsProvided *prov); AsProvided *as_component_get_provided_for_kind (AsComponent *cpt, AsProvidedKind kind); -GList *as_component_get_provided (AsComponent *cpt); const gchar *as_component_get_url (AsComponent *cpt, AsUrlKind url_kind); @@ -187,9 +268,9 @@ void as_component_add_extends (AsComponent *cpt, const gchar *cpt_id); -GPtrArray *as_component_get_extensions (AsComponent *cpt); -void as_component_add_extension (AsComponent *cpt, - const gchar *cpt_id); +GPtrArray *as_component_get_addons (AsComponent *cpt); +void as_component_add_addon (AsComponent *cpt, + AsComponent *addon); GList *as_component_get_languages (AsComponent *cpt); gint as_component_get_language (AsComponent *cpt, @@ -203,11 +284,57 @@ AsTranslation *tr); gboolean as_component_has_bundle (AsComponent *cpt); -const gchar *as_component_get_bundle_id (AsComponent *cpt, - AsBundleKind bundle_kind); -void as_component_add_bundle_id (AsComponent *cpt, - AsBundleKind bundle_kind, - const gchar *id); +GPtrArray *as_component_get_bundles (AsComponent *cpt); +AsBundle *as_component_get_bundle (AsComponent *cpt, + AsBundleKind bundle_kind); +void as_component_add_bundle (AsComponent *cpt, + AsBundle *bundle); + +GPtrArray *as_component_get_suggested (AsComponent *cpt); +void as_component_add_suggested (AsComponent *cpt, + AsSuggested *suggested); + +GPtrArray *as_component_get_search_tokens (AsComponent *cpt); +guint as_component_search_matches (AsComponent *cpt, + const gchar *term); +guint as_component_search_matches_all (AsComponent *cpt, + gchar **terms); + +AsMergeKind as_component_get_merge_kind (AsComponent *cpt); +void as_component_set_merge_kind (AsComponent *cpt, + AsMergeKind kind); + +gboolean as_component_is_member_of_category (AsComponent *cpt, + AsCategory *category); + +gboolean as_component_is_ignored (AsComponent *cpt); + +gboolean as_component_is_valid (AsComponent *cpt); +gchar *as_component_to_string (AsComponent *cpt); + +GHashTable *as_component_get_custom (AsComponent *cpt); +gchar *as_component_get_custom_value (AsComponent *cpt, + const gchar *key); +gboolean as_component_insert_custom_value (AsComponent *cpt, + const gchar *key, + const gchar *value); + +GPtrArray *as_component_get_content_ratings (AsComponent *cpt); +AsContentRating *as_component_get_content_rating (AsComponent *cpt, + const gchar *kind); +void as_component_add_content_rating (AsComponent *cpt, + AsContentRating *content_rating); + +GPtrArray *as_component_get_recommends (AsComponent *cpt); +GPtrArray *as_component_get_requires (AsComponent *cpt); +void as_component_add_relation (AsComponent *cpt, + AsRelation *relation); + + +/* DEPRECATED */ + +G_GNUC_DEPRECATED +const gchar *as_component_get_desktop_id (AsComponent *cpt); G_END_DECLS diff -Nru appstream-0.9.4/src/as-component-private.h appstream-0.12.0/src/as-component-private.h --- appstream-0.9.4/src/as-component-private.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-component-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -21,30 +21,52 @@ #ifndef __AS_COMPONENT_PRIVATE_H #define __AS_COMPONENT_PRIVATE_H -#include #include "as-component.h" +#include "as-settings-private.h" +#include "as-xml.h" +#include "as-yaml.h" G_BEGIN_DECLS +#pragma GCC visibility push(hidden) -int as_component_get_priority (AsComponent *cpt); +/** + * AsOriginKind: + * @AS_ORIGIN_KIND_UNKNOWN: Unknown origin kind. + * @AS_ORIGIN_KIND_METAINFO: Origin was a metainfo file. + * @AS_ORIGIN_KIND_COLLECTION: Origin was an AppStream collection file. + * @AS_ORIGIN_KIND_DESKTOP_ENTRY: Origin was a .desktop file. + * + * Scope of the #AsComponent (system-wide or user-scope) + **/ +typedef enum { + AS_ORIGIN_KIND_UNKNOWN, + AS_ORIGIN_KIND_METAINFO, + AS_ORIGIN_KIND_COLLECTION, + AS_ORIGIN_KIND_DESKTOP_ENTRY, + /*< private >*/ + AS_ORIGIN_KIND_LAST +} AsOriginKind; + +const gchar *as_component_scope_to_string (AsComponentScope scope); +AsMergeKind as_component_scope_from_string (const gchar *scope_str); + +typedef guint16 AsTokenType; /* big enough for both bitshifts */ + +AS_INTERNAL_VISIBLE +gint as_component_get_priority (AsComponent *cpt); +AS_INTERNAL_VISIBLE void as_component_set_priority (AsComponent *cpt, - int priority); - -GHashTable *as_component_get_languages_map (AsComponent *cpt); + gint priority); void as_component_complete (AsComponent *cpt, gchar *scr_base_url, - gchar **icon_paths); + GPtrArray *icon_paths); + +AS_INTERNAL_VISIBLE +GHashTable *as_component_get_languages_table (AsComponent *cpt); -GHashTable *as_component_get_name_table (AsComponent *cpt); -GHashTable *as_component_get_summary_table (AsComponent *cpt); -GHashTable *as_component_get_description_table (AsComponent *cpt); -GHashTable *as_component_get_developer_name_table (AsComponent *cpt); -GHashTable *as_component_get_keywords_table (AsComponent *cpt); -GHashTable *as_component_get_urls_table (AsComponent *cpt); -GHashTable *as_component_get_bundles_table (AsComponent *cpt); -void as_component_set_bundles_table (AsComponent *cpt, - GHashTable *bundles); +void as_component_set_bundles_array (AsComponent *cpt, + GPtrArray *bundles); gboolean as_component_has_package (AsComponent *cpt); gboolean as_component_has_install_candidate (AsComponent *cpt); @@ -53,13 +75,63 @@ AsProvidedKind kind, const gchar *item); -void as_component_set_categories_from_str (AsComponent *cpt, - const gchar* categories_str); - const gchar *as_component_get_architecture (AsComponent *cpt); void as_component_set_architecture (AsComponent *cpt, const gchar *arch); +void as_component_create_token_cache (AsComponent *cpt); +GHashTable *as_component_get_token_cache_table (AsComponent *cpt); +void as_component_set_token_cache_valid (AsComponent *cpt, + gboolean valid); + +guint as_component_get_sort_score (AsComponent *cpt); +void as_component_set_sort_score (AsComponent *cpt, + guint score); + +void as_component_set_ignored (AsComponent *cpt, + gboolean ignore); + +AsComponentScope as_component_get_scope (AsComponent *cpt); +void as_component_set_scope (AsComponent *cpt, + AsComponentScope scope); + +AsOriginKind as_component_get_origin_kind (AsComponent *cpt); +void as_component_set_origin_kind (AsComponent *cpt, + AsOriginKind okind); + +gboolean as_component_merge (AsComponent *cpt, + AsComponent *source); +void as_component_merge_with_mode (AsComponent *cpt, + AsComponent *source, + AsMergeKind merge_kind); + +AsContext *as_component_get_context (AsComponent *cpt); +void as_component_set_context (AsComponent *cpt, + AsContext *context); + +gboolean as_component_load_from_xml (AsComponent *cpt, + AsContext *ctx, + xmlNode *node, + GError **error); +xmlNode *as_component_to_xml_node (AsComponent *cpt, + AsContext *ctx, + xmlNode *root); + +gboolean as_component_load_from_yaml (AsComponent *cpt, + AsContext *ctx, + GNode *root, + GError **error); +void as_component_emit_yaml (AsComponent *cpt, + AsContext *ctx, + yaml_emitter_t *emitter); + +void as_component_to_variant (AsComponent *cpt, + GVariantBuilder *builder); +gboolean as_component_set_from_variant (AsComponent *cpt, + GVariant *variant, + const gchar *locale); + +#pragma GCC visibility pop G_END_DECLS #endif /* __AS_COMPONENT_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-content-rating.c appstream-0.12.0/src/as-content-rating.c --- appstream-0.9.4/src/as-content-rating.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-content-rating.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,571 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Richard Hughes + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * SECTION:as-content-rating + * @short_description: Object representing a content rating + * @include: appstream.h + * @stability: Unstable + * + * Content ratings are age-specific guidelines for applications. + * + * See also: #AsComponent + */ + +#include "config.h" + +#include "as-content-rating.h" +#include "as-content-rating-private.h" + +#include "as-variant-cache.h" + +typedef struct +{ + gchar *kind; + GPtrArray *keys; /* of AsContentRatingKey */ +} AsContentRatingPrivate; + +G_DEFINE_TYPE_WITH_PRIVATE (AsContentRating, as_content_rating, G_TYPE_OBJECT) + +#define GET_PRIVATE(o) (as_content_rating_get_instance_private (o)) + +static void +as_content_rating_finalize (GObject *object) +{ + AsContentRating *content_rating = AS_CONTENT_RATING (object); + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + + if (priv->kind != NULL) + g_free (priv->kind); + g_ptr_array_unref (priv->keys); + + G_OBJECT_CLASS (as_content_rating_parent_class)->finalize (object); +} + +static void +as_content_rating_key_free (AsContentRatingKey *key) +{ + if (key->id != NULL) + g_free (key->id); + g_slice_free (AsContentRatingKey, key); +} + +static void +as_content_rating_init (AsContentRating *content_rating) +{ + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + priv->keys = g_ptr_array_new_with_free_func ((GDestroyNotify) as_content_rating_key_free); +} + +static void +as_content_rating_class_init (AsContentRatingClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->finalize = as_content_rating_finalize; +} + +/** + * as_content_rating_get_value: + * @content_rating: a #AsContentRating + * @id: A ratings ID, e.g. `violence-bloodshed`. + * + * Gets the value of a content rating key. + * + * Returns: the #AsContentRatingValue, or %AS_CONTENT_RATING_VALUE_UNKNOWN + * + * Since: 0.11.0 + **/ +AsContentRatingValue +as_content_rating_get_value (AsContentRating *content_rating, const gchar *id) +{ + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + guint i; + for (i = 0; i < priv->keys->len; i++) { + AsContentRatingKey *key = g_ptr_array_index (priv->keys, i); + if (g_strcmp0 (key->id, id) == 0) + return key->value; + } + return AS_CONTENT_RATING_VALUE_UNKNOWN; +} + +/** + * as_content_rating_set_value: + * @content_rating: a #AsContentRating + * @id: A ratings ID, e.g. `violence-bloodshed`. + * @value: A #AsContentRatingValue, e.g. %AS_CONTENT_RATING_VALUE_INTENSE + * + * Sets the value of a content rating key. + * + * Since: 0.11.0 + **/ +void +as_content_rating_set_value (AsContentRating *content_rating, const gchar *id, AsContentRatingValue value) +{ + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + AsContentRatingKey *key; + + key = g_slice_new0 (AsContentRatingKey); + key->id = g_strdup (id); + key->value = value; + g_ptr_array_add (priv->keys, key); +} + +/** + * as_content_rating_value_to_string: + * @value: the #AsContentRatingValue. + * + * Converts the enumerated value to an text representation. + * + * Returns: string version of @value + * + * Since: 0.11.0 + **/ +const gchar * +as_content_rating_value_to_string (AsContentRatingValue value) +{ + if (value == AS_CONTENT_RATING_VALUE_NONE) + return "none"; + if (value == AS_CONTENT_RATING_VALUE_MILD) + return "mild"; + if (value == AS_CONTENT_RATING_VALUE_MODERATE) + return "moderate"; + if (value == AS_CONTENT_RATING_VALUE_INTENSE) + return "intense"; + return "unknown"; +} + +/** + * as_content_rating_value_from_string: + * @value: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsContentRatingValue or %AS_CONTENT_RATING_VALUE_UNKNOWN for unknown + * + * Since: 0.11.0 + **/ +AsContentRatingValue +as_content_rating_value_from_string (const gchar *value) +{ + if (g_strcmp0 (value, "none") == 0) + return AS_CONTENT_RATING_VALUE_NONE; + if (g_strcmp0 (value, "mild") == 0) + return AS_CONTENT_RATING_VALUE_MILD; + if (g_strcmp0 (value, "moderate") == 0) + return AS_CONTENT_RATING_VALUE_MODERATE; + if (g_strcmp0 (value, "intense") == 0) + return AS_CONTENT_RATING_VALUE_INTENSE; + return AS_CONTENT_RATING_VALUE_UNKNOWN; +} + +/** + * as_content_rating_id_value_to_csm_age: + * @id: the subsection ID e.g. "violence-cartoon" + * @value: the #AsContentRatingValue, e.g. %AS_CONTENT_RATING_VALUE_INTENSE + * + * Gets the Common Sense Media approved age for a specific rating level. + * + * Returns: The age in years, or 0 for no details. + * + * Since: 0.11.0 + **/ +static guint +as_content_rating_id_value_to_csm_age (const gchar *id, AsContentRatingValue value) +{ + guint i; + struct { + const gchar *id; + AsContentRatingValue value; + guint csm_age; + } to_csm_age[] = { + { "violence-cartoon", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "violence-cartoon", AS_CONTENT_RATING_VALUE_MILD, 3 }, + { "violence-cartoon", AS_CONTENT_RATING_VALUE_MODERATE, 4 }, + { "violence-cartoon", AS_CONTENT_RATING_VALUE_INTENSE, 6 }, + { "violence-fantasy", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "violence-fantasy", AS_CONTENT_RATING_VALUE_MILD, 3 }, + { "violence-fantasy", AS_CONTENT_RATING_VALUE_MODERATE, 7 }, + { "violence-fantasy", AS_CONTENT_RATING_VALUE_INTENSE, 8 }, + { "violence-realistic", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "violence-realistic", AS_CONTENT_RATING_VALUE_MILD, 4 }, + { "violence-realistic", AS_CONTENT_RATING_VALUE_MODERATE, 9 }, + { "violence-realistic", AS_CONTENT_RATING_VALUE_INTENSE, 14 }, + { "violence-bloodshed", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "violence-bloodshed", AS_CONTENT_RATING_VALUE_MILD, 9 }, + { "violence-bloodshed", AS_CONTENT_RATING_VALUE_MODERATE, 11 }, + { "violence-bloodshed", AS_CONTENT_RATING_VALUE_INTENSE, 18 }, + { "violence-sexual", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "violence-sexual", AS_CONTENT_RATING_VALUE_INTENSE, 18 }, + { "drugs-alcohol", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "drugs-alcohol", AS_CONTENT_RATING_VALUE_MILD, 11 }, + { "drugs-alcohol", AS_CONTENT_RATING_VALUE_MODERATE, 13 }, + { "drugs-narcotics", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "drugs-narcotics", AS_CONTENT_RATING_VALUE_MILD, 12 }, + { "drugs-narcotics", AS_CONTENT_RATING_VALUE_MODERATE, 14 }, + { "drugs-tobacco", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "drugs-tobacco", AS_CONTENT_RATING_VALUE_MILD, 10 }, + { "drugs-tobacco", AS_CONTENT_RATING_VALUE_MODERATE, 13 }, + { "sex-nudity", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "sex-nudity", AS_CONTENT_RATING_VALUE_MILD, 12 }, + { "sex-nudity", AS_CONTENT_RATING_VALUE_MODERATE, 14 }, + { "sex-themes", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "sex-themes", AS_CONTENT_RATING_VALUE_MILD, 13 }, + { "sex-themes", AS_CONTENT_RATING_VALUE_MODERATE, 14 }, + { "sex-themes", AS_CONTENT_RATING_VALUE_INTENSE, 15 }, + { "language-profanity", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "language-profanity", AS_CONTENT_RATING_VALUE_MILD, 8 }, + { "language-profanity", AS_CONTENT_RATING_VALUE_MODERATE, 11 }, + { "language-profanity", AS_CONTENT_RATING_VALUE_INTENSE, 14 }, + { "language-humor", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "language-humor", AS_CONTENT_RATING_VALUE_MILD, 3 }, + { "language-humor", AS_CONTENT_RATING_VALUE_MODERATE, 8 }, + { "language-humor", AS_CONTENT_RATING_VALUE_INTENSE, 14 }, + { "language-discrimination", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "language-discrimination", AS_CONTENT_RATING_VALUE_MILD, 9 }, + { "language-discrimination", AS_CONTENT_RATING_VALUE_MODERATE, 10 }, + { "language-discrimination", AS_CONTENT_RATING_VALUE_INTENSE, 11 }, + { "money-advertising", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "money-advertising", AS_CONTENT_RATING_VALUE_MILD, 7 }, + { "money-advertising", AS_CONTENT_RATING_VALUE_MODERATE, 8 }, + { "money-advertising", AS_CONTENT_RATING_VALUE_INTENSE, 10 }, + { "money-gambling", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "money-gambling", AS_CONTENT_RATING_VALUE_MILD, 7 }, + { "money-gambling", AS_CONTENT_RATING_VALUE_MODERATE, 10 }, + { "money-gambling", AS_CONTENT_RATING_VALUE_INTENSE, 18 }, + { "money-purchasing", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "money-purchasing", AS_CONTENT_RATING_VALUE_INTENSE, 15 }, + { "social-chat", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "social-chat", AS_CONTENT_RATING_VALUE_MILD, 4 }, + { "social-chat", AS_CONTENT_RATING_VALUE_MODERATE, 10 }, + { "social-chat", AS_CONTENT_RATING_VALUE_INTENSE, 13 }, + { "social-audio", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "social-audio", AS_CONTENT_RATING_VALUE_INTENSE, 15 }, + { "social-contacts", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "social-contacts", AS_CONTENT_RATING_VALUE_INTENSE, 12 }, + { "social-info", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "social-info", AS_CONTENT_RATING_VALUE_INTENSE, 13 }, + { "social-location", AS_CONTENT_RATING_VALUE_NONE, 0 }, + { "social-location", AS_CONTENT_RATING_VALUE_INTENSE, 13 }, + { NULL, 0, 0 } }; + for (i = 0; to_csm_age[i].id != NULL; i++) { + if (value == to_csm_age[i].value && + g_strcmp0 (id, to_csm_age[i].id) == 0) + return to_csm_age[i].csm_age; + } + return 0; +} + +/** + * as_content_rating_get_minimum_age: + * @content_rating: a #AsContentRating + * + * Gets the lowest Common Sense Media approved age for the content_rating block. + * NOTE: these numbers are based on the data and descriptions available from + * https://www.commonsensemedia.org/about-us/our-mission/about-our-ratings and + * you may disagree with them. + * + * You're free to disagree with these, and of course you should use your own + * brain to work our if your child is able to cope with the concepts enumerated + * here. Some 13 year olds mey be fine with the concept of mutilation of body + * parts, others may get nightmares. + * + * Returns: The age in years, 0 for no rating, or G_MAXUINT for no details. + * + * Since: 0.11.0 + **/ +guint +as_content_rating_get_minimum_age (AsContentRating *content_rating) +{ + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + guint i; + guint csm_age = 0; + + /* check kind */ + if (g_strcmp0 (priv->kind, "oars-1.0") != 0) + return G_MAXUINT; + + for (i = 0; i < priv->keys->len; i++) { + AsContentRatingKey *key; + guint csm_tmp; + key = g_ptr_array_index (priv->keys, i); + csm_tmp = as_content_rating_id_value_to_csm_age (key->id, key->value); + if (csm_tmp > 0 && csm_tmp > csm_age) + csm_age = csm_tmp; + } + return csm_age; +} + +/** + * as_content_rating_get_kind: + * @content_rating: a #AsContentRating + * + * Gets the content_rating kind. + * + * Returns: a string, e.g. "oars-1.0", or NULL + * + * Since: 0.11.0 + **/ +const gchar* +as_content_rating_get_kind (AsContentRating *content_rating) +{ + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + return priv->kind; +} + +/** + * as_content_rating_set_kind: + * @content_rating: a #AsContentRating + * @kind: the rating kind, e.g. "oars-1.0" + * + * Sets the content rating kind. + * + * Since: 0.11.0 + **/ +void +as_content_rating_set_kind (AsContentRating *content_rating, const gchar *kind) +{ + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + g_free (priv->kind); + priv->kind = g_strdup (kind); +} + +/** + * as_content_rating_load_from_xml: + * @content_rating: a #AsContentRating + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads data from an XML node. + **/ +gboolean +as_content_rating_load_from_xml (AsContentRating *content_rating, AsContext *ctx, xmlNode *node, GError **error) +{ + xmlNode *iter; + g_autofree gchar *type_str = NULL; + + /* set selected content-rating type (usually oars-1.0) */ + type_str = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + as_content_rating_set_kind (content_rating, (gchar*) type_str); + + /* read attributes */ + for (iter = node->children; iter != NULL; iter = iter->next) { + g_autofree gchar *attr_id = NULL; + AsContentRatingValue attr_value; + g_autofree gchar *str_value = NULL; + + if (iter->type != XML_ELEMENT_NODE) + continue; + if (g_strcmp0 ((gchar*) iter->name, "content_attribute") != 0) + continue; + + attr_id = (gchar*) xmlGetProp (iter, (xmlChar*) "id"); + str_value = as_xml_get_node_value (iter); + attr_value = as_content_rating_value_from_string (str_value); + if ((attr_value == AS_CONTENT_RATING_VALUE_UNKNOWN) || (attr_id == NULL)) + continue; /* this rating attribute is invalid */ + + as_content_rating_set_value (content_rating, attr_id, attr_value); + } + + return TRUE; +} + +/** + * as_content_rating_to_xml_node: + * @content_rating: a #AsContentRating + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +void +as_content_rating_to_xml_node (AsContentRating *content_rating, AsContext *ctx, xmlNode *root) +{ + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + guint i; + xmlNode *rnode; + + rnode = xmlNewChild (root, NULL, (xmlChar*) "content_rating", NULL); + xmlNewProp (rnode, + (xmlChar*) "type", + (xmlChar*) priv->kind); + + for (i = 0; i < priv->keys->len; i++) { + xmlNode *anode; + AsContentRatingKey *key = (AsContentRatingKey*) g_ptr_array_index (priv->keys, i); + + anode = xmlNewTextChild (rnode, + NULL, + (xmlChar*) "content_attribute", + (xmlChar*) as_content_rating_value_to_string (key->value)); + xmlNewProp (anode, + (xmlChar*) "id", + (xmlChar*) key->id); + } +} + +/** + * as_content_rating_load_from_yaml: + * @content_rating: a #AsContentRating + * @ctx: the AppStream document context. + * @node: the YAML node. + * @error: a #GError. + * + * Loads data from a YAML field. + **/ +gboolean +as_content_rating_load_from_yaml (AsContentRating *content_rating, AsContext *ctx, GNode *node, GError **error) +{ + GNode *n; + + as_content_rating_set_kind (content_rating, + as_yaml_node_get_key (node)); + for (n = node->children; n != NULL; n = n->next) { + AsContentRatingValue attr_value; + + attr_value = as_content_rating_value_from_string (as_yaml_node_get_value (n)); + if (attr_value == AS_CONTENT_RATING_VALUE_UNKNOWN) + continue; + + as_content_rating_set_value (content_rating, + as_yaml_node_get_key (n), + attr_value); + } + + return TRUE; +} + +/** + * as_content_rating_emit_yaml: + * @content_rating: a #AsContentRating + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. + * + * Emit YAML data for this object. + **/ +void +as_content_rating_emit_yaml (AsContentRating *content_rating, AsContext *ctx, yaml_emitter_t *emitter) +{ + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + guint j; + + if (priv->kind == NULL) + return; /* we need to check for null to not mess up the YAML sequence */ + as_yaml_emit_scalar (emitter, priv->kind); + + as_yaml_mapping_start (emitter); + for (j = 0; j < priv->keys->len; j++) { + AsContentRatingKey *key = (AsContentRatingKey*) g_ptr_array_index (priv->keys, j); + + as_yaml_emit_entry (emitter, + key->id, + as_content_rating_value_to_string (key->value)); + } + as_yaml_mapping_end (emitter); +} + +/** + * as_content_rating_to_variant: + * @content_rating: a #AsContentRating + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_content_rating_to_variant (AsContentRating *content_rating, GVariantBuilder *builder) +{ + AsContentRatingPrivate *priv = GET_PRIVATE (content_rating); + GVariantBuilder values_b; + GVariantBuilder rating_b; + guint j; + + g_variant_builder_init (&values_b, G_VARIANT_TYPE_ARRAY); + for (j = 0; j < priv->keys->len; j++) { + AsContentRatingKey *key = (AsContentRatingKey*) g_ptr_array_index (priv->keys, j); + g_variant_builder_add (&values_b, "{su}", key->id, key->value); + } + + g_variant_builder_init (&rating_b, G_VARIANT_TYPE_ARRAY); + g_variant_builder_add_parsed (&rating_b, "{'type', %v}", as_variant_mstring_new (priv->kind)); + g_variant_builder_add_parsed (&rating_b, "{'values', %v}", g_variant_builder_end (&values_b)); + + g_variant_builder_add_value (builder, g_variant_builder_end (&rating_b)); +} + +/** + * as_content_rating_set_from_variant: + * @content_rating: a #AsContentRating + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_content_rating_set_from_variant (AsContentRating *content_rating, GVariant *variant) +{ + GVariantIter inner_iter; + GVariantDict idict; + GVariant *tmp; + GVariant *v_child; + g_autoptr(GVariant) values_var = NULL; + + g_variant_dict_init (&idict, variant); + + as_content_rating_set_kind (content_rating, as_variant_get_dict_mstr (&idict, "type", &tmp)); + g_variant_unref (tmp); + + values_var = g_variant_dict_lookup_value (&idict, "values", G_VARIANT_TYPE_ARRAY); + if (values_var == NULL) + return FALSE; + + g_variant_iter_init (&inner_iter, values_var); + + while ((v_child = g_variant_iter_next_value (&inner_iter))) { + AsContentRatingValue val; + g_autofree gchar *id_str = NULL; + + g_variant_get (v_child, "{su}", &id_str, &val); + as_content_rating_set_value (content_rating, id_str, val); + + g_variant_unref (v_child); + } + + return TRUE; +} + +/** + * as_content_rating_new: + * + * Creates a new #AsContentRating. + * + * Returns: (transfer full): a #AsContentRating + * + * Since: 0.11.0 + **/ +AsContentRating* +as_content_rating_new (void) +{ + AsContentRating *content_rating; + content_rating = g_object_new (AS_TYPE_CONTENT, NULL); + return AS_CONTENT_RATING (content_rating); +} diff -Nru appstream-0.9.4/src/as-content-rating.h appstream-0.12.0/src/as-content-rating.h --- appstream-0.9.4/src/as-content-rating.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-content-rating.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,87 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Richard Hughes + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_CONTENT_RATING_H +#define __AS_CONTENT_RATING_H + +#include + +G_BEGIN_DECLS + +#define AS_TYPE_CONTENT (as_content_rating_get_type ()) +G_DECLARE_DERIVABLE_TYPE (AsContentRating, as_content_rating, AS, CONTENT_RATING, GObject) + +struct _AsContentRatingClass +{ + GObjectClass parent_class; + /*< private >*/ + void (*_as_reserved1) (void); + void (*_as_reserved2) (void); + void (*_as_reserved3) (void); + void (*_as_reserved4) (void); + void (*_as_reserved5) (void); + void (*_as_reserved6) (void); +}; + +/** + * AsContentRatingValue: + * @AS_CONTENT_RATING_VALUE_UNKNOWN: Unknown value + * @AS_CONTENT_RATING_VALUE_NONE: None + * @AS_CONTENT_RATING_VALUE_MILD: A small amount + * @AS_CONTENT_RATING_VALUE_MODERATE: A moderate amount + * @AS_CONTENT_RATING_VALUE_INTENSE: An intense amount + * + * The specified level of an content_rating rating ID. + **/ +typedef enum { + AS_CONTENT_RATING_VALUE_UNKNOWN, + AS_CONTENT_RATING_VALUE_NONE, + AS_CONTENT_RATING_VALUE_MILD, + AS_CONTENT_RATING_VALUE_MODERATE, + AS_CONTENT_RATING_VALUE_INTENSE, + /*< private >*/ + AS_CONTENT_RATING_VALUE_LAST +} AsContentRatingValue; + +const gchar *as_content_rating_value_to_string (AsContentRatingValue value); +AsContentRatingValue as_content_rating_value_from_string (const gchar *value); + +AsContentRating *as_content_rating_new (void); + +const gchar *as_content_rating_get_kind (AsContentRating *content_rating); +void as_content_rating_set_kind (AsContentRating *content_rating, + const gchar *kind); + +guint as_content_rating_get_minimum_age (AsContentRating *content_rating); + +AsContentRatingValue as_content_rating_get_value (AsContentRating *content_rating, + const gchar *id); +void as_content_rating_set_value (AsContentRating *content_rating, + const gchar *id, + AsContentRatingValue value); + +G_END_DECLS + +#endif /* __AS_CONTENT_RATING_H */ diff -Nru appstream-0.9.4/src/as-content-rating-private.h appstream-0.12.0/src/as-content-rating-private.h --- appstream-0.9.4/src/as-content-rating-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-content-rating-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,61 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_CONTENT_RATING_PRIVATE_H +#define __AS_CONTENT_RATING_PRIVATE_H + +#include +#include "as-content-rating.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +typedef struct { + gchar *id; + AsContentRatingValue value; +} AsContentRatingKey; + +gboolean as_content_rating_load_from_xml (AsContentRating *content_rating, + AsContext *ctx, + xmlNode *node, + GError **error); +void as_content_rating_to_xml_node (AsContentRating *content_rating, + AsContext *ctx, + xmlNode *root); + +gboolean as_content_rating_load_from_yaml (AsContentRating *content_rating, + AsContext *ctx, + GNode *node, + GError **error); +void as_content_rating_emit_yaml (AsContentRating *content_rating, + AsContext *ctx, + yaml_emitter_t *emitter); + +void as_content_rating_to_variant (AsContentRating *content_rating, + GVariantBuilder *builder); +gboolean as_content_rating_set_from_variant (AsContentRating *content_rating, + GVariant *variant); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_CONTENT_RATING_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-context.c appstream-0.12.0/src/as-context.c --- appstream-0.9.4/src/as-context.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-context.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,354 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +/** + * SECTION:as-context + * @short_description: Context of an AppStream metadata document + * @include: appstream.h + * + * Contains information about the context of AppStream metadata, from the + * root node of the document. + * This is a private/internal class. + */ + +#include "config.h" +#include "as-context.h" + +#include "as-utils-private.h" + +typedef struct +{ + AsFormatVersion format_version; + AsFormatStyle style; + gchar *locale; + gchar *origin; + gchar *media_baseurl; + gchar *arch; + gchar *fname; + gint priority; + + gboolean all_locale; +} AsContextPrivate; + +G_DEFINE_TYPE_WITH_PRIVATE (AsContext, as_context, G_TYPE_OBJECT) + +#define GET_PRIVATE(o) (as_context_get_instance_private (o)) + +static void +as_context_finalize (GObject *object) +{ + AsContext *ctx = AS_CONTEXT (object); + AsContextPrivate *priv = GET_PRIVATE (ctx); + + g_free (priv->locale); + g_free (priv->origin); + g_free (priv->media_baseurl); + g_free (priv->arch); + g_free (priv->fname); + + G_OBJECT_CLASS (as_context_parent_class)->finalize (object); +} + +static void +as_context_init (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + + priv->format_version = AS_CURRENT_FORMAT_VERSION; + priv->style = AS_FORMAT_STYLE_UNKNOWN; + priv->fname = g_strdup (":memory:"); + priv->priority = 0; +} + +static void +as_context_class_init (AsContextClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->finalize = as_context_finalize; +} + +/** + * as_context_get_format_version: + * @ctx: a #AsContext instance. + * + * Returns: The AppStream format version. + **/ +AsFormatVersion +as_context_get_format_version (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->format_version; +} + +/** + * as_context_set_format_version: + * @ctx: a #AsContext instance. + * @ver: the new format version. + * + * Sets the AppStream format version. + **/ +void +as_context_set_format_version (AsContext *ctx, AsFormatVersion ver) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + priv->format_version = ver; +} + +/** + * as_context_get_style: + * @ctx: a #AsContext instance. + * + * Returns: The document style. + **/ +AsFormatStyle +as_context_get_style (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->style; +} + +/** + * as_context_set_style: + * @ctx: a #AsContext instance. + * @style: the new document style. + * + * Sets the AppStream document style. + **/ +void +as_context_set_style (AsContext *ctx, AsFormatStyle style) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + priv->style = style; +} + +/** + * as_context_get_priority: + * @ctx: a #AsContext instance. + * + * Returns: The data priority. + **/ +gint +as_context_get_priority (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->priority; +} + +/** + * as_context_set_priority: + * @ctx: a #AsContext instance. + * @priority: the new priority. + * + * Sets the data priority. + **/ +void +as_context_set_priority (AsContext *ctx, gint priority) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + priv->priority = priority; +} + +/** + * as_context_get_origin: + * @ctx: a #AsContext instance. + * + * Returns: The data origin. + **/ +const gchar* +as_context_get_origin (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->origin; +} + +/** + * as_context_set_origin: + * @ctx: a #AsContext instance. + * @value: the new value. + * + * Sets the data origin. + **/ +void +as_context_set_origin (AsContext *ctx, const gchar *value) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + g_free (priv->origin); + priv->origin = g_strdup (value); +} + +/** + * as_context_get_locale: + * @ctx: a #AsContext instance. + * + * Returns: The active locale. + **/ +const gchar* +as_context_get_locale (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->locale; +} + +/** + * as_context_set_locale: + * @ctx: a #AsContext instance. + * @value: the new value. + * + * Sets the active locale. + **/ +void +as_context_set_locale (AsContext *ctx, const gchar *value) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + g_free (priv->locale); + + priv->all_locale = FALSE; + if (g_strcmp0 (value, "ALL") == 0) { + priv->all_locale = TRUE; + priv->locale = as_get_current_locale (); + } else { + priv->locale = g_strdup (value); + } +} + +/** + * as_context_get_all_locale_enabled: + * @ctx: a #AsContext instance. + * + * Returns: %TRUE if all locale should be parsed. + **/ +gboolean +as_context_get_all_locale_enabled (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->all_locale; +} + +/** + * as_context_has_media_baseurl: + * @ctx: a #AsContext instance. + * + * Returns: %TRUE if a media base URL is set. + **/ +gboolean +as_context_has_media_baseurl (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->media_baseurl != NULL; +} + +/** + * as_context_get_media_baseurl: + * @ctx: a #AsContext instance. + * + * Returns: The media base URL. + **/ +const gchar* +as_context_get_media_baseurl (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->media_baseurl; +} + +/** + * as_context_set_media_baseurl: + * @ctx: a #AsContext instance. + * @value: the new value. + * + * Sets the media base URL. + **/ +void +as_context_set_media_baseurl (AsContext *ctx, const gchar *value) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + g_free (priv->media_baseurl); + priv->media_baseurl = g_strdup (value); +} + +/** + * as_context_get_architecture: + * @ctx: a #AsContext instance. + * + * Returns: The current architecture for the document. + **/ +const gchar* +as_context_get_architecture (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->arch; +} + +/** + * as_context_set_architecture: + * @ctx: a #AsContext instance. + * @value: the new value. + * + * Sets the current architecture for this document. + **/ +void +as_context_set_architecture (AsContext *ctx, const gchar *value) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + g_free (priv->arch); + priv->arch = g_strdup (value); +} + +/** + * as_context_get_filename: + * @ctx: a #AsContext instance. + * + * Returns: The name of the file the data originates from. + **/ +const gchar* +as_context_get_filename (AsContext *ctx) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + return priv->fname; +} + +/** + * as_context_set_filename: + * @ctx: a #AsContext instance. + * @fname: the new file name. + * + * Sets the file name we are loading data from. + **/ +void +as_context_set_filename (AsContext *ctx, const gchar *fname) +{ + AsContextPrivate *priv = GET_PRIVATE (ctx); + g_free (priv->fname); + priv->fname = g_strdup (fname); +} + +/** + * as_context_new: + * + * Creates a new #AsContext. + * + * Returns: (transfer full): an #AsContext + **/ +AsContext* +as_context_new (void) +{ + AsContext *ctx; + ctx = g_object_new (AS_TYPE_CONTEXT, NULL); + return AS_CONTEXT (ctx); +} diff -Nru appstream-0.9.4/src/as-context.h appstream-0.12.0/src/as-context.h --- appstream-0.9.4/src/as-context.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-context.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,87 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_CONTEXT_H +#define __AS_CONTEXT_H + +#include +#include "as-metadata.h" + +G_BEGIN_DECLS + +#define AS_TYPE_CONTEXT (as_context_get_type ()) +G_DECLARE_DERIVABLE_TYPE (AsContext, as_context, AS, CONTEXT, GObject) + +struct _AsContextClass +{ + GObjectClass parent_class; + /*< private >*/ + void (*_as_reserved1) (void); + void (*_as_reserved2) (void); + void (*_as_reserved3) (void); + void (*_as_reserved4) (void); + void (*_as_reserved5) (void); + void (*_as_reserved6) (void); +}; + +AsContext *as_context_new (void); + +AsFormatVersion as_context_get_format_version (AsContext *ctx); +void as_context_set_format_version (AsContext *ctx, + AsFormatVersion ver); + +AsFormatStyle as_context_get_style (AsContext *ctx); +void as_context_set_style (AsContext *ctx, + AsFormatStyle style); + +gint as_context_get_priority (AsContext *ctx); +void as_context_set_priority (AsContext *ctx, + gint priority); + +const gchar *as_context_get_origin (AsContext *ctx); +void as_context_set_origin (AsContext *ctx, + const gchar *value); + +const gchar *as_context_get_locale (AsContext *ctx); +void as_context_set_locale (AsContext *ctx, + const gchar *value); + +gboolean as_context_has_media_baseurl (AsContext *ctx); +const gchar *as_context_get_media_baseurl (AsContext *ctx); +void as_context_set_media_baseurl (AsContext *ctx, + const gchar *value); + +const gchar *as_context_get_architecture (AsContext *ctx); +void as_context_set_architecture (AsContext *ctx, + const gchar *value); + +gboolean as_context_get_all_locale_enabled (AsContext *ctx); + +const gchar *as_context_get_filename (AsContext *ctx); +void as_context_set_filename (AsContext *ctx, + const gchar *fname); + +G_END_DECLS + +#endif /* __AS_CONTEXT_H */ diff -Nru appstream-0.9.4/src/as-database.c appstream-0.12.0/src/as-database.c --- appstream-0.9.4/src/as-database.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-database.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,423 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include "as-database.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "as-utils.h" -#include "as-utils-private.h" -#include "as-settings-private.h" - -/** - * SECTION:as-database - * @short_description: Read-only access to the AppStream component database - * @include: appstream.h - * - * This object provides access to the Appstream Xapian database of available software components. - * You can search for components using various criteria, as well as getting some information - * about the data provided by this AppStream database. - * - * By default, the global software component cache is used as datasource, unless a different database - * is explicitly defined via %as_database_set_location(). - * - * A new cache can be created using the appstreamcli(1) utility. - * - * See also: #AsComponent, #AsDataPool - */ - -typedef struct -{ - struct XADatabaseRead *xdb; - gboolean opened; - gchar *database_path; - gchar **term_greylist; -} AsDatabasePrivate; - -G_DEFINE_TYPE_WITH_PRIVATE (AsDatabase, as_database, G_TYPE_OBJECT) -#define GET_PRIVATE(o) (as_database_get_instance_private (o)) - -/* TRANSLATORS: List of "grey-listed" words sperated with ";" - * Do not translate this list directly. Instead, - * provide a list of words in your language that people are likely - * to include in a search but that should normally be ignored in - * the search. - */ -#define AS_SEARCH_GREYLIST_STR _("app;application;package;program;programme;suite;tool") - -/** - * as_database_init: - **/ -static void -as_database_init (AsDatabase *db) -{ - AsDatabasePrivate *priv = GET_PRIVATE (db); - - priv->xdb = xa_database_read_new (); - priv->opened = FALSE; - as_database_set_location (db, AS_APPSTREAM_CACHE_PATH); - - priv->term_greylist = g_strsplit (AS_SEARCH_GREYLIST_STR, ";", -1); -} - -/** - * as_database_finalize: - **/ -static void -as_database_finalize (GObject *object) -{ - AsDatabase *db = AS_DATABASE (object); - AsDatabasePrivate *priv = GET_PRIVATE (db); - - xa_database_read_free (priv->xdb); - g_free (priv->database_path); - g_strfreev (priv->term_greylist); - - G_OBJECT_CLASS (as_database_parent_class)->finalize (object); -} - -/** - * as_database_class_init: - **/ -static void -as_database_class_init (AsDatabaseClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = as_database_finalize; -} - -/** - * as_database_open: - * @db: An instance of #AsDatabase. - * @error: A #GError or %NULL. - * - * Open the current AppStream metadata cache for reading. - * - * Returns: %TRUE on success, %FALSE on error. - */ -gboolean -as_database_open (AsDatabase *db, GError **error) -{ - gboolean ret = FALSE; - g_autofree gchar *path = NULL; - AsDatabasePrivate *priv = GET_PRIVATE (db); - - path = g_build_filename (priv->database_path, "xapian", "default", NULL); - if (!g_file_test (path, G_FILE_TEST_IS_DIR)) { - g_set_error_literal (error, - AS_DATABASE_ERROR, - AS_DATABASE_ERROR_MISSING, - _("AppStream software component cache was not found. This could mean AppStream was set up incorrectly, or your distribution does not provide any AppStream metadata.")); - return FALSE; - } - - ret = xa_database_read_open (priv->xdb, path); - priv->opened = ret; - - if (!ret) - g_set_error_literal (error, - AS_DATABASE_ERROR, - AS_DATABASE_ERROR_FAILED, - _("Unable to open the AppStream software component cache.")); - - return ret; -} - -/** - * as_database_test_opened: - * @db: An instance of #AsDatabase. - * @error: A #GError or %NULL. - */ -static gboolean -as_database_test_opened (AsDatabase *db, GError **error) -{ - AsDatabasePrivate *priv = GET_PRIVATE (db); - - if (!priv->opened) { - g_set_error_literal (error, - AS_DATABASE_ERROR, - AS_DATABASE_ERROR_CLOSED, - _("Tried to perform query on closed database.")); - return FALSE; - } - return TRUE; -} - -/** - * as_database_get_all_components: - * @db: An instance of #AsDatabase. - * @error: A #GError or %NULL. - * - * Dump a list of all software components found in the database. - * - * Returns: (element-type AsComponent) (transfer full): an array of #AsComponent objects. - */ -GPtrArray* -as_database_get_all_components (AsDatabase *db, GError **error) -{ - GPtrArray *cpts = NULL; - AsDatabasePrivate *priv = GET_PRIVATE (db); - - if (!as_database_test_opened (db, error)) - return NULL; - - cpts = xa_database_read_get_all_components (priv->xdb); - return cpts; -} - -/** - * as_database_sanitize_search_term: - * - * Improve the search term slightly, by stripping whitespaces and - * removing greylist words. - */ -static gchar* -as_database_sanitize_search_term (AsDatabase *db, const gchar *term) -{ - gchar *res_term; - AsDatabasePrivate *priv = GET_PRIVATE (db); - - if (term == NULL) - return NULL; - res_term = g_strdup (term); - - /* check if there is a ":" in the search, if so, it means the user - * could be using a xapian prefix like "pkg:" or "mime:" and in this case - * we do not want to alter the search term (as application is in the - * greylist but a common mime-type prefix) - */ - if (strstr (term, ":") == NULL) { - guint i; - - /* filter query by greylist (to avoid overly generic search terms) */ - for (i = 0; priv->term_greylist[i] != NULL; i++) { - gchar *str; - str = as_str_replace (res_term, priv->term_greylist[i], ""); - g_free (res_term); - res_term = str; - } - - /* restore query if it was just greylist words */ - if (g_strcmp0 (res_term, "") == 0) { - g_debug ("grey-list replaced all terms, restoring"); - g_free (res_term); - res_term = g_strdup (term); - } - } - - /* we have to strip the leading and trailing whitespaces to avoid having - * different results for e.g. 'font ' and 'font' (LP: #506419) - */ - g_strstrip (res_term); - - return res_term; -} - -/** - * as_database_find_components: - * @db: An instance of #AsDatabase. - * @term: (nullable): a search-term to look for. - * @cats_str: (nullable): A semicolon-delimited list of lower-cased category names, e.g. "science;development". - * @error: A #GError or %NULL. - * - * Find components in the AppStream database, which match a given term. - * You can limit the search to a specific set of categories by setting the categories string to - * a semicolon-separated list of lower-cased category names. - * - * Returns: (element-type AsComponent) (transfer full): an array of #AsComponent objects which have been found - */ -GPtrArray* -as_database_find_components (AsDatabase *db, const gchar *term, const gchar *cats_str, GError **error) -{ - GPtrArray *cpts; - g_autofree gchar *sterm = NULL; - g_auto(GStrv) cats = NULL; - AsDatabasePrivate *priv = GET_PRIVATE (db); - - if (!as_database_test_opened (db, error)) - return NULL; - - /* return everything if term and categories are both NULL or empty */ - if ((as_str_empty (term)) && (as_str_empty (cats_str))) - return as_database_get_all_components (db, error); - - /* sanitize our search term */ - sterm = as_database_sanitize_search_term (db, term); - - if (cats_str != NULL) - cats = g_strsplit (cats_str, ";", -1); - - cpts = xa_database_read_find_components (priv->xdb, sterm, cats); - return cpts; -} - -/** - * as_database_get_component_by_id: - * @db: An instance of #AsDatabase. - * @cid: the ID of the component, e.g. "org.kde.gwenview.desktop" - * @error: A #GError or %NULL. - * - * Get a component by its AppStream-ID. - * - * Returns: (transfer full): an #AsComponent or %NULL if none was found. - **/ -AsComponent* -as_database_get_component_by_id (AsDatabase *db, const gchar *cid, GError **error) -{ - AsDatabasePrivate *priv = GET_PRIVATE (db); - - if (!as_database_test_opened (db, error)) - return NULL; - if (cid == NULL) { - g_set_error_literal (error, - AS_DATABASE_ERROR, - AS_DATABASE_ERROR_TERM_INVALID, - "Search term must not be NULL."); - return NULL; - } - - return xa_database_read_get_component_by_id (priv->xdb, cid); -} - -/** - * as_database_get_components_by_provided_item: - * @db: An instance of #AsDatabase. - * @kind: an #AsProvidesKind - * @item: the name of the provided item. - * @error: A #GError or %NULL. - * - * Find components in the Appstream database. - * - * Returns: (element-type AsComponent) (transfer full): an array of #AsComponent objects which have been found, NULL on error - */ -GPtrArray* -as_database_get_components_by_provided_item (AsDatabase *db, AsProvidedKind kind, const gchar *item, GError **error) -{ - GPtrArray* cpt_array; - AsDatabasePrivate *priv = GET_PRIVATE (db); - - if (!as_database_test_opened (db, error)) - return NULL; - if (item == NULL) { - g_set_error_literal (error, - AS_DATABASE_ERROR, - AS_DATABASE_ERROR_TERM_INVALID, - "Search term must not be NULL."); - return NULL; - } - - cpt_array = xa_database_read_get_components_by_provides (priv->xdb, kind, item); - return cpt_array; -} - -/** - * as_database_get_components_by_kind: - * @db: An instance of #AsDatabase. - * @kind: an #AsComponentKind. - * @error: A #GError or %NULL. - * - * Return a list of all components in the database which match a certain kind. - * - * Returns: (element-type AsComponent) (transfer full): an array of #AsComponent objects which have been found, %NULL on error - */ -GPtrArray* -as_database_get_components_by_kind (AsDatabase *db, AsComponentKind kind, GError **error) -{ - GPtrArray* cpt_array; - AsDatabasePrivate *priv = GET_PRIVATE (db); - - if (!as_database_test_opened (db, error)) - return NULL; - if (kind >= AS_COMPONENT_KIND_LAST) { - g_set_error_literal (error, - AS_DATABASE_ERROR, - AS_DATABASE_ERROR_TERM_INVALID, - "Can not search for unknown component type."); - return NULL; - } - - cpt_array = xa_database_read_get_components_by_kind (priv->xdb, kind); - return cpt_array; -} - -/** - * as_database_get_location: - * @db: An instance of #AsDatabase. - * - * Get the current path of the AppStream database we use. - */ -const gchar* -as_database_get_location (AsDatabase *db) -{ - AsDatabasePrivate *priv = GET_PRIVATE (db); - return priv->database_path; -} - -/** - * as_database_set_location: - * @db: An instance of #AsDatabase. - * @dir: The directory of the Xapian database. - * - * Set the location of the AppStream database we use. - */ -void -as_database_set_location (AsDatabase *db, const gchar *dir) -{ - AsDatabasePrivate *priv = GET_PRIVATE (db); - g_free (priv->database_path); - priv->database_path = g_strdup (dir); - g_debug ("AppSteam cache location altered to: %s", dir); -} - -/** - * as_database_error_quark: - * - * Return value: An error quark. - **/ -GQuark -as_database_error_quark (void) -{ - static GQuark quark = 0; - if (!quark) - quark = g_quark_from_static_string ("AsDatabaseError"); - return quark; -} - -/** - * as_database_new: - * - * Creates a new #AsDatabase. - * - * Returns: (transfer full): a #AsDatabase - **/ -AsDatabase* -as_database_new (void) -{ - AsDatabase *db; - db = g_object_new (AS_TYPE_DATABASE, NULL); - return AS_DATABASE (db); -} diff -Nru appstream-0.9.4/src/as-database.h appstream-0.12.0/src/as-database.h --- appstream-0.9.4/src/as-database.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-database.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) -#error "Only can be included directly." -#endif - -#ifndef __AS_DATABASE_H -#define __AS_DATABASE_H - -#include -#include "as-component.h" - -G_BEGIN_DECLS - -#define AS_TYPE_DATABASE (as_database_get_type ()) -G_DECLARE_DERIVABLE_TYPE (AsDatabase, as_database, AS, DATABASE, GObject) - -struct _AsDatabaseClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - -/** - * AsDatabaseError: - * @AS_DATABASE_ERROR_FAILED: Generic failure - * @AS_DATABASE_ERROR_MISSING: Database was not found - * @AS_DATABASE_ERROR_CLOSED: Tried to perform action on a closed database. - * @AS_DATABASE_ERROR_TERM_INVALID: A query term was invalid. - * - * A database query error. - **/ -typedef enum { - AS_DATABASE_ERROR_FAILED, - AS_DATABASE_ERROR_MISSING, - AS_DATABASE_ERROR_CLOSED, - AS_DATABASE_ERROR_TERM_INVALID, - /*< private >*/ - AS_DATABASE_ERROR_LAST -} AsDatabaseError; - -#define AS_DATABASE_ERROR as_database_error_quark () - -AsDatabase *as_database_new (void); -GQuark as_database_error_quark (void); -gboolean as_database_open (AsDatabase *db, - GError **error); - -const gchar *as_database_get_location (AsDatabase *db); -void as_database_set_location (AsDatabase *db, - const gchar *dir); - -GPtrArray *as_database_find_components (AsDatabase *db, - const gchar *term, - const gchar *cats_str, - GError **error); - -GPtrArray *as_database_get_all_components (AsDatabase *db, - GError **error); -AsComponent *as_database_get_component_by_id (AsDatabase *db, - const gchar *cid, - GError **error); -GPtrArray *as_database_get_components_by_provided_item (AsDatabase *db, - AsProvidedKind kind, - const gchar *item, - GError **error); -GPtrArray *as_database_get_components_by_kind (AsDatabase *db, - AsComponentKind kind, - GError **error); - -G_END_DECLS - -#endif /* __AS_DATABASE_H */ diff -Nru appstream-0.9.4/src/as-data-pool.c appstream-0.12.0/src/as-data-pool.c --- appstream-0.9.4/src/as-data-pool.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-data-pool.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,652 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -/** - * SECTION:as-data-pool - * @short_description: Collect and temporarily store metadata from different sources - * - * This class contains a temporary pool of metadata which has been collected from different - * sources on the system. - * It can directly be used, but usually it is accessed through a #AsDatabase instance. - * This class is used by internally by the cache builder, but might be useful for others. - * - * See also: #AsDatabase - */ - -#include "config.h" -#include "as-data-pool.h" - -#include "as-utils.h" -#include "as-utils-private.h" -#include "as-component-private.h" -#include "as-distro-details.h" -#include "as-settings-private.h" - -#include "as-metadata.h" -#include "as-yamldata.h" - -typedef struct -{ - GHashTable *cpt_table; - gchar *scr_base_url; - gchar *locale; - gchar *current_arch; - - GPtrArray *mdata_dirs; - - gchar **icon_paths; -} AsDataPoolPrivate; - -G_DEFINE_TYPE_WITH_PRIVATE (AsDataPool, as_data_pool, G_TYPE_OBJECT) -#define GET_PRIVATE(o) (as_data_pool_get_instance_private (o)) - -/** - * AS_APPSTREAM_METADATA_PATHS: - * - * Locations where system AppStream metadata can be stored. - */ -const gchar *AS_APPSTREAM_METADATA_PATHS[4] = { "/usr/share/app-info", - "/var/lib/app-info", - "/var/cache/app-info", - NULL}; - -/** - * as_data_pool_init: - **/ -static void -as_data_pool_init (AsDataPool *dpool) -{ - guint i; - g_autoptr(AsDistroDetails) distro = NULL; - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - - /* set active locale */ - priv->locale = as_get_current_locale (); - - priv->cpt_table = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - (GDestroyNotify) g_object_unref); - - distro = as_distro_details_new (); - priv->scr_base_url = as_distro_details_get_str (distro, "ScreenshotUrl"); - if (priv->scr_base_url == NULL) { - g_debug ("Unable to determine screenshot service for distribution '%s'. Using the Debian services.", as_distro_details_get_name (distro)); - priv->scr_base_url = g_strdup ("http://screenshots.debian.net"); - } - - /* set watched default directories for AppStream metadata */ - priv->mdata_dirs = g_ptr_array_new_with_free_func (g_free); - for (i = 0; AS_APPSTREAM_METADATA_PATHS[i] != NULL; i++) { - g_ptr_array_add (priv->mdata_dirs, - g_strdup (AS_APPSTREAM_METADATA_PATHS[i])); - } - - /* set default icon search locations */ - priv->icon_paths = as_get_icon_repository_paths (); - - /* set the current architecture */ - priv->current_arch = as_get_current_arch (); -} - -/** - * as_data_pool_finalize: - **/ -static void -as_data_pool_finalize (GObject *object) -{ - AsDataPool *dpool = AS_DATA_POOL (object); - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - - g_free (priv->scr_base_url); - g_hash_table_unref (priv->cpt_table); - - g_ptr_array_unref (priv->mdata_dirs); - g_strfreev (priv->icon_paths); - - g_free (priv->current_arch); - - G_OBJECT_CLASS (as_data_pool_parent_class)->finalize (object); -} - -/** - * as_data_pool_class_init: - **/ -static void -as_data_pool_class_init (AsDataPoolClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = as_data_pool_finalize; -} - -/** - * as_data_pool_merge_components: - * - * Merge selected data from two components. - */ -static void -as_data_pool_merge_components (AsDataPool *dpool, AsComponent *src_cpt, AsComponent *dest_cpt) -{ - guint i; - gchar **cats; - gchar **pkgnames; - - /* FIXME: We only do this for GNOME Software compatibility. In future, we need better rules on what to merge how, and - * whether we want to merge stuff at all. */ - - cats = as_component_get_categories (src_cpt); - if (cats != NULL) { - g_autoptr(GHashTable) cat_table = NULL; - gchar **new_cats = NULL; - - cat_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); - for (i = 0; cats[i] != NULL; i++) { - g_hash_table_add (cat_table, g_strdup (cats[i])); - } - cats = as_component_get_categories (dest_cpt); - if (cats != NULL) { - for (i = 0; cats[i] != NULL; i++) { - g_hash_table_add (cat_table, g_strdup (cats[i])); - } - } - - new_cats = (gchar**) g_hash_table_get_keys_as_array (cat_table, NULL); - as_component_set_categories (dest_cpt, new_cats); - } - - pkgnames = as_component_get_pkgnames (src_cpt); - if ((pkgnames != NULL) && (pkgnames[0] != '\0')) - as_component_set_pkgnames (dest_cpt, as_component_get_pkgnames (src_cpt)); - - if (as_component_has_bundle (src_cpt)) - as_component_set_bundles_table (dest_cpt, as_component_get_bundles_table (src_cpt)); -} - -/** - * as_data_pool_add_new_component: - * - * Register a new component in the global AppStream metadata pool. - */ -static void -as_data_pool_add_new_component (AsDataPool *dpool, AsComponent *cpt) -{ - const gchar *cpt_id; - AsComponent *existing_cpt; - int priority; - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - g_return_if_fail (cpt != NULL); - - cpt_id = as_component_get_id (cpt); - existing_cpt = g_hash_table_lookup (priv->cpt_table, cpt_id); - - /* add additional data to the component, e.g. external screenshots. Also refines - * the component's icon paths */ - as_component_complete (cpt, priv->scr_base_url, priv->icon_paths); - - if (existing_cpt == NULL) { - g_hash_table_insert (priv->cpt_table, - g_strdup (cpt_id), - g_object_ref (cpt)); - return; - } - - /* if we are here, we have duplicates */ - priority = as_component_get_priority (existing_cpt); - if (priority < as_component_get_priority (cpt)) { - g_hash_table_replace (priv->cpt_table, - g_strdup (cpt_id), - g_object_ref (cpt)); - g_debug ("Replaced '%s' with data of higher priority.", cpt_id); - } else { - gboolean ecpt_has_name; - gboolean ncpt_has_name; - - if ((!as_component_has_bundle (existing_cpt)) && (as_component_has_bundle (cpt))) { - GHashTable *bundles; - /* propagate bundle information to existing component */ - bundles = as_component_get_bundles_table (cpt); - as_component_set_bundles_table (existing_cpt, bundles); - return; - } - - ecpt_has_name = as_component_get_name (existing_cpt) != NULL; - ncpt_has_name = as_component_get_name (cpt) != NULL; - if ((ecpt_has_name) && (!ncpt_has_name)) { - /* existing component is updated with data from the new one */ - as_data_pool_merge_components (dpool, cpt, existing_cpt); - g_debug ("Merged stub data for component %s (<-, based on name)", cpt_id); - return; - } - - if ((!ecpt_has_name) && (ncpt_has_name)) { - /* new component is updated with data from the existing component, - * then it replaces the prior metadata */ - as_data_pool_merge_components (dpool, existing_cpt, cpt); - g_hash_table_replace (priv->cpt_table, - g_strdup (cpt_id), - g_object_ref (cpt)); - g_debug ("Merged stub data for component %s (->, based on name)", cpt_id); - return; - } - - if (as_component_get_architecture (cpt) != NULL) { - if (as_arch_compatible (as_component_get_architecture (cpt), priv->current_arch)) { - const gchar *earch; - /* this component is compatible with our current architecture */ - - earch = as_component_get_architecture (existing_cpt); - if (earch != NULL) { - if (as_arch_compatible (earch, priv->current_arch)) { - g_hash_table_replace (priv->cpt_table, - g_strdup (cpt_id), - g_object_ref (cpt)); - g_debug ("Preferred component for native architecture for %s (was %s)", cpt_id, earch); - return; - } else { - g_debug ("Ignored additional entry for '%s' on architecture %s.", cpt_id, earch); - return; - } - } - } - } - - if (priority == as_component_get_priority (cpt)) { - g_debug ("Detected colliding ids: %s was already added with the same priority.", cpt_id); - return; - } else { - g_debug ("Detected colliding ids: %s was already added with a higher priority.", cpt_id); - return; - } - } -} - -/** - * as_data_pool_update_extension_info: - * - * Populate the "extensions" property of an #AsComponent, using the - * "extends" information from other components. - */ -static void -as_data_pool_update_extension_info (AsDataPool *dpool, AsComponent *cpt) -{ - guint i; - GPtrArray *extends; - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - - extends = as_component_get_extends (cpt); - if ((extends == NULL) || (extends->len == 0)) - return; - - for (i = 0; i < extends->len; i++) { - AsComponent *extended_cpt; - const gchar *extended_cid = (const gchar*) g_ptr_array_index (extends, i); - - extended_cpt = g_hash_table_lookup (priv->cpt_table, extended_cid); - if (extended_cpt == NULL) { - g_debug ("%s extends %s, but %s was not found.", as_component_get_id (cpt), extended_cid, extended_cid); - return; - } - - as_component_add_extension (extended_cpt, as_component_get_id (cpt)); - } -} - -/** - * as_data_pool_refine_data: - * - * Automatically refine the data we have about software components in the pool. - * - * Returns: %TRUE if all metadata was used, %FALSE if we skipped some stuff. - */ -static gboolean -as_data_pool_refine_data (AsDataPool *dpool) -{ - GHashTableIter iter; - gpointer key, value; - GHashTable *refined_cpts; - gboolean ret = TRUE; - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - - /* since we might remove stuff from the pool, we need a new table to store the result */ - refined_cpts = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - (GDestroyNotify) g_object_unref); - - g_hash_table_iter_init (&iter, priv->cpt_table); - while (g_hash_table_iter_next (&iter, &key, &value)) { - AsComponent *cpt; - const gchar *cid; - cpt = AS_COMPONENT (value); - cid = (const gchar*) key; - - /* validate the component */ - if (!as_component_is_valid (cpt)) { - g_debug ("WARNING: Skipped component '%s': The component is invalid.", as_component_get_id (cpt)); - ret = FALSE; - continue; - } - - /* set the "extension" information */ - as_data_pool_update_extension_info (dpool, cpt); - - /* add to results table */ - g_hash_table_insert (refined_cpts, - g_strdup (cid), - g_object_ref (cpt)); - } - - /* set refined components as new pool content */ - g_hash_table_unref (priv->cpt_table); - priv->cpt_table = refined_cpts; - - return ret; -} - -/** - * as_data_pool_get_metadata_locations: - * @dpool: An instance of #AsDataPool. - * - * Return a list of all locations which are searched for metadata. - * - * Returns: (transfer none) (element-type utf8): A string-list of watched (absolute) filepaths - **/ -GPtrArray* -as_data_pool_get_metadata_locations (AsDataPool *dpool) -{ - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - return priv->mdata_dirs; -} - -/** - * as_data_pool_load_metadata: - */ -static gboolean -as_data_pool_load_metadata (AsDataPool *dpool) -{ - GPtrArray *cpts; - guint i; - gboolean ret; - g_autoptr(AsMetadata) metad = NULL; - GError *error = NULL; - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - - /* prepare metadata parser */ - metad = as_metadata_new (); - as_metadata_set_parser_mode (metad, AS_PARSER_MODE_DISTRO); - as_metadata_set_locale (metad, priv->locale); - - /* find AppStream XML and YAML metadata */ - ret = TRUE; - for (i = 0; i < priv->mdata_dirs->len; i++) { - const gchar *root_path; - g_autofree gchar *xml_path = NULL; - g_autofree gchar *yaml_path = NULL; - g_autoptr(GPtrArray) mdata_files = NULL; - gboolean subdir_found = FALSE; - guint j; - - root_path = (const gchar *) g_ptr_array_index (priv->mdata_dirs, i); - if (!g_file_test (root_path, G_FILE_TEST_EXISTS)) - continue; - - xml_path = g_build_filename (root_path, "xmls", NULL); - yaml_path = g_build_filename (root_path, "yaml", NULL); - mdata_files = g_ptr_array_new_with_free_func (g_free); - - /* find XML data */ - if (g_file_test (xml_path, G_FILE_TEST_IS_DIR)) { - g_autoptr(GPtrArray) xmls = NULL; - - subdir_found = TRUE; - xmls = as_utils_find_files_matching (xml_path, "*.xml*", FALSE, NULL); - if (xmls != NULL) { - for (j = 0; j < xmls->len; j++) { - const gchar *val; - val = (const gchar *) g_ptr_array_index (xmls, j); - g_ptr_array_add (mdata_files, - g_strdup (val)); - } - } - } - - /* find YAML data */ - if (g_file_test (yaml_path, G_FILE_TEST_IS_DIR)) { - g_autoptr(GPtrArray) yamls = NULL; - - subdir_found = TRUE; - yamls = as_utils_find_files_matching (yaml_path, "*.yml*", FALSE, NULL); - if (yamls != NULL) { - for (j = 0; j < yamls->len; j++) { - const gchar *val; - val = (const gchar *) g_ptr_array_index (yamls, j); - g_ptr_array_add (mdata_files, - g_strdup (val)); - } - } - } - - if (!subdir_found) { - g_debug ("No metadata-specific subdirectories found in '%s'", root_path); - continue; - } - - /* parse the found data */ - for (j = 0; j < mdata_files->len; j++) { - g_autoptr(GFile) infile = NULL; - const gchar *fname; - - fname = (const gchar*) g_ptr_array_index (mdata_files, j); - g_debug ("Reading: %s", fname); - - infile = g_file_new_for_path (fname); - if (!g_file_query_exists (infile, NULL)) { - g_warning ("Metadata file '%s' does not exist.", fname); - continue; - } - - as_metadata_parse_file (metad, infile, &error); - if (error != NULL) { - g_debug ("WARNING: %s", error->message); - g_error_free (error); - error = NULL; - ret = FALSE; - } - } - } - - cpts = as_metadata_get_components (metad); - for (i = 0; i < cpts->len; i++) { - as_data_pool_add_new_component (dpool, - AS_COMPONENT (g_ptr_array_index (cpts, i))); - } - - return ret; -} - -/** - * as_data_pool_update: - * @dpool: An instance of #AsDataPool. - * @error: A #GError or %NULL. - * - * Builds an index of all found components in the watched locations. - * The function will try to get as much data into the pool as possible, so even if - * the updates completes with %FALSE, it might still add components to the pool. - * - * Returns: %TRUE if update completed without error. - **/ -gboolean -as_data_pool_update (AsDataPool *dpool, GError **error) -{ - gboolean ret; - gboolean ret2; - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - - /* just in case, clear the components table */ - if (g_hash_table_size (priv->cpt_table) > 0) { - g_hash_table_unref (priv->cpt_table); - priv->cpt_table = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - (GDestroyNotify) g_object_unref); - } - - /* read all AppStream metadata that we can find */ - ret = as_data_pool_load_metadata (dpool); - - /* automatically refine the metadata we have in the pool */ - ret2 = as_data_pool_refine_data (dpool); - - return ret && ret2; -} - -/** - * as_data_pool_get_components: - * @dpool: An instance of #AsDataPool. - * - * Get a list of found components. - * - * Returns: (element-type AsComponent) (transfer container): a list of #AsComponent instances, free with g_list_free() - */ -GList* -as_data_pool_get_components (AsDataPool *dpool) -{ - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - return g_hash_table_get_values (priv->cpt_table); -} - -/** - * as_data_pool_get_component_by_id: - * @dpool: An instance of #AsDataPool. - * @id: The AppStream-ID to look for. - * - * Get a specific component by its ID. - * - * Returns: (transfer full): An #AsComponent - */ -AsComponent* -as_data_pool_get_component_by_id (AsDataPool *dpool, const gchar *id) -{ - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - if (id == NULL) - return NULL; - - return g_object_ref (AS_COMPONENT (g_hash_table_lookup (priv->cpt_table, id))); -} - -/** - * as_data_pool_set_locale: - * @dpool: An instance of #AsDataPool. - * @locale: the locale. - * - * Sets the current locale which should be used when parsing metadata. - **/ -void -as_data_pool_set_locale (AsDataPool *dpool, const gchar *locale) -{ - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - g_free (priv->locale); - priv->locale = g_strdup (locale); -} - -/** - * as_data_pool_get_locale: - * @dpool: An instance of #AsDataPool. - * - * Gets the currently used locale. - * - * Returns: Locale used for metadata parsing. - **/ -const gchar * -as_data_pool_get_locale (AsDataPool *dpool) -{ - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - return priv->locale; -} - -/** - * as_data_pool_set_metadata_locations: - * @dpool: An instance of #AsDataPool. - * @dirs: (array zero-terminated=1): a zero-terminated array of data input directories. - * - * Set locations for the data pool to read it's data from. - * This is mainly used for testing purposes. Each location should have an - * "xmls" and/or "yaml" subdirectory with the actual data as (compressed) - * AppStream XML or DEP-11 YAML in it. - */ -void -as_data_pool_set_metadata_locations (AsDataPool *dpool, gchar **dirs) -{ - guint i; - GPtrArray *icondirs; - AsDataPoolPrivate *priv = GET_PRIVATE (dpool); - - /* clear array */ - g_ptr_array_set_size (priv->mdata_dirs, 0); - - icondirs = g_ptr_array_new_with_free_func (g_free); - for (i = 0; priv->icon_paths[i] != NULL; i++) { - g_ptr_array_add (icondirs, g_strdup (priv->icon_paths[i])); - } - - for (i = 0; dirs[i] != NULL; i++) { - g_autofree gchar *path = NULL; - - g_ptr_array_add (priv->mdata_dirs, g_strdup (dirs[i])); - - path = g_build_filename (dirs[i], "icons", NULL); - if (g_file_test (path, G_FILE_TEST_EXISTS)) - g_ptr_array_add (icondirs, g_strdup (path)); - } - - /* add new icon search locations */ - g_strfreev (priv->icon_paths); - priv->icon_paths = as_ptr_array_to_strv (icondirs); -} - -/** - * as_data_pool_error_quark: - * - * Return value: An error quark. - **/ -GQuark -as_data_pool_error_quark (void) -{ - static GQuark quark = 0; - if (!quark) - quark = g_quark_from_static_string ("AsDataPool"); - return quark; -} - -/** - * as_data_pool_new: - * - * Creates a new #AsDataPool. - * - * Returns: (transfer full): a #AsDataPool - * - **/ -AsDataPool* -as_data_pool_new (void) -{ - AsDataPool *dpool; - dpool = g_object_new (AS_TYPE_DATA_POOL, NULL); - return AS_DATA_POOL (dpool); -} diff -Nru appstream-0.9.4/src/as-data-pool.h appstream-0.12.0/src/as-data-pool.h --- appstream-0.9.4/src/as-data-pool.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-data-pool.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) -#error "Only can be included directly." -#endif - -#ifndef __AS_DATAPOOL_H -#define __AS_DATAPOOL_H - -#include -#include "as-component.h" - -G_BEGIN_DECLS - -#define AS_TYPE_DATA_POOL (as_data_pool_get_type ()) -G_DECLARE_DERIVABLE_TYPE (AsDataPool, as_data_pool, AS, DATA_POOL, GObject) - -struct _AsDataPoolClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - -/** - * AsDataPoolError: - * @AS_DATA_POOL_ERROR_FAILED: Generic failure - * - * A metadata pool error. - **/ -typedef enum { - AS_DATA_POOL_ERROR_FAILED, - /*< private >*/ - AS_DATA_POOL_ERROR_LAST -} AsDataPoolError; - -#define AS_DATA_POOL_ERROR as_data_pool_error_quark () -GQuark as_data_pool_error_quark (void); - -AsDataPool *as_data_pool_new (void); - -const gchar *as_data_pool_get_locale (AsDataPool *dpool); -void as_data_pool_set_locale (AsDataPool *dpool, - const gchar *locale); - -gboolean as_data_pool_update (AsDataPool *dpool, GError **error); - -GList *as_data_pool_get_components (AsDataPool *dpool); -AsComponent *as_data_pool_get_component_by_id (AsDataPool *dpool, - const gchar *id); - -GPtrArray *as_data_pool_get_metadata_locations (AsDataPool *dpool); -void as_data_pool_set_metadata_locations (AsDataPool *dpool, - gchar **dirs); - -G_END_DECLS - -#endif /* __AS_DATAPOOL_H */ diff -Nru appstream-0.9.4/src/as-desktop-entry.c appstream-0.12.0/src/as-desktop-entry.c --- appstream-0.9.4/src/as-desktop-entry.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-desktop-entry.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,362 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "as-desktop-entry.h" + +/** + * SECTION:as-desktop-entry + * @short_description: Parser for XDG Desktop Entry data. + * @include: appstream.h + * + */ + +#include + +#include "as-utils.h" +#include "as-utils-private.h" +#include "as-metadata.h" +#include "as-component.h" +#include "as-component-private.h" + +#define DESKTOP_GROUP G_KEY_FILE_DESKTOP_GROUP + +/** + * as_strequal_casefold: + */ +static gboolean +as_strequal_casefold (const gchar *a, const gchar *b) +{ + g_autofree gchar *str1 = NULL; + g_autofree gchar *str2 = NULL; + + if (a != NULL) + str1 = g_utf8_casefold (a, -1); + if (b != NULL) + str2 = g_utf8_casefold (b, -1); + return g_strcmp0 (str1, str2) == 0; +} + +/** + * as_get_locale_from_key: + */ +static gchar* +as_get_locale_from_key (const gchar *key) +{ + gchar *tmp1; + gchar *tmp2; + gchar *locale = NULL; + gchar *delim; + + tmp1 = g_strstr_len (key, -1, "["); + if (tmp1 == NULL) + return g_strdup ("C"); + tmp2 = g_strstr_len (tmp1, -1, "]"); + /* this is a bug in the file */ + if (tmp2 == NULL) + return g_strdup ("C"); + locale = g_strdup (tmp1 + 1); + locale[tmp2 - tmp1 - 1] = '\0'; + + /* drop UTF-8 suffixes */ + if (g_str_has_suffix (locale, ".utf-8") || + g_str_has_suffix (locale, ".UTF-8")) + locale[strlen (locale)-6] = '\0'; + + /* filter out cruft */ + if (as_is_cruft_locale (locale)) + return NULL; + + delim = g_strrstr (locale, "."); + if (delim != NULL) { + gchar *tmp; + g_autofree gchar *enc = NULL; + /* looks like we need to drop another encoding suffix + * (but we need to make sure it actually is one) */ + tmp = delim + 1; + if (tmp != NULL) + enc = g_utf8_strdown (tmp, -1); + if ((enc != NULL) && (g_str_has_prefix (enc, "iso"))) { + delim[0] = '\0'; + } + } + + return locale; +} + +/** + * as_add_filtered_categories: + * + * Filter out some useless categories which we don't want to have in the + * AppStream metadata. + * Add the remaining ones to the new #AsComponent. + */ +static void +as_add_filtered_categories (gchar **cats, AsComponent *cpt) +{ + guint i; + + for (i = 0; cats[i] != NULL; i++) { + const gchar *cat = cats[i]; + + if (g_strcmp0 (cat, "GTK") == 0) + continue; + if (g_strcmp0 (cat, "Qt") == 0) + continue; + if (g_strcmp0 (cat, "GNOME") == 0) + continue; + if (g_strcmp0 (cat, "KDE") == 0) + continue; + if (g_strcmp0 (cat, "GUI") == 0) + continue; + if (g_strcmp0 (cat, "Application") == 0) + continue; + + /* custom categories are ignored */ + if (g_str_has_prefix (cat, "X-")) + continue; + if (g_str_has_prefix (cat, "x-")) + continue; + + /* check for invalid */ + if (g_strcmp0 (cat, "") == 0) + continue; + + /* add the category if it is valid */ + if (as_utils_is_category_name (cat)) + as_component_add_category (cpt, cat); + } +} + + +/** + * as_desktop_entry_parse_data: + */ +AsComponent* +as_desktop_entry_parse_data (const gchar *data, const gchar *cid, AsFormatVersion fversion, GError **error) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(GKeyFile) df = NULL; + gchar *tmp; + gboolean ignore_cpt = FALSE; + g_auto(GStrv) keys = NULL; + guint i; + + g_assert (cid != NULL); + + df = g_key_file_new (); + g_key_file_load_from_data (df, + data, + -1, + G_KEY_FILE_KEEP_TRANSLATIONS, + error); + if (*error != NULL) + return NULL; + + /* Type */ + tmp = g_key_file_get_string (df, + DESKTOP_GROUP, + "Type", + NULL); + if (!as_strequal_casefold (tmp, "application")) { + g_free (tmp); + /* not an application, so we can't proceed, but also no error */ + return NULL; + } + g_free (tmp); + + /* NoDisplay */ + tmp = g_key_file_get_string (df, + DESKTOP_GROUP, + "NoDisplay", + NULL); + if (as_strequal_casefold (tmp, "true")) { + /* we will read the application data, but it will be ignored in its current form */ + ignore_cpt = TRUE; + } + g_free (tmp); + + /* X-AppStream-Ignore */ + tmp = g_key_file_get_string (df, + DESKTOP_GROUP, + "X-AppStream-Ignore", + NULL); + if (as_strequal_casefold (tmp, "true")) { + g_free (tmp); + /* this file should be ignored, we can't return a component (but this is also no error) */ + return NULL; + } + g_free (tmp); + + /* check this is a valid desktop file */ + if (!g_key_file_has_group (df, DESKTOP_GROUP)) { + g_set_error (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_PARSE, + "Data in '%s' does not contain a valid Desktop Entry.", cid); + return NULL; + } + + /* create the new component we synthesize for this desktop entry */ + cpt = as_component_new (); + as_component_set_kind (cpt, AS_COMPONENT_KIND_DESKTOP_APP); + as_component_set_id (cpt, cid); + as_component_set_ignored (cpt, ignore_cpt); + as_component_set_origin_kind (cpt, AS_ORIGIN_KIND_DESKTOP_ENTRY); + + /* strip .desktop suffix if the reverse-domain-name scheme is followed and we build for + * a recent AppStream version */ + if (fversion >= AS_FORMAT_VERSION_V0_10) { + g_auto(GStrv) parts = g_strsplit (cid, ".", 3); + if (g_strv_length (parts) == 3) { + if (as_utils_is_tld (parts[0]) && g_str_has_suffix (cid, ".desktop")) { + g_autofree gchar *id_raw = NULL; + /* remove .desktop suffix */ + id_raw = g_strdup (cid); + id_raw[strlen (id_raw)-8] = '\0'; + + as_component_set_id (cpt, id_raw); + } + } + } + + keys = g_key_file_get_keys (df, DESKTOP_GROUP, NULL, NULL); + for (i = 0; keys[i] != NULL; i++) { + g_autofree gchar *locale = NULL; + g_autofree gchar *val = NULL; + gchar *key = keys[i]; + + g_strstrip (key); + locale = as_get_locale_from_key (key); + + /* skip invalid stuff */ + if (locale == NULL) + continue; + + val = g_key_file_get_string (df, DESKTOP_GROUP, key, NULL); + if (g_str_has_prefix (key, "Name")) { + as_component_set_name (cpt, val, locale); + } else if (g_str_has_prefix (key, "Comment")) { + as_component_set_summary (cpt, val, locale); + } else if (g_strcmp0 (key, "Categories") == 0) { + g_auto(GStrv) cats = NULL; + + cats = g_strsplit (val, ";", -1); + as_add_filtered_categories (cats, cpt); + } else if (g_str_has_prefix (key, "Keywords")) { + g_auto(GStrv) kws = NULL; + + /* drop last ";" to not get an empty entry later */ + if (g_str_has_suffix (val, ";")) + val[strlen (val) -1] = '\0'; + + kws = g_strsplit (val, ";", -1); + as_component_set_keywords (cpt, kws, locale); + } else if (g_strcmp0 (key, "MimeType") == 0) { + g_auto(GStrv) mts = NULL; + g_autoptr(AsProvided) prov = NULL; + guint j; + + mts = g_strsplit (val, ";", -1); + if (mts == NULL) + continue; + + prov = as_component_get_provided_for_kind (cpt, AS_PROVIDED_KIND_MIMETYPE); + if (prov == NULL) { + prov = as_provided_new (); + as_provided_set_kind (prov, AS_PROVIDED_KIND_MIMETYPE); + } else { + g_object_ref (prov); + } + + for (j = 0; mts[j] != NULL; j++) { + if (g_strcmp0 (mts[j], "") == 0) + continue; + as_provided_add_item (prov, mts[j]); + } + + as_component_add_provided (cpt, prov); + } else if (g_strcmp0 (key, "Icon") == 0) { + g_autoptr(AsIcon) icon = NULL; + + icon = as_icon_new (); + if (g_str_has_prefix (val, "/")) { + as_icon_set_kind (icon, AS_ICON_KIND_LOCAL); + as_icon_set_filename (icon, val); + } else { + gchar *dot; + as_icon_set_kind (icon, AS_ICON_KIND_STOCK); + + /* work around stock icons being suffixed */ + dot = g_strstr_len (val, -1, "."); + if (dot != NULL && + (g_strcmp0 (dot, ".png") == 0 || + g_strcmp0 (dot, ".xpm") == 0 || + g_strcmp0 (dot, ".svg") == 0 || + g_strcmp0 (dot, ".svgz") == 0)) { + *dot = '\0'; + } + + as_icon_set_name (icon, val); + } + + as_component_add_icon (cpt, icon); + } + } + + /* we have the lowest priority */ + as_component_set_priority (cpt, -G_MAXINT); + return g_object_ref (cpt); +} + +/** + * as_desktop_entry_parse_file: + * + * Parse a .desktop file. + */ +AsComponent* +as_desktop_entry_parse_file (GFile *file, AsFormatVersion fversion, GError **error) +{ + g_autofree gchar *file_basename = NULL; + g_autoptr(GInputStream) file_stream = NULL; + g_autoptr(GString) dedata = NULL; + gssize len; + const gsize buffer_size = 1024 * 32; + g_autofree gchar *buffer = NULL; + + file_stream = G_INPUT_STREAM (g_file_read (file, NULL, error)); + if (file_stream == NULL) + return NULL; + + file_basename = g_file_get_basename (file); + dedata = g_string_new (""); + buffer = g_malloc (buffer_size); + while ((len = g_input_stream_read (file_stream, buffer, buffer_size, NULL, error)) > 0) { + g_string_append_len (dedata, buffer, len); + } + /* check if there was an error */ + if (len < 0) + return NULL; + + /* parse desktop entry */ + return as_desktop_entry_parse_data (dedata->str, + file_basename, + fversion, + error); +} diff -Nru appstream-0.9.4/src/as-desktop-entry.h appstream-0.12.0/src/as-desktop-entry.h --- appstream-0.9.4/src/as-desktop-entry.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-desktop-entry.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,44 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_DESKTOP_ENTRY_H +#define __AS_DESKTOP_ENTRY_H + +#include + +#include "as-component.h" +#include "as-metadata.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +AsComponent *as_desktop_entry_parse_data (const gchar *data, + const gchar *cid, + AsFormatVersion fversion, + GError **error); + +AsComponent *as_desktop_entry_parse_file (GFile *file, + AsFormatVersion fversion, + GError **error); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_DESKTOP_ENTRY_H */ diff -Nru appstream-0.9.4/src/as-distro-details.c appstream-0.12.0/src/as-distro-details.c --- appstream-0.9.4/src/as-distro-details.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-distro-details.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2012-2014 Matthias Klumpp + * Copyright (C) 2012-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -39,7 +39,7 @@ * It is used internalls to get information about the icon-store or the 3rd-party screenshot * service distributors may want to provide. * - * See also: #AsDatabase + * See also: #AsPool */ typedef struct @@ -70,9 +70,9 @@ static void as_distro_details_init (AsDistroDetails *distro) { - GFile* f = NULL; + g_autoptr(GFile) f = NULL; + g_autoptr(GError) error = NULL; gchar *line; - GError *error = NULL; AsDistroDetailsPrivate *priv = GET_PRIVATE (distro); as_distro_details_set_id (distro, "unknown"); @@ -86,36 +86,33 @@ /* get details about the distribution we are running on */ f = g_file_new_for_path ("/etc/os-release"); if (g_file_query_exists (f, NULL)) { - GDataInputStream *dis; - GFileInputStream* fis; + g_autoptr(GDataInputStream) dis = NULL; + g_autoptr(GFileInputStream) fis = NULL; fis = g_file_read (f, NULL, &error); if (error != NULL) - goto out; + return; dis = g_data_input_stream_new ((GInputStream*) fis); - g_object_unref (fis); while ((line = g_data_input_stream_read_line (dis, NULL, NULL, &error)) != NULL) { - gchar **data; - gchar *dvalue; + g_auto(GStrv) data = NULL; + g_autofree gchar *dvalue = NULL; if (error != NULL) { - g_object_unref (dis); - goto out; + return; } data = g_strsplit (line, "=", 2); if (g_strv_length (data) != 2) { - g_strfreev (data); g_free (line); continue; } - dvalue = data[1]; + dvalue = g_strdup (data[1]); if (g_str_has_prefix (dvalue, "\"")) { - gchar *tmpstr; - tmpstr = g_strndup (dvalue + 1, strlen(dvalue) - 2); + gchar *tmp; + tmp = g_strndup (dvalue + 1, strlen(dvalue) - 2); g_free (dvalue); - dvalue = tmpstr; + dvalue = tmp; } if (g_strcmp0 (data[0], "ID") == 0) @@ -128,11 +125,6 @@ g_free (line); } } - -out: - if (error != NULL) - g_error_free (error); - g_object_unref (f); } /** @@ -153,31 +145,6 @@ } /** - * as_get_icon_repository_paths: - * - * Returns list of icon-paths for software-center applications to use. - * Icons of software (even if it is not installed) are stored in these - * locations. - * - * Returns: (transfer full): A NULL-terminated array of paths. - */ -gchar** -as_get_icon_repository_paths () -{ - gchar **paths; - guint len; - guint i; - - len = G_N_ELEMENTS (AS_APPSTREAM_METADATA_PATHS); - paths = g_new0 (gchar *, len + 1); - for (i = 0; i < len; i++) { - paths[i] = g_build_filename (AS_APPSTREAM_METADATA_PATHS[i], "icons", NULL); - } - - return paths; -} - -/** * as_distro_details_get_str: */ gchar* @@ -196,14 +163,24 @@ * as_distro_details_get_bool: */ gboolean -as_distro_details_get_bool (AsDistroDetails *distro, const gchar *key) +as_distro_details_get_bool (AsDistroDetails *distro, const gchar *key, gboolean default_val) { - gboolean value; AsDistroDetailsPrivate *priv = GET_PRIVATE (distro); + gboolean value; + g_autoptr(GError) error = NULL; g_return_val_if_fail (key != NULL, FALSE); - value = g_key_file_get_boolean (priv->keyf, priv->distro_id, key, NULL); + value = g_key_file_get_boolean (priv->keyf, "general", key, &error); + if (error != NULL) { + g_error_free (error); + error = NULL; + + value = g_key_file_get_boolean (priv->keyf, priv->distro_id, key, &error); + if (error != NULL) + return default_val; + } + return value; } diff -Nru appstream-0.9.4/src/as-distro-details.h appstream-0.12.0/src/as-distro-details.h --- appstream-0.9.4/src/as-distro-details.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-distro-details.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2012-2015 Matthias Klumpp + * Copyright (C) 2012-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -53,9 +53,8 @@ gchar *as_distro_details_get_str (AsDistroDetails *distro, const gchar *key); gboolean as_distro_details_get_bool (AsDistroDetails *distro, - const gchar *key); - -gchar **as_get_icon_repository_paths (void); + const gchar *key, + gboolean default_val); G_END_DECLS diff -Nru appstream-0.9.4/src/as-distro-extras.c appstream-0.12.0/src/as-distro-extras.c --- appstream-0.9.4/src/as-distro-extras.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-distro-extras.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,410 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016-2018 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "config.h" +#include "as-distro-extras.h" + +/** + * SECTION:as-distro-extras + * @short_description: Private helper methods to integrate AppStream better with distros + * @include: appstream.h + * + * This module mainly contains distribution-specific, non-public helper methods. + */ + +#include +#include +#include +#include +#include + +#include "as-utils.h" +#include "as-utils-private.h" +#include "as-pool-private.h" + +#define YAML_SEPARATOR "---" +/* Compilers will optimise this to a constant */ +#define YAML_SEPARATOR_LEN strlen(YAML_SEPARATOR) + +static const gchar *apt_lists_dir = "/var/lib/apt/lists/"; +static const gchar *appstream_yml_target = "/var/lib/app-info/yaml"; +static const gchar *appstream_icons_target = "/var/lib/app-info/icons"; + +static const gchar* const default_icon_sizes[] = { "48x48", "48x48@2", "64x64", "64x64@2", "128x128", "128x128@2", NULL }; + + +/** + * directory_is_empty: + * + * Quickly check if a directory is empty. + */ +static gboolean +directory_is_empty (const gchar *dirname) +{ + gint n = 0; + struct dirent *d; + DIR *dir = opendir (dirname); + + if (dir == NULL) + return TRUE; + + while ((d = readdir (dir)) != NULL) { + if (++n > 2) + break; + } + + closedir (dir); + + /* empty directory contains . and .. */ + if (n <= 2) + return TRUE; + else + return 0; +} + +/** + * as_get_yml_data_origin: + * + * Extract the data origin from the AppStream YAML file. + * We don't use the #AsYAMLData loader, because it is much + * slower than just loading the initial parts of the file and + * extracting the origin manually. + */ +static gchar* +as_get_yml_data_origin (const gchar *fname) +{ + const gchar *data; + GZlibDecompressor *zdecomp; + g_autoptr(GFileInputStream) fistream = NULL; + g_autoptr(GMemoryOutputStream) mem_os = NULL; + g_autoptr(GInputStream) conv_stream = NULL; + g_autoptr(GFile) file = NULL; + g_autofree gchar *str = NULL; + g_auto(GStrv) strv = NULL; + GError *err; + guint i; + gchar *start, *end; + gchar *origin = NULL; + + file = g_file_new_for_path (fname); + fistream = g_file_read (file, NULL, &err); + + if (!fistream) { + g_critical ("Unable to open file '%s' for reading: %s, skipping.", fname, err->message); + g_error_free (err); + return NULL; + } + + mem_os = (GMemoryOutputStream*) g_memory_output_stream_new (NULL, 0, g_realloc, g_free); + zdecomp = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP); + conv_stream = g_converter_input_stream_new (G_INPUT_STREAM (fistream), G_CONVERTER (zdecomp)); + g_object_unref (zdecomp); + + g_output_stream_splice (G_OUTPUT_STREAM (mem_os), conv_stream, 0, NULL, NULL); + data = (const gchar*) g_memory_output_stream_get_data (mem_os); + + /* faster than a regular expression? + * Get the first YAML document, then extract the origin string. + */ + if (data == NULL) + return NULL; + /* start points to the start of the document, i.e. "File:" normally */ + start = g_strstr_len (data, 400, YAML_SEPARATOR) + YAML_SEPARATOR_LEN; + if (start[0] == '\0') + return NULL; + /* Find the end of the first document - can be NULL if there is only one, + * for example if we're given YAML for an empty archive */ + end = g_strstr_len (start, -1, YAML_SEPARATOR); + str = g_strndup (start, strlen(start) - (end ? strlen(end) : 0)); + + strv = g_strsplit (str, "\n", -1); + for (i = 0; strv[i] != NULL; i++) { + g_auto(GStrv) strv2 = NULL; + if (!g_str_has_prefix (strv[i], "Origin:")) + continue; + + strv2 = g_strsplit (strv[i], ":", 2); + g_strstrip (strv2[1]); + origin = g_strdup (strv2[1]); + + /* remove quotes, in case the string is quoted */ + if ((g_str_has_prefix (origin, "\"")) && (g_str_has_suffix (origin, "\""))) { + g_autofree gchar *tmp = NULL; + + tmp = origin; + origin = g_strndup (tmp + 1, strlen (tmp) - 2); + } + + break; + } + + return origin; +} + +/** + * as_extract_icon_cache_tarball: + */ +static void +as_extract_icon_cache_tarball (const gchar *asicons_target, + const gchar *origin, + const gchar *apt_basename, + const gchar *apt_lists_dir, + const gchar *icons_size) +{ + g_autofree gchar *escaped_size = NULL; + g_autofree gchar *icons_tarball = NULL; + g_autofree gchar *target_dir = NULL; + g_autofree gchar *cmd = NULL; + g_autofree gchar *stderr_txt = NULL; + gint res; + g_autoptr(GError) tmp_error = NULL; + + escaped_size = g_uri_escape_string (icons_size, NULL, FALSE); + icons_tarball = g_strdup_printf ("%s/%sicons-%s.tar.gz", apt_lists_dir, apt_basename, escaped_size); + if (!g_file_test (icons_tarball, G_FILE_TEST_EXISTS)) { + /* no icons found, stop here */ + return; + } + + target_dir = g_build_filename (asicons_target, origin, icons_size, NULL); + if (g_mkdir_with_parents (target_dir, 0755) > 0) { + g_debug ("Unable to create '%s': %s", target_dir, g_strerror (errno)); + return; + } + + if (!as_utils_is_writable (target_dir)) { + g_debug ("Unable to write to '%s': Can't add AppStream icon-cache from APT to the pool.", target_dir); + return; + } + + cmd = g_strdup_printf ("/bin/tar -xzf '%s' -C '%s'", icons_tarball, target_dir); + g_spawn_command_line_sync (cmd, NULL, &stderr_txt, &res, &tmp_error); + if (tmp_error != NULL) { + g_debug ("Failed to run tar: %s", tmp_error->message); + } + if (res != 0) { + g_debug ("Running tar failed with exit-code %i: %s", res, stderr_txt); + } +} + +/** + * as_pool_check_file_newer_than_cache: + */ +static gboolean +as_pool_check_file_newer_than_cache (AsPool *pool, GPtrArray *file_list) +{ + guint i; + + for (i = 0; i < file_list->len; i++) { + struct stat sb; + const gchar *fname = (const gchar*) g_ptr_array_index (file_list, i); + if (stat (fname, &sb) < 0) + continue; + if (sb.st_ctime > as_pool_get_cache_age (pool)) { + /* we need to update the cache */ + return TRUE; + } + } + + return FALSE; +} + +/** + * as_pool_scan_apt: + * + * Scan for additional metadata in 3rd-party directories and move it to the right place. + */ +void +as_pool_scan_apt (AsPool *pool, gboolean force, GError **error) +{ + g_autoptr(GPtrArray) yml_files = NULL; + g_autoptr(GError) tmp_error = NULL; + gboolean data_changed = FALSE; + gboolean icons_available = FALSE; + guint i; + + /* skip this step if the APT lists directory doesn't exist */ + if (!g_file_test (apt_lists_dir, G_FILE_TEST_IS_DIR)) { + g_debug ("APT lists directory (%s) not found!", apt_lists_dir); + return; + } + + if (g_file_test (appstream_yml_target, G_FILE_TEST_IS_DIR)) { + g_autoptr(GPtrArray) ytfiles = NULL; + + /* we can't modify the files here if we don't have write access */ + if (!as_utils_is_writable (appstream_yml_target)) { + g_debug ("Unable to write to '%s': Can't add AppStream data from APT to the pool.", appstream_yml_target); + return; + } + + ytfiles = as_utils_find_files_matching (appstream_yml_target, "*", FALSE, &tmp_error); + if (tmp_error != NULL) { + g_warning ("Could not scan for broken symlinks in DEP-11 target: %s", tmp_error->message); + return; + } + + if (ytfiles != NULL) { + for (i = 0; i < ytfiles->len; i++) { + const gchar *fname = (const gchar*) g_ptr_array_index (ytfiles, i); + if (!g_file_test (fname, G_FILE_TEST_EXISTS)) { + g_remove (fname); + data_changed = TRUE; + } + } + } + } + + yml_files = as_utils_find_files_matching (apt_lists_dir, "*Components-*.yml.gz", FALSE, &tmp_error); + if (tmp_error != NULL) { + g_warning ("Could not scan for APT-downloaded DEP-11 files: %s", tmp_error->message); + return; + } + + /* no data found? skip scan step */ + if (yml_files == NULL || yml_files->len <= 0) { + g_debug ("Could not find DEP-11 data in APT directories."); + return; + } + + /* We have to check if our metadata is in the target directory at all, and - if not - trigger a cache refresh. + * This is needed because APT is putting files with the *server* ctime/mtime into it's lists directory, + * and that time might be lower than the time the metadata cache was last updated, which may result + * in no cache update being triggered at all. + * + * We also check for available icons, to install icons again if they were disabled (and removed) previously. + */ + for (i = 0; i < yml_files->len; i++) { + g_autofree gchar *fbasename = NULL; + g_autofree gchar *dest_fname = NULL; + const gchar *fname = (const gchar*) g_ptr_array_index (yml_files, i); + + fbasename = g_path_get_basename (fname); + dest_fname = g_build_filename (appstream_yml_target, fbasename, NULL); + if (!g_file_test (dest_fname, G_FILE_TEST_EXISTS)) { + data_changed = TRUE; + g_debug ("File '%s' missing, cache update is needed.", dest_fname); + break; + } + + if (!icons_available) { + g_autofree gchar *apt_basename = NULL; + guint j; + + /* get base prefix for this file in the APT download cache */ + apt_basename = g_strndup (fbasename, strlen (fbasename) - strlen (g_strrstr (fbasename, "_") + 1)); + + for (j = 0; default_icon_sizes[j] != NULL; j++) { + g_autofree gchar *icons_tarball = NULL; + + /* NOTE: We would normally need to escape the "@" of HiDPI icons here, but since having only HiDPI icons is + * a case that never happens and the 64x64px icons are required to be present anyway, we ignore that fact. */ + icons_tarball = g_strdup_printf ("%s/%sicons-%s.tar.gz", apt_lists_dir, apt_basename, default_icon_sizes[j]); + if (g_file_test (icons_tarball, G_FILE_TEST_EXISTS)) { + icons_available = TRUE; + break; + } + } + } + } + + /* get the last time we touched the database */ + if (!data_changed) { + /* check if a data file was updated */ + data_changed = as_pool_check_file_newer_than_cache (pool, yml_files); + + /* check if we have no icons, but should have some */ + if (icons_available) { + if (directory_is_empty (appstream_icons_target)) + data_changed = TRUE; /* we need to update, icons are missing */ + } + } + + /* no changes means nothing to do here */ + if ((!data_changed) && (!force)) + return; + + /* this is not really great, but we simply can't detect if we should remove an icons folder or not, + * or which specific icons we should drop from a folder. + * So, we hereby simply "own" the icons directory and all it's contents, anything put in there by 3rd-parties will + * be deleted. + * (And there should actually be no cases 3rd-parties put icons there on a Debian machine, since metadata in packages + * will land in /usr/share/app-info anyway) + */ + as_utils_delete_dir_recursive (appstream_icons_target); + if (g_mkdir_with_parents (appstream_yml_target, 0755) > 0) { + g_debug ("Unable to create '%s': %s", appstream_yml_target, g_strerror (errno)); + return; + } + + for (i = 0; i < yml_files->len; i++) { + g_autofree gchar *fbasename = NULL; + g_autofree gchar *dest_fname = NULL; + g_autofree gchar *origin = NULL; + g_autofree gchar *file_baseprefix = NULL; + guint j; + const gchar *fname = (const gchar*) g_ptr_array_index (yml_files, i); + + fbasename = g_path_get_basename (fname); + dest_fname = g_build_filename (appstream_yml_target, fbasename, NULL); + + if (!g_file_test (fname, G_FILE_TEST_EXISTS)) { + /* broken symlinks in the dest will have been removed earlier */ + g_debug ("File %s is a broken symlink, skipping.", fname); + continue; + } else if (!g_file_test (dest_fname, G_FILE_TEST_EXISTS)) { + /* file not found, let's symlink */ + if (symlink (fname, dest_fname) != 0) { + g_debug ("Unable to set symlink (%s -> %s): %s", + fname, + dest_fname, + g_strerror (errno)); + continue; + } + } else if (!g_file_test (dest_fname, G_FILE_TEST_IS_SYMLINK)) { + /* file found, but it isn't a symlink, try to rescue */ + g_debug ("Regular file '%s' found, which doesn't belong there. Removing it.", dest_fname); + g_remove (dest_fname); + continue; + } + + /* get DEP-11 data origin */ + origin = as_get_yml_data_origin (dest_fname); + if (origin == NULL) { + g_warning ("No origin found for file %s", fbasename); + continue; + } + + /* get base prefix for this file in the APT download cache */ + file_baseprefix = g_strndup (fbasename, strlen (fbasename) - strlen (g_strrstr (fbasename, "_") + 1)); + + /* extract icons to their destination (if they exist at all */ + for (j = 0; default_icon_sizes[j] != NULL; j++) { + as_extract_icon_cache_tarball (appstream_icons_target, + origin, + file_baseprefix, + apt_lists_dir, + default_icon_sizes[j]); + } + } + + /* ensure the cache-rebuild process notices these changes */ + as_touch_location (appstream_yml_target); +} diff -Nru appstream-0.9.4/src/as-distro-extras.h appstream-0.12.0/src/as-distro-extras.h --- appstream-0.9.4/src/as-distro-extras.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-distro-extras.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,37 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016-2018 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_DISTRO_EXTRAS_H +#define __AS_DISTRO_EXTRAS_H + +#include +#include "as-pool.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +void as_pool_scan_apt (AsPool *pool, + gboolean force, + GError **error); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_DISTRO_EXTRAS_H */ diff -Nru appstream-0.9.4/src/as-enums.c appstream-0.12.0/src/as-enums.c --- appstream-0.9.4/src/as-enums.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-enums.c 2018-04-04 15:53:56.000000000 +0000 @@ -34,7 +34,7 @@ * * Returns: string version of @url_kind **/ -const gchar * +const gchar* as_url_kind_to_string (AsUrlKind url_kind) { if (url_kind == AS_URL_KIND_HOMEPAGE) @@ -47,6 +47,8 @@ return "help"; if (url_kind == AS_URL_KIND_DONATION) return "donation"; + if (url_kind == AS_URL_KIND_TRANSLATE) + return "translate"; return "unknown"; } @@ -71,48 +73,12 @@ return AS_URL_KIND_HELP; if (g_strcmp0 (url_kind, "donation") == 0) return AS_URL_KIND_DONATION; + if (g_strcmp0 (url_kind, "translate") == 0) + return AS_URL_KIND_TRANSLATE; return AS_URL_KIND_UNKNOWN; } /** - * as_bundle_kind_to_string: - * @bundle_kind: the %AsBundleKind. - * - * Converts the enumerated value to an text representation. - * - * Returns: string version of @bundle_kind - * - * Since: 0.8.0 - **/ -const gchar * -as_bundle_kind_to_string (AsBundleKind bundle_kind) -{ - if (bundle_kind == AS_BUNDLE_KIND_LIMBA) - return "limba"; - if (bundle_kind == AS_BUNDLE_KIND_XDG_APP) - return "xdg-app"; - return "unknown"; -} - -/** - * as_bundle_kind_from_string: - * @bundle_kind: the string. - * - * Converts the text representation to an enumerated value. - * - * Returns: a #AsBundleKind or %AS_BUNDLE_KIND_UNKNOWN for unknown - **/ -AsBundleKind -as_bundle_kind_from_string (const gchar *bundle_kind) -{ - if (g_strcmp0 (bundle_kind, "limba") == 0) - return AS_BUNDLE_KIND_LIMBA; - if (g_strcmp0 (bundle_kind, "xdg-app") == 0) - return AS_BUNDLE_KIND_LIMBA; - return AS_BUNDLE_KIND_UNKNOWN; -} - -/** * as_urgency_kind_to_string: * @urgency_kind: the %AsUrgencyKind. * diff -Nru appstream-0.9.4/src/as-enums.h appstream-0.12.0/src/as-enums.h --- appstream-0.9.4/src/as-enums.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-enums.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2012-2015 Matthias Klumpp + * Copyright (C) 2012-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -18,6 +18,10 @@ * along with this library. If not, see . */ +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __AS_ENUMS_H #define __AS_ENUMS_H @@ -25,6 +29,12 @@ G_BEGIN_DECLS +/* convenience functions as it's easy to forget the bitwise operators */ +#define as_flags_add(bitfield,enum) do { ((bitfield) |= enum); } while (0) +#define as_flags_remove(bitfield,enum) do { ((bitfield) &= ~enum); } while (0) +#define as_flags_invert(bitfield,enum) do { ((bitfield) ^= enum); } while (0) +#define as_flags_contains(bitfield,enum) (((bitfield) & enum) > 0) + /** * AsUrlKind: * @AS_URL_KIND_UNKNOWN: Type invalid or not known @@ -33,6 +43,7 @@ * @AS_URL_KIND_FAQ: FAQ page * @AS_URL_KIND_HELP: Help manual * @AS_URL_KIND_DONATION: Page with information about how to donate to the project + * @AS_URL_KIND_TRANSLATE: Page with instructions on how to translate the project / submit translations. * * The URL type. **/ @@ -43,6 +54,7 @@ AS_URL_KIND_FAQ, AS_URL_KIND_HELP, AS_URL_KIND_DONATION, + AS_URL_KIND_TRANSLATE, /*< private >*/ AS_URL_KIND_LAST } AsUrlKind; @@ -51,25 +63,6 @@ AsUrlKind as_url_kind_from_string (const gchar *url_kind); /** - * AsBundleKind: - * @AS_BUNDLE_KIND_UNKNOWN: Type invalid or not known - * @AS_BUNDLE_KIND_LIMBA: A Limba bundle - * @AS_BUNDLE_KIND_XDG_APP: An xdg-app bundle - * - * The bundle type. - **/ -typedef enum { - AS_BUNDLE_KIND_UNKNOWN, - AS_BUNDLE_KIND_LIMBA, - AS_BUNDLE_KIND_XDG_APP, - /*< private >*/ - AS_BUNDLE_KIND_LAST -} AsBundleKind; - -const gchar *as_bundle_kind_to_string (AsBundleKind bundle_kind); -AsBundleKind as_bundle_kind_from_string (const gchar *bundle_kind); - -/** * AsUrgencyKind: * @AS_URGENCY_KIND_UNKNOWN: Urgency is unknown or not set * @AS_URGENCY_KIND_LOW: Low urgency diff -Nru appstream-0.9.4/src/as-icon.c appstream-0.12.0/src/as-icon.c --- appstream-0.9.4/src/as-icon.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-icon.c 2018-04-04 15:53:56.000000000 +0000 @@ -26,7 +26,8 @@ #include "config.h" -#include "as-icon.h" +#include "as-icon-private.h" +#include "as-variant-cache.h" typedef struct { @@ -36,6 +37,7 @@ gchar *filename; guint width; guint height; + guint scale; } AsIconPrivate; G_DEFINE_TYPE_WITH_PRIVATE (AsIcon, as_icon, G_TYPE_OBJECT) @@ -107,6 +109,8 @@ static void as_icon_init (AsIcon *icon) { + AsIconPrivate *priv = GET_PRIVATE (icon); + priv->scale = 1; } /** @@ -198,6 +202,10 @@ as_icon_get_url (AsIcon *icon) { AsIconPrivate *priv = GET_PRIVATE (icon); + if (priv->url == NULL && priv->filename != NULL) { + priv->url = g_strdup_printf ("file://%s", priv->filename); + } + return priv->url; } @@ -244,6 +252,12 @@ AsIconPrivate *priv = GET_PRIVATE (icon); g_free (priv->filename); priv->filename = g_strdup (filename); + + /* invalidate URL */ + if (priv->url != NULL) { + g_free (priv->url); + priv->url = NULL; + } } /** @@ -301,6 +315,231 @@ } /** + * as_icon_get_scale: + * @icon: a #AsIcon instance. + * + * Returns: The icon scaling factor. + * + * Since: 0.11.0 + **/ +guint +as_icon_get_scale (AsIcon *icon) +{ + AsIconPrivate *priv = GET_PRIVATE (icon); + return priv->scale; +} + +/** + * as_icon_set_scale: + * @icon: a #AsIcon instance. + * @scale: the icon scaling factor. + * + * Sets the icon scaling factor used for HiDPI displays. + * + * Since: 0.11.0 + **/ +void +as_icon_set_scale (AsIcon *icon, guint scale) +{ + AsIconPrivate *priv = GET_PRIVATE (icon); + priv->scale = scale; +} + +/** + * as_xml_icon_set_size_from_node: + */ +static void +as_xml_icon_set_size_from_node (xmlNode *node, AsIcon *icon) +{ + gchar *val; + + val = (gchar*) xmlGetProp (node, (xmlChar*) "width"); + if (val != NULL) { + as_icon_set_width (icon, g_ascii_strtoll (val, NULL, 10)); + g_free (val); + } + val = (gchar*) xmlGetProp (node, (xmlChar*) "height"); + if (val != NULL) { + as_icon_set_height (icon, g_ascii_strtoll (val, NULL, 10)); + g_free (val); + } + val = (gchar*) xmlGetProp (node, (xmlChar*) "scale"); + if (val != NULL) { + as_icon_set_scale (icon, g_ascii_strtoll (val, NULL, 10)); + g_free (val); + } +} + +/** + * as_icon_load_from_xml: + * @icon: an #AsIcon + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads data from an XML node. + **/ +gboolean +as_icon_load_from_xml (AsIcon *icon, AsContext *ctx, xmlNode *node, GError **error) +{ + AsIconPrivate *priv = GET_PRIVATE (icon); + g_autofree gchar *type_str = NULL; + g_autofree gchar *content = NULL; + + content = as_xml_get_node_value (node); + if (content == NULL) + return FALSE; + + type_str = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + + if (g_strcmp0 (type_str, "stock") == 0) { + priv->kind = AS_ICON_KIND_STOCK; + as_icon_set_name (icon, content); + } else if (g_strcmp0 (type_str, "cached") == 0) { + priv->kind = AS_ICON_KIND_CACHED; + as_icon_set_filename (icon, content); + as_xml_icon_set_size_from_node (node, icon); + } else if (g_strcmp0 (type_str, "local") == 0) { + priv->kind = AS_ICON_KIND_LOCAL; + as_icon_set_filename (icon, content); + as_xml_icon_set_size_from_node (node, icon); + } else if (g_strcmp0 (type_str, "remote") == 0) { + priv->kind = AS_ICON_KIND_REMOTE; + if (!as_context_has_media_baseurl (ctx)) { + /* no baseurl, we can just set the value as URL */ + as_icon_set_url (icon, content); + } else { + /* handle the media baseurl */ + g_free (priv->url); + priv->url = g_build_filename (as_context_get_media_baseurl (ctx), content, NULL); + } + as_xml_icon_set_size_from_node (node, icon); + } + + return TRUE; +} + +/** + * as_icon_to_xml_node: + * @icon: an #AsIcon + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +void +as_icon_to_xml_node (AsIcon *icon, AsContext *ctx, xmlNode *root) +{ + AsIconPrivate *priv = GET_PRIVATE (icon); + xmlNode *n; + const gchar *value; + + if (priv->kind == AS_ICON_KIND_LOCAL) + value = as_icon_get_filename (icon); + else if (priv->kind == AS_ICON_KIND_REMOTE) + value = as_icon_get_url (icon); + else + value = as_icon_get_name (icon); + + if (value == NULL) + return; + + n = xmlNewTextChild (root, NULL, (xmlChar*) "icon", (xmlChar*) value); + xmlNewProp (n, (xmlChar*) "type", + (xmlChar*) as_icon_kind_to_string (priv->kind)); + + if (priv->kind != AS_ICON_KIND_STOCK) { + if (priv->width > 0) { + g_autofree gchar *size = NULL; + size = g_strdup_printf ("%i", as_icon_get_width (icon)); + xmlNewProp (n, (xmlChar*) "width", (xmlChar*) size); + } + + if (priv->height > 0) { + g_autofree gchar *size = NULL; + size = g_strdup_printf ("%i", as_icon_get_height (icon)); + xmlNewProp (n, (xmlChar*) "height", (xmlChar*) size); + } + + if (priv->scale > 1) { + g_autofree gchar *scale = NULL; + scale = g_strdup_printf ("%i", as_icon_get_scale (icon)); + xmlNewProp (n, (xmlChar*) "scale", (xmlChar*) scale); + } + } +} + +/** + * as_icon_to_variant: + * @icon: an #AsIcon + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_icon_to_variant (AsIcon *icon, GVariantBuilder *builder) +{ + AsIconPrivate *priv = GET_PRIVATE (icon); + GVariantBuilder icon_b; + + g_variant_builder_init (&icon_b, G_VARIANT_TYPE_ARRAY); + g_variant_builder_add_parsed (&icon_b, "{'type', <%u>}", priv->kind); + g_variant_builder_add_parsed (&icon_b, "{'width', <%i>}", priv->width); + g_variant_builder_add_parsed (&icon_b, "{'height', <%i>}", priv->height); + g_variant_builder_add_parsed (&icon_b, "{'scale', <%i>}", priv->scale); + + if (priv->kind == AS_ICON_KIND_STOCK) { + g_variant_builder_add_parsed (&icon_b, "{'name', <%s>}", priv->name); + } else if (priv->kind == AS_ICON_KIND_REMOTE) { + g_variant_builder_add_parsed (&icon_b, "{'url', <%s>}", priv->url); + } else { + /* cached or local icon */ + g_variant_builder_add_parsed (&icon_b, "{'filename', <%s>}", priv->filename); + } + + g_variant_builder_add_value (builder, g_variant_builder_end (&icon_b)); +} + +/** + * as_icon_set_from_variant: + * @icon: an #AsIcon + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_icon_set_from_variant (AsIcon *icon, GVariant *variant) +{ + AsIconPrivate *priv = GET_PRIVATE (icon); + GVariantDict idict; + g_autoptr(GVariant) ival_var = NULL; + + g_variant_dict_init (&idict, variant); + + priv->kind = as_variant_get_dict_uint32 (&idict, "type"); + + priv->width = as_variant_get_dict_int32 (&idict, "width"); + priv->height = as_variant_get_dict_int32 (&idict, "height"); + priv->scale = as_variant_get_dict_int32 (&idict, "scale"); + + if (priv->kind == AS_ICON_KIND_STOCK) { + as_icon_set_name (icon, + as_variant_get_dict_str (&idict, "name", &ival_var)); + } else if (priv->kind == AS_ICON_KIND_REMOTE) { + as_icon_set_url (icon, + as_variant_get_dict_str (&idict, "url", &ival_var)); + } else { + /* cached or local icon */ + as_icon_set_filename (icon, + as_variant_get_dict_str (&idict, "filename", &ival_var)); + } + + return TRUE; +} + +/** * as_icon_new: * * Creates a new #AsIcon. diff -Nru appstream-0.9.4/src/as-icon.h appstream-0.12.0/src/as-icon.h --- appstream-0.9.4/src/as-icon.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-icon.h 2018-04-04 15:53:56.000000000 +0000 @@ -93,6 +93,10 @@ void as_icon_set_height (AsIcon *icon, guint height); +guint as_icon_get_scale (AsIcon *icon); +void as_icon_set_scale (AsIcon *icon, + guint scale); + G_END_DECLS #endif /* __AS_ICON_H */ diff -Nru appstream-0.9.4/src/as-icon-private.h appstream-0.12.0/src/as-icon-private.h --- appstream-0.9.4/src/as-icon-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-icon-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,49 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2014-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_ICON_PRIVATE_H +#define __AS_ICON_PRIVATE_H + +#include "as-image.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +gboolean as_icon_load_from_xml (AsIcon *icon, + AsContext *ctx, + xmlNode *node, + GError **error); +void as_icon_to_xml_node (AsIcon *icon, + AsContext *ctx, + xmlNode *root); + +/* NOTE: For YAML, icons are loaded in AsComponent, because the YAML makes this the better option. */ + +void as_icon_to_variant (AsIcon *icon, + GVariantBuilder *builder); +gboolean as_icon_set_from_variant (AsIcon *icon, + GVariant *variant); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_ICON_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-image.c appstream-0.12.0/src/as-image.c --- appstream-0.9.4/src/as-image.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-image.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,7 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * * Copyright (C) 2014 Richard Hughes - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -32,13 +32,16 @@ #include "config.h" #include "as-image.h" +#include "as-image-private.h" +#include "as-variant-cache.h" typedef struct { - AsImageKind kind; - gchar *url; - guint width; - guint height; + AsImageKind kind; + gchar *url; + guint width; + guint height; + gchar *locale; } AsImagePrivate; G_DEFINE_TYPE_WITH_PRIVATE (AsImage, as_image, G_TYPE_OBJECT) @@ -54,6 +57,7 @@ AsImagePrivate *priv = GET_PRIVATE (image); g_free (priv->url); + g_free (priv->locale); G_OBJECT_CLASS (as_image_parent_class)->finalize (object); } @@ -105,6 +109,37 @@ } /** + * as_image_set_kind: + * @image: a #AsImage instance. + * @kind: the #AsImageKind, e.g. %AS_IMAGE_KIND_THUMBNAIL. + * + * Sets the image kind. + * + **/ +void +as_image_set_kind (AsImage *image, AsImageKind kind) +{ + AsImagePrivate *priv = GET_PRIVATE (image); + priv->kind = kind; +} + +/** + * as_image_get_kind: + * @image: a #AsImage instance. + * + * Gets the image kind. + * + * Returns: the #AsImageKind + * + **/ +AsImageKind +as_image_get_kind (AsImage *image) +{ + AsImagePrivate *priv = GET_PRIVATE (image); + return priv->kind; +} + +/** * as_image_get_url: * @image: a #AsImage instance. * @@ -121,6 +156,22 @@ } /** + * as_image_set_url: + * @image: a #AsImage instance. + * @url: the URL. + * + * Sets the fully-qualified mirror URL to use for the image. + * + **/ +void +as_image_set_url (AsImage *image, const gchar *url) +{ + AsImagePrivate *priv = GET_PRIVATE (image); + g_free (priv->url); + priv->url = g_strdup (url); +} + +/** * as_image_get_width: * @image: a #AsImage instance. * @@ -137,6 +188,21 @@ } /** + * as_image_set_width: + * @image: a #AsImage instance. + * @width: the width in pixels. + * + * Sets the image width. + * + **/ +void +as_image_set_width (AsImage *image, guint width) +{ + AsImagePrivate *priv = GET_PRIVATE (image); + priv->width = width; +} + +/** * as_image_get_height: * @image: a #AsImage instance. * @@ -153,80 +219,317 @@ } /** - * as_image_get_kind: + * as_image_set_height: * @image: a #AsImage instance. + * @height: the height in pixels. * - * Gets the image kind. - * - * Returns: the #AsImageKind + * Sets the image height. * **/ -AsImageKind -as_image_get_kind (AsImage *image) +void +as_image_set_height (AsImage *image, guint height) { AsImagePrivate *priv = GET_PRIVATE (image); - return priv->kind; + priv->height = height; } /** - * as_image_set_url: + * as_image_get_locale: * @image: a #AsImage instance. - * @url: the URL. * - * Sets the fully-qualified mirror URL to use for the image. + * Get locale for this image. * + * Returns: Locale string + * + * Since: 0.9.5 **/ -void -as_image_set_url (AsImage *image, const gchar *url) +const gchar* +as_image_get_locale (AsImage *image) { AsImagePrivate *priv = GET_PRIVATE (image); - g_free (priv->url); - priv->url = g_strdup (url); + return priv->locale; } /** - * as_image_set_width: + * as_image_set_locale: * @image: a #AsImage instance. - * @width: the width in pixels. + * @locale: the locale string. * - * Sets the image width. + * Sets the locale for this image. * + * Since: 0.9.5 **/ void -as_image_set_width (AsImage *image, guint width) +as_image_set_locale (AsImage *image, const gchar *locale) { AsImagePrivate *priv = GET_PRIVATE (image); - priv->width = width; + g_free (priv->locale); + priv->locale = g_strdup (locale); } /** - * as_image_set_height: + * as_image_load_from_xml: * @image: a #AsImage instance. - * @height: the height in pixels. + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. * - * Sets the image height. + * Loads image data from an XML node. + **/ +gboolean +as_image_load_from_xml (AsImage *image, AsContext *ctx, xmlNode *node, GError **error) +{ + AsImagePrivate *priv = GET_PRIVATE (image); + g_autofree gchar *content = NULL; + g_autofree gchar *stype = NULL; + g_autofree gchar *lang = NULL; + gchar *str; + + content = as_xml_get_node_value (node); + if (content == NULL) + return FALSE; + + lang = as_xmldata_get_node_locale (ctx, node); + + /* check if this image is for us */ + if (lang == NULL) + return FALSE; + as_image_set_locale (image, lang); + + str = (gchar*) xmlGetProp (node, (xmlChar*) "width"); + if (str == NULL) { + priv->width = 0; + } else { + priv->width = g_ascii_strtoll (str, NULL, 10); + g_free (str); + } + + str = (gchar*) xmlGetProp (node, (xmlChar*) "height"); + if (str == NULL) { + priv->height = 0; + } else { + priv->height = g_ascii_strtoll (str, NULL, 10); + g_free (str); + } + + stype = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + if (g_strcmp0 (stype, "thumbnail") == 0) + priv->kind = AS_IMAGE_KIND_THUMBNAIL; + else + priv->kind = AS_IMAGE_KIND_SOURCE; + + /* discard invalid elements */ + if (as_context_get_style (ctx) == AS_FORMAT_STYLE_COLLECTION) { + /* no sizes are okay for upstream XML, but not for distro XML */ + if ((priv->width == 0) || (priv->height == 0)) { + if (priv->kind != AS_IMAGE_KIND_SOURCE) { + /* thumbnails w/o size information must never happen */ + g_set_error_literal (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_VALUE_MISSING, + "Ignored screenshot thumbnail image without size information."); + return FALSE; + } + } + } + + if (!as_context_has_media_baseurl (ctx)) { + /* no baseurl, we can just set the value as URL */ + as_image_set_url (image, content); + } else { + /* handle the media baseurl */ + g_free (priv->url); + priv->url = g_build_filename (as_context_get_media_baseurl (ctx), content, NULL); + } + + return TRUE; +} + +/** + * as_image_to_xml_node: + * @image: a #AsImage instance. + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. * + * Serializes the data to an XML node. **/ void -as_image_set_height (AsImage *image, guint height) +as_image_to_xml_node (AsImage *image, AsContext *ctx, xmlNode *root) { AsImagePrivate *priv = GET_PRIVATE (image); - priv->height = height; + xmlNode* n_image = NULL; + + n_image = xmlNewTextChild (root, NULL, + (xmlChar*) "image", + (xmlChar*) priv->url); + + if (priv->kind == AS_IMAGE_KIND_THUMBNAIL) + xmlNewProp (n_image, (xmlChar*) "type", (xmlChar*) "thumbnail"); + else + xmlNewProp (n_image, (xmlChar*) "type", (xmlChar*) "source"); + + if ((priv->width > 0) && (priv->height > 0)) { + gchar *size; + + size = g_strdup_printf("%i", priv->width); + xmlNewProp (n_image, (xmlChar*) "width", (xmlChar*) size); + g_free (size); + + size = g_strdup_printf("%i", priv->height); + xmlNewProp (n_image, (xmlChar*) "height", (xmlChar*) size); + g_free (size); + } + + if ((priv->locale != NULL) && (g_strcmp0 (priv->locale, "C") != 0)) { + xmlNewProp (n_image, (xmlChar*) "xml:lang", (xmlChar*) priv->locale); + } + + xmlAddChild (root, n_image); } /** - * as_image_set_kind: + * as_image_load_from_yaml: * @image: a #AsImage instance. - * @kind: the #AsImageKind, e.g. %AS_IMAGE_KIND_THUMBNAIL. + * @ctx: the AppStream document context. + * @node: the YAML node. + * @error: a #GError. * - * Sets the image kind. + * Loads data from a YAML field. + **/ +gboolean +as_image_load_from_yaml (AsImage *image, AsContext *ctx, GNode *node, AsImageKind kind, GError **error) +{ + AsImagePrivate *priv = GET_PRIVATE (image); + GNode *n; + + priv->kind = kind; + for (n = node->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + const gchar *value = as_yaml_node_get_value (n); + + if (value == NULL) + continue; /* there should be no key without value */ + + if (g_strcmp0 (key, "width") == 0) { + priv->width = g_ascii_strtoll (value, NULL, 10); + } else if (g_strcmp0 (key, "height") == 0) { + priv->height = g_ascii_strtoll (value, NULL, 10); + } else if (g_strcmp0 (key, "url") == 0) { + if (as_context_has_media_baseurl (ctx)) { + /* handle the media baseurl */ + g_free (priv->url); + priv->url = g_build_filename (as_context_get_media_baseurl (ctx), value, NULL); + } else { + /* no baseurl, we can just set the value as URL */ + as_image_set_url (image, value); + } + } else if (g_strcmp0 (key, "lang") == 0) { + as_image_set_locale (image, value); + } else { + as_yaml_print_unknown ("image", key); + } + } + + return TRUE; +} + +/** + * as_image_emit_yaml: + * @image: a #AsImage instance. + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. * + * Emit YAML data for this object. **/ void -as_image_set_kind (AsImage *image, AsImageKind kind) +as_image_emit_yaml (AsImage *image, AsContext *ctx, yaml_emitter_t *emitter) { AsImagePrivate *priv = GET_PRIVATE (image); - priv->kind = kind; + g_autofree gchar *url = NULL; + + as_yaml_mapping_start (emitter); + if (as_context_has_media_baseurl (ctx)) { + if (g_str_has_prefix (priv->url, as_context_get_media_baseurl (ctx))) + url = g_strdup (priv->url + strlen (as_context_get_media_baseurl (ctx))); + else + url = g_strdup (priv->url); + } else { + url = g_strdup (priv->url); + } + g_strstrip (url); + + as_yaml_emit_entry (emitter, "url", url); + if ((priv->width > 0) && (priv->height > 0)) { + as_yaml_emit_entry_uint (emitter, + "width", + priv->width); + + as_yaml_emit_entry_uint (emitter, + "height", + priv->height); + } + as_yaml_emit_entry (emitter, "lang", priv->locale); + as_yaml_mapping_end (emitter); +} + +/** + * as_image_to_variant: + * @image: An #AsImage instance. + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_image_to_variant (AsImage *image, GVariantBuilder *builder) +{ + AsImagePrivate *priv = GET_PRIVATE (image); + GVariantBuilder image_b; + + g_variant_builder_init (&image_b, G_VARIANT_TYPE_ARRAY); + + g_variant_builder_add_parsed (&image_b, "{'type', <%u>}", priv->kind); + g_variant_builder_add_parsed (&image_b, "{'url', <%s>}", priv->url); + g_variant_builder_add_parsed (&image_b, "{'width', <%i>}", priv->width); + g_variant_builder_add_parsed (&image_b, "{'height', <%i>}", priv->height); + g_variant_builder_add_parsed (&image_b, "{'locale', %v}", as_variant_mstring_new (priv->locale)); + + g_variant_builder_add_value (builder, g_variant_builder_end (&image_b)); +} + +/** + * as_image_set_from_variant: + * @image: An #AsImage instance. + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_image_set_from_variant (AsImage *image, GVariant *variant) +{ + AsImagePrivate *priv = GET_PRIVATE (image); + GVariantDict dict; + GVariant *tmp; + + g_variant_dict_init (&dict, variant); + + /* kind */ + priv->kind = as_variant_get_dict_uint32 (&dict, "type"); + + /* locale */ + as_image_set_locale (image, as_variant_get_dict_mstr (&dict, "locale", &tmp)); + g_variant_unref (tmp); + + /* url */ + as_image_set_url (image, as_variant_get_dict_str (&dict, "url", &tmp)); + g_variant_unref (tmp); + + /* sizes */ + priv->width = as_variant_get_dict_int32 (&dict, "width"); + priv->height = as_variant_get_dict_int32 (&dict, "height"); + + return TRUE; } /** diff -Nru appstream-0.9.4/src/as-image.h appstream-0.12.0/src/as-image.h --- appstream-0.9.4/src/as-image.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-image.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -65,6 +65,10 @@ AsImage *as_image_new (void); +AsImageKind as_image_get_kind (AsImage *image); +void as_image_set_kind (AsImage *image, + AsImageKind kind); + const gchar *as_image_get_url (AsImage *image); void as_image_set_url (AsImage *image, const gchar *url); @@ -77,9 +81,9 @@ void as_image_set_height (AsImage *image, guint height); -AsImageKind as_image_get_kind (AsImage *image); -void as_image_set_kind (AsImage *image, - AsImageKind kind); +const gchar *as_image_get_locale (AsImage *image); +void as_image_set_locale (AsImage *image, + const gchar *locale); G_END_DECLS diff -Nru appstream-0.9.4/src/as-image-private.h appstream-0.12.0/src/as-image-private.h --- appstream-0.9.4/src/as-image-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-image-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,56 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2014-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_IMAGE_PRIVATE_H +#define __AS_IMAGE_PRIVATE_H + +#include "as-image.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +gboolean as_image_load_from_xml (AsImage *image, + AsContext *ctx, + xmlNode *node, + GError **error); +void as_image_to_xml_node (AsImage *image, + AsContext *ctx, + xmlNode *root); + +gboolean as_image_load_from_yaml (AsImage *image, + AsContext *ctx, + GNode *node, + AsImageKind kind, + GError **error); +void as_image_emit_yaml (AsImage *image, + AsContext *ctx, + yaml_emitter_t *emitter); + +void as_image_to_variant (AsImage *image, + GVariantBuilder *builder); +gboolean as_image_set_from_variant (AsImage *image, + GVariant *variant); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_IMAGE_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-launchable.c appstream-0.12.0/src/as-launchable.c --- appstream-0.9.4/src/as-launchable.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-launchable.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,332 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "as-launchable-private.h" + +#include +#include +#include + +#include "as-variant-cache.h" + +/** + * SECTION:as-launchable + * @short_description: Description of launchable entries for a software component + * @include: appstream.h + * + * Components can provide multiple launch-entries to launch the software they belong to. + * This class describes them. + * + * See also: #AsComponent + */ + +typedef struct +{ + AsLaunchableKind kind; + GPtrArray *entries; +} AsLaunchablePrivate; + +G_DEFINE_TYPE_WITH_PRIVATE (AsLaunchable, as_launchable, G_TYPE_OBJECT) + +#define GET_PRIVATE(o) (as_launchable_get_instance_private (o)) + +/** + * as_launchable_kind_to_string: + * @kind: the #AsLaunchableKind. + * + * Converts the enumerated value to a text representation. + * + * Returns: string version of @kind + * + * Since: 0.11.0 + **/ +const gchar* +as_launchable_kind_to_string (AsLaunchableKind kind) +{ + if (kind == AS_LAUNCHABLE_KIND_DESKTOP_ID) + return "desktop-id"; + if (kind == AS_LAUNCHABLE_KIND_SERVICE) + return "service"; + if (kind == AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST) + return "cockpit-manifest"; + if (kind == AS_LAUNCHABLE_KIND_URL) + return "url"; + return "unknown"; +} + +/** + * as_launchable_kind_from_string: + * @kind_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsLaunchableKind or %AS_LAUNCHABLE_KIND_UNKNOWN for unknown + * + * Since: 0.11.0 + **/ +AsLaunchableKind +as_launchable_kind_from_string (const gchar *kind_str) +{ + if (g_strcmp0 (kind_str, "desktop-id") == 0) + return AS_LAUNCHABLE_KIND_DESKTOP_ID; + if (g_strcmp0 (kind_str, "service") == 0) + return AS_LAUNCHABLE_KIND_SERVICE; + if (g_strcmp0 (kind_str, "cockpit-manifest") == 0) + return AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST; + if (g_strcmp0 (kind_str, "url") == 0) + return AS_LAUNCHABLE_KIND_URL; + return AS_LAUNCHABLE_KIND_UNKNOWN; +} + +/** + * as_launchable_finalize: + **/ +static void +as_launchable_finalize (GObject *object) +{ + AsLaunchable *launch = AS_LAUNCHABLE (object); + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + + g_ptr_array_unref (priv->entries); + + G_OBJECT_CLASS (as_launchable_parent_class)->finalize (object); +} + +/** + * as_launchable_init: + **/ +static void +as_launchable_init (AsLaunchable *launch) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + + priv->kind = AS_LAUNCHABLE_KIND_UNKNOWN; + priv->entries = g_ptr_array_new_with_free_func (g_free); +} + +/** + * as_launchable_class_init: + **/ +static void +as_launchable_class_init (AsLaunchableClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->finalize = as_launchable_finalize; +} + +/** + * as_launchable_get_kind: + * @launch: a #AsLaunchable instance. + * + * The launch system for the entries this #AsLaunchable + * object stores. + * + * Returns: an enum of type #AsLaunchableKind + * + * Since: 0.11.0 + */ +AsLaunchableKind +as_launchable_get_kind (AsLaunchable *launch) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + return priv->kind; +} + +/** + * as_launchable_set_kind: + * @launch: a #AsLaunchable instance. + * @kind: the new #AsLaunchableKind + * + * Set the launch system for the entries this #AsLaunchable + * object stores. + * + * Since: 0.11.0 + */ +void +as_launchable_set_kind (AsLaunchable *launch, AsLaunchableKind kind) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + priv->kind = kind; +} + +/** + * as_launchable_get_entries: + * @launch: a #AsLaunchable instance. + * + * Get an array of launchable entries. + * + * Returns: (transfer none) (element-type utf8): An string list of launch entries. + * + * Since: 0.11.0 + */ +GPtrArray* +as_launchable_get_entries (AsLaunchable *launch) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + return priv->entries; +} + +/** + * as_launchable_add_entry: + * @launch: a #AsLaunchable instance. + * + * Add a new launchable entry. + * + * Since: 0.11.0 + */ +void +as_launchable_add_entry (AsLaunchable *launch, const gchar *entry) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + g_ptr_array_add (priv->entries, g_strdup (entry)); +} + +/** + * as_launchable_to_xml_node: + * @launchable: an #AsLaunchable + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +void +as_launchable_to_xml_node (AsLaunchable *launchable, AsContext *ctx, xmlNode *root) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launchable); + guint i; + + for (i = 0; i < priv->entries->len; i++) { + xmlNode *n; + const gchar *entry = g_ptr_array_index (priv->entries, i); + if (entry == NULL) + continue; + + n = xmlNewTextChild (root, NULL, + (xmlChar*) "launchable", + (xmlChar*) entry); + xmlNewProp (n, (xmlChar*) "type", + (xmlChar*) as_launchable_kind_to_string (priv->kind)); + } +} + +/** + * as_launchable_load_from_yaml: + * @launchable: an #AsLaunchable + * @ctx: the AppStream document context. + * @node: the YAML node. + * @error: a #GError. + * + * Loads data from a YAML field. + **/ +gboolean +as_launchable_load_from_yaml (AsLaunchable *launch, AsContext *ctx, GNode *node, GError **error) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + GNode *n; + + priv->kind = as_launchable_kind_from_string (as_yaml_node_get_key (node)); + for (n = node->children; n != NULL; n = n->next) { + const gchar *entry = as_yaml_node_get_key (n); + if (entry == NULL) + continue; + as_launchable_add_entry (launch, entry); + } + + return TRUE; +} + +/** + * as_launchable_emit_yaml: + * @launchable: an #AsLaunchable + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. + * + * Emit YAML data for this object. + **/ +void +as_launchable_emit_yaml (AsLaunchable *launch, AsContext *ctx, yaml_emitter_t *emitter) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + + as_yaml_emit_sequence (emitter, + as_launchable_kind_to_string (priv->kind), + priv->entries); +} + +/** + * as_launchable_to_variant: + * @launchable: an #AsLaunchable + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_launchable_to_variant (AsLaunchable *launch, GVariantBuilder *builder) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + + GVariant *var = g_variant_new ("{uv}", priv->kind, as_variant_from_string_ptrarray (priv->entries)); + g_variant_builder_add_value (builder, var); +} + +/** + * as_launchable_set_from_variant: + * @launchable: an #AsLaunchable + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_launchable_set_from_variant (AsLaunchable *launch, GVariant *variant) +{ + AsLaunchablePrivate *priv = GET_PRIVATE (launch); + GVariantIter inner_iter; + GVariant *entry_child; + g_autoptr(GVariant) entries_var = NULL; + + g_variant_get (variant, "{uv}", &priv->kind, &entries_var); + + g_variant_iter_init (&inner_iter, entries_var); + while ((entry_child = g_variant_iter_next_value (&inner_iter))) { + as_launchable_add_entry (launch, g_variant_get_string (entry_child, NULL)); + g_variant_unref (entry_child); + } + + return TRUE; +} + +/** + * as_launchable_new: + * + * Creates a new #AsLaunchable. + * + * Returns: (transfer full): a #AsLaunchable + * + * Since: 0.11.0 + **/ +AsLaunchable* +as_launchable_new (void) +{ + AsLaunchable *launch; + launch = g_object_new (AS_TYPE_LAUNCHABLE, NULL); + return AS_LAUNCHABLE (launch); +} diff -Nru appstream-0.9.4/src/as-launchable.h appstream-0.12.0/src/as-launchable.h --- appstream-0.9.4/src/as-launchable.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-launchable.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,81 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_LAUNCHABLE_H +#define __AS_LAUNCHABLE_H + +#include + +G_BEGIN_DECLS + +#define AS_TYPE_LAUNCHABLE (as_launchable_get_type ()) +G_DECLARE_DERIVABLE_TYPE (AsLaunchable, as_launchable, AS, LAUNCHABLE, GObject) + +struct _AsLaunchableClass +{ + GObjectClass parent_class; + /*< private >*/ + void (*_as_reserved1) (void); + void (*_as_reserved2) (void); + void (*_as_reserved3) (void); + void (*_as_reserved4) (void); + void (*_as_reserved5) (void); + void (*_as_reserved6) (void); +}; + +/** + * AsLaunchableKind: + * @AS_LAUNCHABLE_KIND_UNKNOWN: Unknown kind + * @AS_LAUNCHABLE_KIND_DESKTOP_ID: Launch by desktop-id + * @AS_LAUNCHABLE_KIND_SERVICE: A systemd/SysV-init service name + * @AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST: A Cockpit manifest / package name + * + * Type of launch system the entries belong to. + **/ +typedef enum { + AS_LAUNCHABLE_KIND_UNKNOWN, + AS_LAUNCHABLE_KIND_DESKTOP_ID, + AS_LAUNCHABLE_KIND_SERVICE, + AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST, + AS_LAUNCHABLE_KIND_URL, + /*< private >*/ + AS_LAUNCHABLE_KIND_LAST +} AsLaunchableKind; + +const gchar *as_launchable_kind_to_string (AsLaunchableKind kind); +AsLaunchableKind as_launchable_kind_from_string (const gchar *kind_str); + +AsLaunchable *as_launchable_new (void); + +AsLaunchableKind as_launchable_get_kind (AsLaunchable *launch); +void as_launchable_set_kind (AsLaunchable *launch, + AsLaunchableKind kind); + +GPtrArray *as_launchable_get_entries (AsLaunchable *launch); +void as_launchable_add_entry (AsLaunchable *launch, + const gchar *entry); + +G_END_DECLS + +#endif /* __AS_LAUNCHABLE_H */ diff -Nru appstream-0.9.4/src/as-launchable-private.h appstream-0.12.0/src/as-launchable-private.h --- appstream-0.9.4/src/as-launchable-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-launchable-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,53 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2014-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_LAUNCHABLE_PRIVATE_H +#define __AS_LAUNCHABLE_PRIVATE_H + +#include "as-launchable.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +/* NOTE: The AsComponent load the AsLaunchable from XML, because it needs to aggregate multiple tags in one object. */ + +void as_launchable_to_xml_node (AsLaunchable *launchable, + AsContext *ctx, + xmlNode *root); + +gboolean as_launchable_load_from_yaml (AsLaunchable *launch, + AsContext *ctx, + GNode *node, + GError **error); +void as_launchable_emit_yaml (AsLaunchable *launch, + AsContext *ctx, + yaml_emitter_t *emitter); + +void as_launchable_to_variant (AsLaunchable *launch, + GVariantBuilder *builder); +gboolean as_launchable_set_from_variant (AsLaunchable *launch, + GVariant *variant); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_LAUNCHABLE_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-menu-parser.c appstream-0.12.0/src/as-menu-parser.c --- appstream-0.9.4/src/as-menu-parser.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-menu-parser.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,383 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2015 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include "as-menu-parser.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "as-category.h" - -/** - * SECTION:as-menu-parser - * @short_description: Parser for XDG menu files designed for software-centers - * @include: appstream.h - * - * This object parses an XDG menu file and returns a set of #AsCategory objects which - * can be used by software-centers to group the applications they show. - * By default, it loads a common set of categories from an internal menu file. - * A custom menu file may be specified using the alternative class constructor. - * - * See also: #AsCategory - */ - -typedef struct -{ - gchar* menu_file; - gboolean update_category_data; -} AsMenuParserPrivate; - -G_DEFINE_TYPE_WITH_PRIVATE (AsMenuParser, as_menu_parser, G_TYPE_OBJECT) -#define GET_PRIVATE(o) (as_menu_parser_get_instance_private (o)) - -enum { - AS_MENU_PARSER_DUMMY_PROPERTY, - AS_MENU_PARSER_UPDATE_CATEGORY_DATA -}; - -static AsCategory *as_menu_parser_parse_menu_entry (AsMenuParser *mp, xmlNode *nd); - -/** - * as_menu_parser_finalize: - **/ -static void -as_menu_parser_finalize (GObject *object) -{ - AsMenuParser *mp = AS_MENU_PARSER (object); - AsMenuParserPrivate *priv = GET_PRIVATE (mp); - - g_free (priv->menu_file); - - G_OBJECT_CLASS (as_menu_parser_parent_class)->finalize (object); -} - -/** - * as_menu_parser_init: - **/ -static void -as_menu_parser_init (AsMenuParser *mp) -{ - AsMenuParserPrivate *priv = GET_PRIVATE (mp); - - as_menu_parser_set_update_category_data (mp, TRUE); - priv->menu_file = g_strdup ("/usr/share/app-info/categories.xml"); -} - -/** - * _as_menu_parser_complete_categories: - * - * Helper function. - */ -static void -_as_menu_parser_complete_categories (AsCategory *cat, gpointer user_data) -{ - g_return_if_fail (cat != NULL); - as_category_complete (cat); -} - -/** - * as_menu_parser_parse: - * @mp: An instance of #AsMenuParser. - * - * Parse the menu file - * - * Returns: (element-type AsCategory) (transfer full): #GList of #AsCategory objects found in the menu, or NULL if there was an error - */ -GList* -as_menu_parser_parse (AsMenuParser *mp) -{ - GList *category_list = NULL; - xmlDoc *xdoc; - xmlNode *root; - xmlNode *iter; - category_list = NULL; - AsMenuParserPrivate *priv = GET_PRIVATE (mp); - - /* parse the document from path */ - xdoc = xmlParseFile (priv->menu_file); - if (xdoc == NULL) { - g_debug (_ ("File %s not found or permission denied!"), priv->menu_file); - return NULL; - } - - /* get the root node */ - root = xmlDocGetRootElement (xdoc); - if ((root == NULL) || (g_strcmp0 ((gchar*) root->name, "Menu") != 0)) { - g_warning (_ ("XDG Menu XML file '%s' is damaged."), priv->menu_file); - xmlFreeDoc (xdoc); - return NULL; - } - - for (iter = root->children; iter != NULL; iter = iter->next) { - /* spaces between tags are also nodes, discard them */ - if (iter->type != XML_ELEMENT_NODE) - continue; - if (g_strcmp0 ((gchar*) iter->name, "Menu") == 0) { - /* parse menu entry */ - category_list = g_list_append (category_list, as_menu_parser_parse_menu_entry (mp, iter)); - } - } - - if (priv->update_category_data) { - /* complete the missing information from desktop-directories folder */ - g_list_foreach (category_list, (GFunc) _as_menu_parser_complete_categories, NULL); - } - - return category_list; -} - -/** - * as_menu_parser_extend_category_name_list: - */ -static void -as_menu_parser_extend_category_name_list (AsMenuParser *mp, xmlNode *nd, GList *list) -{ - xmlNode *iter; - - for (iter = nd->children; iter != NULL; iter = iter->next) { - if (iter->type != XML_ELEMENT_NODE) - continue; - if (g_strcmp0 ((gchar*) iter->name, "Category") == 0) { - list = g_list_append (list, (gchar*) xmlNodeGetContent (iter)); - } - } -} - -/** - * as_menu_parser_parse_category_entry: - */ -static void -as_menu_parser_parse_category_entry (AsMenuParser *mp, xmlNode *nd, AsCategory *cat) -{ - xmlNode *iter; - - for (iter = nd->children; iter != NULL; iter = iter->next) { - if (iter->type != XML_ELEMENT_NODE) - continue; - if (g_strcmp0 ((gchar*) iter->name, "And") == 0) { - xmlNode *not_iter; - as_menu_parser_extend_category_name_list (mp, - iter, - as_category_get_included (cat)); - /* check for "Not" elements */ - for (not_iter = iter->children; not_iter != NULL; not_iter = not_iter->next) { - if (g_strcmp0 ((gchar*) not_iter->name, "Not") == 0) { - as_menu_parser_extend_category_name_list (mp, - not_iter, - as_category_get_excluded (cat)); - } - } - } else if (g_strcmp0 ((gchar*) iter->name, "Or") == 0) { - as_menu_parser_extend_category_name_list (mp, - iter, - as_category_get_included (cat)); - } - } -} - -/** - * as_menu_parser_parse_menu_entry: - */ -static AsCategory* -as_menu_parser_parse_menu_entry (AsMenuParser *mp, xmlNode *nd) -{ - AsCategory* cat = NULL; - xmlNode *iter; - - cat = as_category_new (); - for (iter = nd->children; iter != NULL; iter = iter->next) { - const gchar* node_name; - /* spaces between tags are also nodes, discard them */ - if (iter->type != XML_ELEMENT_NODE) - continue; - - node_name = (const gchar*) iter->name; - if (g_strcmp0 (node_name, "Name") == 0) { - /* we don't want a localized name (indicated through a language property) */ - if (iter->properties == NULL) { - gchar *content; - content = (gchar*) xmlNodeGetContent (iter); - as_category_set_name (cat, content); - g_free (content); - } - } else if (g_strcmp0 (node_name, "Directory") == 0) { - gchar *content; - content = (gchar*) xmlNodeGetContent (iter); - as_category_set_directory (cat, content); - g_free (content); - } else if (g_strcmp0 (node_name, "Icon") == 0) { - gchar *content; - content = (gchar*) xmlNodeGetContent (iter); - as_category_set_icon (cat, content); - g_free (content); - } else if (g_strcmp0 (node_name, "Categories") == 0) { - as_menu_parser_parse_category_entry (mp, iter, cat); - } else if (g_strcmp0 (node_name, "Menu") == 0) { - /* we have a submenu! */ - AsCategory* subcat; - subcat = as_menu_parser_parse_menu_entry (mp, iter); - as_category_add_subcategory (cat, subcat); - g_object_unref (subcat); - } - } - - return cat; -} - -/** - * as_menu_parser_get_update_category_data: - * @mp: An instance of #AsMenuParser. - */ -gboolean -as_menu_parser_get_update_category_data (AsMenuParser *mp) -{ - AsMenuParserPrivate *priv = GET_PRIVATE (mp); - return priv->update_category_data; -} - -/** - * as_menu_parser_set_update_category_data: - * @mp: An instance of #AsMenuParser. - */ -void -as_menu_parser_set_update_category_data (AsMenuParser *mp, gboolean value) -{ - AsMenuParserPrivate *priv = GET_PRIVATE (mp); - priv->update_category_data = value; - g_object_notify ((GObject *) mp, "update-category-data"); -} - -/** - * as_menu_parser_get_property: - */ -static void -as_menu_parser_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) -{ - AsMenuParser *mp; - mp = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_MENU_PARSER, AsMenuParser); - switch (property_id) { - case AS_MENU_PARSER_UPDATE_CATEGORY_DATA: - g_value_set_boolean (value, as_menu_parser_get_update_category_data (mp)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - -/** - * as_menu_parser_set_property: - */ -static void -as_menu_parser_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) -{ - AsMenuParser *mp; - mp = G_TYPE_CHECK_INSTANCE_CAST (object, AS_TYPE_MENU_PARSER, AsMenuParser); - switch (property_id) { - case AS_MENU_PARSER_UPDATE_CATEGORY_DATA: - as_menu_parser_set_update_category_data (mp, g_value_get_boolean (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - -/** - * as_menu_parser_class_init: - **/ -static void -as_menu_parser_class_init (AsMenuParserClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = as_menu_parser_finalize; - object_class->get_property = as_menu_parser_get_property; - object_class->set_property = as_menu_parser_set_property; - - g_object_class_install_property (object_class, - AS_MENU_PARSER_UPDATE_CATEGORY_DATA, - g_param_spec_boolean ("update-category-data", "update-category-data", "update-category-data", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - -/** - * as_menu_parser_new: - * - * Creates a new #AsMenuParser. - * - * Returns: (transfer full): an #AsMenuParser. - * - **/ -AsMenuParser* -as_menu_parser_new (void) -{ - AsMenuParser *mp; - mp = g_object_new (AS_TYPE_MENU_PARSER, NULL); - return AS_MENU_PARSER (mp); -} - -/** - * as_menu_parser_new_from_file: - * @menu_file: The menu-file to parse. - * - * Creates a new #AsMenuParser using a custom XDG menu XML file. - * - * Returns: (transfer full): an #AsMenuParser. - * - **/ -AsMenuParser* -as_menu_parser_new_from_file (const gchar *menu_file) -{ - AsMenuParser *mp; - AsMenuParserPrivate *priv; - - mp = as_menu_parser_new (); - priv = GET_PRIVATE (mp); - - g_free (priv->menu_file); - priv->menu_file = g_strdup (menu_file); - - return mp; -} - -/** - * as_get_system_categories: - * - * Get a GList of the default AppStream categories - * - * Returns: (element-type AsCategory) (transfer full): #GList of #AsCategory objects - */ -GList* -as_get_system_categories (void) -{ - AsMenuParser *parser; - GList* system_cats = NULL; - - parser = as_menu_parser_new (); - system_cats = as_menu_parser_parse (parser); - g_object_unref (parser); - - return system_cats; -} diff -Nru appstream-0.9.4/src/as-menu-parser.h appstream-0.12.0/src/as-menu-parser.h --- appstream-0.9.4/src/as-menu-parser.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-menu-parser.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2015 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) -#error "Only can be included directly." -#endif - -#ifndef __AS_MENUPARSER_H -#define __AS_MENUPARSER_H - -#include - -G_BEGIN_DECLS - -#define AS_TYPE_MENU_PARSER (as_menu_parser_get_type ()) -G_DECLARE_DERIVABLE_TYPE (AsMenuParser, as_menu_parser, AS, MENU_PARSER, GObject) - -struct _AsMenuParserClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - -AsMenuParser *as_menu_parser_new (void); -AsMenuParser *as_menu_parser_new_from_file (const gchar *menu_file); - -GList *as_menu_parser_parse (AsMenuParser *mp); - -gboolean as_menu_parser_get_update_category_data (AsMenuParser *mp); -void as_menu_parser_set_update_category_data (AsMenuParser *mp, - gboolean value); - -GList *as_get_system_categories (void); - -G_END_DECLS - -#endif /* __AS_MENUPARSER_H */ diff -Nru appstream-0.9.4/src/as-metadata.c appstream-0.12.0/src/as-metadata.c --- appstream-0.9.4/src/as-metadata.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-metadata.c 2018-04-04 15:53:56.000000000 +0000 @@ -40,14 +40,18 @@ #include "as-utils-private.h" #include "as-component.h" #include "as-component-private.h" -#include "as-xmldata.h" -#include "as-yamldata.h" #include "as-distro-details.h" +#include "as-desktop-entry.h" +#include "as-context.h" + +#include "as-xml.h" +#include "as-yaml.h" typedef struct { + AsFormatVersion format_version; + AsFormatStyle mode; gchar *locale; - AsParserMode mode; gchar *origin; gchar *media_baseurl; gchar *arch; @@ -56,9 +60,6 @@ gboolean update_existing; gboolean write_header; - AsXMLData *xdt; - AsYAMLData *ydt; - GPtrArray *cpts; } AsMetadataPrivate; @@ -66,6 +67,107 @@ #define GET_PRIVATE(o) (as_metadata_get_instance_private (o)) /** + * as_format_kind_to_string: + * @kind: the #AsFormatKind. + * + * Converts the enumerated value to an text representation. + * + * Returns: string version of @kind + * + * Since: 0.10 + **/ +const gchar* +as_format_kind_to_string (AsFormatKind kind) +{ + if (kind == AS_FORMAT_KIND_XML) + return "xml"; + if (kind == AS_FORMAT_KIND_YAML) + return "yaml"; + return "unknown"; +} + +/** + * as_format_kind_from_string: + * @kind_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsFormatKind or %AS_FORMAT_KIND_UNKNOWN for unknown + * + * Since: 0.10 + **/ +AsFormatKind +as_format_kind_from_string (const gchar *kind_str) +{ + if (g_strcmp0 (kind_str, "xml") == 0) + return AS_FORMAT_KIND_XML; + if (g_strcmp0 (kind_str, "yaml") == 0) + return AS_FORMAT_KIND_YAML; + return AS_FORMAT_KIND_UNKNOWN; +} + +/** + * as_format_version_to_string: + * @version: the #AsFormatKind. + * + * Converts the enumerated value to an text representation. + * + * Returns: string version of @version + * + * Since: 0.10 + **/ +const gchar* +as_format_version_to_string (AsFormatVersion version) +{ + if (version == AS_FORMAT_VERSION_V0_6) + return "0.6"; + if (version == AS_FORMAT_VERSION_V0_7) + return "0.7"; + if (version == AS_FORMAT_VERSION_V0_8) + return "0.8"; + if (version == AS_FORMAT_VERSION_V0_9) + return "0.9"; + if (version == AS_FORMAT_VERSION_V0_10) + return "0.10"; + if (version == AS_FORMAT_VERSION_V0_11) + return "0.11"; + if (version == AS_FORMAT_VERSION_V0_12) + return "0.12"; + return "?.??"; +} + +/** + * as_format_version_from_string: + * @version_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsFormatVersion. For unknown, the highest version + * number is assumed. + * + * Since: 0.10 + **/ +AsFormatVersion +as_format_version_from_string (const gchar *version_str) +{ + if (g_strcmp0 (version_str, "0.12") == 0) + return AS_FORMAT_VERSION_V0_12; + if (g_strcmp0 (version_str, "0.11") == 0) + return AS_FORMAT_VERSION_V0_11; + if (g_strcmp0 (version_str, "0.10") == 0) + return AS_FORMAT_VERSION_V0_10; + if (g_strcmp0 (version_str, "0.9") == 0) + return AS_FORMAT_VERSION_V0_9; + if (g_strcmp0 (version_str, "0.8") == 0) + return AS_FORMAT_VERSION_V0_8; + if (g_strcmp0 (version_str, "0.7") == 0) + return AS_FORMAT_VERSION_V0_7; + if (g_strcmp0 (version_str, "0.6") == 0) + return AS_FORMAT_VERSION_V0_6; + return AS_FORMAT_VERSION_V0_10; +} + +/** * as_metadata_init: **/ static void @@ -79,7 +181,8 @@ as_metadata_set_locale (metad, str); g_free (str); - priv->mode = AS_PARSER_MODE_UPSTREAM; + priv->format_version = AS_CURRENT_FORMAT_VERSION; + priv->mode = AS_FORMAT_STYLE_METAINFO; priv->default_priority = 0; priv->write_header = TRUE; priv->update_existing = FALSE; @@ -101,188 +204,406 @@ g_free (priv->origin); g_free (priv->media_baseurl); g_free (priv->arch); - if (priv->xdt != NULL) - g_object_unref (priv->xdt); - if (priv->ydt != NULL) - g_object_unref (priv->ydt); G_OBJECT_CLASS (as_metadata_parent_class)->finalize (object); } /** - * as_metadata_init_xml: + * as_metadata_new_context: **/ -static void -as_metadata_init_xml (AsMetadata *metad) +static AsContext* +as_metadata_new_context (AsMetadata *metad, AsFormatStyle style, const gchar *fname) { AsMetadataPrivate *priv = GET_PRIVATE (metad); + AsContext *context = as_context_new (); - if (priv->xdt != NULL) - return; + as_context_set_format_version (context, priv->format_version); + as_context_set_locale (context, priv->locale); + as_context_set_origin (context, priv->origin); + as_context_set_media_baseurl (context, priv->media_baseurl); + as_context_set_architecture (context, priv->arch); + as_context_set_priority (context, priv->default_priority); + + as_context_set_style (context, style); + as_context_set_filename (context, fname); - priv->xdt = as_xmldata_new (); - as_xmldata_initialize (priv->xdt, - priv->locale, - priv->origin, - priv->media_baseurl, - priv->arch, - priv->default_priority); + return context; } /** - * as_metadata_init_yaml: + * as_metadata_clear_components: **/ -static void -as_metadata_init_yaml (AsMetadata *metad) +void +as_metadata_clear_components (AsMetadata *metad) { AsMetadataPrivate *priv = GET_PRIVATE (metad); - - if (priv->ydt != NULL) - return; - - priv->ydt = as_yamldata_new (); - as_yamldata_initialize (priv->ydt, - priv->locale, - priv->origin, - priv->media_baseurl, - priv->arch, - priv->default_priority); + g_ptr_array_unref (priv->cpts); + priv->cpts = g_ptr_array_new_with_free_func (g_object_unref); } /** - * as_metadata_reload_parsers: + * as_metadata_xml_parse_components_node: */ static void -as_metadata_reload_parsers (AsMetadata *metad) +as_metadata_xml_parse_components_node (AsMetadata *metad, AsContext *context, xmlNode* node, GError **error) { AsMetadataPrivate *priv = GET_PRIVATE (metad); + xmlNode* iter; + GError *tmp_error = NULL; + gchar *priority_str; + gchar *tmp; + + /* set origin of this metadata */ + tmp = (gchar*) xmlGetProp (node, (xmlChar*) "origin"); + as_context_set_origin (context, tmp); + g_free (tmp); + + /* set baseurl for the media files */ + tmp = (gchar*) xmlGetProp (node, (xmlChar*) "media_baseurl"); + as_context_set_media_baseurl (context, tmp); + g_free (tmp); + + /* set architecture for the components */ + tmp = (gchar*) xmlGetProp (node, (xmlChar*) "architecture"); + as_context_set_architecture (context, tmp); + g_free (tmp); + + /* collection metadata allows setting a priority for components */ + priority_str = (gchar*) xmlGetProp (node, (xmlChar*) "priority"); + if (priority_str != NULL) { + gint default_priority; + default_priority = g_ascii_strtoll (priority_str, NULL, 10); + as_context_set_priority (context, default_priority); + } + g_free (priority_str); + + for (iter = node->children; iter != NULL; iter = iter->next) { + g_autoptr(AsComponent) cpt = NULL; - if (priv->xdt != NULL) - as_xmldata_initialize (priv->xdt, - priv->locale, - priv->origin, - priv->media_baseurl, - priv->arch, - priv->default_priority); - if (priv->ydt != NULL) - as_yamldata_initialize (priv->ydt, - priv->locale, - priv->origin, - priv->media_baseurl, - priv->arch, - priv->default_priority); + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) + continue; + + cpt = as_component_new (); + if (as_component_load_from_xml (cpt, context, iter, &tmp_error)) { + g_ptr_array_add (priv->cpts, g_object_ref (cpt)); + } else { + if (tmp_error != NULL) { + g_propagate_error (error, tmp_error); + return; + } + } + } } /** - * as_metadata_clear_components: - **/ -void -as_metadata_clear_components (AsMetadata *metad) + * as_metadata_yaml_parse_collection_doc: + * @metad: an instance of #AsMetadata. + * @context: an #AsContext + * @data: YAML metadata to parse + * @error: a #GError + * + * Read an array of #AsComponent from AppStream YAML metadata. + * + * Returns: (transfer container) (element-type AsComponent): An array of #AsComponent or %NULL + */ +static GPtrArray* +as_metadata_yaml_parse_collection_doc (AsMetadata *metad, AsContext *context, const gchar *data, GError **error) { - AsMetadataPrivate *priv = GET_PRIVATE (metad); - g_ptr_array_unref (priv->cpts); - priv->cpts = g_ptr_array_new_with_free_func (g_object_unref); + yaml_parser_t parser; + yaml_event_t event; + gboolean header = TRUE; + gboolean parse = TRUE; + gboolean ret = TRUE; + g_autoptr(GPtrArray) cpts = NULL; + + /* we ignore empty data - usually happens if the file is broken, e.g. by disk corruption + * or download interruption. */ + if (data == NULL) + return NULL; + + /* create container for the components we find */ + cpts = g_ptr_array_new_with_free_func (g_object_unref); + + /* initialize YAML parser */ + yaml_parser_initialize (&parser); + yaml_parser_set_input_string (&parser, (unsigned char*) data, strlen (data)); + + while (parse) { + if (!yaml_parser_parse (&parser, &event)) { + g_set_error (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_PARSE, + "Invalid DEP-11 file found. Could not parse YAML: %s", parser.problem); + ret = FALSE; + break; + } + + if (event.type == YAML_DOCUMENT_START_EVENT) { + GNode *n; + gboolean header_found = FALSE; + GError *tmp_error = NULL; + g_autoptr(GNode) root = NULL; + + root = g_node_new (g_strdup ("")); + as_yaml_parse_layer (&parser, root, &tmp_error); + if (tmp_error != NULL) { + /* stop immediately, since we found an error when parsing the document */ + g_propagate_error (error, tmp_error); + g_free (root->data); + yaml_event_delete (&event); + ret = FALSE; + parse = FALSE; + break; + } + + if (header) { + for (n = root->children; n != NULL; n = n->next) { + const gchar *key; + const gchar *value; + + if ((n->data == NULL) || (n->children == NULL)) { + parse = FALSE; + g_set_error_literal (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "Invalid DEP-11 file found: Header invalid"); + ret = FALSE; + break; + } + + key = as_yaml_node_get_key (n); + value = as_yaml_node_get_value (n); + + if (g_strcmp0 (key, "File") == 0) { + if (g_strcmp0 (value, "DEP-11") != 0) { + parse = FALSE; + g_set_error_literal (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "Invalid DEP-11 file found: Header invalid"); + } + header_found = TRUE; + } + + if (!header_found) + break; + + if (g_strcmp0 (key, "Origin") == 0) { + if (value != NULL) { + as_context_set_origin (context, value); + } else { + parse = FALSE; + g_set_error_literal (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "Invalid DEP-11 file found: No origin set in header."); + } + } else if (g_strcmp0 (key, "Priority") == 0) { + if (value != NULL) { + as_context_set_priority (context, g_ascii_strtoll (value, NULL, 10)); + } + } else if (g_strcmp0 (key, "MediaBaseUrl") == 0) { + if (value != NULL) { + as_context_set_media_baseurl (context, value); + } + } else if (g_strcmp0 (key, "Architecture") == 0) { + if (value != NULL) { + as_context_set_architecture (context, value); + } + } + } + } + header = FALSE; + + if (!header_found) { + AsComponent *cpt = as_component_new (); + if (as_component_load_from_yaml (cpt, context, root, NULL)) { + /* add found component to the results set */ + g_ptr_array_add (cpts, cpt); + } else { + g_warning ("Parsing of YAML metadata failed: Could not read data for component."); + parse = FALSE; + ret = FALSE; + g_object_unref (cpt); + } + } + + g_node_traverse (root, + G_IN_ORDER, + G_TRAVERSE_ALL, + -1, + as_yaml_free_node, + NULL); + } + + /* stop if end of stream is reached */ + if (event.type == YAML_STREAM_END_EVENT) + parse = FALSE; + + yaml_event_delete (&event); + } + + yaml_parser_delete (&parser); + + /* return NULL on error, otherwise return the list of found components */ + if (ret) + return g_ptr_array_ref (cpts); + else + return NULL; } /** - * as_metadata_parse_xml: - * @metad: A valid #AsMetadata instance - * @data: XML data describing one or more software components. + * as_metadata_parse: + * @metad: An instance of #AsMetadata. + * @data: Metadata describing one or more software components. + * @format: The format of the data (XML or YAML). + * @error: A #GError or %NULL. * - * Parses AppStream XML metadata. + * Parses AppStream metadata. **/ void -as_metadata_parse_xml (AsMetadata *metad, const gchar *data, GError **error) +as_metadata_parse (AsMetadata *metad, const gchar *data, AsFormatKind format, GError **error) { AsMetadataPrivate *priv = GET_PRIVATE (metad); - as_metadata_init_xml (metad); + g_return_if_fail (format > AS_FORMAT_KIND_UNKNOWN && format < AS_FORMAT_KIND_LAST); - if (priv->mode == AS_PARSER_MODE_DISTRO) { - guint i; - g_autoptr(GPtrArray) new_cpts = NULL; + if (format == AS_FORMAT_KIND_XML) { + xmlDoc *doc; + xmlNode *root; - new_cpts = as_xmldata_parse_distro_data (priv->xdt, data, error); - if (new_cpts == NULL) + doc = as_xml_parse_document (data, error); + if (doc == NULL) return; - for (i = 0; i < new_cpts->len; i++) { - AsComponent *cpt; - cpt = AS_COMPONENT (g_ptr_array_index (new_cpts, i)); - g_ptr_array_add (priv->cpts, - g_object_ref (cpt)); - } - } else { - AsComponent *cpt; + root = xmlDocGetRootElement (doc); - if (priv->update_existing) { - /* we should update the existing component with new metadata */ - cpt = as_metadata_get_component (metad); - if (cpt == NULL) { + if (priv->mode == AS_FORMAT_STYLE_COLLECTION) { + /* prepare context */ + g_autoptr(AsContext) context = as_metadata_new_context (metad, AS_FORMAT_STYLE_COLLECTION, NULL); + + if (g_strcmp0 ((gchar*) root->name, "components") == 0) { + as_metadata_xml_parse_components_node (metad, context, root, error); + } else if (g_strcmp0 ((gchar*) root->name, "component") == 0) { + g_autoptr(AsComponent) cpt = as_component_new (); + /* we explicitly allow parsing single component entries in distro-XML mode, since this is a scenario + * which might very well happen, e.g. in AppStream metadata generators */ + if (as_component_load_from_xml (cpt, context, root, error)) + g_ptr_array_add (priv->cpts, g_object_ref (cpt)); + } else { g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_NO_COMPONENT, - "No component found that could be updated."); - return; + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "XML file does not contain valid AppStream data!"); } - as_xmldata_update_cpt_with_upstream_data (priv->xdt, data, cpt, error); } else { - cpt = as_xmldata_parse_upstream_data (priv->xdt, data, error); + g_autoptr(AsContext) context = NULL; + AsComponent *cpt = as_component_new (); + + context = as_metadata_new_context (metad, AS_FORMAT_STYLE_METAINFO, NULL); + if (priv->update_existing) { + /* we should update the existing component with new metadata */ + cpt = as_metadata_get_component (metad); + if (cpt == NULL) { + g_set_error_literal (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_NO_COMPONENT, + "No component found that could be updated."); + xmlFreeDoc (doc); + return; + } + as_component_load_from_xml (cpt, context, root, error); + } else { + if (as_component_load_from_xml (cpt, context, root, error)) + g_ptr_array_add (priv->cpts, g_object_ref (cpt)); + } + if (cpt != NULL) - g_ptr_array_add (priv->cpts, cpt); + as_component_set_origin_kind (cpt, AS_ORIGIN_KIND_METAINFO); + } + + /* free the XML document */ + xmlFreeDoc (doc); + + } else if (format == AS_FORMAT_KIND_YAML) { + if (priv->mode == AS_FORMAT_STYLE_COLLECTION) { + g_autoptr(AsContext) context = NULL; + g_autoptr(GPtrArray) new_cpts = NULL; + guint i; + + context = as_metadata_new_context (metad, AS_FORMAT_STYLE_COLLECTION, NULL); + new_cpts = as_metadata_yaml_parse_collection_doc (metad, context, data, error); + if (new_cpts == NULL) + return; + for (i = 0; i < new_cpts->len; i++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (new_cpts, i)); + as_component_set_origin_kind (cpt, AS_ORIGIN_KIND_COLLECTION); + + g_ptr_array_add (priv->cpts, + g_object_ref (cpt)); + } + } else { + g_warning ("Can not load non-collection AppStream YAML data, because their format is not specified."); } + } else if (format == AS_FORMAT_KIND_DESKTOP_ENTRY) { + g_critical ("Refusing to load desktop entry without knowing its ID. Use as_metadata_parse_desktop() to parse .desktop files."); } } /** - * as_metadata_parse_yaml: - * @metad: A valid #AsMetadata instance - * @data: YAML data describing one or more software components. + * as_metadata_parse_desktop_data: + * @metad: An instance of #AsMetadata. + * @data: Metadata describing one or more software components. + * @cid: The component-id the new #AsComponent should have. * @error: A #GError or %NULL. * - * Parses AppStream YAML metadata. + * Parses XDG Desktop Entry metadata and adds it to the pool. **/ void -as_metadata_parse_yaml (AsMetadata *metad, const gchar *data, GError **error) +as_metadata_parse_desktop_data (AsMetadata *metad, const gchar *data, const gchar *cid, GError **error) { AsMetadataPrivate *priv = GET_PRIVATE (metad); + AsComponent *cpt; - as_metadata_init_yaml (metad); + cpt = as_desktop_entry_parse_data (data, + cid, + priv->format_version, + error); + if (cpt == NULL) { + if (*error == NULL) + g_debug ("No component found in desktop-entry data."); + return; + } - if (priv->mode == AS_PARSER_MODE_DISTRO) { - guint i; - g_autoptr(GPtrArray) new_cpts = NULL; + /* ensure the right active locale is set */ + as_component_set_active_locale (cpt, priv->locale); - new_cpts = as_yamldata_parse_distro_data (priv->ydt, data, error); - if (new_cpts == NULL) - return; - for (i = 0; i < new_cpts->len; i++) { - AsComponent *cpt; - cpt = AS_COMPONENT (g_ptr_array_index (new_cpts, i)); - g_ptr_array_add (priv->cpts, - g_object_ref (cpt)); - } - } else { - g_warning ("Can not load non-distro AppStream YAML data, since their format is not specified."); - } + /* add component to our list */ + g_ptr_array_add (priv->cpts, cpt); } /** * as_metadata_parse_file: * @metad: A valid #AsMetadata instance * @file: #GFile for the upstream metadata + * @format: The format the data is in, or %AS_FORMAT_KIND_UNKNOWN if not known. * @error: A #GError or %NULL. * * Parses an AppStream upstream metadata file. * **/ void -as_metadata_parse_file (AsMetadata *metad, GFile* file, GError **error) +as_metadata_parse_file (AsMetadata *metad, GFile *file, AsFormatKind format, GError **error) { - g_autofree gchar *asdata_doc = NULL; - GFileInputStream* fistream; - GFileInfo *info = NULL; g_autofree gchar *file_basename = NULL; - gboolean is_yaml_doc = FALSE; + g_autoptr(GFileInfo) info = NULL; + g_autoptr(GInputStream) file_stream = NULL; + g_autoptr(GInputStream) stream_data = NULL; + g_autoptr(GConverter) conv = NULL; + g_autoptr(GString) asdata = NULL; + gssize len; + const gsize buffer_size = 1024 * 32; + g_autofree gchar *buffer = NULL; const gchar *content_type = NULL; info = g_file_query_info (file, @@ -292,71 +613,58 @@ if (info != NULL) content_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE); - - /* check if we are dealing with a YAML document, assume XML otherwise */ - if (g_strcmp0 (content_type, "application/x-yaml") == 0) - is_yaml_doc = TRUE; - file_basename = g_file_get_basename (file); - if ((g_str_has_suffix (file_basename, ".yml.gz")) || - (g_str_has_suffix (file_basename, ".yaml.gz")) || - (g_str_has_suffix (file_basename, ".yml")) || - (g_str_has_suffix (file_basename, ".yaml"))) { - is_yaml_doc = TRUE; + if (format == AS_FORMAT_KIND_UNKNOWN) { + /* we should autodetect the format type. assume XML until we can find evidence that it's YAML */ + format = AS_FORMAT_KIND_XML; + + /* check if we are dealing with a YAML document */ + if (g_strcmp0 (content_type, "application/x-yaml") == 0) + format = AS_FORMAT_KIND_YAML; + + if ((g_str_has_suffix (file_basename, ".yml.gz")) || + (g_str_has_suffix (file_basename, ".yaml.gz")) || + (g_str_has_suffix (file_basename, ".yml")) || + (g_str_has_suffix (file_basename, ".yaml"))) { + format = AS_FORMAT_KIND_YAML; + } + + /* check if we have a .desktop file */ + if (g_str_has_suffix (file_basename, ".desktop")) + format = AS_FORMAT_KIND_DESKTOP_ENTRY; } + file_stream = G_INPUT_STREAM (g_file_read (file, NULL, error)); + if (file_stream == NULL) + return; if ((g_strcmp0 (content_type, "application/gzip") == 0) || (g_strcmp0 (content_type, "application/x-gzip") == 0)) { - GFileInputStream *fistream; - GMemoryOutputStream *mem_os; - GInputStream *conv_stream; - GZlibDecompressor *zdecomp; - guint8 *data; - - /* load a GZip compressed file */ - fistream = g_file_read (file, NULL, NULL); - mem_os = (GMemoryOutputStream*) g_memory_output_stream_new (NULL, 0, g_realloc, g_free); - zdecomp = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP); - conv_stream = g_converter_input_stream_new (G_INPUT_STREAM (fistream), G_CONVERTER (zdecomp)); - g_object_unref (zdecomp); - - g_output_stream_splice (G_OUTPUT_STREAM (mem_os), conv_stream, 0, NULL, NULL); - data = g_memory_output_stream_get_data (mem_os); - - asdata_doc = g_strdup ((const gchar*) data); - - g_object_unref (conv_stream); - g_object_unref (mem_os); - g_object_unref (fistream); + /* decompress the GZip stream */ + conv = G_CONVERTER (g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP)); + stream_data = g_converter_input_stream_new (file_stream, conv); } else { - gchar *line = NULL; - GString *str; - GDataInputStream *dis; - - /* load a plaintext file */ - str = g_string_new (""); - fistream = g_file_read (file, NULL, NULL); - dis = g_data_input_stream_new ((GInputStream*) fistream); - g_object_unref (fistream); - - while (TRUE) { - line = g_data_input_stream_read_line (dis, NULL, NULL, NULL); - if (line == NULL) { - break; - } - - g_string_append_printf (str, "%s\n", line); - } + stream_data = g_object_ref (file_stream); + } - asdata_doc = g_string_free (str, FALSE); - g_object_unref (dis); + /* Now read the whole file into memory to parse it. + * On memory-contrained systems we could adjust the code later to allow parsing + * a stream of data instead. + */ + + asdata = g_string_new (""); + buffer = g_malloc (buffer_size); + while ((len = g_input_stream_read (stream_data, buffer, buffer_size, NULL, error)) > 0) { + g_string_append_len (asdata, buffer, len); } + /* check if there was an error */ + if (len < 0) + return; /* parse metadata */ - if (is_yaml_doc) - as_metadata_parse_yaml (metad, asdata_doc, error); + if (format == AS_FORMAT_KIND_DESKTOP_ENTRY) + as_metadata_parse_desktop_data (metad, asdata->str, file_basename, error); else - as_metadata_parse_xml (metad, asdata_doc, error); + as_metadata_parse (metad, asdata->str, format, error); } /** @@ -415,11 +723,11 @@ /* write uncompressed file */ if (g_file_query_exists (file, NULL)) { fos = g_file_replace (file, - NULL, - FALSE, - G_FILE_CREATE_REPLACE_DESTINATION, - NULL, - &tmp_error); + NULL, + FALSE, + G_FILE_CREATE_REPLACE_DESTINATION, + NULL, + &tmp_error); } else { fos = g_file_create (file, G_FILE_CREATE_REPLACE_DESTINATION, NULL, &tmp_error); } @@ -444,130 +752,320 @@ } /** - * as_metadata_save_upstream_xml: - * @fname: The filename for the new XML file. + * as_metadata_save_metainfo: + * @fname: The filename for the new metadata file. + * @format: The format to save this file in. Only XML is supported at time. * * Serialize #AsComponent instance to XML and save it to file. * An existing file at the same location will be overridden. */ void -as_metadata_save_upstream_xml (AsMetadata *metad, const gchar *fname, GError **error) +as_metadata_save_metainfo (AsMetadata *metad, const gchar *fname, AsFormatKind format, GError **error) { g_autofree gchar *xml_data = NULL; - xml_data = as_metadata_component_to_upstream_xml (metad); + xml_data = as_metadata_component_to_metainfo (metad, format, error); + if ((error != NULL) && (*error != NULL)) + return; as_metadata_save_data (metad, fname, xml_data, error); } /** - * as_metadata_save_distro_xml: - * @fname: The filename for the new XML file. + * as_metadata_save_collection_xml: + * @metad: An instance of #AsMetadata. + * @fname: The filename for the new metadata file. * - * Serialize all #AsComponent instances to XML and save the data to a file. + * Serialize all #AsComponent instances to XML or YAML metadata and save + * the data to a file. * An existing file at the same location will be overridden. */ void -as_metadata_save_distro_xml (AsMetadata *metad, const gchar *fname, GError **error) +as_metadata_save_collection (AsMetadata *metad, const gchar *fname, AsFormatKind format, GError **error) { - g_autofree gchar *xml_data = NULL; + g_autofree gchar *data = NULL; - xml_data = as_metadata_components_to_distro_xml (metad); - as_metadata_save_data (metad, fname, xml_data, error); + data = as_metadata_components_to_collection (metad, format, error); + if ((error != NULL) && (*error != NULL)) + return; + as_metadata_save_data (metad, fname, data, error); } /** - * as_metadata_components_to_distro_yaml: + * as_metadata_component_to_metainfo: + * @metad: An instance of #AsMetadata. + * @format: The format to use (XML or YAML) + * @error: A #GError * - * Serialize all #AsComponent instances into AppStream DEP-11 - * distro-YAML data. - * %NULL is returned if there is nothing to serialize. + * Convert an #AsComponent to metainfo data. + * This will always be XML, YAML is no valid format for metainfo files. + * + * The amount of localization included in the metadata depends on how the #AsComponent + * was initially loaded and whether it contains data for all locale. * - * Returns: (transfer full): A string containing the YAML markup. Free with g_free() + * The first #AsComponent added to the internal list will be transformed. + * In case no component is present, %NULL is returned. + * + * Returns: (transfer full): A string containing the XML metadata. Free with g_free() */ gchar* -as_metadata_components_to_distro_yaml (AsMetadata *metad) +as_metadata_component_to_metainfo (AsMetadata *metad, AsFormatKind format, GError **error) { - gchar *yamlstr = NULL; - AsMetadataPrivate *priv = GET_PRIVATE (metad); + xmlNode *node; + gchar *xmlstr; + g_autoptr(AsContext) context = NULL; + AsComponent *cpt; - as_metadata_init_yaml (metad); - if (priv->cpts->len == 0) + g_return_val_if_fail (format > AS_FORMAT_KIND_UNKNOWN && format < AS_FORMAT_KIND_LAST, NULL); + if (format == AS_FORMAT_KIND_YAML) { + g_critical ("Can not serialize to YAML-metainfo, because metainfo files have to be XML data."); return NULL; + } - yamlstr = as_yamldata_serialize_to_distro (priv->ydt, - priv->cpts, - priv->write_header, - TRUE, /* add timestamp */ - NULL); - return yamlstr; + context = as_metadata_new_context (metad, AS_FORMAT_STYLE_METAINFO, NULL); + cpt = as_metadata_get_component (metad); + if (cpt == NULL) + return NULL; + + node = as_component_to_xml_node (cpt, context, NULL); + xmlstr = as_xml_node_to_str (node, error); + + return xmlstr; } /** - * as_metadata_save_distro_yaml: - * @fname: The filename for the new YAML file. + * as_metadata_xml_serialize_to_collection_with_rootnode: * - * Serialize all #AsComponent instances to XML and save the data to a file. - * An existing file at the same location will be overridden. + * Returns: Valid collection XML metadata. */ -void -as_metadata_save_distro_yaml (AsMetadata *metad, const gchar *fname, GError **error) +static gchar* +as_metadata_xml_serialize_to_collection_with_rootnode (AsMetadata *metad, AsContext *context, GPtrArray *cpts) { - g_autofree gchar *yaml_data = NULL; + AsMetadataPrivate *priv = GET_PRIVATE (metad); + xmlNode *root; + guint i; + + root = xmlNewNode (NULL, (xmlChar*) "components"); + xmlNewProp (root, + (xmlChar*) "version", + (xmlChar*) as_format_version_to_string (priv->format_version)); + if (priv->origin != NULL) + xmlNewProp (root, (xmlChar*) "origin", (xmlChar*) priv->origin); + if (priv->arch != NULL) + xmlNewProp (root, (xmlChar*) "architecture", (xmlChar*) priv->arch); + + for (i = 0; i < cpts->len; i++) { + xmlNode *node; + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + + node = as_component_to_xml_node (cpt, context, NULL); + if (node == NULL) + continue; + xmlAddChild (root, node); + } - yaml_data = as_metadata_components_to_distro_yaml (metad); - as_metadata_save_data (metad, fname, yaml_data, error); + return as_xml_node_to_str (root, NULL); } /** - * as_metadata_component_to_upstream_xml: + * as_metadata_xml_serialize_to_collection_without_rootnode: * - * Convert an #AsComponent to upstream XML. - * (The amount of localization included in the metadata depends on how the #AsComponent - * was initially loaded) + * Returns: Collection XML metadata slices without rootnode. + */ +static gchar* +as_metadata_xml_serialize_to_collection_without_rootnode (AsMetadata *metad, AsContext *context, GPtrArray *cpts) +{ + guint i; + GString *out_data; + + out_data = g_string_new (""); + + for (i = 0; i < cpts->len; i++) { + AsComponent *cpt; + xmlDoc *doc; + xmlNode *node; + xmlBufferPtr buf; + xmlSaveCtxtPtr sctx; + cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + + node = as_component_to_xml_node (cpt, context, NULL); + if (node == NULL) + continue; + + doc = xmlNewDoc ((xmlChar*) NULL); + xmlDocSetRootElement (doc, node); + + buf = xmlBufferCreate (); + sctx = xmlSaveToBuffer (buf, "utf-8", XML_SAVE_FORMAT | XML_SAVE_NO_DECL); + xmlSaveDoc (sctx, doc); + xmlSaveClose (sctx); + + g_string_append (out_data, (const gchar*) xmlBufferContent (buf)); + xmlBufferFree (buf); + xmlFreeDoc (doc); + } + + return g_string_free (out_data, FALSE); +} + +/** + * as_yamldata_write_header: * - * The first #AsComponent added to the internal list will be transformed. - * In case no component is present, %NULL is returned. + * Emit a DEP-11 header for the new document. + */ +static void +as_yamldata_write_header (AsContext *context, yaml_emitter_t *emitter) +{ + gint res; + yaml_event_t event; + + yaml_document_start_event_initialize (&event, NULL, NULL, NULL, FALSE); + res = yaml_emitter_emit (emitter, &event); + g_assert (res); + + as_yaml_mapping_start (emitter); + + as_yaml_emit_entry (emitter, "File", "DEP-11"); + as_yaml_emit_entry (emitter, "Version", as_format_version_to_string (as_context_get_format_version (context))); + as_yaml_emit_entry (emitter, "Origin", as_context_get_origin (context)); + if (as_context_has_media_baseurl (context)) + as_yaml_emit_entry (emitter, "MediaBaseUrl", as_context_get_media_baseurl (context)); + if (as_context_get_architecture (context) != NULL) + as_yaml_emit_entry (emitter, "Architecture", as_context_get_architecture (context)); + if (as_context_get_priority (context) != 0) { + g_autofree gchar *tmp = g_strdup_printf ("%i", as_context_get_priority (context)); + as_yaml_emit_entry (emitter, "Priority", tmp); + } + + as_yaml_mapping_end (emitter); + + yaml_document_end_event_initialize (&event, 1); + res = yaml_emitter_emit (emitter, &event); + g_assert (res); +} + +/** + * as_yamldata_write_handler: * - * Returns: (transfer full): A string containing the XML. Free with g_free() + * Helper function to store the emitted YAML document. */ -gchar* -as_metadata_component_to_upstream_xml (AsMetadata *metad) +static int +as_yamldata_write_handler (void *ptr, unsigned char *buffer, size_t size) { - gchar *xmlstr = NULL; - AsComponent *cpt; - AsMetadataPrivate *priv = GET_PRIVATE (metad); + GString *str; + str = (GString*) ptr; + g_string_append_len (str, (const gchar*) buffer, size); - as_metadata_init_xml (metad); - cpt = as_metadata_get_component (metad); - if (cpt == NULL) + return 1; +} + +/** + * as_yamldata_serialize_to_collection: + */ +static gchar* +as_metadata_yaml_serialize_to_collection (AsMetadata *metad, AsContext *context, GPtrArray *cpts, gboolean write_header, gboolean add_timestamp, GError **error) +{ + yaml_emitter_t emitter; + yaml_event_t event; + GString *out_data; + gboolean res = FALSE; + guint i; + + if (cpts->len == 0) return NULL; + yaml_emitter_initialize (&emitter); + yaml_emitter_set_indent (&emitter, 2); + yaml_emitter_set_unicode (&emitter, TRUE); + yaml_emitter_set_width (&emitter, 120); + + /* create a GString to receive the output the emitter generates */ + out_data = g_string_new (""); + yaml_emitter_set_output (&emitter, as_yamldata_write_handler, out_data); + + /* emit start event */ + yaml_stream_start_event_initialize (&event, YAML_UTF8_ENCODING); + if (!yaml_emitter_emit (&emitter, &event)) + goto error; + + /* write header */ + if (write_header) + as_yamldata_write_header (context, &emitter); + + /* write components as YAML documents */ + for (i = 0; i < cpts->len; i++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + as_component_emit_yaml (cpt, context, &emitter); + } - xmlstr = as_xmldata_serialize_to_upstream (priv->xdt, cpt); - return xmlstr; + /* emit end event */ + yaml_stream_end_event_initialize (&event); + res = yaml_emitter_emit (&emitter, &event); + g_assert (res); + + res = TRUE; + goto out; + +error: + g_set_error_literal (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "Emission of YAML event failed."); + +out: + yaml_emitter_flush (&emitter); + /* destroy the Emitter object */ + yaml_emitter_delete (&emitter); + + if (res) { + return g_string_free (out_data, FALSE); + } else { + g_string_free (out_data, TRUE); + return NULL; + } } /** - * as_metadata_components_to_distro_xml: + * as_metadata_components_to_collection: + * @metad: An instance of #AsMetadata. + * @format: The format to serialize the data to (XML or YAML). + * @error: A #GError * * Serialize all #AsComponent instances into AppStream - * distro-XML data. + * collection metadata. * %NULL is returned if there is nothing to serialize. * - * Returns: (transfer full): A string containing the XML. Free with g_free() + * Returns: (transfer full): A string containing the YAML or XML data. Free with g_free() */ gchar* -as_metadata_components_to_distro_xml (AsMetadata *metad) +as_metadata_components_to_collection (AsMetadata *metad, AsFormatKind format, GError **error) { - gchar *xmlstr = NULL; AsMetadataPrivate *priv = GET_PRIVATE (metad); + gchar *data = NULL; + g_autoptr(AsContext) context = NULL; + g_return_val_if_fail (format > AS_FORMAT_KIND_UNKNOWN && format < AS_FORMAT_KIND_LAST, NULL); - as_metadata_init_xml (metad); if (priv->cpts->len == 0) return NULL; - xmlstr = as_xmldata_serialize_to_distro (priv->xdt, priv->cpts, priv->write_header); - return xmlstr; + context = as_metadata_new_context (metad, AS_FORMAT_STYLE_COLLECTION, NULL); + + if (format == AS_FORMAT_KIND_XML) { + if (priv->write_header) + return as_metadata_xml_serialize_to_collection_with_rootnode (metad, context, priv->cpts); + else + return as_metadata_xml_serialize_to_collection_without_rootnode (metad, context, priv->cpts); + } else if (format == AS_FORMAT_KIND_YAML) { + data = as_metadata_yaml_serialize_to_collection (metad, + context, + priv->cpts, + priv->write_header, + TRUE, /* add timestamp */ + NULL); + } else { + g_warning ("Unknown metadata format (%i).", format); + } + + return data; } /** @@ -634,7 +1132,6 @@ g_free (priv->locale); priv->locale = g_strdup (locale); - as_metadata_reload_parsers (metad); } /** @@ -646,7 +1143,7 @@ * * Returns: Locale used for metadata parsing. **/ -const gchar * +const gchar* as_metadata_get_locale (AsMetadata *metad) { AsMetadataPrivate *priv = GET_PRIVATE (metad); @@ -666,7 +1163,6 @@ AsMetadataPrivate *priv = GET_PRIVATE (metad); g_free (priv->origin); priv->origin = g_strdup (origin); - as_metadata_reload_parsers (metad); } /** @@ -695,7 +1191,6 @@ AsMetadataPrivate *priv = GET_PRIVATE (metad); g_free (priv->arch); priv->arch = g_strdup (arch); - as_metadata_reload_parsers (metad); } /** @@ -712,17 +1207,31 @@ } /** - * as_metadata_set_parser_mode: + * as_metadata_get_format_version: + * @metad: an #AsMetadata instance. + * + * Returns: The AppStream metadata format version. + **/ +AsFormatVersion +as_metadata_get_format_version (AsMetadata *metad) +{ + AsMetadataPrivate *priv = GET_PRIVATE (metad); + return priv->format_version; +} + +/** + * as_metadata_set_format_version: * @metad: a #AsMetadata instance. - * @mode: the #AsParserMode. + * @version: the AppStream metadata format version as #AsFormatVersion. * - * Sets the current metadata parsing mode. + * Set the current AppStream format version that we should generate data for + * or be able to read. **/ void -as_metadata_set_parser_mode (AsMetadata *metad, AsParserMode mode) +as_metadata_set_format_version (AsMetadata *metad, AsFormatVersion version) { AsMetadataPrivate *priv = GET_PRIVATE (metad); - priv->mode = mode; + priv->format_version = version; } /** @@ -765,7 +1274,7 @@ * header document when in YAML mode, and will not write a root components node * when writing XML data. * Please keep in mind that this will create an invalid DEP-11 YAML AppStream - * distro metadata file, and an invalid XML file. + * collection metadata file, and an invalid XML file. * This parameter should only be changed e.g. by the appstream-generator tool. * * NOTE: Right now, this feature is only implemented for YAML! @@ -781,7 +1290,7 @@ * as_metadata_get_write_header: * @metad: an #AsMetadata instance. * - * Returns: Whether we will write a header/root node in distro metadata. + * Returns: Whether we will write a header/root node in collection metadata. **/ gboolean as_metadata_get_write_header (AsMetadata *metad) @@ -791,21 +1300,33 @@ } /** - * as_metadata_get_parser_mode: + * as_metadata_get_format_style: * @metad: a #AsMetadata instance. * - * Gets the current parser mode - * - * Returns: an #AsParserMode + * Get the metadata parsing mode. **/ -AsParserMode -as_metadata_get_parser_mode (AsMetadata *metad) +AsFormatStyle +as_metadata_get_format_style (AsMetadata *metad) { AsMetadataPrivate *priv = GET_PRIVATE (metad); return priv->mode; } /** + * as_metadata_set_format_style: + * @metad: a #AsMetadata instance. + * @mode: the #AsFormatStyle. + * + * Sets the current metadata parsing mode. + **/ +void +as_metadata_set_format_style (AsMetadata *metad, AsFormatStyle mode) +{ + AsMetadataPrivate *priv = GET_PRIVATE (metad); + priv->mode = mode; +} + +/** * as_metadata_class_init: **/ static void diff -Nru appstream-0.9.4/src/as-metadata.h appstream-0.12.0/src/as-metadata.h --- appstream-0.9.4/src/as-metadata.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-metadata.h 2018-04-04 15:53:56.000000000 +0000 @@ -49,34 +49,89 @@ }; /** - * AsParserMode: - * @AS_PARSER_MODE_UPSTREAM: Parse Appstream upstream metadata - * @AS_PARSER_MODE_DISTRO: Parse Appstream distribution metadata + * AsFormatStyle: + * @AS_FORMAT_STYLE_METAINFO: Parse AppStream upstream metadata (metainfo files) + * @AS_FORMAT_STYLE_COLLECTION: Parse AppStream metadata collections (shipped by software distributors) * - * There are a few differences between Appstream's upstream metadata - * and the distribution metadata. - * The parser mode indicates which style we should process. - * Usually you don't want to change this. + * There are a few differences between AppStream's metainfo files (shipped by upstream projects) + * and the collection metadata (shipped by distributors). + * The data source kind indicates which style we should process. + * Usually you do not want to set this explicitly. **/ typedef enum { - AS_PARSER_MODE_UPSTREAM, - AS_PARSER_MODE_DISTRO, + AS_FORMAT_STYLE_UNKNOWN, + AS_FORMAT_STYLE_METAINFO, + AS_FORMAT_STYLE_COLLECTION, /*< private >*/ - AS_PARSER_MODE_LAST -} AsParserMode; + AS_FORMAT_STYLE_LAST +} AsFormatStyle; + +/** + * AsFormatKind: + * @AS_FORMAT_KIND_UNKNOWN: Unknown metadata format. + * @AS_FORMAT_KIND_XML: AppStream XML metadata. + * @AS_FORMAT_KIND_YAML: AppStream YAML (DEP-11) metadata. + * @AS_FORMAT_KIND_DESKTOP_ENTRY: XDG Desktop Entry data. + * + * Format of the AppStream metadata. + **/ +typedef enum { + AS_FORMAT_KIND_UNKNOWN, + AS_FORMAT_KIND_XML, + AS_FORMAT_KIND_YAML, + AS_FORMAT_KIND_DESKTOP_ENTRY, + /*< private >*/ + AS_FORMAT_KIND_LAST +} AsFormatKind; + +const gchar *as_format_kind_to_string (AsFormatKind kind); +AsFormatKind as_format_kind_from_string (const gchar *kind_str); + +/** + * AsFormatVersion: + * @AS_FORMAT_VERSION_V0_6: 0.6 + * @AS_FORMAT_VERSION_V0_7: 0.7 + * @AS_FORMAT_VERSION_V0_8: 0.8 + * @AS_FORMAT_VERSION_V0_9: 0.9 + * @AS_FORMAT_VERSION_V0_10: 0.10 + * @AS_FORMAT_VERSION_V0_11: 0.11 + * @AS_FORMAT_VERSION_V0_12: 0.12 + * + * Format version / API level of the AppStream metadata. + **/ +typedef enum { + AS_FORMAT_VERSION_V0_6, + AS_FORMAT_VERSION_V0_7, + AS_FORMAT_VERSION_V0_8, + AS_FORMAT_VERSION_V0_9, + AS_FORMAT_VERSION_V0_10, + AS_FORMAT_VERSION_V0_11, + AS_FORMAT_VERSION_V0_12, + /*< private >*/ + AS_FORMAT_VERSION_LAST +} AsFormatVersion; + +const gchar *as_format_version_to_string (AsFormatVersion version); +AsFormatVersion as_format_version_from_string (const gchar *version_str); + +#define AS_CURRENT_FORMAT_VERSION AS_FORMAT_VERSION_V0_12 /** * AsMetadataError: - * @AS_METADATA_ERROR_FAILED: Generic failure - * @AS_METADATA_ERROR_UNEXPECTED_FORMAT_KIND: Expected upstream metadata but got distro metadata, or vice versa. + * @AS_METADATA_ERROR_FAILED: Generic failure. + * @AS_METADATA_ERROR_PARSE: Unable to parse the metadata file. + * @AS_METADATA_ERROR_FORMAT_UNEXPECTED: Expected collection metadata but got metainfo metadata, or vice versa. * @AS_METADATA_ERROR_NO_COMPONENT: We expected a component in the pool, but couldn't find one. + * @AS_METADATA_ERROR_VALUE_MISSING: A essential value is missing in the source document. * * A metadata processing error. **/ typedef enum { AS_METADATA_ERROR_FAILED, - AS_METADATA_ERROR_UNEXPECTED_FORMAT_KIND, + AS_METADATA_ERROR_PARSE, + AS_METADATA_ERROR_FORMAT_UNEXPECTED, AS_METADATA_ERROR_NO_COMPONENT, + AS_METADATA_ERROR_VALUE_MISSING, /*< private >*/ AS_METADATA_ERROR_LAST } AsMetadataError; @@ -87,14 +142,18 @@ GQuark as_metadata_error_quark (void); void as_metadata_parse_file (AsMetadata *metad, - GFile *file, - GError **error); + GFile *file, + AsFormatKind format, + GError **error); + +void as_metadata_parse (AsMetadata *metad, + const gchar *data, + AsFormatKind format, + GError **error); -void as_metadata_parse_xml (AsMetadata *metad, - const gchar *data, - GError **error); -void as_metadata_parse_yaml (AsMetadata *metad, +void as_metadata_parse_desktop_data (AsMetadata *metad, const gchar *data, + const gchar *cid, GError **error); AsComponent *as_metadata_get_component (AsMetadata *metad); @@ -104,20 +163,30 @@ void as_metadata_add_component (AsMetadata *metad, AsComponent *cpt); -gchar *as_metadata_component_to_upstream_xml (AsMetadata *metad); -void as_metadata_save_upstream_xml (AsMetadata *metad, - const gchar *fname, - GError **error); -gchar *as_metadata_components_to_distro_xml (AsMetadata *metad); -void as_metadata_save_distro_xml (AsMetadata *metad, +gchar *as_metadata_component_to_metainfo (AsMetadata *metad, + AsFormatKind format, + GError **error); +void as_metadata_save_metainfo (AsMetadata *metad, const gchar *fname, + AsFormatKind format, GError **error); -gchar *as_metadata_components_to_distro_yaml (AsMetadata *metad); -void as_metadata_save_distro_yaml (AsMetadata *metad, +gchar *as_metadata_components_to_collection (AsMetadata *metad, + AsFormatKind format, + GError **error); +void as_metadata_save_collection (AsMetadata *metad, const gchar *fname, + AsFormatKind format, GError **error); +AsFormatVersion as_metadata_get_format_version (AsMetadata *metad); +void as_metadata_set_format_version (AsMetadata *metad, + AsFormatVersion version); + +AsFormatStyle as_metadata_get_format_style (AsMetadata *metad); +void as_metadata_set_format_style (AsMetadata *metad, + AsFormatStyle mode); + void as_metadata_set_locale (AsMetadata *metad, const gchar *locale); const gchar *as_metadata_get_locale (AsMetadata *metad); @@ -134,10 +203,6 @@ void as_metadata_set_write_header (AsMetadata *metad, gboolean wheader); -void as_metadata_set_parser_mode (AsMetadata *metad, - AsParserMode mode); -AsParserMode as_metadata_get_parser_mode (AsMetadata *metad); - const gchar *as_metadata_get_architecture (AsMetadata *metad); void as_metadata_set_architecture (AsMetadata *metad, const gchar *arch); diff -Nru appstream-0.9.4/src/as-pool.c appstream-0.12.0/src/as-pool.c --- appstream-0.9.4/src/as-pool.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-pool.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,1995 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +/** + * SECTION:as-pool + * @short_description: Access the AppStream metadata pool. + * + * This class loads AppStream metadata from various sources and refines it with existing + * knowledge about the system (e.g. by setting absolute pazhs for cached icons). + * An #AsPool will use an on-disk cache to store metadata is has read and refined to + * speed up the loading time when the same data is requested a second time. + * + * You can find AppStream metadata matching farious criteria, and also add new metadata to + * the pool. + * The caching behavior can be controlled by the application using #AsPool. + * + * An AppStream cache object can also be created and read using the appstreamcli(1) utility. + * + * See also: #AsComponent + */ + +#include "config.h" +#include "as-pool.h" +#include "as-pool-private.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "as-utils.h" +#include "as-utils-private.h" +#include "as-component-private.h" +#include "as-distro-details.h" +#include "as-settings-private.h" +#include "as-distro-extras.h" +#include "as-stemmer.h" +#include "as-variant-cache.h" + +#include "as-metadata.h" + +typedef struct +{ + GHashTable *cpt_table; + GHashTable *known_cids; + gchar *screenshot_service_url; + gchar *locale; + gchar *current_arch; + + GPtrArray *xml_dirs; + GPtrArray *yaml_dirs; + GPtrArray *icon_dirs; + + gchar **term_greylist; + + AsPoolFlags flags; + AsCacheFlags cache_flags; + gboolean prefer_local_metainfo; + + gchar *sys_cache_path; + gchar *user_cache_path; + time_t cache_ctime; +} AsPoolPrivate; + +G_DEFINE_TYPE_WITH_PRIVATE (AsPool, as_pool, G_TYPE_OBJECT) +#define GET_PRIVATE(o) (as_pool_get_instance_private (o)) + +/** + * AS_APPSTREAM_METADATA_PATHS: + * + * Locations where system AppStream metadata can be stored. + */ +const gchar *AS_APPSTREAM_METADATA_PATHS[4] = { "/usr/share/app-info", + "/var/lib/app-info", + "/var/cache/app-info", + NULL}; + +/* TRANSLATORS: List of "grey-listed" words sperated with ";" + * Do not translate this list directly. Instead, + * provide a list of words in your language that people are likely + * to include in a search but that should normally be ignored in + * the search. + */ +#define AS_SEARCH_GREYLIST_STR _("app;application;package;program;programme;suite;tool") + +/* where .desktop files are installed to by packages to be registered with the system */ +static gchar *APPLICATIONS_DIR = "/usr/share/applications"; + +/* where metainfo files can be found */ +static gchar *METAINFO_DIR = "/usr/share/metainfo"; + +static void as_pool_add_metadata_location_internal (AsPool *pool, const gchar *directory, gboolean add_root); + +/** + * as_pool_check_cache_ctime: + * @pool: An instance of #AsPool + * + * Update the cached cache-ctime. We need to cache it prior to potentially + * creating a new database, so we will always rebuild the database in case + * none existed previously. + */ +static void +as_pool_check_cache_ctime (AsPool *pool) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + struct stat cache_sbuf; + g_autofree gchar *fname = NULL; + + fname = g_strdup_printf ("%s/%s.gvz", priv->sys_cache_path, priv->locale); + if (stat (fname, &cache_sbuf) < 0) + priv->cache_ctime = 0; + else + priv->cache_ctime = cache_sbuf.st_ctime; +} + +/** + * as_pool_init: + **/ +static void +as_pool_init (AsPool *pool) +{ + guint i; + g_autoptr(AsDistroDetails) distro = NULL; + AsPoolPrivate *priv = GET_PRIVATE (pool); + + /* set active locale */ + priv->locale = as_get_current_locale (); + + /* stores known components */ + priv->cpt_table = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + (GDestroyNotify) g_object_unref); + + /* set which stores whether we have seen a component-ID already */ + priv->known_cids = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + NULL); + + priv->xml_dirs = g_ptr_array_new_with_free_func (g_free); + priv->yaml_dirs = g_ptr_array_new_with_free_func (g_free); + priv->icon_dirs = g_ptr_array_new_with_free_func (g_free); + + /* set the current architecture */ + priv->current_arch = as_get_current_arch (); + + /* set up our localized search-term greylist */ + priv->term_greylist = g_strsplit (AS_SEARCH_GREYLIST_STR, ";", -1); + + /* system-wide cache locations */ + priv->sys_cache_path = g_strdup (AS_APPSTREAM_CACHE_PATH); + + if (as_utils_is_root ()) { + /* users umask shouldn't interfere with us creating new files when we are root */ + as_reset_umask (); + + /* ensure we never start gvfsd as root: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852696 */ + g_setenv ("GIO_USE_VFS", "local", TRUE); + } + + /* check the ctime of the cache directory, if it exists at all */ + as_pool_check_cache_ctime (pool); + + distro = as_distro_details_new (); + priv->screenshot_service_url = as_distro_details_get_str (distro, "ScreenshotUrl"); + + /* check whether we might want to prefer local metainfo files over remote data */ + priv->prefer_local_metainfo = as_distro_details_get_bool (distro, "PreferLocalMetainfoData", FALSE); + + /* set watched default directories for AppStream metadata */ + for (i = 0; AS_APPSTREAM_METADATA_PATHS[i] != NULL; i++) + as_pool_add_metadata_location_internal (pool, AS_APPSTREAM_METADATA_PATHS[i], FALSE); + + /* set default pool flags */ + priv->flags = AS_POOL_FLAG_READ_COLLECTION | + AS_POOL_FLAG_READ_DESKTOP_FILES; + if (priv->prefer_local_metainfo) { + /* FIXME: We don't enable AS_POOL_FLAG_READ_METAINFO by default yet, because this feature is unfinished and needs work, + * mainly in the area of merging data together. */ + priv->flags |= AS_POOL_FLAG_READ_METAINFO; + } + + /* set default cache flags */ + priv->cache_flags = AS_CACHE_FLAG_USE_SYSTEM | AS_CACHE_FLAG_USE_USER; +} + +/** + * as_pool_finalize: + **/ +static void +as_pool_finalize (GObject *object) +{ + AsPool *pool = AS_POOL (object); + AsPoolPrivate *priv = GET_PRIVATE (pool); + + g_free (priv->screenshot_service_url); + g_hash_table_unref (priv->cpt_table); + g_hash_table_unref (priv->known_cids); + + g_ptr_array_unref (priv->xml_dirs); + g_ptr_array_unref (priv->yaml_dirs); + g_ptr_array_unref (priv->icon_dirs); + + g_free (priv->locale); + g_free (priv->current_arch); + + g_strfreev (priv->term_greylist); + + g_free (priv->sys_cache_path); + g_free (priv->user_cache_path); + + G_OBJECT_CLASS (as_pool_parent_class)->finalize (object); +} + +/** + * as_pool_class_init: + **/ +static void +as_pool_class_init (AsPoolClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->finalize = as_pool_finalize; +} + +/** + * as_pool_add_component_internal: + * @pool: An instance of #AsPool + * @cpt: The #AsComponent to add to the pool. + * @pedantic_noadd: If %TRUE, always emit an error if component couldn't be added. + * @error: A #GError or %NULL + * + * Internal. + */ +static gboolean +as_pool_add_component_internal (AsPool *pool, AsComponent *cpt, gboolean pedantic_noadd, GError **error) +{ + const gchar *cdid = NULL; + AsComponent *existing_cpt; + gint pool_priority; + AsOriginKind new_cpt_orig_kind; + AsOriginKind existing_cpt_orig_kind; + AsPoolPrivate *priv = GET_PRIVATE (pool); + + cdid = as_component_get_data_id (cpt); + if (as_component_is_ignored (cpt)) { + if (pedantic_noadd) + g_set_error (error, + AS_POOL_ERROR, + AS_POOL_ERROR_FAILED, + "Skipping '%s' from inclusion into the pool: Component is ignored.", cdid); + return FALSE; + } + + new_cpt_orig_kind = as_component_get_origin_kind (cpt); + + existing_cpt = g_hash_table_lookup (priv->cpt_table, cdid); + if (as_component_get_origin_kind (cpt) == AS_ORIGIN_KIND_DESKTOP_ENTRY) { + g_autofree gchar *tmp_cdid = NULL; + + /* .desktop entries might map to existing metadata data with or without .desktop suffix, we need to check for that. + * (the .desktop suffix is optional for desktop-application metainfo files, and the desktop-entry parser will automatically + * omit it if the desktop-entry-id is following the reverse DNS scheme) + */ + if (existing_cpt == NULL) { + tmp_cdid = g_strdup_printf ("%s.desktop", cdid); + existing_cpt = g_hash_table_lookup (priv->cpt_table, tmp_cdid); + } + + if (existing_cpt != NULL) { + if (as_component_get_origin_kind (existing_cpt) != AS_ORIGIN_KIND_DESKTOP_ENTRY) { + /* discard this component if we have better data already in the pool, + * which is basically anything *but* data from a .desktop file */ + g_debug ("Ignored .desktop metadata for '%s': Better data exists.", cdid); + return FALSE; + } + } + } + + if (existing_cpt == NULL) { + g_hash_table_insert (priv->cpt_table, + g_strdup (cdid), + g_object_ref (cpt)); + g_hash_table_add (priv->known_cids, + g_strdup (as_component_get_id (cpt))); + return TRUE; + } + + /* safety check so we don't ignore a good component because we added a bad one first */ + if (!as_component_is_valid (existing_cpt)) { + g_debug ("Replacing invalid component '%s' with new one.", cdid); + g_hash_table_replace (priv->cpt_table, + g_strdup (cdid), + g_object_ref (cpt)); + return TRUE; + } + + existing_cpt_orig_kind = as_component_get_origin_kind (existing_cpt); + + /* always replace data from .desktop entries */ + if (existing_cpt_orig_kind == AS_ORIGIN_KIND_DESKTOP_ENTRY) { + if (new_cpt_orig_kind == AS_ORIGIN_KIND_METAINFO) { + /* do an append-merge to ensure the data from an exusting metainfo file has an icon */ + as_component_merge_with_mode (cpt, + existing_cpt, + AS_MERGE_KIND_APPEND); + + g_hash_table_replace (priv->cpt_table, + g_strdup (cdid), + g_object_ref (cpt)); + g_debug ("Replaced '%s' with data from metainfo and desktop-entry file.", cdid); + return TRUE; + } else { + as_component_set_priority (existing_cpt, -G_MAXINT); + } + } + + /* merge desktop-entry data in, if we already have existing data from a metainfo file */ + if (new_cpt_orig_kind == AS_ORIGIN_KIND_DESKTOP_ENTRY) { + if (existing_cpt_orig_kind == AS_ORIGIN_KIND_METAINFO) { + /* do an append-merge to ensure the metainfo file has an icon */ + as_component_merge_with_mode (existing_cpt, + cpt, + AS_MERGE_KIND_APPEND); + g_debug ("Merged desktop-entry data into metainfo data for '%s'.", cdid); + return TRUE; + } + } + + /* check whether we should prefer data from metainfo files over preexisting data */ + if ((priv->prefer_local_metainfo) && + (new_cpt_orig_kind == AS_ORIGIN_KIND_METAINFO)) { + /* update package info, metainfo files do never have this data. + * (we hope that collection data was loaded first here, so the existing_cpt already contains + * the information we want - if that's not the case, no harm is done here) */ + as_component_set_pkgnames (cpt, as_component_get_pkgnames (existing_cpt)); + + g_hash_table_replace (priv->cpt_table, + g_strdup (cdid), + g_object_ref (cpt)); + g_debug ("Replaced '%s' with data from metainfo file.", cdid); + return TRUE; + } + + /* perform metadata merges if necessary */ + if (as_component_get_merge_kind (cpt) != AS_MERGE_KIND_NONE) { + g_autoptr(GPtrArray) matches = NULL; + guint i; + + /* we merge the data into all components with matching IDs at time */ + matches = as_pool_get_components_by_id (pool, + as_component_get_id (cpt)); + for (i = 0; i < matches->len; i++) { + AsComponent *match = AS_COMPONENT (g_ptr_array_index (matches, i)); + as_component_merge (match, cpt); + } + + return TRUE; + } + + /* if we are here, we might have duplicates and no merges, so check if we should replace a component + * with data of higher priority, or if we have an actual error in the metadata */ + pool_priority = as_component_get_priority (existing_cpt); + if (pool_priority < as_component_get_priority (cpt)) { + g_hash_table_replace (priv->cpt_table, + g_strdup (cdid), + g_object_ref (cpt)); + g_debug ("Replaced '%s' with data of higher priority.", cdid); + } else { + /* bundles are treated specially here */ + if ((!as_component_has_bundle (existing_cpt)) && (as_component_has_bundle (cpt))) { + GPtrArray *bundles; + /* propagate bundle information to existing component */ + bundles = as_component_get_bundles (cpt); + as_component_set_bundles_array (existing_cpt, bundles); + return TRUE; + } + + /* experimental multiarch support */ + if (as_component_get_architecture (cpt) != NULL) { + if (as_arch_compatible (as_component_get_architecture (cpt), priv->current_arch)) { + const gchar *earch; + /* this component is compatible with our current architecture */ + + earch = as_component_get_architecture (existing_cpt); + if (earch != NULL) { + if (as_arch_compatible (earch, priv->current_arch)) { + g_hash_table_replace (priv->cpt_table, + g_strdup (cdid), + g_object_ref (cpt)); + g_debug ("Preferred component for native architecture for %s (was %s)", cdid, earch); + return TRUE; + } else { + g_debug ("Ignored additional entry for '%s' on architecture %s.", cdid, earch); + return FALSE; + } + } + } + } + + if (pool_priority == as_component_get_priority (cpt)) { + g_set_error (error, + AS_POOL_ERROR, + AS_POOL_ERROR_COLLISION, + "Detected colliding ids: %s was already added with the same priority.", cdid); + return FALSE; + } else { + if (pedantic_noadd) + g_set_error (error, + AS_POOL_ERROR, + AS_POOL_ERROR_COLLISION, + "Detected colliding ids: %s was already added with a higher priority.", cdid); + return FALSE; + } + } + + return TRUE; +} + +/** + * as_pool_add_component: + * @pool: An instance of #AsPool + * @cpt: The #AsComponent to add to the pool. + * @error: A #GError or %NULL + * + * Register a new component in the AppStream metadata pool. + * + * Returns: %TRUE if the new component was successfully added to the pool. + */ +gboolean +as_pool_add_component (AsPool *pool, AsComponent *cpt, GError **error) +{ + return as_pool_add_component_internal (pool, cpt, TRUE, error); +} + +/** + * as_pool_update_addon_info: + * + * Populate the "extensions" property of an #AsComponent, using the + * "extends" information from other components. + */ +static void +as_pool_update_addon_info (AsPool *pool, AsComponent *cpt) +{ + guint i; + GPtrArray *extends; + AsPoolPrivate *priv = GET_PRIVATE (pool); + + extends = as_component_get_extends (cpt); + if ((extends == NULL) || (extends->len == 0)) + return; + + for (i = 0; i < extends->len; i++) { + AsComponent *extended_cpt; + g_autofree gchar *extended_cdid = NULL; + const gchar *extended_cid = (const gchar*) g_ptr_array_index (extends, i); + + extended_cdid = as_utils_build_data_id (AS_COMPONENT_SCOPE_SYSTEM, "os", + as_utils_get_component_bundle_kind (cpt), + extended_cid); + + extended_cpt = g_hash_table_lookup (priv->cpt_table, extended_cdid); + if (extended_cpt == NULL) { + g_debug ("%s extends %s, but %s was not found.", as_component_get_data_id (cpt), extended_cdid, extended_cdid); + return; + } + + /* don't act if we already have addons */ + if (as_component_get_addons (extended_cpt)->len > 0) + continue; + + as_component_add_addon (extended_cpt, cpt); + } +} + +/** + * as_pool_refine_data: + * + * Automatically refine the data we have about software components in the pool. + * + * Returns: %TRUE if all metadata was used, %FALSE if we skipped some stuff. + */ +static gboolean +as_pool_refine_data (AsPool *pool) +{ + GHashTableIter iter; + gpointer key, value; + GHashTable *refined_cpts; + gboolean ret = TRUE; + AsPoolPrivate *priv = GET_PRIVATE (pool); + + /* since we might remove stuff from the pool, we need a new table to store the result */ + refined_cpts = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + (GDestroyNotify) g_object_unref); + + g_hash_table_iter_init (&iter, priv->cpt_table); + while (g_hash_table_iter_next (&iter, &key, &value)) { + AsComponent *cpt; + const gchar *cdid; + cpt = AS_COMPONENT (value); + cdid = (const gchar*) key; + + /* validate the component */ + if (!as_component_is_valid (cpt)) { + /* we still succeed if the components originates from a .desktop file - + * we care less about them and they generally have bad quality, so some issues + * pop up on pretty much every system */ + if (as_component_get_origin_kind (cpt) == AS_ORIGIN_KIND_DESKTOP_ENTRY) { + g_debug ("Ignored '%s': The component (from a .desktop file) is invalid.", as_component_get_id (cpt)); + } else { + g_debug ("WARNING: Ignored component '%s': The component is invalid.", as_component_get_id (cpt)); + ret = FALSE; + } + continue; + } + + /* add additional data to the component, e.g. external screenshots. Also refines + * the component's icon paths */ + as_component_complete (cpt, + priv->screenshot_service_url, + priv->icon_dirs); + + /* set the "addons" information */ + as_pool_update_addon_info (pool, cpt); + + /* add to results table */ + g_hash_table_insert (refined_cpts, + g_strdup (cdid), + g_object_ref (cpt)); + } + + /* set refined components as new pool content */ + g_hash_table_unref (priv->cpt_table); + priv->cpt_table = refined_cpts; + + return ret; +} + +/** + * as_pool_clear: + * @pool: An #AsPool. + * + * Remove all metadat from the pool. + */ +void +as_pool_clear (AsPool *pool) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + if (g_hash_table_size (priv->cpt_table) > 0) { + /* contents */ + g_hash_table_unref (priv->cpt_table); + priv->cpt_table = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + (GDestroyNotify) g_object_unref); + + /* cid info set */ + g_hash_table_unref (priv->known_cids); + priv->known_cids = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + NULL); + } +} + +/** + * as_pool_ctime_newer: + * + * Returns: %TRUE if ctime of file is newer than the cached time. + */ +static gboolean +as_pool_ctime_newer (AsPool *pool, const gchar *dir) +{ + struct stat sb; + AsPoolPrivate *priv = GET_PRIVATE (pool); + + if (stat (dir, &sb) < 0) + return FALSE; + + if (sb.st_ctime > priv->cache_ctime) + return TRUE; + + return FALSE; +} + +/** + * as_pool_appstream_data_changed: + */ +static gboolean +as_pool_metadata_changed (AsPool *pool) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + guint i; + + for (i = 0; i < priv->xml_dirs->len; i++) { + const gchar *dir = (const gchar*) g_ptr_array_index (priv->xml_dirs, i); + if (as_pool_ctime_newer (pool, dir)) + return TRUE; + } + for (i = 0; i < priv->yaml_dirs->len; i++) { + const gchar *dir = (const gchar*) g_ptr_array_index (priv->yaml_dirs, i); + if (as_pool_ctime_newer (pool, dir)) + return TRUE; + } + + return FALSE; +} + +/** + * as_pool_load_collection_data: + * + * Load fresh metadata from AppStream collection data directories. + */ +static gboolean +as_pool_load_collection_data (AsPool *pool, gboolean refresh, GError **error) +{ + GPtrArray *cpts; + g_autoptr(GPtrArray) merge_cpts = NULL; + guint i; + gboolean ret; + g_autoptr(AsMetadata) metad = NULL; + g_autoptr(GPtrArray) mdata_files = NULL; + GError *tmp_error = NULL; + AsPoolPrivate *priv = GET_PRIVATE (pool); + + /* see if we can use the caches */ + if (!refresh) { + if (!as_pool_metadata_changed (pool)) { + g_autofree gchar *fname = NULL; + g_debug ("Caches are up to date."); + + if (as_flags_contains (priv->cache_flags, AS_CACHE_FLAG_USE_SYSTEM)) { + g_debug ("Using cached data."); + + fname = g_strdup_printf ("%s/%s.gvz", priv->sys_cache_path, priv->locale); + if (g_file_test (fname, G_FILE_TEST_EXISTS)) { + return as_pool_load_cache_file (pool, fname, error); + } else { + g_debug ("Missing cache for language '%s', attempting to load fresh data.", priv->locale); + } + } else { + g_debug ("Not using system cache."); + } + } + } + + /* prepare metadata parser */ + metad = as_metadata_new (); + as_metadata_set_format_style (metad, AS_FORMAT_STYLE_COLLECTION); + as_metadata_set_locale (metad, priv->locale); + + /* find AppStream metadata */ + ret = TRUE; + mdata_files = g_ptr_array_new_with_free_func (g_free); + + /* find XML data */ + for (i = 0; i < priv->xml_dirs->len; i++) { + const gchar *xml_path = (const gchar *) g_ptr_array_index (priv->xml_dirs, i); + guint j; + + if (g_file_test (xml_path, G_FILE_TEST_IS_DIR)) { + g_autoptr(GPtrArray) xmls = NULL; + + g_debug ("Searching for data in: %s", xml_path); + xmls = as_utils_find_files_matching (xml_path, "*.xml*", FALSE, NULL); + if (xmls != NULL) { + for (j = 0; j < xmls->len; j++) { + const gchar *val; + val = (const gchar *) g_ptr_array_index (xmls, j); + g_ptr_array_add (mdata_files, + g_strdup (val)); + } + } + } + } + + /* find YAML metadata */ + for (i = 0; i < priv->yaml_dirs->len; i++) { + const gchar *yaml_path = (const gchar *) g_ptr_array_index (priv->yaml_dirs, i); + guint j; + + if (g_file_test (yaml_path, G_FILE_TEST_IS_DIR)) { + g_autoptr(GPtrArray) yamls = NULL; + + g_debug ("Searching for data in: %s", yaml_path); + yamls = as_utils_find_files_matching (yaml_path, "*.yml*", FALSE, NULL); + if (yamls != NULL) { + for (j = 0; j < yamls->len; j++) { + const gchar *val; + val = (const gchar *) g_ptr_array_index (yamls, j); + g_ptr_array_add (mdata_files, + g_strdup (val)); + } + } + } + } + + /* parse the found data */ + for (i = 0; i < mdata_files->len; i++) { + g_autoptr(GFile) infile = NULL; + const gchar *fname; + + fname = (const gchar*) g_ptr_array_index (mdata_files, i); + g_debug ("Reading: %s", fname); + + infile = g_file_new_for_path (fname); + if (!g_file_query_exists (infile, NULL)) { + g_warning ("Metadata file '%s' does not exist.", fname); + continue; + } + + as_metadata_parse_file (metad, + infile, + AS_FORMAT_KIND_UNKNOWN, + &tmp_error); + if (tmp_error != NULL) { + g_debug ("WARNING: %s", tmp_error->message); + g_error_free (tmp_error); + tmp_error = NULL; + ret = FALSE; + + if (error != NULL) { + if (*error == NULL) + g_set_error_literal (error, + AS_POOL_ERROR, + AS_POOL_ERROR_FAILED, + fname); + else + g_prefix_error (error, "%s, ", fname); + } + } + } + + /* finalize error message, if we had errors */ + if ((error != NULL) && (*error != NULL)) + g_prefix_error (error, "%s ", _("Metadata files have errors:")); + + /* add found components to the metadata pool */ + cpts = as_metadata_get_components (metad); + merge_cpts = g_ptr_array_new (); + for (i = 0; i < cpts->len; i++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + + /* TODO: We support only system components at time */ + as_component_set_scope (cpt, AS_COMPONENT_SCOPE_SYSTEM); + + /* deal with merge-components later */ + if (as_component_get_merge_kind (cpt) != AS_MERGE_KIND_NONE) { + g_ptr_array_add (merge_cpts, cpt); + continue; + } + + as_pool_add_component (pool, cpt, &tmp_error); + if (tmp_error != NULL) { + g_debug ("Metadata ignored: %s", tmp_error->message); + g_error_free (tmp_error); + tmp_error = NULL; + } + } + + /* we need to merge the merge-components into the pool last, so the merge process can fetch + * all components with matching IDs from the pool */ + for (i = 0; i < merge_cpts->len; i++) { + AsComponent *mcpt = AS_COMPONENT (g_ptr_array_index (merge_cpts, i)); + + as_pool_add_component (pool, mcpt, &tmp_error); + if (tmp_error != NULL) { + g_debug ("Merge component ignored: %s", tmp_error->message); + g_error_free (tmp_error); + tmp_error = NULL; + } + } + + return ret; +} + +/** + * as_pool_load_metainfo_data: + * + * Load fresh metadata from metainfo files. + */ +static void +as_pool_load_metainfo_data (AsPool *pool) +{ + guint i; + g_autoptr(AsMetadata) metad = NULL; + g_autoptr(GPtrArray) mi_files = NULL; + GPtrArray *cpts; + GError *error = NULL; + AsPoolPrivate *priv = GET_PRIVATE (pool); + + /* prepare metadata parser */ + metad = as_metadata_new (); + as_metadata_set_locale (metad, priv->locale); + + /* find metainfo files */ + g_debug ("Searching for data in: %s", METAINFO_DIR); + mi_files = as_utils_find_files_matching (METAINFO_DIR, "*.xml", FALSE, NULL); + if (mi_files == NULL) { + g_debug ("Unable find metainfo files."); + return; + } + + /* parse the found data */ + for (i = 0; i < mi_files->len; i++) { + g_autoptr(GFile) infile = NULL; + const gchar *fname = (const gchar*) g_ptr_array_index (mi_files, i); + + if (!priv->prefer_local_metainfo) { + g_autofree gchar *mi_cid = NULL; + + mi_cid = g_path_get_basename (fname); + if (g_str_has_suffix (mi_cid, ".metainfo.xml")) + mi_cid[strlen (mi_cid) - 13] = '\0'; + if (g_str_has_suffix (mi_cid, ".appdata.xml")) { + g_autofree gchar *mi_cid_desktop = NULL; + mi_cid[strlen (mi_cid) - 12] = '\0'; + + mi_cid_desktop = g_strdup_printf ("%s.desktop", mi_cid); + /* check with .desktop suffix too */ + if (!g_hash_table_contains (priv->known_cids, mi_cid_desktop)) { + g_debug ("Skipped: %s (already known)", fname); + continue; + } + } + + /* quickly check if we know the component already */ + if (!g_hash_table_contains (priv->known_cids, mi_cid)) { + g_debug ("Skipped: %s (already known)", fname); + continue; + } + } + + g_debug ("Reading: %s", fname); + infile = g_file_new_for_path (fname); + if (!g_file_query_exists (infile, NULL)) { + g_warning ("Metadata file '%s' does not exist.", fname); + continue; + } + + as_metadata_parse_file (metad, + infile, + AS_FORMAT_KIND_UNKNOWN, + &error); + if (error != NULL) { + g_debug ("WARNING: %s", error->message); + g_error_free (error); + error = NULL; + } + } + + /* add found components to the metadata pool */ + cpts = as_metadata_get_components (metad); + for (i = 0; i < cpts->len; i++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + + /* We only read metainfo files from system directories */ + as_component_set_scope (cpt, AS_COMPONENT_SCOPE_SYSTEM); + + as_pool_add_component_internal (pool, cpt, FALSE, &error); + if (error != NULL) { + g_debug ("Metadata ignored: %s", error->message); + g_error_free (error); + error = NULL; + } + } +} + +/** + * as_pool_load_desktop_entries: + * + * Load fresh metadata from .desktop files. + */ +static void +as_pool_load_desktop_entries (AsPool *pool) +{ + guint i; + g_autoptr(AsMetadata) metad = NULL; + g_autoptr(GPtrArray) de_files = NULL; + GPtrArray *cpts; + GError *error = NULL; + AsPoolPrivate *priv = GET_PRIVATE (pool); + + /* prepare metadata parser */ + metad = as_metadata_new (); + as_metadata_set_locale (metad, priv->locale); + + /* find .desktop files */ + g_debug ("Searching for data in: %s", APPLICATIONS_DIR); + de_files = as_utils_find_files_matching (APPLICATIONS_DIR, "*.desktop", FALSE, NULL); + if (de_files == NULL) { + g_debug ("Unable find .desktop files."); + return; + } + + /* parse the found data */ + for (i = 0; i < de_files->len; i++) { + g_autoptr(GFile) infile = NULL; + const gchar *fname = (const gchar*) g_ptr_array_index (de_files, i); + + /* quickly check if we know the component already + * We do not do this when reading metainfo files, since in that case we might + * need to extend their data with .desktop file data. */ + if (!as_flags_contains (priv->flags, AS_POOL_FLAG_READ_METAINFO)) { + g_autofree gchar *de_cid = g_path_get_basename (fname); + + if (!g_hash_table_contains (priv->known_cids, de_cid)) { + g_debug ("Skipped: %s (already known)", fname); + continue; + } + + /* check without .desktop suffix too */ + if (g_str_has_suffix (de_cid, ".desktop")) { + de_cid[strlen (de_cid) - 8] = '\0'; + if (!g_hash_table_contains (priv->known_cids, de_cid)) { + g_debug ("Skipped: %s (already known)", fname); + continue; + } + } + } + + g_debug ("Reading: %s", fname); + infile = g_file_new_for_path (fname); + if (!g_file_query_exists (infile, NULL)) { + g_warning ("Metadata file '%s' does not exist.", fname); + continue; + } + + as_metadata_parse_file (metad, + infile, + AS_FORMAT_KIND_UNKNOWN, + &error); + if (error != NULL) { + g_debug ("WARNING: %s", error->message); + g_error_free (error); + error = NULL; + } + } + + /* add found components to the metadata pool */ + cpts = as_metadata_get_components (metad); + for (i = 0; i < cpts->len; i++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + + /* We only read .desktop files from system directories at time */ + as_component_set_scope (cpt, AS_COMPONENT_SCOPE_SYSTEM); + + as_pool_add_component_internal (pool, cpt, FALSE, &error); + if (error != NULL) { + g_debug ("Metadata ignored: %s", error->message); + g_error_free (error); + error = NULL; + } + } +} + +/** + * as_pool_load: + * @pool: An instance of #AsPool. + * @error: A #GError or %NULL. + * + * Builds an index of all found components in the watched locations. + * The function will try to get as much data into the pool as possible, so even if + * the update completes with %FALSE, it might still have added components to the pool. + * + * The function will load from all possible data sources, preferring caches if they + * are up to date. + * + * Returns: %TRUE if update completed without error. + **/ +gboolean +as_pool_load (AsPool *pool, GCancellable *cancellable, GError **error) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + gboolean ret = TRUE; + + /* load means to reload, so we get rid of all the old data */ + as_pool_clear (pool); + + /* read all AppStream metadata that we can find */ + if (as_flags_contains (priv->flags, AS_POOL_FLAG_READ_COLLECTION)) + ret = as_pool_load_collection_data (pool, FALSE, error); + + /* read all metainfo files that we can find */ + if (as_flags_contains (priv->flags, AS_POOL_FLAG_READ_METAINFO)) + as_pool_load_metainfo_data (pool); + + /* read all .desktop file data that we can find */ + if (as_flags_contains (priv->flags, AS_POOL_FLAG_READ_DESKTOP_FILES)) + as_pool_load_desktop_entries (pool); + + /* automatically refine the metadata we have in the pool */ + ret = as_pool_refine_data (pool) && ret; + + return ret; +} + +/** + * as_pool_load_cache_file: + * @pool: An instance of #AsPool. + * @fname: Filename of the cache file to load into the pool. + * @error: A #GError or %NULL. + * + * Load AppStream metadata from a cache file. + */ +gboolean +as_pool_load_cache_file (AsPool *pool, const gchar *fname, GError **error) +{ + g_autoptr(GPtrArray) cpts = NULL; + guint i; + GError *tmp_error = NULL; + + /* load list of components in cache */ + cpts = as_cache_file_read (fname, &tmp_error); + if (tmp_error != NULL) { + g_propagate_error (error, tmp_error); + return FALSE; + } + + /* add cache objects to the pool */ + for (i = 0; i < cpts->len; i++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + + /* TODO: Caches are system wide only at time, so we only have system-scope components in there */ + as_component_set_scope (cpt, AS_COMPONENT_SCOPE_SYSTEM); + + as_pool_add_component (pool, cpt, &tmp_error); + if (tmp_error != NULL) { + g_warning ("Cached data ignored: %s", tmp_error->message); + g_error_free (tmp_error); + tmp_error = NULL; + continue; + } + } + + /* find addons for the loaded components */ + for (i = 0; i < cpts->len; i++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + + /* find and reference addons */ + as_pool_update_addon_info (pool, cpt); + } + + /* NOTE: Caches don't have merge components, so we don't need to special-case them here */ + + return TRUE; +} + +/** + * as_pool_save_cache_file: + * @pool: An instance of #AsPool. + * @fname: Filename of the cache file the pool contents should be dumped to. + * @error: A #GError or %NULL. + * + * Serialize AppStream metadata to a cache file. + */ +gboolean +as_pool_save_cache_file (AsPool *pool, const gchar *fname, GError **error) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + g_autoptr(GPtrArray) cpts = NULL; + + cpts = as_pool_get_components (pool); + as_cache_file_save (fname, priv->locale, cpts, error); + g_ptr_array_unref (cpts); + + return TRUE; +} + +/** + * as_pool_get_components: + * @pool: An instance of #AsPool. + * + * Get a list of found components. + * + * Returns: (transfer container) (element-type AsComponent): an array of #AsComponent instances. + */ +GPtrArray* +as_pool_get_components (AsPool *pool) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + GHashTableIter iter; + gpointer value; + GPtrArray *cpts; + + cpts = g_ptr_array_new_with_free_func (g_object_unref); + g_hash_table_iter_init (&iter, priv->cpt_table); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + AsComponent *cpt = AS_COMPONENT (value); + g_ptr_array_add (cpts, g_object_ref (cpt)); + } + + return cpts; +} + +/** + * as_pool_get_components_by_id: + * @pool: An instance of #AsPool. + * @cid: The AppStream-ID to look for. + * + * Get a specific component by its ID. + * This function may contain multiple results if we have + * data describing this component from multiple scopes/origin types. + * + * Returns: (transfer container) (element-type AsComponent): An #AsComponent + */ +GPtrArray* +as_pool_get_components_by_id (AsPool *pool, const gchar *cid) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + GPtrArray *result; + GHashTableIter iter; + gpointer value; + + result = g_ptr_array_new_with_free_func (g_object_unref); + if (cid == NULL) + return result; + + g_hash_table_iter_init (&iter, priv->cpt_table); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + AsComponent *cpt = AS_COMPONENT (value); + if (g_strcmp0 (as_component_get_id (cpt), cid) == 0) + g_ptr_array_add (result, + g_object_ref (cpt)); + } + + return result; +} + +/** + * as_pool_get_components_by_provided_item: + * @pool: An instance of #AsPool. + * @kind: An #AsProvidesKind + * @item: The value of the provided item. + * + * Find components in the AppStream data pool which provide a certain item. + * + * Returns: (transfer container) (element-type AsComponent): an array of #AsComponent objects which have been found. + */ +GPtrArray* +as_pool_get_components_by_provided_item (AsPool *pool, + AsProvidedKind kind, + const gchar *item) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + GHashTableIter iter; + gpointer value; + GPtrArray *results; + + /* sanity check */ + g_return_val_if_fail (item != NULL, NULL); + + results = g_ptr_array_new_with_free_func (g_object_unref); + g_hash_table_iter_init (&iter, priv->cpt_table); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + GPtrArray *provided = NULL; + guint i; + AsComponent *cpt = AS_COMPONENT (value); + + provided = as_component_get_provided (cpt); + for (i = 0; i < provided->len; i++) { + AsProvided *prov = AS_PROVIDED (g_ptr_array_index (provided, i)); + if (kind != AS_PROVIDED_KIND_UNKNOWN) { + /* check if the kind matches. an unknown kind matches all provides types */ + if (as_provided_get_kind (prov) != kind) + continue; + } + + if (as_provided_has_item (prov, item)) + g_ptr_array_add (results, g_object_ref (cpt)); + } + } + + return results; +} + +/** + * as_pool_get_components_by_kind: + * @pool: An instance of #AsDatabase. + * @kind: An #AsComponentKind. + * + * Return a list of all components in the pool which are of a certain kind. + * + * Returns: (transfer container) (element-type AsComponent): an array of #AsComponent objects which have been found. + */ +GPtrArray* +as_pool_get_components_by_kind (AsPool *pool, AsComponentKind kind) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + GHashTableIter iter; + gpointer value; + GPtrArray *results; + + /* sanity check */ + g_return_val_if_fail ((kind < AS_COMPONENT_KIND_LAST) && (kind > AS_COMPONENT_KIND_UNKNOWN), NULL); + + results = g_ptr_array_new_with_free_func (g_object_unref); + g_hash_table_iter_init (&iter, priv->cpt_table); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + AsComponent *cpt = AS_COMPONENT (value); + + if (as_component_get_kind (cpt) == kind) + g_ptr_array_add (results, g_object_ref (cpt)); + } + + return results; +} + +/** + * as_pool_get_components_by_categories: + * @pool: An instance of #AsDatabase. + * @categories: An array of XDG categories to include. + * + * Return a list of components which are in one of the categories. + * + * Returns: (transfer container) (element-type AsComponent): an array of #AsComponent objects which have been found. + */ +GPtrArray* +as_pool_get_components_by_categories (AsPool *pool, gchar **categories) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + GHashTableIter iter; + gpointer value; + guint i; + GPtrArray *results; + + results = g_ptr_array_new_with_free_func (g_object_unref); + + /* sanity check */ + for (i = 0; categories[i] != NULL; i++) { + if (!as_utils_is_category_name (categories[i])) { + g_warning ("'%s' is not a valid XDG category name, search results might be invalid or empty.", categories[i]); + } + } + + g_hash_table_iter_init (&iter, priv->cpt_table); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + AsComponent *cpt = AS_COMPONENT (value); + + for (i = 0; categories[i] != NULL; i++) { + if (as_component_has_category (cpt, categories[i])) + g_ptr_array_add (results, g_object_ref (cpt)); + } + } + + return results; +} + +/** + * as_pool_get_components_by_launchable: + * @pool: An instance of #AsPool. + * @kind: An #AsLaunchableKind + * @id: The ID of the launchable. + * + * Find components in the AppStream data pool which provide a specific launchable. + * See #AsLaunchable for details on launchables, or refer to the AppStream specification. + * + * Returns: (transfer container) (element-type AsComponent): an array of #AsComponent objects which have been found. + * + * Since: 0.11.4 + */ +GPtrArray* +as_pool_get_components_by_launchable (AsPool *pool, + AsLaunchableKind kind, + const gchar *id) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + GHashTableIter iter; + gpointer value; + GPtrArray *results; + + /* sanity check */ + g_return_val_if_fail (id != NULL, NULL); + + results = g_ptr_array_new_with_free_func (g_object_unref); + g_hash_table_iter_init (&iter, priv->cpt_table); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + GPtrArray *launchables = NULL; + guint i; + AsComponent *cpt = AS_COMPONENT (value); + + launchables = as_component_get_launchables (cpt); + for (i = 0; i < launchables->len; i++) { + guint j; + GPtrArray *entries; + AsLaunchable *launch = AS_LAUNCHABLE (g_ptr_array_index (launchables, i)); + + if (kind != AS_LAUNCHABLE_KIND_UNKNOWN) { + /* check if the kind matches. an unknown kind matches all provides types */ + if (as_launchable_get_kind (launch) != kind) + continue; + } + + entries = as_launchable_get_entries (launch); + for (j = 0; j < entries->len; j++) { + if (g_strcmp0 ((const gchar*) g_ptr_array_index (entries, j), id) == 0) + g_ptr_array_add (results, g_object_ref (cpt)); + } + } + } + + return results; +} + +/** + * as_pool_build_search_terms: + * + * Build an array of search terms from a search string and improve the search terms + * slightly, by stripping whitespaces, casefolding the terms and removing greylist words. + */ +static gchar** +as_pool_build_search_terms (AsPool *pool, const gchar *search) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + g_autoptr(AsStemmer) stemmer = NULL; + g_autofree gchar *tmp_str = NULL; + g_auto(GStrv) strv = NULL; + gchar **terms; + guint i; + guint idx; + + if (search == NULL) + return NULL; + tmp_str = g_utf8_casefold (search, -1); + + /* filter query by greylist (to avoid overly generic search terms) */ + for (i = 0; priv->term_greylist[i] != NULL; i++) { + gchar *str; + str = as_str_replace (tmp_str, priv->term_greylist[i], ""); + g_free (tmp_str); + tmp_str = str; + } + + /* restore query if it was just greylist words */ + if (g_strcmp0 (tmp_str, "") == 0) { + g_debug ("grey-list replaced all terms, restoring"); + g_free (tmp_str); + tmp_str = g_utf8_casefold (search, -1); + } + + /* we have to strip the leading and trailing whitespaces to avoid having + * different results for e.g. 'font ' and 'font' (LP: #506419) + */ + g_strstrip (tmp_str); + + strv = g_strsplit (tmp_str, " ", -1); + terms = g_new0 (gchar *, g_strv_length (strv) + 1); + idx = 0; + stemmer = g_object_ref (as_stemmer_get ()); + for (i = 0; strv[i] != NULL; i++) { + if (!as_utils_search_token_valid (strv[i])) + continue; + /* stem the string and add it to terms */ + terms[idx++] = as_stemmer_stem (stemmer, strv[i]); + } + /* if we have no valid terms, return NULL */ + if (idx == 0) { + g_free (terms); + return NULL; + } + + return terms; +} + +/** + * as_sort_components_by_score_cb: + * + * Helper method to sort result arrays by the #AsComponent match score + * with higher scores appearing higher in the list. + */ +static gint +as_sort_components_by_score_cb (gconstpointer a, gconstpointer b) +{ + guint s1, s2; + AsComponent *cpt1 = *((AsComponent **) a); + AsComponent *cpt2 = *((AsComponent **) b); + s1 = as_component_get_sort_score (cpt1); + s2 = as_component_get_sort_score (cpt2); + + if (s1 > s2) + return -1; + if (s1 < s2) + return 1; + return 0; +} + +/** + * as_pool_search: + * @pool: An instance of #AsPool + * @search: A search string + * + * Search for a list of components matching the search terms. + * The list will be ordered by match score. + * + * Returns: (transfer container) (element-type AsComponent): an array of the found #AsComponent objects. + * + * Since: 0.9.7 + */ +GPtrArray* +as_pool_search (AsPool *pool, const gchar *search) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + g_auto(GStrv) terms = NULL; + GPtrArray *results; + GHashTableIter iter; + gpointer value; + + /* sanitize user's search term */ + terms = as_pool_build_search_terms (pool, search); + results = g_ptr_array_new_with_free_func (g_object_unref); + + if (terms == NULL) { + g_debug ("Search term invalid. Matching everything."); + } else { + g_autofree gchar *tmp_str = NULL; + tmp_str = g_strjoinv (" ", terms); + g_debug ("Searching for: %s", tmp_str); + } + + g_hash_table_iter_init (&iter, priv->cpt_table); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + guint score; + AsComponent *cpt = AS_COMPONENT (value); + + score = as_component_search_matches_all (cpt, terms); + if (score == 0) + continue; + + g_ptr_array_add (results, g_object_ref (cpt)); + } + + /* sort the results by their priority */ + g_ptr_array_sort (results, as_sort_components_by_score_cb); + + return results; +} + +/** + * as_pool_refresh_cache: + * @pool: An instance of #AsPool. + * @force: Enforce refresh, even if source data has not changed. + * + * Update the AppStream cache. There is normally no need to call this function manually, because cache updates are handled + * transparently in the background. + * + * Returns: %TRUE if the cache was updated, %FALSE on error or if the cache update was not necessary and has been skipped. + */ +gboolean +as_pool_refresh_cache (AsPool *pool, gboolean force, GError **error) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + gboolean ret = FALSE; + gboolean ret_poolupdate; + g_autofree gchar *cache_fname = NULL; + g_autoptr(GError) data_load_error = NULL; + g_autoptr(GError) tmp_error = NULL; + + /* try to create cache directory, in case it doesn't exist */ + g_mkdir_with_parents (priv->sys_cache_path, 0755); + if (!as_utils_is_writable (priv->sys_cache_path)) { + g_set_error (error, + AS_POOL_ERROR, + AS_POOL_ERROR_TARGET_NOT_WRITABLE, + _("Cache location '%s' is not writable."), priv->sys_cache_path); + return FALSE; + } + + /* collect metadata */ +#ifdef HAVE_APT_SUPPORT + /* currently, we only do something here if we are running with explicit APT support compiled in */ + as_pool_scan_apt (pool, force, &tmp_error); + if (tmp_error != NULL) { + /* the exact error is not forwarded here, since we might be able to partially update the cache */ + g_warning ("Error while collecting metadata: %s", tmp_error->message); + g_error_free (tmp_error); + tmp_error = NULL; + } +#endif + + /* create the filename of our cache */ + cache_fname = g_strdup_printf ("%s/%s.gvz", priv->sys_cache_path, priv->locale); + + /* check if we need to refresh the cache + * (which is only necessary if the AppStream data has changed) */ + if (!as_pool_metadata_changed (pool)) { + g_debug ("Data did not change, no cache refresh needed."); + if (force) { + g_debug ("Forcing refresh anyway."); + } else { + return FALSE; + } + } + g_debug ("Refreshing AppStream cache"); + + /* ensure we start with an empty pool */ + as_pool_clear (pool); + + /* NOTE: we will only cache AppStream metadata, no .desktop file metadata etc. */ + + /* load AppStream collection metadata only and refine it */ + ret = as_pool_load_collection_data (pool, TRUE, &data_load_error); + ret_poolupdate = as_pool_refine_data (pool) && ret; + if (data_load_error != NULL) + g_debug ("Error while updating the in-memory data pool: %s", data_load_error->message); + + /* save the cache object */ + as_pool_save_cache_file (pool, cache_fname, &tmp_error); + if (tmp_error != NULL) { + /* the exact error is not forwarded here, since we might be able to partially update the cache */ + g_warning ("Error while updating the cache: %s", tmp_error->message); + g_error_free (tmp_error); + tmp_error = NULL; + ret = FALSE; + } else { + ret = TRUE; + } + + if (ret) { + if (!ret_poolupdate) { + g_autofree gchar *error_message = NULL; + if (data_load_error == NULL) + error_message = g_strdup (_("The AppStream system cache was updated, but some errors were detected, which might lead to missing metadata. Refer to the verbose log for more information.")); + else + error_message = g_strdup_printf (_("AppStream system cache was updated, but problems were found: %s"), data_load_error->message); + + g_set_error_literal (error, + AS_POOL_ERROR, + AS_POOL_ERROR_INCOMPLETE, + error_message); + } + /* update the cache mtime, to not needlessly rebuild it again */ + as_touch_location (cache_fname); + as_pool_check_cache_ctime (pool); + } else { + g_set_error (error, + AS_POOL_ERROR, + AS_POOL_ERROR_FAILED, + _("AppStream cache update failed. Turn on verbose mode to get more detailed issue information.")); + } + + return TRUE; +} + +/** + * as_cache_file_save: + * @fname: The file to save the data to. + * @locale: The locale this cache file is for. + * @cpts: (element-type AsComponent): The components to serialize. + * @error: A #GError + * + * Serialize components to a cache file and store it on disk. + */ +void +as_cache_file_save (const gchar *fname, const gchar *locale, GPtrArray *cpts, GError **error) +{ + g_autoptr(GVariant) main_gv = NULL; + g_autoptr(GVariantBuilder) main_builder = NULL; + g_autoptr(GVariantBuilder) builder = NULL; + + g_autoptr(GFile) ofile = NULL; + g_autoptr(GFileOutputStream) file_out = NULL; + g_autoptr(GOutputStream) zout = NULL; + g_autoptr(GZlibCompressor) compressor = NULL; + gboolean serializable_components_found = FALSE; + GError *tmp_error = NULL; + guint cindex; + + if (cpts->len == 0) { + g_debug ("Skipped writing cache file: No components to serialize."); + return; + } + + main_builder = g_variant_builder_new (G_VARIANT_TYPE_VARDICT); + builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY); + + for (cindex = 0; cindex < cpts->len; cindex++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts, cindex)); + + /* sanity checks */ + if (!as_component_is_valid (cpt)) { + /* we should *never* get here, all invalid stuff should be filtered out at this point */ + g_critical ("Skipped component '%s' from inclusion into the cache: The component is invalid.", + as_component_get_id (cpt)); + continue; + } + + if (as_component_get_merge_kind (cpt) != AS_MERGE_KIND_NONE) { + g_debug ("Skipping '%s' from cache inclusion, it is a merge component.", + as_component_get_id (cpt)); + continue; + } + serializable_components_found = TRUE; + + as_component_to_variant (cpt, builder); + } + + /* check if we actually have some valid components serialized to a GVariant */ + if (!serializable_components_found) { + g_debug ("Skipped writing cache file: No valid components found for serialization."); + return; + } + + /* write basic information and add components */ + g_variant_builder_add (main_builder, "{sv}", + "format_version", + g_variant_new_uint32 (CACHE_FORMAT_VERSION)); + g_variant_builder_add (main_builder, "{sv}", + "locale", + as_variant_mstring_new (locale)); + + g_variant_builder_add (main_builder, "{sv}", + "components", + g_variant_builder_end (builder)); + main_gv = g_variant_builder_end (main_builder); + + ofile = g_file_new_for_path (fname); + compressor = g_zlib_compressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP, -1); + file_out = g_file_replace (ofile, + NULL, /* entity-tag */ + FALSE, /* make backup */ + G_FILE_CREATE_REPLACE_DESTINATION, + NULL, /* cancellable */ + error); + if ((error != NULL) && (*error != NULL)) + return; + + zout = g_converter_output_stream_new (G_OUTPUT_STREAM (file_out), G_CONVERTER (compressor)); + if (!g_output_stream_write_all (zout, + g_variant_get_data (main_gv), + g_variant_get_size (main_gv), + NULL, NULL, &tmp_error)) { + g_set_error (error, + AS_POOL_ERROR, + AS_POOL_ERROR_FAILED, + "Failed to write stream: %s", + tmp_error->message); + g_error_free (tmp_error); + return; + } + if (!g_output_stream_close (zout, NULL, &tmp_error)) { + g_set_error (error, + AS_POOL_ERROR, + AS_POOL_ERROR_FAILED, + "Failed to close stream: %s", + tmp_error->message); + g_error_free (tmp_error); + return; + } +} + +/** + * as_cache_read: + * @fname: The file to save the data to. + * @locale: The locale this cache file is for. + * @cpts: (element-type AsComponent): The components to serialize. + * @error: A #GError + * + * Serialize components to a cache file and store it on disk. + */ +GPtrArray* +as_cache_file_read (const gchar *fname, GError **error) +{ + GPtrArray *cpts = NULL; + g_autoptr(GFile) ifile = NULL; + g_autoptr(GInputStream) file_stream = NULL; + g_autoptr(GInputStream) stream_data = NULL; + g_autoptr(GConverter) conv = NULL; + + GByteArray *byte_array; + g_autoptr(GBytes) bytes = NULL; + gssize len; + const gsize buffer_size = 1024 * 32; + g_autofree guint8 *buffer = NULL; + + g_autoptr(GVariant) main_gv = NULL; + g_autoptr(GVariant) cptsv_array = NULL; + g_autoptr(GVariant) cptv = NULL; + g_autoptr(GVariant) gmvar = NULL; + const gchar *locale = NULL; + GVariantIter main_iter; + + ifile = g_file_new_for_path (fname); + + file_stream = G_INPUT_STREAM (g_file_read (ifile, NULL, error)); + if (file_stream == NULL) + return NULL; + + /* decompress the GZip stream */ + conv = G_CONVERTER (g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP)); + stream_data = g_converter_input_stream_new (file_stream, conv); + + buffer = g_malloc (buffer_size); + byte_array = g_byte_array_new (); + while ((len = g_input_stream_read (stream_data, buffer, buffer_size, NULL, error)) > 0) { + g_byte_array_append (byte_array, buffer, len); + } + bytes = g_byte_array_free_to_bytes (byte_array); + + /* check if there was an error */ + if (len < 0) + return NULL; + if ((error != NULL) && (*error != NULL)) + return NULL; + + main_gv = g_variant_new_from_bytes (G_VARIANT_TYPE_VARDICT, bytes, TRUE); + cpts = g_ptr_array_new_with_free_func (g_object_unref); + + gmvar = g_variant_lookup_value (main_gv, + "format_version", + G_VARIANT_TYPE_UINT32); + if ((gmvar == NULL) || (g_variant_get_uint32 (gmvar) != CACHE_FORMAT_VERSION)) { + /* don't try to load incompatible cache versions */ + if (gmvar == NULL) + g_warning ("Skipped loading of broken cache file '%s'.", fname); + else + g_warning ("Skipped loading of incompatible or broken cache file '%s': Format is %i (expected %i)", + fname, g_variant_get_uint32 (gmvar), CACHE_FORMAT_VERSION); + + /* TODO: Maybe emit a proper GError? */ + return NULL; + } + + g_variant_unref (gmvar); + gmvar = g_variant_lookup_value (main_gv, + "locale", + G_VARIANT_TYPE_MAYBE); + locale = as_variant_get_mstring (&gmvar); + + cptsv_array = g_variant_lookup_value (main_gv, + "components", + G_VARIANT_TYPE_ARRAY); + + g_variant_iter_init (&main_iter, cptsv_array); + while ((cptv = g_variant_iter_next_value (&main_iter))) { + g_autoptr(AsComponent) cpt = as_component_new (); + if (as_component_set_from_variant (cpt, cptv, locale)) { + /* add to result list */ + if (as_component_is_valid (cpt)) { + g_ptr_array_add (cpts, g_object_ref (cpt)); + } else { + g_autofree gchar *str = as_component_to_string (cpt); + g_warning ("Ignored serialized component: %s", str); + } + } + } + + return cpts; +} + +/** + * as_pool_set_locale: + * @pool: An instance of #AsPool. + * @locale: the locale. + * + * Sets the current locale which should be used when parsing metadata. + **/ +void +as_pool_set_locale (AsPool *pool, const gchar *locale) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + g_free (priv->locale); + priv->locale = g_strdup (locale); +} + +/** + * as_pool_get_locale: + * @pool: An instance of #AsPool. + * + * Gets the currently used locale. + * + * Returns: Locale used for metadata parsing. + **/ +const gchar * +as_pool_get_locale (AsPool *pool) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + return priv->locale; +} + +/** + * as_pool_add_metadata_location_internal: + * @pool: An instance of #AsPool. + * @directory: An existing filesystem location. + * @add_root: Whether to add the root directory if necessary. + * + * See %as_pool_add_metadata_location() + */ +static void +as_pool_add_metadata_location_internal (AsPool *pool, const gchar *directory, gboolean add_root) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + gboolean dir_added = FALSE; + gchar *path; + + if (!g_file_test (directory, G_FILE_TEST_IS_DIR)) { + g_debug ("Not adding metadata location '%s': Is no directory", directory); + return; + } + + /* metadata locations */ + path = g_build_filename (directory, "xml", NULL); + if (g_file_test (path, G_FILE_TEST_IS_DIR)) { + g_ptr_array_add (priv->xml_dirs, path); + dir_added = TRUE; + g_debug ("Added %s to XML metadata search path.", path); + } else { + g_free (path); + } + + path = g_build_filename (directory, "xmls", NULL); + if (g_file_test (path, G_FILE_TEST_IS_DIR)) { + g_ptr_array_add (priv->xml_dirs, path); + dir_added = TRUE; + g_debug ("Added %s to XML metadata search path.", path); + } else { + g_free (path); + } + + path = g_build_filename (directory, "yaml", NULL); + if (g_file_test (path, G_FILE_TEST_IS_DIR)) { + g_ptr_array_add (priv->yaml_dirs, path); + dir_added = TRUE; + g_debug ("Added %s to YAML metadata search path.", path); + } else { + g_free (path); + } + + if ((add_root) && (!dir_added)) { + /* we didn't find metadata-specific directories, so let's watch to root path for both YAML and XML */ + g_ptr_array_add (priv->xml_dirs, g_strdup (directory)); + g_ptr_array_add (priv->yaml_dirs, g_strdup (directory)); + g_debug ("Added %s to all metadata search paths.", directory); + } + + /* icons */ + path = g_build_filename (directory, "icons", NULL); + if (g_file_test (path, G_FILE_TEST_IS_DIR)) + g_ptr_array_add (priv->icon_dirs, path); + else + g_free (path); + +} + +/** + * as_pool_add_metadata_location: + * @pool: An instance of #AsPool. + * @directory: An existing filesystem location. + * + * Add a location for the data pool to read data from. + * If @directory contains a "xml", "xmls", "yaml" or "icons" subdirectory (or all of them), + * those paths will be added to the search paths instead. + */ +void +as_pool_add_metadata_location (AsPool *pool, const gchar *directory) +{ + as_pool_add_metadata_location_internal (pool, directory, TRUE); +} + +/** + * as_pool_clear_metadata_locations: + * @pool: An instance of #AsPool. + * + * Remove all metadata locations from the list of watched locations. + */ +void +as_pool_clear_metadata_locations (AsPool *pool) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + + /* clear arrays */ + g_ptr_array_set_size (priv->xml_dirs, 0); + g_ptr_array_set_size (priv->yaml_dirs, 0); + g_ptr_array_set_size (priv->icon_dirs, 0); + + g_debug ("Cleared all metadata search paths."); +} + +/** + * as_pool_get_cache_flags: + * @pool: An instance of #AsPool. + * + * Get the #AsCacheFlags for this data pool. + */ +AsCacheFlags +as_pool_get_cache_flags (AsPool *pool) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + return priv->cache_flags; +} + +/** + * as_pool_set_cache_flags: + * @pool: An instance of #AsPool. + * @flags: The new #AsCacheFlags. + * + * Set the #AsCacheFlags for this data pool. + */ +void +as_pool_set_cache_flags (AsPool *pool, AsCacheFlags flags) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + priv->cache_flags = flags; +} + +/** + * as_pool_get_flags: + * @pool: An instance of #AsPool. + * + * Get the #AsPoolFlags for this data pool. + */ +AsPoolFlags +as_pool_get_flags (AsPool *pool) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + return priv->flags; +} + +/** + * as_pool_set_flags: + * @pool: An instance of #AsPool. + * @flags: The new #AsPoolFlags. + * + * Set the #AsPoolFlags for this data pool. + */ +void +as_pool_set_flags (AsPool *pool, AsPoolFlags flags) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + priv->flags = flags; +} + +/** + * as_pool_get_cache_age: + * @pool: An instance of #AsPool. + * + * Get the age of our internal cache. + */ +time_t +as_pool_get_cache_age (AsPool *pool) +{ + AsPoolPrivate *priv = GET_PRIVATE (pool); + return priv->cache_ctime; +} + +/** + * as_pool_error_quark: + * + * Return value: An error quark. + **/ +GQuark +as_pool_error_quark (void) +{ + static GQuark quark = 0; + if (!quark) + quark = g_quark_from_static_string ("AsPool"); + return quark; +} + +/** + * as_pool_new: + * + * Creates a new #AsPool. + * + * Returns: (transfer full): a #AsPool + * + **/ +AsPool* +as_pool_new (void) +{ + AsPool *pool; + pool = g_object_new (AS_TYPE_POOL, NULL); + return AS_POOL (pool); +} diff -Nru appstream-0.9.4/src/as-pool.h appstream-0.12.0/src/as-pool.h --- appstream-0.9.4/src/as-pool.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-pool.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,156 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_POOL_H +#define __AS_POOL_H + +#include +#include +#include "as-component.h" + +G_BEGIN_DECLS + +#define AS_TYPE_POOL (as_pool_get_type ()) +G_DECLARE_DERIVABLE_TYPE (AsPool, as_pool, AS, POOL, GObject) + +struct _AsPoolClass +{ + GObjectClass parent_class; + /*< private >*/ + void (*_as_reserved1) (void); + void (*_as_reserved2) (void); + void (*_as_reserved3) (void); + void (*_as_reserved4) (void); + void (*_as_reserved5) (void); + void (*_as_reserved6) (void); +}; + +/** + * AsCacheFlags: + * @AS_CACHE_FLAG_NONE: No flags. + * @AS_CACHE_FLAG_USE_USER: Create an user-specific metadata cache. + * @AS_CACHE_FLAG_USE_SYSTEM: Use and - if possible - update the global metadata cache. + * + * Flags on how caching should be used. + **/ +typedef enum { + AS_CACHE_FLAG_NONE = 0, + AS_CACHE_FLAG_USE_USER = 1 << 0, + AS_CACHE_FLAG_USE_SYSTEM = 1 << 1, +} AsCacheFlags; + +/** + * AsPoolFlags: + * @AS_POOL_FLAG_NONE: No flags. + * @AS_POOL_FLAG_READ_COLLECTION: Add AppStream collection metadata to the pool. + * @AS_POOL_FLAG_READ_METAINFO: Add data from AppStream metainfo files to the pool. + * @AS_POOL_FLAG_READ_DESKTOP_FILES: Add metadata from .desktop files to the pool. + * + * Flags on how caching should be used. + **/ +typedef enum { + AS_POOL_FLAG_NONE = 0, + AS_POOL_FLAG_READ_COLLECTION = 1 << 0, + AS_POOL_FLAG_READ_METAINFO = 1 << 1, + AS_POOL_FLAG_READ_DESKTOP_FILES = 1 << 2, +} AsPoolFlags; + +/** + * AsPoolError: + * @AS_POOL_ERROR_FAILED: Generic failure + * @AS_POOL_ERROR_TARGET_NOT_WRITABLE: We do not have write-access to the cache target location. + * @AS_POOL_ERROR_INCOMPLETE: The pool was loaded, but we had to ignore some metadata. + * @AS_POOL_ERROR_COLLISION: An AppStream-ID collision occured (a component with that ID already existed in the pool) + * + * A metadata pool error. + **/ +typedef enum { + AS_POOL_ERROR_FAILED, + AS_POOL_ERROR_TARGET_NOT_WRITABLE, + AS_POOL_ERROR_INCOMPLETE, + AS_POOL_ERROR_COLLISION, + /*< private >*/ + AS_POOL_ERROR_LAST +} AsPoolError; + +#define AS_POOL_ERROR as_pool_error_quark () +GQuark as_pool_error_quark (void); + +AsPool *as_pool_new (void); + +const gchar *as_pool_get_locale (AsPool *pool); +void as_pool_set_locale (AsPool *pool, + const gchar *locale); + +gboolean as_pool_load (AsPool *pool, + GCancellable *cancellable, + GError **error); + +gboolean as_pool_load_cache_file (AsPool *pool, + const gchar *fname, + GError **error); +gboolean as_pool_save_cache_file (AsPool *pool, + const gchar *fname, + GError **error); + +void as_pool_clear (AsPool *pool); +gboolean as_pool_add_component (AsPool *pool, + AsComponent *cpt, + GError **error); + +GPtrArray *as_pool_get_components (AsPool *pool); +GPtrArray *as_pool_get_components_by_id (AsPool *pool, + const gchar *cid); +GPtrArray *as_pool_get_components_by_provided_item (AsPool *pool, + AsProvidedKind kind, + const gchar *item); +GPtrArray *as_pool_get_components_by_kind (AsPool *pool, + AsComponentKind kind); +GPtrArray *as_pool_get_components_by_categories (AsPool *pool, + gchar **categories); +GPtrArray *as_pool_get_components_by_launchable (AsPool *pool, + AsLaunchableKind kind, + const gchar *id); +GPtrArray *as_pool_search (AsPool *pool, + const gchar *search); + +void as_pool_clear_metadata_locations (AsPool *pool); +void as_pool_add_metadata_location (AsPool *pool, + const gchar *directory); + +AsCacheFlags as_pool_get_cache_flags (AsPool *pool); +void as_pool_set_cache_flags (AsPool *pool, + AsCacheFlags flags); + +AsPoolFlags as_pool_get_flags (AsPool *pool); +void as_pool_set_flags (AsPool *pool, + AsPoolFlags flags); + +gboolean as_pool_refresh_cache (AsPool *pool, + gboolean force, + GError **error); + +G_END_DECLS + +#endif /* __AS_POOL_H */ diff -Nru appstream-0.9.4/src/as-pool-private.h appstream-0.12.0/src/as-pool-private.h --- appstream-0.9.4/src/as-pool-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-pool-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,45 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_POOL_PRIVATE_H +#define __AS_POOL_PRIVATE_H + +#include "as-pool.h" +#include "as-settings-private.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +time_t as_pool_get_cache_age (AsPool *pool); + +AS_INTERNAL_VISIBLE +void as_cache_file_save (const gchar *fname, + const gchar *locale, + GPtrArray *cpts, + GError **error); + +AS_INTERNAL_VISIBLE +GPtrArray *as_cache_file_read (const gchar *fname, + GError **error); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_POOL_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-provided.c appstream-0.12.0/src/as-provided.c --- appstream-0.9.4/src/as-provided.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-provided.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2017 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -19,12 +19,15 @@ */ #include "as-provided.h" +#include "as-provided-private.h" #include #include #include +#include #include "as-utils.h" +#include "as-variant-cache.h" /** * SECTION:as-provided @@ -41,7 +44,7 @@ typedef struct { AsProvidedKind kind; - GHashTable *items; + GPtrArray *items; } AsProvidedPrivate; G_DEFINE_TYPE_WITH_PRIVATE (AsProvided, as_provided, G_TYPE_OBJECT) @@ -81,6 +84,8 @@ return "firmware:runtime"; if (kind == AS_PROVIDED_KIND_FIRMWARE_FLASHED) return "firmware:flashed"; + if (kind == AS_PROVIDED_KIND_ID) + return "id"; return "unknown"; } @@ -117,6 +122,8 @@ return AS_PROVIDED_KIND_FIRMWARE_RUNTIME; if (g_strcmp0 (kind_str, "firmware:flashed") == 0) return AS_PROVIDED_KIND_FIRMWARE_FLASHED; + if (g_strcmp0 (kind_str, "id") == 0) + return AS_PROVIDED_KIND_ID; return AS_PROVIDED_KIND_UNKNOWN; } @@ -139,7 +146,7 @@ if (kind == AS_PROVIDED_KIND_BINARY) return _("Binaries"); if (kind == AS_PROVIDED_KIND_MIMETYPE) - return _("Mimetypes"); + return _("MIME types"); if (kind == AS_PROVIDED_KIND_FONT) return _("Fonts"); if (kind == AS_PROVIDED_KIND_MODALIAS) @@ -156,6 +163,8 @@ return _("Runtime Firmware"); if (kind == AS_PROVIDED_KIND_FIRMWARE_FLASHED) return _("Flashed Firmware"); + if (kind == AS_PROVIDED_KIND_ID) + return _("Component"); return as_provided_kind_to_string (kind); } @@ -168,7 +177,7 @@ AsProvided *prov = AS_PROVIDED (object); AsProvidedPrivate *priv = GET_PRIVATE (prov); - g_hash_table_unref (priv->items); + g_ptr_array_unref (priv->items); G_OBJECT_CLASS (as_provided_parent_class)->finalize (object); } @@ -182,7 +191,7 @@ AsProvidedPrivate *priv = GET_PRIVATE (prov); priv->kind = AS_PROVIDED_KIND_UNKNOWN; - priv->items = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + priv->items = g_ptr_array_new_with_free_func (g_free); } /** @@ -238,7 +247,21 @@ as_provided_has_item (AsProvided *prov, const gchar *item) { AsProvidedPrivate *priv = GET_PRIVATE (prov); - return g_hash_table_contains (priv->items, item); + guint i; + + for (i = 0; i < priv->items->len; i++) { + const gchar *pitem = (const gchar*) g_ptr_array_index (priv->items, i); + if (g_strcmp0 (pitem, item) == 0) + return TRUE; + + /* modalias entries may provide wildcards, we match them by default */ + if (priv->kind == AS_PROVIDED_KIND_MODALIAS) { + if (fnmatch (pitem, item, FNM_NOESCAPE) == 0) + return TRUE; + } + } + + return FALSE; } /** @@ -247,13 +270,13 @@ * * Get an array of provided data. * - * Returns: (transfer container): An utf-8 array of provided items, free with g_free() + * Returns: (transfer none) (element-type utf8): An string list of provided items. */ -gchar** +GPtrArray* as_provided_get_items (AsProvided *prov) { AsProvidedPrivate *priv = GET_PRIVATE (prov); - return (gchar**) g_hash_table_get_keys_as_array (priv->items, NULL); + return priv->items; } /** @@ -266,7 +289,54 @@ as_provided_add_item (AsProvided *prov, const gchar *item) { AsProvidedPrivate *priv = GET_PRIVATE (prov); - g_hash_table_add (priv->items, g_strdup (item)); + g_ptr_array_add (priv->items, g_strdup (item)); +} + +/** + * as_provided_to_variant: + * @prov: a #AsProvided instance. + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_provided_to_variant (AsProvided *prov, GVariantBuilder *builder) +{ + AsProvidedPrivate *priv = GET_PRIVATE (prov); + GVariant *prov_var; + + prov_var = g_variant_new ("{uv}", + priv->kind, + as_variant_from_string_ptrarray (priv->items)); + g_variant_builder_add_value (builder, prov_var); +} + +/** + * as_provided_set_from_variant: + * @prov: a #AsProvided instance. + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_provided_set_from_variant (AsProvided *prov, GVariant *variant) +{ + AsProvidedPrivate *priv = GET_PRIVATE (prov); + GVariantIter inner_iter; + GVariant *item_child; + g_autoptr(GVariant) items_var = NULL; + + g_variant_get (variant, "{uv}", &priv->kind, &items_var); + + g_variant_iter_init (&inner_iter, items_var); + while ((item_child = g_variant_iter_next_value (&inner_iter))) { + as_provided_add_item (prov, g_variant_get_string (item_child, NULL)); + g_variant_unref (item_child); + } + + return TRUE; } /** diff -Nru appstream-0.9.4/src/as-provided.h appstream-0.12.0/src/as-provided.h --- appstream-0.9.4/src/as-provided.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-provided.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -58,6 +58,7 @@ * @AS_PROVIDED_KIND_DBUS_USER: A DBus service name on the user/session bus. * @AS_PROVIDED_KIND_FIRMWARE_RUNTIME: Firmware flashed at runtime. * @AS_PROVIDED_KIND_FIRMWARE_FLASHED: Firmware flashed permanently to the device. + * @AS_PROVIDED_KIND_ID: An AppStream component * * Type of the public interface components can provide. **/ @@ -74,6 +75,7 @@ AS_PROVIDED_KIND_DBUS_USER, AS_PROVIDED_KIND_FIRMWARE_RUNTIME, AS_PROVIDED_KIND_FIRMWARE_FLASHED, + AS_PROVIDED_KIND_ID, /*< private >*/ AS_PROVIDED_KIND_LAST } AsProvidedKind; @@ -88,7 +90,7 @@ void as_provided_set_kind (AsProvided *prov, AsProvidedKind kind); -gchar **as_provided_get_items (AsProvided *prov); +GPtrArray *as_provided_get_items (AsProvided *prov); void as_provided_add_item (AsProvided *prov, const gchar *item); gboolean as_provided_has_item (AsProvided *prov, diff -Nru appstream-0.9.4/src/as-provided-private.h appstream-0.12.0/src/as-provided-private.h --- appstream-0.9.4/src/as-provided-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-provided-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,39 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2014-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_PROVIDED_PRIVATE_H +#define __AS_PROVIDED_PRIVATE_H + +#include "as-provided.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +/* NOTE: XML and YAML parsing is done in AsComponent, since we can not do it efficiently here */ + +void as_provided_to_variant (AsProvided *prov, + GVariantBuilder *builder); +gboolean as_provided_set_from_variant (AsProvided *prov, + GVariant *variant); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_PROVIDED_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-relation.c appstream-0.12.0/src/as-relation.c --- appstream-0.9.4/src/as-relation.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-relation.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,738 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2018 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "as-relation-private.h" + +#include +#include + +#include "as-utils.h" +#include "as-variant-cache.h" + +/** + * SECTION:as-relation + * @short_description: Description of relations a software component has with other items + * @include: appstream.h + * + * A component can have recommends- or requires relations on other components, system properties, + * other hardware and interfaces. + * This class contains a representation of those relations. + * + * See also: #AsComponent + */ + +typedef struct +{ + AsRelationKind kind; + AsRelationItemKind item_kind; + AsRelationCompare compare; + + gchar *value; + gchar *version; +} AsRelationPrivate; + +G_DEFINE_TYPE_WITH_PRIVATE (AsRelation, as_relation, G_TYPE_OBJECT) + +#define GET_PRIVATE(o) (as_relation_get_instance_private (o)) + +/** + * as_relation_kind_to_string: + * @kind: the #AsRelationKind. + * + * Converts the enumerated value to a text representation. + * + * Returns: string version of @kind + * + * Since: 0.12.0 + **/ +const gchar* +as_relation_kind_to_string (AsRelationKind kind) +{ + if (kind == AS_RELATION_KIND_REQUIRES) + return "requires"; + if (kind == AS_RELATION_KIND_RECOMMENDS) + return "recommends"; + return "unknown"; +} + +/** + * as_relation_kind_from_string: + * @kind_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsRelationKind or %AS_RELATION_KIND_UNKNOWN for unknown + * + * Since: 0.12.0 + **/ +AsRelationKind +as_relation_kind_from_string (const gchar *kind_str) +{ + if (g_strcmp0 (kind_str, "requires") == 0) + return AS_RELATION_KIND_REQUIRES; + if (g_strcmp0 (kind_str, "recommends") == 0) + return AS_RELATION_KIND_RECOMMENDS; + return AS_RELATION_KIND_UNKNOWN; +} + +/** + * as_relation_item_kind_to_string: + * @kind: the #AsRelationKind. + * + * Converts the enumerated value to a text representation. + * + * Returns: string version of @kind + * + * Since: 0.12.0 + **/ +const gchar* +as_relation_item_kind_to_string (AsRelationItemKind kind) +{ + if (kind == AS_RELATION_ITEM_KIND_ID) + return "id"; + if (kind == AS_RELATION_ITEM_KIND_MODALIAS) + return "modalias"; + if (kind == AS_RELATION_ITEM_KIND_KERNEL) + return "kernel"; + if (kind == AS_RELATION_ITEM_KIND_MEMORY) + return "memory"; + return "unknown"; +} + +/** + * as_relation_item_kind_from_string: + * @kind_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsRelationItemKind or %AS_RELATION_ITEM_KIND_UNKNOWN for unknown + * + * Since: 0.12.0 + **/ +AsRelationItemKind +as_relation_item_kind_from_string (const gchar *kind_str) +{ + if (g_strcmp0 (kind_str, "id") == 0) + return AS_RELATION_ITEM_KIND_ID; + if (g_strcmp0 (kind_str, "modalias") == 0) + return AS_RELATION_ITEM_KIND_MODALIAS; + if (g_strcmp0 (kind_str, "kernel") == 0) + return AS_RELATION_ITEM_KIND_KERNEL; + if (g_strcmp0 (kind_str, "memory") == 0) + return AS_RELATION_ITEM_KIND_MEMORY; + return AS_RELATION_ITEM_KIND_UNKNOWN; +} + +/** + * as_relation_compare_from_string: + * @compare_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsRelationCompare, or %AS_RELATION_COMPARE_UNKNOWN for unknown. + * + * Since: 0.12.0 + **/ +AsRelationCompare +as_relation_compare_from_string (const gchar *compare_str) +{ + if (g_strcmp0 (compare_str, "eq") == 0) + return AS_RELATION_COMPARE_EQ; + if (g_strcmp0 (compare_str, "ne") == 0) + return AS_RELATION_COMPARE_NE; + if (g_strcmp0 (compare_str, "gt") == 0) + return AS_RELATION_COMPARE_GT; + if (g_strcmp0 (compare_str, "lt") == 0) + return AS_RELATION_COMPARE_LT; + if (g_strcmp0 (compare_str, "ge") == 0) + return AS_RELATION_COMPARE_GE; + if (g_strcmp0 (compare_str, "le") == 0) + return AS_RELATION_COMPARE_LE; + + /* YAML */ + if (g_strcmp0 (compare_str, "==") == 0) + return AS_RELATION_COMPARE_EQ; + if (g_strcmp0 (compare_str, "!=") == 0) + return AS_RELATION_COMPARE_NE; + if (g_strcmp0 (compare_str, ">>") == 0) + return AS_RELATION_COMPARE_GT; + if (g_strcmp0 (compare_str, "<<") == 0) + return AS_RELATION_COMPARE_LT; + if (g_strcmp0 (compare_str, ">=") == 0) + return AS_RELATION_COMPARE_GE; + if (g_strcmp0 (compare_str, "<=") == 0) + return AS_RELATION_COMPARE_LE; + + /* default value */ + if (compare_str == NULL) + return AS_RELATION_COMPARE_GE; + + return AS_RELATION_COMPARE_UNKNOWN; +} + +/** + * as_relation_compare_to_string: + * @compare: the #AsRelationCompare. + * + * Converts the enumerated value to an text representation. + * The enum is converted into a two-letter identifier ("eq", "ge", etc.) + * for use in the XML representation. + * + * Returns: string version of @compare + * + * Since: 0.12.0 + **/ +const gchar* +as_relation_compare_to_string (AsRelationCompare compare) +{ + if (compare == AS_RELATION_COMPARE_EQ) + return "eq"; + if (compare == AS_RELATION_COMPARE_NE) + return "ne"; + if (compare == AS_RELATION_COMPARE_GT) + return "gt"; + if (compare == AS_RELATION_COMPARE_LT) + return "lt"; + if (compare == AS_RELATION_COMPARE_GE) + return "ge"; + if (compare == AS_RELATION_COMPARE_LE) + return "le"; + return NULL; +} + +/** + * as_relation_compare_to_symbols_string: + * @compare: the #AsRelationCompare. + * + * Converts the enumerated value to an text representation. + * The enum is converted into an identifier consisting of two + * mathematical comparison operators ("==", ">=", etc.) + * for use in the YAML representation and user interfaces. + * + * Returns: string version of @compare + * + * Since: 0.12.0 + **/ +const gchar* +as_relation_compare_to_symbols_string (AsRelationCompare compare) +{ + if (compare == AS_RELATION_COMPARE_EQ) + return "=="; + if (compare == AS_RELATION_COMPARE_NE) + return "!="; + if (compare == AS_RELATION_COMPARE_GT) + return ">>"; + if (compare == AS_RELATION_COMPARE_LT) + return "<<"; + if (compare == AS_RELATION_COMPARE_GE) + return ">="; + if (compare == AS_RELATION_COMPARE_LE) + return "<="; + return NULL; +} + +/** + * as_relation_finalize: + **/ +static void +as_relation_finalize (GObject *object) +{ + AsRelation *relation = AS_RELATION (object); + AsRelationPrivate *priv = GET_PRIVATE (relation); + + g_free (priv->value); + g_free (priv->version); + + G_OBJECT_CLASS (as_relation_parent_class)->finalize (object); +} + +/** + * as_relation_init: + **/ +static void +as_relation_init (AsRelation *relation) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + + priv->compare = AS_RELATION_COMPARE_GE; /* greater-or-equal is the default comparison method */ +} + +/** + * as_relation_class_init: + **/ +static void +as_relation_class_init (AsRelationClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->finalize = as_relation_finalize; +} + +/** + * as_relation_get_kind: + * @relation: a #AsRelation instance. + * + * The type (and thereby strength) of this #AsRelation. + * + * Returns: an enum of type #AsRelationKind + * + * Since: 0.12.0 + */ +AsRelationKind +as_relation_get_kind (AsRelation *relation) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + return priv->kind; +} + +/** + * as_relation_set_kind: + * @relation: a #AsRelation instance. + * @kind: the new #AsRelationKind + * + * Set the kind of this #AsRelation. + * + * Since: 0.12.0 + */ +void +as_relation_set_kind (AsRelation *relation, AsRelationKind kind) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + priv->kind = kind; +} + +/** + * as_relation_get_item_kind: + * @relation: a #AsRelation instance. + * + * The kind of the item of this #AsRelation. + * + * Returns: an enum of type #AsRelationItemKind + * + * Since: 0.12.0 + */ +AsRelationItemKind +as_relation_get_item_kind (AsRelation *relation) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + return priv->item_kind; +} + +/** + * as_relation_set_item_kind: + * @relation: a #AsRelation instance. + * @kind: the new #AsRelationItemKind + * + * Set the kind of the item this #AsRelation is about. + * + * Since: 0.12.0 + */ +void +as_relation_set_item_kind (AsRelation *relation, AsRelationItemKind kind) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + priv->item_kind = kind; +} + +/** + * as_relation_get_compare: + * @relation: a #AsRelation instance. + * + * The version comparison type. + * + * Returns: an enum of type #AsRelationCompare + * + * Since: 0.12.0 + */ +AsRelationCompare +as_relation_get_compare (AsRelation *relation) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + return priv->compare; +} + +/** + * as_relation_set_compare: + * @relation: an #AsRelation instance. + * @compare: the new #AsRelationCompare + * + * Set the version comparison type of this #AsRelation. + * + * Since: 0.12.0 + */ +void +as_relation_set_compare (AsRelation *relation, AsRelationCompare compare) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + priv->compare = compare; +} + +/** + * as_relation_get_version: + * @relation: an #AsRelation instance. + * + * Returns: The version of the item this #AsRelation is about. + * + * Since: 0.12.0 + **/ +const gchar* +as_relation_get_version (AsRelation *relation) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + return priv->version; +} + +/** + * as_relation_set_version: + * @relation: an #AsRelation instance. + * @version: the new version. + * + * Sets the item version. + * + * Since: 0.12.0 + **/ +void +as_relation_set_version (AsRelation *relation, const gchar *version) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + g_free (priv->version); + priv->version = g_strdup (version); +} + +/** + * as_relation_get_value: + * @relation: an #AsRelation instance. + * + * Returns: The value of the item this #AsRelation is about. + * + * Since: 0.12.0 + **/ +const gchar* +as_relation_get_value (AsRelation *relation) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + return priv->value; +} + +/** + * as_relation_get_value_int: + * @relation: an #AsRelation instance. + * + * Returns: The value of the item this #AsRelation is about as integer. + * + * Since: 0.12.0 + **/ +gint +as_relation_get_value_int (AsRelation *relation) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + if (priv->value == NULL) + return 0; + return g_ascii_strtoll (priv->value, NULL, 10); +} + +/** + * as_relation_set_value: + * @relation: an #AsRelation instance. + * @value: the new value. + * + * Sets the item value. + * + * Since: 0.12.0 + **/ +void +as_relation_set_value (AsRelation *relation, const gchar *value) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + g_free (priv->value); + priv->value = g_strdup (value); +} + + +/** + * as_relation_version_compare: + * @relation: an #AsRelation instance. + * @version: a version number, e.g. `1.2.0` + * @error: A #GError or %NULL + * + * Tests whether the version number of this #AsRelation is fulfilled by + * @version. Whether the given version is sufficient to fulfill the version + * requirement of this #AsRelation is determined by its comparison resraint. + * + * Returns: %TRUE if the version from the parameter is sufficient. + * + * Since: 0.12.0 + **/ +gboolean +as_relation_version_compare (AsRelation *relation, const gchar *version, GError **error) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + gint rc; + + /* if we have no version set, any version checked against is satisfactory */ + if (priv->version == NULL) + return TRUE; + + switch (priv->compare) { + case AS_RELATION_COMPARE_EQ: + rc = as_utils_compare_versions (priv->version, version); + return rc == 0; + case AS_RELATION_COMPARE_NE: + rc = as_utils_compare_versions (priv->version, version); + return rc != 0; + case AS_RELATION_COMPARE_LT: + rc = as_utils_compare_versions (priv->version, version); + return rc > 0; + case AS_RELATION_COMPARE_GT: + rc = as_utils_compare_versions (priv->version, version); + return rc < 0; + case AS_RELATION_COMPARE_LE: + rc = as_utils_compare_versions (priv->version, version); + return rc >= 0; + case AS_RELATION_COMPARE_GE: + rc = as_utils_compare_versions (priv->version, version); + return rc <= 0; + default: + return FALSE; + } +} + +/** + * as_relation_load_from_xml: + * @relation: a #AsRelation instance. + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads #AsRelation data from an XML node. + **/ +gboolean +as_relation_load_from_xml (AsRelation *relation, AsContext *ctx, xmlNode *node, GError **error) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + gchar *content = NULL; + + content = as_xml_get_node_value (node); + if (content == NULL) + return FALSE; + g_free (priv->value); + priv->value = content; + + priv->item_kind = as_relation_item_kind_from_string ((const gchar*) node->name); + + g_free (priv->version); + priv->version = (gchar*) xmlGetProp (node, (xmlChar*) "version"); + + if (priv->version != NULL) { + g_autofree gchar *compare_str = (gchar*) xmlGetProp (node, (xmlChar*) "compare"); + priv->compare = as_relation_compare_from_string (compare_str); + } + + return TRUE; +} + +/** + * as_relation_to_xml_node: + * @relation: an #AsRelation + * @ctx: the AppStream document context. + * @root: XML node to attach the new node to. + * + * Serializes the data to a XML node. + * @root should be a or root node. + **/ +void +as_relation_to_xml_node (AsRelation *relation, AsContext *ctx, xmlNode *root) +{ + + AsRelationPrivate *priv = GET_PRIVATE (relation); + xmlNode *n; + + if (priv->item_kind == AS_RELATION_ITEM_KIND_UNKNOWN) + return; + + n = xmlNewTextChild (root, NULL, + (xmlChar*) as_relation_item_kind_to_string (priv->item_kind), + (xmlChar*) priv->value); + if (priv->version != NULL) { + xmlNewProp (n, (xmlChar*) "version", + (xmlChar*) priv->version); + xmlNewProp (n, (xmlChar*) "compare", + (xmlChar*) as_relation_compare_to_string (priv->compare)); + } +} + +/** + * as_relation_load_from_yaml: + * @relation: an #AsRelation + * @ctx: the AppStream document context. + * @node: the YAML node. + * @error: a #GError. + * + * Loads data from a YAML field. + **/ +gboolean +as_relation_load_from_yaml (AsRelation *relation, AsContext *ctx, GNode *node, GError **error) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + GNode *n; + + if (node->children == NULL) + return FALSE; + + for (n = node->children; n != NULL; n = n->next) { + const gchar *entry = as_yaml_node_get_key (n); + if (entry == NULL) + continue; + + if (g_strcmp0 (entry, "version") == 0) { + g_autofree gchar *compare_str = NULL; + g_autofree gchar *ver_str = g_strdup (as_yaml_node_get_value (n)); + if (strlen (ver_str) <= 2) + continue; /* this string is too short to contain any valid version */ + compare_str = g_strndup (ver_str, 2); + priv->compare = as_relation_compare_from_string (compare_str); + g_free (priv->version); + priv->version = g_strdup (ver_str + 2); + g_strstrip (priv->version); + } else { + AsRelationItemKind kind = as_relation_item_kind_from_string (entry); + if (kind != AS_RELATION_ITEM_KIND_UNKNOWN) { + priv->item_kind = kind; + g_free (priv->value); + priv->value = g_strdup (as_yaml_node_get_value (n)); + } else { + g_debug ("Unknown Requires/Recommends YAML field: %s", entry); + } + } + } + + return TRUE; +} + +/** + * as_relation_emit_yaml: + * @relation: an #AsRelation + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. + * + * Emit YAML data for this object. + **/ +void +as_relation_emit_yaml (AsRelation *relation, AsContext *ctx, yaml_emitter_t *emitter) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + + if ((priv->item_kind <= AS_RELATION_ITEM_KIND_UNKNOWN) || (priv->item_kind >= AS_RELATION_ITEM_KIND_LAST)) + return; + + as_yaml_mapping_start (emitter); + + as_yaml_emit_entry (emitter, + as_relation_item_kind_to_string (priv->item_kind), + priv->value); + + if (priv->version != NULL) { + g_autofree gchar *ver_str = g_strdup_printf ("%s %s", + as_relation_compare_to_symbols_string (priv->compare), + priv->version); + as_yaml_emit_entry (emitter, "version", ver_str); + } + + as_yaml_mapping_end (emitter); +} + +/** + * as_relation_to_variant: + * @relation: an #AsRelation + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_relation_to_variant (AsRelation *relation, GVariantBuilder *builder) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + GVariantBuilder rel_dict; + + g_variant_builder_init (&rel_dict, G_VARIANT_TYPE_VARDICT); + + as_variant_builder_add_kv (&rel_dict, "kind", + g_variant_new_uint32 (priv->kind)); + as_variant_builder_add_kv (&rel_dict, "item_kind", + g_variant_new_uint32 (priv->item_kind)); + as_variant_builder_add_kv (&rel_dict, "compare", + g_variant_new_uint32 (priv->compare)); + + as_variant_builder_add_kv (&rel_dict, "version", + as_variant_mstring_new (priv->version)); + as_variant_builder_add_kv (&rel_dict, "value", + as_variant_mstring_new (priv->value)); + + g_variant_builder_add_value (builder, g_variant_builder_end (&rel_dict)); +} + +/** + * as_relation_set_from_variant: + * @relation: an #AsRelation + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_relation_set_from_variant (AsRelation *relation, GVariant *variant) +{ + AsRelationPrivate *priv = GET_PRIVATE (relation); + GVariantDict dict; + GVariant *var; + + g_variant_dict_init (&dict, variant); + + priv->kind = as_variant_get_dict_uint32 (&dict, "kind"); + priv->item_kind = as_variant_get_dict_uint32 (&dict, "item_kind"); + priv->compare = as_variant_get_dict_uint32 (&dict, "compare"); + + as_relation_set_version (relation, + as_variant_get_dict_mstr (&dict, "version", &var)); + g_variant_unref (var); + + as_relation_set_value (relation, + as_variant_get_dict_mstr (&dict, "value", &var)); + g_variant_unref (var); + + return TRUE; +} + +/** + * as_relation_new: + * + * Creates a new #AsRelation. + * + * Returns: (transfer full): a #AsRelation + * + * Since: 0.11.0 + **/ +AsRelation* +as_relation_new (void) +{ + AsRelation *relation; + relation = g_object_new (AS_TYPE_RELATION, NULL); + return AS_RELATION (relation); +} diff -Nru appstream-0.9.4/src/as-relation.h appstream-0.12.0/src/as-relation.h --- appstream-0.9.4/src/as-relation.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-relation.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,146 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2018 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_RELATION_H +#define __AS_RELATION_H + +#include + +G_BEGIN_DECLS + +#define AS_TYPE_RELATION (as_relation_get_type ()) +G_DECLARE_DERIVABLE_TYPE (AsRelation, as_relation, AS, RELATION, GObject) + +struct _AsRelationClass +{ + GObjectClass parent_class; + /*< private >*/ + void (*_as_reserved1) (void); + void (*_as_reserved2) (void); + void (*_as_reserved3) (void); + void (*_as_reserved4) (void); + void (*_as_reserved5) (void); + void (*_as_reserved6) (void); +}; + +/** + * AsRelationKind: + * @AS_RELATION_KIND_UNKNOWN: Unknown kind + * @AS_RELATION_KIND_REQUIRES: The referenced item is required by the component + * @AS_RELATION_KIND_RECOMMENDS: The referenced item is recommended + * + * Type of a component's relation to other items. + **/ +typedef enum { + AS_RELATION_KIND_UNKNOWN, + AS_RELATION_KIND_REQUIRES, + AS_RELATION_KIND_RECOMMENDS, + /*< private >*/ + AS_RELATION_KIND_LAST +} AsRelationKind; + +/** + * AsRelationItemKind: + * @AS_RELATION_ITEM_KIND_UNKNOWN: Unknown kind + * @AS_RELATION_ITEM_KIND_ID: A component ID + * @AS_RELATION_ITEM_KIND_MODALIAS: A hardware modalias + * @AS_RELATION_ITEM_KIND_KERNEL: An operating system kernel (like Linux) + * @AS_RELATION_ITEM_KIND_MEMORY: A system RAM requirement + * + * Type of the item an #AsRelation is for. + **/ +typedef enum { + AS_RELATION_ITEM_KIND_UNKNOWN, + AS_RELATION_ITEM_KIND_ID, + AS_RELATION_ITEM_KIND_MODALIAS, + AS_RELATION_ITEM_KIND_KERNEL, + AS_RELATION_ITEM_KIND_MEMORY, + /*< private >*/ + AS_RELATION_ITEM_KIND_LAST +} AsRelationItemKind; + +/** + * AsRelationCompare: + * @AS_RELATION_COMPARE_UNKNOWN: Comparison predicate invalid or not known + * @AS_RELATION_COMPARE_EQ: Equal to + * @AS_RELATION_COMPARE_NE: Not equal to + * @AS_RELATION_COMPARE_LT: Less than + * @AS_RELATION_COMPARE_GT: Greater than + * @AS_RELATION_COMPARE_LE: Less than or equal to + * @AS_RELATION_COMPARE_GE: Greater than or equal to + * + * The relational comparison type. + **/ +typedef enum { + AS_RELATION_COMPARE_UNKNOWN, + AS_RELATION_COMPARE_EQ, + AS_RELATION_COMPARE_NE, + AS_RELATION_COMPARE_LT, + AS_RELATION_COMPARE_GT, + AS_RELATION_COMPARE_LE, + AS_RELATION_COMPARE_GE, + /*< private >*/ + AS_RELATION_COMPARE_LAST +} AsRelationCompare; + +const gchar *as_relation_kind_to_string (AsRelationKind kind); +AsRelationKind as_relation_kind_from_string (const gchar *kind_str); + +const gchar *as_relation_item_kind_to_string (AsRelationItemKind kind); +AsRelationItemKind as_relation_item_kind_from_string (const gchar *kind_str); + +AsRelationCompare as_relation_compare_from_string (const gchar *compare_str); +const gchar *as_relation_compare_to_string (AsRelationCompare compare); +const gchar *as_relation_compare_to_symbols_string (AsRelationCompare compare); + +AsRelation *as_relation_new (void); + +AsRelationKind as_relation_get_kind (AsRelation *relation); +void as_relation_set_kind (AsRelation *relation, + AsRelationKind kind); + +AsRelationItemKind as_relation_get_item_kind (AsRelation *relation); +void as_relation_set_item_kind (AsRelation *relation, + AsRelationItemKind kind); + +AsRelationCompare as_relation_get_compare (AsRelation *relation); +void as_relation_set_compare (AsRelation *relation, + AsRelationCompare compare); + +const gchar *as_relation_get_version (AsRelation *relation); +void as_relation_set_version (AsRelation *relation, + const gchar *version); + +const gchar *as_relation_get_value (AsRelation *relation); +gint as_relation_get_value_int (AsRelation *relation); +void as_relation_set_value (AsRelation *relation, + const gchar *value); + +gboolean as_relation_version_compare (AsRelation *relation, + const gchar *version, + GError **error); + +G_END_DECLS + +#endif /* __AS_RELATION_H */ diff -Nru appstream-0.9.4/src/as-relation-private.h appstream-0.12.0/src/as-relation-private.h --- appstream-0.9.4/src/as-relation-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-relation-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,58 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2018 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_RELATION_PRIVATE_H +#define __AS_RELATION_PRIVATE_H + +#include "as-relation.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +/* NOTE: Some XML/YAML parsing is done in AsComponent, the routines here load single entries from + * a requires/recommends block */ + +gboolean as_relation_load_from_xml (AsRelation *relation, + AsContext *ctx, + xmlNode *node, + GError **error); +void as_relation_to_xml_node (AsRelation *relation, + AsContext *ctx, + xmlNode *root); + +gboolean as_relation_load_from_yaml (AsRelation *relation, + AsContext *ctx, + GNode *node, + GError **error); +void as_relation_emit_yaml (AsRelation *relation, + AsContext *ctx, + yaml_emitter_t *emitter); + +void as_relation_to_variant (AsRelation *relation, + GVariantBuilder *builder); +gboolean as_relation_set_from_variant (AsRelation *relation, + GVariant *variant); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_RELATION_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-release.c appstream-0.12.0/src/as-release.c --- appstream-0.9.4/src/as-release.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-release.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2016 Matthias Klumpp * Copyright (C) 2014 Richard Hughes * * Licensed under the GNU Lesser General Public License Version 2.1 @@ -34,17 +34,25 @@ * See also: #AsComponent */ -#include "as-release.h" +#include "as-release-private.h" + +#include "as-utils.h" +#include "as-utils-private.h" +#include "as-checksum-private.h" +#include "as-variant-cache.h" typedef struct { + AsReleaseKind kind; gchar *version; GHashTable *description; guint64 timestamp; - gchar *active_locale; + + AsContext *context; + gchar *active_locale_override; GPtrArray *locations; - gchar **checksums; + GPtrArray *checksums; guint64 size[AS_SIZE_KIND_LAST]; AsUrgencyKind urgency; @@ -54,43 +62,43 @@ #define GET_PRIVATE(o) (as_release_get_instance_private (o)) /** - * as_checksum_kind_to_string: - * @kind: the %AsChecksumKind. + * as_release_kind_to_string: + * @kind: the #AsReleaseKind. * * Converts the enumerated value to an text representation. * * Returns: string version of @kind + * + * Since: 0.12.0 **/ const gchar* -as_checksum_kind_to_string (AsChecksumKind kind) +as_release_kind_to_string (AsReleaseKind kind) { - if (kind == AS_CHECKSUM_KIND_NONE) - return "none"; - if (kind == AS_CHECKSUM_KIND_SHA1) - return "sha1"; - if (kind == AS_CHECKSUM_KIND_SHA256) - return "sha256"; + if (kind == AS_RELEASE_KIND_STABLE) + return "stable"; + if (kind == AS_RELEASE_KIND_DEVELOPMENT) + return "development"; return "unknown"; } /** - * as_checksum_kind_from_string: + * as_release_kind_from_string: * @kind_str: the string. * * Converts the text representation to an enumerated value. * - * Returns: a #AsChecksumKind or %AS_CHECKSUM_KIND_NONE for unknown + * Returns: an #AsReleaseKind or %AS_RELEASE_KIND_UNKNOWN for unknown + * + * Since: 0.12.0 **/ -AsChecksumKind -as_checksum_kind_from_string (const gchar *kind_str) +AsReleaseKind +as_release_kind_from_string (const gchar *kind_str) { - if (g_strcmp0 (kind_str, "none") == 0) - return AS_CHECKSUM_KIND_NONE; - if (g_strcmp0 (kind_str, "sha1") == 0) - return AS_CHECKSUM_KIND_SHA1; - if (g_strcmp0 (kind_str, "sha256") == 0) - return AS_CHECKSUM_KIND_SHA256; - return AS_CHECKSUM_KIND_NONE; + if (g_strcmp0 (kind_str, "stable") == 0) + return AS_RELEASE_KIND_STABLE; + if (g_strcmp0 (kind_str, "development") == 0) + return AS_RELEASE_KIND_DEVELOPMENT; + return AS_RELEASE_KIND_UNKNOWN; } /** @@ -142,11 +150,13 @@ guint i; AsReleasePrivate *priv = GET_PRIVATE (release); - priv->active_locale = g_strdup ("C"); + /* we assume a stable release by default */ + priv->kind = AS_RELEASE_KIND_STABLE; + priv->description = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); priv->locations = g_ptr_array_new_with_free_func (g_free); - priv->checksums = g_new0 (gchar*, AS_CHECKSUM_KIND_LAST + 1); + priv->checksums = g_ptr_array_new_with_free_func (g_object_unref); priv->urgency = AS_URGENCY_KIND_UNKNOWN; for (i = 0; i < AS_SIZE_KIND_LAST; i++) @@ -163,10 +173,12 @@ AsReleasePrivate *priv = GET_PRIVATE (release); g_free (priv->version); - g_free (priv->active_locale); + g_free (priv->active_locale_override); g_hash_table_unref (priv->description); g_ptr_array_unref (priv->locations); - g_strfreev (priv->checksums); + g_ptr_array_unref (priv->checksums); + if (priv->context != NULL) + g_object_unref (priv->context); G_OBJECT_CLASS (as_release_parent_class)->finalize (object); } @@ -182,6 +194,39 @@ } /** + * as_release_get_kind: + * @release: a #AsRelease instance. + * + * Gets the type of the release. + * (development or stable release) + * + * Since: 0.12.0 + **/ +AsReleaseKind +as_release_get_kind (AsRelease *release) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + return priv->kind; +} + +/** + * as_release_set_kind: + * @release: a #AsRelease instance. + * @kind: the #AsReleaseKind + * + * Sets the release kind to distinguish between end-user ready + * stable releases and development prereleases.. + * + * Since: 0.12.0 + **/ +void +as_release_set_kind (AsRelease *release, AsReleaseKind kind) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + priv->kind = kind; +} + +/** * as_release_get_version: * @release: a #AsRelease instance. * @@ -189,7 +234,7 @@ * * Returns: string, or %NULL for not set or invalid **/ -const gchar * +const gchar* as_release_get_version (AsRelease *release) { AsReleasePrivate *priv = GET_PRIVATE (release); @@ -212,6 +257,22 @@ } /** + * as_release_vercmp: + * @rel1: an #AsRelease + * @rel2: an #AsRelease + * + * Compare the version numbers of two releases. + * + * Returns: 1 if @rel1 version is higher than @rel2, 0 if versions are equal, -1 if @rel1 version is higher than @rel2. + */ +gint +as_release_vercmp (AsRelease *rel1, AsRelease *rel2) +{ + return as_utils_compare_versions (as_release_get_version (rel1), + as_release_get_version (rel2)); +} + +/** * as_release_get_timestamp: * @release: a #AsRelease instance. * @@ -327,7 +388,7 @@ const gchar *desc; AsReleasePrivate *priv = GET_PRIVATE (release); - desc = g_hash_table_lookup (priv->description, priv->active_locale); + desc = g_hash_table_lookup (priv->description, as_release_get_active_locale (release)); if (desc == NULL) { /* fall back to untranslated / default */ desc = g_hash_table_lookup (priv->description, "C"); @@ -349,7 +410,7 @@ AsReleasePrivate *priv = GET_PRIVATE (release); if (locale == NULL) - locale = priv->active_locale; + locale = as_release_get_active_locale (release); g_hash_table_insert (priv->description, g_strdup (locale), @@ -362,11 +423,23 @@ * Get the current active locale, which * is used to get localized messages. */ -gchar* +const gchar* as_release_get_active_locale (AsRelease *release) { AsReleasePrivate *priv = GET_PRIVATE (release); - return priv->active_locale; + const gchar *locale; + + /* return context locale, if the locale isn't explicitly overridden for this component */ + if ((priv->context != NULL) && (priv->active_locale_override == NULL)) { + locale = as_context_get_locale (priv->context); + } else { + locale = priv->active_locale_override; + } + + if (locale == NULL) + return "C"; + else + return locale; } /** @@ -383,8 +456,8 @@ { AsReleasePrivate *priv = GET_PRIVATE (release); - g_free (priv->active_locale); - priv->active_locale = g_strdup (locale); + g_free (priv->active_locale_override); + priv->active_locale_override = g_strdup (locale); } /** @@ -419,44 +492,548 @@ } /** + * as_release_get_checksums: + * + * Get a list of all checksums we have for this release. + * + * Returns: (transfer none) (element-type AsChecksum): an array of #AsChecksum objects. + * + * Since: 0.10 + **/ +GPtrArray* +as_release_get_checksums (AsRelease *release) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + return priv->checksums; +} + +/** * as_release_get_checksum: * * Gets the release checksum * - * Returns: string, or %NULL for not set or invalid + * Returns: (transfer none): an #AsChecksum, or %NULL for not set or invalid * * Since: 0.8.2 **/ -const gchar* +AsChecksum* as_release_get_checksum (AsRelease *release, AsChecksumKind kind) { AsReleasePrivate *priv = GET_PRIVATE (release); - g_return_val_if_fail (kind < AS_CHECKSUM_KIND_LAST, NULL); - if (kind == 0) - return NULL; + guint i; - return priv->checksums[kind]; + for (i = 0; i < priv->checksums->len; i++) { + AsChecksum *cs = AS_CHECKSUM (g_ptr_array_index (priv->checksums, i)); + if (as_checksum_get_kind (cs) == kind) + return cs; + } + return NULL; } /** - * as_release_set_checksum: + * as_release_add_checksum: * @release: An instance of #AsRelease. - * @checksum: The checksum as string. - * @kind: The kind of this checksum, e.g. %AS_CHECKSUM_KIND_SHA256 + * @cs: The #AsChecksum. * - * Set the release checksum. + * Add a checksum for the file associated with this release. * * Since: 0.8.2 */ void -as_release_set_checksum (AsRelease *release, const gchar *checksum, AsChecksumKind kind) +as_release_add_checksum (AsRelease *release, AsChecksum *cs) { AsReleasePrivate *priv = GET_PRIVATE (release); - g_return_if_fail (kind < AS_CHECKSUM_KIND_LAST); - g_return_if_fail (kind != 0); + g_ptr_array_add (priv->checksums, g_object_ref (cs)); +} + +/** + * as_release_get_context: + * @release: An instance of #AsRelease. + * + * Returns: the #AsContext associated with this release. + * This function may return %NULL if no context is set. + * + * Since: 0.11.2 + */ +AsContext* +as_release_get_context (AsRelease *release) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + return priv->context; +} + +/** + * as_release_set_context: + * @release: An instance of #AsRelease. + * @context: the #AsContext. + * + * Sets the document context this release is associated + * with. + * + * Since: 0.11.2 + */ +void +as_release_set_context (AsRelease *release, AsContext *context) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + if (priv->context != NULL) + g_object_unref (priv->context); + priv->context = g_object_ref (context); + + /* reset individual properties, so the new context overrides them */ + g_free (priv->active_locale_override); + priv->active_locale_override = NULL; +} + +/** + * as_release_parse_xml_metainfo_description_cb: + * + * Helper function for GHashTable + */ +static void +as_release_parse_xml_metainfo_description_cb (gchar *key, GString *value, AsRelease *rel) +{ + g_assert (AS_IS_RELEASE (rel)); + + as_release_set_description (rel, value->str, key); + g_string_free (value, TRUE); +} + +/** + * as_release_load_from_xml: + * @release: an #AsRelease + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads data from an XML node. + **/ +gboolean +as_release_load_from_xml (AsRelease *release, AsContext *ctx, xmlNode *node, GError **error) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + xmlNode *iter; + gchar *prop; + + /* propagate context */ + as_release_set_context (release, ctx); + + prop = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + if (prop != NULL) { + priv->kind = as_release_kind_from_string (prop); + g_free (prop); + } + + prop = (gchar*) xmlGetProp (node, (xmlChar*) "version"); + as_release_set_version (release, prop); + g_free (prop); + + prop = (gchar*) xmlGetProp (node, (xmlChar*) "date"); + if (prop != NULL) { + g_autoptr(GDateTime) time; + time = as_iso8601_to_datetime (prop); + if (time != NULL) { + priv->timestamp = g_date_time_to_unix (time); + } else { + g_debug ("Invalid ISO-8601 date in releases at %s line %li", as_context_get_filename (ctx), xmlGetLineNo (node)); + } + g_free (prop); + } + + prop = (gchar*) xmlGetProp (node, (xmlChar*) "timestamp"); + if (prop != NULL) { + priv->timestamp = atol (prop); + g_free (prop); + } + prop = (gchar*) xmlGetProp (node, (xmlChar*) "urgency"); + if (prop != NULL) { + priv->urgency = as_urgency_kind_from_string (prop); + g_free (prop); + } + + for (iter = node->children; iter != NULL; iter = iter->next) { + g_autofree gchar *content = NULL; + if (iter->type != XML_ELEMENT_NODE) + continue; + + if (g_strcmp0 ((gchar*) iter->name, "location") == 0) { + content = as_xml_get_node_value (iter); + as_release_add_location (release, content); + } else if (g_strcmp0 ((gchar*) iter->name, "checksum") == 0) { + g_autoptr(AsChecksum) cs = NULL; + + cs = as_checksum_new (); + if (as_checksum_load_from_xml (cs, ctx, iter, NULL)) + as_release_add_checksum (release, cs); + } else if (g_strcmp0 ((gchar*) iter->name, "size") == 0) { + AsSizeKind s_kind; + prop = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); + + s_kind = as_size_kind_from_string (prop); + if (s_kind != AS_SIZE_KIND_UNKNOWN) { + guint64 size; + + content = as_xml_get_node_value (iter); + size = g_ascii_strtoull (content, NULL, 10); + if (size > 0) + as_release_set_size (release, size, s_kind); + } + g_free (prop); + } else if (g_strcmp0 ((gchar*) iter->name, "description") == 0) { + if (as_context_get_style (ctx) == AS_FORMAT_STYLE_COLLECTION) { + g_autofree gchar *lang; + + /* for collection XML, the "description" tag has a language property, so parsing it is simple */ + content = as_xml_dump_node_children (iter); + lang = as_xmldata_get_node_locale (ctx, iter); + if (lang != NULL) + as_release_set_description (release, content, lang); + } else { + as_xml_parse_metainfo_description_node (ctx, + iter, + (GHFunc) as_release_parse_xml_metainfo_description_cb, + release); + } + } + } + + return TRUE; +} + +/** + * as_release_to_xml_node: + * @release: an #AsRelease + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +void +as_release_to_xml_node (AsRelease *release, AsContext *ctx, xmlNode *root) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + xmlNode *subnode; + guint j; + + /* set release version */ + subnode = xmlNewChild (root, NULL, (xmlChar*) "release", (xmlChar*) ""); + xmlNewProp (subnode, (xmlChar*) "type", + (xmlChar*) as_release_kind_to_string (priv->kind)); + xmlNewProp (subnode, (xmlChar*) "version", (xmlChar*) priv->version); + + /* set release timestamp / date */ + if (priv->timestamp > 0) { + g_autofree gchar *time_str = NULL; + + if (as_context_get_style (ctx) == AS_FORMAT_STYLE_COLLECTION) { + time_str = g_strdup_printf ("%" G_GUINT64_FORMAT, priv->timestamp); + xmlNewProp (subnode, (xmlChar*) "timestamp", + (xmlChar*) time_str); + } else { + GTimeVal time; + time.tv_sec = priv->timestamp; + time.tv_usec = 0; + time_str = g_time_val_to_iso8601 (&time); + xmlNewProp (subnode, (xmlChar*) "date", + (xmlChar*) time_str); + } + } + + /* set release urgency, if we have one */ + if (priv->urgency != AS_URGENCY_KIND_UNKNOWN) { + const gchar *urgency_str; + urgency_str = as_urgency_kind_to_string (priv->urgency); + xmlNewProp (subnode, (xmlChar*) "urgency", + (xmlChar*) urgency_str); + } + + /* add location urls */ + for (j = 0; j < priv->locations->len; j++) { + const gchar *lurl = (const gchar*) g_ptr_array_index (priv->locations, j); + xmlNewTextChild (subnode, NULL, (xmlChar*) "location", (xmlChar*) lurl); + } + + /* add checksum node */ + for (j = 0; j < priv->checksums->len; j++) { + AsChecksum *cs = AS_CHECKSUM (g_ptr_array_index (priv->checksums, j)); + as_checksum_to_xml_node (cs, ctx, subnode); + } + + /* add size node */ + for (j = 0; j < AS_SIZE_KIND_LAST; j++) { + if (as_release_get_size (release, j) > 0) { + xmlNode *s_node; + g_autofree gchar *size_str; + + size_str = g_strdup_printf ("%" G_GUINT64_FORMAT, as_release_get_size (release, j)); + s_node = xmlNewTextChild (subnode, + NULL, + (xmlChar*) "size", + (xmlChar*) size_str); + xmlNewProp (s_node, + (xmlChar*) "type", + (xmlChar*) as_size_kind_to_string (j)); + } + } + + /* add description */ + as_xml_add_description_node (ctx, subnode, priv->description); +} + +/** + * as_release_load_from_yaml: + * @release: an #AsRelease + * @ctx: the AppStream document context. + * @node: the YAML node. + * @error: a #GError. + * + * Loads data from a YAML field. + **/ +gboolean +as_release_load_from_yaml (AsRelease *release, AsContext *ctx, GNode *node, GError **error) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + GNode *n; + + /* propagate locale */ + as_release_set_context (release, ctx); + + for (n = node->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + const gchar *value = as_yaml_node_get_value (n); + + if (g_strcmp0 (key, "unix-timestamp") == 0) { + priv->timestamp = atol (value); + } else if (g_strcmp0 (key, "date") == 0) { + g_autoptr(GDateTime) time; + time = as_iso8601_to_datetime (value); + if (time != NULL) { + priv->timestamp = g_date_time_to_unix (time); + } else { + g_debug ("Invalid ISO-8601 date in %s", as_context_get_filename (ctx)); // FIXME: Better error, maybe with line number? + } + } else if (g_strcmp0 (key, "type") == 0) { + priv->kind = as_release_kind_from_string (value); + } else if (g_strcmp0 (key, "version") == 0) { + as_release_set_version (release, value); + } else if (g_strcmp0 (key, "urgency") == 0) { + priv->urgency = as_urgency_kind_from_string (value); + } else if (g_strcmp0 (key, "description") == 0) { + g_autofree gchar *tmp = as_yaml_get_localized_value (ctx, n, NULL); + as_release_set_description (release, tmp, NULL); + } else { + as_yaml_print_unknown ("release", key); + } + } + + return TRUE; +} + +/** + * as_release_emit_yaml: + * @release: an #AsRelease + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. + * + * Emit YAML data for this object. + **/ +void +as_release_emit_yaml (AsRelease *release, AsContext *ctx, yaml_emitter_t *emitter) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + guint j; + + /* start mapping for this release */ + as_yaml_mapping_start (emitter); + + /* version */ + as_yaml_emit_entry (emitter, "version", priv->version); + + /* type */ + as_yaml_emit_entry (emitter, "type", as_release_kind_to_string (priv->kind)); + + /* timestamp & date */ + if (priv->timestamp > 0) { + g_autofree gchar *time_str = NULL; + + if (as_context_get_style (ctx) == AS_FORMAT_STYLE_COLLECTION) { + as_yaml_emit_entry_timestamp (emitter, + "unix-timestamp", + priv->timestamp); + } else { + GTimeVal time; + time.tv_sec = priv->timestamp; + time.tv_usec = 0; + time_str = g_time_val_to_iso8601 (&time); + as_yaml_emit_entry (emitter, "date", time_str); + } + } + + /* urgency */ + if (priv->urgency != AS_URGENCY_KIND_UNKNOWN) { + as_yaml_emit_entry (emitter, + "urgency", + as_urgency_kind_to_string (priv->urgency)); + } + + /* description */ + as_yaml_emit_long_localized_entry (emitter, + "description", + priv->description); + + /* location URLs */ + if (priv->locations->len > 0) { + as_yaml_emit_scalar (emitter, "locations"); + as_yaml_sequence_start (emitter); + for (j = 0; j < priv->locations->len; j++) { + const gchar *lurl = (const gchar*) g_ptr_array_index (priv->locations, j); + as_yaml_emit_scalar (emitter, lurl); + } + + as_yaml_sequence_end (emitter); + } + + /* TODO: Checksum and size are missing, because they are not specified yet for DEP-11. + * Will need to be added when/if we need it. */ + + /* end mapping for the release */ + as_yaml_mapping_end (emitter); +} + +/** + * as_release_to_variant: + * @release: an #AsRelease + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_release_to_variant (AsRelease *release, GVariantBuilder *builder) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + guint j; + GVariantBuilder checksum_b; + GVariantBuilder sizes_b; + GVariantBuilder rel_b; + + GVariant *locations_var; + GVariant *checksums_var; + GVariant *sizes_var; + gboolean have_sizes = FALSE; + + /* build checksum info */ + g_variant_builder_init (&checksum_b, G_VARIANT_TYPE_DICTIONARY); + for (j = 0; j < priv->checksums->len; j++) { + AsChecksum *cs = AS_CHECKSUM (g_ptr_array_index (priv->checksums, j)); + as_checksum_to_variant (cs, &checksum_b); + } + + /* build size info */ + g_variant_builder_init (&sizes_b, G_VARIANT_TYPE_DICTIONARY); + for (j = 0; j < AS_SIZE_KIND_LAST; j++) { + if (as_release_get_size (release, (AsSizeKind) j) > 0) { + g_variant_builder_add (&sizes_b, "{ut}", + (AsSizeKind) j, + as_release_get_size (release, (AsSizeKind) j)); + have_sizes = TRUE; + } + } + + g_variant_builder_init (&rel_b, G_VARIANT_TYPE_ARRAY); + g_variant_builder_add_parsed (&rel_b, "{'kind', <%u>}", priv->kind); + g_variant_builder_add_parsed (&rel_b, "{'version', %v}", as_variant_mstring_new (priv->version)); + g_variant_builder_add_parsed (&rel_b, "{'timestamp', <%t>}", priv->timestamp); + g_variant_builder_add_parsed (&rel_b, "{'urgency', <%u>}", priv->urgency); + g_variant_builder_add_parsed (&rel_b, "{'description', %v}", as_variant_mstring_new (as_release_get_description (release))); + + locations_var = as_variant_from_string_ptrarray (priv->locations); + if (locations_var) + g_variant_builder_add_parsed (&rel_b, "{'locations', %v}", locations_var); + + checksums_var = priv->checksums->len > 0? g_variant_builder_end (&checksum_b) : NULL; + if (checksums_var) + g_variant_builder_add_parsed (&rel_b, "{'checksums', %v}", checksums_var); + + sizes_var = have_sizes? g_variant_builder_end (&sizes_b) : NULL; + if (sizes_var) + g_variant_builder_add_parsed (&rel_b, "{'sizes', %v}", sizes_var); + + g_variant_builder_add_value (builder, g_variant_builder_end (&rel_b)); +} + +/** + * as_release_set_from_variant: + * @release: an #AsRelease + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_release_set_from_variant (AsRelease *release, GVariant *variant, const gchar *locale) +{ + AsReleasePrivate *priv = GET_PRIVATE (release); + GVariant *tmp; + GVariantDict rdict; + GVariantIter riter; + GVariant *inner_child;; + + as_release_set_active_locale (release, locale); + g_variant_dict_init (&rdict, variant); + + priv->kind = as_variant_get_dict_uint32 (&rdict, "kind"); + + as_release_set_version (release, as_variant_get_dict_mstr (&rdict, "version", &tmp)); + g_variant_unref (tmp); + + tmp = g_variant_dict_lookup_value (&rdict, "timestamp", G_VARIANT_TYPE_UINT64); + priv->timestamp = g_variant_get_uint64 (tmp); + g_variant_unref (tmp); + + priv->urgency = as_variant_get_dict_uint32 (&rdict, "urgency"); + + as_release_set_description (release, + as_variant_get_dict_mstr (&rdict, "description", &tmp), + locale); + g_variant_unref (tmp); + + /* locations */ + as_variant_to_string_ptrarray_by_dict (&rdict, + "locations", + priv->locations); + + /* sizes */ + tmp = g_variant_dict_lookup_value (&rdict, "sizes", G_VARIANT_TYPE_DICTIONARY); + if (tmp != NULL) { + g_variant_iter_init (&riter, tmp); + while ((inner_child = g_variant_iter_next_value (&riter))) { + AsSizeKind kind; + guint64 size; + + g_variant_get (inner_child, "{ut}", &kind, &size); + as_release_set_size (release, size, kind); + + g_variant_unref (inner_child); + } + g_variant_unref (tmp); + } + + /* checksums */ + tmp = g_variant_dict_lookup_value (&rdict, "checksums", G_VARIANT_TYPE_DICTIONARY); + if (tmp != NULL) { + g_variant_iter_init (&riter, tmp); + while ((inner_child = g_variant_iter_next_value (&riter))) { + g_autoptr(AsChecksum) cs = as_checksum_new (); + if (as_checksum_set_from_variant (cs, inner_child)) + as_release_add_checksum (release, cs); + + g_variant_unref (inner_child); + } + g_variant_unref (tmp); + } - g_free (priv->checksums[kind]); - priv->checksums[kind] = g_strdup (checksum); + return TRUE; } /** diff -Nru appstream-0.9.4/src/as-release.h appstream-0.12.0/src/as-release.h --- appstream-0.9.4/src/as-release.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-release.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -27,6 +27,7 @@ #include #include "as-enums.h" +#include "as-checksum.h" G_BEGIN_DECLS @@ -46,23 +47,25 @@ }; /** - * AsChecksumKind: - * @AS_CHECKSUM_KIND_NONE: No checksum - * @AS_CHECKSUM_KIND_SHA1: SHA1 - * @AS_CHECKSUM_KIND_SHA256: SHA256 + * AsReleaseKind: + * @AS_RELEASE_KIND_UNKNOWN: Unknown release type + * @AS_RELEASE_KIND_STABLE: A stable release for end-users + * @AS_RELEASE_KIND_DEVELOPMENT: A development release or pre-release for testing * - * Checksums supported by #AsRelease + * The release size kind. + * + * Since: 0.12.0 **/ -typedef enum { - AS_CHECKSUM_KIND_NONE, - AS_CHECKSUM_KIND_SHA1, - AS_CHECKSUM_KIND_SHA256, +typedef enum { + AS_RELEASE_KIND_UNKNOWN, + AS_RELEASE_KIND_STABLE, + AS_RELEASE_KIND_DEVELOPMENT, /*< private >*/ - AS_CHECKSUM_KIND_LAST -} AsChecksumKind; + AS_RELEASE_KIND_LAST +} AsReleaseKind; -const gchar *as_checksum_kind_to_string (AsChecksumKind kind); -AsChecksumKind as_checksum_kind_from_string (const gchar *kind_str); +const gchar *as_release_kind_to_string (AsReleaseKind kind); +AsReleaseKind as_release_kind_from_string (const gchar *kind_str); /** * AsSizeKind: @@ -87,9 +90,20 @@ AsRelease *as_release_new (void); +AsReleaseKind as_release_get_kind (AsRelease *release); +void as_release_set_kind (AsRelease *release, + AsReleaseKind kind); + +const gchar *as_release_get_active_locale (AsRelease *release); +void as_release_set_active_locale (AsRelease *release, + const gchar *locale); + const gchar *as_release_get_version (AsRelease *release); void as_release_set_version (AsRelease *release, - const gchar *version); + const gchar *version); + +gint as_release_vercmp (AsRelease *rel1, + AsRelease *rel2); guint64 as_release_get_timestamp (AsRelease *release); void as_release_set_timestamp (AsRelease *release, @@ -100,19 +114,15 @@ const gchar *description, const gchar *locale); -gchar *as_release_get_active_locale (AsRelease *release); -void as_release_set_active_locale (AsRelease *release, - const gchar *locale); - GPtrArray *as_release_get_locations (AsRelease *release); void as_release_add_location (AsRelease *release, const gchar *location); -const gchar *as_release_get_checksum (AsRelease *release, - AsChecksumKind kind); -void as_release_set_checksum (AsRelease *release, - const gchar *checksum, +GPtrArray *as_release_get_checksums (AsRelease *release); +AsChecksum *as_release_get_checksum (AsRelease *release, AsChecksumKind kind); +void as_release_add_checksum (AsRelease *release, + AsChecksum *cs); AsUrgencyKind as_release_get_urgency (AsRelease *release); void as_release_set_urgency (AsRelease *release, diff -Nru appstream-0.9.4/src/as-release-private.h appstream-0.12.0/src/as-release-private.h --- appstream-0.9.4/src/as-release-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-release-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,60 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_RELEASE_PRIVATE_H +#define __AS_RELEASE_PRIVATE_H + +#include "as-release.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +AsContext *as_release_get_context (AsRelease *release); +void as_release_set_context (AsRelease *release, + AsContext *context); + +gboolean as_release_load_from_xml (AsRelease *release, + AsContext *ctx, + xmlNode *node, + GError **error); +void as_release_to_xml_node (AsRelease *release, + AsContext *ctx, + xmlNode *root); + +gboolean as_release_load_from_yaml (AsRelease *release, + AsContext *ctx, + GNode *node, + GError **error); +void as_release_emit_yaml (AsRelease *release, + AsContext *ctx, + yaml_emitter_t *emitter); + +void as_release_to_variant (AsRelease *release, + GVariantBuilder *builder); +gboolean as_release_set_from_variant (AsRelease *release, + GVariant *variant, + const gchar *locale); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_RELEASE_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-screenshot.c appstream-0.12.0/src/as-screenshot.c --- appstream-0.9.4/src/as-screenshot.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-screenshot.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,7 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2012-2014 Matthias Klumpp - * Copyright (C) 2014 Richard Hughes + * Copyright (C) 2012-2017 Matthias Klumpp + * Copyright (C) 2014 Richard Hughes * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -32,14 +32,20 @@ #include "as-screenshot.h" #include "as-screenshot-private.h" +#include "as-utils.h" #include "as-utils-private.h" +#include "as-image-private.h" +#include "as-variant-cache.h" typedef struct { AsScreenshotKind kind; GHashTable *caption; GPtrArray *images; - gchar *active_locale; + GPtrArray *images_lang; + + AsContext *context; + gchar *active_locale_override; } AsScreenshotPrivate; G_DEFINE_TYPE_WITH_PRIVATE (AsScreenshot, as_screenshot, G_TYPE_OBJECT) @@ -54,9 +60,12 @@ AsScreenshot *screenshot = AS_SCREENSHOT (object); AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); - g_free (priv->active_locale); + g_free (priv->active_locale_override); g_ptr_array_unref (priv->images); + g_ptr_array_unref (priv->images_lang); g_hash_table_unref (priv->caption); + if (priv->context != NULL) + g_object_unref (priv->context); G_OBJECT_CLASS (as_screenshot_parent_class)->finalize (object); } @@ -69,10 +78,10 @@ { AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); - priv->active_locale = g_strdup ("C"); priv->kind = AS_SCREENSHOT_KIND_EXTRA; - priv->images = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); priv->caption = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + priv->images = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); + priv->images_lang = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); } /** @@ -91,9 +100,7 @@ * * Converts the text representation to an enumerated value. * - * Returns: (transfer full): a %AsScreenshotKind, or - * %AS_SCREENSHOT_KIND_UNKNOWN if not known. - * + * Returns: a %AsScreenshotKind, or %AS_SCREENSHOT_KIND_UNKNOWN if not known. **/ AsScreenshotKind as_screenshot_kind_from_string (const gchar *kind) @@ -102,6 +109,8 @@ return AS_SCREENSHOT_KIND_DEFAULT; if (g_strcmp0 (kind, "extra") == 0) return AS_SCREENSHOT_KIND_EXTRA; + if ((g_strcmp0 (kind, "") == 0) || (kind == NULL)) + return AS_SCREENSHOT_KIND_EXTRA; return AS_SCREENSHOT_KIND_UNKNOWN; } @@ -112,7 +121,6 @@ * Converts the enumerated value to an text representation. * * Returns: string version of @kind - * **/ const gchar * as_screenshot_kind_to_string (AsScreenshotKind kind) @@ -131,7 +139,6 @@ * Gets the screenshot kind. * * Returns: a #AsScreenshotKind - * **/ AsScreenshotKind as_screenshot_get_kind (AsScreenshot *screenshot) @@ -146,7 +153,6 @@ * @kind: the #AsScreenshotKind. * * Sets the screenshot kind. - * **/ void as_screenshot_set_kind (AsScreenshot *screenshot, AsScreenshotKind kind) @@ -159,16 +165,18 @@ * as_screenshot_get_images: * @screenshot: a #AsScreenshot instance. * - * Gets the image sizes included in the screenshot. - * - * Returns: (element-type AsImage) (transfer none): an array + * Gets the images for this screenshots. Only images valid for the current + * language are returned. We return all sizes. * + * Returns: (transfer none) (element-type AsImage): an array **/ GPtrArray* as_screenshot_get_images (AsScreenshot *screenshot) { AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); - return priv->images; + if (priv->images_lang->len == 0) + return as_screenshot_get_images_all (screenshot); + return priv->images_lang; } /** @@ -177,13 +185,15 @@ * @image: a #AsImage instance. * * Adds an image to the screenshot. - * **/ void as_screenshot_add_image (AsScreenshot *screenshot, AsImage *image) { AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); g_ptr_array_add (priv->images, g_object_ref (image)); + + if (as_utils_locale_is_compatible (as_image_get_locale (image), as_screenshot_get_active_locale (screenshot))) + g_ptr_array_add (priv->images_lang, g_object_ref (image)); } /** @@ -193,15 +203,15 @@ * Gets the image caption * * Returns: the caption - * **/ -const gchar * +const gchar* as_screenshot_get_caption (AsScreenshot *screenshot) { const gchar *caption; AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); - caption = g_hash_table_lookup (priv->caption, priv->active_locale); + caption = g_hash_table_lookup (priv->caption, + as_screenshot_get_active_locale (screenshot)); if (caption == NULL) { /* fall back to untranslated / default */ caption = g_hash_table_lookup (priv->caption, "C"); @@ -216,7 +226,6 @@ * @caption: the caption text. * * Sets a caption on the screenshot - * **/ void as_screenshot_set_caption (AsScreenshot *screenshot, const gchar *caption, const gchar *locale) @@ -224,7 +233,7 @@ AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); if (locale == NULL) - locale = priv->active_locale; + locale = as_screenshot_get_active_locale (screenshot); g_hash_table_insert (priv->caption, as_locale_strip_encoding (g_strdup (locale)), @@ -238,7 +247,6 @@ * Performs a quick validation on this screenshot * * Returns: TRUE if the screenshot is a complete #AsScreenshot - * **/ gboolean as_screenshot_is_valid (AsScreenshot *screenshot) @@ -248,16 +256,51 @@ } /** + * as_screenshot_rebuild_suitable_images_list: + * @screenshot: a #AsScreenshot instance. + * + * Rebuild list of images suitable for the selected locale. + */ +static void +as_screenshot_rebuild_suitable_images_list (AsScreenshot *screenshot) +{ + AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); + guint i; + + /* rebuild our list of images suitable for the current locale */ + g_ptr_array_unref (priv->images_lang); + priv->images_lang = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); + for (i = 0; i < priv->images->len; i++) { + AsImage *img = AS_IMAGE (g_ptr_array_index (priv->images, i)); + if (!as_utils_locale_is_compatible (as_image_get_locale (img), as_screenshot_get_active_locale (screenshot))) + continue; + g_ptr_array_add (priv->images_lang, g_object_ref (img)); + } +} + +/** * as_screenshot_get_active_locale: * * Get the current active locale, which * is used to get localized messages. */ -gchar* +const gchar* as_screenshot_get_active_locale (AsScreenshot *screenshot) { AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); - return priv->active_locale; + const gchar *locale; + + /* return context locale, if the locale isn't explicitly overridden for this component */ + if ((priv->context != NULL) && (priv->active_locale_override == NULL)) { + locale = as_context_get_locale (priv->context); + } else { + locale = priv->active_locale_override; + } + + if (locale == NULL) + return "C"; + else + return locale; } /** @@ -274,20 +317,340 @@ { AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); - g_free (priv->active_locale); - priv->active_locale = g_strdup (locale); + g_free (priv->active_locale_override); + priv->active_locale_override = g_strdup (locale); + + /* rebuild our list of images suitable for the current locale */ + as_screenshot_rebuild_suitable_images_list (screenshot); +} + +/** + * as_screenshot_get_images_all: + * @screenshot: an #AsScreenshot instance. + * + * Returns an array of all images we have, regardless of their + * size and language. + * + * Returns: (transfer none) (element-type AsImage): an array + * + * Since: 0.10 + **/ +GPtrArray* +as_screenshot_get_images_all (AsScreenshot *screenshot) +{ + AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); + return priv->images; +} + +/** + * as_screenshot_get_context: + * @screenshot: an #AsScreenshot instance. + * + * Returns: the #AsContext associated with this screenshot. + * This function may return %NULL if no context is set. + * + * Since: 0.11.2 + */ +AsContext* +as_screenshot_get_context (AsScreenshot *screenshot) +{ + AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); + return priv->context; } /** - * as_screenshot_get_caption_table: + * as_screenshot_set_context: + * @screenshot: an #AsScreenshot instance. + * @context: the #AsContext. * - * Internal function. + * Sets the document context this screenshot is associated + * with. + * + * Since: 0.11.2 */ -GHashTable* -as_screenshot_get_caption_table (AsScreenshot *screenshot) +void +as_screenshot_set_context (AsScreenshot *screenshot, AsContext *context) { AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); - return priv->caption; + if (priv->context != NULL) + g_object_unref (priv->context); + priv->context = g_object_ref (context); + + /* reset individual properties, so the new context overrides them */ + g_free (priv->active_locale_override); + priv->active_locale_override = NULL; + + as_screenshot_rebuild_suitable_images_list (screenshot); +} + +/** + * as_screenshot_load_from_xml: + * @screenshot: an #AsScreenshot instance. + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads data from an XML node. + **/ +gboolean +as_screenshot_load_from_xml (AsScreenshot *screenshot, AsContext *ctx, xmlNode *node, GError **error) +{ + AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); + xmlNode *iter; + g_autofree gchar *prop = NULL; + gboolean children_found = FALSE; + + prop = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + if (g_strcmp0 (prop, "default") == 0) + priv->kind = AS_SCREENSHOT_KIND_DEFAULT; + else + priv->kind = AS_SCREENSHOT_KIND_EXTRA; + + for (iter = node->children; iter != NULL; iter = iter->next) { + const gchar *node_name; + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) + continue; + node_name = (const gchar*) iter->name; + children_found = TRUE; + + if (g_strcmp0 (node_name, "image") == 0) { + g_autoptr(AsImage) image = as_image_new (); + if (as_image_load_from_xml (image, ctx, iter, NULL)) + as_screenshot_add_image (screenshot, image); + } else if (g_strcmp0 (node_name, "caption") == 0) { + g_autofree gchar *content = NULL; + g_autofree gchar *lang = NULL; + + content = as_xml_get_node_value (iter); + if (content == NULL) + continue; + + lang = as_xmldata_get_node_locale (ctx, iter); + if (lang != NULL) + as_screenshot_set_caption (screenshot, content, lang); + } + } + + if (!children_found) { + /* we are likely dealing with a legacy screenshot node, which does not have children, + * but instead contains the screenshot URL as text. This was briefly supported in an older AppStream + * version for metainfo files, but it should no longer be used. + * We support it here only for legacy compatibility. */ + g_autoptr(AsImage) image = as_image_new (); + + if (as_image_load_from_xml (image, ctx, node, NULL)) + as_screenshot_add_image (screenshot, image); + else + return FALSE; /* this screenshot is invalid */ + } + + /* propagate context - we do this last so the image list for the selected locale is rebuilt properly */ + as_screenshot_set_context (screenshot, ctx); + + return TRUE; +} + +/** + * as_screenshot_to_xml_node: + * @screenshot: an #AsScreenshot instance. + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +void +as_screenshot_to_xml_node (AsScreenshot *screenshot, AsContext *ctx, xmlNode *root) +{ + AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); + xmlNode *subnode; + guint i; + + subnode = xmlNewChild (root, NULL, (xmlChar*) "screenshot", NULL); + if (priv->kind == AS_SCREENSHOT_KIND_DEFAULT) + xmlNewProp (subnode, (xmlChar*) "type", (xmlChar*) "default"); + + as_xml_add_localized_text_node (subnode, "caption", priv->caption); + + for (i = 0; i < priv->images->len; i++) { + AsImage *image = AS_IMAGE (g_ptr_array_index (priv->images, i)); + as_image_to_xml_node (image, ctx, subnode); + } +} + +/** + * as_screenshot_load_from_yaml: + * @screenshot: an #AsScreenshot instance. + * @ctx: the AppStream document context. + * @node: the YAML node. + * @error: a #GError. + * + * Loads data from a YAML field. + **/ +gboolean +as_screenshot_load_from_yaml (AsScreenshot *screenshot, AsContext *ctx, GNode *node, GError **error) +{ + AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); + GNode *n; + + for (n = node->children; n != NULL; n = n->next) { + GNode *in; + const gchar *key = as_yaml_node_get_key (n); + const gchar *value = as_yaml_node_get_value (n); + + if (g_strcmp0 (key, "default") == 0) { + if (g_strcmp0 (value, "yes") == 0) + priv->kind = AS_SCREENSHOT_KIND_DEFAULT; + else + priv->kind = AS_SCREENSHOT_KIND_EXTRA; + } else if (g_strcmp0 (key, "caption") == 0) { + gchar *lvalue; + /* the caption is a localized element */ + lvalue = as_yaml_get_localized_value (ctx, n, NULL); + as_screenshot_set_caption (screenshot, lvalue, NULL); + } else if (g_strcmp0 (key, "source-image") == 0) { + /* there can only be one source image */ + g_autoptr(AsImage) image = as_image_new (); + if (as_image_load_from_yaml (image, ctx, n, AS_IMAGE_KIND_SOURCE, NULL)) + as_screenshot_add_image (screenshot, image); + } else if (g_strcmp0 (key, "thumbnails") == 0) { + /* the thumbnails are a list of images */ + for (in = n->children; in != NULL; in = in->next) { + g_autoptr(AsImage) image = as_image_new (); + if (as_image_load_from_yaml (image, ctx, in, AS_IMAGE_KIND_THUMBNAIL, NULL)) + as_screenshot_add_image (screenshot, image); + } + } else { + as_yaml_print_unknown ("screenshot", key); + } + } + + /* propagate context - we do this last so the image list for the selected locale is rebuilt properly */ + as_screenshot_set_context (screenshot, ctx); + + return TRUE; +} + +/** + * as_screenshot_emit_yaml: + * @screenshot: an #AsScreenshot instance. + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. + * + * Emit YAML data for this object. + **/ +void +as_screenshot_emit_yaml (AsScreenshot *screenshot, AsContext *ctx, yaml_emitter_t *emitter) +{ + AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); + guint i; + AsImage *source_img = NULL; + + as_yaml_mapping_start (emitter); + + if (priv->kind == AS_SCREENSHOT_KIND_DEFAULT) + as_yaml_emit_entry (emitter, "default", "true"); + + as_yaml_emit_localized_entry (emitter, "caption", priv->caption); + + as_yaml_emit_scalar (emitter, "thumbnails"); + as_yaml_sequence_start (emitter); + for (i = 0; i < priv->images->len; i++) { + AsImage *img = AS_IMAGE (g_ptr_array_index (priv->images, i)); + + if (as_image_get_kind (img) == AS_IMAGE_KIND_SOURCE) { + source_img = img; + continue; + } + + as_image_emit_yaml (img, ctx, emitter); + } + as_yaml_sequence_end (emitter); + + /* we *must* have a source-image by now if the data follows the spec, but better be safe... */ + if (source_img != NULL) { + as_yaml_emit_scalar (emitter, "source-image"); + as_image_emit_yaml (source_img, ctx, emitter); + } + + as_yaml_mapping_end (emitter); +} + +/** + * as_screenshot_to_variant: + * @screenshot: an #AsScreenshot instance. + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + * + * Returns: %TRUE if a screenhot was added to the @builder + */ +gboolean +as_screenshot_to_variant (AsScreenshot *screenshot, GVariantBuilder *builder) +{ + AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); + guint i; + GVariantBuilder images_b; + GVariantBuilder scr_b; + + /* do not add screenshot without images to the cache */ + if (priv->images->len == 0) + return FALSE; + + g_variant_builder_init (&images_b, G_VARIANT_TYPE_ARRAY); + for (i = 0; i < priv->images->len; i++) + as_image_to_variant (AS_IMAGE (g_ptr_array_index (priv->images, i)), &images_b); + + g_variant_builder_init (&scr_b, G_VARIANT_TYPE_ARRAY); + g_variant_builder_add_parsed (&scr_b, "{'type', <%u>}", priv->kind); + g_variant_builder_add_parsed (&scr_b, "{'caption', %v}", as_variant_mstring_new (as_screenshot_get_caption (screenshot))); + g_variant_builder_add_parsed (&scr_b, "{'images', %v}", g_variant_builder_end (&images_b)); + + g_variant_builder_add_value (builder, g_variant_builder_end (&scr_b)); + + return TRUE; +} + +/** + * as_screenshot_set_from_variant: + * @screenshot: an #AsScreenshot instance. + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_screenshot_set_from_variant (AsScreenshot *screenshot, GVariant *variant, const gchar *locale) +{ + AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); + GVariantIter inner_iter; + GVariantDict idict; + GVariant *tmp; + g_autoptr(GVariant) images_var = NULL; + + as_screenshot_set_active_locale (screenshot, locale); + g_variant_dict_init (&idict, variant); + + priv->kind = as_variant_get_dict_uint32 (&idict, "type"); + as_screenshot_set_caption (screenshot, + as_variant_get_dict_mstr (&idict, "caption", &tmp), + locale); + g_variant_unref (tmp); + + images_var = g_variant_dict_lookup_value (&idict, "images", G_VARIANT_TYPE_ARRAY); + if (images_var != NULL) { + GVariant *img_child; + g_variant_iter_init (&inner_iter, images_var); + + while ((img_child = g_variant_iter_next_value (&inner_iter))) { + g_autoptr(AsImage) img = as_image_new (); + if (as_image_set_from_variant (img, img_child)) + as_screenshot_add_image (screenshot, img); + } + } + + return priv->images->len != 0; } /** @@ -296,9 +659,8 @@ * Creates a new #AsScreenshot. * * Returns: (transfer full): a #AsScreenshot - * **/ -AsScreenshot * +AsScreenshot* as_screenshot_new (void) { AsScreenshot *screenshot; diff -Nru appstream-0.9.4/src/as-screenshot.h appstream-0.12.0/src/as-screenshot.h --- appstream-0.9.4/src/as-screenshot.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-screenshot.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2012-2015 Matthias Klumpp + * Copyright (C) 2012-2017 Matthias Klumpp * Copyright (C) 2014 Richard Hughes * * Licensed under the GNU Lesser General Public License Version 2.1 @@ -78,12 +78,12 @@ const gchar *caption, const gchar *locale); - +GPtrArray *as_screenshot_get_images_all (AsScreenshot *screenshot); GPtrArray *as_screenshot_get_images (AsScreenshot *screenshot); void as_screenshot_add_image (AsScreenshot *screenshot, AsImage *image); -gchar *as_screenshot_get_active_locale (AsScreenshot *screenshot); +const gchar *as_screenshot_get_active_locale (AsScreenshot *screenshot); void as_screenshot_set_active_locale (AsScreenshot *screenshot, const gchar *locale); diff -Nru appstream-0.9.4/src/as-screenshot-private.h appstream-0.12.0/src/as-screenshot-private.h --- appstream-0.9.4/src/as-screenshot-private.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-screenshot-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2015-2016 Matthias Klumpp + * Copyright (C) 2015-2017 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -21,13 +21,40 @@ #ifndef __AS_SCREENSHOT_PRIVATE_H #define __AS_SCREENSHOT_PRIVATE_H -#include #include "as-screenshot.h" +#include "as-xml.h" +#include "as-yaml.h" G_BEGIN_DECLS +#pragma GCC visibility push(hidden) -GHashTable *as_screenshot_get_caption_table (AsScreenshot *screenshot); +AsContext *as_screenshot_get_context (AsScreenshot *screenshot); +void as_screenshot_set_context (AsScreenshot *screenshot, + AsContext *context); + +gboolean as_screenshot_load_from_xml (AsScreenshot *screenshot, + AsContext *ctx, + xmlNode *node, + GError **error); +void as_screenshot_to_xml_node (AsScreenshot *screenshot, + AsContext *ctx, + xmlNode *root); + +gboolean as_screenshot_load_from_yaml (AsScreenshot *screenshot, + AsContext *ctx, + GNode *node, + GError **error); +void as_screenshot_emit_yaml (AsScreenshot *screenshot, + AsContext *ctx, + yaml_emitter_t *emitter); + +gboolean as_screenshot_to_variant (AsScreenshot *screenshot, + GVariantBuilder *builder); +gboolean as_screenshot_set_from_variant (AsScreenshot *screenshot, + GVariant *variant, + const gchar *locale); +#pragma GCC visibility pop G_END_DECLS #endif /* __AS_SCREENSHOT_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-settings-private.h appstream-0.12.0/src/as-settings-private.h --- appstream-0.9.4/src/as-settings-private.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-settings-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2012-2014 Matthias Klumpp + * Copyright (C) 2012-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -18,20 +18,25 @@ * along with this library. If not, see . */ -#ifndef __AS_SETTINGSPRIVATE_H -#define __AS_SETTINGSPRIVATE_H +#ifndef __AS_SETTINGS_PRIVATE_H +#define __AS_SETTINGS_PRIVATE_H #include #include "config.h" G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +#define AS_INTERNAL_VISIBLE __attribute__((visibility("default"))) #define AS_CONFIG_NAME "/etc/appstream.conf" -#define AS_APPSTREAM_CACHE_PATH "/var/cache/app-info" +#define AS_APPSTREAM_CACHE_PATH "/var/cache/app-info/gv" /* declared in as-data-pool.c */ +AS_INTERNAL_VISIBLE extern const gchar *AS_APPSTREAM_METADATA_PATHS[4]; +#pragma GCC visibility pop G_END_DECLS -#endif /* __AS_SETTINGSPRIVATE_H */ +#endif /* __AS_SETTINGS_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-spdx.c appstream-0.12.0/src/as-spdx.c --- appstream-0.9.4/src/as-spdx.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-spdx.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,520 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Richard Hughes + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "as-spdx.h" + +#include +#include +#include + +#include "as-resources.h" +#include "as-utils-private.h" + +/** + * SECTION:as-spdx + * @short_description: Helper functions to work with SPDX license descriptions. + * @include: appstream.h + * + */ + +typedef struct { + gboolean last_token_literal; + GPtrArray *array; + GString *collect; +} AsSpdxHelper; + +static gpointer +_g_ptr_array_last (GPtrArray *array) +{ + return g_ptr_array_index (array, array->len - 1); +} + +/** + * as_spdx_license_tokenize_drop: + * + * Helper function for as_spdx_license_tokenize(). + */ +static void +as_spdx_license_tokenize_drop (AsSpdxHelper *helper) +{ + const gchar *tmp = helper->collect->str; + guint i; + g_autofree gchar *last_literal = NULL; + struct { + const gchar *old; + const gchar *new; + } licenses[] = { + { "CC0", "CC0-1.0" }, + { "CC-BY", "CC-BY-3.0" }, + { "CC-BY-SA", "CC-BY-SA-3.0" }, + { "GFDL", "GFDL-1.3" }, + { "GPL-2", "GPL-2.0" }, + { "GPL-3", "GPL-3.0" }, + { "proprietary", "LicenseRef-proprietary" }, + { NULL, NULL } }; + + /* nothing from last time */ + if (helper->collect->len == 0) + return; + + /* is license enum */ + if (as_is_spdx_license_id (tmp)) { + g_ptr_array_add (helper->array, g_strdup_printf ("@%s", tmp)); + helper->last_token_literal = FALSE; + g_string_truncate (helper->collect, 0); + return; + } + + /* is license enum with "+" */ + if (g_str_has_suffix (tmp, "+")) { + g_autofree gchar *license_id = g_strndup (tmp, strlen (tmp) - 1); + if (as_is_spdx_license_id (license_id)) { + g_ptr_array_add (helper->array, g_strdup_printf ("@%s", license_id)); + g_ptr_array_add (helper->array, g_strdup ("+")); + helper->last_token_literal = FALSE; + g_string_truncate (helper->collect, 0); + return; + } + } + + /* is old license enum */ + for (i = 0; licenses[i].old != NULL; i++) { + if (g_strcmp0 (tmp, licenses[i].old) != 0) + continue; + g_ptr_array_add (helper->array, + g_strdup_printf ("@%s", licenses[i].new)); + helper->last_token_literal = FALSE; + g_string_truncate (helper->collect, 0); + return; + } + + /* is conjunctive */ + if (g_strcmp0 (tmp, "and") == 0 || g_strcmp0 (tmp, "AND") == 0) { + g_ptr_array_add (helper->array, g_strdup ("&")); + helper->last_token_literal = FALSE; + g_string_truncate (helper->collect, 0); + return; + } + + /* is disjunctive */ + if (g_strcmp0 (tmp, "or") == 0 || g_strcmp0 (tmp, "OR") == 0) { + g_ptr_array_add (helper->array, g_strdup ("|")); + helper->last_token_literal = FALSE; + g_string_truncate (helper->collect, 0); + return; + } + + /* is literal */ + if (helper->last_token_literal) { + last_literal = g_strdup (_g_ptr_array_last (helper->array)); + g_ptr_array_remove_index (helper->array, helper->array->len - 1); + g_ptr_array_add (helper->array, + g_strdup_printf ("%s %s", last_literal, tmp)); + } else { + g_ptr_array_add (helper->array, g_strdup (tmp)); + helper->last_token_literal = TRUE; + } + g_string_truncate (helper->collect, 0); +} + +/** + * as_is_spdx_license_id: + * @license_id: a single SPDX license ID, e.g. "GPL-3.0" + * + * Searches the known list of SPDX license IDs. + * + * Returns: %TRUE if the icon is a valid "SPDX license ID" + * + * Since: 0.9.8 + **/ +gboolean +as_is_spdx_license_id (const gchar *license_id) +{ + g_autoptr(GBytes) data = NULL; + g_autofree gchar *key = NULL; + + /* handle invalid */ + if (license_id == NULL || license_id[0] == '\0') + return FALSE; + + /* this is used to map non-SPDX licence-ids to legitimate values */ + if (g_str_has_prefix (license_id, "LicenseRef-")) + return TRUE; + + /* load the readonly data section and look for the icon name */ + data = g_resource_lookup_data (as_get_resource (), + "/org/freedesktop/appstream/spdx-license-ids.txt", + G_RESOURCE_LOOKUP_FLAGS_NONE, + NULL); + if (data == NULL) + return FALSE; + key = g_strdup_printf ("\n%s\n", license_id); + + return g_strstr_len (g_bytes_get_data (data, NULL), -1, key) != NULL; +} + +/** + * as_is_spdx_license_expression: + * @license: a SPDX license string, e.g. "CC-BY-3.0 and GFDL-1.3" + * + * Checks the licence string to check it being a valid licence. + * NOTE: SPDX licences can't typically contain brackets. + * + * Returns: %TRUE if the icon is a valid "SPDX license" + * + * Since: 0.9.8 + **/ +gboolean +as_is_spdx_license_expression (const gchar *license) +{ + guint i; + g_auto(GStrv) tokens = NULL; + + /* handle nothing set */ + if (license == NULL || license[0] == '\0') + return FALSE; + + /* no license information whatsoever */ + if (g_strcmp0 (license, "NONE") == 0) + return TRUE; + + /* creator has intentionally provided no information */ + if (g_strcmp0 (license, "NOASSERTION") == 0) + return TRUE; + + tokens = as_spdx_license_tokenize (license); + if (tokens == NULL) + return FALSE; + for (i = 0; tokens[i] != NULL; i++) { + if (tokens[i][0] == '@') { + if (as_is_spdx_license_id (tokens[i] + 1)) + continue; + } + if (as_is_spdx_license_id (tokens[i])) + continue; + if (g_strcmp0 (tokens[i], "&") == 0) + continue; + if (g_strcmp0 (tokens[i], "|") == 0) + continue; + if (g_strcmp0 (tokens[i], "+") == 0) + continue; + return FALSE; + } + + return TRUE; +} + +/** + * as_utils_spdx_license_3to2: + * + * SPDX decided to rename some of the really common license IDs in v3 + * which broke a lot of tools that we cannot really fix now + */ +static GString* +as_utils_spdx_license_3to2 (const gchar *license3) +{ + GString *license2 = g_string_new (license3); + as_gstring_replace (license2, "-only", ""); + as_gstring_replace (license2, "-or-later", "+"); + return license2; +} + +/** + * as_spdx_license_tokenize: + * @license: a license string, e.g. "LGPLv2+ and (QPL or GPLv2) and MIT" + * + * Tokenizes the SPDX license string (or any simarly formatted string) + * into parts. Any licence parts of the string e.g. "LGPL-2.0+" are prefexed + * with "@", the conjunctive replaced with "&" and the disjunctive replaced + * with "|". Brackets are added as indervidual tokens and other strings are + * appended into single tokens where possible. + * + * Returns: (transfer full): array of strings, or %NULL for invalid + * + * Since: 0.9.8 + **/ +gchar** +as_spdx_license_tokenize (const gchar *license) +{ + AsSpdxHelper helper; + g_autoptr(GString) license2 = NULL; + + /* handle invalid */ + if (license == NULL) + return NULL; + + /* SPDX broke the world with v3 */ + license2 = as_utils_spdx_license_3to2 (license); + + helper.last_token_literal = FALSE; + helper.collect = g_string_new (""); + helper.array = g_ptr_array_new_with_free_func (g_free); + for (guint i = 0; i < license2->len; i++) { + + /* handle brackets */ + const gchar tmp = license2->str[i]; + if (tmp == '(' || tmp == ')') { + as_spdx_license_tokenize_drop (&helper); + g_ptr_array_add (helper.array, g_strdup_printf ("%c", tmp)); + helper.last_token_literal = FALSE; + continue; + } + + /* space, so dump queue */ + if (tmp == ' ') { + as_spdx_license_tokenize_drop (&helper); + continue; + } + g_string_append_c (helper.collect, tmp); + } + + /* dump anything remaining */ + as_spdx_license_tokenize_drop (&helper); + + /* return GStrv */ + g_ptr_array_add (helper.array, NULL); + g_string_free (helper.collect, TRUE); + + return (gchar **) g_ptr_array_free (helper.array, FALSE); +} + +/** + * as_spdx_license_detokenize: + * @license_tokens: license tokens, typically from as_spdx_license_tokenize() + * + * De-tokenizes the SPDX licenses into a string. + * + * Returns: (transfer full): string, or %NULL for invalid + * + * Since: 0.9.8 + **/ +gchar* +as_spdx_license_detokenize (gchar **license_tokens) +{ + GString *tmp; + guint i; + + /* handle invalid */ + if (license_tokens == NULL) + return NULL; + + tmp = g_string_new (""); + for (i = 0; license_tokens[i] != NULL; i++) { + if (g_strcmp0 (license_tokens[i], "&") == 0) { + g_string_append (tmp, " AND "); + continue; + } + if (g_strcmp0 (license_tokens[i], "|") == 0) { + g_string_append (tmp, " OR "); + continue; + } + if (g_strcmp0 (license_tokens[i], "+") == 0) { + g_string_append (tmp, "+"); + continue; + } + if (license_tokens[i][0] != '@') { + g_string_append (tmp, license_tokens[i]); + continue; + } + g_string_append (tmp, license_tokens[i] + 1); + } + + return g_string_free (tmp, FALSE); +} + +/** + * as_license_to_spdx_id: + * @license: a not-quite SPDX license string, e.g. "GPLv3+" + * + * Converts a non-SPDX license into an SPDX format string where possible. + * + * Returns: the best-effort SPDX license string + * + * Since: 0.9.8 + **/ +gchar* +as_license_to_spdx_id (const gchar *license) +{ + GString *str; + guint i; + guint j; + guint license_len; + struct { + const gchar *old; + const gchar *new; + } convert[] = { + { " with exceptions", NULL }, + { " with advertising", NULL }, + { " and ", " AND " }, + { " or ", " OR " }, + { "AGPLv3+", "AGPL-3.0" }, + { "AGPLv3", "AGPL-3.0" }, + { "Artistic 2.0", "Artistic-2.0" }, + { "Artistic clarified", "Artistic-2.0" }, + { "Artistic", "Artistic-1.0" }, + { "ASL 1.1", "Apache-1.1" }, + { "ASL 2.0", "Apache-2.0" }, + { "Boost", "BSL-1.0" }, + { "BSD", "BSD-3-Clause" }, + { "CC0", "CC0-1.0" }, + { "CC-BY-SA", "CC-BY-SA-3.0" }, + { "CC-BY", "CC-BY-3.0" }, + { "CDDL", "CDDL-1.0" }, + { "CeCILL-C", "CECILL-C" }, + { "CeCILL", "CECILL-2.0" }, + { "CPAL", "CPAL-1.0" }, + { "CPL", "CPL-1.0" }, + { "EPL", "EPL-1.0" }, + { "Free Art", "ClArtistic" }, + { "GFDL", "GFDL-1.3" }, + { "GPL+", "GPL-1.0+" }, + { "GPLv2+", "GPL-2.0+" }, + { "GPLv2", "GPL-2.0" }, + { "GPLv3+", "GPL-3.0+" }, + { "GPLv3", "GPL-3.0" }, + { "IBM", "IPL-1.0" }, + { "LGPL+", "LGPL-2.1+" }, + { "LGPLv2.1", "LGPL-2.1" }, + { "LGPLv2+", "LGPL-2.1+" }, + { "LGPLv2", "LGPL-2.1" }, + { "LGPLv3+", "LGPL-3.0+" }, + { "LGPLv3", "LGPL-3.0" }, + { "LPPL", "LPPL-1.3c" }, + { "MPLv1.0", "MPL-1.0" }, + { "MPLv1.1", "MPL-1.1" }, + { "MPLv2.0", "MPL-2.0" }, + { "Netscape", "NPL-1.1" }, + { "OFL", "OFL-1.1" }, + { "Python", "Python-2.0" }, + { "QPL", "QPL-1.0" }, + { "SPL", "SPL-1.0" }, + { "zlib", "Zlib" }, + { "ZPLv2.0", "ZPL-2.0" }, + { "Unlicense", "CC0-1.0" }, + { "Public Domain", "LicenseRef-public-domain" }, + { "Copyright only", "LicenseRef-public-domain" }, + { "Proprietary", "LicenseRef-proprietary" }, + { "Commercial", "LicenseRef-proprietary" }, + { NULL, NULL } }; + + /* nothing set */ + if (license == NULL) + return NULL; + + /* already in SPDX format */ + if (as_is_spdx_license_id (license)) + return g_strdup (license); + + /* go through the string looking for case-insensitive matches */ + str = g_string_new (""); + license_len = strlen (license); + for (i = 0; i < license_len; i++) { + gboolean found = FALSE; + for (j = 0; convert[j].old != NULL; j++) { + guint old_len = strlen (convert[j].old); + if (g_ascii_strncasecmp (license + i, + convert[j].old, + old_len) != 0) + continue; + if (convert[j].new != NULL) + g_string_append (str, convert[j].new); + i += old_len - 1; + found = TRUE; + } + if (!found) + g_string_append_c (str, license[i]); + } + + return g_string_free (str, FALSE); +} + +static gboolean +as_validate_is_content_license_id (const gchar *license_id) +{ + if (g_strcmp0 (license_id, "@FSFAP") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@MIT") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@0BSD") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@CC0-1.0") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@CC-BY-3.0") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@CC-BY-4.0") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@CC-BY-SA-3.0") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@CC-BY-SA-4.0") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@GFDL-1.1") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@GFDL-1.2") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@GFDL-1.3") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@BSL-1.0") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@FTL") == 0) + return TRUE; + if (g_strcmp0 (license_id, "@FSFUL") == 0) + return TRUE; + if (g_strcmp0 (license_id, "&") == 0) + return TRUE; + if (g_strcmp0 (license_id, "|") == 0) + return TRUE; + if (g_strcmp0 (license_id, "+") == 0) + return TRUE; + return FALSE; +} + +/** + * as_license_is_metadata_license: + * @license: The SPDX license string to test. + * + * Check if the metadata license is suitable for mixing with other + * metadata and redistributing the bundled result (this means we + * prefer permissive licenses here, to not require people shipping + * catalog metadata to perform a full license review). + * + * This method checks against a hardcoded list of permissive licenses + * commonly used to license metadata under. + * + * Retrurns: %TRUE if the license contains only permissive licenses suitable + * as metadata license. + */ +gboolean +as_license_is_metadata_license (const gchar *license) +{ + guint i; + g_auto(GStrv) tokens = NULL; + + tokens = as_spdx_license_tokenize (license); + if (tokens == NULL) + return FALSE; + + for (i = 0; tokens[i] != NULL; i++) { + if (!as_validate_is_content_license_id (tokens[i])) + return FALSE; + } + + return TRUE; +} diff -Nru appstream-0.9.4/src/as-spdx.h appstream-0.12.0/src/as-spdx.h --- appstream-0.9.4/src/as-spdx.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-spdx.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,40 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_SPDX_H +#define __AS_SPDX_H + +#include + +G_BEGIN_DECLS + +gboolean as_is_spdx_license_id (const gchar *license_id); +gboolean as_is_spdx_license_expression (const gchar *license); + +gchar **as_spdx_license_tokenize (const gchar *license); +gchar *as_spdx_license_detokenize (gchar **license_tokens); + +gchar *as_license_to_spdx_id (const gchar *license); + +gboolean as_license_is_metadata_license (const gchar *license); + +G_END_DECLS + +#endif /* __AS_SPDX_H */ diff -Nru appstream-0.9.4/src/as-stemmer.c appstream-0.12.0/src/as-stemmer.c --- appstream-0.9.4/src/as-stemmer.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-stemmer.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,166 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "as-stemmer.h" + +#include +#include +#include +#ifdef HAVE_STEMMING +#include +#endif + +#include "as-utils.h" +#include "as-utils-private.h" + +/** + * SECTION:as-stemmer + * @short_description: Stemming helper singleton for AppStream searches. + */ + +struct _AsStemmer +{ + GObject parent_instance; + + struct sb_stemmer *sb; + GMutex mutex; +}; + +G_DEFINE_TYPE (AsStemmer, as_stemmer, G_TYPE_OBJECT) + +static gpointer as_stemmer_object = NULL; + +/** + * as_stemmer_finalize: + **/ +static void +as_stemmer_finalize (GObject *object) +{ +#ifdef HAVE_STEMMING + AsStemmer *stemmer = AS_STEMMER (object); + + sb_stemmer_delete (stemmer->sb); + g_mutex_clear (&stemmer->mutex); +#endif + + G_OBJECT_CLASS (as_stemmer_parent_class)->finalize (object); +} + +/** + * as_stemmer_init: + **/ +static void +as_stemmer_init (AsStemmer *stemmer) +{ +#ifdef HAVE_STEMMING + g_autofree gchar *locale = NULL; + g_autofree gchar *lang = NULL; + + g_mutex_init (&stemmer->mutex); + + locale = as_get_current_locale (); + lang = as_utils_locale_to_language (locale); + + as_stemmer_reload (stemmer, lang); +#endif +} + +/** + * as_stemmer_reload: + * @stemmer: A #AsStemmer + * @lang: The stemming language. + * + * Allows realoading the #AsStemmer with a different language. + */ +void +as_stemmer_reload (AsStemmer *stemmer, const gchar *lang) +{ +#ifdef HAVE_STEMMING + GMutexLocker *locker = g_mutex_locker_new (&stemmer->mutex); + + sb_stemmer_delete (stemmer->sb); + stemmer->sb = sb_stemmer_new (lang, NULL); + if (stemmer->sb == NULL) + g_debug ("Language %s can not be stemmed.", lang); + else + g_debug ("Stemming language is: %s", lang); + + g_mutex_locker_free (locker); +#endif +} + +/** + * as_stemmer_stem: + * @stemmer: A #AsStemmer + * @term: The input term to stem. + * + * Stems a string using Snowball. + * + * Returns: A stemmed string. + **/ +gchar* +as_stemmer_stem (AsStemmer *stemmer, const gchar *term) +{ +#ifdef HAVE_STEMMING + gchar *result; + GMutexLocker *locker = g_mutex_locker_new (&stemmer->mutex); + if (stemmer->sb == NULL) { + g_mutex_locker_free (locker); + return g_strdup (term); + } + + result = g_strdup ((gchar*) sb_stemmer_stem (stemmer->sb, + (unsigned char*) term, + strlen (term))); + + g_mutex_locker_free (locker); + return result; +#else + return g_strdup (term); +#endif +} + +/** + * as_stemmer_class_init: + **/ +static void +as_stemmer_class_init (AsStemmerClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->finalize = as_stemmer_finalize; +} + +/** + * as_stemmer_get: + * + * Gets the global #AsStemmer instance. + * + * Returns: (transfer none): an #AsStemmer + **/ +AsStemmer* +as_stemmer_get (void) +{ + if (as_stemmer_object == NULL) { + as_stemmer_object = g_object_new (AS_TYPE_STEMMER, NULL); + g_object_add_weak_pointer (as_stemmer_object, &as_stemmer_object); + } + + return AS_STEMMER (as_stemmer_object); +} diff -Nru appstream-0.9.4/src/as-stemmer.h appstream-0.12.0/src/as-stemmer.h --- appstream-0.9.4/src/as-stemmer.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-stemmer.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,44 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_STEMMER_H +#define __AS_STEMMER_H + +#include + +G_BEGIN_DECLS + +#define AS_TYPE_STEMMER (as_stemmer_get_type ()) +G_DECLARE_FINAL_TYPE (AsStemmer, as_stemmer, AS, STEMMER, GObject) + +AsStemmer *as_stemmer_get (void); + +void as_stemmer_reload (AsStemmer *stemmer, + const gchar *lang); +gchar *as_stemmer_stem (AsStemmer *stemmer, + const gchar *term); + +G_END_DECLS + +#endif /* __AS_STEMMER_H */ diff -Nru appstream-0.9.4/src/as-suggested.c appstream-0.12.0/src/as-suggested.c --- appstream-0.9.4/src/as-suggested.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-suggested.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,392 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Lucas Moura + * Copyright (C) 2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +/** + * SECTION: as-suggested + * @short_description: Suggestions for other software suggested by a component. + * @include: appstream.h + * + * This class provides a list of other component-ids suggested by a software component, as well + * as an origin of the suggestion (manually suggested by the upstream project, or + * automatically determined by heuristics). + */ + +#include "config.h" + +#include "as-suggested.h" +#include "as-suggested-private.h" +#include "as-variant-cache.h" + +typedef struct +{ + AsSuggestedKind kind; + GPtrArray *cpt_ids; /* of utf8 */ +} AsSuggestedPrivate; + +G_DEFINE_TYPE_WITH_PRIVATE (AsSuggested, as_suggested, G_TYPE_OBJECT) +#define GET_PRIVATE(o) (as_suggested_get_instance_private (o)) + +/** + * as_suggested_kind_to_string: + * @kind: the %AsSuggestedKind. + * + * Converts the enumerated value to an text representation. + * + * Returns: string version of @kind + **/ +const gchar* +as_suggested_kind_to_string (AsSuggestedKind kind) +{ + if (kind == AS_SUGGESTED_KIND_UPSTREAM) + return "upstream"; + if (kind == AS_SUGGESTED_KIND_HEURISTIC) + return "heuristic"; + + return "unknown"; +} + +/** + * as_suggested_kind_from_string: + * @kind_str: the string. + * + * Converts the text representation to an enumerated value. + * + * Returns: a #AsSuggestedKind or %AS_SUGGESTED_KIND_UNKNOWN for unknown + **/ +AsSuggestedKind +as_suggested_kind_from_string (const gchar *kind_str) +{ + /* if the kind is not set, we assume upstream */ + if (kind_str == NULL) + return AS_SUGGESTED_KIND_UPSTREAM; + + if (g_strcmp0 (kind_str, "upstream") == 0) + return AS_SUGGESTED_KIND_UPSTREAM; + if (g_strcmp0 (kind_str, "heuristic") == 0) + return AS_SUGGESTED_KIND_HEURISTIC; + + return AS_SUGGESTED_KIND_UNKNOWN; +} + +/** + * as_suggested_finalize: + **/ +static void +as_suggested_finalize (GObject *object) +{ + AsSuggested *suggested = AS_SUGGESTED (object); + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + + g_ptr_array_unref (priv->cpt_ids); + + G_OBJECT_CLASS (as_suggested_parent_class)->finalize (object); +} + +/** + * as_suggested_init: + **/ +static void +as_suggested_init (AsSuggested *suggested) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + + priv->cpt_ids = g_ptr_array_new_with_free_func (g_free); +} + +/** + * as_suggested_get_kind: + * @suggested: a #AsSuggested instance. + * + * Gets the suggested kind. + * + * Returns: the #AssuggestedKind + **/ +AsSuggestedKind +as_suggested_get_kind (AsSuggested *suggested) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + return priv->kind; +} + +/** + * as_suggested_set_kind: + * @suggested: a #AsSuggested instance. + * @kind: the #AsSuggestedKind, e.g. %AS_SUGGESTED_KIND_HEURISTIC. + * + * Sets the suggested kind. + **/ +void +as_suggested_set_kind (AsSuggested *suggested, AsSuggestedKind kind) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + priv->kind = kind; +} + +/** + * as_suggested_get_ids: + * @suggested: a #AsSuggested instance. + * + * Get a list of components id that generated the suggestion + * + * Returns: (transfer none) (element-type utf8): an array of components id + */ +GPtrArray* +as_suggested_get_ids (AsSuggested *suggested) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + return priv->cpt_ids; +} + + +/** + * as_suggested_add_id: + * @suggested: a #AsSuggested instance. + * @cid: The component id to add + * + * Add a component id to this suggested object. + **/ +void +as_suggested_add_id (AsSuggested *suggested, const gchar *cid) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + g_ptr_array_add (priv->cpt_ids, g_strdup (cid)); +} + +/** + * as_suggested_is_valid: + * @suggested: a #AsSuggested instance. + * + * Check if the essential properties of this suggestion are + * populated with useful data. + * + * Returns: %TRUE if we have useful data. + */ +gboolean +as_suggested_is_valid (AsSuggested *suggested) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + + if (priv->kind == AS_SUGGESTED_KIND_UNKNOWN) + return FALSE; + if (priv->cpt_ids->len == 0) + return FALSE; + + return TRUE; +} + +/** + * as_suggested_load_from_xml: + * @suggested: a #AsSuggested instance. + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads data from an XML node. + **/ +gboolean +as_suggested_load_from_xml (AsSuggested *suggested, AsContext *ctx, xmlNode *node, GError **error) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + xmlNode *iter; + g_autofree gchar *type_str = NULL; + + type_str = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + priv->kind = as_suggested_kind_from_string (type_str); + if (priv->kind == AS_SUGGESTED_KIND_UNKNOWN) { + g_debug ("Found suggests tag of unknown type '%s' at %s:%li. Ignoring it.", + type_str, as_context_get_filename (ctx), xmlGetLineNo (node)); + return FALSE; + } + + for (iter = node->children; iter != NULL; iter = iter->next) { + if (iter->type != XML_ELEMENT_NODE) + continue; + + if (g_strcmp0 ((gchar*) iter->name, "id") == 0) { + g_autofree gchar *content = NULL; + content = as_xml_get_node_value (iter); + + if (content != NULL) + as_suggested_add_id (suggested, content); + } + } + + return priv->cpt_ids->len > 0; +} + +/** + * as_suggested_to_xml_node: + * @suggested: a #AsSuggested instance. + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +void +as_suggested_to_xml_node (AsSuggested *suggested, AsContext *ctx, xmlNode *root) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + guint j; + xmlNode *node; + + /* non-upstream tags are not allowed in metainfo files */ + if ((priv->kind != AS_SUGGESTED_KIND_UPSTREAM) && (as_context_get_style (ctx) == AS_FORMAT_STYLE_METAINFO)) + return; + + node = xmlNewChild (root, NULL, (xmlChar*) "suggests", NULL); + xmlNewProp (node, (xmlChar*) "type", + (xmlChar*) as_suggested_kind_to_string (priv->kind)); + + for (j = 0; j < priv->cpt_ids->len; j++) { + const gchar *cid = (const gchar*) g_ptr_array_index (priv->cpt_ids, j); + xmlNewTextChild (node, NULL, + (xmlChar*) "id", + (xmlChar*) cid); + } +} + +/** + * as_suggested_load_from_yaml: + * @suggested: a #AsSuggested instance. + * @ctx: the AppStream document context. + * @node: the YAML node. + * @error: a #GError. + * + * Loads data from a YAML field. + **/ +gboolean +as_suggested_load_from_yaml (AsSuggested *suggested, AsContext *ctx, GNode *node, GError **error) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + GNode *n; + + for (n = node->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + const gchar *value = as_yaml_node_get_value (n); + + if (g_strcmp0 (key, "type") == 0) { + priv->kind = as_suggested_kind_from_string (value); + } else if (g_strcmp0 (key, "ids") == 0) { + as_yaml_list_to_str_array (n, priv->cpt_ids); + } else { + as_yaml_print_unknown ("Suggests", key); + } + } + + return TRUE; +} + +/** + * as_suggested_emit_yaml: + * @suggested: a #AsSuggested instance. + * @ctx: the AppStream document context. + * @emitter: The YAML emitter to emit data on. + * + * Emit YAML data for this object. + **/ +void +as_suggested_emit_yaml (AsSuggested *suggested, AsContext *ctx, yaml_emitter_t *emitter) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + + /* start mapping for this suggestion */ + as_yaml_mapping_start (emitter); + + /* type */ + as_yaml_emit_entry (emitter, "type", as_suggested_kind_to_string (priv->kind)); + + /* component-ids */ + as_yaml_emit_sequence (emitter, "ids", priv->cpt_ids); + + /* end mapping for the suggestion */ + as_yaml_mapping_end (emitter); +} + +/** + * as_suggested_to_variant: + * @suggested: a #AsSuggested instance. + * @builder: A #GVariantBuilder + * + * Serialize the current active state of this object to a GVariant + * for use in the on-disk binary cache. + */ +void +as_suggested_to_variant (AsSuggested *suggested, GVariantBuilder *builder) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + GVariant *sug_var; + + sug_var = g_variant_new ("{uv}", priv->kind, as_variant_from_string_ptrarray (priv->cpt_ids)); + g_variant_builder_add_value (builder, sug_var); +} + +/** + * as_suggested_set_from_variant: + * @suggested: a #AsSuggested instance. + * @variant: The #GVariant to read from. + * + * Read the active state of this object from a #GVariant serialization. + * This is used by the on-disk binary cache. + */ +gboolean +as_suggested_set_from_variant (AsSuggested *suggested, GVariant *variant) +{ + AsSuggestedPrivate *priv = GET_PRIVATE (suggested); + GVariantIter inner_iter; + GVariant *id_child; + g_autoptr(GVariant) ids_var = NULL; + + g_variant_get (variant, "{uv}", &priv->kind, &ids_var); + + g_variant_iter_init (&inner_iter, ids_var); + while ((id_child = g_variant_iter_next_value (&inner_iter))) { + as_suggested_add_id (suggested, + g_variant_get_string (id_child, NULL)); + g_variant_unref (id_child); + } + + return TRUE; +} + +/** + * as_suggested_new: + * + * Creates a new #AsSuggested. + * + * Returns: (transfer full): a new #AsSuggested + **/ +AsSuggested* +as_suggested_new (void) +{ + AsSuggested *suggested; + suggested = g_object_new (AS_TYPE_SUGGESTED, NULL); + return AS_SUGGESTED (suggested); +} + +/** + * as_suggested_class_init: + **/ +static void +as_suggested_class_init (AsSuggestedClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->finalize = as_suggested_finalize; +} diff -Nru appstream-0.9.4/src/as-suggested.h appstream-0.12.0/src/as-suggested.h --- appstream-0.9.4/src/as-suggested.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-suggested.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,81 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2016 Lucas Moura + * Copyright (C) 2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_SUGGESTED_H +#define __AS_SUGGESTED_H + +#include + +G_BEGIN_DECLS + +#define AS_TYPE_SUGGESTED (as_suggested_get_type ()) +G_DECLARE_DERIVABLE_TYPE (AsSuggested, as_suggested, AS, SUGGESTED, GObject) + +struct _AsSuggestedClass +{ + GObjectClass parent_class; + /*< private >*/ + void (*_as_reserved1) (void); + void (*_as_reserved2) (void); + void (*_as_reserved3) (void); + void (*_as_reserved4) (void); + void (*_as_reserved5) (void); + void (*_as_reserved6) (void); +}; + +/** + * AsSuggestedKind: + * @AS_SUGGESTED_KIND_UNKNOWN: Unknown suggested kind + * @AS_SUGGESTED_KIND_UPSTREAM: Suggestions provided by the upstream project. + * @AS_SUGGESTED_KIND_HEURISTIC: Suggestions provided by automatic heuristics. + * + * The suggested type. + **/ +typedef enum { + AS_SUGGESTED_KIND_UNKNOWN, + AS_SUGGESTED_KIND_UPSTREAM, + AS_SUGGESTED_KIND_HEURISTIC, + /*< private >*/ + AS_SUGGESTED_KIND_LAST +} AsSuggestedKind; + +AsSuggestedKind as_suggested_kind_from_string (const gchar *kind_str); +const gchar *as_suggested_kind_to_string (AsSuggestedKind kind); + +AsSuggested *as_suggested_new (void); + +AsSuggestedKind as_suggested_get_kind (AsSuggested *suggested); +void as_suggested_set_kind (AsSuggested *suggested, + AsSuggestedKind kind); + +GPtrArray *as_suggested_get_ids (AsSuggested *suggested); +void as_suggested_add_id (AsSuggested *suggested, + const gchar *cid); + +gboolean as_suggested_is_valid (AsSuggested *suggested); + +G_END_DECLS + +#endif /* __AS_SUGGESTED_H */ diff -Nru appstream-0.9.4/src/as-suggested-private.h appstream-0.12.0/src/as-suggested-private.h --- appstream-0.9.4/src/as-suggested-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-suggested-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,55 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_SUGGESTED_PRIVATE_H +#define __AS_SUGGESTED_PRIVATE_H + +#include "as-suggested.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +gboolean as_suggested_load_from_xml (AsSuggested *suggested, + AsContext *ctx, + xmlNode *node, + GError **error); +void as_suggested_to_xml_node (AsSuggested *suggested, + AsContext *ctx, + xmlNode *root); + +gboolean as_suggested_load_from_yaml (AsSuggested *suggested, + AsContext *ctx, + GNode *node, + GError **error); +void as_suggested_emit_yaml (AsSuggested *suggested, + AsContext *ctx, + yaml_emitter_t *emitter); + +void as_suggested_to_variant (AsSuggested *suggested, + GVariantBuilder *builder); +gboolean as_suggested_set_from_variant (AsSuggested *suggested, + GVariant *variant); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_SUGGESTED_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-translation.c appstream-0.12.0/src/as-translation.c --- appstream-0.9.4/src/as-translation.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-translation.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2016 Matthias Klumpp + * Copyright (C) 2016-2017 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -19,6 +19,7 @@ */ #include "as-translation.h" +#include "as-translation-private.h" #include #include @@ -167,6 +168,56 @@ } /** + * as_translation_load_from_xml: + * @tr: a #AsTranslation instance. + * @ctx: the AppStream document context. + * @node: the XML node. + * @error: a #GError. + * + * Loads data from an XML node. + **/ +gboolean +as_translation_load_from_xml (AsTranslation *tr, AsContext *ctx, xmlNode *node, GError **error) +{ + AsTranslationPrivate *priv = GET_PRIVATE (tr); + g_autofree gchar *prop = NULL; + g_autofree gchar *content = NULL; + + prop = (gchar*) xmlGetProp (node, (xmlChar*) "type"); + priv->kind = as_translation_kind_from_string (prop); + if (priv->kind == AS_TRANSLATION_KIND_UNKNOWN) + return FALSE; + + content = as_xml_get_node_value (node); + as_translation_set_id (tr, content); + + return TRUE; +} + +/** + * as_translation_to_xml_node: + * @tr: a #AsTranslation instance. + * @ctx: the AppStream document context. + * @root: XML node to attach the new nodes to. + * + * Serializes the data to an XML node. + **/ +void +as_translation_to_xml_node (AsTranslation *tr, AsContext *ctx, xmlNode *root) +{ + AsTranslationPrivate *priv = GET_PRIVATE (tr); + xmlNode *n; + + /* the translations tag is only valid in metainfo files */ + if (as_context_get_style (ctx) != AS_FORMAT_STYLE_METAINFO) + return; + + n = xmlNewTextChild (root, NULL, (xmlChar*) "translation", (xmlChar*) priv->id); + xmlNewProp (n, (xmlChar*) "type", + (xmlChar*) as_translation_kind_to_string (priv->kind)); +} + +/** * as_translation_new: * * Creates a new #AsTranslation. diff -Nru appstream-0.9.4/src/as-translation-private.h appstream-0.12.0/src/as-translation-private.h --- appstream-0.9.4/src/as-translation-private.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-translation-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,43 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef __AS_TRANSLATION_PRIVATE_H +#define __AS_TRANSLATION_PRIVATE_H + +#include "as-translation.h" +#include "as-xml.h" +#include "as-yaml.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +gboolean as_translation_load_from_xml (AsTranslation *tr, + AsContext *ctx, + xmlNode *node, + GError **error); + +void as_translation_to_xml_node (AsTranslation *tr, + AsContext *ctx, + xmlNode *root); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_TRANSLATION_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-utils.c appstream-0.12.0/src/as-utils.c --- appstream-0.9.4/src/as-utils.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-utils.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,7 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * * Copyright (C) 2012-2016 Matthias Klumpp - * Copyright (C) 2014 Richard Hughes + * Copyright (C) 2016 Richard Hughes * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -20,6 +20,7 @@ */ #include "as-utils.h" +#include "as-utils-private.h" #include #include @@ -37,7 +38,10 @@ #include #include +#include "as-resources.h" #include "as-category.h" +#include "as-component.h" +#include "as-component-private.h" /** * SECTION:as-utils @@ -48,16 +52,32 @@ * as well. */ + +/** + * as_get_appstream_version: + * + * Get the version of the AppStream library that is currently used + * as a string. + * + * Returns: The AppStream version. + */ +const gchar* +as_get_appstream_version (void) +{ + return PACKAGE_VERSION; +} + /** * as_description_markup_convert_simple: * @markup: the text to copy. + * @error: A #GError or %NULL. * * Converts an XML description markup into a simple printable form. * - * Returns: (transfer full): a newly allocated %NULL terminated string + * Returns: (transfer full): a newly allocated %NULL terminated string. **/ gchar* -as_description_markup_convert_simple (const gchar *markup) +as_markup_convert_simple (const gchar *markup, GError **error) { xmlDoc *doc = NULL; xmlNode *root; @@ -251,81 +271,6 @@ } /** - * as_utils_categories_from_strv: - * @categories_strv: a string array - * @system_categories: list of #AsCategory objects available on this system - * - * Create a list of categories from string array - * - * Returns: (element-type AsCategory) (transfer full): #GPtrArray of #AsCategory objects matching the strings in the array - */ -GPtrArray* -as_utils_categories_from_strv (gchar** categories_strv, GPtrArray* system_categories) -{ - GPtrArray *cat_list; - guint i; - - g_return_val_if_fail (categories_strv != NULL, NULL); - g_return_val_if_fail (system_categories != NULL, NULL); - - /* This should be done way smarter... */ - cat_list = g_ptr_array_new_with_free_func (g_object_unref); - for (i = 0; categories_strv[i] != NULL; i++) { - gchar *idstr; - guint j; - idstr = categories_strv[i]; - for (j = 0; j < system_categories->len; j++) { - AsCategory *sys_cat; - gchar *catname1; - gchar *catname2; - gchar *str; - sys_cat = (AsCategory*) g_ptr_array_index (system_categories, j); - catname1 = g_strdup (as_category_get_name (sys_cat)); - if (catname1 == NULL) - continue; - str = g_utf8_strdown (catname1, -1); - g_free (catname1); - catname1 = str; - catname2 = g_utf8_strdown (idstr, -1); - if (g_strcmp0 (catname1, catname2) == 0) { - g_free (catname1); - g_free (catname2); - g_ptr_array_add (cat_list, g_object_ref (sys_cat)); - break; - } - g_free (catname1); - g_free (catname2); - } - } - - return cat_list; -} - -/** - * as_utils_categories_from_str: - * @categories_str: string with semicolon-separated categories - * @system_categories: list of #AsCategory objects available on this system - * - * Create a list of categories from semicolon-separated string - * - * Returns: (element-type AsCategory) (transfer full): #GPtrArray of #AsCategory objcts matching the strings in the array - */ -GPtrArray* -as_utils_categories_from_str (const gchar* categories_str, GPtrArray* system_categories) -{ - gchar **cats; - GPtrArray *cat_list; - - g_return_val_if_fail (categories_str != NULL, NULL); - - cats = g_strsplit (categories_str, ";", 0); - cat_list = as_utils_categories_from_strv (cats, system_categories); - g_strfreev (cats); - - return cat_list; -} - -/** * as_utils_find_files_matching: */ GPtrArray* @@ -490,9 +435,9 @@ g_return_val_if_fail (array != NULL, NULL); /* copy the array to a strv */ - value = g_new0 (gchar *, array->len + 1); - for (i=0; ilen; i++) { - value_temp = (const gchar *) g_ptr_array_index (array, i); + value = g_new0 (gchar*, array->len + 1); + for (i = 0; i < array->len; i++) { + value_temp = (const gchar*) g_ptr_array_index (array, i); value[i] = g_strdup (value_temp); } @@ -500,38 +445,86 @@ } /** + * as_gstring_replace: + * @string: The #GString to operate on + * @search: The text to search for + * @replace: The text to use for substitutions + * + * Performs multiple search and replace operations on the given string. + * + * Returns: the number of replacements done, or 0 if @search is not found. + **/ +guint +as_gstring_replace (GString *string, const gchar *search, const gchar *replace) +{ + gchar *tmp; + guint count = 0; + gsize search_idx = 0; + gsize replace_len; + gsize search_len; + + g_return_val_if_fail (string != NULL, 0); + g_return_val_if_fail (search != NULL, 0); + g_return_val_if_fail (replace != NULL, 0); + + /* nothing to do */ + if (string->len == 0) + return 0; + + search_len = strlen (search); + replace_len = strlen (replace); + + do { + tmp = g_strstr_len (string->str + search_idx, -1, search); + if (tmp == NULL) + break; + + /* advance the counter in case @replace contains @search */ + search_idx = (gsize) (tmp - string->str); + + /* reallocate the string if required */ + if (search_len > replace_len) { + g_string_erase (string, + (gssize) search_idx, + (gssize) (search_len - replace_len)); + memcpy (tmp, replace, replace_len); + } else if (search_len < replace_len) { + g_string_insert_len (string, + (gssize) search_idx, + replace, + (gssize) (replace_len - search_len)); + /* we have to treat this specially as it could have + * been reallocated when the insertion happened */ + memcpy (string->str + search_idx, replace, replace_len); + } else { + /* just memcmp in the new string */ + memcpy (tmp, replace, replace_len); + } + search_idx += replace_len; + count++; + } while (TRUE); + + return count; +} + +/** * as_str_replace: + * @str: The string to operate on + * @old_str: The old value to replace. + * @new_str: The new value to replace @old_str with. + * + * Performs search & replace on the given string. + * + * Returns: A new string with the characters replaced. */ gchar* -as_str_replace (const gchar *str, const gchar *old, const gchar *new) +as_str_replace (const gchar *str, const gchar *old_str, const gchar *new_str) { - gchar *ret, *r; - const gchar *p, *q; - size_t oldlen = strlen(old); - size_t count, retlen, newlen = strlen(new); - - if (oldlen != newlen) { - for (count = 0, p = str; (q = strstr(p, old)) != NULL; p = q + oldlen) - count++; - /* this is undefined if p - str > PTRDIFF_MAX */ - retlen = p - str + strlen(p) + count * (newlen - oldlen); - } else - retlen = strlen(str); - - if ((ret = malloc(retlen + 1)) == NULL) - return NULL; - - for (r = ret, p = str; (q = strstr(p, old)) != NULL; p = q + oldlen) { - /* this is undefined if q - p > PTRDIFF_MAX */ - ptrdiff_t l = q - p; - memcpy(r, p, l); - r += l; - memcpy(r, new, newlen); - r += newlen; - } - strcpy(r, p); + GString *gstr; - return ret; + gstr = g_string_new (str); + as_gstring_replace (gstr, old_str, new_str); + return g_string_free (gstr, FALSE); } /** @@ -694,3 +687,513 @@ return TRUE; return FALSE; } + +/** + * as_utils_locale_to_language: + * @locale: The locale string. + * + * Get language part from a locale string. + */ +gchar* +as_utils_locale_to_language (const gchar *locale) +{ + gchar *tmp; + gchar *country_code; + + /* invalid */ + if (locale == NULL) + return NULL; + + /* return the part before the _ (not always 2 chars!) */ + country_code = g_strdup (locale); + tmp = g_strstr_len (country_code, -1, "_"); + if (tmp != NULL) + *tmp = '\0'; + return country_code; +} + +/** + * as_ptr_array_find_string: + * @array: gchar* array + * @value: string to find + * + * Finds a string in a pointer array. + * + * Returns: the const string, or %NULL if not found + **/ +const gchar* +as_ptr_array_find_string (GPtrArray *array, const gchar *value) +{ + const gchar *tmp; + guint i; + for (i = 0; i < array->len; i++) { + tmp = g_ptr_array_index (array, i); + if (g_strcmp0 (tmp, value) == 0) + return tmp; + } + return NULL; +} + + +/** + * as_hash_table_keys_to_array: + * @table: The hash table. + * @array: The pointer array. + * + * Add keys of a hash table to a pointer array. + * The hash table keys must be strings. + */ +void +as_hash_table_string_keys_to_array (GHashTable *table, GPtrArray *array) +{ + GHashTableIter iter; + gpointer value; + + g_hash_table_iter_init (&iter, table); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + const gchar *str = (const gchar*) value; + g_ptr_array_add (array, g_strdup (str)); + } +} + +/** + * as_utils_locale_is_compatible: + * @locale1: a locale string, or %NULL + * @locale2: a locale string, or %NULL + * + * Calculates if one locale is compatible with another. + * When doing the calculation the locale and language code is taken into + * account if possible. + * + * Returns: %TRUE if the locale is compatible. + * + * Since: 0.9.5 + **/ +gboolean +as_utils_locale_is_compatible (const gchar *locale1, const gchar *locale2) +{ + g_autofree gchar *lang1 = as_utils_locale_to_language (locale1); + g_autofree gchar *lang2 = as_utils_locale_to_language (locale2); + + /* we've specified "don't care" and locale unspecified */ + if (locale1 == NULL && locale2 == NULL) + return TRUE; + + /* forward */ + if (locale1 == NULL && locale2 != NULL) { + const gchar *const *locales = g_get_language_names (); + return g_strv_contains (locales, locale2) || + g_strv_contains (locales, lang2); + } + + /* backwards */ + if (locale1 != NULL && locale2 == NULL) { + const gchar *const *locales = g_get_language_names (); + return g_strv_contains (locales, locale1) || + g_strv_contains (locales, lang1); + } + + /* both specified */ + if (g_strcmp0 (locale1, locale2) == 0) + return TRUE; + if (g_strcmp0 (locale1, lang2) == 0) + return TRUE; + if (g_strcmp0 (lang1, locale2) == 0) + return TRUE; + return FALSE; +} + +/** + * as_utils_search_token_valid: + * @token: the search token + * + * Checks the search token if it is valid. Valid tokens are at least 3 chars in + * length, not common words like "and", and do not contain markup. + * + * Returns: %TRUE is the search token was valid. + **/ +gboolean +as_utils_search_token_valid (const gchar *token) +{ + guint i; + /* TODO: Localize this list */ + const gchar *blacklist[] = { + "and", "the", "application", "for", "you", "your", + "with", "can", "are", "from", "that", "use", "allows", "also", + "this", "other", "all", "using", "has", "some", "like", "them", + "well", "not", "using", "not", "but", "set", "its", "into", + "such", "was", "they", "where", "want", "only", "about", + "uses", "font", "features", "designed", "provides", "which", + "many", "used", "org", "fonts", "open", "more", "based", + "different", "including", "will", "multiple", "out", "have", + "each", "when", "need", "most", "both", "their", "even", + "way", "several", "been", "while", "very", "add", "under", + "what", "those", "much", "either", "currently", "one", + "support", "make", "over", "these", "there", "without", "etc", + "main", + NULL }; + if (strlen (token) < 3) + return FALSE; + if (g_strstr_len (token, -1, "<") != NULL) + return FALSE; + if (g_strstr_len (token, -1, ">") != NULL) + return FALSE; + if (g_strstr_len (token, -1, "(") != NULL) + return FALSE; + if (g_strstr_len (token, -1, ")") != NULL) + return FALSE; + for (i = 0; blacklist[i] != NULL; i++) { + if (g_strcmp0 (token, blacklist[i]) == 0) + return FALSE; + } + + return TRUE; +} + +/** + * as_utils_is_category_id: + * @category_name: an XDG category name, e.g. "ProjectManagement" + * + * Searches the known list of registered XDG category names. + * See https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry + * for a reference. + * + * Returns: %TRUE if the category name is valid + * + * Since: 0.9.7 + **/ +gboolean +as_utils_is_category_name (const gchar *category_name) +{ + g_autoptr(GBytes) data = NULL; + g_autofree gchar *key = NULL; + + /* custom spec-extensions are generally valid if prefixed correctly */ + if (g_str_has_prefix (category_name, "X-")) + return TRUE; + + /* load the readonly data section and look for the category name */ + data = g_resource_lookup_data (as_get_resource (), + "/org/freedesktop/appstream/xdg-category-names.txt", + G_RESOURCE_LOOKUP_FLAGS_NONE, + NULL); + if (data == NULL) + return FALSE; + key = g_strdup_printf ("\n%s\n", category_name); + return g_strstr_len (g_bytes_get_data (data, NULL), -1, key) != NULL; +} + +/** + * as_utils_is_tld: + * @tld: a top-level domain without dot, e.g. "de", "org", "name" + * + * Searches the known list of TLDs we allow for AppStream IDs. + * This excludes internationalized names. + * + * Returns: %TRUE if the TLD is valid + * + * Since: 0.9.8 + **/ +gboolean +as_utils_is_tld (const gchar *tld) +{ + g_autoptr(GBytes) data = NULL; + g_autofree gchar *key = NULL; + + /* load the readonly data section and look for the TLD */ + data = g_resource_lookup_data (as_get_resource (), + "/org/freedesktop/appstream/iana-filtered-tld-list.txt", + G_RESOURCE_LOOKUP_FLAGS_NONE, + NULL); + if (data == NULL) + return FALSE; + key = g_strdup_printf ("\n%s\n", tld); + return g_strstr_len (g_bytes_get_data (data, NULL), -1, key) != NULL; +} + +/** + * as_utils_is_desktop_environment: + * @desktop: a desktop environment id. + * + * Searches the known list of desktop environments AppStream + * knows about. + * + * Returns: %TRUE if the desktop-id is valid + * + * Since: 0.10.0 + **/ +gboolean +as_utils_is_desktop_environment (const gchar *desktop) +{ + g_autoptr(GBytes) data = NULL; + g_autofree gchar *key = NULL; + + /* load the readonly data section and look for the TLD */ + data = g_resource_lookup_data (as_get_resource (), + "/org/freedesktop/appstream/desktop-environments.txt", + G_RESOURCE_LOOKUP_FLAGS_NONE, + NULL); + if (data == NULL) + return FALSE; + key = g_strdup_printf ("\n%s\n", desktop); + return g_strstr_len (g_bytes_get_data (data, NULL), -1, key) != NULL; +} + +/** + * as_utils_sort_components_into_categories: + * @cpts: (element-type AsComponent): List of components. + * @categories: (element-type AsCategory): List of categories to sort components into. + * @check_duplicates: Whether to check for duplicates. + * + * Sorts all components in @cpts into the #AsCategory categories listed in @categories. + */ +void +as_utils_sort_components_into_categories (GPtrArray *cpts, GPtrArray *categories, gboolean check_duplicates) +{ + guint i; + + for (i = 0; i < cpts->len; i++) { + guint j; + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + + for (j = 0; j < categories->len; j++) { + guint k; + GPtrArray *children; + gboolean added_to_main = FALSE; + AsCategory *main_cat = AS_CATEGORY (g_ptr_array_index (categories, j)); + + if (as_component_is_member_of_category (cpt, main_cat)) { + if (!check_duplicates || !as_category_has_component (main_cat, cpt)) { + as_category_add_component (main_cat, cpt); + added_to_main = TRUE; + } + } + + /* fortunately, categories are only nested one level deep in all known cases. + * if this will ever change, we will need to adjust this code to go through + * a whole tree of categories, eww... */ + children = as_category_get_children (main_cat); + for (k = 0; k < children->len; k++) { + AsCategory *subcat = AS_CATEGORY (g_ptr_array_index (children, k)); + + /* skip duplicates */ + if (check_duplicates && as_category_has_component (subcat, cpt)) + continue; + + if (as_component_is_member_of_category (cpt, subcat)) { + as_category_add_component (subcat, cpt); + if (!added_to_main) { + if (!check_duplicates || !as_category_has_component (main_cat, cpt)) { + as_category_add_component (main_cat, cpt); + } + } + } + } + } + } +} + +/** + * as_utils_compare_versions: + * + * Compare alpha and numeric segments of two versions. + * The version compare algorithm is also used by RPM. + * + * Returns: 1: a is newer than b + * 0: a and b are the same version + * -1: b is newer than a + */ +gint +as_utils_compare_versions (const gchar* a, const gchar *b) +{ + /* easy comparison to see if versions are identical */ + if (g_strcmp0 (a, b) == 0) + return 0; + + gchar oldch1, oldch2; + gchar abuf[strlen(a)+1], bbuf[strlen(b)+1]; + gchar *str1 = abuf, *str2 = bbuf; + gchar *one, *two; + int rc; + gboolean isnum; + + strcpy(str1, a); + strcpy(str2, b); + + one = str1; + two = str2; + + /* loop through each version segment of str1 and str2 and compare them */ + while (*one || *two) { + while (*one && !g_ascii_isalnum (*one) && *one != '~') one++; + while (*two && !g_ascii_isalnum (*two) && *two != '~') two++; + + /* handle the tilde separator, it sorts before everything else */ + if (*one == '~' || *two == '~') { + if (*one != '~') return 1; + if (*two != '~') return -1; + one++; + two++; + continue; + } + + /* If we ran to the end of either, we are finished with the loop */ + if (!(*one && *two)) break; + + str1 = one; + str2 = two; + + /* grab first completely alpha or completely numeric segment */ + /* leave one and two pointing to the start of the alpha or numeric */ + /* segment and walk str1 and str2 to end of segment */ + if (g_ascii_isdigit (*str1)) { + while (*str1 && g_ascii_isdigit (*str1)) str1++; + while (*str2 && g_ascii_isdigit (*str2)) str2++; + isnum = TRUE; + } else { + while (*str1 && g_ascii_isalpha (*str1)) str1++; + while (*str2 && g_ascii_isalpha (*str2)) str2++; + isnum = FALSE; + } + + /* save character at the end of the alpha or numeric segment */ + /* so that they can be restored after the comparison */ + oldch1 = *str1; + *str1 = '\0'; + oldch2 = *str2; + *str2 = '\0'; + + /* this cannot happen, as we previously tested to make sure that */ + /* the first string has a non-null segment */ + if (one == str1) return -1; /* arbitrary */ + + /* take care of the case where the two version segments are */ + /* different types: one numeric, the other alpha (i.e. empty) */ + /* numeric segments are always newer than alpha segments */ + if (two == str2) return (isnum ? 1 : -1); + + if (isnum) { + size_t onelen, twolen; + /* this used to be done by converting the digit segments */ + /* to ints using atoi() - it's changed because long */ + /* digit segments can overflow an int - this should fix that. */ + + /* throw away any leading zeros - it's a number, right? */ + while (*one == '0') one++; + while (*two == '0') two++; + + /* whichever number has more digits wins */ + onelen = strlen (one); + twolen = strlen (two); + if (onelen > twolen) return 1; + if (twolen > onelen) return -1; + } + + /* strcmp will return which one is greater - even if the two */ + /* segments are alpha or if they are numeric. don't return */ + /* if they are equal because there might be more segments to */ + /* compare */ + rc = strcmp (one, two); + if (rc) return (rc < 1 ? -1 : 1); + + /* restore character that was replaced by null above */ + *str1 = oldch1; + one = str1; + *str2 = oldch2; + two = str2; + } + + /* this catches the case where all numeric and alpha segments have */ + /* compared identically but the segment sepparating characters were */ + /* different */ + if ((!*one) && (!*two)) return 0; + + /* whichever version still has characters left over wins */ + if (!*one) return -1; else return 1; +} + +/** + * as_utils_build_data_id: + * + * Builds the unique metadata ID using the supplied information. + */ +gchar* +as_utils_build_data_id (AsComponentScope scope, + const gchar *origin, + AsBundleKind bundle_kind, + const gchar *cid) +{ + /* build the data-id */ + return g_strdup_printf ("%s/%s/%s/%s", + as_component_scope_to_string (scope), + origin, + as_bundle_kind_to_string (bundle_kind), + cid); +} + +/** + * as_utils_data_id_get_cid: + * @data_id: The data-id. + * + * Get the component-id part of the data-id. + */ +gchar* +as_utils_data_id_get_cid (const gchar *data_id) +{ + g_auto(GStrv) parts = NULL; + + parts = g_strsplit (data_id, "/", 4); + if (g_strv_length (parts) != 4) + return NULL; + return g_strdup (parts[3]); +} + +/** + * as_utils_get_component_bundle_kind: + * + * Check which bundling system the component uses. + */ +AsBundleKind +as_utils_get_component_bundle_kind (AsComponent *cpt) +{ + GPtrArray *bundles; + AsBundleKind bundle_kind; + + /* determine bundle - what should we do if there are multiple bundles of different types + * defined for one component? */ + bundle_kind = AS_BUNDLE_KIND_PACKAGE; + bundles = as_component_get_bundles (cpt); + if (bundles->len > 0) + bundle_kind = as_bundle_get_kind (AS_BUNDLE (g_ptr_array_index (bundles, 0))); + + return bundle_kind; +} + +/** + * as_utils_build_data_id_for_cpt: + * @cpt: The component to build the ID for. + * + * Builds the unique metadata ID for component @cpt. + */ +gchar* +as_utils_build_data_id_for_cpt (AsComponent *cpt) +{ + const gchar *origin; + AsBundleKind bundle_kind; + + /* determine bundle - what should we do if there are multiple bundles of different types + * defined for one component? */ + bundle_kind = as_utils_get_component_bundle_kind (cpt); + + /* NOTE: packages share one namespace, therefore we edit the origin here for now. */ + if (bundle_kind == AS_BUNDLE_KIND_PACKAGE) + origin = "os"; + else + origin = as_component_get_origin (cpt); + + /* build the data-id */ + return as_utils_build_data_id (as_component_get_scope (cpt), + origin, + bundle_kind, + as_component_get_id (cpt)); +} diff -Nru appstream-0.9.4/src/as-utils.h appstream-0.12.0/src/as-utils.h --- appstream-0.9.4/src/as-utils.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-utils.h 2018-04-04 15:53:56.000000000 +0000 @@ -25,10 +25,23 @@ G_BEGIN_DECLS -gchar *as_description_markup_convert_simple (const gchar *markup); -gchar *as_get_current_locale (void); -gboolean as_str_empty (const gchar* str); -GDateTime *as_iso8601_to_datetime (const gchar *iso_date); +gchar *as_markup_convert_simple (const gchar *markup, + GError **error); + +gboolean as_utils_locale_is_compatible (const gchar *locale1, + const gchar *locale2); +gboolean as_utils_is_category_name (const gchar *category_name); +gboolean as_utils_is_tld (const gchar *tld); +gboolean as_utils_is_desktop_environment (const gchar *desktop); + +void as_utils_sort_components_into_categories (GPtrArray *cpts, + GPtrArray *categories, + gboolean check_duplicates); + +gint as_utils_compare_versions (const gchar* a, + const gchar *b); + +const gchar *as_get_appstream_version (void); G_END_DECLS diff -Nru appstream-0.9.4/src/as-utils-private.h appstream-0.12.0/src/as-utils-private.h --- appstream-0.9.4/src/as-utils-private.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-utils-private.h 2018-04-04 15:53:56.000000000 +0000 @@ -22,44 +22,72 @@ #define __AS_UTILS_PRIVATE_H #include +#include "as-settings-private.h" +#include "as-component.h" G_BEGIN_DECLS +#pragma GCC visibility push(hidden) -gboolean as_utils_delete_dir_recursive (const gchar* dirname); +gchar *as_get_current_locale (void); + +gboolean as_str_empty (const gchar* str); +GDateTime *as_iso8601_to_datetime (const gchar *iso_date); -GPtrArray *as_utils_categories_from_strv (gchar **categories_strv, - GPtrArray *system_categories); -GPtrArray *as_utils_categories_from_str (const gchar *categories_str, - GPtrArray *system_categories); +gboolean as_utils_delete_dir_recursive (const gchar* dirname); +AS_INTERNAL_VISIBLE GPtrArray *as_utils_find_files_matching (const gchar *dir, const gchar *pattern, gboolean recursive, GError **error); +AS_INTERNAL_VISIBLE GPtrArray *as_utils_find_files (const gchar *dir, gboolean recursive, GError **error); gboolean as_utils_is_root (void); + +AS_INTERNAL_VISIBLE gboolean as_utils_is_writable (const gchar *path); +guint as_gstring_replace (GString *string, + const gchar *search, + const gchar *replace); gchar *as_str_replace (const gchar *str, const gchar *old_str, const gchar *new_str); gchar **as_ptr_array_to_strv (GPtrArray *array); +const gchar *as_ptr_array_find_string (GPtrArray *array, + const gchar *value); +void as_hash_table_string_keys_to_array (GHashTable *table, + GPtrArray *array); gboolean as_touch_location (const gchar *fname); -gboolean as_copy_file (const gchar *source, const gchar *destination, GError **error); void as_reset_umask (void); +AS_INTERNAL_VISIBLE +gboolean as_copy_file (const gchar *source, const gchar *destination, GError **error); + gboolean as_is_cruft_locale (const gchar *locale); gchar *as_locale_strip_encoding (gchar *locale); +gchar *as_utils_locale_to_language (const gchar *locale); gchar *as_get_current_arch (void); gboolean as_arch_compatible (const gchar *arch1, const gchar *arch2); +gboolean as_utils_search_token_valid (const gchar *token); + +gchar *as_utils_build_data_id (AsComponentScope scope, + const gchar *origin, + AsBundleKind bundle_kind, + const gchar *cid); +gchar *as_utils_data_id_get_cid (const gchar *data_id); +AsBundleKind as_utils_get_component_bundle_kind (AsComponent *cpt); +gchar *as_utils_build_data_id_for_cpt (AsComponent *cpt); + +#pragma GCC visibility pop G_END_DECLS #endif /* __AS_UTILS_PRIVATE_H */ diff -Nru appstream-0.9.4/src/as-validator.c appstream-0.12.0/src/as-validator.c --- appstream-0.9.4/src/as-validator.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-validator.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2017 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -23,7 +23,7 @@ * @short_description: Validator and report-generator about AppStream XML metadata * @include: appstream.h * - * This object is able to validate AppStream XML metadata (distro and upstream) + * This object is able to validate AppStream XML metadata (collection and metainfo) * and to generate a report about issues found with it. * * See also: #AsMetadata @@ -41,7 +41,7 @@ #include "as-utils.h" #include "as-utils-private.h" -#include "as-xmldata.h" +#include "as-spdx.h" #include "as-component.h" #include "as-component-private.h" @@ -51,6 +51,7 @@ AsComponent *current_cpt; gchar *current_fname; + gboolean check_urls; } AsValidatorPrivate; G_DEFINE_TYPE_WITH_PRIVATE (AsValidator, as_validator, G_TYPE_OBJECT) @@ -85,19 +86,19 @@ priv->current_fname = NULL; priv->current_cpt = NULL; + priv->check_urls = FALSE; } /** * as_validator_add_issue: **/ static void -as_validator_add_issue (AsValidator *validator, AsIssueImportance importance, AsIssueKind kind, const gchar *format, ...) +as_validator_add_issue (AsValidator *validator, xmlNode *node, AsIssueImportance importance, AsIssueKind kind, const gchar *format, ...) { va_list args; gchar *buffer; - gchar *str; gchar *id_str; - g_autofree gchar *fname = NULL; + g_autofree gchar *location = NULL; AsValidatorIssue *issue; AsValidatorPrivate *priv = GET_PRIVATE (validator); @@ -111,25 +112,19 @@ as_validator_issue_set_message (issue, buffer); g_free (buffer); - /* find location */ - if (priv->current_fname == NULL) - fname = g_strdup (""); - else - fname = g_strdup (priv->current_fname); + /* update location information */ + if (priv->current_fname != NULL) + as_validator_issue_set_filename (issue, priv->current_fname); - if (priv->current_cpt == NULL) - str = g_strdup_printf ("%s:", fname); - else if (as_str_empty (as_component_get_id (priv->current_cpt))) - str = g_strdup_printf ("%s:???", fname); - else - str = g_strdup_printf ("%s:%s", - fname, - as_component_get_id (priv->current_cpt)); - as_validator_issue_set_location (issue, str); - g_free (str); + if (priv->current_cpt != NULL) + as_validator_issue_set_cid (issue, as_component_get_id (priv->current_cpt)); + if (node != NULL) + as_validator_issue_set_line (issue, node->line); + + location = as_validator_issue_get_location (issue); id_str = g_strdup_printf ("%s - %s", - as_validator_issue_get_location (issue), + location, as_validator_issue_get_message (issue)); /* str ownership is transferred to the hashtable */ g_hash_table_insert (priv->issues, id_str, issue); @@ -203,6 +198,97 @@ } /** + * as_validator_can_check_urls: + * + * Check whether we can validate URLs using curl. + */ +static gboolean +as_validator_can_check_urls (AsValidator *validator) +{ + return g_file_test ("/usr/bin/curl", G_FILE_TEST_EXISTS); +} + +/** + * as_validator_web_url_exists: + * + * Check if an URL exists using curl. + */ +static gboolean +as_validator_web_url_exists (AsValidator *validator, const gchar *url) +{ + AsValidatorPrivate *priv = GET_PRIVATE (validator); + /* we use absolute paths here to avoid someone injecting malicious curl/wget into our environment */ + const gchar *curl_bin = "/usr/bin/curl"; + gint exit_status = 0; + + /* do nothing and assume the URL exists if we shouldn't check URLs */ + if (!priv->check_urls) + return TRUE; + + if (g_file_test (curl_bin, G_FILE_TEST_EXISTS)) { + /* Normally we would use the --head option of curl here to only fetch the server headers. + * However, there is quite a bunch of unfriendly/misconfigured servers out there that simply + * refuse to answer HEAD requests. + * So, to be compatible with more stuff, we tell curl to attempt to fetch the first byte of the + * document and report failure. We intentionally do not follow redirects. */ + const gchar *argv[11]; + argv[0] = curl_bin; + argv[1] = "--output"; + argv[2] = "/dev/null"; + argv[3] = "--silent"; + argv[4] = "--fail"; + argv[5] = "--max-time"; + argv[6] = "20"; /* timeout of 20s, so this times out before a buildsystem (like Meson) times out after 30s */ + argv[7] = "-r"; + argv[8] = "0-0"; + argv[9] = url; + argv[10] = NULL; + g_spawn_sync (NULL, /* wdir */ + (gchar**) argv, + NULL, /* env */ + G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, + NULL, /* setup function */ + NULL, /* user data */ + NULL, /* stdin */ + NULL, /* stderr */ + &exit_status, + NULL); + return exit_status == 0; + } else { + /* we can't validate this because we have no wget/curl - we should have emitted an error about this already, so + * we just return TRUE here to not spam the user in misleading error messages */ + return TRUE; + } +} + +/** + * as_validator_get_check_urls: + * @validator: a #AsValidator instance. + * + * Returns: %TRUE in case we check if remote URLs exist. + */ +gboolean +as_validator_get_check_urls (AsValidator *validator) +{ + AsValidatorPrivate *priv = GET_PRIVATE (validator); + return priv->check_urls; +} + +/** + * as_validator_set_check_urls: + * @validator: a #AsValidator instance. + * + * Set this value to make the #AsValidator check whether remote URLs + * actually exist. + */ +void +as_validator_set_check_urls (AsValidator *validator, gboolean value) +{ + AsValidatorPrivate *priv = GET_PRIVATE (validator); + priv->check_urls = value; +} + +/** * as_validator_check_type_property: **/ static gchar* @@ -213,7 +299,7 @@ prop = (gchar*) xmlGetProp (node, (xmlChar*) "type"); content = (gchar*) xmlNodeGetContent (node); if (prop == NULL) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, node, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_PROPERTY_MISSING, "'%s' tag has no 'type' property: %s", @@ -229,25 +315,62 @@ * as_validator_check_content: **/ static void -as_validator_check_content_empty (AsValidator *validator, const gchar *content, const gchar *tag_name, AsIssueImportance importance, AsComponent *cpt) +as_validator_check_content_empty (AsValidator *validator, xmlNode *node, const gchar *tag_path, AsIssueImportance importance, AsComponent *cpt) { - gchar *tmp; - tmp = g_strdup (content); - g_strstrip (tmp); - if (!as_str_empty (tmp)) - goto out; + g_autofree gchar *node_content = NULL; + + node_content = (gchar*) xmlNodeGetContent (node); + g_strstrip (node_content); + if (!as_str_empty (node_content)) + return; /* release tags are allowed to be empty */ - if (g_str_has_prefix (tag_name, "release")) - goto out; + if (g_str_has_prefix (tag_path, "release")) + return; - as_validator_add_issue (validator, + as_validator_add_issue (validator, node, importance, AS_ISSUE_KIND_VALUE_WRONG, "Found empty '%s' tag.", - tag_name); -out: - g_free (tmp); + tag_path); +} + +/** + * as_validate_has_hyperlink: + * + * Check if @text contains a hyperlink. + */ +static gboolean +as_validate_has_hyperlink (const gchar *text) +{ + if (text == NULL) + return FALSE; + if (g_strstr_len (text, -1, "http://") != NULL) + return TRUE; + if (g_strstr_len (text, -1, "https://") != NULL) + return TRUE; + if (g_strstr_len (text, -1, "ftp://") != NULL) + return TRUE; + return FALSE; +} + +/** + * as_validate_is_url: + * + * Check if @str is an URL. + */ +static gboolean +as_validate_is_url (const gchar *str) +{ + if (str == NULL) + return FALSE; + if (g_str_has_prefix (str, "http://")) + return TRUE; + if (g_str_has_prefix (str, "https://")) + return TRUE; + if (g_str_has_prefix (str, "ftp://")) + return TRUE; + return FALSE; } /** @@ -260,24 +383,21 @@ for (iter = node->children; iter != NULL; iter = iter->next) { const gchar *node_name; - gchar *node_content; /* discard spaces */ if (iter->type != XML_ELEMENT_NODE) continue; node_name = (const gchar*) iter->name; - node_content = (gchar*) xmlNodeGetContent (iter); if (g_strcmp0 (node_name, allowed_tagname) == 0) { - gchar *tag_path; + g_autofree gchar *tag_path = NULL; tag_path = g_strdup_printf ("%s/%s", (const gchar*) node->name, node_name); as_validator_check_content_empty (validator, - node_content, + iter, tag_path, AS_ISSUE_IMPORTANCE_WARNING, cpt); - g_free (tag_path); } else { - as_validator_add_issue (validator, + as_validator_add_issue (validator, node, AS_ISSUE_IMPORTANCE_WARNING, AS_ISSUE_KIND_TAG_UNKNOWN, "Found tag '%s' in section '%s'. Only '%s' tags are allowed.", @@ -285,8 +405,6 @@ (const gchar*) node->name, allowed_tagname); } - - g_free (node_content); } } @@ -300,7 +418,7 @@ lang = (gchar*) xmlGetProp (node, (xmlChar*) "lang"); if (lang != NULL) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, node, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_PROPERTY_INVALID, format, @@ -313,14 +431,12 @@ * as_validator_check_description_tag: **/ static void -as_validator_check_description_tag (AsValidator *validator, xmlNode* node, AsComponent *cpt, AsParserMode mode) +as_validator_check_description_tag (AsValidator *validator, xmlNode* node, AsComponent *cpt, AsFormatStyle mode) { xmlNode *iter; - gchar *node_content; - gchar *node_name; gboolean first_paragraph = TRUE; - if (mode == AS_PARSER_MODE_UPSTREAM) { + if (mode == AS_FORMAT_STYLE_METAINFO) { as_validator_check_nolocalized (validator, node, (const gchar*) node->name, @@ -329,63 +445,70 @@ } for (iter = node->children; iter != NULL; iter = iter->next) { + const gchar *node_name = (gchar*) iter->name; + g_autofree gchar *node_content = (gchar*) xmlNodeGetContent (iter); + /* discard spaces */ if (iter->type != XML_ELEMENT_NODE) continue; - node_name = (gchar*) iter->name; - node_content = (gchar*) xmlNodeGetContent (iter); if ((g_strcmp0 (node_name, "ul") != 0) && (g_strcmp0 (node_name, "ol") != 0)) { as_validator_check_content_empty (validator, - node_content, - node_name, - AS_ISSUE_IMPORTANCE_WARNING, - cpt); + node, + node_name, + AS_ISSUE_IMPORTANCE_WARNING, + cpt); } if (g_strcmp0 (node_name, "p") == 0) { - if (mode == AS_PARSER_MODE_DISTRO) { + if (mode == AS_FORMAT_STYLE_COLLECTION) { as_validator_check_nolocalized (validator, - iter, - "description/p", - cpt, - "The '%s' tag should not be localized in distro metadata. Localize the whole 'description' tag instead."); + iter, + "description/p", + cpt, + "The '%s' tag should not be localized in collection metadata. Localize the whole 'description' tag instead."); } - if ((first_paragraph) && (strlen (node_content) < 100)) { - as_validator_add_issue (validator, + if ((first_paragraph) && (strlen (node_content) < 80)) { + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_INFO, AS_ISSUE_KIND_VALUE_ISSUE, - "First 'description/p' paragraph might be too short.", + "First 'description/p' paragraph might be too short (< 80 characters).", node_content); } first_paragraph = FALSE; } else if (g_strcmp0 (node_name, "ul") == 0) { - if (mode == AS_PARSER_MODE_DISTRO) { + if (mode == AS_FORMAT_STYLE_COLLECTION) { as_validator_check_nolocalized (validator, iter, "description/ul", cpt, - "The '%s' tag should not be localized in distro metadata. Localize the whole 'description' tag instead."); + "The '%s' tag should not be localized in collection metadata. Localize the whole 'description' tag instead."); } as_validator_check_children_quick (validator, iter, "li", cpt); } else if (g_strcmp0 (node_name, "ol") == 0) { - if (mode == AS_PARSER_MODE_DISTRO) { + if (mode == AS_FORMAT_STYLE_COLLECTION) { as_validator_check_nolocalized (validator, iter, "description/ol", cpt, - "The '%s' tag should not be localized in distro metadata. Localize the whole 'description' tag instead."); + "The '%s' tag should not be localized in collection metadata. Localize the whole 'description' tag instead."); } as_validator_check_children_quick (validator, iter, "li", cpt); } else { - as_validator_add_issue (validator, + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_WARNING, AS_ISSUE_KIND_TAG_UNKNOWN, "Found tag '%s' in 'description' section. Only 'p', 'ul' and 'ol' are allowed.", node_name); } - g_free (node_content); + if (as_validate_has_hyperlink (node_content)) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The description contains an URL. This is not allowed, please use the tag to share links.", + node_name); + } } } @@ -395,23 +518,423 @@ static void as_validator_check_appear_once (AsValidator *validator, xmlNode *node, GHashTable *known_tags, AsComponent *cpt) { - gchar *lang; + g_autofree gchar *lang = NULL; + gchar *tag_id; const gchar *node_name; - /* localized tags may appear more than once, we only test the unlocalized versions */ - lang = (gchar*) xmlGetProp (node, (xmlChar*) "lang"); - if (lang != NULL) { - g_free (lang); - return; - } + /* generate tag-id to make a unique identifier for localized and unlocalized tags */ node_name = (const gchar*) node->name; + lang = (gchar*) xmlGetProp (node, (xmlChar*) "lang"); + if (lang == NULL) + tag_id = g_strdup (node_name); + else + tag_id = g_strdup_printf ("%s (lang=%s)", node_name, lang); - if (g_hash_table_contains (known_tags, node_name)) { - as_validator_add_issue (validator, + if (g_hash_table_contains (known_tags, tag_id)) { + as_validator_add_issue (validator, node, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_TAG_DUPLICATED, "The tag '%s' appears multiple times, while it should only be defined once per component.", - node_name); + tag_id); + } + + /* add to list of known tags (takes ownership/frees tag_id) */ + g_hash_table_add (known_tags, tag_id); +} + +/** + * as_validator_validate_component_id: + * + * Validate the component-ID. + */ +static void +as_validator_validate_component_id (AsValidator *validator, xmlNode *idnode, AsComponent *cpt) +{ + guint i; + g_auto(GStrv) cid_parts = NULL; + gboolean hyphen_found = FALSE; + g_autofree gchar *cid = (gchar*) xmlNodeGetContent (idnode); + + cid_parts = g_strsplit (cid, ".", -1); + if (g_strv_length (cid_parts) < 3) { + if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_DESKTOP_APP) { + /* since the ID and .desktop-file-id are tied together, we can't make this an error for desktop apps */ + as_validator_add_issue (validator, idnode, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_VALUE_WRONG, + "The component ID is not a reverse domain-name. Please update the ID and that of the accompanying .desktop file to follow the latest version of the Desktop-Entry and AppStream specifications and avoid future issues."); + } else { + /* anything which isn't a .desktop app must follow the schema though */ + as_validator_add_issue (validator, idnode, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The component ID is no reverse domain-name."); + } + } else { + /* some people just add random dots to their ID - check if we have an actual known TLD as first part, to be more certain that this is a reverse domain name + * (this issue happens quite often with old .desktop files) */ + if (!as_utils_is_tld (cid_parts[0])) { + as_validator_add_issue (validator, idnode, + AS_ISSUE_IMPORTANCE_INFO, + AS_ISSUE_KIND_VALUE_WRONG, + "The component ID might not follow the reverse domain-name schema (we do not know about the TLD '%s').", cid_parts[0]); + } + } + + /* validate characters in AppStream ID */ + for (i = 0; cid[i] != '\0'; i++) { + /* check if we have a printable, alphanumeric ASCII character or a dot, hyphen or underscore */ + if ((!g_ascii_isalnum (cid[i])) && + (cid[i] != '.') && + (cid[i] != '-') && + (cid[i] != '_')) { + g_autofree gchar *c = NULL; + c = g_utf8_substring (cid, i, i + 1); + as_validator_add_issue (validator, idnode, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The component ID [%s] contains an invalid character: '%s'", cid, c); + } + + if (!hyphen_found && cid[i] == '-') { + hyphen_found = TRUE; + as_validator_add_issue (validator, idnode, + AS_ISSUE_IMPORTANCE_INFO, + AS_ISSUE_KIND_VALUE_WRONG, + "The component ID [%s] contains a hyphen/minus. Using a hyphen is strongly discouraged, to keep interoperability with other tools such as D-Bus. " + "Ideally, replace any hyphens with an underscore ('_')", cid); + } + } + + /* check if any segment starts with a number */ + for (i = 0; cid_parts[i] != NULL; i++) { + if (g_ascii_isdigit (cid_parts[i][0])) { + as_validator_add_issue (validator, idnode, + AS_ISSUE_IMPORTANCE_INFO, + AS_ISSUE_KIND_VALUE_WRONG, + "The component ID [%s] contains a segment starting with a number. Starting a segment of the reverse-DNS ID with a number is strongly discouraged, " + "to keep interoperability with other tools such as D-Bus. " + "Ideally, prefix these sections with an underscore (%s → _%s)", cid, cid_parts[i], cid_parts[i]); + break; + } + } + + + /* a hyphen in the ID is bad news, because we can't use the ID on DBus and it also clashes with other naming schemes */ + if (g_strstr_len (cid, -1, "-") != NULL) { + } + + /* project-group specific constraints on the ID */ + if ((g_strcmp0 (as_component_get_project_group (cpt), "Freedesktop") == 0) || + (g_strcmp0 (as_component_get_project_group (cpt), "FreeDesktop") == 0)) { + if (!g_str_has_prefix (cid, "org.freedesktop.")) + as_validator_add_issue (validator, idnode, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The component is part of the Freedesktop project, but its ID does not start with fd.o's reverse-DNS name (\"org.freedesktop\")."); + } else if (g_strcmp0 (as_component_get_project_group (cpt), "KDE") == 0) { + if (!g_str_has_prefix (cid, "org.kde.")) + as_validator_add_issue (validator, idnode, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The component is part of the KDE project, but its ID does not start with KDEs reverse-DNS name (\"org.kde\")."); + } else if (g_strcmp0 (as_component_get_project_group (cpt), "GNOME") == 0) { + if (!g_str_has_prefix (cid, "org.gnome.")) + as_validator_add_issue (validator, idnode, + AS_ISSUE_IMPORTANCE_PEDANTIC, + AS_ISSUE_KIND_VALUE_WRONG, + "The component is part of the GNOME project, but its ID does not start with GNOMEs reverse-DNS name (\"org.gnome\")."); + } +} + +/** + * as_validator_validate_project_license: + */ +static void +as_validator_validate_project_license (AsValidator *validator, xmlNode *license_node) +{ + guint i; + g_auto(GStrv) licenses = NULL; + g_autofree gchar *license_id = (gchar*) xmlNodeGetContent (license_node); + + licenses = as_spdx_license_tokenize (license_id); + if (licenses == NULL) { + as_validator_add_issue (validator, license_node, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "SPDX license expression '%s' could not be parsed.", + license_id); + return; + } + for (i = 0; licenses[i] != NULL; i++) { + if (g_strcmp0 (licenses[i], "&") == 0 || + g_strcmp0 (licenses[i], "|") == 0 || + g_strcmp0 (licenses[i], "+") == 0 || + g_strcmp0 (licenses[i], "(") == 0 || + g_strcmp0 (licenses[i], ")") == 0) + continue; + if (licenses[i][0] != '@' || + !as_is_spdx_license_id (licenses[i] + 1)) { + as_validator_add_issue (validator, license_node, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_VALUE_WRONG, + "SPDX license ID '%s' is unknown.", + licenses[i]); + return; + } + } +} + +/** + * as_validator_validate_metadata_license: + */ +static void +as_validator_validate_metadata_license (AsValidator *validator, xmlNode *license_node) +{ + gboolean requires_all_tokens = TRUE; + guint license_bad_cnt = 0; + guint license_good_cnt = 0; + g_auto(GStrv) tokens = NULL; + g_autofree gchar *license_expression = (gchar*) xmlNodeGetContent (license_node); + + tokens = as_spdx_license_tokenize (license_expression); + if (tokens == NULL) { + as_validator_add_issue (validator, license_node, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "SPDX license expression '%s' could not be parsed.", + license_expression); + return; + } + + /* this is too complicated to process */ + for (guint i = 0; tokens[i] != NULL; i++) { + if (g_strcmp0 (tokens[i], "(") == 0 || + g_strcmp0 (tokens[i], ")") == 0) { + as_validator_add_issue (validator, license_node, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_VALUE_WRONG, + "The metadata itself seems to be licensed under a complex collection of licenses. Please license the data under a simple permissive license, like FSFAP, CC-0-1.0 or MIT " + "to allow distributors to include it in mixed data collections without the risk of license violations due to mutually incompatible licenses."); + return; + } + } + + /* this is a simple expression parser and can be easily tricked */ + for (guint i = 0; tokens[i] != NULL; i++) { + if (g_strcmp0 (tokens[i], "+") == 0) + continue; + if (g_strcmp0 (tokens[i], "|") == 0) { + requires_all_tokens = FALSE; + continue; + } + if (g_strcmp0 (tokens[i], "&") == 0) { + requires_all_tokens = TRUE; + continue; + } + if (as_license_is_metadata_license (tokens[i])) { + license_good_cnt++; + } else { + license_bad_cnt++; + } + } + + /* any valid token makes this valid */ + if (!requires_all_tokens && license_good_cnt > 0) + return; + + /* all tokens are required to be valid */ + if (requires_all_tokens && license_bad_cnt == 0) + return; + + /* looks like the license was bad */ + as_validator_add_issue (validator, license_node, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_VALUE_WRONG, + "The metadata itself does not seem to be licensed under a permissive license. Please license the data under a permissive license, like FSFAP, CC-0-1.0 or MIT " + "to allow distributors to include it in mixed data collections without the risk of license violations due to mutually incompatible licenses."); +} + +/** + * as_validator_validate_update_contact: + */ +static void +as_validator_validate_update_contact (AsValidator *validator, xmlNode *uc_node) +{ + g_autofree gchar *text = (gchar*) xmlNodeGetContent (uc_node); + + if ((g_strstr_len (text, -1, "@") == NULL) && + (g_strstr_len (text, -1, "_at_") == NULL) && + (g_strstr_len (text, -1, "_AT_") == NULL)) { + if (g_strstr_len (text, -1, ".") == NULL) { + as_validator_add_issue (validator, uc_node, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The update-contact '%s' does not appear to be a valid email address.", + text); + } + } +} + +/** + * as_validator_check_screenshots: + * + * Validate a "screenshots" tag. + **/ +static void +as_validator_check_screenshots (AsValidator *validator, xmlNode *node, AsComponent *cpt) +{ + xmlNode *iter; + as_validator_check_children_quick (validator, node, "screenshot", cpt); + + for (iter = node->children; iter != NULL; iter = iter->next) { + xmlNode *iter2; + gboolean image_found = FALSE; + gboolean caption_found = FALSE; + + if (iter->type != XML_ELEMENT_NODE) + continue; + + for (iter2 = iter->children; iter2 != NULL; iter2 = iter2->next) { + const gchar *node_name = (const gchar*) iter2->name; + + if (iter2->type != XML_ELEMENT_NODE) + continue; + + if (g_strcmp0 (node_name, "image") == 0) { + g_autofree gchar *image_url = (gchar*) xmlNodeGetContent (iter2); + + image_found = TRUE; + + if (!as_validator_web_url_exists (validator, image_url)) { + as_validator_add_issue (validator, iter2, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_REMOTE_ERROR, + "Unable to reach screenshot image on remote location '%s' - does the image exist?", + image_url); + } + } else if (g_strcmp0 (node_name, "caption") == 0) { + caption_found = TRUE; + } else { + as_validator_add_issue (validator, iter2, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_TAG_UNKNOWN, + "Found tag '%s' in a screenshot. Only and tags are allowed.", + (const gchar*) iter2->name); + } + } + + if (g_strcmp0 ((const gchar*) iter->name, "screenshot") != 0) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_TAG_UNKNOWN, + "Found tag '%s' in a screenshots group. Only tags are allowed.", + (const gchar*) iter->name); + } + + if (!image_found) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_TAG_MISSING, + "The screenshot does not contain any images."); + } + + if (!caption_found) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_PEDANTIC, + AS_ISSUE_KIND_TAG_MISSING, + "The screenshot does not have a caption text."); + } + } +} + +/** + * as_validator_check_requires_recommends: + **/ +static void +as_validator_check_requires_recommends (AsValidator *validator, xmlNode *node, AsComponent *cpt, AsRelationKind kind) +{ + xmlNode *iter; + + for (iter = node->children; iter != NULL; iter = iter->next) { + const gchar *node_name; + g_autofree gchar *content = NULL; + g_autofree gchar *version = NULL; + gboolean can_have_version; + AsRelationItemKind item_kind; + + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) + continue; + node_name = (const gchar*) iter->name; + content = as_xml_get_node_value (iter); + + item_kind = as_relation_item_kind_from_string (node_name); + if (item_kind == AS_RELATION_ITEM_KIND_UNKNOWN) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_TAG_UNKNOWN, + "Found tag '%s' in a requires/recommends group. A relation of this type is unknown.", + node_name); + continue; + } + + if (g_strcmp0 (content, "") == 0) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_MISSING, + "Missing value for requires/recommends item."); + continue; + } + + switch (item_kind) { + case AS_RELATION_ITEM_KIND_MEMORY: + case AS_RELATION_ITEM_KIND_MODALIAS: + can_have_version = FALSE; + break; + default: + can_have_version = TRUE; + } + + version = (gchar*) xmlGetProp (iter, (xmlChar*) "version"); + if (version != NULL) { + AsRelationCompare compare; + g_autofree gchar *compare_str = (gchar*) xmlGetProp (iter, (xmlChar*) "compare"); + + if (!can_have_version) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_PROPERTY_INVALID, + "Found version property on required/recommended item of type '%s'. Items of this type should not have a version.", + as_relation_item_kind_to_string (item_kind)); + continue; + } + + if (compare_str == NULL) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_INFO, + AS_ISSUE_KIND_PROPERTY_MISSING, + "Found version property on required/recommended item, but not 'compare' property. It is recommended to explicitly define a comparison operation."); + continue; + } + + compare = as_relation_compare_from_string (compare_str); + if (compare == AS_RELATION_COMPARE_UNKNOWN) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "Invalid version comparison operation '%s' on item.", + compare_str); + } + } + + if ((kind == AS_RELATION_KIND_REQUIRES) && (item_kind == AS_RELATION_ITEM_KIND_MEMORY)) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_INFO, + AS_ISSUE_KIND_UNUSUAL, + "Found a memory size dependency in a 'requires' tag. This means users will not be able to even install the component without having enough RAM." " " + "This is usually not intended and you want to use 'memory' in the 'recommends' tag instead."); + } } } @@ -419,45 +942,80 @@ * as_validator_validate_component_node: **/ static AsComponent* -as_validator_validate_component_node (AsValidator *validator, xmlNode *root, AsParserMode mode) +as_validator_validate_component_node (AsValidator *validator, AsContext *ctx, xmlNode *root) { - gchar *cpttype; xmlNode *iter; - AsXMLData *xdt; AsComponent *cpt; - gchar *metadata_license = NULL; - GHashTable *found_tags; - const gchar *summary; + g_autofree gchar *cpttype = NULL; + g_autoptr(GHashTable) found_tags = NULL; + + AsFormatStyle mode; + gboolean has_metadata_license = FALSE; found_tags = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + mode = as_context_get_style (ctx); /* validate the resulting AsComponent for sanity */ - xdt = as_xmldata_new (); - as_xmldata_initialize (xdt, "C", NULL, NULL, NULL, 0); - as_xmldata_set_parser_mode (xdt, mode); - cpt = as_component_new (); - as_xmldata_parse_component_node (xdt, root, cpt, NULL); - g_object_unref (xdt); - + as_component_load_from_xml (cpt, ctx, root, NULL); as_validator_set_current_cpt (validator, cpt); /* check if component type is valid */ cpttype = (gchar*) xmlGetProp (root, (xmlChar*) "type"); if (cpttype != NULL) { if (as_component_kind_from_string (cpttype) == AS_COMPONENT_KIND_UNKNOWN) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, root, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_VALUE_WRONG, "Invalid component type found: %s", cpttype); } } - g_free (cpttype); + + if ((as_component_get_priority (cpt) != 0) && (mode == AS_FORMAT_STYLE_METAINFO)) { + as_validator_add_issue (validator, root, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The component has a priority value set. This is not allowed in metainfo files."); + } + + if ((as_component_get_merge_kind (cpt) != AS_MERGE_KIND_NONE) && (mode == AS_FORMAT_STYLE_METAINFO)) { + as_validator_add_issue (validator, root, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The component has a 'merge' method defined. This is not allowed in metainfo files."); + } + + /* the component must have an id */ + if (as_str_empty (as_component_get_id (cpt))) { + /* we don't have an id */ + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_MISSING, + "The component is missing an ID ( tag)."); + } + + /* the component must have a name */ + if (as_str_empty (as_component_get_name (cpt))) { + /* we don't have a name */ + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_MISSING, + "The component is missing a name ( tag)."); + } + + /* the component must have a summary */ + if (as_str_empty (as_component_get_summary (cpt))) { + /* we don't have a summary */ + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_MISSING, + "The component is missing a summary ( tag)."); + } for (iter = root->children; iter != NULL; iter = iter->next) { const gchar *node_name; - gchar *node_content; + g_autofree gchar *node_content = NULL; gboolean tag_valid = TRUE; /* discard spaces */ if (iter->type != XML_ELEMENT_NODE) @@ -469,42 +1027,68 @@ gchar *prop; prop = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); if (prop != NULL) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_INFO, AS_ISSUE_KIND_PROPERTY_INVALID, "The id tag for \"%s\" still contains a 'type' property, probably from an old conversion.", node_content); } g_free (prop); - if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_DESKTOP_APP) { - if (!g_str_has_suffix (node_content, ".desktop")) - as_validator_add_issue (validator, - AS_ISSUE_IMPORTANCE_WARNING, - AS_ISSUE_KIND_VALUE_WRONG, - "Component id belongs to a desktop-application, but does not resemble the .desktop file name: \"%s\"", - node_content); - } + + /* validate the AppStream ID */ + as_validator_validate_component_id (validator, iter, cpt); } else if (g_strcmp0 (node_name, "metadata_license") == 0) { - metadata_license = g_strdup (node_content); + has_metadata_license = TRUE; as_validator_check_appear_once (validator, iter, found_tags, cpt); + + /* the license must allow easy mixing of metadata in metainfo files */ + if (mode == AS_FORMAT_STYLE_METAINFO) + as_validator_validate_metadata_license (validator, iter); } else if (g_strcmp0 (node_name, "pkgname") == 0) { if (g_hash_table_contains (found_tags, node_name)) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_PEDANTIC, AS_ISSUE_KIND_TAG_DUPLICATED, - "The 'pkgname' tag appears multiple times. You should evaluate creating a metapackage containing the data in order to avoid defining multiple package names per component."); + "The tag 'pkgname' appears multiple times. You should evaluate creating a metapackage containing the data in order to avoid defining multiple package names per component."); } } else if (g_strcmp0 (node_name, "source_pkgname") == 0) { - if (g_hash_table_contains (found_tags, node_name)) { - as_validator_add_issue (validator, - AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_KIND_TAG_DUPLICATED, - "The 'source_pkgname' tag appears multiple times."); - } + as_validator_check_appear_once (validator, iter, found_tags, cpt); } else if (g_strcmp0 (node_name, "name") == 0) { as_validator_check_appear_once (validator, iter, found_tags, cpt); + if (g_str_has_suffix (node_content, ".")) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_PEDANTIC, + AS_ISSUE_KIND_VALUE_ISSUE, + "The component name should (likely) not end with a \".\" [%s]", + node_content); + } + } else if (g_strcmp0 (node_name, "summary") == 0) { + const gchar *summary = node_content; + as_validator_check_appear_once (validator, iter, found_tags, cpt); + if (g_str_has_suffix (summary, ".")) + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_INFO, + AS_ISSUE_KIND_VALUE_ISSUE, + "The component summary should not end with a \".\" [%s]", + summary); + + if ((summary != NULL) && ((strstr (summary, "\n") != NULL) || (strstr (summary, "\t") != NULL))) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The summary tag must not contain tabs or linebreaks."); + } + + if (as_validate_has_hyperlink (summary)) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "The summary must not contain any URL.", + node_name); + } + } else if (g_strcmp0 (node_name, "description") == 0) { as_validator_check_appear_once (validator, iter, found_tags, cpt); as_validator_check_description_tag (validator, iter, cpt, mode); @@ -512,24 +1096,58 @@ gchar *prop; prop = as_validator_check_type_property (validator, cpt, iter); if ((g_strcmp0 (prop, "cached") == 0) || (g_strcmp0 (prop, "stock") == 0)) { - if (g_strrstr (node_content, "/") != NULL) - as_validator_add_issue (validator, + if ((g_strrstr (node_content, "/") != NULL) || (as_validate_is_url (node_content))) + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "Icons of type 'stock' or 'cached' must not contain an URL or a full or relative path to the icon."); + } + + if (g_strcmp0 (prop, "remote") == 0) { + if (!as_validate_is_url (node_content)) { + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_VALUE_WRONG, - "Icons of type 'stock' or 'cached' must not contain a full or relative path to the icon."); + "Icons of type 'remote' must contain an URL to the referenced icon."); + } else { + if (!as_validator_web_url_exists (validator, node_content)) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_REMOTE_ERROR, + "Unable to reach remote icon at '%s' - does it exist?", + node_content); + } + } + } + + if (mode == AS_FORMAT_STYLE_METAINFO) { + if ((prop != NULL) && (g_strcmp0 (prop, "stock") != 0) && (g_strcmp0 (prop, "remote") != 0)) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "Metainfo files may only contain 'stock' or 'remote' icons, icons of kind '%s' are not allowed.", prop); + } } g_free (prop); } else if (g_strcmp0 (node_name, "url") == 0) { gchar *prop; prop = as_validator_check_type_property (validator, cpt, iter); if (as_url_kind_from_string (prop) == AS_URL_KIND_UNKNOWN) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_PROPERTY_INVALID, "Invalid property for 'url' tag: \"%s\"", prop); } g_free (prop); + + if (!as_validator_web_url_exists (validator, node_content)) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_REMOTE_ERROR, + "Unable to reach remote location '%s' - does it exist?", + node_content); + } } else if (g_strcmp0 (node_name, "categories") == 0) { as_validator_check_appear_once (validator, iter, found_tags, cpt); as_validator_check_children_quick (validator, iter, "category", cpt); @@ -542,97 +1160,118 @@ } else if (g_strcmp0 (node_name, "provides") == 0) { as_validator_check_appear_once (validator, iter, found_tags, cpt); } else if (g_strcmp0 (node_name, "screenshots") == 0) { - as_validator_check_children_quick (validator, iter, "screenshot", cpt); + as_validator_check_screenshots (validator, iter, cpt); } else if (g_strcmp0 (node_name, "project_license") == 0) { as_validator_check_appear_once (validator, iter, found_tags, cpt); + as_validator_validate_project_license (validator, iter); } else if (g_strcmp0 (node_name, "project_group") == 0) { as_validator_check_appear_once (validator, iter, found_tags, cpt); } else if (g_strcmp0 (node_name, "developer_name") == 0) { as_validator_check_appear_once (validator, iter, found_tags, cpt); + + if (as_validate_has_hyperlink (node_content)) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_VALUE_ISSUE, + "The can not contain a hyperlink."); + } } else if (g_strcmp0 (node_name, "compulsory_for_desktop") == 0) { - as_validator_check_appear_once (validator, iter, found_tags, cpt); + if (!as_utils_is_desktop_environment (node_content)) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "Unknown desktop-id '%s'.", node_content); + } } else if (g_strcmp0 (node_name, "releases") == 0) { as_validator_check_children_quick (validator, iter, "release", cpt); - } else if ((g_strcmp0 (node_name, "languages") == 0) && (mode == AS_PARSER_MODE_DISTRO)) { + } else if (g_strcmp0 (node_name, "languages") == 0) { as_validator_check_appear_once (validator, iter, found_tags, cpt); as_validator_check_children_quick (validator, iter, "lang", cpt); - } else if ((g_strcmp0 (node_name, "translation") == 0) && (mode == AS_PARSER_MODE_UPSTREAM)) { + } else if ((g_strcmp0 (node_name, "translation") == 0) && (mode == AS_FORMAT_STYLE_METAINFO)) { g_autofree gchar *prop = NULL; AsTranslationKind trkind; prop = as_validator_check_type_property (validator, cpt, iter); trkind = as_translation_kind_from_string (prop); - if (trkind == AS_TRANSLATION_KIND_UNKNOWN) { - as_validator_add_issue (validator, + if (prop != NULL && trkind == AS_TRANSLATION_KIND_UNKNOWN) { + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_VALUE_WRONG, "Unknown type '%s' for tag.", prop); } + } else if (g_strcmp0 (node_name, "launchable") == 0) { + g_autofree gchar *prop = NULL; + prop = as_validator_check_type_property (validator, cpt, iter); + if (as_launchable_kind_from_string (prop) == AS_LAUNCHABLE_KIND_UNKNOWN) { + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "Unknown type '%s' for tag.", prop); + } } else if (g_strcmp0 (node_name, "extends") == 0) { } else if (g_strcmp0 (node_name, "bundle") == 0) { g_autofree gchar *prop = NULL; prop = as_validator_check_type_property (validator, cpt, iter); - if ((g_strcmp0 (prop, "limba") != 0) && (g_strcmp0 (prop, "xdg-app") != 0)) { - as_validator_add_issue (validator, + if (prop != NULL && as_bundle_kind_from_string (prop) == AS_BUNDLE_KIND_UNKNOWN) { + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_VALUE_WRONG, "Unknown type '%s' for tag.", prop); } } else if (g_strcmp0 (node_name, "update_contact") == 0) { - if (mode == AS_PARSER_MODE_DISTRO) { - as_validator_add_issue (validator, + if (mode == AS_FORMAT_STYLE_COLLECTION) { + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_WARNING, AS_ISSUE_KIND_TAG_NOT_ALLOWED, - "The 'update_contact' tag should not be included in distro AppStream XML."); + "The 'update_contact' tag should not be included in collection AppStream XML."); } else { as_validator_check_appear_once (validator, iter, found_tags, cpt); + as_validator_validate_update_contact (validator, iter); } - } else if (g_strcmp0 (node_name, "metadata") == 0) { - as_validator_add_issue (validator, - AS_ISSUE_IMPORTANCE_PEDANTIC, + } else if (g_strcmp0 (node_name, "suggests") == 0) { + as_validator_check_children_quick (validator, iter, "id", cpt); + } else if (g_strcmp0 (node_name, "content_rating") == 0) { + as_validator_check_children_quick (validator, iter, "content_attribute", cpt); + } else if (g_strcmp0 (node_name, "requires") == 0) { + as_validator_check_requires_recommends (validator, iter, cpt, AS_RELATION_KIND_REQUIRES); + } else if (g_strcmp0 (node_name, "recommends") == 0) { + as_validator_check_requires_recommends (validator, iter, cpt, AS_RELATION_KIND_RECOMMENDS); + } else if (g_strcmp0 (node_name, "custom") == 0) { + as_validator_check_appear_once (validator, iter, found_tags, cpt); + as_validator_check_children_quick (validator, iter, "value", cpt); + } else if ((g_strcmp0 (node_name, "metadata") == 0) || (g_strcmp0 (node_name, "kudos") == 0)) { + /* these tags are GNOME / Fedora specific extensions and are therefore quite common. They shouldn't make the validation fail, + * especially if we might standardize at leat the tag one day, but we should still complain about those tags to make + * it obvious that they are not supported by all implementations */ + as_validator_add_issue (validator, iter, + AS_ISSUE_IMPORTANCE_INFO, AS_ISSUE_KIND_TAG_UNKNOWN, - "Found custom metadata in tag. Use of this tag is common, but should be avoided if possible."); + "Found invalid tag: '%s'. This tag is a GNOME-specific extension to AppStream and is not supported by all implementations.", + node_name); tag_valid = FALSE; } else if (!g_str_has_prefix (node_name, "x-")) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_WARNING, AS_ISSUE_KIND_TAG_UNKNOWN, "Found invalid tag: '%s'. Non-standard tags must be prefixed with \"x-\".", - node_name); + node_name); tag_valid = FALSE; } if (tag_valid) { as_validator_check_content_empty (validator, - node_content, - node_name, - AS_ISSUE_IMPORTANCE_WARNING, - cpt); + iter, + node_name, + AS_ISSUE_IMPORTANCE_WARNING, + cpt); } - - g_free (node_content); - - g_hash_table_add (found_tags, g_strdup (node_name)); - } - - g_hash_table_unref (found_tags); - - if (metadata_license == NULL) { - if (mode == AS_PARSER_MODE_UPSTREAM) - as_validator_add_issue (validator, - AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_KIND_TAG_MISSING, - "The essential tag 'metadata_license' is missing."); - } else { - g_free (metadata_license); } - /* check if the summary is sane */ - summary = as_component_get_summary (cpt); - if ((summary != NULL) && ((strstr (summary, "\n") != NULL) || (strstr (summary, "\t") != NULL))) { - as_validator_add_issue (validator, + /* emit an error if we are missing the metadata license in metainfo files */ + if ((!has_metadata_license) && (mode == AS_FORMAT_STYLE_METAINFO)) { + as_validator_add_issue (validator, NULL, AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_KIND_VALUE_WRONG, - "The summary tag must not contain tabs or linebreaks."); + AS_ISSUE_KIND_TAG_MISSING, + "The essential tag 'metadata_license' is missing."); } /* check if we have a description */ @@ -641,48 +1280,180 @@ cpt_kind = as_component_get_kind (cpt); if ((cpt_kind == AS_COMPONENT_KIND_DESKTOP_APP) || - (cpt_kind == AS_COMPONENT_KIND_FONT)) { - as_validator_add_issue (validator, + (cpt_kind == AS_COMPONENT_KIND_CONSOLE_APP) || + (cpt_kind == AS_COMPONENT_KIND_WEB_APP)) { + as_validator_add_issue (validator, NULL, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_TAG_MISSING, "The component is missing a long description. Components of this type must have a long description."); - } else { - as_validator_add_issue (validator, + } else if (cpt_kind == AS_COMPONENT_KIND_FONT) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_PEDANTIC, + AS_ISSUE_KIND_TAG_MISSING, + "It would be useful for add a long description to this font to present it better to users."); + } else if ((cpt_kind == AS_COMPONENT_KIND_DRIVER) || (cpt_kind == AS_COMPONENT_KIND_FIRMWARE)) { + as_validator_add_issue (validator, NULL, AS_ISSUE_IMPORTANCE_INFO, AS_ISSUE_KIND_TAG_MISSING, + "It is recommended to add a long description to this component to present it better to users."); + } else if (cpt_kind != AS_COMPONENT_KIND_GENERIC) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_PEDANTIC, + AS_ISSUE_KIND_TAG_MISSING, "The component is missing a long description. It is recommended to add one."); } } + /* validate console-app specific stuff */ + if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_CONSOLE_APP) { + if (as_component_get_provided_for_kind (cpt, AS_PROVIDED_KIND_BINARY) == NULL) + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_TAG_MISSING, + "Type 'console-application' component, but no information about binaries in $PATH was provided via a provides/binary tag."); + } + + /* validate webapp specific stuff */ + if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_WEB_APP) { + AsLaunchable *launch = as_component_get_launchable (cpt, AS_LAUNCHABLE_KIND_URL); + if (launch == NULL || as_launchable_get_entries (launch)->len == 0) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_TAG_MISSING, + "This 'web-application' component is missing a 'launchable' tag of type 'url'."); + } + + if (as_component_get_icons (cpt)->len <= 0) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_TAG_MISSING, + "This 'web-application' component is missing a 'icon' tag to specify a valid icon."); + } + + if (as_component_get_categories (cpt)->len <= 0) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_TAG_MISSING, + "This 'web-application' component is missing categorizations. A 'categories' block is likely missing."); + } + } + /* validate font specific stuff */ if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_FONT) { - if (!g_str_has_suffix (as_component_get_id (cpt), ".font")) - as_validator_add_issue (validator, - AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_KIND_VALUE_WRONG, - "Components of type 'font' must have an AppStream ID with a '.font' suffix."); if (as_component_get_provided_for_kind (cpt, AS_PROVIDED_KIND_FONT) == NULL) - as_validator_add_issue (validator, - AS_ISSUE_IMPORTANCE_WARNING, + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_TAG_MISSING, "Type 'font' component, but no font information was provided via a provides/font tag."); } + /* validate driver specific stuff */ + if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_DRIVER) { + if (as_component_get_provided_for_kind (cpt, AS_PROVIDED_KIND_MODALIAS) == NULL) + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_TAG_MISSING, + "Type 'driver' component, but no modalias information was provided via a provides/modalias tag."); + } + /* validate addon specific stuff */ if (as_component_get_extends (cpt)->len > 0) { - if (as_component_get_kind (cpt) != AS_COMPONENT_KIND_ADDON) - as_validator_add_issue (validator, + AsComponentKind kind = as_component_get_kind (cpt); + if ((kind != AS_COMPONENT_KIND_ADDON) && (kind != AS_COMPONENT_KIND_LOCALIZATION)) + as_validator_add_issue (validator, NULL, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_TAG_NOT_ALLOWED, - "An 'extends' tag is specified, but the component is not an addon."); + "An 'extends' tag is specified, but the component is not of type 'addon' or 'localization'."); } else { if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_ADDON) - as_validator_add_issue (validator, + as_validator_add_issue (validator, NULL, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_TAG_MISSING, "The component is an addon, but no 'extends' tag was specified."); } + /* validate l10n specific stuff */ + if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_LOCALIZATION) { + if (as_component_get_extends (cpt)->len == 0) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_TAG_MISSING, + "This 'localization' component is missing an An 'extends' tag, to specify the components it adds localization to."); + } + if (g_hash_table_size (as_component_get_languages_table (cpt)) == 0) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_TAG_MISSING, + "This 'localization' component does not define any languages this localization is for."); + } + } + + /* validate service specific stuff */ + if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_SERVICE) { + AsLaunchable *launch = as_component_get_launchable (cpt, AS_LAUNCHABLE_KIND_SERVICE); + if (launch == NULL || as_launchable_get_entries (launch)->len == 0) + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_TAG_MISSING, + "This 'service' component is missing a 'launchable' tag of type 'service'."); + } + + /* validate suggestions */ + if (as_component_get_suggested (cpt)->len > 0) { + guint j; + GPtrArray *sug_array; + + sug_array = as_component_get_suggested (cpt); + for (j = 0; j < sug_array->len; j++) { + AsSuggested *prov = AS_SUGGESTED (g_ptr_array_index (sug_array, j)); + if (mode == AS_FORMAT_STYLE_METAINFO) { + if (as_suggested_get_kind (prov) != AS_SUGGESTED_KIND_UPSTREAM) + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_VALUE_WRONG, + "Suggestions of any type other than 'upstream' are not allowed in metainfo files (type was '%s')", as_suggested_kind_to_string (as_suggested_get_kind (prov))); + } + } + } + + /* validate categories */ + if (as_component_get_categories (cpt)->len > 0) { + guint j; + GPtrArray *cat_array; + + cat_array = as_component_get_categories (cpt); + for (j = 0; j < cat_array->len; j++) { + const gchar *category_name = (const gchar*) g_ptr_array_index (cat_array, j); + + if (!as_utils_is_category_name (category_name)) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_VALUE_WRONG, + "The category '%s' defined is not valid. Refer to the Freedesktop menu specification for a list of valid categories.", category_name); + } + } + } + + /* validate screenshots */ + if (as_component_get_screenshots (cpt)->len > 0) { + guint j; + GPtrArray *scr_array; + + scr_array = as_component_get_screenshots (cpt); + for (j = 0; j < scr_array->len; j++) { + AsScreenshot *scr = AS_SCREENSHOT (g_ptr_array_index (scr_array, j)); + const gchar *scr_caption = as_screenshot_get_caption (scr); + + if ((scr_caption != NULL) && (strlen (scr_caption) > 80)) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_PEDANTIC, + AS_ISSUE_KIND_VALUE_ISSUE, + "The screenshot caption '%s' is too long (should be <= 80 characters)", + scr_caption); + } + } + } + as_validator_clear_current_cpt (validator); return cpt; } @@ -697,12 +1468,18 @@ gboolean as_validator_validate_file (AsValidator *validator, GFile *metadata_file) { - gboolean ret; - gchar* xml_doc; - GFileInputStream* fistream; - GFileInfo *info = NULL; - const gchar *content_type = NULL; + g_autoptr(GFileInfo) info = NULL; + g_autoptr(GInputStream) file_stream = NULL; + g_autoptr(GInputStream) stream_data = NULL; + g_autoptr(GConverter) conv = NULL; + g_autoptr(GString) asxmldata = NULL; g_autofree gchar *fname = NULL; + gssize len; + const gsize buffer_size = 1024 * 32; + g_autofree gchar *buffer = NULL; + const gchar *content_type = NULL; + g_autoptr(GError) tmp_error = NULL; + gboolean ret; info = g_file_query_info (metadata_file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, @@ -714,54 +1491,42 @@ fname = g_file_get_basename (metadata_file); as_validator_set_current_fname (validator, fname); + file_stream = G_INPUT_STREAM (g_file_read (metadata_file, NULL, &tmp_error)); + if (tmp_error != NULL) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_READ_ERROR, + "Unable to read file: %s", tmp_error->message); + return FALSE; + } + if (file_stream == NULL) + return FALSE; + if ((g_strcmp0 (content_type, "application/gzip") == 0) || (g_strcmp0 (content_type, "application/x-gzip") == 0)) { - GMemoryOutputStream *mem_os; - GInputStream *conv_stream; - GZlibDecompressor *zdecomp; - guint8 *data; - - /* load a GZip compressed file */ - fistream = g_file_read (metadata_file, NULL, NULL); - mem_os = (GMemoryOutputStream*) g_memory_output_stream_new (NULL, 0, g_realloc, g_free); - zdecomp = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP); - conv_stream = g_converter_input_stream_new (G_INPUT_STREAM (fistream), G_CONVERTER (zdecomp)); - g_object_unref (zdecomp); - - g_output_stream_splice (G_OUTPUT_STREAM (mem_os), conv_stream, 0, NULL, NULL); - data = g_memory_output_stream_get_data (mem_os); - - xml_doc = g_strdup ((const gchar*) data); - - g_object_unref (conv_stream); - g_object_unref (mem_os); - g_object_unref (fistream); + /* decompress the GZip stream */ + conv = G_CONVERTER (g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP)); + stream_data = g_converter_input_stream_new (file_stream, conv); } else { - gchar *line = NULL; - GString *str; - GDataInputStream *dis; - - /* load a plaintext file */ - str = g_string_new (""); - fistream = g_file_read (metadata_file, NULL, NULL); - dis = g_data_input_stream_new ((GInputStream*) fistream); - g_object_unref (fistream); - - while (TRUE) { - line = g_data_input_stream_read_line (dis, NULL, NULL, NULL); - if (line == NULL) { - break; - } - - g_string_append_printf (str, "%s\n", line); - } - - xml_doc = g_string_free (str, FALSE); - g_object_unref (dis); + stream_data = g_object_ref (file_stream); } - ret = as_validator_validate_data (validator, xml_doc); - g_free (xml_doc); + asxmldata = g_string_new (""); + buffer = g_malloc (buffer_size); + while ((len = g_input_stream_read (stream_data, buffer, buffer_size, NULL, &tmp_error)) > 0) { + g_string_append_len (asxmldata, buffer, len); + } + if (tmp_error != NULL) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_READ_ERROR, + "Unable to read file: %s", tmp_error->message); + return FALSE; + } + /* check if there was an error */ + if (len < 0) + return FALSE; + ret = as_validator_validate_data (validator, asxmldata->str); as_validator_clear_current_fname (validator); return ret; @@ -770,36 +1535,25 @@ /** * as_validator_open_xml_document: */ -static xmlNode* -as_validator_open_xml_document (AsValidator *validator, const gchar *xmldata, xmlDoc **xdoc) +static xmlDoc* +as_validator_open_xml_document (AsValidator *validator, const gchar *xmldata) { xmlDoc *doc; - xmlNode *root = NULL; + g_autoptr(GError) error = NULL; - doc = xmlParseDoc ((xmlChar*) xmldata); + doc = as_xml_parse_document (xmldata, &error); if (doc == NULL) { - as_validator_add_issue (validator, - AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_KIND_MARKUP_INVALID, - "Could not parse XML data."); - return NULL; - } + if (error != NULL) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_MARKUP_INVALID, + error->message); + } - root = xmlDocGetRootElement (doc); - if (root == NULL) { - as_validator_add_issue (validator, - AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_KIND_MARKUP_INVALID, - "The XML document is empty."); - goto out; + return NULL; } -out: - if (root != NULL) - *xdoc = doc; - else - xmlFreeDoc (doc); - return root; + return doc; } /** @@ -812,40 +1566,55 @@ gboolean as_validator_validate_data (AsValidator *validator, const gchar *metadata) { + AsValidatorPrivate *priv = GET_PRIVATE (validator); gboolean ret; xmlNode* root; xmlDoc *doc; + g_autoptr(AsContext) ctx = NULL; AsComponent *cpt; - root = as_validator_open_xml_document (validator, metadata, &doc); - if (!root) - return FALSE; + /* if we validate URLs, check if curl or wget are installed */ + if (priv->check_urls) { + /* cheap way to notify the user if we can't validate URLs */ + if (!as_validator_can_check_urls (validator)) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_INFO, + AS_ISSUE_KIND_UNKNOWN, + "Unable to find the curl binary. remote URLs can not be checked for validity!"); + } + } + /* load the XML data */ + ctx = as_context_new (); + as_context_set_locale (ctx, "C"); - ret = TRUE; + doc = as_validator_open_xml_document (validator, metadata); + if (doc == NULL) + return FALSE; + root = xmlDocGetRootElement (doc); + ret = TRUE; if (g_strcmp0 ((gchar*) root->name, "component") == 0) { - cpt = as_validator_validate_component_node (validator, - root, - AS_PARSER_MODE_UPSTREAM); + as_context_set_style (ctx, AS_FORMAT_STYLE_METAINFO); + cpt = as_validator_validate_component_node (validator, ctx, root); if (cpt != NULL) g_object_unref (cpt); } else if (g_strcmp0 ((gchar*) root->name, "components") == 0) { xmlNode *iter; const gchar *node_name; + + as_context_set_style (ctx, AS_FORMAT_STYLE_COLLECTION); for (iter = root->children; iter != NULL; iter = iter->next) { /* discard spaces */ if (iter->type != XML_ELEMENT_NODE) continue; node_name = (const gchar*) iter->name; if (g_strcmp0 (node_name, "component") == 0) { - cpt = as_validator_validate_component_node (validator, - iter, - AS_PARSER_MODE_DISTRO); + cpt = as_validator_validate_component_node (validator, ctx, iter); if (cpt != NULL) g_object_unref (cpt); } else { - as_validator_add_issue (validator, + as_validator_add_issue (validator, iter, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_TAG_UNKNOWN, "Unknown tag found: %s", @@ -854,11 +1623,18 @@ } } } else if (g_str_has_prefix ((gchar*) root->name, "application")) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, root, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_LEGACY, "The metainfo file uses an ancient version of the AppStream specification, which can not be validated. Please migrate it to version 0.6 (or higher)."); ret = FALSE; + } else { + as_validator_add_issue (validator, root, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_TAG_UNKNOWN, + "Unknown root tag found: '%s' - maybe not a metainfo document?", + (gchar*) root->name); + ret = FALSE; } xmlFreeDoc (doc); @@ -905,7 +1681,7 @@ static void as_validator_analyze_component_metainfo_relation_cb (const gchar *fname, AsComponent *cpt, struct MInfoCheckData *data) { - gchar *tmp; + g_autofree gchar *cid_base = NULL; /* if we have no component-id, we can't check anything */ if (as_component_get_id (cpt) == NULL) @@ -915,65 +1691,76 @@ as_validator_set_current_fname (data->validator, fname); /* check if the fname and the component-id match */ - tmp = g_strndup (as_component_get_id (cpt), - g_strrstr (as_component_get_id (cpt), ".") - as_component_get_id (cpt)); - if (!as_matches_metainfo (fname, tmp)) { - /* the name-without-type didn't match - check for the full id in the component name */ + if (g_str_has_suffix (as_component_get_id (cpt), ".desktop")) { + cid_base = g_strndup (as_component_get_id (cpt), + g_strrstr (as_component_get_id (cpt), ".") - as_component_get_id (cpt)); + } else { + cid_base = g_strdup (as_component_get_id (cpt)); + } + if (!as_matches_metainfo (fname, cid_base)) { + /* the name-without-type didn't match - check for the full ID in the component name */ if (!as_matches_metainfo (fname, as_component_get_id (cpt))) { - as_validator_add_issue (data->validator, + as_validator_add_issue (data->validator, NULL, AS_ISSUE_IMPORTANCE_WARNING, AS_ISSUE_KIND_WRONG_NAME, "The metainfo filename does not match the component ID."); } } - g_free (tmp); /* check if the referenced .desktop file exists */ if (as_component_get_kind (cpt) == AS_COMPONENT_KIND_DESKTOP_APP) { - if (g_hash_table_contains (data->desktop_fnames, as_component_get_id (cpt))) { - g_autofree gchar *desktop_fname_full = NULL; - g_autoptr(GKeyFile) dfile = NULL; - GError *tmp_error = NULL; - - desktop_fname_full = g_build_filename (data->apps_dir, as_component_get_id (cpt), NULL); - dfile = g_key_file_new (); - - g_key_file_load_from_file (dfile, desktop_fname_full, G_KEY_FILE_NONE, &tmp_error); - if (tmp_error != NULL) { - as_validator_add_issue (data->validator, - AS_ISSUE_IMPORTANCE_WARNING, - AS_ISSUE_KIND_READ_ERROR, - "Unable to read associated .desktop file: %s", tmp_error->message); - g_error_free (tmp_error); - tmp_error = NULL; - } else { - /* we successfully opened the .desktop file, now perform some checks */ - - /* name */ - if ((g_strcmp0 (as_component_get_name (cpt), "") == 0) && - (!g_key_file_has_key (dfile, "Desktop Entry", "Name", NULL))) { - /* we don't have a summary, and there is also none in the .desktop file - this is bad. */ - as_validator_add_issue (data->validator, - AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_KIND_VALUE_MISSING, - "The component is missing a name (none found in its metainfo or .desktop file)"); - } + AsLaunchable *de_launchable = as_component_get_launchable (cpt, AS_LAUNCHABLE_KIND_DESKTOP_ID); + if ((de_launchable != NULL) && (as_launchable_get_entries (de_launchable)->len > 0)) { + const gchar *desktop_id = g_ptr_array_index (as_launchable_get_entries (de_launchable), 0); + + if (g_hash_table_contains (data->desktop_fnames, desktop_id)) { + g_autofree gchar *desktop_fname_full = NULL; + g_autoptr(GKeyFile) dfile = NULL; + GError *tmp_error = NULL; + + desktop_fname_full = g_build_filename (data->apps_dir, desktop_id, NULL); + dfile = g_key_file_new (); + + g_key_file_load_from_file (dfile, desktop_fname_full, G_KEY_FILE_NONE, &tmp_error); + if (tmp_error != NULL) { + as_validator_add_issue (data->validator, NULL, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_READ_ERROR, + "Unable to read associated .desktop file: %s", tmp_error->message); + g_error_free (tmp_error); + tmp_error = NULL; + } else { + /* we successfully opened the .desktop file, now perform some checks */ + + /* categories */ + if (g_key_file_has_key (dfile, G_KEY_FILE_DESKTOP_GROUP, + G_KEY_FILE_DESKTOP_KEY_CATEGORIES, NULL)) { + g_autofree gchar *cats_str = NULL; + g_auto(GStrv) cats = NULL; + guint i; + + cats_str = g_key_file_get_string (dfile, G_KEY_FILE_DESKTOP_GROUP, + G_KEY_FILE_DESKTOP_KEY_CATEGORIES, NULL); + cats = g_strsplit (cats_str, ";", -1); + for (i = 0; cats[i] != NULL; i++) { + if (as_str_empty (cats[i])) + continue; + if (!as_utils_is_category_name (cats[i])) { + as_validator_add_issue (data->validator, NULL, + AS_ISSUE_IMPORTANCE_WARNING, + AS_ISSUE_KIND_VALUE_WRONG, + "The category '%s' defined in the .desktop file does not exist.", cats[i]); + } + } + } - /* summary */ - if ((g_strcmp0 (as_component_get_summary (cpt), "") == 0) && - (!g_key_file_has_key (dfile, "Desktop Entry", "Comment", NULL))) { - /* we don't have a summary, and there is also none in the .desktop file - this is bad. */ - as_validator_add_issue (data->validator, - AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_KIND_VALUE_MISSING, - "The component is missing a summary (none found in its metainfo or .desktop file)"); } + } else { + as_validator_add_issue (data->validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_FILE_MISSING, + "Component metadata refers to a non-existing .desktop file."); } - } else { - as_validator_add_issue (data->validator, - AS_ISSUE_IMPORTANCE_ERROR, - AS_ISSUE_KIND_FILE_MISSING, - "Component metadata refers to a non-existing .desktop file."); } } @@ -991,25 +1778,31 @@ gboolean as_validator_validate_tree (AsValidator *validator, const gchar *root_dir) { + AsValidatorPrivate *priv = GET_PRIVATE (validator); g_autofree gchar *metainfo_dir = NULL; + g_autofree gchar *legacy_metainfo_dir = NULL; g_autofree gchar *apps_dir = NULL; - GPtrArray *mfiles = NULL; - GPtrArray *dfiles = NULL; + g_autoptr(GPtrArray) mfiles = NULL; + g_autoptr(GPtrArray) mfiles_legacy = NULL; + g_autoptr(GPtrArray) dfiles = NULL; GHashTable *dfilenames = NULL; GHashTable *validated_cpts = NULL; guint i; gboolean ret = TRUE; + g_autoptr(AsContext) ctx = NULL; struct MInfoCheckData ht_helper; /* cleanup */ as_validator_clear_issues (validator); metainfo_dir = g_build_filename (root_dir, "usr", "share", "metainfo", NULL); + legacy_metainfo_dir = g_build_filename (root_dir, "usr", "share", "appdata", NULL); apps_dir = g_build_filename (root_dir, "usr", "share", "applications", NULL); /* check if we actually have a directory which could hold metadata */ - if (!g_file_test (metainfo_dir, G_FILE_TEST_IS_DIR)) { - as_validator_add_issue (validator, + if ((!g_file_test (metainfo_dir, G_FILE_TEST_IS_DIR)) && + (!g_file_test (legacy_metainfo_dir, G_FILE_TEST_IS_DIR))) { + as_validator_add_issue (validator, NULL, AS_ISSUE_IMPORTANCE_INFO, AS_ISSUE_KIND_FILE_MISSING, "No AppStream metadata was found."); @@ -1018,28 +1811,71 @@ /* check if we actually have a directory which could hold application information */ if (!g_file_test (apps_dir, G_FILE_TEST_IS_DIR)) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, NULL, AS_ISSUE_IMPORTANCE_PEDANTIC, /* pedantic because not everything which has metadata is an application */ AS_ISSUE_KIND_FILE_MISSING, "No XDG applications directory found."); } + /* if we validate URLs, check if curl or wget are installed */ + if (priv->check_urls) { + /* cheap way to notify the user if we can't validate URLs */ + if (!as_validator_can_check_urls (validator)) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_INFO, + AS_ISSUE_KIND_UNKNOWN, + "Unable to find the curl binary. remote URLs can not be checked for validity!"); + } + } + /* holds a filename -> component mapping */ validated_cpts = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); + /* set up XML parser */ + ctx = as_context_new (); + as_context_set_locale (ctx, "C"); + as_context_set_style (ctx, AS_FORMAT_STYLE_METAINFO); + /* validate all metainfo files */ mfiles = as_utils_find_files_matching (metainfo_dir, "*.xml", FALSE, NULL); + mfiles_legacy = as_utils_find_files_matching (legacy_metainfo_dir, "*.xml", FALSE, NULL); + + /* in case we only have legacy files */ + if (mfiles == NULL) + mfiles = g_ptr_array_new_with_free_func (g_free); + + if (mfiles_legacy != NULL) { + for (i = 0; i < mfiles_legacy->len; i++) { + const gchar *fname; + g_autofree gchar *fname_basename = NULL; + + /* process metainfo files in legacy paths */ + fname = (const gchar*) g_ptr_array_index (mfiles_legacy, i); + fname_basename = g_path_get_basename (fname); + as_validator_set_current_fname (validator, fname_basename); + + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_INFO, + AS_ISSUE_KIND_LEGACY, + "The metainfo file is stored in a legacy path. Please place it in '/usr/share/metainfo'."); + + g_ptr_array_add (mfiles, g_strdup (fname)); + } + } + for (i = 0; i < mfiles->len; i++) { const gchar *fname; - GFile *file; - gchar *line = NULL; - GString *str; - GDataInputStream *dis; - GFileInputStream *fistream; - xmlNode* root; + g_autoptr(GFile) file = NULL; + g_autoptr(GInputStream) file_stream = NULL; + g_autoptr(GError) tmp_error = NULL; + g_autoptr(GString) asdata = NULL; + gssize len; + const gsize buffer_size = 1024 * 24; + g_autofree gchar *buffer = NULL; + xmlNode *root; xmlDoc *doc; g_autofree gchar *fname_basename = NULL; @@ -1055,47 +1891,54 @@ as_validator_set_current_fname (validator, fname_basename); /* load a plaintext file */ - str = g_string_new (""); - fistream = g_file_read (file, NULL, NULL); - dis = g_data_input_stream_new ((GInputStream*) fistream); - g_object_unref (fistream); - - while (TRUE) { - line = g_data_input_stream_read_line (dis, NULL, NULL, NULL); - if (line == NULL) { - break; - } + file_stream = G_INPUT_STREAM (g_file_read (file, NULL, &tmp_error)); + if (tmp_error != NULL) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_READ_ERROR, + "Unable to read file: %s", tmp_error->message); + continue; + } - g_string_append_printf (str, "%s\n", line); + asdata = g_string_new (""); + buffer = g_malloc (buffer_size); + while ((len = g_input_stream_read (file_stream, buffer, buffer_size, NULL, &tmp_error)) > 0) { + g_string_append_len (asdata, buffer, len); + } + /* check if there was an error */ + if (tmp_error != NULL) { + as_validator_add_issue (validator, NULL, + AS_ISSUE_IMPORTANCE_ERROR, + AS_ISSUE_KIND_READ_ERROR, + "Unable to read file: %s", tmp_error->message); + continue; } - g_object_unref (dis); - g_object_unref (file); /* now read the XML */ - root = as_validator_open_xml_document (validator, str->str, &doc); - g_string_free (str, TRUE); - if (!root) { + doc = as_validator_open_xml_document (validator, asdata->str); + if (doc == NULL) { as_validator_clear_current_fname (validator); continue; } + root = xmlDocGetRootElement (doc); if (g_strcmp0 ((gchar*) root->name, "component") == 0) { AsComponent *cpt; cpt = as_validator_validate_component_node (validator, - root, - AS_PARSER_MODE_UPSTREAM); + ctx, + root); if (cpt != NULL) g_hash_table_insert (validated_cpts, g_strdup (fname_basename), cpt); } else if (g_strcmp0 ((gchar*) root->name, "components") == 0) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, root, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_TAG_NOT_ALLOWED, "The metainfo file specifies multiple components. This is not allowed."); ret = FALSE; } else if (g_str_has_prefix ((gchar*) root->name, "application")) { - as_validator_add_issue (validator, + as_validator_add_issue (validator, root, AS_ISSUE_IMPORTANCE_ERROR, AS_ISSUE_KIND_LEGACY, "The metainfo file uses an ancient version of the AppStream specification, which can not be validated. Please migrate it to version 0.6 (or higher)."); @@ -1130,10 +1973,6 @@ &ht_helper); out: - if (mfiles != NULL) - g_ptr_array_unref (mfiles); - if (dfiles != NULL) - g_ptr_array_unref (dfiles); if (dfilenames != NULL) g_hash_table_unref (dfilenames); if (validated_cpts != NULL) diff -Nru appstream-0.9.4/src/as-validator.h appstream-0.12.0/src/as-validator.h --- appstream-0.9.4/src/as-validator.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-validator.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2017 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -56,6 +56,10 @@ GList *as_validator_get_issues (AsValidator *validator); +gboolean as_validator_get_check_urls (AsValidator *validator); +void as_validator_set_check_urls (AsValidator *validator, + gboolean value); + G_END_DECLS #endif /* __AS_VALIDATOR_H */ diff -Nru appstream-0.9.4/src/as-validator-issue.c appstream-0.12.0/src/as-validator-issue.c --- appstream-0.9.4/src/as-validator-issue.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-validator-issue.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -35,7 +35,10 @@ AsIssueKind kind; AsIssueImportance importance; gchar *message; - gchar *location; + + gchar *fname; + gchar *cid; + gint line; } AsValidatorIssuePrivate; G_DEFINE_TYPE_WITH_PRIVATE (AsValidatorIssue, as_validator_issue, G_TYPE_OBJECT) @@ -51,7 +54,8 @@ AsValidatorIssuePrivate *priv = GET_PRIVATE (issue); g_free (priv->message); - g_free (priv->location); + g_free (priv->fname); + g_free (priv->cid); G_OBJECT_CLASS (as_validator_issue_parent_class)->finalize (object); } @@ -65,6 +69,7 @@ AsValidatorIssuePrivate *priv = GET_PRIVATE (issue); priv->kind = AS_ISSUE_KIND_UNKNOWN; priv->importance = AS_ISSUE_IMPORTANCE_UNKNOWN; + priv->line = -1; } /** @@ -166,33 +171,126 @@ } /** - * as_validator_issue_get_location: + * as_validator_issue_get_cid: * @issue: a #AsValidatorIssue instance. * - * Gets a location hint for the issue. + * The component-id this issue is about. * - * Returns: the location hint + * Returns: a component-id. **/ const gchar* -as_validator_issue_get_location (AsValidatorIssue *issue) +as_validator_issue_get_cid (AsValidatorIssue *issue) { AsValidatorIssuePrivate *priv = GET_PRIVATE (issue); - return priv->location; + return priv->cid; } /** - * as_validator_issue_set_location: + * as_validator_issue_set_cid: * @issue: a #AsValidatorIssue instance. - * @location: a location hint. + * @cid: a component-id. * - * Sets a location hint for this issue. + * Sets the component-id this issue is about. **/ void -as_validator_issue_set_location (AsValidatorIssue *issue, const gchar *location) +as_validator_issue_set_cid (AsValidatorIssue *issue, const gchar *cid) { AsValidatorIssuePrivate *priv = GET_PRIVATE (issue); - g_free (priv->location); - priv->location = g_strdup (location); + g_free (priv->cid); + priv->cid = g_strdup (cid); +} + +/** + * as_validator_issue_get_line: + * @issue: a #AsValidatorIssue instance. + * + * Gets the line number where this issue was found. + * + * Returns: the line number where this issue occured, or -1 if unknown. + **/ +gint +as_validator_issue_get_line (AsValidatorIssue *issue) +{ + AsValidatorIssuePrivate *priv = GET_PRIVATE (issue); + return priv->line; +} + +/** + * as_validator_issue_set_line: + * @issue: a #AsValidatorIssue instance. + * @line: the line number. + * + * Sets the importance for this issue. + **/ +void +as_validator_issue_set_line (AsValidatorIssue *issue, gint line) +{ + AsValidatorIssuePrivate *priv = GET_PRIVATE (issue); + priv->line = line; +} + +/** + * as_validator_issue_get_filename: + * @issue: a #AsValidatorIssue instance. + * + * The name of the file this issue was found in. + * + * Returns: the filename + **/ +const gchar* +as_validator_issue_get_filename (AsValidatorIssue *issue) +{ + AsValidatorIssuePrivate *priv = GET_PRIVATE (issue); + return priv->fname; +} + +/** + * as_validator_issue_set_filename: + * @issue: a #AsValidatorIssue instance. + * @fname: the filename. + * + * Sets the name of the file the issue was found in. + **/ +void +as_validator_issue_set_filename (AsValidatorIssue *issue, const gchar *fname) +{ + AsValidatorIssuePrivate *priv = GET_PRIVATE (issue); + g_free (priv->fname); + priv->fname = g_strdup (fname); +} + +/** + * as_validator_issue_get_location: + * @issue: a #AsValidatorIssue instance. + * + * Builds a string containing all information about the location + * where this issue occured that we know about. + * + * Returns: (transfer full): the location hint as string. + **/ +gchar* +as_validator_issue_get_location (AsValidatorIssue *issue) +{ + AsValidatorIssuePrivate *priv = GET_PRIVATE (issue); + GString *location; + + location = g_string_new (""); + + if (priv->fname == NULL) + g_string_append (location, "~"); + else + g_string_append (location, priv->fname); + + if (priv->cid == NULL) + g_string_append (location, ":~"); + else + g_string_append_printf (location, ":%s", priv->cid); + + if (priv->line >= 0) { + g_string_append_printf (location, ":%i", priv->line); + } + + return g_string_free (location, FALSE); } /** diff -Nru appstream-0.9.4/src/as-validator-issue.h appstream-0.12.0/src/as-validator-issue.h --- appstream-0.9.4/src/as-validator-issue.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-validator-issue.h 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2014-2015 Matthias Klumpp + * Copyright (C) 2014-2017 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -80,6 +80,8 @@ * @AS_ISSUE_KIND_FILE_MISSING: A required file or other metadata was missing * @AS_ISSUE_KIND_WRONG_NAME: The naming of an entity is wrong * @AS_ISSUE_KIND_READ_ERROR: Reading of data failed + * @AS_ISSUE_KIND_REMOTE_ERROR: Getting additional content from a remote location failed + * @AS_ISSUE_KIND_UNUSUAL: Unusual combination of values and likely not intended * * The issue type. **/ @@ -99,6 +101,8 @@ AS_ISSUE_KIND_FILE_MISSING, AS_ISSUE_KIND_WRONG_NAME, AS_ISSUE_KIND_READ_ERROR, + AS_ISSUE_KIND_REMOTE_ERROR, + AS_ISSUE_KIND_UNUSUAL, /*< private >*/ AS_ISSUE_KIND_LAST } AsIssueKind; @@ -115,11 +119,21 @@ const gchar *as_validator_issue_get_message (AsValidatorIssue *issue); void as_validator_issue_set_message (AsValidatorIssue *issue, - const gchar *message); + const gchar *message); -const gchar *as_validator_issue_get_location (AsValidatorIssue *issue); -void as_validator_issue_set_location (AsValidatorIssue *issue, - const gchar *location); +const gchar *as_validator_issue_get_cid (AsValidatorIssue *issue); +void as_validator_issue_set_cid (AsValidatorIssue *issue, + const gchar *cid); + +const gchar *as_validator_issue_get_filename (AsValidatorIssue *issue); +void as_validator_issue_set_filename (AsValidatorIssue *issue, + const gchar *fname); + +gint as_validator_issue_get_line (AsValidatorIssue *issue); +void as_validator_issue_set_line (AsValidatorIssue *issue, + gint line); + +gchar *as_validator_issue_get_location (AsValidatorIssue *issue); G_END_DECLS diff -Nru appstream-0.9.4/src/as-variant-cache.c appstream-0.12.0/src/as-variant-cache.c --- appstream-0.9.4/src/as-variant-cache.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-variant-cache.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,217 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "as-variant-cache.h" + +#include "as-utils.h" +#include "as-utils-private.h" +#include "as-component-private.h" + +/** + * SECTION:as-variant-cache + * @short_description: Helper functions for AppStream's GVariant-based on-disk serialization. + * @include: appstream.h + */ + +#define CACHE_FORMAT_VERSION 1 + +/** + * as_variant_get_dict_uint32: + * + * Get a an uint32 from a dictionary. + */ +guint32 +as_variant_get_dict_uint32 (GVariantDict *dict, const gchar *key) +{ + g_autoptr(GVariant) val = NULL; + val = g_variant_dict_lookup_value (dict, + key, + G_VARIANT_TYPE_UINT32); + return g_variant_get_uint32 (val); +} + +/** + * as_variant_get_dict_str: + * + * Get a string from a GVariant dictionary. + */ +const gchar* +as_variant_get_dict_str (GVariantDict *dict, const gchar *key, GVariant **var) +{ + *var = g_variant_dict_lookup_value (dict, + key, + G_VARIANT_TYPE_STRING); + return g_variant_get_string (*var, NULL); +} + +/** + * as_variant_get_dict_strv: + * + * Get a strv from a dictionary. + * + * returns: (transfer container): A gchar** + */ +const gchar** +as_variant_get_dict_strv (GVariantDict *dict, const gchar *key, GVariant **var) +{ + *var = g_variant_dict_lookup_value (dict, + key, + G_VARIANT_TYPE_STRING_ARRAY); + return g_variant_get_strv (*var, NULL); +} + +/** + * as_variant_maybe_string_new: + * + * Create a string wrapped in a maybe GVariant. + */ +const gchar* +as_variant_get_mstring (GVariant **var) +{ + GVariant *tmp; + + if (*var == NULL) + return NULL; + + tmp = g_variant_get_maybe (*var); + if (tmp == NULL) + return NULL; + g_variant_unref (*var); + *var = tmp; + + return g_variant_get_string (*var, NULL); +} + +/** + * as_variant_mstring_new: + * + * Create a string wrapped in a maybe GVariant. + */ +GVariant* +as_variant_mstring_new (const gchar *str) +{ + GVariant *res; + + if (str == NULL) + res = g_variant_new_maybe (G_VARIANT_TYPE_STRING, NULL); + else + res = g_variant_new_maybe (G_VARIANT_TYPE_STRING, + g_variant_new_string (str)); + return res; +} + +/** + * as_variant_get_dict_mstr: + * + * Get a string wrapped in a maybe GVariant from a dictionary. + */ +const gchar* +as_variant_get_dict_mstr (GVariantDict *dict, const gchar *key, GVariant **var) +{ + *var = g_variant_dict_lookup_value (dict, + key, + G_VARIANT_TYPE_MAYBE); + return as_variant_get_mstring (var); +} + +/** + * as_variant_get_dict_int32: + * + * Get a an uint32 from a dictionary. + */ +gint +as_variant_get_dict_int32 (GVariantDict *dict, const gchar *key) +{ + g_autoptr(GVariant) val = NULL; + val = g_variant_dict_lookup_value (dict, + key, + G_VARIANT_TYPE_INT32); + return g_variant_get_int32 (val); +} + +/** + * as_variant_from_string_ptrarray: + * + * Add key/value pair with a string key and variant value. + */ +GVariant* +as_variant_from_string_ptrarray (GPtrArray *strarray) +{ + GVariantBuilder ab; + guint i; + + if ((strarray == NULL) || (strarray->len == 0)) + return NULL; + + g_variant_builder_init (&ab, G_VARIANT_TYPE_STRING_ARRAY); + for (i = 0; i < strarray->len; i++) { + const gchar *str = (const gchar*) g_ptr_array_index (strarray, i); + g_variant_builder_add_value (&ab, g_variant_new_string (str)); + } + + return g_variant_builder_end (&ab); +} + +/** + * as_variant_to_string_ptrarray: + * + * Add contents of array-type variant to string list. + */ +void +as_variant_to_string_ptrarray (GVariant *var, GPtrArray *dest) +{ + GVariant *child; + GVariantIter iter; + + g_variant_iter_init (&iter, var); + while ((child = g_variant_iter_next_value (&iter))) { + g_ptr_array_add (dest, g_variant_dup_string (child, NULL)); + g_variant_unref (child); + } +} + +/** + * as_variant_to_string_ptrarray_by_dict: + * + * Add contents of array-type variant to string list using a dictionary key + * to get the source variant. + */ +void +as_variant_to_string_ptrarray_by_dict (GVariantDict *dict, const gchar *key, GPtrArray *dest) +{ + g_autoptr(GVariant) var = NULL; + + var = g_variant_dict_lookup_value (dict, key, G_VARIANT_TYPE_STRING_ARRAY); + if (var != NULL) + as_variant_to_string_ptrarray (var, dest); +} + +/** + * as_variant_builder_add_kv: + * + * Add key/value pair with a string key and variant value. + */ +void +as_variant_builder_add_kv (GVariantBuilder *builder, const gchar *key, GVariant *value) +{ + if (value == NULL) + return; + g_variant_builder_add (builder, "{sv}", key, value); +} diff -Nru appstream-0.9.4/src/as-variant-cache.h appstream-0.12.0/src/as-variant-cache.h --- appstream-0.9.4/src/as-variant-cache.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-variant-cache.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,69 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_VARIANT_CACHE_H +#define __AS_VARIANT_CACHE_H + +#include + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +/* version of the cache the current implementation supports */ +#define CACHE_FORMAT_VERSION 1 + +guint32 as_variant_get_dict_uint32 (GVariantDict *dict, + const gchar *key); +const gchar **as_variant_get_dict_strv (GVariantDict *dict, + const gchar *key, GVariant **var); +const gchar *as_variant_get_dict_str (GVariantDict *dict, + const gchar *key, + GVariant **var); + +const gchar *as_variant_get_mstring (GVariant **var); + +GVariant *as_variant_mstring_new (const gchar *str); +const gchar *as_variant_get_dict_mstr (GVariantDict *dict, + const gchar *key, + GVariant **var); + +gint as_variant_get_dict_int32 (GVariantDict *dict, + const gchar *key); + +GVariant *as_variant_from_string_ptrarray (GPtrArray *strarray); + +void as_variant_to_string_ptrarray (GVariant *var, + GPtrArray *dest); +void as_variant_to_string_ptrarray_by_dict (GVariantDict *dict, + const gchar *key, + GPtrArray *dest); + +void as_variant_builder_add_kv (GVariantBuilder *builder, + const gchar *key, + GVariant *value); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_VARIANT_CACHE_H */ diff -Nru appstream-0.9.4/src/as-xml.c appstream-0.12.0/src/as-xml.c --- appstream-0.9.4/src/as-xml.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-xml.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,625 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "as-xml.h" + +#include +#include "as-utils.h" +#include "as-utils-private.h" + +/** + * SECTION:as-xml + * @short_description: Helper functions to parse AppStream XML data + * @include: appstream.h + */ + +/** + * as_xml_get_node_value: + */ +gchar* +as_xml_get_node_value (xmlNode *node) +{ + gchar *content; + content = (gchar*) xmlNodeGetContent (node); + if (content != NULL) + g_strstrip (content); + + return content; +} + +/** + * as_xmldata_get_node_locale: + * @node: A XML node + * + * Returns: The locale of a node, if the node should be considered for inclusion. + * %NULL if the node should be ignored due to a not-matching locale. + */ +gchar* +as_xmldata_get_node_locale (AsContext *ctx, xmlNode *node) +{ + gchar *lang; + + lang = (gchar*) xmlGetProp (node, (xmlChar*) "lang"); + + if (lang == NULL) { + lang = g_strdup ("C"); + goto out; + } + + if (as_context_get_all_locale_enabled (ctx)) { + /* we should read all languages */ + goto out; + } + + if (as_utils_locale_is_compatible (as_context_get_locale (ctx), lang)) { + goto out; + } + + /* If we are here, we haven't found a matching locale. + * In that case, we return %NULL to indicate that this element should not be added. + */ + g_free (lang); + lang = NULL; + +out: + return lang; +} + +/** + * as_xml_dump_node_children: + */ +gchar* +as_xml_dump_node_children (xmlNode *node) +{ + GString *str = NULL; + xmlNode *iter; + xmlBufferPtr nodeBuf; + + str = g_string_new (""); + for (iter = node->children; iter != NULL; iter = iter->next) { + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) { + continue; + } + + nodeBuf = xmlBufferCreate(); + xmlNodeDump (nodeBuf, NULL, iter, 0, 1); + if (str->len > 0) + g_string_append (str, "\n"); + g_string_append_printf (str, "%s", (const gchar*) nodeBuf->content); + xmlBufferFree (nodeBuf); + } + + return g_string_free (str, FALSE); +} + +/** + * as_xml_add_children_values_to_array: + */ +void +as_xml_add_children_values_to_array (xmlNode *node, const gchar *element_name, GPtrArray *array) +{ + xmlNode *iter; + + for (iter = node->children; iter != NULL; iter = iter->next) { + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) { + continue; + } + if (g_strcmp0 ((const gchar*) iter->name, element_name) == 0) { + gchar *content = as_xml_get_node_value (iter); + /* transfer ownership of content to array */ + if (content != NULL) + g_ptr_array_add (array, content); + } + } +} + +/** + * as_xml_get_children_as_string_list: + */ +GPtrArray* +as_xml_get_children_as_string_list (xmlNode *node, const gchar *element_name) +{ + GPtrArray *list; + + list = g_ptr_array_new_with_free_func (g_free); + as_xml_add_children_values_to_array (node, + element_name, + list); + return list; +} + +/** + * as_xml_get_children_as_strv: + */ +gchar** +as_xml_get_children_as_strv (xmlNode *node, const gchar *element_name) +{ + g_autoptr(GPtrArray) list = NULL; + gchar **res; + + list = as_xml_get_children_as_string_list (node, element_name); + res = as_ptr_array_to_strv (list); + return res; +} + +/** + * as_xml_parse_metainfo_description_node: + */ +void +as_xml_parse_metainfo_description_node (AsContext *ctx, xmlNode *node, GHFunc func, gpointer entity) +{ + xmlNode *iter; + gchar *node_name; + g_autoptr(GHashTable) desc = NULL; + + desc = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + for (iter = node->children; iter != NULL; iter = iter->next) { + GString *str; + + /* discard spaces */ + if (iter->type != XML_ELEMENT_NODE) + continue; + + node_name = (gchar*) iter->name; + if (g_strcmp0 (node_name, "p") == 0) { + g_autofree gchar *lang = NULL; + g_autofree gchar *content = NULL; + g_autofree gchar *tmp = NULL; + + lang = as_xmldata_get_node_locale (ctx, iter); + if (lang == NULL) + /* this locale is not for us */ + continue; + + str = g_hash_table_lookup (desc, lang); + if (str == NULL) { + str = g_string_new (""); + g_hash_table_insert (desc, g_strdup (lang), str); + } + + tmp = as_xml_get_node_value (iter); + content = g_markup_escape_text (tmp, -1); + g_string_append_printf (str, "<%s>%s\n", node_name, content, node_name); + + } else if ((g_strcmp0 (node_name, "ul") == 0) || (g_strcmp0 (node_name, "ol") == 0)) { + GHashTableIter htiter; + gpointer hvalue; + xmlNode *iter2; + + /* append listing node tag to every locale string */ + g_hash_table_iter_init (&htiter, desc); + while (g_hash_table_iter_next (&htiter, NULL, &hvalue)) { + GString *hstr = (GString*) hvalue; + g_string_append_printf (hstr, "<%s>\n", node_name); + } + + for (iter2 = iter->children; iter2 != NULL; iter2 = iter2->next) { + g_autofree gchar *lang = NULL; + g_autofree gchar *content = NULL; + g_autofree gchar *tmp = NULL; + + if (iter2->type != XML_ELEMENT_NODE) + continue; + if (g_strcmp0 ((const gchar*) iter2->name, "li") != 0) + continue; + + lang = as_xmldata_get_node_locale (ctx, iter2); + if (lang == NULL) + continue; + + /* if the language is new, we start it with an enum */ + str = g_hash_table_lookup (desc, lang); + if (str == NULL) { + str = g_string_new (""); + g_string_append_printf (str, "<%s>\n", node_name); + g_hash_table_insert (desc, g_strdup (lang), str); + } + + tmp = as_xml_get_node_value (iter2); + content = g_markup_escape_text (tmp, -1); + g_string_append_printf (str, " <%s>%s\n", (gchar*) iter2->name, content, (gchar*) iter2->name); + } + + /* close listing tags */ + g_hash_table_iter_init (&htiter, desc); + while (g_hash_table_iter_next (&htiter, NULL, &hvalue)) { + GString *hstr = (GString*) hvalue; + g_string_append_printf (hstr, "\n", node_name); + } + } + } + + g_hash_table_foreach (desc, func, entity); +} + +/** + * as_xml_add_description_node_helper: + * + * Add the description markup to the XML tree + */ +static gboolean +as_xml_add_description_node_helper (AsContext *ctx, xmlNode *root, xmlNode **desc_node, const gchar *description_markup, const gchar *lang) +{ + g_autofree gchar *xmldata = NULL; + xmlDoc *doc; + xmlNode *droot; + xmlNode *dnode; + xmlNode *iter; + gboolean ret = TRUE; + gboolean localized; + + if (as_str_empty (description_markup)) + return FALSE; + + /* skip cruft */ + if (as_is_cruft_locale (lang)) + return FALSE; + + xmldata = g_strdup_printf ("%s", description_markup); + doc = xmlReadMemory (xmldata, strlen (xmldata), + NULL, + "utf-8", + XML_PARSE_NOBLANKS | XML_PARSE_NONET); + if (doc == NULL) { + ret = FALSE; + goto out; + } + + droot = xmlDocGetRootElement (doc); + if (droot == NULL) { + ret = FALSE; + goto out; + } + + if (as_context_get_style (ctx) == AS_FORMAT_STYLE_METAINFO) { + if (*desc_node == NULL) + *desc_node = xmlNewChild (root, NULL, (xmlChar*) "description", NULL); + dnode = *desc_node; + } else { + /* in collection-data parser mode, we might have multiple tags */ + dnode = xmlNewChild (root, NULL, (xmlChar*) "description", NULL); + } + + localized = g_strcmp0 (lang, "C") != 0; + if (as_context_get_style (ctx) == AS_FORMAT_STYLE_COLLECTION) { + if (localized) { + xmlNewProp (dnode, + (xmlChar*) "xml:lang", + (xmlChar*) lang); + } + } + + for (iter = droot->children; iter != NULL; iter = iter->next) { + xmlNode *cn; + + if (g_strcmp0 ((const gchar*) iter->name, "p") == 0) { + cn = xmlAddChild (dnode, xmlCopyNode (iter, TRUE)); + + if ((as_context_get_style (ctx) == AS_FORMAT_STYLE_METAINFO) && (localized)) { + xmlNewProp (cn, + (xmlChar*) "xml:lang", + (xmlChar*) lang); + } + } else if ((g_strcmp0 ((const gchar*) iter->name, "ul") == 0) || (g_strcmp0 ((const gchar*) iter->name, "ol") == 0)) { + xmlNode *iter2; + xmlNode *enumNode; + + enumNode = xmlNewChild (dnode, NULL, iter->name, NULL); + for (iter2 = iter->children; iter2 != NULL; iter2 = iter2->next) { + if (g_strcmp0 ((const gchar*) iter2->name, "li") != 0) + continue; + + cn = xmlAddChild (enumNode, xmlCopyNode (iter2, TRUE)); + + if ((as_context_get_style (ctx) == AS_FORMAT_STYLE_METAINFO) && (localized)) { + xmlNewProp (cn, + (xmlChar*) "xml:lang", + (xmlChar*) lang); + } + } + + continue; + } + } + +out: + if (doc != NULL) + xmlFreeDoc (doc); + return ret; +} + +/** + * as_xml_add_description_node: + * + * Add a description node to the XML document tree. + */ +void +as_xml_add_description_node (AsContext *ctx, xmlNode *root, GHashTable *desc_table) +{ + GHashTableIter iter; + gpointer key, value; + xmlNode *desc_node = NULL; + + g_hash_table_iter_init (&iter, desc_table); + while (g_hash_table_iter_next (&iter, &key, &value)) { + const gchar *locale = (const gchar*) key; + const gchar *desc_markup = (const gchar*) value; + + if (as_is_cruft_locale (locale)) + continue; + + as_xml_add_description_node_helper (ctx, root, &desc_node, desc_markup, locale); + } +} + +/** + * as_xml_add_localized_text_node: + * + * Add set of localized XML nodes based on a localization table. + */ +void +as_xml_add_localized_text_node (xmlNode *root, const gchar *node_name, GHashTable *value_table) +{ + GHashTableIter iter; + gpointer key, value; + + g_hash_table_iter_init (&iter, value_table); + while (g_hash_table_iter_next (&iter, &key, &value)) { + xmlNode *cnode; + const gchar *locale = (const gchar*) key; + const gchar *str = (const gchar*) value; + + if (as_str_empty (str)) + continue; + + /* skip cruft */ + if (as_is_cruft_locale (locale)) + continue; + + cnode = xmlNewTextChild (root, NULL, (xmlChar*) node_name, (xmlChar*) str); + if (g_strcmp0 (locale, "C") != 0) { + xmlNewProp (cnode, + (xmlChar*) "xml:lang", + (xmlChar*) locale); + } + } +} + +/** + * as_xml_add_node_list_strv: + * + * Add node with a list of children containing the strv contents. + */ +xmlNode* +as_xml_add_node_list_strv (xmlNode *root, const gchar *name, const gchar *child_name, gchar **strv) +{ + xmlNode *node; + guint i; + + /* don't add the node if we have no values */ + if (strv == NULL) + return NULL; + if (strv[0] == NULL) + return NULL; + + if (name == NULL) + node = root; + else + node = xmlNewChild (root, + NULL, + (xmlChar*) name, + NULL); + for (i = 0; strv[i] != NULL; i++) { + xmlNewTextChild (node, + NULL, + (xmlChar*) child_name, + (xmlChar*) strv[i]); + } + + return node; +} + +/** + * as_xml_add_node_list: + * + * Add node with a list of children containing the string array contents. + */ +void +as_xml_add_node_list (xmlNode *root, const gchar *name, const gchar *child_name, GPtrArray *array) +{ + xmlNode *node; + guint i; + + /* don't add the node if we have no values */ + if (array == NULL) + return; + if (array->len == 0) + return; + + if (name == NULL) + node = root; + else + node = xmlNewChild (root, + NULL, + (xmlChar*) name, + NULL); + + for (i = 0; i < array->len; i++) { + const xmlChar *value = (const xmlChar*) g_ptr_array_index (array, i); + xmlNewTextChild (node, + NULL, + (xmlChar*) child_name, + value); + } +} + +/** + * as_xml_add_text_node: + * + * Add node if value is not empty + */ +xmlNode* +as_xml_add_text_node (xmlNode *root, const gchar *name, const gchar *value) +{ + if (as_str_empty (value)) + return NULL; + + return xmlNewTextChild (root, NULL, (xmlChar*) name, (xmlChar*) value); +} + +/** + * libxml_generic_error: + * + * Catch out-of-context errors emitted by libxml2. + */ +static void +libxml_generic_error (gchar **error_str_ptr, const char *format, ...) +{ + GString *str; + va_list arg_ptr; + gchar *error_str; + static GMutex mutex; + g_assert (error_str_ptr != NULL); + + error_str = (*error_str_ptr); + + g_mutex_lock (&mutex); + str = g_string_new (error_str? error_str : ""); + + va_start (arg_ptr, format); + g_string_append_vprintf (str, format, arg_ptr); + va_end (arg_ptr); + + g_free (error_str); + error_str = g_string_free (str, FALSE); + g_mutex_unlock (&mutex); +} + +/** + * as_xml_set_out_of_context_error: + */ +static void +as_xml_set_out_of_context_error (gchar **error_msg_str) +{ + static GMutex mutex; + + g_mutex_lock (&mutex); + if (error_msg_str == NULL) { + xmlSetGenericErrorFunc (NULL, NULL); + } else { + g_free (*error_msg_str); + (*error_msg_str) = NULL; + xmlSetGenericErrorFunc (error_msg_str, (xmlGenericErrorFunc) libxml_generic_error); + } + g_mutex_unlock (&mutex); +} + +/** + * as_xmldata_parse_document: + */ +xmlDoc* +as_xml_parse_document (const gchar *data, GError **error) +{ + xmlDoc *doc; + xmlNode *root; + g_autofree gchar *error_msg_str = NULL; + + if (data == NULL) { + /* empty document means no components */ + return NULL; + } + + as_xml_set_out_of_context_error (&error_msg_str); + doc = xmlReadMemory (data, strlen (data), + NULL, + "utf-8", + XML_PARSE_NOBLANKS | XML_PARSE_NONET); + if (doc == NULL) { + if (error_msg_str == NULL) { + g_set_error (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "Could not parse XML data."); + } else { + g_set_error (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "Could not parse XML data: %s", error_msg_str); + } + as_xml_set_out_of_context_error (NULL); + return NULL; + } + as_xml_set_out_of_context_error (NULL); + + root = xmlDocGetRootElement (doc); + if (root == NULL) { + g_set_error_literal (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "The XML document is empty."); + xmlFreeDoc (doc); + return NULL; + } + + return doc; +} + +/** + * as_xml_node_to_str: + * + * Converts an XML node into its textural representation. + * + * Returns: XML metadata. + */ +gchar* +as_xml_node_to_str (xmlNode *root, GError **error) +{ + xmlDoc *doc; + gchar *xmlstr = NULL; + g_autofree gchar *error_msg_str = NULL; + + as_xml_set_out_of_context_error (&error_msg_str); + doc = xmlNewDoc ((xmlChar*) NULL); + if (root == NULL) + goto out; + + xmlDocSetRootElement (doc, root); + xmlDocDumpFormatMemoryEnc (doc, (xmlChar**) (&xmlstr), NULL, "utf-8", TRUE); + + if (error_msg_str != NULL) { + if (error == NULL) { + g_warning ("Could not serialize XML document: %s", error_msg_str); + goto out; + } else { + g_set_error (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_FAILED, + "Could not serialize XML document: %s", error_msg_str); + goto out; + } + } + +out: + as_xml_set_out_of_context_error (NULL); + xmlFreeDoc (doc); + return xmlstr; +} diff -Nru appstream-0.9.4/src/as-xmldata.c appstream-0.12.0/src/as-xmldata.c --- appstream-0.9.4/src/as-xmldata.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-xmldata.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1895 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -/** - * SECTION:as-xmldata - * @short_description: AppStream data XML serialization. - * @include: appstream.h - * - * Private class to serialize AppStream data into its XML representation and - * deserialize the data again. - * This class is used by #AsMetadata to read AppStream XML. - * - * See also: #AsComponent, #AsMetadata - */ - -#include "as-xmldata.h" - -#include -#include -#include -#include -#include - -#include "as-utils.h" -#include "as-utils-private.h" -#include "as-metadata.h" -#include "as-component-private.h" - -typedef struct -{ - gchar *locale; - gchar *locale_short; - gchar *origin; - gchar *media_baseurl; - - gchar *arch; - gint default_priority; - - AsParserMode mode; - gchar *last_error_msg; -} AsXMLDataPrivate; - -G_DEFINE_TYPE_WITH_PRIVATE (AsXMLData, as_xmldata, G_TYPE_OBJECT) -#define GET_PRIVATE(o) (as_xmldata_get_instance_private (o)) - -static gchar **as_xmldata_get_children_as_strv (AsXMLData *xdt, xmlNode *node, const gchar *element_name); - -/** - * libxml_generic_error: - * - * Catch out-of-context errors emitted by libxml2. - */ -static void -libxml_generic_error (AsXMLData *xdt, const char *msg, ...) -{ - gchar *tmp; - gchar str[1024]; - va_list arg_ptr; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - va_start (arg_ptr, msg); - vsnprintf (str, 1024, msg, arg_ptr); - va_end (arg_ptr); - - if (priv->last_error_msg == NULL) - tmp = g_strdup (str); - else - tmp = g_strdup_printf ("%s%s", priv->last_error_msg, str); - - g_free (priv->last_error_msg); - priv->last_error_msg = tmp; -} - -/** - * as_xmldata_init: - **/ -static void -as_xmldata_init (AsXMLData *xdt) -{ - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - priv->default_priority = 0; - priv->mode = AS_PARSER_MODE_UPSTREAM; - xmlSetGenericErrorFunc (xdt, (xmlGenericErrorFunc) libxml_generic_error); -} - -/** - * as_xmldata_finalize: - **/ -static void -as_xmldata_finalize (GObject *object) -{ - AsXMLData *xdt = AS_XMLDATA (object); - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - g_free (priv->locale); - g_free (priv->locale_short); - g_free (priv->origin); - g_free (priv->media_baseurl); - g_free (priv->arch); - g_free (priv->last_error_msg); - - G_OBJECT_CLASS (as_xmldata_parent_class)->finalize (object); -} - -/** - * as_xmldata_initialize: - * @xdt: An instance of #AsXMLData - * - * Initialize the XML handler. - */ -void -as_xmldata_initialize (AsXMLData *xdt, const gchar *locale, const gchar *origin, const gchar *media_baseurl, const gchar *arch, gint priority) -{ - g_auto(GStrv) strv = NULL; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - g_free (priv->locale); - g_free (priv->locale_short); - priv->locale = g_strdup (locale); - - strv = g_strsplit (priv->locale, "_", 0); - priv->locale_short = g_strdup (strv[0]); - - g_free (priv->origin); - priv->origin = g_strdup (origin); - - g_free (priv->media_baseurl); - priv->media_baseurl = g_strdup (media_baseurl); - - g_free (priv->arch); - priv->arch = g_strdup (arch); - - priv->default_priority = priority; -} - -/** - * as_xmldata_clear_error: - */ -void -as_xmldata_clear_error (AsXMLData *xdt) -{ - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - g_free (priv->last_error_msg); - priv->last_error_msg = NULL; -} - -/** - * as_xmldata_get_node_value: - */ -static gchar* -as_xmldata_get_node_value (AsXMLData *xdt, xmlNode *node) -{ - gchar *content; - content = (gchar*) xmlNodeGetContent (node); - - return content; -} - -/** - * as_xmldata_dump_node_children: - */ -static gchar* -as_xmldata_dump_node_children (AsXMLData *xdt, xmlNode *node) -{ - GString *str = NULL; - xmlNode *iter; - xmlBufferPtr nodeBuf; - - str = g_string_new (""); - for (iter = node->children; iter != NULL; iter = iter->next) { - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) { - continue; - } - - nodeBuf = xmlBufferCreate(); - xmlNodeDump (nodeBuf, NULL, iter, 0, 1); - if (str->len > 0) - g_string_append (str, "\n"); - g_string_append_printf (str, "%s", (const gchar*) nodeBuf->content); - xmlBufferFree (nodeBuf); - } - - return g_string_free (str, FALSE); -} - -/** - * as_xmldata_get_node_locale: - * @node: A XML node - * - * Returns: The locale of a node, if the node should be considered for inclusion. - * %NULL if the node should be ignored due to a not-matching locale. - */ -gchar* -as_xmldata_get_node_locale (AsXMLData *xdt, xmlNode *node) -{ - gchar *lang; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - lang = (gchar*) xmlGetProp (node, (xmlChar*) "lang"); - - if (lang == NULL) { - lang = g_strdup ("C"); - goto out; - } - - if (g_strcmp0 (priv->locale, "ALL") == 0) { - /* we should read all languages */ - goto out; - } - - if (g_strcmp0 (lang, priv->locale) == 0) { - goto out; - } - - if (g_strcmp0 (lang, priv->locale_short) == 0) { - g_free (lang); - lang = g_strdup (priv->locale); - goto out; - } - - /* If we are here, we haven't found a matching locale. - * In that case, we return %NULL to indicate that this element should not be added. - */ - g_free (lang); - lang = NULL; - -out: - return lang; -} - -static gchar** -as_xmldata_get_children_as_strv (AsXMLData *xdt, xmlNode* node, const gchar* element_name) -{ - GPtrArray *list; - xmlNode *iter; - gchar **res; - g_return_val_if_fail (xdt != NULL, NULL); - g_return_val_if_fail (element_name != NULL, NULL); - list = g_ptr_array_new_with_free_func (g_free); - - for (iter = node->children; iter != NULL; iter = iter->next) { - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) { - continue; - } - if (g_strcmp0 ((gchar*) iter->name, element_name) == 0) { - gchar* content = NULL; - content = (gchar*) xmlNodeGetContent (iter); - if (content != NULL) { - gchar *s; - s = g_strdup (content); - g_strstrip (s); - g_ptr_array_add (list, s); - } - g_free (content); - } - } - - res = as_ptr_array_to_strv (list); - g_ptr_array_unref (list); - return res; -} - -/** - * as_xmldata_process_image: - * - * Read node as image node and add it to an existing screenshot. - */ -static void -as_xmldata_process_image (AsXMLData *xdt, xmlNode *node, AsScreenshot *scr) -{ - g_autoptr(AsImage) img = NULL; - g_autofree gchar *content = NULL; - guint64 width; - guint64 height; - gchar *stype; - gchar *str; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - content = as_xmldata_get_node_value (xdt, node); - if (content == NULL) - return; - g_strstrip (content); - - img = as_image_new (); - - str = (gchar*) xmlGetProp (node, (xmlChar*) "width"); - if (str == NULL) { - width = 0; - } else { - width = g_ascii_strtoll (str, NULL, 10); - g_free (str); - } - str = (gchar*) xmlGetProp (node, (xmlChar*) "height"); - if (str == NULL) { - height = 0; - } else { - height = g_ascii_strtoll (str, NULL, 10); - g_free (str); - } - - /* discard invalid elements */ - if (priv->mode == AS_PARSER_MODE_DISTRO) { - /* no sizes are okay for upstream XML, but not for distro XML */ - if ((width == 0) || (height == 0)) - return; - } - - as_image_set_width (img, width); - as_image_set_height (img, height); - - stype = (gchar*) xmlGetProp (node, (xmlChar*) "type"); - if (g_strcmp0 (stype, "thumbnail") == 0) { - as_image_set_kind (img, AS_IMAGE_KIND_THUMBNAIL); - } else { - as_image_set_kind (img, AS_IMAGE_KIND_SOURCE); - } - g_free (stype); - - if (priv->media_baseurl == NULL) { - /* no baseurl, we can just set the value as URL */ - as_image_set_url (img, content); - } else { - /* handle the media baseurl */ - gchar *tmp; - tmp = g_build_filename (priv->media_baseurl, content, NULL); - as_image_set_url (img, tmp); - g_free (tmp); - } - - as_screenshot_add_image (scr, img); -} - -/** - * as_xmldata_process_screenshot: - */ -static void -as_xmldata_process_screenshot (AsXMLData *xdt, xmlNode *node, AsScreenshot *scr) -{ - xmlNode *iter; - gchar *node_name; - gboolean subnode_found = FALSE; - - for (iter = node->children; iter != NULL; iter = iter->next) { - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) - continue; - subnode_found = TRUE; - - node_name = (gchar*) iter->name; - - if (g_strcmp0 (node_name, "image") == 0) { - as_xmldata_process_image (xdt, iter, scr); - } else if (g_strcmp0 (node_name, "caption") == 0) { - g_autofree gchar *content = NULL; - g_autofree gchar *lang = NULL; - - content = as_xmldata_get_node_value (xdt, iter); - if (content == NULL) - continue; - g_strstrip (content); - - - lang = as_xmldata_get_node_locale (xdt, iter); - if (lang != NULL) - as_screenshot_set_caption (scr, content, lang); - } - } - - if (!subnode_found) { - /* - * We are dealing with a legacy screenshots tag in the form of - * URL. - * We treat it as an tag here, which is roughly equivalent. */ - as_xmldata_process_image (xdt, node, scr); - } -} - -/** - * as_xmldata_process_screenshots_tag: - */ -static void -as_xmldata_process_screenshots_tag (AsXMLData *xdt, xmlNode* node, AsComponent* cpt) -{ - xmlNode *iter; - AsScreenshot *sshot = NULL; - gchar *prop; - g_return_if_fail (xdt != NULL); - g_return_if_fail (cpt != NULL); - - for (iter = node->children; iter != NULL; iter = iter->next) { - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) - continue; - - if (g_strcmp0 ((gchar*) iter->name, "screenshot") == 0) { - sshot = as_screenshot_new (); - - /* propagate locale */ - as_screenshot_set_active_locale (sshot, as_component_get_active_locale (cpt)); - - prop = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); - if (g_strcmp0 (prop, "default") == 0) - as_screenshot_set_kind (sshot, AS_SCREENSHOT_KIND_DEFAULT); - as_xmldata_process_screenshot (xdt, iter, sshot); - if (as_screenshot_is_valid (sshot)) - as_component_add_screenshot (cpt, sshot); - g_free (prop); - g_object_unref (sshot); - } - } -} - -/** - * as_xmldata_upstream_description_to_cpt: - * - * Helper function for GHashTable - */ -static void -as_xmldata_upstream_description_to_cpt (gchar *key, GString *value, AsComponent *cpt) -{ - g_assert (AS_IS_COMPONENT (cpt)); - - as_component_set_description (cpt, value->str, key); - g_string_free (value, TRUE); -} - -/** - * as_xmldata_upstream_description_to_release: - * - * Helper function for GHashTable - */ -static void -as_xmldata_upstream_description_to_release (gchar *key, GString *value, AsRelease *rel) -{ - g_assert (AS_IS_RELEASE (rel)); - - as_release_set_description (rel, value->str, key); - g_string_free (value, TRUE); -} - -/** - * as_xmldata_parse_upstream_description_tag: - */ -static void -as_xmldata_parse_upstream_description_tag (AsXMLData *xdt, xmlNode* node, GHFunc func, gpointer entity) -{ - xmlNode *iter; - gchar *node_name; - GHashTable *desc; - - desc = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); - - for (iter = node->children; iter != NULL; iter = iter->next) { - GString *str; - - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) - continue; - - node_name = (gchar*) iter->name; - if (g_strcmp0 (node_name, "p") == 0) { - g_autofree gchar *lang = NULL; - g_autofree gchar *content = NULL; - g_autofree gchar *tmp = NULL; - - lang = as_xmldata_get_node_locale (xdt, iter); - if (lang == NULL) - /* this locale is not for us */ - continue; - - str = g_hash_table_lookup (desc, lang); - if (str == NULL) { - str = g_string_new (""); - g_hash_table_insert (desc, g_strdup (lang), str); - } - - tmp = as_xmldata_get_node_value (xdt, iter); - content = g_markup_escape_text (tmp, -1); - g_string_append_printf (str, "<%s>%s\n", node_name, content, node_name); - - } else if ((g_strcmp0 (node_name, "ul") == 0) || (g_strcmp0 (node_name, "ol") == 0)) { - GList *l; - g_autoptr(GList) vlist = NULL; - xmlNode *iter2; - - /* append listing node tag to every locale string */ - vlist = g_hash_table_get_values (desc); - for (l = vlist; l != NULL; l = l->next) { - g_string_append_printf (l->data, "<%s>\n", node_name); - } - - for (iter2 = iter->children; iter2 != NULL; iter2 = iter2->next) { - g_autofree gchar *lang = NULL; - g_autofree gchar *content = NULL; - g_autofree gchar *tmp = NULL; - - if (iter2->type != XML_ELEMENT_NODE) - continue; - if (g_strcmp0 ((const gchar*) iter2->name, "li") != 0) - continue; - - lang = as_xmldata_get_node_locale (xdt, iter2); - if (lang == NULL) - continue; - - /* we can not allow adding new languages starting with a enum tag, so we skip the entry if the locale is unknown */ - str = g_hash_table_lookup (desc, lang); - if (str == NULL) - continue; - - tmp = as_xmldata_get_node_value (xdt, iter2); - content = g_markup_escape_text (tmp, -1); - g_string_append_printf (str, " <%s>%s\n", (gchar*) iter2->name, content, (gchar*) iter2->name); - } - - /* close listing tags */ - for (l = vlist; l != NULL; l = l->next) { - g_string_append_printf (l->data, "\n", node_name); - } - } - } - - g_hash_table_foreach (desc, func, entity); - g_hash_table_unref (desc); -} - -static void -as_xmldata_process_releases_tag (AsXMLData *xdt, xmlNode* node, AsComponent* cpt) -{ - xmlNode *iter; - xmlNode *iter2; - AsRelease *release = NULL; - gchar *prop; - guint64 timestamp; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - g_return_if_fail (cpt != NULL); - - for (iter = node->children; iter != NULL; iter = iter->next) { - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) - continue; - - if (g_strcmp0 ((gchar*) iter->name, "release") == 0) { - release = as_release_new (); - - /* propagate locale */ - as_release_set_active_locale (release, as_component_get_active_locale (cpt)); - - prop = (gchar*) xmlGetProp (iter, (xmlChar*) "version"); - as_release_set_version (release, prop); - g_free (prop); - - prop = (gchar*) xmlGetProp (iter, (xmlChar*) "date"); - if (prop != NULL) { - g_autoptr(GDateTime) time; - time = as_iso8601_to_datetime (prop); - if (time != NULL) { - as_release_set_timestamp (release, g_date_time_to_unix (time)); - } else { - g_debug ("Invalid ISO-8601 date in releases of %s", as_component_get_id (cpt)); - } - g_free (prop); - } - - prop = (gchar*) xmlGetProp (iter, (xmlChar*) "timestamp"); - if (prop != NULL) { - timestamp = g_ascii_strtoll (prop, NULL, 10); - as_release_set_timestamp (release, timestamp); - g_free (prop); - } - prop = (gchar*) xmlGetProp (iter, (xmlChar*) "urgency"); - if (prop != NULL) { - AsUrgencyKind ukind; - ukind = as_urgency_kind_from_string (prop); - as_release_set_urgency (release, ukind); - g_free (prop); - } - - for (iter2 = iter->children; iter2 != NULL; iter2 = iter2->next) { - gchar *content; - - if (iter->type != XML_ELEMENT_NODE) - continue; - - if (g_strcmp0 ((gchar*) iter2->name, "location") == 0) { - content = as_xmldata_get_node_value (xdt, iter2); - as_release_add_location (release, content); - g_free (content); - } else if (g_strcmp0 ((gchar*) iter2->name, "checksum") == 0) { - AsChecksumKind cs_kind; - prop = (gchar*) xmlGetProp (iter2, (xmlChar*) "type"); - - cs_kind = as_checksum_kind_from_string (prop); - if (cs_kind != AS_CHECKSUM_KIND_NONE) { - content = as_xmldata_get_node_value (xdt, iter2); - as_release_set_checksum (release, content, cs_kind); - g_free (content); - } - g_free (prop); - } else if (g_strcmp0 ((gchar*) iter2->name, "size") == 0) { - AsSizeKind s_kind; - prop = (gchar*) xmlGetProp (iter2, (xmlChar*) "type"); - - s_kind = as_size_kind_from_string (prop); - if (s_kind != AS_SIZE_KIND_UNKNOWN) { - guint64 size; - - content = as_xmldata_get_node_value (xdt, iter2); - size = g_ascii_strtoull (content, NULL, 10); - g_free (content); - if (size > 0) - as_release_set_size (release, size, s_kind); - } - g_free (prop); - } else if (g_strcmp0 ((gchar*) iter2->name, "description") == 0) { - if (priv->mode == AS_PARSER_MODE_DISTRO) { - g_autofree gchar *lang; - - /* for distro XML, the "description" tag has a language property, so parsing it is simple */ - content = as_xmldata_dump_node_children (xdt, iter2); - lang = as_xmldata_get_node_locale (xdt, iter2); - if (lang != NULL) - as_release_set_description (release, content, lang); - g_free (content); - } else { - as_xmldata_parse_upstream_description_tag (xdt, - iter2, - (GHFunc) as_xmldata_upstream_description_to_release, - release); - } - } - } - - as_component_add_release (cpt, release); - g_object_unref (release); - } - } -} - -static void -as_xmldata_process_provides (AsXMLData *xdt, xmlNode* node, AsComponent* cpt) -{ - xmlNode *iter; - gchar *node_name; - gchar *content = NULL; - g_return_if_fail (xdt != NULL); - g_return_if_fail (cpt != NULL); - - for (iter = node->children; iter != NULL; iter = iter->next) { - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) - continue; - - node_name = (gchar*) iter->name; - content = as_xmldata_get_node_value (xdt, iter); - if (content == NULL) - continue; - - if (g_strcmp0 (node_name, "library") == 0) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_LIBRARY, content); - } else if (g_strcmp0 (node_name, "binary") == 0) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_BINARY, content); - } else if (g_strcmp0 (node_name, "font") == 0) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FONT, content); - } else if (g_strcmp0 (node_name, "modalias") == 0) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_MODALIAS, content); - } else if (g_strcmp0 (node_name, "firmware") == 0) { - g_autofree gchar *fwtype = NULL; - fwtype = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); - if (fwtype != NULL) { - if (g_strcmp0 (fwtype, "runtime") == 0) - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FIRMWARE_RUNTIME, content); - else if (g_strcmp0 (fwtype, "flashed") == 0) - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FIRMWARE_FLASHED, content); - } - } else if (g_strcmp0 (node_name, "python2") == 0) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_PYTHON_2, content); - } else if (g_strcmp0 (node_name, "python3") == 0) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_PYTHON, content); - } else if (g_strcmp0 (node_name, "dbus") == 0) { - g_autofree gchar *dbustype = NULL; - dbustype = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); - - if (g_strcmp0 (dbustype, "system") == 0) - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_DBUS_SYSTEM, content); - else if ((g_strcmp0 (dbustype, "user") == 0) || (g_strcmp0 (dbustype, "session") == 0)) - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_DBUS_USER, content); - } - - g_free (content); - } -} - -static void -as_xmldata_set_component_type_from_node (xmlNode *node, AsComponent *cpt) -{ - gchar *cpttype; - - /* find out which kind of component we are dealing with */ - cpttype = (gchar*) xmlGetProp (node, (xmlChar*) "type"); - if ((cpttype == NULL) || (g_strcmp0 (cpttype, "generic") == 0)) { - as_component_set_kind (cpt, AS_COMPONENT_KIND_GENERIC); - } else { - AsComponentKind ckind; - ckind = as_component_kind_from_string (cpttype); - as_component_set_kind (cpt, ckind); - if (ckind == AS_COMPONENT_KIND_UNKNOWN) - g_debug ("An unknown component was found: %s", cpttype); - } - g_free (cpttype); -} - -static void -as_xmldata_process_languages_tag (AsXMLData *xdt, xmlNode* node, AsComponent* cpt) -{ - xmlNode *iter; - gchar *prop; - g_return_if_fail (xdt != NULL); - g_return_if_fail (cpt != NULL); - - for (iter = node->children; iter != NULL; iter = iter->next) { - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) - continue; - - if (g_strcmp0 ((gchar*) iter->name, "lang") == 0) { - guint64 percentage = 0; - gchar *locale; - prop = (gchar*) xmlGetProp (iter, (xmlChar*) "percentage"); - if (prop != NULL) { - percentage = g_ascii_strtoll (prop, NULL, 10); - g_free (prop); - } - - locale = as_xmldata_get_node_locale (xdt, iter); - as_component_add_language (cpt, locale, percentage); - g_free (locale); - } - } -} - -/** - * as_xml_icon_set_size_from_node: - */ -static void -as_xml_icon_set_size_from_node (xmlNode *node, AsIcon *icon) -{ - gchar *val; - - val = (gchar*) xmlGetProp (node, (xmlChar*) "width"); - if (val != NULL) { - as_icon_set_width (icon, g_ascii_strtoll (val, NULL, 10)); - g_free (val); - } - val = (gchar*) xmlGetProp (node, (xmlChar*) "height"); - if (val != NULL) { - as_icon_set_height (icon, g_ascii_strtoll (val, NULL, 10)); - g_free (val); - } -} - -/** - * as_xmldata_parse_component_node: - */ -void -as_xmldata_parse_component_node (AsXMLData *xdt, xmlNode* node, AsComponent *cpt, GError **error) -{ - xmlNode *iter; - const gchar *node_name; - GPtrArray *compulsory_for_desktops; - GPtrArray *pkgnames; - gchar **strv; - g_autofree gchar *priority_str; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - compulsory_for_desktops = g_ptr_array_new_with_free_func (g_free); - pkgnames = g_ptr_array_new_with_free_func (g_free); - - /* set component kind */ - as_xmldata_set_component_type_from_node (node, cpt); - - /* set the priority for this component */ - priority_str = (gchar*) xmlGetProp (node, (xmlChar*) "priority"); - if (priority_str == NULL) { - as_component_set_priority (cpt, priv->default_priority); - } else { - as_component_set_priority (cpt, - g_ascii_strtoll (priority_str, NULL, 10)); - - } - - /* set active locale for this component */ - as_component_set_active_locale (cpt, priv->locale); - - for (iter = node->children; iter != NULL; iter = iter->next) { - g_autofree gchar *content = NULL; - g_autofree gchar *lang = NULL; - - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) - continue; - - node_name = (const gchar*) iter->name; - content = as_xmldata_get_node_value (xdt, iter); - g_strstrip (content); - lang = as_xmldata_get_node_locale (xdt, iter); - - if (g_strcmp0 (node_name, "id") == 0) { - as_component_set_id (cpt, content); - if ((priv->mode == AS_PARSER_MODE_UPSTREAM) && - (as_component_get_kind (cpt) == AS_COMPONENT_KIND_GENERIC)) { - /* parse legacy component type information */ - as_xmldata_set_component_type_from_node (iter, cpt); - } - } else if (g_strcmp0 (node_name, "pkgname") == 0) { - if (content != NULL) - g_ptr_array_add (pkgnames, g_strdup (content)); - } else if (g_strcmp0 (node_name, "source_pkgname") == 0) { - as_component_set_source_pkgname (cpt, content); - } else if (g_strcmp0 (node_name, "name") == 0) { - if (lang != NULL) - as_component_set_name (cpt, content, lang); - } else if (g_strcmp0 (node_name, "summary") == 0) { - if (lang != NULL) - as_component_set_summary (cpt, content, lang); - } else if (g_strcmp0 (node_name, "description") == 0) { - if (priv->mode == AS_PARSER_MODE_DISTRO) { - /* for distro XML, the "description" tag has a language property, so parsing it is simple */ - if (lang != NULL) { - gchar *desc; - desc = as_xmldata_dump_node_children (xdt, iter); - as_component_set_description (cpt, desc, lang); - g_free (desc); - } - } else { - as_xmldata_parse_upstream_description_tag (xdt, - iter, - (GHFunc) as_xmldata_upstream_description_to_cpt, - cpt); - } - } else if (g_strcmp0 (node_name, "icon") == 0) { - gchar *prop; - g_autoptr(AsIcon) icon = NULL; - if (content == NULL) - continue; - - prop = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); - icon = as_icon_new (); - - if (g_strcmp0 (prop, "stock") == 0) { - as_icon_set_kind (icon, AS_ICON_KIND_STOCK); - as_icon_set_name (icon, content); - as_component_add_icon (cpt, icon); - } else if (g_strcmp0 (prop, "cached") == 0) { - as_icon_set_kind (icon, AS_ICON_KIND_CACHED); - as_icon_set_filename (icon, content); - as_xml_icon_set_size_from_node (iter, icon); - as_component_add_icon (cpt, icon); - } else if (g_strcmp0 (prop, "local") == 0) { - as_icon_set_kind (icon, AS_ICON_KIND_LOCAL); - as_icon_set_filename (icon, content); - as_xml_icon_set_size_from_node (iter, icon); - as_component_add_icon (cpt, icon); - } else if (g_strcmp0 (prop, "remote") == 0) { - as_icon_set_kind (icon, AS_ICON_KIND_REMOTE); - if (priv->media_baseurl == NULL) { - /* no baseurl, we can just set the value as URL */ - as_icon_set_url (icon, content); - } else { - /* handle the media baseurl */ - gchar *tmp; - tmp = g_build_filename (priv->media_baseurl, content, NULL); - as_icon_set_url (icon, tmp); - g_free (tmp); - } - as_xml_icon_set_size_from_node (iter, icon); - as_component_add_icon (cpt, icon); - } - } else if (g_strcmp0 (node_name, "url") == 0) { - if (content != NULL) { - gchar *urltype_str; - AsUrlKind url_kind; - urltype_str = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); - url_kind = as_url_kind_from_string (urltype_str); - if (url_kind != AS_URL_KIND_UNKNOWN) - as_component_add_url (cpt, url_kind, content); - g_free (urltype_str); - } - } else if (g_strcmp0 (node_name, "categories") == 0) { - gchar **cat_array; - cat_array = as_xmldata_get_children_as_strv (xdt, iter, "category"); - as_component_set_categories (cpt, cat_array); - g_strfreev (cat_array); - } else if (g_strcmp0 (node_name, "keywords") == 0) { - gchar **kw_array; - kw_array = as_xmldata_get_children_as_strv (xdt, iter, "keyword"); - as_component_set_keywords (cpt, kw_array, NULL); - g_strfreev (kw_array); - } else if (g_strcmp0 (node_name, "mimetypes") == 0) { - g_auto(GStrv) mime_array = NULL; - guint i; - - /* Mimetypes are essentially provided interfaces, that's why they belong into Asprovided. - * However, due to historic reasons, the spec has an own toplevel tag for them, so we need - * to parse them here. */ - mime_array = as_xmldata_get_children_as_strv (xdt, iter, "mimetype"); - for (i = 0; mime_array[i] != NULL; i++) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_MIMETYPE, mime_array[i]); - } - } else if (g_strcmp0 (node_name, "provides") == 0) { - as_xmldata_process_provides (xdt, iter, cpt); - } else if (g_strcmp0 (node_name, "screenshots") == 0) { - as_xmldata_process_screenshots_tag (xdt, iter, cpt); - } else if (g_strcmp0 (node_name, "project_license") == 0) { - if (content != NULL) - as_component_set_project_license (cpt, content); - } else if (g_strcmp0 (node_name, "project_group") == 0) { - if (content != NULL) - as_component_set_project_group (cpt, content); - } else if (g_strcmp0 (node_name, "developer_name") == 0) { - if (lang != NULL) - as_component_set_developer_name (cpt, content, lang); - } else if (g_strcmp0 (node_name, "compulsory_for_desktop") == 0) { - if (content != NULL) - g_ptr_array_add (compulsory_for_desktops, g_strdup (content)); - } else if (g_strcmp0 (node_name, "releases") == 0) { - as_xmldata_process_releases_tag (xdt, iter, cpt); - } else if (g_strcmp0 (node_name, "extends") == 0) { - if (content != NULL) - as_component_add_extends (cpt, content); - } else if (g_strcmp0 (node_name, "languages") == 0) { - as_xmldata_process_languages_tag (xdt, iter, cpt); - } else if (g_strcmp0 (node_name, "bundle") == 0) { - if (content != NULL) { - gchar *type_str; - AsBundleKind bundle_kind; - type_str = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); - bundle_kind = as_bundle_kind_from_string (type_str); - if (bundle_kind != AS_BUNDLE_KIND_UNKNOWN) - bundle_kind = AS_BUNDLE_KIND_LIMBA; - as_component_add_bundle_id (cpt, bundle_kind, content); - g_free (type_str); - } - } else if (g_strcmp0 (node_name, "translation") == 0) { - if (content != NULL) { - g_autofree gchar *trtype_str = NULL; - AsTranslationKind tr_kind; - trtype_str = (gchar*) xmlGetProp (iter, (xmlChar*) "type"); - tr_kind = as_translation_kind_from_string (trtype_str); - if (tr_kind != AS_TRANSLATION_KIND_UNKNOWN) { - g_autoptr(AsTranslation) tr = NULL; - - tr = as_translation_new (); - as_translation_set_kind (tr, tr_kind); - as_translation_set_id (tr, content); - as_component_add_translation (cpt, tr); - } - } - } - } - - /* set the origin of this component */ - as_component_set_origin (cpt, priv->origin); - - /* set the architecture of this component */ - as_component_set_architecture (cpt, priv->arch); - - /* add package name information to component */ - strv = as_ptr_array_to_strv (pkgnames); - as_component_set_pkgnames (cpt, strv); - g_ptr_array_unref (pkgnames); - g_strfreev (strv); - - /* add compulsoriy information to component as strv */ - strv = as_ptr_array_to_strv (compulsory_for_desktops); - as_component_set_compulsory_for_desktops (cpt, strv); - g_ptr_array_unref (compulsory_for_desktops); - g_strfreev (strv); -} - -/** - * as_xmldata_parse_components_node: - */ -static void -as_xmldata_parse_components_node (AsXMLData *xdt, GPtrArray *cpts, xmlNode* node, GError **error) -{ - xmlNode* iter; - GError *tmp_error = NULL; - gchar *priority_str; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - /* set origin of this metadata */ - g_free (priv->origin); - priv->origin = (gchar*) xmlGetProp (node, (xmlChar*) "origin"); - - /* set baseurl for the media files */ - g_free (priv->media_baseurl); - priv->media_baseurl = (gchar*) xmlGetProp (node, (xmlChar*) "media_baseurl"); - - /* set architecture for the components */ - g_free (priv->arch); - priv->arch = (gchar*) xmlGetProp (node, (xmlChar*) "architecture"); - - /* distro metadata allows setting a priority for components */ - priority_str = (gchar*) xmlGetProp (node, (xmlChar*) "priority"); - if (priority_str != NULL) { - priv->default_priority = g_ascii_strtoll (priority_str, NULL, 10); - } - g_free (priority_str); - - for (iter = node->children; iter != NULL; iter = iter->next) { - /* discard spaces */ - if (iter->type != XML_ELEMENT_NODE) - continue; - - if (g_strcmp0 ((gchar*) iter->name, "component") == 0) { - g_autoptr(AsComponent) cpt = NULL; - - cpt = as_component_new (); - as_xmldata_parse_component_node (xdt, iter, cpt, &tmp_error); - if (tmp_error != NULL) { - g_propagate_error (error, tmp_error); - return; - } else { - g_ptr_array_add (cpts, g_object_ref (cpt)); - } - } - } -} - -/** - * as_component_xml_add_node: - * - * Add node if value is not empty - */ -static xmlNode* -as_xmldata_xml_add_node (xmlNode *root, const gchar *name, const gchar *value) -{ - if (as_str_empty (value)) - return NULL; - - return xmlNewTextChild (root, NULL, (xmlChar*) name, (xmlChar*) value); -} - -/** - * as_xmldata_xml_add_description: - * - * Add the description markup to the XML tree - */ -static gboolean -as_xmldata_xml_add_description (AsXMLData *xdt, xmlNode *root, xmlNode **desc_node, const gchar *description_markup, const gchar *lang) -{ - gchar *xmldata; - xmlDoc *doc; - xmlNode *droot; - xmlNode *dnode; - xmlNode *iter; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - gboolean ret = TRUE; - gboolean localized; - - if (as_str_empty (description_markup)) - return FALSE; - - /* skip cruft */ - if (as_is_cruft_locale (lang)) - return FALSE; - - xmldata = g_strdup_printf ("%s", description_markup); - doc = xmlParseDoc ((xmlChar*) xmldata); - if (doc == NULL) { - ret = FALSE; - goto out; - } - - droot = xmlDocGetRootElement (doc); - if (droot == NULL) { - ret = FALSE; - goto out; - } - - if (priv->mode == AS_PARSER_MODE_UPSTREAM) { - if (*desc_node == NULL) - *desc_node = xmlNewChild (root, NULL, (xmlChar*) "description", NULL); - dnode = *desc_node; - } else { - /* in distro parser mode, we might have multiple tags */ - dnode = xmlNewChild (root, NULL, (xmlChar*) "description", NULL); - } - - localized = g_strcmp0 (lang, "C") != 0; - if (priv->mode != AS_PARSER_MODE_UPSTREAM) { - if (localized) { - xmlNewProp (dnode, - (xmlChar*) "xml:lang", - (xmlChar*) lang); - } - } - - for (iter = droot->children; iter != NULL; iter = iter->next) { - xmlNode *cn; - - if (g_strcmp0 ((const gchar*) iter->name, "p") == 0) { - cn = xmlAddChild (dnode, xmlCopyNode (iter, TRUE)); - - if ((priv->mode == AS_PARSER_MODE_UPSTREAM) && (localized)) { - xmlNewProp (cn, - (xmlChar*) "xml:lang", - (xmlChar*) lang); - } - } else if ((g_strcmp0 ((const gchar*) iter->name, "ul") == 0) || (g_strcmp0 ((const gchar*) iter->name, "ol") == 0)) { - xmlNode *iter2; - xmlNode *enumNode; - - enumNode = xmlNewChild (dnode, NULL, iter->name, NULL); - for (iter2 = iter->children; iter2 != NULL; iter2 = iter2->next) { - if (g_strcmp0 ((const gchar*) iter2->name, "li") != 0) - continue; - - cn = xmlAddChild (enumNode, xmlCopyNode (iter2, TRUE)); - - if ((priv->mode == AS_PARSER_MODE_UPSTREAM) && (localized)) { - xmlNewProp (cn, - (xmlChar*) "xml:lang", - (xmlChar*) lang); - } - } - - continue; - } - } - -out: - if (doc != NULL) - xmlFreeDoc (doc); - g_free (xmldata); - return ret; -} - -/** - * as_component_xml_add_node_list: - * - * Add node if value is not empty - */ -static void -as_xmldata_xml_add_node_list (xmlNode *root, const gchar *name, const gchar *child_name, gchar **strv) -{ - xmlNode *node; - guint i; - - if (strv == NULL) - return; - - if (name == NULL) - node = root; - else - node = xmlNewTextChild (root, NULL, (xmlChar*) name, NULL); - for (i = 0; strv[i] != NULL; i++) { - xmlNewTextChild (node, NULL, (xmlChar*) child_name, (xmlChar*) strv[i]); - } -} - -typedef struct { - AsXMLData *xdt; - - xmlNode *parent; - xmlNode *nd; - const gchar *node_name; -} AsLocaleWriteHelper; - -/** - * _as_xmldata_lang_hashtable_to_nodes: - */ -static void -_as_xmldata_lang_hashtable_to_nodes (gchar *key, gchar *value, AsLocaleWriteHelper *helper) -{ - xmlNode *cnode; - if (as_str_empty (value)) - return; - - /* skip cruft */ - if (as_is_cruft_locale (key)) - return; - - cnode = xmlNewTextChild (helper->parent, NULL, (xmlChar*) helper->node_name, (xmlChar*) value); - if (g_strcmp0 (key, "C") != 0) { - xmlNewProp (cnode, - (xmlChar*) "xml:lang", - (xmlChar*) key); - } -} - -/** - * _as_xmldata_desc_lang_hashtable_to_nodes: - */ -static void -_as_xmldata_desc_lang_hashtable_to_nodes (gchar *key, gchar *value, AsLocaleWriteHelper *helper) -{ - if (as_str_empty (value)) - return; - - as_xmldata_xml_add_description (helper->xdt, helper->parent, &helper->nd, value, key); -} - -/** - * _as_xmldata_serialize_image: - */ -static void -_as_xmldata_serialize_image (AsImage *img, xmlNode *subnode) -{ - xmlNode* n_image = NULL; - gchar *size; - g_return_if_fail (img != NULL); - g_return_if_fail (subnode != NULL); - - n_image = xmlNewTextChild (subnode, NULL, (xmlChar*) "image", (xmlChar*) as_image_get_url (img)); - if (as_image_get_kind (img) == AS_IMAGE_KIND_THUMBNAIL) - xmlNewProp (n_image, (xmlChar*) "type", (xmlChar*) "thumbnail"); - else - xmlNewProp (n_image, (xmlChar*) "type", (xmlChar*) "source"); - - if ((as_image_get_width (img) > 0) && - (as_image_get_height (img) > 0)) { - size = g_strdup_printf("%i", as_image_get_width (img)); - xmlNewProp (n_image, (xmlChar*) "width", (xmlChar*) size); - g_free (size); - - size = g_strdup_printf("%i", as_image_get_height (img)); - xmlNewProp (n_image, (xmlChar*) "height", (xmlChar*) size); - g_free (size); - } - - xmlAddChild (subnode, n_image); -} - -/** - * as_xmldata_add_screenshot_subnodes: - * - * Add screenshot subnodes to a root node - */ -static void -as_xmldata_add_screenshot_subnodes (AsComponent *cpt, xmlNode *root) -{ - GPtrArray* sslist; - AsScreenshot *sshot; - guint i; - - sslist = as_component_get_screenshots (cpt); - for (i = 0; i < sslist->len; i++) { - xmlNode *subnode; - const gchar *str; - GPtrArray *images; - sshot = (AsScreenshot*) g_ptr_array_index (sslist, i); - - subnode = xmlNewTextChild (root, NULL, (xmlChar*) "screenshot", (xmlChar*) ""); - if (as_screenshot_get_kind (sshot) == AS_SCREENSHOT_KIND_DEFAULT) - xmlNewProp (subnode, (xmlChar*) "type", (xmlChar*) "default"); - - str = as_screenshot_get_caption (sshot); - if (g_strcmp0 (str, "") != 0) { - xmlNode* n_caption; - n_caption = xmlNewTextChild (subnode, NULL, (xmlChar*) "caption", (xmlChar*) str); - xmlAddChild (subnode, n_caption); - } - - images = as_screenshot_get_images (sshot); - g_ptr_array_foreach (images, (GFunc) _as_xmldata_serialize_image, subnode); - } -} - -/** - * as_xmldata_add_release_subnodes: - * - * Add release nodes to a root node - */ -static void -as_xmldata_add_release_subnodes (AsXMLData *xdt, AsComponent *cpt, xmlNode *root) -{ - GPtrArray* releases; - AsRelease *release; - guint i; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - releases = as_component_get_releases (cpt); - for (i = 0; i < releases->len; i++) { - xmlNode *subnode; - const gchar *str; - glong unixtime; - GPtrArray *locations; - guint j; - release = (AsRelease*) g_ptr_array_index (releases, i); - - /* set release version */ - subnode = xmlNewTextChild (root, NULL, (xmlChar*) "release", (xmlChar*) ""); - xmlNewProp (subnode, (xmlChar*) "version", - (xmlChar*) as_release_get_version (release)); - - /* set release timestamp / date */ - unixtime = as_release_get_timestamp (release); - if (unixtime > 0 ) { - g_autofree gchar *time_str = NULL; - - if (priv->mode == AS_PARSER_MODE_DISTRO) { - time_str = g_strdup_printf ("%ld", unixtime); - xmlNewProp (subnode, (xmlChar*) "timestamp", - (xmlChar*) time_str); - } else { - GTimeVal time; - time.tv_sec = unixtime; - time.tv_usec = 0; - time_str = g_time_val_to_iso8601 (&time); - xmlNewProp (subnode, (xmlChar*) "date", - (xmlChar*) time_str); - } - } - - /* set release urgency, if we have one */ - if (as_release_get_urgency (release) != AS_URGENCY_KIND_UNKNOWN) { - const gchar *urgency_str; - urgency_str = as_urgency_kind_to_string (as_release_get_urgency (release)); - xmlNewProp (subnode, (xmlChar*) "urgency", - (xmlChar*) urgency_str); - } - - /* add location urls */ - locations = as_release_get_locations (release); - for (j = 0; j < locations->len; j++) { - gchar *lurl; - lurl = (gchar*) g_ptr_array_index (locations, j); - xmlNewTextChild (subnode, NULL, (xmlChar*) "location", (xmlChar*) lurl); - } - - /* add checksum node */ - for (j = 0; j < AS_CHECKSUM_KIND_LAST; j++) { - if (as_release_get_checksum (release, j) != NULL) { - xmlNode *cs_node; - cs_node = xmlNewTextChild (subnode, - NULL, - (xmlChar*) "checksum", - (xmlChar*) as_release_get_checksum (release, j)); - xmlNewProp (cs_node, - (xmlChar*) "type", - (xmlChar*) as_checksum_kind_to_string (j)); - } - } - - /* add size node */ - for (j = 0; j < AS_SIZE_KIND_LAST; j++) { - if (as_release_get_size (release, j) > 0) { - xmlNode *s_node; - g_autofree gchar *size_str; - - size_str = g_strdup_printf ("%" G_GUINT64_FORMAT, as_release_get_size (release, j)); - s_node = xmlNewTextChild (subnode, - NULL, - (xmlChar*) "size", - (xmlChar*) size_str); - xmlNewProp (s_node, - (xmlChar*) "type", - (xmlChar*) as_size_kind_to_string (j)); - } - } - - /* add description */ - str = as_release_get_description (release); - if (g_strcmp0 (str, "") != 0) { - xmlNode* n_desc; - n_desc = xmlNewTextChild (subnode, NULL, (xmlChar*) "description", (xmlChar*) str); - xmlAddChild (subnode, n_desc); - } - } -} - -/** - * as_xmldata_component_to_node: - * @cpt: a valid #AsComponent - * - * Serialize the component data to an xmlNode. - * - */ -static xmlNode* -as_xmldata_component_to_node (AsXMLData *xdt, AsComponent *cpt) -{ - xmlNode *cnode; - xmlNode *node; - gchar **strv; - GPtrArray *releases; - GPtrArray *screenshots; - GPtrArray *icons; - GPtrArray *translations; - AsComponentKind kind; - AsLocaleWriteHelper helper; - guint i; - g_return_val_if_fail (cpt != NULL, NULL); - - /* define component root node */ - kind = as_component_get_kind (cpt); - cnode = xmlNewNode (NULL, (xmlChar*) "component"); - if ((kind != AS_COMPONENT_KIND_GENERIC) && (kind != AS_COMPONENT_KIND_UNKNOWN)) { - xmlNewProp (cnode, (xmlChar*) "type", - (xmlChar*) as_component_kind_to_string (kind)); - } - - as_xmldata_xml_add_node (cnode, "id", as_component_get_id (cpt)); - - helper.parent = cnode; - helper.xdt = xdt; - helper.nd = NULL; - helper.node_name = "name"; - g_hash_table_foreach (as_component_get_name_table (cpt), - (GHFunc) _as_xmldata_lang_hashtable_to_nodes, - &helper); - - helper.nd = NULL; - helper.node_name = "summary"; - g_hash_table_foreach (as_component_get_summary_table (cpt), - (GHFunc) _as_xmldata_lang_hashtable_to_nodes, - &helper); - - helper.nd = NULL; - helper.node_name = "developer_name"; - g_hash_table_foreach (as_component_get_developer_name_table (cpt), - (GHFunc) _as_xmldata_lang_hashtable_to_nodes, - &helper); - - helper.nd = NULL; - helper.node_name = "description"; - g_hash_table_foreach (as_component_get_description_table (cpt), - (GHFunc) _as_xmldata_desc_lang_hashtable_to_nodes, - &helper); - - as_xmldata_xml_add_node (cnode, "project_license", as_component_get_project_license (cpt)); - as_xmldata_xml_add_node (cnode, "project_group", as_component_get_project_group (cpt)); - - as_xmldata_xml_add_node_list (cnode, NULL, "pkgname", as_component_get_pkgnames (cpt)); - strv = as_ptr_array_to_strv (as_component_get_extends (cpt)); - as_xmldata_xml_add_node_list (cnode, NULL, "extends", strv); - g_strfreev (strv); - as_xmldata_xml_add_node_list (cnode, NULL, "compulsory_for_desktop", as_component_get_compulsory_for_desktops (cpt)); - as_xmldata_xml_add_node_list (cnode, "keywords", "keyword", as_component_get_keywords (cpt)); - as_xmldata_xml_add_node_list (cnode, "categories", "category", as_component_get_categories (cpt)); - - /* urls */ - for (i = AS_URL_KIND_UNKNOWN; i < AS_URL_KIND_LAST; i++) { - xmlNode *n; - const gchar *value; - value = as_component_get_url (cpt, i); - if (value == NULL) - continue; - - n = xmlNewTextChild (cnode, NULL, (xmlChar*) "url", (xmlChar*) value); - xmlNewProp (n, (xmlChar*) "type", - (xmlChar*) as_url_kind_to_string (i)); - } - - /* icons */ - icons = as_component_get_icons (cpt); - for (i = 0; i < icons->len; i++) { - AsIconKind ikind; - xmlNode *n; - const gchar *value; - AsIcon *icon = AS_ICON (g_ptr_array_index (icons, i)); - - ikind = as_icon_get_kind (icon); - if (ikind == AS_ICON_KIND_LOCAL) - value = as_icon_get_filename (icon); - else if (ikind == AS_ICON_KIND_REMOTE) - value = as_icon_get_url (icon); - else - value = as_icon_get_name (icon); - - if (value == NULL) - continue; - - n = xmlNewTextChild (cnode, NULL, (xmlChar*) "icon", (xmlChar*) value); - xmlNewProp (n, (xmlChar*) "type", - (xmlChar*) as_icon_kind_to_string (ikind)); - - if (ikind != AS_ICON_KIND_STOCK) { - if (as_icon_get_width (icon) > 0) { - g_autofree gchar *size = NULL; - size = g_strdup_printf ("%i", as_icon_get_width (icon)); - xmlNewProp (n, (xmlChar*) "width", (xmlChar*) size); - } - - if (as_icon_get_height (icon) > 0) { - g_autofree gchar *size = NULL; - size = g_strdup_printf ("%i", as_icon_get_height (icon)); - xmlNewProp (n, (xmlChar*) "height", (xmlChar*) size); - } - } - } - - /* bundles */ - for (i = AS_BUNDLE_KIND_UNKNOWN; i < AS_BUNDLE_KIND_LAST; i++) { - xmlNode *n; - const gchar *value; - value = as_component_get_bundle_id (cpt, i); - if (value == NULL) - continue; - - n = xmlNewTextChild (cnode, NULL, (xmlChar*) "bundle", (xmlChar*) value); - xmlNewProp (n, (xmlChar*) "type", - (xmlChar*) as_bundle_kind_to_string (i)); - } - - /* translations */ - translations = as_component_get_translations (cpt); - for (i = 0; i < translations->len; i++) { - AsTranslation *tr = AS_TRANSLATION (g_ptr_array_index (translations, i)); - xmlNode *n; - n = xmlNewTextChild (cnode, NULL, (xmlChar*) "translation", (xmlChar*) as_translation_get_id (tr)); - xmlNewProp (n, (xmlChar*) "type", - (xmlChar*) as_translation_kind_to_string (as_translation_get_kind (tr))); - } - - /* releases node */ - releases = as_component_get_releases (cpt); - if (releases->len > 0) { - node = xmlNewTextChild (cnode, NULL, (xmlChar*) "releases", NULL); - as_xmldata_add_release_subnodes (xdt, cpt, node); - } - - /* screenshots node */ - screenshots = as_component_get_screenshots (cpt); - if (screenshots->len > 0) { - node = xmlNewTextChild (cnode, NULL, (xmlChar*) "screenshots", NULL); - as_xmldata_add_screenshot_subnodes (cpt, node); - } - - return cnode; -} - -/** - * as_xmldata_update_cpt_with_upstream_data: - * @xdt: An instance of #AsXMLData - * @data: XML representing upstream metadata. - * @cpt: Component that should be updated. - * @error: A #GError - * - * Parse AppStream upstream metadata. - */ -gboolean -as_xmldata_update_cpt_with_upstream_data (AsXMLData *xdt, const gchar *data, AsComponent *cpt, GError **error) -{ - xmlDoc *doc; - xmlNode *root; - gboolean ret = FALSE; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - if (data == NULL) { - /* empty document means no components */ - return FALSE; - } - - doc = xmlParseDoc ((xmlChar*) data); - if (doc == NULL) { - g_set_error (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "Could not parse XML: %s", priv->last_error_msg); - as_xmldata_clear_error (xdt); - return FALSE; - } - - root = xmlDocGetRootElement (doc); - if (root == NULL) { - g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "The XML document appears to be empty."); - goto out; - } - - /* switch to upstream format parsing */ - priv->mode = AS_PARSER_MODE_UPSTREAM; - - ret = TRUE; - if (g_strcmp0 ((gchar*) root->name, "components") == 0) { - g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_UNEXPECTED_FORMAT_KIND, - "Tried to parse distro metadata as upstream metadata."); - goto out; - } else if (g_strcmp0 ((gchar*) root->name, "component") == 0) { - as_xmldata_parse_component_node (xdt, root, cpt, error); - } else if (g_strcmp0 ((gchar*) root->name, "application") == 0) { - g_debug ("Parsing legacy AppStream metadata file."); - as_xmldata_parse_component_node (xdt, root, cpt, error); - } else { - g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "XML file does not contain valid AppStream data!"); - ret = FALSE; - goto out; - } - -out: - xmlFreeDoc (doc); - return ret; -} - -/** - * as_xmldata_parse_upstream_data: - * @xdt: An instance of #AsXMLData - * @data: XML representing upstream metadata. - * @error: A #GError - * - * Parse AppStream upstream metadata. - * - * Returns: (transfer full): An #AsComponent, deserialized from the XML. - */ -AsComponent* -as_xmldata_parse_upstream_data (AsXMLData *xdt, const gchar *data, GError **error) -{ - g_autoptr(AsComponent) cpt = NULL; - gboolean ret; - - cpt = as_component_new (); - ret = as_xmldata_update_cpt_with_upstream_data (xdt, data, cpt, error); - - if (ret) - return g_object_ref (cpt); - else - return NULL; -} - -/** - * as_xmldata_parse_distro_data: - * @xdt: An instance of #AsXMLData - * @data: XML representing distro metadata. - * @error: A #GError - * - * Parse AppStream upstream metadata. - * - * Returns: (transfer full) (element-type AsComponent): An array of #AsComponent, deserialized from the XML. - */ -GPtrArray* -as_xmldata_parse_distro_data (AsXMLData *xdt, const gchar *data, GError **error) -{ - xmlDoc* doc; - xmlNode* root; - GPtrArray *cpts = NULL; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - if (data == NULL) { - /* empty document means no components */ - return NULL; - } - - doc = xmlParseDoc ((xmlChar*) data); - if (doc == NULL) { - g_set_error (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "Could not parse XML: %s", priv->last_error_msg); - as_xmldata_clear_error (xdt); - return NULL; - } - - root = xmlDocGetRootElement (doc); - if (root == NULL) { - g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "The XML document is empty."); - goto out; - } - - priv->mode = AS_PARSER_MODE_DISTRO; - cpts = g_ptr_array_new_with_free_func (g_object_unref); - - if (g_strcmp0 ((gchar*) root->name, "components") == 0) { - as_xmldata_parse_components_node (xdt, cpts, root, error); - } else if (g_strcmp0 ((gchar*) root->name, "component") == 0) { - g_autoptr(AsComponent) cpt = NULL; - - cpt = as_component_new (); - /* we explicitly allow parsing single component entries in distro-XML mode, since this is a scenario - * which might very well happen, e.g. in AppStream metadata generators */ - as_xmldata_parse_component_node (xdt, root, cpt, error); - g_ptr_array_add (cpts, g_object_ref (cpt)); - } else { - g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "XML file does not contain valid AppStream data!"); - goto out; - } - -out: - xmlFreeDoc (doc); - return cpts; -} - -/** - * as_xmldata_serialize_to_upstream: - * @xdt: An instance of #AsXMLData - * @cpt: The component to serialize. - * - * Serialize an #AsComponent to upstream XML. - * - * Returns: XML metadata. - */ -gchar* -as_xmldata_serialize_to_upstream (AsXMLData *xdt, AsComponent *cpt) -{ - xmlDoc *doc; - xmlNode *root; - gchar *xmlstr = NULL; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - if (!as_component_is_valid (cpt)) { - g_debug ("Can not serialize '%s': Component is invalid.", as_component_get_id (cpt)); - return NULL; - } - - priv->mode = AS_PARSER_MODE_UPSTREAM; - doc = xmlNewDoc ((xmlChar*) NULL); - - /* define component root node */ - root = as_xmldata_component_to_node (xdt, cpt); - if (root == NULL) - goto out; - xmlDocSetRootElement (doc, root); - -out: - xmlDocDumpFormatMemoryEnc (doc, (xmlChar**) (&xmlstr), NULL, "utf-8", TRUE); - xmlFreeDoc (doc); - - return xmlstr; -} - -/** - * as_xmldata_serialize_to_distro_with_rootnode: - * - * Returns: Valid distro XML metadata. - */ -static gchar* -as_xmldata_serialize_to_distro_with_rootnode (AsXMLData *xdt, GPtrArray *cpts) -{ - xmlDoc *doc; - xmlNode *root; - gchar *xmlstr = NULL; - guint i; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - priv->mode = AS_PARSER_MODE_DISTRO; - root = xmlNewNode (NULL, (xmlChar*) "components"); - xmlNewProp (root, (xmlChar*) "version", (xmlChar*) "0.8"); - if (priv->origin != NULL) - xmlNewProp (root, (xmlChar*) "origin", (xmlChar*) priv->origin); - if (priv->arch != NULL) - xmlNewProp (root, (xmlChar*) "architecture", (xmlChar*) priv->arch); - - for (i = 0; i < cpts->len; i++) { - AsComponent *cpt; - xmlNode *node; - cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); - - if (!as_component_is_valid (cpt)) { - g_debug ("Can not serialize '%s': Component is invalid.", as_component_get_id (cpt)); - continue; - } - - node = as_xmldata_component_to_node (xdt, cpt); - if (node == NULL) - continue; - xmlAddChild (root, node); - } - - doc = xmlNewDoc ((xmlChar*) NULL); - xmlDocSetRootElement (doc, root); - - xmlDocDumpFormatMemoryEnc (doc, (xmlChar**) (&xmlstr), NULL, "utf-8", TRUE); - xmlFreeDoc (doc); - - return xmlstr; -} - -/** - * as_xmldata_serialize_to_distro_without_rootnode: - * - * Returns: Distro XML metadata slices without rootnode. - */ -static gchar* -as_xmldata_serialize_to_distro_without_rootnode (AsXMLData *xdt, GPtrArray *cpts) -{ - guint i; - GString *out_data; - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - - out_data = g_string_new (""); - priv->mode = AS_PARSER_MODE_DISTRO; - - for (i = 0; i < cpts->len; i++) { - AsComponent *cpt; - xmlDoc *doc; - xmlNode *node; - xmlBufferPtr buf; - xmlSaveCtxtPtr sctx; - cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); - - node = as_xmldata_component_to_node (xdt, cpt); - if (node == NULL) - continue; - - doc = xmlNewDoc ((xmlChar*) NULL); - xmlDocSetRootElement (doc, node); - - buf = xmlBufferCreate (); - sctx = xmlSaveToBuffer (buf, "utf-8", XML_SAVE_FORMAT | XML_SAVE_NO_DECL); - xmlSaveDoc (sctx, doc); - xmlSaveClose (sctx); - - g_string_append (out_data, (const gchar*) xmlBufferContent (buf)); - xmlBufferFree (buf); - xmlFreeDoc (doc); - } - - return g_string_free (out_data, FALSE); -} - -/** - * as_xmldata_serialize_to_distro: - * @xdt: An instance of #AsXMLData - * @cpt: The component to serialize. - * - * Serialize an #AsComponent to distro XML. - * - * Returns: XML metadata. - */ -gchar* -as_xmldata_serialize_to_distro (AsXMLData *xdt, GPtrArray *cpts, gboolean write_header) -{ - if (cpts->len == 0) - return NULL; - - if (write_header) - return as_xmldata_serialize_to_distro_with_rootnode (xdt, cpts); - else - return as_xmldata_serialize_to_distro_without_rootnode (xdt, cpts); -} - -/** - * as_xmldata_set_parser_mode: - */ -void -as_xmldata_set_parser_mode (AsXMLData *xdt, AsParserMode mode) -{ - AsXMLDataPrivate *priv = GET_PRIVATE (xdt); - priv->mode = mode; -} - -/** - * as_xmldata_class_init: - **/ -static void -as_xmldata_class_init (AsXMLDataClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = as_xmldata_finalize; -} - -/** - * as_xmldata_new: - */ -AsXMLData* -as_xmldata_new (void) -{ - AsXMLData *xdt; - xdt = g_object_new (AS_TYPE_XMLDATA, NULL); - return AS_XMLDATA (xdt); -} diff -Nru appstream-0.9.4/src/as-xmldata.h appstream-0.12.0/src/as-xmldata.h --- appstream-0.9.4/src/as-xmldata.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-xmldata.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#ifndef __AS_XMLDATA_H -#define __AS_XMLDATA_H - -#include -#include - -#include "as-component.h" -#include "as-metadata.h" - -G_BEGIN_DECLS - -#define AS_TYPE_XMLDATA (as_xmldata_get_type ()) -G_DECLARE_DERIVABLE_TYPE (AsXMLData, as_xmldata, AS, XMLDATA, GObject) - -struct _AsXMLDataClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - -AsXMLData *as_xmldata_new (void); - -void as_xmldata_initialize (AsXMLData *xdt, - const gchar *locale, - const gchar *origin, - const gchar *media_baseurl, - const gchar *arch, - gint priority); - -AsComponent *as_xmldata_parse_upstream_data (AsXMLData *xdt, - const gchar *data, - GError **error); -GPtrArray *as_xmldata_parse_distro_data (AsXMLData *xdt, - const gchar *data, - GError **error); -gboolean as_xmldata_update_cpt_with_upstream_data (AsXMLData *xdt, - const gchar *data, - AsComponent *cpt, - GError **error); - -gchar *as_xmldata_serialize_to_upstream (AsXMLData *xdt, - AsComponent *cpt); -gchar *as_xmldata_serialize_to_distro (AsXMLData *xdt, - GPtrArray *cpts, - gboolean write_header); - -void as_xmldata_set_parser_mode (AsXMLData *xdt, - AsParserMode mode); -void as_xmldata_parse_component_node (AsXMLData *metad, - xmlNode *node, - AsComponent *cpt, - GError **error); - - -G_END_DECLS - -#endif /* __AS_XMLDATA_H */ diff -Nru appstream-0.9.4/src/as-xml.h appstream-0.12.0/src/as-xml.h --- appstream-0.9.4/src/as-xml.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-xml.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,86 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_XML_H +#define __AS_XML_H + +#include +#include +#include +#include "as-context.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +gchar *as_xml_get_node_value (xmlNode *node); +gchar *as_xmldata_get_node_locale (AsContext *ctx, + xmlNode *node); + +void as_xml_add_children_values_to_array (xmlNode *node, + const gchar *element_name, + GPtrArray *array); + +GPtrArray *as_xml_get_children_as_string_list (xmlNode *node, + const gchar *element_name); +gchar **as_xml_get_children_as_strv (xmlNode *node, + const gchar *element_name); + +void as_xml_parse_metainfo_description_node (AsContext *ctx, + xmlNode *node, + GHFunc func, + gpointer entity); + +gchar *as_xml_dump_node_children (xmlNode *node); + +void as_xml_add_description_node (AsContext *ctx, + xmlNode *root, + GHashTable *desc_table); + +void as_xml_add_localized_text_node (xmlNode *root, + const gchar *node_name, + GHashTable *value_table); + +xmlNode *as_xml_add_node_list_strv (xmlNode *root, + const gchar *name, + const gchar *child_name, + gchar **strv); + +void as_xml_add_node_list (xmlNode *root, + const gchar *name, + const gchar *child_name, + GPtrArray *array); + +xmlNode *as_xml_add_text_node (xmlNode *root, + const gchar *name, + const gchar *value); + +xmlDoc *as_xml_parse_document (const gchar *data, + GError **error); + +gchar *as_xml_node_to_str (xmlNode *root, GError **error); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_XML_H */ diff -Nru appstream-0.9.4/src/as-yaml.c appstream-0.12.0/src/as-yaml.c --- appstream-0.9.4/src/as-yaml.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-yaml.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,621 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "as-yaml.h" +#include "as-utils.h" +#include "as-utils-private.h" + +/** + * SECTION:as-yaml + * @short_description: Helper functions to parse AppStream YAML data + * @include: appstream.h + */ + +enum YamlNodeKind { + YAML_VAR, + YAML_VAL, + YAML_SEQ +}; + +/** + * as_str_is_numeric: + * + * Check if string is a number. + */ +static gboolean +as_str_is_numeric (const gchar *s) +{ + gchar *p; + + if (s == NULL || *s == '\0' || g_ascii_isspace (*s)) + return FALSE; + strtod (s, &p); + return *p == '\0'; +} + +/** + * as_yaml_parse_layer: + * + * Create GNode tree from DEP-11 YAML document + */ +void +as_yaml_parse_layer (yaml_parser_t *parser, GNode *data, GError **error) +{ + GNode *last_leaf = data; + GNode *last_scalar; + yaml_event_t event; + gboolean parse = TRUE; + gboolean in_sequence = FALSE; + GError *tmp_error = NULL; + gchar *string_scalar; + int storage = YAML_VAR; /* the first element must always be of type VAR */ + + while (parse) { + if (!yaml_parser_parse (parser, &event)) { + g_set_error (error, + AS_METADATA_ERROR, + AS_METADATA_ERROR_PARSE, + "Invalid DEP-11 file found. Could not parse YAML: %s", parser->problem); + break; + } + + /* Parse value either as a new leaf in the mapping + * or as a leaf value (one of them, in case it's a sequence) */ + switch (event.type) { + case YAML_SCALAR_EVENT: + string_scalar = g_strdup ((gchar*) event.data.scalar.value); + g_strstrip (string_scalar); + if (storage) + g_node_append_data (last_leaf, string_scalar); + else + last_leaf = g_node_append (data, g_node_new (string_scalar)); + storage ^= YAML_VAL; + break; + case YAML_SEQUENCE_START_EVENT: + storage = YAML_SEQ; + in_sequence = TRUE; + break; + case YAML_SEQUENCE_END_EVENT: + storage = YAML_VAR; + in_sequence = FALSE; + break; + case YAML_MAPPING_START_EVENT: + /* depth += 1 */ + last_scalar = last_leaf; + if (in_sequence) + last_leaf = g_node_append (last_leaf, g_node_new (NULL)); + + as_yaml_parse_layer (parser, last_leaf, &tmp_error); + if (tmp_error != NULL) { + g_propagate_error (error, tmp_error); + parse = FALSE; + } + + last_leaf = last_scalar; + storage ^= YAML_VAL; /* Flip VAR/VAL, without touching SEQ */ + break; + case YAML_MAPPING_END_EVENT: + case YAML_STREAM_END_EVENT: + case YAML_DOCUMENT_END_EVENT: + /* depth -= 1 */ + parse = FALSE; + break; + default: + break; + } + + yaml_event_delete (&event); + } +} + +/** + * as_yaml_free_node: + */ +gboolean +as_yaml_free_node (GNode *node, gpointer data) +{ + if (node->data != NULL) + g_free (node->data); + + return FALSE; +} + +/** + * as_yaml_node_get_key: + * + * Helper method to get the key of a node. + */ +const gchar* +as_yaml_node_get_key (GNode *n) +{ + return (const gchar*) n->data; +} + +/** + * as_yaml_node_get_value: + * + * Helper method to get the value of a node. + */ +const gchar* +as_yaml_node_get_value (GNode *n) +{ + if (n->children) + return (const gchar*) n->children->data; + else + return NULL; +} + +/** + * as_yaml_print_unknown: + */ +void +as_yaml_print_unknown (const gchar *root, const gchar *key) +{ + g_debug ("YAML: Unknown field '%s/%s' found.", root, key); +} + +/** + * as_yaml_mapping_start: + */ +void +as_yaml_mapping_start (yaml_emitter_t *emitter) +{ + yaml_event_t event; + + yaml_mapping_start_event_initialize (&event, NULL, NULL, 1, YAML_ANY_MAPPING_STYLE); + g_assert (yaml_emitter_emit (emitter, &event)); +} + +/** + * as_yaml_mapping_end: + */ +void +as_yaml_mapping_end (yaml_emitter_t *emitter) +{ + yaml_event_t event; + + yaml_mapping_end_event_initialize (&event); + g_assert (yaml_emitter_emit (emitter, &event)); +} + +/** + * as_yaml_sequence_start: + */ +void +as_yaml_sequence_start (yaml_emitter_t *emitter) +{ + yaml_event_t event; + + yaml_sequence_start_event_initialize (&event, NULL, NULL, 1, YAML_ANY_SEQUENCE_STYLE); + g_assert (yaml_emitter_emit (emitter, &event)); +} + +/** + * as_yaml_sequence_end: + */ +void +as_yaml_sequence_end (yaml_emitter_t *emitter) +{ + yaml_event_t event; + + yaml_sequence_end_event_initialize (&event); + g_assert (yaml_emitter_emit (emitter, &event)); +} + +/** + * as_yaml_emit_scalar: + */ +void +as_yaml_emit_scalar (yaml_emitter_t *emitter, const gchar *value) +{ + gint ret; + yaml_event_t event; + yaml_scalar_style_t style; + g_assert (value != NULL); + + /* we always want the values to be represented as strings, and not have e.g. Python recognize them as ints later */ + style = YAML_ANY_SCALAR_STYLE; + if (as_str_is_numeric (value)) + style = YAML_SINGLE_QUOTED_SCALAR_STYLE; + + yaml_scalar_event_initialize (&event, + NULL, + NULL, + (yaml_char_t*) value, + strlen (value), + TRUE, + TRUE, + style); + ret = yaml_emitter_emit (emitter, &event); + g_assert (ret); +} + +/** + * as_yaml_emit_scalar_uint: + */ +void +as_yaml_emit_scalar_uint (yaml_emitter_t *emitter, guint value) +{ + gint ret; + yaml_event_t event; + g_autofree gchar *value_str = NULL; + + value_str = g_strdup_printf("%i", value); + yaml_scalar_event_initialize (&event, + NULL, + NULL, + (yaml_char_t*) value_str, + strlen (value_str), + TRUE, + TRUE, + YAML_ANY_SCALAR_STYLE); + ret = yaml_emitter_emit (emitter, &event); + g_assert (ret); +} + +/** + * as_yaml_emit_scalar_key: + */ +void +as_yaml_emit_scalar_key (yaml_emitter_t *emitter, const gchar *key) +{ + yaml_scalar_style_t keystyle; + yaml_event_t event; + gint ret; + + /* Some locale are "no", which - if unquoted - are interpreted as booleans. + * Since we hever have boolean keys, we can disallow creating bool keys for all keys. */ + keystyle = YAML_ANY_SCALAR_STYLE; + if (g_strcmp0 (key, "no") == 0) + keystyle = YAML_SINGLE_QUOTED_SCALAR_STYLE; + if (g_strcmp0 (key, "yes") == 0) + keystyle = YAML_SINGLE_QUOTED_SCALAR_STYLE; + + yaml_scalar_event_initialize (&event, + NULL, + NULL, + (yaml_char_t*) key, + strlen (key), + TRUE, + TRUE, + keystyle); + ret = yaml_emitter_emit (emitter, &event); + g_assert (ret); +} + +/** + * as_yaml_emit_entry: + */ +void +as_yaml_emit_entry (yaml_emitter_t *emitter, const gchar *key, const gchar *value) +{ + if (value == NULL) + return; + + as_yaml_emit_scalar_key (emitter, key); + as_yaml_emit_scalar (emitter, value); +} + +/** + * as_yaml_emit_entry_uint: + */ +void +as_yaml_emit_entry_uint (yaml_emitter_t *emitter, const gchar *key, guint value) +{ + as_yaml_emit_scalar_key (emitter, key); + as_yaml_emit_scalar_uint (emitter, value); +} + +/** + * as_yaml_emit_entry_timestamp: + */ +void +as_yaml_emit_entry_timestamp (yaml_emitter_t *emitter, const gchar *key, guint64 unixtime) +{ + g_autofree gchar *time_str = NULL; + yaml_event_t event; + gint ret; + + as_yaml_emit_scalar_key (emitter, key); + + time_str = g_strdup_printf ("%" G_GUINT64_FORMAT, unixtime); + yaml_scalar_event_initialize (&event, + NULL, + NULL, + (yaml_char_t*) time_str, + strlen (time_str), + TRUE, + TRUE, + YAML_ANY_SCALAR_STYLE); + ret = yaml_emitter_emit (emitter, &event); + g_assert (ret); + +} + +/** + * as_yaml_emit_long_entry: + */ +void +as_yaml_emit_long_entry (yaml_emitter_t *emitter, const gchar *key, const gchar *value) +{ + yaml_event_t event; + gint ret; + + if (value == NULL) + return; + + as_yaml_emit_scalar_key (emitter, key); + yaml_scalar_event_initialize (&event, + NULL, + NULL, + (yaml_char_t*) value, + strlen (value), + TRUE, + TRUE, + YAML_FOLDED_SCALAR_STYLE); + ret = yaml_emitter_emit (emitter, &event); + g_assert (ret); +} + +/** + * as_yaml_emit_sequence: + */ +void +as_yaml_emit_sequence (yaml_emitter_t *emitter, const gchar *key, GPtrArray *list) +{ + guint i; + + if (list == NULL) + return; + if (list->len == 0) + return; + + as_yaml_emit_scalar (emitter, key); + + as_yaml_sequence_start (emitter); + for (i = 0; i < list->len; i++) { + const gchar *value = (const gchar *) g_ptr_array_index (list, i); + as_yaml_emit_scalar (emitter, value); + } + as_yaml_sequence_end (emitter); +} + +/** + * as_yaml_get_localized_node: + */ +GNode* +as_yaml_get_localized_node (AsContext *ctx, GNode *node, gchar *locale_override) +{ + GNode *n; + GNode *tnode = NULL; + const gchar *locale; + + if (locale_override == NULL) + locale = as_context_get_locale (ctx); + else + locale = locale_override; + + for (n = node->children; n != NULL; n = n->next) { + const gchar *key = as_yaml_node_get_key (n); + + if ((tnode == NULL) && (g_strcmp0 (key, "C") == 0)) { + tnode = n; + if (g_strcmp0 (locale, "C") == 0) + goto out; + } + + if (g_strcmp0 (locale, key) == 0) { + tnode = n; + goto out; + } + + if (as_utils_locale_is_compatible (locale, key)) + tnode = n; + } + +out: + return tnode; +} + +/** + * as_yaml_get_localized_value: + * + * Get localized string from a translated DEP-11 key + */ +gchar* +as_yaml_get_localized_value (AsContext *ctx, GNode *node, gchar *locale_override) +{ + GNode *tnode; + gchar *lvalue; + + tnode = as_yaml_get_localized_node (ctx, node, locale_override); + if (tnode == NULL) + return NULL; + + lvalue = g_strdup ((gchar*) tnode->children->data); + g_strstrip (lvalue); + + return lvalue; +} + +/** + * as_yaml_emit_localized_entry_with_func: + */ +static void +as_yaml_emit_localized_entry_with_func (yaml_emitter_t *emitter, const gchar *key, GHashTable *ltab, GHFunc tfunc) +{ + if (ltab == NULL) + return; + if (g_hash_table_size (ltab) == 0) + return; + + as_yaml_emit_scalar (emitter, key); + + /* start mapping for localized entry */ + as_yaml_mapping_start (emitter); + /* emit entries */ + g_hash_table_foreach (ltab, + tfunc, + emitter); + /* finalize */ + as_yaml_mapping_end (emitter); +} + +/** + * as_yaml_emit_lang_hashtable_entries: + */ +static void +as_yaml_emit_lang_hashtable_entries (gchar *key, gchar *value, yaml_emitter_t *emitter) +{ + if (as_str_empty (value)) + return; + + /* skip cruft */ + if (as_is_cruft_locale (key)) + return; + + g_strstrip (value); + as_yaml_emit_entry (emitter, key, value); +} + +/** + * as_yaml_emit_localized_entry: + */ +void +as_yaml_emit_localized_entry (yaml_emitter_t *emitter, const gchar *key, GHashTable *ltab) +{ + as_yaml_emit_localized_entry_with_func (emitter, + key, + ltab, + (GHFunc) as_yaml_emit_lang_hashtable_entries); +} + +/** + * as_yaml_emit_lang_hashtable_entries_long: + */ +static void +as_yaml_emit_lang_hashtable_entries_long (gchar *key, gchar *value, yaml_emitter_t *emitter) +{ + if (as_str_empty (value)) + return; + + /* skip cruft */ + if (as_is_cruft_locale (key)) + return; + + g_strstrip (value); + as_yaml_emit_long_entry (emitter, key, value); +} + +/** + * as_yaml_emit_long_localized_entry: + */ +void +as_yaml_emit_long_localized_entry (yaml_emitter_t *emitter, const gchar *key, GHashTable *ltab) +{ + as_yaml_emit_localized_entry_with_func (emitter, + key, + ltab, + (GHFunc) as_yaml_emit_lang_hashtable_entries_long); +} + +/** + * as_yaml_list_to_str_array: + */ +void +as_yaml_list_to_str_array (GNode *node, GPtrArray *array) +{ + GNode *n; + + for (n = node->children; n != NULL; n = n->next) { + const gchar *val = as_yaml_node_get_key (n); + if (val != NULL) + g_ptr_array_add (array, g_strdup (val)); + } +} + +/** + * as_yaml_emit_sequence_from_str_array: + */ +void +as_yaml_emit_sequence_from_str_array (yaml_emitter_t *emitter, const gchar *key, GPtrArray *array) +{ + guint i; + + if (array == NULL) + return; + if (array->len == 0) + return; + + as_yaml_emit_scalar_key (emitter, key); + as_yaml_sequence_start (emitter); + + for (i = 0; i < array->len; i++) { + const gchar *val = (const gchar*) g_ptr_array_index (array, i); + as_yaml_emit_scalar (emitter, val); + } + + as_yaml_sequence_end (emitter); +} + +/** + * as_yaml_localized_list_helper: + */ +static void +as_yaml_localized_list_helper (gchar *key, gchar **strv, yaml_emitter_t *emitter) +{ + guint i; + if (strv == NULL) + return; + + /* skip cruft */ + if (as_is_cruft_locale (key)) + return; + + as_yaml_emit_scalar (emitter, key); + as_yaml_sequence_start (emitter); + for (i = 0; strv[i] != NULL; i++) { + as_yaml_emit_scalar (emitter, strv[i]); + } + as_yaml_sequence_end (emitter); +} + +/** + * as_yaml_emit_localized_strv: + */ +void +as_yaml_emit_localized_strv (yaml_emitter_t *emitter, const gchar *key, GHashTable *ltab) +{ + if (ltab == NULL) + return; + if (g_hash_table_size (ltab) == 0) + return; + + as_yaml_emit_scalar (emitter, key); + + /* start mapping for localized entry */ + as_yaml_mapping_start (emitter); + /* emit entries */ + g_hash_table_foreach (ltab, + (GHFunc) as_yaml_localized_list_helper, + emitter); + /* finalize */ + as_yaml_mapping_end (emitter); +} diff -Nru appstream-0.9.4/src/as-yamldata.c appstream-0.12.0/src/as-yamldata.c --- appstream-0.9.4/src/as-yamldata.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-yamldata.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1929 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include "as-yamldata.h" - -#include -#include -#include - -#include "as-utils.h" -#include "as-utils-private.h" -#include "as-metadata.h" -#include "as-component-private.h" -#include "as-screenshot-private.h" - -typedef struct -{ - gchar *locale; - gchar *locale_short; - gchar *origin; - gchar *media_baseurl; - - gchar *arch; - gint default_priority; -} AsYAMLDataPrivate; - -G_DEFINE_TYPE_WITH_PRIVATE (AsYAMLData, as_yamldata, G_TYPE_OBJECT) -#define GET_PRIVATE(o) (as_yamldata_get_instance_private (o)) - -enum YamlNodeKind { - YAML_VAR, - YAML_VAL, - YAML_SEQ -}; - -/** - * as_yamldata_init: - **/ -static void -as_yamldata_init (AsYAMLData *ydt) -{ - g_autofree gchar *str; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - /* set active locale without UTF-8 suffix */ - str = as_get_current_locale (); - as_yamldata_set_locale (ydt, str); - - priv->origin = NULL; - priv->media_baseurl = NULL; - priv->default_priority = 0; -} - -/** - * as_yamldata_finalize: - **/ -static void -as_yamldata_finalize (GObject *object) -{ - AsYAMLData *ydt = AS_YAMLDATA (object); - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - g_free (priv->locale); - g_free (priv->locale_short); - g_free (priv->origin); - g_free (priv->media_baseurl); - g_free (priv->arch); - - G_OBJECT_CLASS (as_yamldata_parent_class)->finalize (object); -} - -/** - * as_yamldata_initialize: - * @ydt: An instance of #AsYAMLData - * - * Initialize the YAML handler. - */ -void -as_yamldata_initialize (AsYAMLData *ydt, const gchar *locale, const gchar *origin, const gchar *media_baseurl, const gchar *arch, gint priority) -{ - g_auto(GStrv) strv = NULL; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - g_free (priv->locale); - g_free (priv->locale_short); - priv->locale = g_strdup (locale); - - strv = g_strsplit (priv->locale, "_", 0); - priv->locale_short = g_strdup (strv[0]); - - g_free (priv->origin); - priv->origin = g_strdup (origin); - - g_free (priv->media_baseurl); - priv->media_baseurl = g_strdup (media_baseurl); - - g_free (priv->arch); - priv->origin = g_strdup (arch); - - priv->default_priority = priority; -} - -/** - * dep11_print_unknown: - */ -static void -dep11_print_unknown (const gchar *root, const gchar *key) -{ - g_debug ("DEP11: Unknown key '%s/%s' found.", root, key); -} - -/** - * as_yamldata_free_node: - */ -static gboolean -as_yamldata_free_node (GNode *node, gpointer data) -{ - if (node->data != NULL) - g_free (node->data); - - return FALSE; -} - -/** - * dep11_yaml_process_layer: - * - * Create GNode tree from DEP-11 YAML document - */ -static void -dep11_yaml_process_layer (yaml_parser_t *parser, GNode *data) -{ - GNode *last_leaf = data; - GNode *last_scalar; - yaml_event_t event; - gboolean parse = TRUE; - gboolean in_sequence = FALSE; - int storage = YAML_VAR; /* the first element must always be of type VAR */ - - while (parse) { - yaml_parser_parse (parser, &event); - - /* Parse value either as a new leaf in the mapping - * or as a leaf value (one of them, in case it's a sequence) */ - switch (event.type) { - case YAML_SCALAR_EVENT: - if (storage) - g_node_append_data (last_leaf, g_strdup ((gchar*) event.data.scalar.value)); - else - last_leaf = g_node_append (data, g_node_new (g_strdup ((gchar*) event.data.scalar.value))); - storage ^= YAML_VAL; - break; - case YAML_SEQUENCE_START_EVENT: - storage = YAML_SEQ; - in_sequence = TRUE; - break; - case YAML_SEQUENCE_END_EVENT: - storage = YAML_VAR; - in_sequence = FALSE; - break; - case YAML_MAPPING_START_EVENT: - /* depth += 1 */ - last_scalar = last_leaf; - if (in_sequence) - last_leaf = g_node_append (last_leaf, g_node_new (g_strdup ("-"))); - dep11_yaml_process_layer (parser, last_leaf); - last_leaf = last_scalar; - storage ^= YAML_VAL; /* Flip VAR/VAL, without touching SEQ */ - break; - case YAML_MAPPING_END_EVENT: - case YAML_STREAM_END_EVENT: - case YAML_DOCUMENT_END_EVENT: - /* depth -= 1 */ - parse = FALSE; - break; - default: - break; - } - - yaml_event_delete (&event); - } -} - -/** - * as_yamldata_get_localized_node: - */ -static GNode* -as_yamldata_get_localized_node (AsYAMLData *ydt, GNode *node, gchar *locale_override) -{ - GNode *n; - GNode *tnode = NULL; - gchar *key; - const gchar *locale; - const gchar *locale_short = NULL; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - if (locale_override == NULL) { - locale = priv->locale; - locale_short = priv->locale_short; - } else { - locale = locale_override; - locale_short = NULL; - } - - for (n = node->children; n != NULL; n = n->next) { - key = (gchar*) n->data; - - if ((tnode == NULL) && (g_strcmp0 (key, "C") == 0)) { - tnode = n; - if (locale == NULL) - goto out; - } - - if (g_strcmp0 (key, locale) == 0) { - tnode = n; - goto out; - } - - if (g_strcmp0 (key, locale_short) == 0) { - tnode = n; - goto out; - } - } - -out: - return tnode; -} - -/** - * as_yamldata_get_localized_value: - * - * Get localized string from a translated DEP-11 key - */ -static gchar* -as_yamldata_get_localized_value (AsYAMLData *ydt, GNode *node, gchar *locale_override) -{ - GNode *tnode; - - tnode = as_yamldata_get_localized_node (ydt, node, locale_override); - if (tnode == NULL) - return NULL; - - return g_strdup ((gchar*) tnode->children->data); -} - -/** - * dep11_list_to_string_array: - */ -static void -dep11_list_to_string_array (GNode *node, GPtrArray *array) -{ - GNode *n; - - for (n = node->children; n != NULL; n = n->next) { - g_ptr_array_add (array, g_strdup ((gchar*) n->data)); - } -} - -/** - * as_yamldata_process_keywords: - * - * Process a keywords node and add the data to an #AsComponent - */ -static void -as_yamldata_process_keywords (AsYAMLData *ydt, GNode *node, AsComponent *cpt) -{ - GNode *tnode; - GPtrArray *keywords; - gchar **strv; - - keywords = g_ptr_array_new_with_free_func (g_free); - - tnode = as_yamldata_get_localized_node (ydt, node, NULL); - /* no node found? */ - if (tnode == NULL) - return; - - dep11_list_to_string_array (tnode, keywords); - - strv = as_ptr_array_to_strv (keywords); - as_component_set_keywords (cpt, strv, NULL); - g_ptr_array_unref (keywords); - g_strfreev (strv); -} - -/** - * dep11_process_urls: - */ -static void -dep11_process_urls (GNode *node, AsComponent *cpt) -{ - GNode *n; - gchar *key; - gchar *value; - AsUrlKind url_kind; - - for (n = node->children; n != NULL; n = n->next) { - key = (gchar*) n->data; - value = (gchar*) n->children->data; - - url_kind = as_url_kind_from_string (key); - if ((url_kind != AS_URL_KIND_UNKNOWN) && (value != NULL)) - as_component_add_url (cpt, url_kind, value); - } -} - -/** - * as_yamldata_process_icon: - */ -static void -as_yamldata_process_icon (AsYAMLData *ydt, GNode *node, AsComponent *cpt, AsIconKind kind) -{ - GNode *n; - gchar *key; - gchar *value; - guint64 size; - g_autoptr(AsIcon) icon = NULL; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - icon = as_icon_new (); - as_icon_set_kind (icon, kind); - - for (n = node->children; n != NULL; n = n->next) { - key = (gchar*) n->data; - value = (gchar*) n->children->data; - - if (g_strcmp0 (key, "width") == 0) { - size = g_ascii_strtoll (value, NULL, 10); - as_icon_set_width (icon, size); - } else if (g_strcmp0 (key, "height") == 0) { - size = g_ascii_strtoll (value, NULL, 10); - as_icon_set_height (icon, size); - } else { - if (kind == AS_ICON_KIND_REMOTE) { - if (g_strcmp0 (key, "url") == 0) { - if (priv->media_baseurl == NULL) { - /* no baseurl, we can just set the value as URL */ - as_icon_set_url (icon, value); - } else { - /* handle the media baseurl */ - gchar *tmp; - tmp = g_build_filename (priv->media_baseurl, value, NULL); - as_icon_set_url (icon, tmp); - g_free (tmp); - } - } - } else { - if (g_strcmp0 (key, "name") == 0) { - as_icon_set_filename (icon, value); - } - } - } - } - - as_component_add_icon (cpt, icon); -} - -/** - * as_yamldata_process_icons: - */ -static void -as_yamldata_process_icons (AsYAMLData *ydt, GNode *node, AsComponent *cpt) -{ - GNode *n; - gchar *key; - gchar *value; - - for (n = node->children; n != NULL; n = n->next) { - key = (gchar*) n->data; - value = (gchar*) n->children->data; - - if (g_strcmp0 (key, "stock") == 0) { - g_autoptr(AsIcon) icon = as_icon_new (); - as_icon_set_kind (icon, AS_ICON_KIND_STOCK); - as_icon_set_name (icon, value); - as_component_add_icon (cpt, icon); - } else if (g_strcmp0 (key, "cached") == 0) { - if (n->children->next == NULL) { - g_autoptr(AsIcon) icon = as_icon_new (); - /* we have a legacy YAML file */ - as_icon_set_kind (icon, AS_ICON_KIND_CACHED); - as_icon_set_filename (icon, value); - as_component_add_icon (cpt, icon); - } else { - GNode *sn; - /* we have a recent YAML file */ - for (sn = n->children; sn != NULL; sn = sn->next) - as_yamldata_process_icon (ydt, sn, cpt, AS_ICON_KIND_CACHED); - } - } else if (g_strcmp0 (key, "local") == 0) { - GNode *sn; - for (sn = n->children; sn != NULL; sn = sn->next) - as_yamldata_process_icon (ydt, sn, cpt, AS_ICON_KIND_LOCAL); - } else if (g_strcmp0 (key, "remote") == 0) { - GNode *sn; - for (sn = n->children; sn != NULL; sn = sn->next) - as_yamldata_process_icon (ydt, sn, cpt, AS_ICON_KIND_REMOTE); - } - } -} - -/** - * dep11_process_provides: - */ -static void -dep11_process_provides (GNode *node, AsComponent *cpt) -{ - GNode *n; - GNode *sn; - gchar *key; - - for (n = node->children; n != NULL; n = n->next) { - key = (gchar*) n->data; - - if (g_strcmp0 (key, "libraries") == 0) { - for (sn = n->children; sn != NULL; sn = sn->next) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_LIBRARY, (gchar*) sn->data); - } - } else if (g_strcmp0 (key, "binaries") == 0) { - for (sn = n->children; sn != NULL; sn = sn->next) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_BINARY, (gchar*) sn->data); - } - } else if (g_strcmp0 (key, "fonts") == 0) { - for (sn = n->children; sn != NULL; sn = sn->next) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FONT, (gchar*) sn->data); - } - } else if (g_strcmp0 (key, "modaliases") == 0) { - for (sn = n->children; sn != NULL; sn = sn->next) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_MODALIAS, (gchar*) sn->data); - } - } else if (g_strcmp0 (key, "firmware") == 0) { - GNode *dn; - for (sn = n->children; sn != NULL; sn = sn->next) { - gchar *kind = NULL; - gchar *fwdata = NULL; - for (dn = sn->children; dn != NULL; dn = dn->next) { - gchar *dkey; - gchar *dvalue; - - dkey = (gchar*) dn->data; - if (dn->children) - dvalue = (gchar*) dn->children->data; - else - continue; - if (g_strcmp0 (dkey, "type") == 0) { - kind = dvalue; - } else if ((g_strcmp0 (dkey, "guid") == 0) || (g_strcmp0 (dkey, "fname") == 0)) { - fwdata = dvalue; - } - } - /* we don't add malformed provides types */ - if ((kind == NULL) || (fwdata == NULL)) - continue; - - if (g_strcmp0 (kind, "runtime") == 0) - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FIRMWARE_RUNTIME, fwdata); - else if (g_strcmp0 (kind, "flashed") == 0) - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_FIRMWARE_FLASHED, fwdata); - } - } else if (g_strcmp0 (key, "python2") == 0) { - for (sn = n->children; sn != NULL; sn = sn->next) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_PYTHON_2, (gchar*) sn->data); - } - } else if (g_strcmp0 (key, "python3") == 0) { - for (sn = n->children; sn != NULL; sn = sn->next) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_PYTHON, (gchar*) sn->data); - } - } else if (g_strcmp0 (key, "mimetypes") == 0) { - for (sn = n->children; sn != NULL; sn = sn->next) { - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_MIMETYPE, (gchar*) sn->data); - } - } else if (g_strcmp0 (key, "dbus") == 0) { - GNode *dn; - for (sn = n->children; sn != NULL; sn = sn->next) { - gchar *kind = NULL; - gchar *service = NULL; - for (dn = sn->children; dn != NULL; dn = dn->next) { - gchar *dkey; - gchar *dvalue; - - dkey = (gchar*) dn->data; - if (dn->children) - dvalue = (gchar*) dn->children->data; - else - dvalue = NULL; - if (g_strcmp0 (dkey, "type") == 0) { - kind = dvalue; - } else if (g_strcmp0 (dkey, "service") == 0) { - service = dvalue; - } - } - /* we don't add malformed provides types */ - if ((kind == NULL) || (service == NULL)) - continue; - - if (g_strcmp0 (kind, "system") == 0) - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_DBUS_SYSTEM, service); - else if ((g_strcmp0 (kind, "user") == 0) || (g_strcmp0 (kind, "session") == 0)) - as_component_add_provided_item (cpt, AS_PROVIDED_KIND_DBUS_USER, service); - } - } - } -} - -/** - * dep11_process_image: - */ -static void -dep11_process_image (AsYAMLData *ydt, GNode *node, AsScreenshot *scr) -{ - GNode *n; - AsImage *img; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - img = as_image_new (); - - for (n = node->children; n != NULL; n = n->next) { - gchar *key; - gchar *value; - guint64 size; - - key = (gchar*) n->data; - if (n->children) - value = (gchar*) n->children->data; - else - continue; /* there should be no key without value */ - - if (g_strcmp0 (key, "width") == 0) { - size = g_ascii_strtoll (value, NULL, 10); - as_image_set_width (img, size); - } else if (g_strcmp0 (key, "height") == 0) { - size = g_ascii_strtoll (value, NULL, 10); - as_image_set_height (img, size); - } else if (g_strcmp0 (key, "url") == 0) { - if (priv->media_baseurl == NULL) { - /* no baseurl, we can just set the value as URL */ - as_image_set_url (img, value); - } else { - /* handle the media baseurl */ - gchar *tmp; - tmp = g_build_filename (priv->media_baseurl, value, NULL); - as_image_set_url (img, tmp); - g_free (tmp); - } - } else { - dep11_print_unknown ("image", key); - } - } - - as_screenshot_add_image (scr, img); - g_object_unref (img); -} - -/** - * as_yamldata_process_screenshots: - */ -static void -as_yamldata_process_screenshots (AsYAMLData *ydt, GNode *node, AsComponent *cpt) -{ - GNode *sn; - - for (sn = node->children; sn != NULL; sn = sn->next) { - GNode *n; - AsScreenshot *scr; - scr = as_screenshot_new (); - - /* propagate locale */ - as_screenshot_set_active_locale (scr, as_component_get_active_locale (cpt)); - - for (n = sn->children; n != NULL; n = n->next) { - GNode *in; - gchar *key; - gchar *value; - - key = (gchar*) n->data; - if (n->children) - value = (gchar*) n->children->data; - else - value = NULL; - - if (g_strcmp0 (key, "default") == 0) { - if (g_strcmp0 (value, "yes") == 0) - as_screenshot_set_kind (scr, AS_SCREENSHOT_KIND_DEFAULT); - else - as_screenshot_set_kind (scr, AS_SCREENSHOT_KIND_EXTRA); - } else if (g_strcmp0 (key, "caption") == 0) { - gchar *lvalue; - /* the caption is a localized element */ - lvalue = as_yamldata_get_localized_value (ydt, n, NULL); - as_screenshot_set_caption (scr, lvalue, NULL); - } else if (g_strcmp0 (key, "source-image") == 0) { - /* there can only be one source image */ - dep11_process_image (ydt, n, scr); - } else if (g_strcmp0 (key, "thumbnails") == 0) { - /* the thumbnails are a list of images */ - for (in = n->children; in != NULL; in = in->next) { - dep11_process_image (ydt, in, scr); - } - } else { - dep11_print_unknown ("screenshot", key); - } - } - - /* add the result */ - as_component_add_screenshot (cpt, scr); - g_object_unref (scr); - } -} - -/** - * as_yamldata_process_releases: - * - * Add #AsRelease instances to the #AsComponent - */ -static void -as_yamldata_process_releases (AsYAMLData *ydt, GNode *node, AsComponent *cpt) -{ - GNode *sn; - - for (sn = node->children; sn != NULL; sn = sn->next) { - GNode *n; - AsRelease *rel; - rel = as_release_new (); - - /* propagate locale */ - as_release_set_active_locale (rel, as_component_get_active_locale (cpt)); - - for (n = sn->children; n != NULL; n = n->next) { - gchar *key; - gchar *value; - - key = (gchar*) n->data; - if (n->children) - value = (gchar*) n->children->data; - else - value = NULL; - - if (g_strcmp0 (key, "unix-timestamp") == 0) { - as_release_set_timestamp (rel, g_ascii_strtoll (value, NULL, 10)); - } else if (g_strcmp0 (key, "date") == 0) { - g_autoptr(GDateTime) time; - time = as_iso8601_to_datetime (value); - if (time != NULL) { - as_release_set_timestamp (rel, g_date_time_to_unix (time)); - } else { - g_debug ("Invalid ISO-8601 date in releases of %s", as_component_get_id (cpt)); - } - } else if (g_strcmp0 (key, "version") == 0) { - as_release_set_version (rel, value); - } else if (g_strcmp0 (key, "description") == 0) { - gchar *lvalue; - lvalue = as_yamldata_get_localized_value (ydt, node, NULL); - as_release_set_description (rel, lvalue, NULL); - g_free (lvalue); - } else { - dep11_print_unknown ("release", key); - } - } - - /* add the result */ - as_component_add_release (cpt, rel); - g_object_unref (rel); - } -} - -/** - * as_yamldata_process_component_node: - */ -static AsComponent* -as_yamldata_process_component_node (AsYAMLData *ydt, GNode *root) -{ - GNode *node; - AsComponent *cpt; - - gchar **strv; - GPtrArray *categories; - GPtrArray *compulsory_for_desktops; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - cpt = as_component_new (); - - categories = g_ptr_array_new_with_free_func (g_free); - compulsory_for_desktops = g_ptr_array_new_with_free_func (g_free); - - /* set active locale for this component */ - as_component_set_active_locale (cpt, priv->locale); - - /* set component default priority */ - as_component_set_priority (cpt, priv->default_priority); - - for (node = root->children; node != NULL; node = node->next) { - gchar *key; - gchar *value; - gchar *lvalue; - - if (node->children == NULL) - continue; - - key = (gchar*) node->data; - value = (gchar*) node->children->data; - g_strstrip (value); - - if (g_strcmp0 (key, "Type") == 0) { - if (g_strcmp0 (value, "desktop-app") == 0) - as_component_set_kind (cpt, AS_COMPONENT_KIND_DESKTOP_APP); - else if (g_strcmp0 (value, "generic") == 0) - as_component_set_kind (cpt, AS_COMPONENT_KIND_GENERIC); - else - as_component_set_kind (cpt, as_component_kind_from_string (value)); - } else if (g_strcmp0 (key, "ID") == 0) { - as_component_set_id (cpt, value); - } else if (g_strcmp0 (key, "Priority") == 0) { - as_component_set_priority (cpt, g_ascii_strtoll (value, NULL, 10)); - } else if (g_strcmp0 (key, "Package") == 0) { - g_auto(GStrv) strv = NULL; - strv = g_new0 (gchar*, 1 + 1); - strv[0] = g_strdup (value); - strv[1] = NULL; - - as_component_set_pkgnames (cpt, strv); - } else if (g_strcmp0 (key, "SourcePackage") == 0) { - as_component_set_source_pkgname (cpt, value); - } else if (g_strcmp0 (key, "Name") == 0) { - lvalue = as_yamldata_get_localized_value (ydt, node, "C"); - g_strstrip (lvalue); - if (lvalue != NULL) { - as_component_set_name (cpt, lvalue, "C"); /* Unlocalized */ - g_free (lvalue); - } - lvalue = as_yamldata_get_localized_value (ydt, node, NULL); - as_component_set_name (cpt, lvalue, NULL); - g_free (lvalue); - } else if (g_strcmp0 (key, "Summary") == 0) { - lvalue = as_yamldata_get_localized_value (ydt, node, NULL); - g_strstrip (lvalue); - as_component_set_summary (cpt, lvalue, NULL); - g_free (lvalue); - } else if (g_strcmp0 (key, "Description") == 0) { - lvalue = as_yamldata_get_localized_value (ydt, node, NULL); - g_strstrip (lvalue); - as_component_set_description (cpt, lvalue, NULL); - g_free (lvalue); - } else if (g_strcmp0 (key, "DeveloperName") == 0) { - lvalue = as_yamldata_get_localized_value (ydt, node, NULL); - g_strstrip (lvalue); - as_component_set_developer_name (cpt, lvalue, NULL); - g_free (lvalue); - } else if (g_strcmp0 (key, "ProjectLicense") == 0) { - as_component_set_project_license (cpt, value); - } else if (g_strcmp0 (key, "ProjectGroup") == 0) { - as_component_set_project_group (cpt, value); - } else if (g_strcmp0 (key, "Categories") == 0) { - dep11_list_to_string_array (node, categories); - } else if (g_strcmp0 (key, "CompulsoryForDesktops") == 0) { - dep11_list_to_string_array (node, compulsory_for_desktops); - } else if (g_strcmp0 (key, "Extends") == 0) { - dep11_list_to_string_array (node, as_component_get_extends (cpt)); - } else if (g_strcmp0 (key, "Keywords") == 0) { - as_yamldata_process_keywords (ydt, node, cpt); - } else if (g_strcmp0 (key, "Url") == 0) { - dep11_process_urls (node, cpt); - } else if (g_strcmp0 (key, "Icon") == 0) { - as_yamldata_process_icons (ydt, node, cpt); - } else if (g_strcmp0 (key, "Provides") == 0) { - dep11_process_provides (node, cpt); - } else if (g_strcmp0 (key, "Screenshots") == 0) { - as_yamldata_process_screenshots (ydt, node, cpt); - } else if (g_strcmp0 (key, "Releases") == 0) { - as_yamldata_process_releases (ydt, node, cpt); - } else { - dep11_print_unknown ("root", key); - } - } - - /* set component origin */ - as_component_set_origin (cpt, priv->origin); - - /* set component architecture */ - as_component_set_architecture (cpt, priv->arch); - - /* add category information to component */ - strv = as_ptr_array_to_strv (categories); - as_component_set_categories (cpt, strv); - g_ptr_array_unref (categories); - g_strfreev (strv); - - /* add desktop-compulsority information to component */ - strv = as_ptr_array_to_strv (compulsory_for_desktops); - as_component_set_compulsory_for_desktops (cpt, strv); - g_ptr_array_unref (compulsory_for_desktops); - g_strfreev (strv); - - return cpt; -} - -/** - * as_yaml_emit_scalar: - */ -static void -as_yaml_emit_scalar (yaml_emitter_t *emitter, const gchar *value) -{ - gint ret; - yaml_event_t event; - g_assert (value != NULL); - - yaml_scalar_event_initialize (&event, NULL, NULL, (yaml_char_t*) value, strlen (value), TRUE, TRUE, YAML_ANY_SCALAR_STYLE); - ret = yaml_emitter_emit (emitter, &event); - g_assert (ret); -} - -/** - * as_yaml_emit_scalar_key: - */ -static void -as_yaml_emit_scalar_key (yaml_emitter_t *emitter, const gchar *key) -{ - yaml_scalar_style_t keystyle; - yaml_event_t event; - gint ret; - - /* Some locale are "no", which - if unquoted - are interpreted as booleans. - * Since we hever have boolean keys, we can disallow creating bool keys for all keys. */ - keystyle = YAML_ANY_SCALAR_STYLE; - if (g_strcmp0 (key, "no") == 0) - keystyle = YAML_SINGLE_QUOTED_SCALAR_STYLE; - if (g_strcmp0 (key, "yes") == 0) - keystyle = YAML_SINGLE_QUOTED_SCALAR_STYLE; - - yaml_scalar_event_initialize (&event, NULL, NULL, (yaml_char_t*) key, strlen (key), TRUE, TRUE, keystyle); - ret = yaml_emitter_emit (emitter, &event); - g_assert (ret); -} - -/** - * as_yaml_emit_entry: - */ -static void -as_yaml_emit_entry (yaml_emitter_t *emitter, const gchar *key, const gchar *value) -{ - yaml_event_t event; - gint ret; - - if (value == NULL) - return; - - as_yaml_emit_scalar_key (emitter, key); - - yaml_scalar_event_initialize (&event, NULL, NULL, (yaml_char_t*) value, strlen (value), TRUE, TRUE, YAML_ANY_SCALAR_STYLE); - ret = yaml_emitter_emit (emitter, &event); - g_assert (ret); -} - -/** - * as_yaml_emit_long_entry: - */ -static void -as_yaml_emit_long_entry (yaml_emitter_t *emitter, const gchar *key, const gchar *value) -{ - yaml_event_t event; - gint ret; - - if (value == NULL) - return; - - as_yaml_emit_scalar_key (emitter, key); - - yaml_scalar_event_initialize (&event, NULL, NULL, (yaml_char_t*) value, strlen (value), TRUE, TRUE, YAML_FOLDED_SCALAR_STYLE); - ret = yaml_emitter_emit (emitter, &event); - g_assert (ret); -} - -/** - * as_yaml_mapping_start: - */ -static void -as_yaml_mapping_start (yaml_emitter_t *emitter) -{ - yaml_event_t event; - - yaml_mapping_start_event_initialize (&event, NULL, NULL, 1, YAML_ANY_MAPPING_STYLE); - g_assert (yaml_emitter_emit (emitter, &event)); -} - -/** - * as_yaml_mapping_end: - */ -static void -as_yaml_mapping_end (yaml_emitter_t *emitter) -{ - yaml_event_t event; - - yaml_mapping_end_event_initialize (&event); - g_assert (yaml_emitter_emit (emitter, &event)); -} - -/** - * as_yaml_sequence_start: - */ -static void -as_yaml_sequence_start (yaml_emitter_t *emitter) -{ - yaml_event_t event; - - yaml_sequence_start_event_initialize (&event, NULL, NULL, 1, YAML_ANY_SEQUENCE_STYLE); - g_assert (yaml_emitter_emit (emitter, &event)); -} - -/** - * as_yaml_sequence_end: - */ -static void -as_yaml_sequence_end (yaml_emitter_t *emitter) -{ - yaml_event_t event; - - yaml_sequence_end_event_initialize (&event); - g_assert (yaml_emitter_emit (emitter, &event)); -} - -/** - * as_yaml_emit_lang_hashtable_entries: - */ -static void -as_yaml_emit_lang_hashtable_entries (gchar *key, gchar *value, yaml_emitter_t *emitter) -{ - if (as_str_empty (value)) - return; - - /* skip cruft */ - if (as_is_cruft_locale (key)) - return; - - g_strstrip (value); - as_yaml_emit_entry (emitter, key, value); -} - -/** - * as_yaml_emit_lang_hashtable_entries_long: - */ -static void -as_yaml_emit_lang_hashtable_entries_long (gchar *key, gchar *value, yaml_emitter_t *emitter) -{ - if (as_str_empty (value)) - return; - - /* skip cruft */ - if (as_is_cruft_locale (key)) - return; - - g_strstrip (value); - as_yaml_emit_long_entry (emitter, key, value); -} - -/** - * as_yaml_emit_localized_entry_with_func: - */ -static void -as_yaml_emit_localized_entry_with_func (yaml_emitter_t *emitter, const gchar *key, GHashTable *ltab, GHFunc tfunc) -{ - if (ltab == NULL) - return; - if (g_hash_table_size (ltab) == 0) - return; - - as_yaml_emit_scalar (emitter, key); - - /* start mapping for localized entry */ - as_yaml_mapping_start (emitter); - /* emit entries */ - g_hash_table_foreach (ltab, - tfunc, - emitter); - /* finalize */ - as_yaml_mapping_end (emitter); -} - -/** - * as_yaml_emit_localized_entry: - */ -static void -as_yaml_emit_localized_entry (yaml_emitter_t *emitter, const gchar *key, GHashTable *ltab) -{ - as_yaml_emit_localized_entry_with_func (emitter, - key, - ltab, - (GHFunc) as_yaml_emit_lang_hashtable_entries); -} - -/** - * as_yaml_emit_long_localized_entry: - */ -static void -as_yaml_emit_long_localized_entry (yaml_emitter_t *emitter, const gchar *key, GHashTable *ltab) -{ - as_yaml_emit_localized_entry_with_func (emitter, - key, - ltab, - (GHFunc) as_yaml_emit_lang_hashtable_entries_long); -} - -/** - * as_yaml_emit_sequence: - */ -static void -as_yaml_emit_sequence (yaml_emitter_t *emitter, const gchar *key, GPtrArray *list) -{ - guint i; - - if (list == NULL) - return; - if (list->len == 0) - return; - - as_yaml_emit_scalar (emitter, key); - - as_yaml_sequence_start (emitter); - for (i = 0; i < list->len; i++) { - const gchar *value = (const gchar *) g_ptr_array_index (list, i); - as_yaml_emit_scalar (emitter, value); - } - as_yaml_sequence_end (emitter); -} - -/** - * as_yaml_emit_sequence_from_strv: - */ -static void -as_yaml_emit_sequence_from_strv (yaml_emitter_t *emitter, const gchar *key, gchar **strv) -{ - guint i; - - if (strv == NULL) - return; - if (strv[0] == '\0') - return; - - as_yaml_emit_scalar_key (emitter, key); - - as_yaml_sequence_start (emitter); - for (i = 0; strv[i] != NULL; i++) { - if (as_str_empty (strv[i])) - continue; - as_yaml_emit_scalar (emitter, strv[i]); - } - as_yaml_sequence_end (emitter); -} - -/** - * as_yaml_localized_list_helper: - */ -static void -as_yaml_localized_list_helper (gchar *key, gchar **strv, yaml_emitter_t *emitter) -{ - guint i; - if (strv == NULL) - return; - - /* skip cruft */ - if (as_is_cruft_locale (key)) - return; - - as_yaml_emit_scalar (emitter, key); - as_yaml_sequence_start (emitter); - for (i = 0; strv[i] != NULL; i++) { - as_yaml_emit_scalar (emitter, strv[i]); - } - as_yaml_sequence_end (emitter); -} - -/** - * as_yaml_emit_localized_lists: - */ -void -as_yaml_emit_localized_lists (yaml_emitter_t *emitter, const gchar *key, GHashTable *ltab) -{ - if (ltab == NULL) - return; - if (g_hash_table_size (ltab) == 0) - return; - - as_yaml_emit_scalar (emitter, key); - - /* start mapping for localized entry */ - as_yaml_mapping_start (emitter); - /* emit entries */ - g_hash_table_foreach (ltab, - (GHFunc) as_yaml_localized_list_helper, - emitter); - /* finalize */ - as_yaml_mapping_end (emitter); -} - -/** - * as_yaml_emit_provides: - */ -void -as_yaml_emit_provides (yaml_emitter_t *emitter, AsComponent *cpt) -{ - GList *l; - GList *plist; - guint i; - - g_auto(GStrv) dbus_system = NULL; - g_auto(GStrv) dbus_user = NULL; - - g_auto(GStrv) fw_runtime = NULL; - g_auto(GStrv) fw_flashed = NULL; - - plist = as_component_get_provided (cpt); - if (plist == NULL) - return; - - as_yaml_emit_scalar (emitter, "Provides"); - as_yaml_mapping_start (emitter); - for (l = plist; l != NULL; l = l->next) { - AsProvidedKind kind; - g_autofree gchar **items = NULL; - AsProvided *prov = AS_PROVIDED (l->data); - - items = as_provided_get_items (prov); - if (items == NULL) - continue; - - kind = as_provided_get_kind (prov); - switch (kind) { - case AS_PROVIDED_KIND_LIBRARY: - as_yaml_emit_sequence_from_strv (emitter, - "libraries", - items); - break; - case AS_PROVIDED_KIND_BINARY: - as_yaml_emit_sequence_from_strv (emitter, - "binaries", - items); - break; - case AS_PROVIDED_KIND_MIMETYPE: - as_yaml_emit_sequence_from_strv (emitter, - "mimetypes", - items); - break; - case AS_PROVIDED_KIND_PYTHON_2: - as_yaml_emit_sequence_from_strv (emitter, - "python2", - items); - break; - case AS_PROVIDED_KIND_PYTHON: - as_yaml_emit_sequence_from_strv (emitter, - "python3", - items); - break; - case AS_PROVIDED_KIND_MODALIAS: - as_yaml_emit_sequence_from_strv (emitter, - "modaliases", - items); - break; - case AS_PROVIDED_KIND_FONT: - as_yaml_emit_scalar (emitter, "fonts"); - - as_yaml_sequence_start (emitter); - for (i = 0; items[i] != NULL; i++) { - as_yaml_mapping_start (emitter); - as_yaml_emit_entry (emitter, "name", items[i]); - /* FIXME: Also emit "file" entry, but at time we don't seem to store this? */ - as_yaml_mapping_end (emitter); - } - as_yaml_sequence_end (emitter); - break; - case AS_PROVIDED_KIND_DBUS_SYSTEM: - if (dbus_system == NULL) { - dbus_system = g_strdupv (items); - } else { - g_critical ("Hit dbus:system twice, this should never happen!"); - } - break; - case AS_PROVIDED_KIND_DBUS_USER: - if (dbus_user == NULL) { - dbus_user = g_strdupv (items); - } else { - g_critical ("Hit dbus:user twice, this should never happen!"); - } - break; - case AS_PROVIDED_KIND_FIRMWARE_RUNTIME: - if (fw_runtime == NULL) { - fw_runtime = g_strdupv (items); - } else { - g_critical ("Hit firmware:runtime twice, this should never happen!"); - } - break; - case AS_PROVIDED_KIND_FIRMWARE_FLASHED: - if (fw_flashed == NULL) { - fw_flashed = g_strdupv (items); - } else { - g_critical ("Hit dbus-user twice, this should never happen!"); - } - break; - default: - g_warning ("Ignoring unknown type of provided items: %s", as_provided_kind_to_string (kind)); - break; - } - } - - /* dbus subsection */ - if ((dbus_system != NULL) || (dbus_user != NULL)) { - as_yaml_emit_scalar (emitter, "dbus"); - as_yaml_sequence_start (emitter); - - if (dbus_system != NULL) { - for (i = 0; dbus_system[i] != NULL; i++) { - as_yaml_mapping_start (emitter); - - as_yaml_emit_entry (emitter, "type", "system"); - as_yaml_emit_entry (emitter, "service", dbus_system[i]); - - as_yaml_mapping_end (emitter); - } - } - - if (dbus_user != NULL) { - for (i = 0; dbus_user[i] != NULL; i++) { - as_yaml_mapping_start (emitter); - - as_yaml_emit_entry (emitter, "type", "user"); - as_yaml_emit_entry (emitter, "service", dbus_user[i]); - - as_yaml_mapping_end (emitter); - } - } - - as_yaml_sequence_end (emitter); - } - - /* firmware subsection */ - if ((fw_runtime != NULL) || (fw_flashed != NULL)) { - as_yaml_emit_scalar (emitter, "firmware"); - as_yaml_sequence_start (emitter); - - if (fw_runtime != NULL) { - for (i = 0; fw_runtime[i] != NULL; i++) { - as_yaml_mapping_start (emitter); - - as_yaml_emit_entry (emitter, "type", "runtime"); - as_yaml_emit_entry (emitter, "guid", fw_runtime[i]); - - as_yaml_mapping_end (emitter); - } - } - - if (fw_flashed != NULL) { - for (i = 0; fw_flashed[i] != NULL; i++) { - as_yaml_mapping_start (emitter); - - as_yaml_emit_entry (emitter, "type", "flashed"); - as_yaml_emit_entry (emitter, "fname", fw_flashed[i]); - - as_yaml_mapping_end (emitter); - } - } - - as_yaml_sequence_end (emitter); - } - - as_yaml_mapping_end (emitter); -} - -/** - * as_yaml_emit_image: - * - * Helper for as_yaml_emit_screenshots - */ -static void -as_yaml_emit_image (AsYAMLData *ydt, yaml_emitter_t *emitter, AsImage *img) -{ - g_autofree gchar *url = NULL; - gchar *size; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - as_yaml_mapping_start (emitter); - if (priv->media_baseurl == NULL) - url = g_strdup (as_image_get_url (img)); - else - url = as_str_replace (as_image_get_url (img), priv->media_baseurl, ""); - - g_strstrip (url); - as_yaml_emit_entry (emitter, "url", url); - if ((as_image_get_width (img) > 0) && - (as_image_get_height (img) > 0)) { - size = g_strdup_printf("%i", as_image_get_width (img)); - as_yaml_emit_entry (emitter, "width", size); - g_free (size); - - size = g_strdup_printf("%i", as_image_get_height (img)); - as_yaml_emit_entry (emitter, "height", size); - g_free (size); - } - as_yaml_mapping_end (emitter); -} - -/** - * as_yaml_emit_screenshots: - */ -void -as_yaml_emit_screenshots (AsYAMLData *ydt, yaml_emitter_t *emitter, AsComponent *cpt) -{ - GPtrArray *sslist; - AsScreenshot *scr; - guint i; - - sslist = as_component_get_screenshots (cpt); - if ((sslist == NULL) || (sslist->len == 0)) - return; - - as_yaml_emit_scalar (emitter, "Screenshots"); - as_yaml_sequence_start (emitter); - for (i = 0; i < sslist->len; i++) { - GPtrArray *images; - guint j; - AsImage *source_img = NULL; - scr = AS_SCREENSHOT (g_ptr_array_index (sslist, i)); - - as_yaml_mapping_start (emitter); - - if (as_screenshot_get_kind (scr) == AS_SCREENSHOT_KIND_DEFAULT) - as_yaml_emit_entry (emitter, "default", "true"); - - as_yaml_emit_localized_entry (emitter, - "caption", - as_screenshot_get_caption_table (scr)); - - images = as_screenshot_get_images (scr); - as_yaml_emit_scalar (emitter, "thumbnails"); - as_yaml_sequence_start (emitter); - for (j = 0; j < images->len; j++) { - AsImage *img = AS_IMAGE (g_ptr_array_index (images, j)); - - if (as_image_get_kind (img) == AS_IMAGE_KIND_SOURCE) { - source_img = img; - continue; - } - as_yaml_emit_image (ydt, emitter, img); - } - as_yaml_sequence_end (emitter); - - /* technically, we *must* have a source-image by now, but better be safe... */ - if (source_img != NULL) { - as_yaml_emit_scalar (emitter, "source-image"); - as_yaml_emit_image (ydt, emitter, source_img); - } - - as_yaml_mapping_end (emitter); - } - as_yaml_sequence_end (emitter); - - -} - -static void -as_yaml_emit_icons (yaml_emitter_t *emitter, GPtrArray *icons) -{ - guint i; - GHashTableIter iter; - gpointer key, value; - gboolean stock_icon_added = FALSE; - g_autoptr(GHashTable) icons_table = NULL; - - /* we need to emit the icons in order, so we first need to sort them properly */ - icons_table = g_hash_table_new_full (g_direct_hash, - g_direct_equal, - NULL, - (GDestroyNotify) g_ptr_array_unref); - for (i = 0; i < icons->len; i++) { - GPtrArray *ilist; - AsIconKind ikind; - AsIcon *icon = AS_ICON (g_ptr_array_index (icons, i)); - - ikind = as_icon_get_kind (icon); - ilist = g_hash_table_lookup (icons_table, GINT_TO_POINTER (ikind)); - if (ilist == NULL) { - ilist = g_ptr_array_new (); - g_hash_table_insert (icons_table, GINT_TO_POINTER (ikind), ilist); - } - - g_ptr_array_add (ilist, icon); - } - - g_hash_table_iter_init (&iter, icons_table); - while (g_hash_table_iter_next (&iter, &key, &value)) { - GPtrArray *ilist; - AsIconKind ikind; - - ikind = (AsIconKind) GPOINTER_TO_INT (key); - ilist = (GPtrArray*) value; - - if (ikind == AS_ICON_KIND_STOCK) { - /* there can always be only one stock icon, so this is easy */ - if (!stock_icon_added) - as_yaml_emit_entry (emitter, - as_icon_kind_to_string (ikind), - as_icon_get_name (AS_ICON (g_ptr_array_index (ilist, 0)))); - stock_icon_added = TRUE; - } else { - as_yaml_emit_scalar (emitter, as_icon_kind_to_string (ikind)); - as_yaml_sequence_start (emitter); - - for (i = 0; i < ilist->len; i++) { - gchar *size; - AsIcon *icon = AS_ICON (g_ptr_array_index (ilist, i)); - - as_yaml_mapping_start (emitter); - - if (ikind == AS_ICON_KIND_REMOTE) - as_yaml_emit_entry (emitter, "url", as_icon_get_url (icon)); - else if (ikind == AS_ICON_KIND_LOCAL) - as_yaml_emit_entry (emitter, "name", as_icon_get_filename (icon)); - else - as_yaml_emit_entry (emitter, "name", as_icon_get_name (icon)); - - if (as_icon_get_width (icon) > 0) { - size = g_strdup_printf("%i", as_icon_get_width (icon)); - as_yaml_emit_entry (emitter, "width", size); - g_free (size); - } - - if (as_icon_get_height (icon) > 0) { - size = g_strdup_printf("%i", as_icon_get_height (icon)); - as_yaml_emit_entry (emitter, "height", size); - g_free (size); - } - - as_yaml_mapping_end (emitter); - } - - as_yaml_sequence_end (emitter); - } - } -} - -/** - * as_yaml_serialize_component: - */ -static void -as_yaml_serialize_component (AsYAMLData *ydt, yaml_emitter_t *emitter, AsComponent *cpt) -{ - guint i; - gint res; - const gchar *cstr; - gchar **pkgnames; - yaml_event_t event; - AsComponentKind kind; - GHashTable *htable; - GPtrArray *icons; - - /* we only serialize a component with minimal necessary information */ - if (!as_component_is_valid (cpt)) { - g_debug ("Can not serialize '%s': Component is invalid.", as_component_get_id (cpt)); - return; - } - - /* new document for this component */ - yaml_document_start_event_initialize (&event, NULL, NULL, NULL, FALSE); - res = yaml_emitter_emit (emitter, &event); - g_assert (res); - - /* open main mapping */ - as_yaml_mapping_start (emitter); - - /* write component kind */ - kind = as_component_get_kind (cpt); - if (kind == AS_COMPONENT_KIND_DESKTOP_APP) - cstr = "desktop-app"; - else if (kind == AS_COMPONENT_KIND_GENERIC) - cstr = "generic"; - else - cstr = as_component_kind_to_string (kind); - as_yaml_emit_entry (emitter, "Type", cstr); - - /* AppStream-ID */ - as_yaml_emit_entry (emitter, "ID", as_component_get_id (cpt)); - - /* SourcePackage */ - as_yaml_emit_entry (emitter, "SourcePackage", as_component_get_source_pkgname (cpt)); - - /* Package */ - pkgnames = as_component_get_pkgnames (cpt); - /* NOTE: a DEP-11 component does *not* support multiple packages per component */ - if ((pkgnames != NULL) && (pkgnames[0] != '\0')) - as_yaml_emit_entry (emitter, "Package", pkgnames[0]); - - /* Extends */ - as_yaml_emit_sequence (emitter, - "Extends", - as_component_get_extends (cpt)); - - /* Name */ - as_yaml_emit_localized_entry (emitter, - "Name", - as_component_get_name_table (cpt)); - - /* Summary */ - as_yaml_emit_localized_entry (emitter, - "Summary", - as_component_get_summary_table (cpt)); - - /* Description */ - as_yaml_emit_long_localized_entry (emitter, - "Description", - as_component_get_description_table (cpt)); - - /* DeveloperName */ - as_yaml_emit_localized_entry (emitter, - "DeveloperName", - as_component_get_developer_name_table (cpt)); - - /* ProjectGroup */ - as_yaml_emit_entry (emitter, "ProjectGroup", as_component_get_project_group (cpt)); - - /* ProjectLicense */ - as_yaml_emit_entry (emitter, "ProjectLicense", as_component_get_project_license (cpt)); - - /* CompulsoryForDesktops */ - as_yaml_emit_sequence_from_strv (emitter, - "CompulsoryForDesktops", - as_component_get_compulsory_for_desktops (cpt)); - - /* Categories */ - as_yaml_emit_sequence_from_strv (emitter, - "Categories", - as_component_get_categories (cpt)); - - /* Keywords */ - as_yaml_emit_localized_lists (emitter, - "Keywords", - as_component_get_keywords_table (cpt)); - - /* Urls */ - htable = as_component_get_urls_table (cpt); - if ((htable != NULL) && (g_hash_table_size (htable) > 0)) { - as_yaml_emit_scalar (emitter, "Url"); - - as_yaml_mapping_start (emitter); - for (i = AS_URL_KIND_UNKNOWN; i < AS_URL_KIND_LAST; i++) { - const gchar *value; - value = as_component_get_url (cpt, i); - if (value == NULL) - continue; - - as_yaml_emit_entry (emitter, as_url_kind_to_string (i), value); - } - as_yaml_mapping_end (emitter); - } - - /* Icons */ - icons = as_component_get_icons (cpt); - if (icons->len > 0) { - as_yaml_emit_scalar (emitter, "Icon"); - as_yaml_mapping_start (emitter); - as_yaml_emit_icons (emitter, icons); - as_yaml_mapping_end (emitter); - } - - /* Bundles */ - htable = as_component_get_bundles_table (cpt); - if ((htable != NULL) && (g_hash_table_size (htable) > 0)) { - as_yaml_emit_scalar (emitter, "Bundles"); - as_yaml_mapping_start (emitter); - for (i = AS_BUNDLE_KIND_UNKNOWN; i < AS_BUNDLE_KIND_LAST; i++) { - const gchar *value; - value = as_component_get_bundle_id (cpt, i); - if (value == NULL) - continue; - - as_yaml_emit_entry (emitter, as_bundle_kind_to_string (i), value); - } - as_yaml_mapping_end (emitter); - } - - /* Provides */ - as_yaml_emit_provides (emitter, cpt); - - /* Screenshots */ - as_yaml_emit_screenshots (ydt, emitter, cpt); - - /* TODO: Releases, Translations */ - - /* close main mapping */ - as_yaml_mapping_end (emitter); - - /* finalize the document */ - yaml_document_end_event_initialize (&event, 1); - res = yaml_emitter_emit (emitter, &event); - g_assert (res); -} - -/** - * as_yamldata_write_header: - * - * Emit a DEP-11 header for the new document. - */ -static void -as_yamldata_write_header (AsYAMLData *ydt, yaml_emitter_t *emitter) -{ - gint res; - yaml_event_t event; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - yaml_document_start_event_initialize (&event, NULL, NULL, NULL, FALSE); - res = yaml_emitter_emit (emitter, &event); - g_assert (res); - - as_yaml_mapping_start (emitter); - - as_yaml_emit_entry (emitter, "File", "DEP-11"); - as_yaml_emit_entry (emitter, "Version", "0.8"); - as_yaml_emit_entry (emitter, "Origin", priv->origin); - if (priv->media_baseurl != NULL) - as_yaml_emit_entry (emitter, "MediaBaseUrl", priv->media_baseurl); - if (priv->arch != NULL) - as_yaml_emit_entry (emitter, "Architecture", priv->arch); - if (priv->default_priority != 0) - as_yaml_emit_entry (emitter, "Priority", priv->arch); - - as_yaml_mapping_end (emitter); - - yaml_document_end_event_initialize (&event, 1); - res = yaml_emitter_emit (emitter, &event); - g_assert (res); -} - -/** - * as_yamldata_write_handler: - * - * Helper function to store the emitted YAML document. - */ -static int -as_yamldata_write_handler (void *ptr, unsigned char *buffer, size_t size) -{ - GString *str; - str = (GString*) ptr; - g_string_append_len (str, (const gchar*) buffer, size); - - return 1; -} - -/** - * as_yamldata_serialize_to_distro: - */ -gchar* -as_yamldata_serialize_to_distro (AsYAMLData *ydt, GPtrArray *cpts, gboolean write_header, gboolean add_timestamp, GError **error) -{ - yaml_emitter_t emitter; - yaml_event_t event; - GString *out_data; - gboolean res = FALSE; - guint i; - - if (cpts->len == 0) - return NULL; - - yaml_emitter_initialize (&emitter); - yaml_emitter_set_indent (&emitter, 2); - yaml_emitter_set_unicode (&emitter, TRUE); - yaml_emitter_set_width (&emitter, 120); - - /* create a GString to receive the output the emitter generates */ - out_data = g_string_new (""); - yaml_emitter_set_output (&emitter, as_yamldata_write_handler, out_data); - - /* emit start event */ - yaml_stream_start_event_initialize (&event, YAML_UTF8_ENCODING); - if (!yaml_emitter_emit (&emitter, &event)) - goto error; - - /* write header */ - if (write_header) - as_yamldata_write_header (ydt, &emitter); - - /* write components as YAML documents */ - for (i = 0; i < cpts->len; i++) { - AsComponent *cpt; - cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); - - as_yaml_serialize_component (ydt, &emitter, cpt); - } - - /* emit end event */ - yaml_stream_end_event_initialize (&event); - yaml_emitter_emit (&emitter, &event); - yaml_emitter_emit (&emitter, &event); - - res = TRUE; - goto out; - -error: - g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "Emission of YAML event failed."); - -out: - yaml_emitter_flush (&emitter); - /* destroy the Emitter object */ - yaml_emitter_delete (&emitter); - - if (res) { - return g_string_free (out_data, FALSE); - } else { - g_string_free (out_data, TRUE); - return NULL; - } -} - -/** - * as_yamldata_parse_distro_data: - * @ydt: An instance of #AsYAMLData - * @data: YAML metadata to parse - * - * Read an array of #AsComponent from AppStream YAML metadata. - * - * Returns: (transfer full) (element-type AsComponent): An array of #AsComponent or %NULL - */ -GPtrArray* -as_yamldata_parse_distro_data (AsYAMLData *ydt, const gchar *data, GError **error) -{ - yaml_parser_t parser; - yaml_event_t event; - gboolean header = TRUE; - gboolean parse = TRUE; - GPtrArray *cpts = NULL;; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - /* we ignore empty data - usually happens if the file is broken, e.g. by disk corruption - * or download interruption. */ - if (data == NULL) - return NULL; - - /* create container for the components we find */ - cpts = g_ptr_array_new_with_free_func (g_object_unref); - - /* reset the global document properties */ - g_free (priv->origin); - priv->origin = NULL; - - g_free (priv->arch); - priv->arch = NULL; - - g_free (priv->media_baseurl); - priv->media_baseurl = NULL; - - priv->default_priority = 0; - - /* initialize YAML parser */ - yaml_parser_initialize (&parser); - yaml_parser_set_input_string (&parser, (unsigned char*) data, strlen (data)); - - while (parse) { - yaml_parser_parse (&parser, &event); - if (event.type == YAML_DOCUMENT_START_EVENT) { - GNode *n; - gchar *key; - gchar *value; - AsComponent *cpt; - gboolean header_found = FALSE; - GNode *root = g_node_new (g_strdup ("")); - - dep11_yaml_process_layer (&parser, root); - - if (header) { - for (n = root->children; n != NULL; n = n->next) { - if ((n->data == NULL) || (n->children == NULL)) { - parse = FALSE; - g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "Invalid DEP-11 file found: Header invalid"); - break; - } - - key = (gchar*) n->data; - value = (gchar*) n->children->data; - - if (g_strcmp0 (key, "File") == 0) { - if (g_strcmp0 (value, "DEP-11") != 0) { - parse = FALSE; - g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "Invalid DEP-11 file found: Header invalid"); - } - header_found = TRUE; - } - - if (!header_found) - break; - - if (g_strcmp0 (key, "Origin") == 0) { - if ((value != NULL) && (priv->origin == NULL)) { - priv->origin = g_strdup (value); - } else { - parse = FALSE; - g_set_error_literal (error, - AS_METADATA_ERROR, - AS_METADATA_ERROR_FAILED, - "Invalid DEP-11 file found: No origin set in header."); - } - } else if (g_strcmp0 (key, "Priority") == 0) { - if (value != NULL) { - priv->default_priority = g_ascii_strtoll (value, NULL, 10); - } - } else if (g_strcmp0 (key, "MediaBaseUrl") == 0) { - if ((value != NULL) && (priv->media_baseurl == NULL)) { - priv->media_baseurl = g_strdup (value); - } - } else if (g_strcmp0 (key, "Architecture") == 0) { - if ((value != NULL) && (priv->arch == NULL)) { - priv->arch = g_strdup (value); - } - } - } - } - header = FALSE; - - if (!header_found) { - cpt = as_yamldata_process_component_node (ydt, root); - if (cpt == NULL) { - g_warning ("Parsing of YAML metadata failed: Could not read data for component."); - parse = FALSE; - } - - /* add found component to the results set */ - g_ptr_array_add (cpts, cpt); - } - - g_node_traverse (root, - G_IN_ORDER, - G_TRAVERSE_ALL, - -1, - as_yamldata_free_node, - NULL); - g_node_destroy (root); - } - - /* stop if end of stream is reached */ - if (event.type == YAML_STREAM_END_EVENT) - parse = FALSE; - - yaml_event_delete(&event); - } - - yaml_parser_delete (&parser); - - return cpts; -} - -/** - * as_yamldata_set_locale: - * @ydt: a #AsYAMLData instance. - * @locale: the locale. - * - * Sets the locale which should be read when processing DEP-11 metadata. - * All other locales are ignored, which increases parsing speed and - * reduces memory usage. - * If you set the locale to "ALL", all locales will be read. - **/ -void -as_yamldata_set_locale (AsYAMLData *ydt, const gchar *locale) -{ - gchar **strv; - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - - g_free (priv->locale); - g_free (priv->locale_short); - priv->locale = g_strdup (locale); - - strv = g_strsplit (priv->locale, "_", 0); - priv->locale_short = g_strdup (strv[0]); - g_strfreev (strv); -} - -/** - * as_yamldata_get_locale: - * @ydt: a #AsYAMLData instance. - * - * Gets the current active locale for parsing DEP-11 metadata., - * or "ALL" if all locales are read. - * - * Returns: Locale used for metadata parsing. - **/ -const gchar * -as_yamldata_get_locale (AsYAMLData *ydt) -{ - AsYAMLDataPrivate *priv = GET_PRIVATE (ydt); - return priv->locale; -} - -/** - * as_yamldata_class_init: - **/ -static void -as_yamldata_class_init (AsYAMLDataClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = as_yamldata_finalize; -} - -/** - * as_yamldata_new: - */ -AsYAMLData* -as_yamldata_new (void) -{ - AsYAMLData *ydt; - ydt = g_object_new (AS_TYPE_YAMLDATA, NULL); - return AS_YAMLDATA (ydt); -} diff -Nru appstream-0.9.4/src/as-yamldata.h appstream-0.12.0/src/as-yamldata.h --- appstream-0.9.4/src/as-yamldata.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/as-yamldata.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2016 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#ifndef __AS_YAMLDATA_H -#define __AS_YAMLDATA_H - -#include -#include - -#include "as-component.h" - -G_BEGIN_DECLS - -#define AS_TYPE_YAMLDATA (as_yamldata_get_type ()) -G_DECLARE_DERIVABLE_TYPE (AsYAMLData, as_yamldata, AS, YAMLDATA, GObject) - -struct _AsYAMLDataClass -{ - GObjectClass parent_class; - /*< private >*/ - void (*_as_reserved1) (void); - void (*_as_reserved2) (void); - void (*_as_reserved3) (void); - void (*_as_reserved4) (void); - void (*_as_reserved5) (void); - void (*_as_reserved6) (void); -}; - -AsYAMLData *as_yamldata_new (void); - -void as_yamldata_initialize (AsYAMLData *ydt, - const gchar *locale, - const gchar *origin, - const gchar *media_baseurl, - const gchar *arch, - gint priority); - -GPtrArray *as_yamldata_parse_distro_data (AsYAMLData *ydt, - const gchar *data, - GError **error); - -gchar *as_yamldata_serialize_to_distro (AsYAMLData *ydt, - GPtrArray *cpts, - gboolean write_header, - gboolean add_timestamp, - GError **error); - -const gchar *as_yamldata_get_locale (AsYAMLData *ydt); -void as_yamldata_set_locale (AsYAMLData *ydt, - const gchar *locale); - -G_END_DECLS - -#endif /* __AS_YAMLDATA_H */ diff -Nru appstream-0.9.4/src/as-yaml.h appstream-0.12.0/src/as-yaml.h --- appstream-0.9.4/src/as-yaml.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/as-yaml.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,101 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#if !defined (__APPSTREAM_H) && !defined (AS_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __AS_YAML_H +#define __AS_YAML_H + +#include +#include "as-context.h" + +G_BEGIN_DECLS +#pragma GCC visibility push(hidden) + +void as_yaml_parse_layer (yaml_parser_t *parser, + GNode *data, + GError **error); + +gboolean as_yaml_free_node (GNode *node, + gpointer data); + +const gchar *as_yaml_node_get_key (GNode *n); +const gchar *as_yaml_node_get_value (GNode *n); + +void as_yaml_print_unknown (const gchar *root, + const gchar *key); + +void as_yaml_mapping_start (yaml_emitter_t *emitter); +void as_yaml_mapping_end (yaml_emitter_t *emitter); + +void as_yaml_sequence_start (yaml_emitter_t *emitter); +void as_yaml_sequence_end (yaml_emitter_t *emitter); + +void as_yaml_emit_scalar (yaml_emitter_t *emitter, + const gchar *value); +void as_yaml_emit_scalar_uint (yaml_emitter_t *emitter, + guint value); +void as_yaml_emit_scalar_key (yaml_emitter_t *emitter, + const gchar *key); +void as_yaml_emit_entry (yaml_emitter_t *emitter, + const gchar *key, + const gchar *value); +void as_yaml_emit_entry_uint (yaml_emitter_t *emitter, + const gchar *key, + guint value); +void as_yaml_emit_entry_timestamp (yaml_emitter_t *emitter, + const gchar *key, + guint64 unixtime); +void as_yaml_emit_long_entry (yaml_emitter_t *emitter, + const gchar *key, + const gchar *value); +void as_yaml_emit_sequence (yaml_emitter_t *emitter, + const gchar *key, + GPtrArray *list); +void as_yaml_emit_sequence_from_str_array (yaml_emitter_t *emitter, + const gchar *key, + GPtrArray *array); +void as_yaml_emit_localized_strv (yaml_emitter_t *emitter, + const gchar *key, + GHashTable *ltab); + +GNode *as_yaml_get_localized_node (AsContext *ctx, + GNode *node, + gchar *locale_override); +gchar *as_yaml_get_localized_value (AsContext *ctx, + GNode *node, + gchar *locale_override); + +void as_yaml_emit_localized_entry (yaml_emitter_t *emitter, + const gchar *key, + GHashTable *ltab); +void as_yaml_emit_long_localized_entry (yaml_emitter_t *emitter, + const gchar *key, + GHashTable *ltab); + +void as_yaml_list_to_str_array (GNode *node, + GPtrArray *array); + +#pragma GCC visibility pop +G_END_DECLS + +#endif /* __AS_YAML_H */ diff -Nru appstream-0.9.4/src/CMakeLists.txt appstream-0.12.0/src/CMakeLists.txt --- appstream-0.9.4/src/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,157 +0,0 @@ -# CMakeLists for AppStream database shared lib - -find_package(GLIB2 2.46 REQUIRED) -pkg_check_modules(GIO2 REQUIRED gio-2.0) -find_package(GI REQUIRED) -find_package(LibXml2 REQUIRED) -find_package(Xapian 1.2 REQUIRED) -find_package(Protobuf REQUIRED) -find_library(M_LIB m) -pkg_check_modules(YAML REQUIRED yaml-0.1) - -include(GObjectIntrospectionMacros) -set(INTROSPECTION_GIRS) -set(INTROSPECTION_SCANNER_ARGS "--identifier-prefix=As" "--symbol-prefix=as" "--warn-all" "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}") -set(INTROSPECTION_COMPILER_ARGS "--includedir=${CMAKE_CURRENT_SOURCE_DIR}") - -# check if the git tools are really found. -if (NOT INTROSPECTION_SCANNER) - message (FATAL_ERROR "GObject introspection scanner was not found! Please install it to continue.") -endif () -if (NOT INTROSPECTION_COMPILER) - message (FATAL_ERROR "GObject introspection compiler was not found! Please install it to continue.") -endif () - -set (srcdir ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "Source dir") -set(AS_VERSION_BASE "${AS_VERSION_MAJOR}.${AS_VERSION_MINOR}" CACHE INTERNAL "LibAppStream combined version number") - -if (NOT PROTOBUF_PROTOC_EXECUTABLE) - message (FATAL_ERROR "ProtoBuf compiler (protoc) was not found!") -endif () - -protobuf_generate_cpp(AS_PROTO_SRCS AS_PROTO_HDRS xapian/asxentries.proto) - -set(ASLIB_XAP_SOURCES ${AS_PROTO_SRCS} ${AS_PROTO_HDRS} - xapian/database-schema.hpp - xapian/database-read.hpp - xapian/database-read.cpp - xapian/database-write.hpp - xapian/database-write.cpp - xapian/database-cwrap.hpp - xapian/database-cwrap.cpp -) -set_source_files_properties(${ASLIB_XAP_SOURCES} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") - -set(APPSTREAM_LIB_SRC - as-utils.c - # internal stuff to build the database - as-cache-builder.c - as-xmldata.c - as-yamldata.c - # (mostly) public API - as-metadata.c - as-component.c - as-enums.c - as-provided.c - as-data-pool.c - as-database.c - as-category.c - as-menu-parser.c - as-distro-details.c - as-screenshot.c - as-image.c - as-release.c - as-validator.c - as-validator-issue.c - as-icon.c - as-translation.c -) - -set(APPSTREAM_LIB_PUBLIC_HEADERS - appstream.h - as-utils.h - as-metadata.h - as-component.h - as-data-pool.h - as-enums.h - as-provided.h - as-database.h - as-category.h - as-menu-parser.h - as-distro-details.h - as-screenshot.h - as-image.h - as-release.h - as-validator.h - as-validator-issue.h - as-icon.h - as-translation.h -) - -set(APPSTREAM_LIB_PRIVATE_HEADERS - as-utils-private.h - as-xmldata.h - as-yamldata.h - as-component-private.h - as-screenshot-private.h - as-cache-builder.h -) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/xapian - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/src - ${GLIB2_INCLUDE_DIR} - ${GIO2_INCLUDE_DIR} - ${LIBXML2_INCLUDE_DIR} - ${YAML_INCLUDE_DIR} - ${XAPIAN_INCLUDE_DIR} - ${PROTOBUF_INCLUDE_DIRS} -) - -add_definitions("-DAS_COMPILATION") - -# ensure that the GI compiler has been found (apparently, the automatic tests fail on some machines) -if (INTROSPECTION_COMPILER STREQUAL "") - message(FATAL_ERROR "GObject-Introspection was not found! Please install it to continue.") -endif() - -add_library(appstream SHARED ${ASLIB_XAP_SOURCES} ${APPSTREAM_LIB_SRC} ${APPSTREAM_LIB_PUBLIC_HEADERS} ${APPSTREAM_LIB_PRIVATE_HEADERS}) -set_target_properties(appstream PROPERTIES VERSION ${AS_VERSION} SOVERSION ${APPSTREAM_LIB_API_LEVEL}) - -target_link_libraries(appstream - ${GLIB2_LIBRARIES} - ${GIO2_LIBRARIES} - ${LIBXML2_LIBRARIES} - ${YAML_LIBRARIES} - ${XAPIAN_LIBRARIES} - ${PROTOBUF_LITE_LIBRARIES} -) - -configure_file (${CMAKE_CURRENT_SOURCE_DIR}/appstream.pc.in ${CMAKE_CURRENT_BINARY_DIR}/appstream.pc @ONLY) - -#### -# GObject Introspection -macro(_list_prefix _outvar _listvar _prefix) - set(${_outvar}) - foreach(_item IN LISTS ${_listvar}) - list(APPEND ${_outvar} ${_prefix}${_item}) - endforeach() -endmacro(_list_prefix) - -set(introspection_files ${APPSTREAM_LIB_SRC} ${APPSTREAM_LIB_PUBLIC_HEADERS}) -set(AppStream_1_0_gir "appstream") -set(AppStream_1_0_gir_INCLUDES GObject-2.0 Gio-2.0) -set(AppStream_1_0_gir_CFLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/" "-DAS_COMPILATION") -set(AppStream_1_0_gir_LIBS appstream) - -_list_prefix(AppStream_1_0_gir_FILES introspection_files "${CMAKE_CURRENT_SOURCE_DIR}/") -set(AppStream_1_0_gir_SCANNERFLAGS --c-include appstream.h) -set(AppStream_1_0_gir_EXPORT_PACKAGES appstream) - -list(APPEND INTROSPECTION_GIRS AppStream-1.0.gir) -gir_add_introspections(INTROSPECTION_GIRS) -#### - -install(TARGETS appstream DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES ${APPSTREAM_LIB_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/AppStream) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/appstream.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) diff -Nru appstream-0.9.4/src/meson.build appstream-0.12.0/src/meson.build --- appstream-0.9.4/src/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/src/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,142 @@ +# Meson build configuration for the AppStream library + +appstream_lib_inc = include_directories ('.') + +aslib_src = [ + 'as-utils.c', + # internal + 'as-context.c', + 'as-xml.c', + 'as-yaml.c', + 'as-variant-cache.c', + 'as-desktop-entry.c', + 'as-distro-extras.c', + 'as-stemmer.c', + # (mostly) public + 'as-spdx.c', + 'as-metadata.c', + 'as-component.c', + 'as-enums.c', + 'as-provided.c', + 'as-bundle.c', + 'as-pool.c', + 'as-category.c', + 'as-distro-details.c', + 'as-screenshot.c', + 'as-image.c', + 'as-release.c', + 'as-checksum.c', + 'as-validator.c', + 'as-validator-issue.c', + 'as-icon.c', + 'as-translation.c', + 'as-suggested.c', + 'as-content-rating.c', + 'as-launchable.c', + 'as-relation.c' +] + +aslib_pub_headers = [ + 'appstream.h', + 'as-utils.h', + 'as-spdx.h', + 'as-metadata.h', + 'as-component.h', + 'as-pool.h', + 'as-enums.h', + 'as-provided.h', + 'as-bundle.h', + 'as-category.h', + 'as-distro-details.h', + 'as-screenshot.h', + 'as-image.h', + 'as-release.h', + 'as-checksum.h', + 'as-validator.h', + 'as-validator-issue.h', + 'as-icon.h', + 'as-translation.h', + 'as-suggested.h', + 'as-content-rating.h', + 'as-launchable.h', + 'as-relation.h' +] + +aslib_priv_headers = [ + 'as-utils-private.h', + 'as-context.h', + 'as-xml.h', + 'as-yaml.h', + 'as-variant-cache.h', + 'as-desktop-entry.h', + 'as-pool-private.h', + 'as-image-private.h', + 'as-component-private.h', + 'as-screenshot-private.h', + 'as-release-private.h', + 'as-distro-extras.h', + 'as-stemmer.h', + 'as-content-rating-private.h', + 'as-bundle-private.h', + 'as-checksum-private.h', + 'as-icon-private.h', + 'as-launchable-private.h', + 'as-relation-private.h' +] + +aslib_res = glib.compile_resources ( + 'as-resources', 'appstream.gresource.xml', + c_name : 'as', + source_dir : ['../data'] +) + +aslib_deps = [glib_dep, xml2_dep, yaml_dep, gobject_dep, gio_unix_dep] +if get_option ('stemming') + aslib_deps += [stemmer_lib] +endif + +appstream_lib = library ('appstream', + [aslib_src, + aslib_pub_headers, + aslib_priv_headers, + aslib_res], + soversion: as_api_level, + version: as_version, + dependencies: [aslib_deps], + include_directories: [stemmer_inc_dirs, + include_directories ('..')], + install: true +) + +pkgc.generate ( + version: as_version, + libraries: appstream_lib, + name: 'appstream', + description: 'Library to work with AppStream metadata.', + filebase: 'appstream', + subdirs: 'appstream', + requires: ['glib-2.0', 'gio-2.0'] +) + +install_headers(aslib_pub_headers, subdir: 'appstream') + +if get_option ('gir') + as_gir_typelib = glib.generate_gir ( + appstream_lib, + sources: aslib_src + aslib_pub_headers, + nsversion: '1.0', + namespace: 'AppStream', + symbol_prefix: 'as', + identifier_prefix: 'As', + export_packages: 'appstream', + includes: [ + 'GObject-2.0', + 'Gio-2.0' + ], + extra_args: ['--c-include=appstream.h'], + install: true + ) + + as_gir = as_gir_typelib[0] + as_typelib = as_gir_typelib[1] +endif diff -Nru appstream-0.9.4/src/xapian/asxentries.proto appstream-0.12.0/src/xapian/asxentries.proto --- appstream-0.9.4/src/xapian/asxentries.proto 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/xapian/asxentries.proto 1970-01-01 00:00:00.000000000 +0000 @@ -1,186 +0,0 @@ -package ASCache; -option optimize_for = LITE_RUNTIME; - -/** - * Urls: - * A list of urls, origin XML described at: - * http://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-url - */ -message Urls { - enum UrlType { - UNKNOWN = 0; - HOMEPAGE = 1; - BUGTRACKER = 2; - FAQ = 3; - HELP = 4; - DONATION = 5; - } - - message Url { - required UrlType type = 1 [default = UNKNOWN]; - required string url = 2; - } - - repeated Url url = 1; -} - -/** - * Bundles: - * A list of bundles, origin XML described at: - * http://www.freedesktop.org/software/appstream/docs/chap-DistroData.html#tag-distro-bundle - */ -message Bundles { - enum BundleType { - UNKNOWN = 0; - LIMBA = 1; - XDG_APP = 2; - } - - message Bundle { - required BundleType type = 1 [default = UNKNOWN]; - required string id = 2; - } - - repeated Bundle bundle = 1; -} - -/** - * Icons: - * A list of preprocessed, absolute icon urls. - * The definition of icons can be found at: - * http://www.freedesktop.org/software/appstream/docs/chap-DistroData.html#tag-distro-icon - * (we only care about the url-types here) - */ -message Icons { - enum IconType { - UNKNOWN = 0; - CACHED = 1; - REMOTE = 2; - } - - message Icon { - required IconType type = 1 [default = UNKNOWN]; - required int32 width = 2; - required int32 height = 3; - required string url = 4; - } - - repeated Icon icon = 1; -} - -/** - * Screenshots: - * A list of screenshot definitions, origin XML described at: - * http://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-screenshots - */ -message Screenshots { - message Image { - required bool source = 1 [default = false]; - required int32 width = 2; - required int32 height = 3; - required string url = 4; - } - - message Screenshot { - required bool primary = 1 [default = false]; - optional string caption = 2; - repeated Image image = 3; - } - - repeated Screenshot screenshot = 1; -} - -/** - * ProvidedItems: - * A list of provided items. We use the semicolon-separated provided-type - * serialization here. - * The definition of provided-items can be found at: - * http://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-provides - */ -message ProvidedItems { - // Keep ItemType aligned with AsProvidedKind - enum ItemType { - UNKNOWN = 0; - LIBRARY = 1; - BINARY = 2; - MIMETYPE = 3; - FONT = 4; - MODALIAS = 5; - PYTHON_2 = 6; - PYTHON = 7; - DBUS_SYSTEM = 8; - DBUS_USER = 9; - FIRMWARE_RUNTIME = 10; - FIRMWARE_FLASHED = 11; - } - - message Provided { - required ItemType type = 1 [default = UNKNOWN]; - repeated string item = 2; - } - - repeated Provided provided = 1; -} - -/** - * Languages: - * A list of localization information, origin XML described at: - * http://www.freedesktop.org/software/appstream/docs/chap-DistroData.html#tag-distro-languages - */ -message Languages { - message Language { - required string locale = 1; - required int32 percentage = 2 [default = 0]; - } - - repeated Language language = 1; -} - -/** - * Releases: - * A list of information about releases, origin XML described at: - * http://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-releases - */ -message Releases { - enum UrgencyType { - NOTSET = 0; // can't be UNKNOWN, since we can only have this valud once in this scope - LOW = 1; - MEDIUM = 2; - HIGH = 3; - CRITICAL = 4; - } - - enum ChecksumType { - NONE = 0; - SHA1 = 1; - SHA256 = 2; - } - - enum SizeType { - UNKNOWN = 0; - DOWNLOAD = 1; - INSTALLED = 2; - } - - message Checksum { - required ChecksumType type = 1 [default = NONE]; - required string value = 2; - } - - message Size { - required SizeType type = 1 [default = UNKNOWN]; - required int64 value = 2; - } - - message Release { - required string version = 1; - required int64 unix_timestamp = 2; - optional UrgencyType urgency = 3; - optional string description = 4; - repeated Checksum checksum = 5; - repeated string location = 6; - repeated Size size = 7; - } - - repeated Release release = 1; -} diff -Nru appstream-0.9.4/src/xapian/database-cwrap.cpp appstream-0.12.0/src/xapian/database-cwrap.cpp --- appstream-0.9.4/src/xapian/database-cwrap.cpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/xapian/database-cwrap.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* database-cwrap.cpp - * - * Copyright (C) 2012-2014 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include "database-read.hpp" -#include "database-write.hpp" -#include "database-cwrap.hpp" - -/* methods for database read access */ - -XADatabaseRead *xa_database_read_new () { return new DatabaseRead (); }; -void xa_database_read_free (XADatabaseRead *db) { delete realDbRead (db); }; - -gboolean -xa_database_read_open (XADatabaseRead *db, const gchar *db_path) -{ - return realDbRead (db)->open (db_path); -}; - -GPtrArray* -xa_database_read_get_all_components (XADatabaseRead *db) -{ - return realDbRead (db)->getAllComponents (); -}; - -GPtrArray* -xa_database_read_find_components (XADatabaseRead *db, const gchar *term, gchar **cats) -{ - return realDbRead (db)->findComponents (term, cats); -}; - -AsComponent* -xa_database_read_get_component_by_id (XADatabaseRead *db, const gchar *idname) -{ - return realDbRead (db)->getComponentById (idname); -}; - -GPtrArray* -xa_database_read_get_components_by_provides (XADatabaseRead *db, AsProvidedKind kind, const gchar *item) -{ - return realDbRead (db)->getComponentsByProvides (kind, item); -}; - -GPtrArray* -xa_database_read_get_components_by_kind (XADatabaseRead *db, AsComponentKind kinds) -{ - return realDbRead (db)->getComponentsByKind (kinds); -}; - -/* methods for database write access */ - -XADatabaseWrite *xa_database_write_new () { return new DatabaseWrite (); }; -void xa_database_write_free (XADatabaseWrite *db) { delete realDbWrite (db); }; - -gboolean -xa_database_write_initialize (XADatabaseWrite *db, const gchar *db_path) -{ - return realDbWrite (db)->initialize (db_path); -}; - -gboolean -xa_database_write_add_component (XADatabaseWrite *db, AsComponent *cpt) -{ - return realDbWrite (db)->addComponent (cpt); -}; - -gboolean -xa_database_write_rebuild (XADatabaseWrite *db, GList *cpt_list) -{ - return realDbWrite (db)->rebuild (cpt_list); -}; diff -Nru appstream-0.9.4/src/xapian/database-cwrap.hpp appstream-0.12.0/src/xapian/database-cwrap.hpp --- appstream-0.9.4/src/xapian/database-cwrap.hpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/xapian/database-cwrap.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -/* database-cwrap.hpp - * - * Copyright (C) 2012-2015 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#ifndef DATABASE_CWRAP_H -#define DATABASE_CWRAP_H - -#include -#include "../as-component.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct XADatabaseRead XADatabaseRead; -typedef struct XADatabaseWrite XADatabaseWrite; - -/* methods for database read access */ - -XADatabaseRead *xa_database_read_new (); -void xa_database_read_free (XADatabaseRead *db); - -gboolean xa_database_read_open (XADatabaseRead *db, - const gchar *db_path); -GPtrArray *xa_database_read_get_all_components (XADatabaseRead *db); -GPtrArray *xa_database_read_find_components (XADatabaseRead *db, - const gchar *term, - gchar **cats); -AsComponent *xa_database_read_get_component_by_id (XADatabaseRead *db, - const gchar *idname); -GPtrArray *xa_database_read_get_components_by_provides (XADatabaseRead *db, - AsProvidedKind kind, - const gchar *item); -GPtrArray *xa_database_read_get_components_by_kind (XADatabaseRead *db, - AsComponentKind kinds); - -/* methods for database write access */ - -XADatabaseWrite *xa_database_write_new (); -void xa_database_write_free (XADatabaseWrite *db); - -gboolean xa_database_write_initialize (XADatabaseWrite *db, - const gchar *db_path); -gboolean xa_database_write_add_component (XADatabaseWrite *db, - AsComponent *cpt); -gboolean xa_database_write_rebuild (XADatabaseWrite *db, - GList *cpt_list); - -#ifdef __cplusplus -}; -#endif - -#endif /* DATABASE_CWRAP_H */ diff -Nru appstream-0.9.4/src/xapian/database-read.cpp appstream-0.12.0/src/xapian/database-read.cpp --- appstream-0.9.4/src/xapian/database-read.cpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/xapian/database-read.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,637 +0,0 @@ -/* database-read.cpp - * - * Copyright (C) 2012-2014 Matthias Klumpp - * Copyright (C) 2009 Michael Vogt - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include "database-read.hpp" - -#include -#include -#include -#include -#include -#include - -#include "database-schema.hpp" -#include "../as-menu-parser.h" -#include "../as-component-private.h" - -using namespace std; -using namespace ASCache; - -DatabaseRead::DatabaseRead () : - m_dbPath("") -{ - -} - -DatabaseRead::~DatabaseRead () -{ - m_xapianDB.close (); -} - -bool -DatabaseRead::open (const gchar *dbPath) -{ - m_dbPath = dbPath; - - try { - m_xapianDB = Xapian::Database (m_dbPath); - } catch (const Xapian::Error &error) { - g_warning ("Exception: %s", error.get_msg ().c_str ()); - return false; - } - - m_dbLocale = m_xapianDB.get_metadata ("db-locale"); - if (m_dbLocale.empty ()) - m_dbLocale = "C"; - - try { - m_schemaVersion = stoi (m_xapianDB.get_metadata ("db-schema-version")); - } catch (...) { - g_warning ("Unable to read database schema version, assuming 0."); - m_schemaVersion = 0; - } - - if (m_schemaVersion != AS_DB_SCHEMA_VERSION) { - g_warning ("Attempted to open an old version of the AppStream cache. Please refresh the cache and try again!"); - return false; - } - - return true; -} - -int -DatabaseRead::getSchemaVersion () -{ - return m_schemaVersion; -} - -string -DatabaseRead::getLocale () -{ - return m_dbLocale; -} - -AsComponent* -DatabaseRead::docToComponent (Xapian::Document doc) -{ - AsComponent *cpt = as_component_new (); - string str; - - /* set component active languge (which is the locale the database was built for) */ - as_component_set_active_locale (cpt, m_dbLocale.c_str ()); - - // Component type/kind - string type_str = doc.get_value (XapianValues::TYPE); - as_component_set_kind (cpt, as_component_kind_from_string (type_str.c_str ())); - - // Identifier - string id_str = doc.get_value (XapianValues::IDENTIFIER); - as_component_set_id (cpt, id_str.c_str ()); - - // Component name - string cptName = doc.get_value (XapianValues::CPTNAME); - if (!cptName.empty ()) - as_component_set_name (cpt, cptName.c_str (), NULL); - cptName = doc.get_value (XapianValues::CPTNAME_UNTRANSLATED); - if (!cptName.empty ()) - as_component_set_name (cpt, cptName.c_str (), "C"); - - // Package name - string pkgNamesStr = doc.get_value (XapianValues::PKGNAMES); - if (!pkgNamesStr.empty ()) { - g_auto(GStrv) pkgs = g_strsplit (pkgNamesStr.c_str (), ";", -1); - as_component_set_pkgnames (cpt, pkgs); - } - - // Source package name - string cptSPkg = doc.get_value (XapianValues::SOURCE_PKGNAME); - if (!cptSPkg.empty ()) - as_component_set_source_pkgname (cpt, cptSPkg.c_str ()); - - // Origin - string cptOrigin = doc.get_value (XapianValues::ORIGIN); - if (!cptOrigin.empty ()) - as_component_set_origin (cpt, cptOrigin.c_str ()); - - // Bundles - Bundles bundles; - str = doc.get_value (XapianValues::BUNDLES); - bundles.ParseFromString (str); - for (int i = 0; i < bundles.bundle_size (); i++) { - const Bundles_Bundle& bdl = bundles.bundle (i); - AsBundleKind bkind = (AsBundleKind) bdl.type (); - if (bkind != AS_BUNDLE_KIND_UNKNOWN) - as_component_add_bundle_id (cpt, bkind, bdl.id ().c_str ()); - } - - // Extends - string extendsStr = doc.get_value (XapianValues::EXTENDS); - if (!extendsStr.empty ()) { - g_auto(GStrv) extends = g_strsplit (extendsStr.c_str (), ";", -1); - for (uint i = 0; extends[i] != NULL; i++) { - as_component_add_extends (cpt, extends[i]); - } - } - - // Extensions - string extsStr = doc.get_value (XapianValues::EXTENSIONS); - if (!extsStr.empty ()) { - g_auto(GStrv) exts = g_strsplit (extsStr.c_str (), ";", -1); - for (uint i = 0; exts[i] != NULL; i++) { - as_component_add_extension (cpt, exts[i]); - } - } - - // URLs - Urls urls; - str = doc.get_value (XapianValues::URLS); - urls.ParseFromString (str); - for (int i = 0; i < urls.url_size (); i++) { - const Urls_Url& url = urls.url (i); - AsUrlKind ukind = (AsUrlKind) url.type (); - if (ukind != AS_URL_KIND_UNKNOWN) - as_component_add_url (cpt, ukind, url.url ().c_str ()); - } - - // Icons - Icons icons; - str = doc.get_value (XapianValues::ICONS); - icons.ParseFromString (str); - for (int i = 0; i < icons.icon_size (); i++) { - const Icons_Icon& pbIcon = icons.icon (i); - - AsIcon *icon = as_icon_new (); - as_icon_set_width (icon, pbIcon.width ()); - as_icon_set_height (icon, pbIcon.height ()); - - if (pbIcon.type () == Icons_IconType_REMOTE) { - as_icon_set_kind (icon, AS_ICON_KIND_REMOTE); - as_icon_set_url (icon, pbIcon.url ().c_str ()); - } else { - as_icon_set_kind (icon, AS_ICON_KIND_CACHED); - as_icon_set_filename (icon, pbIcon.url ().c_str ()); - } - as_component_add_icon (cpt, icon); - g_object_unref (icon); - } - - // Summary - string cptSummary = doc.get_value (XapianValues::SUMMARY); - if (!cptSummary.empty ()) - as_component_set_summary (cpt, cptSummary.c_str (), NULL); - - // Long description - string cptDescription = doc.get_value (XapianValues::DESCRIPTION); - if (!cptDescription.empty ()) - as_component_set_description (cpt, cptDescription.c_str (), NULL); - - // Categories - string categories_str = doc.get_value (XapianValues::CATEGORIES); - if (!categories_str.empty ()) - as_component_set_categories_from_str (cpt, categories_str.c_str ()); - - // Provided items - ASCache::ProvidedItems pbPI; - str = doc.get_value (XapianValues::PROVIDED_ITEMS); - pbPI.ParseFromString (str); - for (int i = 0; i < pbPI.provided_size (); i++) { - const ProvidedItems_Provided& pbProv = pbPI.provided (i); - - AsProvided *prov = as_provided_new (); - as_provided_set_kind (prov, (AsProvidedKind) pbProv.type ()); - - for (int j = 0; j < pbProv.item_size (); j++) { - const string& item = pbProv.item (j); - as_provided_add_item (prov, item.c_str ()); - } - - as_component_add_provided (cpt, prov); - } - - // Screenshot data - Screenshots screenshots; - str = doc.get_value (XapianValues::SCREENSHOTS); - screenshots.ParseFromString (str); - for (int i = 0; i < screenshots.screenshot_size (); i++) { - const Screenshots_Screenshot& pb_scr = screenshots.screenshot (i); - AsScreenshot *scr = as_screenshot_new (); - as_screenshot_set_active_locale (scr, m_dbLocale.c_str ()); - - if (pb_scr.primary ()) - as_screenshot_set_kind (scr, AS_SCREENSHOT_KIND_DEFAULT); - else - as_screenshot_set_kind (scr, AS_SCREENSHOT_KIND_EXTRA); - - if (pb_scr.has_caption ()) - as_screenshot_set_caption (scr, pb_scr.caption ().c_str (), NULL); - - for (int j = 0; j < pb_scr.image_size (); j++) { - const Screenshots_Image& pb_img = pb_scr.image (j); - AsImage *img = as_image_new (); - - if (pb_img.source ()) { - as_image_set_kind (img, AS_IMAGE_KIND_SOURCE); - } else { - as_image_set_kind (img, AS_IMAGE_KIND_THUMBNAIL); - } - - as_image_set_width (img, pb_img.width ()); - as_image_set_height (img, pb_img.height ()); - as_image_set_url (img, pb_img.url ().c_str ()); - - as_screenshot_add_image (scr, img); - g_object_unref (img); - } - - as_component_add_screenshot (cpt, scr); - g_object_unref (scr); - } - - // Compulsory-for-desktop information - string compulsory_str = doc.get_value (XapianValues::COMPULSORY_FOR); - if (!compulsory_str.empty ()) { - g_auto(GStrv) strv = NULL; - strv = g_strsplit (compulsory_str.c_str (), ";", -1); - as_component_set_compulsory_for_desktops (cpt, strv); - } - - // License - string license = doc.get_value (XapianValues::LICENSE); - if (!license.empty ()) - as_component_set_project_license (cpt, license.c_str ()); - - // Project group - string projectGroup = doc.get_value (XapianValues::PROJECT_GROUP); - if (!projectGroup.empty ()) - as_component_set_project_group (cpt, projectGroup.c_str ()); - - // Source package name - string developerName = doc.get_value (XapianValues::DEVELOPER_NAME); - if (!developerName.empty ()) - as_component_set_developer_name (cpt, developerName.c_str (), NULL); - - // Releases data - Releases pb_rels; - str = doc.get_value (XapianValues::RELEASES); - pb_rels.ParseFromString (str); - for (int i = 0; i < pb_rels.release_size (); i++) { - const Releases_Release& pb_rel = pb_rels.release (i); - AsRelease *rel = as_release_new (); - as_release_set_active_locale (rel, m_dbLocale.c_str ()); - - as_release_set_version (rel, pb_rel.version ().c_str ()); - as_release_set_timestamp (rel, pb_rel.unix_timestamp ()); - if (pb_rel.has_urgency ()) - as_release_set_urgency (rel, (AsUrgencyKind) pb_rel.urgency ()); - - if (pb_rel.has_description ()) - as_release_set_description (rel, pb_rel.description ().c_str (), NULL); - - // load locations - for (int j = 0; j < pb_rel.location_size (); j++) - as_release_add_location (rel, pb_rel.location (j).c_str ()); - - // load checksums - for (int j = 0; j < pb_rel.checksum_size (); j++) { - const Releases_Checksum& pb_cs = pb_rel.checksum (j); - AsChecksumKind cskind = (AsChecksumKind) pb_cs.type (); - - if (cskind >= AS_CHECKSUM_KIND_LAST) { - g_warning ("Found invalid release-checksum type in database for component '%s'", id_str.c_str ()); - continue; - } - as_release_set_checksum (rel, pb_cs.value ().c_str (), cskind); - } - - // load sizes - for (int j = 0; j < pb_rel.size_size (); j++) { - const Releases_Size& pb_s = pb_rel.size (j); - AsSizeKind skind = (AsSizeKind) pb_s.type (); - - if (skind >= AS_SIZE_KIND_LAST) { - g_warning ("Found invalid release-size type in database for component '%s'", id_str.c_str ()); - continue; - } - as_release_set_size (rel, pb_s.value (), skind); - } - - as_component_add_release (cpt, rel); - g_object_unref (rel); - } - - // Languages - Languages langs; - str = doc.get_value (XapianValues::LANGUAGES); - langs.ParseFromString (str); - for (int i = 0; i < langs.language_size (); i++) { - const Languages_Language& lang = langs.language (i); - - as_component_add_language (cpt, - lang.locale ().c_str (), - lang.percentage ()); - } - - // TODO: Read out keywords? - actually not necessary, since they're already in the database and used by the search engine - // or do we really need to know what the defined keywords have been for each component? - - return cpt; -} - -static vector &split(const string &s, char delim, vector &elems) -{ - std::stringstream ss(s); - std::string item; - while(std::getline(ss, item, delim)) { - elems.push_back(item); - } - return elems; -} - -static vector split (const string &s, char delim) { - std::vector elems; - return split (s, delim, elems); -} - -Xapian::QueryParser -DatabaseRead::newAppStreamParser () -{ - Xapian::QueryParser xapian_parser = Xapian::QueryParser (); - xapian_parser.set_database (m_xapianDB); - xapian_parser.add_boolean_prefix ("id", "AI"); - xapian_parser.add_boolean_prefix ("pkg", "AP"); - xapian_parser.add_boolean_prefix ("provides", "AE"); - xapian_parser.add_boolean_prefix ("section", "XS"); - xapian_parser.add_prefix ("pkg_wildcard", "XP"); - xapian_parser.add_prefix ("pkg_wildcard", "AP"); - xapian_parser.set_default_op (Xapian::Query::OP_AND); - return xapian_parser; -} - -/** - * Helper method that adds the current category to the query - */ -Xapian::Query -DatabaseRead::addCategoryToQuery (Xapian::Query query, Xapian::Query category_query) -{ - if (category_query.empty ()) - return query; - - return Xapian::Query (Xapian::Query::OP_AND, - category_query, - query); -} - -/** - * Return a Xapian query that matches exactly the list of pkgnames - */ -Xapian::Query -DatabaseRead::getQueryForPkgNames (vector pkgnames) -{ - Xapian::Query query = Xapian::Query (); - - for (vector::iterator it = pkgnames.begin(); it != pkgnames.end(); ++it) { - query = Xapian::Query (Xapian::Query::OP_OR, - query, - Xapian::Query ("XP" + *it)); - query = Xapian::Query (Xapian::Query::OP_OR, - query, - Xapian::Query ("AP" + *it)); - } - - return query; -} - -Xapian::Query -DatabaseRead::getQueryForCategory (gchar *cat_id) -{ - string catid_lower = cat_id; - transform (catid_lower.begin (), catid_lower.end (), - catid_lower.begin (), ::tolower); - return Xapian::Query("AC" + catid_lower); -} - -/** - * Get Xapian::Query from a search term string and a limit the - * search to the given category - */ -vector -DatabaseRead::queryListForTermCats (const gchar *term, gchar **categories) -{ - // prepare search-term - bool globalSearch = false; - string search_term = term == NULL ? "" : term; - if (categories == NULL) - globalSearch = true; - - // generate category query (if we are not searching globally in all categories) - Xapian::Query category_query = Xapian::Query (); - if (not globalSearch) { - for (uint i = 0; categories[i] != NULL; i++) { - gchar *cat_id = categories[i]; - - category_query = Xapian::Query (Xapian::Query::OP_OR, - category_query, - getQueryForCategory (cat_id)); - } - } - - // empty query returns a query that matches nothing (for performance - // reasons) - // We caught the "both criteria zero" case way earlier, so this is just additional safety. - if ((search_term.compare ("") == 0) && (globalSearch)) { - Xapian::Query vv[2] = { Xapian::Query(), Xapian::Query () }; - vector res(&vv[0], &vv[0]+2); - return res; - } - - // we cheat and return a match-all query for single letter searches - if (search_term.length () < 2) { - Xapian::Query allQuery = addCategoryToQuery (Xapian::Query (""), category_query); - // NOTE: I want C++11! - Xapian::Query vv[2] = { allQuery, allQuery }; - vector res(&vv[0], &vv[0]+2); - return res; - } - - // get a pkg query - Xapian::Query pkg_query = Xapian::Query (); - if (search_term.find (",") != string::npos) { - pkg_query = getQueryForPkgNames (split (search_term, ',')); - } else { - vector terms = split (search_term, '\n'); - for (vector::iterator it = terms.begin(); it != terms.end(); ++it) { - pkg_query = Xapian::Query (Xapian::Query::OP_OR, - Xapian::Query("XP" + *it), - pkg_query); - } - } - pkg_query = addCategoryToQuery (pkg_query, category_query); - - // get a search query - if (search_term.find (":") == string::npos) { // ie, not a mimetype query - // we need this to work around xapian oddness - replace (search_term.begin(), search_term.end(), '-', '_'); - } - - Xapian::QueryParser parser = newAppStreamParser (); - Xapian::Query fuzzy_query = parser.parse_query (search_term, - Xapian::QueryParser::FLAG_PARTIAL | - Xapian::QueryParser::FLAG_BOOLEAN); - // if the query size goes out of hand, omit the FLAG_PARTIAL - // (LP: #634449) - if (fuzzy_query.get_length () > 1000) - fuzzy_query = parser.parse_query(search_term, - Xapian::QueryParser::FLAG_BOOLEAN); - // now add categories - fuzzy_query = addCategoryToQuery (fuzzy_query, category_query); - - Xapian::Query vv[2] = { pkg_query, fuzzy_query }; - vector res(&vv[0], &vv[0]+2); - return res; -} - -void -DatabaseRead::appendSearchResults (Xapian::Enquire enquire, GPtrArray *cptArray) -{ - Xapian::MSet matches = enquire.get_mset (0, m_xapianDB.get_doccount ()); - for (Xapian::MSetIterator it = matches.begin(); it != matches.end(); ++it) { - Xapian::Document doc = it.get_document (); - - AsComponent *cpt = docToComponent (doc); - g_ptr_array_add (cptArray, g_object_ref (cpt)); - } -} - -GPtrArray* -DatabaseRead::findComponents (const gchar *term, gchar **cats) -{ - // Create new array to store the AsComponent objects - GPtrArray *cptArray = g_ptr_array_new_with_free_func (g_object_unref); - - // "normal" query - auto qlist = queryListForTermCats (term, cats); - Xapian::Query query = qlist[0]; - query.serialise (); - - Xapian::Enquire enquire = Xapian::Enquire (m_xapianDB); - enquire.set_query (query); - appendSearchResults (enquire, cptArray); - - // do fuzzy query if we got no results - if (cptArray->len == 0) { - query = qlist[1]; - query.serialise (); - - enquire = Xapian::Enquire (m_xapianDB); - enquire.set_query (query); - appendSearchResults (enquire, cptArray); - } - - return cptArray; -} - -GPtrArray* -DatabaseRead::getAllComponents () -{ - // Create new array to store the app-info objects - GPtrArray *appArray = g_ptr_array_new_with_free_func (g_object_unref); - - // Iterate through all Xapian documents - Xapian::PostingIterator it = m_xapianDB.postlist_begin (string()); - while (it != m_xapianDB.postlist_end(string())) { - Xapian::docid did = *it; - - Xapian::Document doc = m_xapianDB.get_document (did); - AsComponent *app = docToComponent (doc); - g_ptr_array_add (appArray, g_object_ref (app)); - - ++it; - } - - return appArray; -} - -AsComponent* -DatabaseRead::getComponentById (const gchar *idname) -{ - Xapian::Query id_query = Xapian::Query (Xapian::Query::OP_OR, - Xapian::Query("AI" + string(idname)), - Xapian::Query ()); - id_query.serialise (); - - Xapian::Enquire enquire = Xapian::Enquire (m_xapianDB); - enquire.set_query (id_query); - - Xapian::MSet matches = enquire.get_mset (0, m_xapianDB.get_doccount ()); - if (matches.size () > 1) { - g_warning ("Found more than one component with id '%s'! Returning the first one.", idname); - } - if (matches.size () <= 0) - return NULL; - - Xapian::Document doc = matches[matches.get_firstitem ()].get_document (); - AsComponent *cpt = docToComponent (doc); - - return cpt; -} - -GPtrArray* -DatabaseRead::getComponentsByProvides (AsProvidedKind kind, const gchar *item) -{ - /* Create new array to store the AsComponent objects */ - GPtrArray *cptArray = g_ptr_array_new_with_free_func (g_object_unref); - - Xapian::Query item_query; - gchar *element_id; - element_id = g_strdup_printf ("%s;%s", - as_provided_kind_to_string (kind), - item); - item_query = Xapian::Query (Xapian::Query::OP_OR, - Xapian::Query("AE" + string(element_id)), - Xapian::Query ()); - g_free (element_id); - - item_query.serialise (); - - Xapian::Enquire enquire = Xapian::Enquire (m_xapianDB); - enquire.set_query (item_query); - appendSearchResults (enquire, cptArray); - - return cptArray; -} - -GPtrArray* -DatabaseRead::getComponentsByKind (AsComponentKind kind) -{ - GPtrArray *cptArray = g_ptr_array_new_with_free_func (g_object_unref); - - auto kind_query = Xapian::Query (Xapian::Query::OP_OR, - Xapian::Query("AT" + string(as_component_kind_to_string (kind))), - Xapian::Query()); - - kind_query.serialise (); - - Xapian::Enquire enquire = Xapian::Enquire (m_xapianDB); - enquire.set_query (kind_query); - appendSearchResults (enquire, cptArray); - - return cptArray; -} diff -Nru appstream-0.9.4/src/xapian/database-read.hpp appstream-0.12.0/src/xapian/database-read.hpp --- appstream-0.9.4/src/xapian/database-read.hpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/xapian/database-read.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* database-read.hpp - * - * Copyright (C) 2012-2014 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#ifndef DATABASE_READ_H -#define DATABASE_READ_H - -#include -#include -#include -#include -#include - -#include "../as-component.h" - -using namespace std; - -/* small hack to make C++ to C binding easier */ -struct G_GNUC_INTERNAL XADatabaseRead {}; - -class G_GNUC_INTERNAL DatabaseRead : public XADatabaseRead -{ -public: - explicit DatabaseRead (); - ~DatabaseRead (); - - bool open (const gchar *dbPath); - - int getSchemaVersion (); - string getLocale (); - - GPtrArray *getAllComponents (); - GPtrArray *findComponents (const gchar *term, gchar **cats); - AsComponent *getComponentById (const gchar *idname); - GPtrArray *getComponentsByProvides (AsProvidedKind kind, const gchar *item); - GPtrArray *getComponentsByKind (AsComponentKind kinds); - -private: - Xapian::Database m_xapianDB; - string m_dbPath; - string m_dbLocale; - int m_schemaVersion; - - AsComponent *docToComponent (Xapian::Document); - - Xapian::QueryParser newAppStreamParser (); - Xapian::Query addCategoryToQuery (Xapian::Query query, Xapian::Query category_query); - Xapian::Query getQueryForPkgNames (vector pkgnames); - Xapian::Query getQueryForCategory (gchar *cat_id); - void appendSearchResults (Xapian::Enquire enquire, GPtrArray *cptArray); - vector queryListForTermCats (const gchar *term, gchar **categories); -}; - -G_GNUC_INTERNAL -inline DatabaseRead* realDbRead (XADatabaseRead* d) { return static_cast(d); } - -#endif // DATABASE_READ_H diff -Nru appstream-0.9.4/src/xapian/database-schema.hpp appstream-0.12.0/src/xapian/database-schema.hpp --- appstream-0.9.4/src/xapian/database-schema.hpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/xapian/database-schema.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -/* database-schema.hpp -- Common specs for AppStream Xapian database - * - * Copyright (C) 2012-2015 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include "asxentries.pb.h" - -#ifndef DATABASE_SCHEMA_H -#define DATABASE_SCHEMA_H - -namespace ASCache { - -// database schema version -static const int AS_DB_SCHEMA_VERSION = 2; - -// values used in the database -namespace XapianValues { - -enum XapianValues { - TYPE = 100, - IDENTIFIER = 101, - CPTNAME = 120, - CPTNAME_UNTRANSLATED = 121, - PKGNAMES = 122, // semicolon-separated list of strings - SOURCE_PKGNAME = 123, - BUNDLES = 124, // protobuf serialization: Bundles - EXTENDS = 125, // semicolon-separated list of strings - EXTENSIONS = 126, // semicolon-separated list of strings - - SUMMARY = 130, - DESCRIPTION = 131, - CATEGORIES = 132, // semicolon-separated list of strings - - ICONS = 133, // protobuf serialization: Icons - - PROVIDED_ITEMS = 140, // protobuf serialization: ProvidedItems - SCREENSHOTS = 141, // protobuf serialization: Screenshots - RELEASES = 142, // protobuf serialization: Releases - - LICENSE = 150, - URLS = 151, // protobuf serialization: Urls - - PROJECT_GROUP = 160, - DEVELOPER_NAME = 161, - - COMPULSORY_FOR = 170, // semicolon-separated list of strings - LANGUAGES = 171, // protobuf serialization: Languages - - ORIGIN = 180, - -//! GETTEXT_DOMAIN = 180, -//! ARCHIVE_SECTION = 181, -//! ARCHIVE_CHANNEL = 182 -}; - -}; - -// weights for the different fields -static const int WEIGHT_DESKTOP_NAME = 10; -static const int WEIGHT_DESKTOP_KEYWORD = 5; -static const int WEIGHT_DESKTOP_GENERICNAME = 3; -static const int WEIGHT_DESKTOP_SUMMARY = 1; - -static const int WEIGHT_PKGNAME = 8; -static const int WEIGHT_SUMMARY = 5; -static const int WEIGHT_PK_DESCRIPTION = 1; - -} // End of namespace: ASCache - -#endif // DATABASE_SCHEMA_H diff -Nru appstream-0.9.4/src/xapian/database-write.cpp appstream-0.12.0/src/xapian/database-write.cpp --- appstream-0.9.4/src/xapian/database-write.cpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/xapian/database-write.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,567 +0,0 @@ -/* database-write.cpp - * - * Copyright (C) 2012-2014 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include "database-write.hpp" - -#include -#include -#include -#include -#include -#include -#include - -#include "database-schema.hpp" -#include "../as-utils.h" -#include "../as-utils-private.h" -#include "../as-component-private.h" -#include "../as-settings-private.h" - -using namespace std; -using namespace ASCache; - -DatabaseWrite::DatabaseWrite () : - m_rwXapianDB(nullptr) -{ -} - -DatabaseWrite::~DatabaseWrite () -{ - if (m_rwXapianDB) { - m_rwXapianDB->close (); - delete m_rwXapianDB; - } -} - -bool -DatabaseWrite::initialize (const gchar *dbPath) -{ - m_dbPath = string(dbPath); - - try { - m_rwXapianDB = new Xapian::WritableDatabase (m_dbPath, - Xapian::DB_CREATE_OR_OPEN); - } catch (const Xapian::Error &error) { - g_warning ("Exception: %s", error.get_msg ().c_str ()); - return false; - } - - return true; -} - -/** - * Helper function to serialize language completion information for storage in the database - */ -static void -langs_hashtable_to_langentry (gchar *key, gint value, Languages *pb_langs) -{ - Languages_Language *pb_lang = pb_langs->add_language (); - pb_lang->set_locale (key); - pb_lang->set_percentage (value); -} - -/** - * Helper function to serialize bundle data for storage in the database - */ -static void -bundles_hashtable_to_bundleentry (gpointer bkind_ptr, gchar *value, Bundles *bundles) -{ - AsBundleKind bkind = (AsBundleKind) GPOINTER_TO_INT (bkind_ptr); - - Bundles_Bundle *bdl = bundles->add_bundle (); - bdl->set_type ((Bundles_BundleType) bkind); - bdl->set_id (value); -} - -/** - * Helper function to serialize urls for storage in the database - */ -static void -urls_hashtable_to_urlentry (gpointer ukind_ptr, gchar *value, Urls *urls) -{ - AsUrlKind ukind = (AsUrlKind) GPOINTER_TO_INT (ukind_ptr); - - Urls_Url *url = urls->add_url (); - url->set_type ((Urls_UrlType) ukind); - url->set_url (value); -} - -/** - * Helper function to serialize AsImage instances for storage in the database - */ -static void -images_array_to_imageentry (AsImage *img, Screenshots_Screenshot *pb_sshot) -{ - Screenshots_Image *pb_img; - - pb_img = pb_sshot->add_image (); - pb_img->set_url (as_image_get_url (img)); - - if (as_image_get_kind (img) == AS_IMAGE_KIND_THUMBNAIL) - pb_img->set_source (false); - else - pb_img->set_source (true); - - if ((as_image_get_width (img) > 0) && (as_image_get_height (img) > 0)) { - pb_img->set_width (as_image_get_width (img)); - pb_img->set_height (as_image_get_height (img)); - } -} - -/** - * Turn a GPtrArray (containing C strings) into a semicolon-separated list - * of strings as sdt__string - */ -static string -ptrarray_to_semicolon_str (GPtrArray *array) -{ - if (array == NULL) - return string(); - if (array->len == 0) - return string(); - - ostringstream res_sstr; - for (uint i = 0; i < array->len; i++) { - const gchar *acstr = (const gchar*) g_ptr_array_index (array, i); - if (i == array->len-1) - res_sstr << acstr; - else - res_sstr << acstr << ";"; - } - - return res_sstr.str (); -} - -/** - * Recreate the database from a given component list. - */ -bool -DatabaseWrite::rebuild (GList *cpt_list) -{ - string old_path = m_dbPath + "_old"; - string rebuild_path = m_dbPath + "_rb"; - string db_locale; - - // Create the rebuild directory - if (g_mkdir_with_parents (rebuild_path.c_str (), 0755) != 0) { - g_warning ("Unable to create database rebuild directory."); - return false; - } - - // check if old unrequired version of db still exists on filesystem - if (g_file_test (old_path.c_str (), G_FILE_TEST_EXISTS)) { - g_warning ("Existing xapian old db was not cleaned previously: '%s'.", old_path.c_str ()); - as_utils_delete_dir_recursive (old_path.c_str ()); - } - - // check if old unrequired version of db still exists on filesystem - if (g_file_test (rebuild_path.c_str (), G_FILE_TEST_EXISTS)) { - g_debug ("Removing old rebuild-dir from previous database rebuild."); - as_utils_delete_dir_recursive (rebuild_path.c_str ()); - } - - Xapian::WritableDatabase db (rebuild_path, Xapian::DB_CREATE_OR_OVERWRITE); - - Xapian::TermGenerator term_generator; - term_generator.set_database(db); - try { - /* this tests if we have spelling suggestions (there must be - * a better way?!?) - this is needed as inmemory does not have - * spelling corrections, but it allows setting the flag and will - * raise a exception much later - */ - db.add_spelling ("test"); - db.remove_spelling ("test"); - - /* this enables the flag for it (we only reach this line if - * the db supports spelling suggestions) - */ - term_generator.set_flags (Xapian::TermGenerator::FLAG_SPELLING); - } catch (const Xapian::UnimplementedError &error) { - // Ignore - } - - for (GList *list = cpt_list; list != NULL; list = list->next) { - AsComponent *cpt = (AsComponent*) list->data; - - // Sanity check - if (!as_component_is_valid (cpt)) { - // we should *never* get here, all invalid stuff should be filtered out at this point - g_critical ("Skipped component '%s' from inclusion into database: The component is invalid.", - as_component_get_id (cpt)); - continue; - } - - // Prepare document - Xapian::Document doc; - term_generator.set_document (doc); - - string cid = as_component_get_id (cpt); - doc.set_data (as_component_get_name (cpt)); - - // Package name - gchar **pkgs = as_component_get_pkgnames (cpt); - if (pkgs != NULL) { - gchar *pkgs_cstr = g_strjoinv (";", pkgs); - string pkgs_str = pkgs_cstr; - doc.add_value (XapianValues::PKGNAMES, pkgs_str); - g_free (pkgs_cstr); - - for (uint i = 0; pkgs[i] != NULL; i++) { - string pkgname = pkgs[i]; - doc.add_term("AP" + pkgname); - if (pkgname.find ("-") != string::npos) { - // we need this to work around xapian oddness - string tmp = pkgname; - replace (tmp.begin (), tmp.end (), '-', '_'); - doc.add_term (tmp); - } - // add packagename as meta-data too - term_generator.index_text_without_positions (pkgname, WEIGHT_PKGNAME); - } - } - - // Source package name - const gchar *spkgname_cstr = as_component_get_source_pkgname (cpt); - if (spkgname_cstr != NULL) { - string spkgname = spkgname_cstr; - doc.add_value (XapianValues::SOURCE_PKGNAME, spkgname); - if (!spkgname.empty()) { - doc.add_term("AP" + spkgname); - if (spkgname.find ("-") != string::npos) { - // we need this to work around xapian oddness - string tmp = spkgname; - replace (tmp.begin (), tmp.end (), '-', '_'); - doc.add_term (tmp); - } - // add packagename as meta-data too - term_generator.index_text_without_positions (spkgname, WEIGHT_PKGNAME); - } - } - - // Type identifier - string type_str = as_component_kind_to_string (as_component_get_kind (cpt)); - doc.add_value (XapianValues::TYPE, type_str); - doc.add_term ("AT" + type_str); - - // Identifier - doc.add_value (XapianValues::IDENTIFIER, cid); - doc.add_term("AI" + cid); - term_generator.index_text_without_positions (cid, WEIGHT_PKGNAME); - - // Origin - const gchar *cptOrigin = as_component_get_origin (cpt); - if (cptOrigin != NULL) - doc.add_value (XapianValues::ORIGIN, cptOrigin); - - // Bundles - Bundles bundles; - GHashTable *bundle_ids = as_component_get_bundles_table (cpt); - if (g_hash_table_size (bundle_ids) > 0) { - string ostr; - g_hash_table_foreach (bundle_ids, - (GHFunc) bundles_hashtable_to_bundleentry, - &bundles); - if (bundles.SerializeToString (&ostr)) - doc.add_value (XapianValues::BUNDLES, ostr); - } - - // Component name - const gchar *cptName = as_component_get_name (cpt); - if (cptName != NULL) - doc.add_value (XapianValues::CPTNAME, cptName); - - // Untranslated component name - string clocale = as_component_get_active_locale (cpt)? as_component_get_active_locale (cpt) : ""; - as_component_set_active_locale (cpt, "C"); - - const gchar *cptNameGeneric = as_component_get_name (cpt); - if (cptNameGeneric != NULL) { - doc.add_value (XapianValues::CPTNAME_UNTRANSLATED, cptNameGeneric); - term_generator.index_text_without_positions (cptNameGeneric, WEIGHT_DESKTOP_GENERICNAME); - } - - if (clocale.empty ()) - as_component_set_active_locale (cpt, NULL); - else - as_component_set_active_locale (cpt, clocale.c_str()); - - // Extends - GPtrArray *extends = as_component_get_extends (cpt); - doc.add_value (XapianValues::EXTENDS, ptrarray_to_semicolon_str (extends)); - - // Extensions - GPtrArray *exts = as_component_get_extensions (cpt); - doc.add_value (XapianValues::EXTENSIONS, ptrarray_to_semicolon_str (exts)); - - // URLs - GHashTable *urls_table; - urls_table = as_component_get_urls_table (cpt); - if (g_hash_table_size (urls_table) > 0) { - Urls urls; - string ostr; - - g_hash_table_foreach (urls_table, - (GHFunc) urls_hashtable_to_urlentry, - &urls); - if (urls.SerializeToString (&ostr)) - doc.add_value (XapianValues::URLS, ostr); - } - - // Icons - GPtrArray *icons = as_component_get_icons (cpt); - Icons pbIcons; - for (uint i = 0; i < icons->len; i++) { - AsIcon *icon = AS_ICON (g_ptr_array_index (icons, i)); - - Icons_Icon *pbIcon = pbIcons.add_icon (); - pbIcon->set_width (as_icon_get_width (icon)); - pbIcon->set_height (as_icon_get_height (icon)); - - if (as_icon_get_kind (icon) == AS_ICON_KIND_REMOTE) { - pbIcon->set_type (Icons_IconType_REMOTE); - pbIcon->set_url (as_icon_get_url (icon)); - } else { - /* TODO: Properly support STOCK and LOCAL icons */ - pbIcon->set_type (Icons_IconType_CACHED); - pbIcon->set_url (as_icon_get_filename (icon)); - } - } - string icons_ostr; - if (pbIcons.SerializeToString (&icons_ostr)) - doc.add_value (XapianValues::ICONS, icons_ostr); - - - // Summary - const gchar *cptSummary = as_component_get_summary (cpt); - if (cptSummary != NULL) { - doc.add_value (XapianValues::SUMMARY, cptSummary); - term_generator.index_text_without_positions (cptSummary, WEIGHT_DESKTOP_SUMMARY); - } - - // Long description - const gchar *description = as_component_get_description (cpt); - if (description != NULL) { - doc.add_value (XapianValues::DESCRIPTION, description); - term_generator.index_text_without_positions (description, WEIGHT_DESKTOP_SUMMARY); - } - - // Categories - gchar **categories = as_component_get_categories (cpt); - if (categories != NULL) { - ostringstream categories_sstr; - for (uint i = 0; categories[i] != NULL; i++) { - if (as_str_empty (categories[i])) - continue; - - string cat = categories[i]; - string tmp = cat; - transform (tmp.begin (), tmp.end (), - tmp.begin (), ::tolower); - doc.add_term ("AC" + tmp); - categories_sstr << cat << ";"; - } - doc.add_value (XapianValues::CATEGORIES, categories_sstr.str ()); - } - - // Add our keywords (with high priority) - gchar **keywords = as_component_get_keywords (cpt); - if (keywords != NULL) { - for (uint i = 0; keywords[i] != NULL; i++) { - if (keywords[i] == NULL) - continue; - - string kword = keywords[i]; - term_generator.index_text_without_positions (kword, WEIGHT_DESKTOP_KEYWORD); - } - } - - // Data of provided items - ASCache::ProvidedItems pbPI; - for (uint j = 0; j < AS_PROVIDED_KIND_LAST; j++) { - AsProvidedKind kind = (AsProvidedKind) j; - string kind_str; - AsProvided *prov = as_component_get_provided_for_kind (cpt, kind); - if (prov == NULL) - continue; - - auto *pbProv = pbPI.add_provided (); - pbProv->set_type ((ProvidedItems_ItemType) kind); - - kind_str = as_provided_kind_to_string (kind); - gchar **items = as_provided_get_items (prov); - for (uint j = 0; items[j] != NULL; j++) { - string item = items[j]; - pbProv->add_item (item); - doc.add_term ("AE" + kind_str + ";" + item); - } - g_free (items); - } - string pitems_ostr; - if (pbPI.SerializeToString (&pitems_ostr)) - doc.add_value (XapianValues::PROVIDED_ITEMS, pitems_ostr); - - // Add screenshot information - Screenshots screenshots; - GPtrArray *sslist = as_component_get_screenshots (cpt); - for (uint i = 0; i < sslist->len; i++) { - AsScreenshot *sshot = (AsScreenshot*) g_ptr_array_index (sslist, i); - Screenshots_Screenshot *pb_sshot = screenshots.add_screenshot (); - - pb_sshot->set_primary (false); - if (as_screenshot_get_kind (sshot) == AS_SCREENSHOT_KIND_DEFAULT) - pb_sshot->set_primary (true); - - if (as_screenshot_get_caption (sshot) != NULL) - pb_sshot->set_caption (as_screenshot_get_caption (sshot)); - - g_ptr_array_foreach (as_screenshot_get_images (sshot), - (GFunc) images_array_to_imageentry, - pb_sshot); - } - string scr_ostr; - if (screenshots.SerializeToString (&scr_ostr)) - doc.add_value (XapianValues::SCREENSHOTS, scr_ostr); - - // Add compulsory-for-desktop information - gchar **compulsory = as_component_get_compulsory_for_desktops (cpt); - string compulsory_str; - if (compulsory != NULL) { - gchar *str; - str = g_strjoinv (";", compulsory); - compulsory_str = string(str); - g_free (str); - } - doc.add_value (XapianValues::COMPULSORY_FOR, compulsory_str); - - // Add project-license - const gchar *project_license = as_component_get_project_license (cpt); - if (project_license != NULL) - doc.add_value (XapianValues::LICENSE, project_license); - - // Add project group - const gchar *project_group = as_component_get_project_group (cpt); - if (project_group != NULL) - doc.add_value (XapianValues::PROJECT_GROUP, project_group); - - // Add developer name - const gchar *developer_name = as_component_get_developer_name (cpt); - if (developer_name != NULL) - doc.add_value (XapianValues::DEVELOPER_NAME, developer_name); - - // Add releases information - Releases pb_rels; - GPtrArray *releases = as_component_get_releases (cpt); - for (uint i = 0; i < releases->len; i++) { - AsRelease *rel = (AsRelease*) g_ptr_array_index (releases, i); - Releases_Release *pb_rel = pb_rels.add_release (); - - // version - pb_rel->set_version (as_release_get_version (rel)); - // UNIX timestamp - pb_rel->set_unix_timestamp (as_release_get_timestamp (rel)); - // release urgency (if set) - if (as_release_get_urgency (rel) != AS_URGENCY_KIND_UNKNOWN) - pb_rel->set_urgency ((Releases_UrgencyType) as_release_get_urgency (rel)); - - // add location urls - GPtrArray *locations = as_release_get_locations (rel); - for (uint j = 0; j < locations->len; j++) { - pb_rel->add_location ((gchar*) g_ptr_array_index (locations, j)); - } - - // add checksum info - for (uint j = 0; j < AS_CHECKSUM_KIND_LAST; j++) { - if (as_release_get_checksum (rel, (AsChecksumKind) j) != NULL) { - Releases_Checksum *pb_cs = pb_rel->add_checksum (); - pb_cs->set_type ((Releases_ChecksumType) j); - pb_cs->set_value (as_release_get_checksum (rel, (AsChecksumKind) j)); - } - } - - // add size info - for (uint j = 0; j < AS_SIZE_KIND_LAST; j++) { - if (as_release_get_size (rel, (AsSizeKind) j) > 0) { - Releases_Size *pb_s = pb_rel->add_size (); - pb_s->set_type ((Releases_SizeType) j); - pb_s->set_value (as_release_get_size (rel, (AsSizeKind) j)); - } - } - - // add description - if (as_release_get_description (rel) != NULL) - pb_rel->set_description (as_release_get_description (rel)); - } - string rel_ostr; - if (pb_rels.SerializeToString (&rel_ostr)) - doc.add_value (XapianValues::RELEASES, rel_ostr); - - // Languages - GHashTable *langs_table; - langs_table = as_component_get_languages_map (cpt); - if (g_hash_table_size (langs_table) > 0) { - Languages pb_langs; - string ostr; - - g_hash_table_foreach (langs_table, - (GHFunc) langs_hashtable_to_langentry, - &pb_langs); - - if (pb_rels.SerializeToString (&ostr)) - doc.add_value (XapianValues::LANGUAGES, ostr); - } - - // Postprocess - string docData = doc.get_data (); - doc.add_term ("AA" + docData); - term_generator.index_text_without_positions (docData, WEIGHT_DESKTOP_NAME); - - //! g_debug ("Adding component: %s", as_component_to_string (cpt)); - db.add_document (doc); - - // infer database locale from single component - // TODO: Do that in a smarter way, if we support multiple databases later. - if (db_locale.empty ()) - db_locale = as_component_get_active_locale (cpt); - } - - db.set_metadata ("db-schema-version", to_string (AS_DB_SCHEMA_VERSION)); - db.set_metadata ("db-locale", db_locale); - db.commit (); - - if (g_rename (m_dbPath.c_str (), old_path.c_str ()) < 0) { - g_critical ("Error while moving old database out of the way."); - return false; - } - if (g_rename (rebuild_path.c_str (), m_dbPath.c_str ()) < 0) { - g_critical ("Error while moving rebuilt database."); - return false; - } - as_utils_delete_dir_recursive (old_path.c_str ()); - - return true; -} - -bool -DatabaseWrite::addComponent (AsComponent *cpt) -{ - // TODO - return false; -} diff -Nru appstream-0.9.4/src/xapian/database-write.hpp appstream-0.12.0/src/xapian/database-write.hpp --- appstream-0.9.4/src/xapian/database-write.hpp 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/src/xapian/database-write.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -/* database-write.hpp - * - * Copyright (C) 2012-2014 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#ifndef DATABASE_WRITE_H -#define DATABASE_WRITE_H - -#include -#include -#include -#include -#include "../as-component.h" - -using namespace std; - -/* _VERY_ ugly hack to make C++ and Vala work together */ -struct G_GNUC_INTERNAL XADatabaseWrite {}; - -class G_GNUC_INTERNAL DatabaseWrite : public XADatabaseWrite -{ -public: - explicit DatabaseWrite (); - ~DatabaseWrite (); - - bool initialize (const gchar *dbPath); - - bool addComponent (AsComponent *cpt); - bool rebuild (GList *cpt_list); - -private: - Xapian::WritableDatabase *m_rwXapianDB; - string m_dbPath; - -}; - -G_GNUC_INTERNAL -inline DatabaseWrite* realDbWrite (XADatabaseWrite* d) { return static_cast(d); } - -#endif // DATABASE_WRITE_H diff -Nru appstream-0.9.4/tests/as-test-utils.c appstream-0.12.0/tests/as-test-utils.c --- appstream-0.9.4/tests/as-test-utils.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/as-test-utils.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,104 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include "as-test-utils.h" + +/** + * as_test_compare_lines: + **/ +gboolean +as_test_compare_lines (const gchar *txt1, const gchar *txt2) +{ + g_autoptr(GError) error = NULL; + g_autofree gchar *output = NULL; + + /* exactly the same */ + if (g_strcmp0 (txt1, txt2) == 0) + return TRUE; + + /* save temp files and diff them */ + if (!g_file_set_contents ("/tmp/as-utest_a", txt1, -1, &error)) + return FALSE; + if (!g_file_set_contents ("/tmp/as-utest_b", txt2, -1, &error)) + return FALSE; + if (!g_spawn_command_line_sync ("diff -urNp /tmp/as-utest_b /tmp/as-utest_a", + &output, NULL, NULL, &error)) + return FALSE; + + g_assert_no_error (error); + g_print ("%s\n", output); + return FALSE; +} + +/** + * as_sort_strings_cb: + * + * Helper method to sort lists of strings + */ +static gint +as_sort_strings_cb (gconstpointer a, gconstpointer b) +{ + const gchar *astr = *((const gchar **) a); + const gchar *bstr = *((const gchar **) b); + + return g_strcmp0 (astr, bstr); +} + +/** + * as_component_sort_values: + */ +void +as_component_sort_values (AsComponent *cpt) +{ + GPtrArray *provideds; + guint i; + + provideds = as_component_get_provided (cpt); + for (i = 0; i < provideds->len; i++) { + AsProvided *prov = AS_PROVIDED (g_ptr_array_index (provideds, i)); + + g_ptr_array_sort (as_provided_get_items (prov), + as_sort_strings_cb); + } +} + +/** + * as_sort_components_cb: + * + * Helper method to sort lists of #AsComponent + */ +static gint +as_sort_components_cb (gconstpointer a, gconstpointer b) +{ + AsComponent *cpt1 = *((AsComponent **) a); + AsComponent *cpt2 = *((AsComponent **) b); + + return g_strcmp0 (as_component_get_id (cpt1), + as_component_get_id (cpt2)); +} + +/** + * as_sort_components: + */ +void +as_sort_components (GPtrArray *cpts) +{ + g_ptr_array_sort (cpts, as_sort_components_cb); +} diff -Nru appstream-0.9.4/tests/as-test-utils.h appstream-0.12.0/tests/as-test-utils.h --- appstream-0.9.4/tests/as-test-utils.h 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/as-test-utils.h 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,18 @@ + +#ifndef __AS_TEST_UTILS_H +#define __AS_TEST_UTILS_H + +#include +#include + +G_BEGIN_DECLS + +gboolean as_test_compare_lines (const gchar *txt1, + const gchar *txt2); + +void as_component_sort_values (AsComponent *cpt); +void as_sort_components (GPtrArray *cpts); + +G_END_DECLS + +#endif /* __AS_TEST_UTILS_H */ diff -Nru appstream-0.9.4/tests/ci/build_and_test.sh appstream-0.12.0/tests/ci/build_and_test.sh --- appstream-0.9.4/tests/ci/build_and_test.sh 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/ci/build_and_test.sh 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,43 @@ +#!/bin/sh +set -e + +echo "C compiler: $CC" +echo "C++ compiler: $CXX" +set -x + +# +# This script is supposed to run inside the AppStream Docker container +# on the CI system. +# + +$CC --version + +# configure AppStream build with all flags enabled +mkdir build && cd build +meson -Dmaintainer=true \ + -Ddocs=true \ + -Dqt=true \ + -Dapt-support=true \ + -Dvapi=true \ + .. + +# Build, Test & Install +# (the number of Ninja jobs needs to be limited, so Travis doesn't kill us) +ninja -j4 +ninja documentation +ninja test -v +DESTDIR=/tmp/install_root/ ninja install + +# Rebuild everything with Sanitizers enabled +# FIXME: Doesn't work properly with Clang at time, so we only run this test with GCC. +cd .. && rm -rf build && mkdir build && cd build + +# FIXME: we can not build with sanitizers at the moment, because Meson/g-ir-scanner is buggy +# Add -Db_sanitize=address,undefined to try the full thing. +#meson -Dmaintainer=true \ +# -Dqt=true \ +# -Dapt-support=true \ +# -Dvapi=true \ +# -Db_sanitize=address \ +# .. +#if [ "$CC" != "clang" ]; then ninja -j4 && ninja test -v; fi diff -Nru appstream-0.9.4/tests/ci/Dockerfile appstream-0.12.0/tests/ci/Dockerfile --- appstream-0.9.4/tests/ci/Dockerfile 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/ci/Dockerfile 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,32 @@ +# +# Docker file for AppStream CI tests +# +FROM debian:testing + +# prepare +RUN apt-get update -qq + +# install build essentials +RUN apt-get install -yq gcc g++ clang + +# install build dependencies +RUN apt-get install -yq --no-install-recommends \ + meson \ + ninja-build \ + gettext \ + itstool \ + libglib2.0-dev \ + libxml2-dev \ + gtk-doc-tools \ + libgirepository1.0-dev \ + qt5-default \ + libyaml-dev \ + xmlto \ + publican \ + gobject-introspection \ + libstemmer-dev \ + valac + +# finish +RUN mkdir /build +WORKDIR /build diff -Nru appstream-0.9.4/tests/CMakeLists.txt appstream-0.12.0/tests/CMakeLists.txt --- appstream-0.9.4/tests/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tests/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -# CMakeLists for UAI Unit Tests - -find_package(GLIB2 REQUIRED) -pkg_check_modules(GIO2 REQUIRED gio-2.0) -find_package(LibXml2 REQUIRED) -find_library(M_LIB m) - -link_libraries(${M_LIB} - ${GLIB2_LIBRARIES} - ${GIO2_LIBRARIES} - ${LIBXML2_LIBRARIES} - appstream -) - -include_directories(${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/src - ${CMAKE_SOURCE_DIR}/src/xapian - ${CMAKE_CURRENT_SOURCE_DIR} - ${GLIB2_INCLUDE_DIR} - ${GIO2_INCLUDE_DIR} - ${LIBXML2_INCLUDE_DIR} -) - -# Basic tests -add_executable(as-test-basics test-basics.c) -add_dependencies(as-test-basics appstream) -add_test(test-basic as-test-basics ${CMAKE_CURRENT_SOURCE_DIR}) - -# AppStream XML parser tests -add_executable(as-test-xmldata test-xmldata.c) -add_dependencies(as-test-xmldata appstream) -add_test(test-xml as-test-xmldata ${CMAKE_CURRENT_SOURCE_DIR}) - -# AppStream DEP-11 parser tests -add_executable(as-test-yamldata test-yamldata.c) -add_dependencies(as-test-yamldata appstream) -add_test(test-yaml as-test-yamldata ${CMAKE_CURRENT_SOURCE_DIR}) - -# AppStream database tests -add_executable(as-test-database test-database.c) -add_dependencies(as-test-database appstream) -add_test(test-database as-test-database ${CMAKE_CURRENT_SOURCE_DIR}) diff -Nru appstream-0.9.4/tests/lsan.supp appstream-0.12.0/tests/lsan.supp --- appstream-0.9.4/tests/lsan.supp 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/lsan.supp 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1 @@ +leak:libxml2.so diff -Nru appstream-0.9.4/tests/meson.build appstream-0.12.0/tests/meson.build --- appstream-0.9.4/tests/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,108 @@ +# Meson definition for AppStream Tests + +as_test_env = [] +opt_sanitize = get_option('b_sanitize').split(',') +if opt_sanitize.contains('address') or opt_sanitize.contains('undefined') + as_test_env = ['ASAN_OPTIONS=detect_leaks=0'] # otherwise we fail on leaks in 3rd-party libraries +endif + +as_test_args = [meson.current_source_dir()] + +as_test_common_src = [ + 'as-test-utils.h', + 'as-test-utils.c' +] + +# +# Tests +# + +# Basics and utility functions +as_test_basic_exe = executable ('as-test_basic', + ['test-basics.c', + as_test_common_src], + include_directories: [appstream_lib_inc, + include_directories('..')], + dependencies: [glib_dep, + gobject_dep, + gio_dep, + xml2_dep], + link_with: [appstream_lib], +) +test ('as-test_basic', + as_test_basic_exe, + args: as_test_args, + env: as_test_env +) + +# XML read/write +as_test_xml_exe = executable ('as-test_xml', + ['test-xmldata.c', + as_test_common_src], + include_directories: [appstream_lib_inc, + include_directories('..')], + dependencies: [glib_dep, + gobject_dep, + gio_dep, + xml2_dep], + link_with: [appstream_lib], +) +test ('as-test_xml', + as_test_xml_exe, + args: as_test_args, + env: as_test_env +) + +# YAML read/write +as_test_yaml_exe = executable ('as-test_yaml', + ['test-yamldata.c', + as_test_common_src], + include_directories: [appstream_lib_inc, + include_directories('..')], + dependencies: [glib_dep, + gobject_dep, + gio_dep, + xml2_dep], + link_with: [appstream_lib], +) +test ('as-test_yaml', + as_test_yaml_exe, + args: as_test_args, + env: as_test_env +) + +# Metadata Pool +as_test_pool_exe = executable ('as-test_pool', + ['test-pool.c', + as_test_common_src], + include_directories: [appstream_lib_inc, + include_directories('..')], + dependencies: [glib_dep, + gobject_dep, + gio_dep, + xml2_dep], + link_with: [appstream_lib], +) +test ('as-test_pool', + as_test_pool_exe, + args: as_test_args, + env: as_test_env +) + +# Validator +as_test_validate_exe = executable ('as-test_validate', + ['test-validate.c', + as_test_common_src], + include_directories: [appstream_lib_inc, + include_directories('..')], + dependencies: [glib_dep, + gobject_dep, + gio_dep, + xml2_dep], + link_with: [appstream_lib], +) +test ('as-test_validate', + as_test_validate_exe, + args: as_test_args, + env: as_test_env +) diff -Nru appstream-0.9.4/tests/samples/collection/xml/foobar-1.xml appstream-0.12.0/tests/samples/collection/xml/foobar-1.xml --- appstream-0.9.4/tests/samples/collection/xml/foobar-1.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/samples/collection/xml/foobar-1.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,479 @@ + + + + 0ad.desktop + 0ad + 0 A.D. + A real-time strategy game of ancient warfare + Videogioco strategico in tempo reale di guerre antiche + 0ad.png + + Game + StrategyGame + + + + org.foobar.AsSampleGame + game-package + A Game + A real game with content rating + game.png + org.foobar.AsSampleGame.desktop + + Game + + + moderate + mild + + + + 0install.desktop + 0install-core + 0install + Run or manage Zero Install programs + Actualiza o quita programas de tu menú Aplicaciones + Uppdatera eller ta bort Zero Install-program i menyn Program +

Zero Install is a decentralised cross-distribution software installation system.

Features include full support for shared libraries (with a SAT solver for dependency resolution), sharing between users, and integration with native platform package managers.

It supports both binary and source packages, and works on Linux, OS X, Unix and Windows systems. It is fully Open Source.

+ 0install.png + + PackageManager + Settings + System + Utility + + http://0install.net + + + http://people.freedesktop.org/~mak/appstream/debian/screenshots/source/0install-22aeb5e8b09a96f2df0d3a8f79567aeb.png + http://people.freedesktop.org/~mak/appstream/debian/screenshots/624x351/0install-22aeb5e8b09a96f2df0d3a8f79567aeb.png + http://people.freedesktop.org/~mak/appstream/debian/screenshots/112x63/0install-22aeb5e8b09a96f2df0d3a8f79567aeb.png + http://people.freedesktop.org/~mak/appstream/debian/screenshots/752x423/0install-22aeb5e8b09a96f2df0d3a8f79567aeb.png + + + + de + es + sv + +
+ + 4digits.desktop + 4digits + 4digits + 猜数字 + 猜數字 + 猜數字 + A guess-the-number game, aka Bulls and Cows + 猜数字游戏 + 猜數字游戲 + 猜數字游戲 + 4digits.png + + Game + LogicGame + + + cs + de + en_GB + es + fr + hu + it + pl + pt_BR + ru + si + tr + zh + zh_CN + zh_TW + + + + kig.desktop + kig + Kig + কিগ + केआईजी + केआईजी + കിഗ് + किग + किग + ਕਿਗ + கிக் + 數學_Kig + Explore Geometric Constructions + Esplorar construcciones xeométriques + Вывучэнне геаметрычных фігур + Геометрични конструкции + জ্যামিতি ছবি আঁকা চর্চা করুন + Istražite geometrijske konstrukcije + Explora construccions geomètriques + Explora construccions geomètriques + Objevujte geometrické konstrukce + Zabôwa geòmetricznëma kònstrukcjama + Udforsk geometriske konstruktioner + Geometrische Konstruktionen untersuchen + Εξερεύνηση γεωμετρικών κατασκευών + Esploru la geometriajn konstruaĵojn + Exploración de construcciones geométricas + Geomeetriliste kujundite tundmaõppimine + Arakatu geometria egiturak + کاوش ساختارهای هندسی + Tutki geometrisia piirroksia + Explorer les constructions géométriques + Taiscéal Tógálacha Céimseatúla + Explora as figuras xeométricas + ભૂમિતિ આકારોને ઓળખો + חקור מבנים גאומטריים + ज्यामितीय कंस्ट्रक्शन एक्सप्लोर करें + ज्यामितीय कंस्ट्रक्सन एक्सप्लोर करव + Istražite geometrijske konstrukcije + Geometriai oktatóprogram + Skoða rúmfræðilega byggingu + Esplora le costruzioni geometriche + 幾何学との対話 + გეომეტრიულ ფიგურათა შესწავლა + Геометриямен айналысу + រុករក​សំណង់​ធរណីមាត្រ + 기하학 탐구하기 + Geometrinių konstrukcijų tyrinėjimas + Iepazīstiet ģeometriskās figūras + ജ്യാമിതീയ നിര്‍മ്മിതികള്‍ കണ്ടുപഠിക്കുക + भूमितीय कंस्ट्रक्शन एक्सप्लोर करा + Utforsk geometriske konstruksjoner + Geometersch Konstrukschonen bekieken + ज्यामिति बनावट अन्वेषण गर्नुहोस् + Meetkundige constructies verkennen + Utforsk geometriske konstruksjonar + ਜੁਮੈਟਰੀ ਸੰਰਚਨਾ ਕਰੋ + Zabawa konstrukcjami geometrycznymi + Explorar Construções Geométricas + Explorar construções geométricas + Explorează construcții geometrice + Работа с геометрическими построениями + Prieskum geometrických konštrukcií + Raziskovanje geometrijskih konstrukcij + Utforska geometriska konstruktioner + Geometrik Yapıları Keşfet + گېئومېتىرىيىلىك قۇرۇلمىلارنى ئانالىز قىلىش + Дослідження геометричних конструкцій + Khám phá các phép Dụng Hình học + 探索几何构造 + 作出幾何圖形 + kig.png + + Education + Math + + + application/x-kgeo + application/x-kig + + + + kiki.desktop + kiki + Kiki + Regular expression testing + kiki.png + + Development + + + + links2.desktop + links2 + Links 2 + Web browser running in both graphics and text mode + Navegador web que funciona tanto no modo texto como no modo gráfico + links2.png + + Network + WebBrowser + + + + linpsk.desktop + linpsk + Linpsk + Amateur Radio Sound Card Communications + linpsk.png + + HamRadio + Network + + + + linuxdcpp.desktop + linuxdcpp + LinuxDC++ + A file-sharing client for the Direct Connect network + linuxdcpp.png + + FileTransfer + Network + P2P + + + cs + et + lt + pl + pt + ro + ru + sv + + + + org.example.TestApp + test-app + Unittest Dummy App + A dummy component used in AppStream unittests. + org.example.TestApp.png + + Application + Utility + + + org.example.DummyDep + + + Linux + + + + literki.desktop + literki + Literki + Hacker's keyboard + literki.png + + Application + Utility + + + text/x-vcard + + + + logisim.desktop + logisim + Logisim + Graphical tool for designing and simulating logic circuits + logisim.png + + ComputerScience + Education + Java + Science + + + + maitreya7.desktop + maitreya + Maitreya7 + Astrology Software + maitreya7.png + + Astronomy + Education + Science + + + Astrology + Vedic Astrology + Western Astrology + + + de + es + fr + hu + it + pl + ro + ru + ta + te + + + + massxpert.desktop + massxpert + massXpert + Bio-polymer mass spectrometry software + massxpert.png + + Biology + Chemistry + Education + Science + + + Modelling + Polymer chemistry + Biochemistry + + + + qsapecng.desktop + qsapecng + QSapecNG + Symbolic analyzer of linear analog circuits + Analizzatore simbolico di circuiti analogici lineari + qsapecng.png + + Development + Electronics + + + + xye.desktop + xye + Xye + Solve puzzles and action challenges in order to get all the gems in the room. + xye.png + + Application + Game + + + game + gems + logic + puzzle + + + application/xye-xml + + + + org.inkscape.Inkscape + inkscape + Inkscape + אינקסקייפ + ఇంక్‌స్కేప్ + Create and edit Scalable Vector Graphics images + إنشاء و تحرير الرسومات الشعاعية + Стварэньне й зьмяненьне відарысаў вэктарнай ґрафікі (SVG) + Създаване и редакция на изображения Scalable Vector Graphics + স্কেলেবল ভেক্টর গ্রাফিক্স ছবি তৈরী ও সম্পাদনা করুন + Krouiñ hag embann skeudennoù mod SVG (Scalable Vector Graphics) + Creeu i editeu imatges de gràfics de vectors escalables + Creeu i editeu imatges de gràfics de vectors escalables + Vytvářejte a upravujte vektorovou grafiku (SVG) + Opret og redigér SVG-billeder + Skalierbare Vektorgrafiken (SVG) erzeugen und bearbeiten + ཆ་ཚད་འཇལ་བཏུབ་པའི་མཉམ་ཐིག་ཚད་རིས་ཀྱི་གཟུགས་བརྙན་ཚུ་གསར་བསྐྲུན་དང་ཞུན་དག་འབད། + Δημιουργήστε και τροποποιήστε διανυσματικές εικόνες τύπου Scalable Vector Graphics + Eatecray andway editway Alablescay Ectorvay Aphicsgray imagesway + Kreu kaj redaktu bildoj en formato SVG (Scalable Vector Graphics) + Cree y edite Gráficos Vectoriales Escalables (SVG) + SVG-vektorgraafikas piltide joonistamine ja muutmine + Sortu eta editatu Grafiko Bektorial Eskalakor (SVG) irudiak + Luo ja muokkaa Scalable Vector Graphics -piirroksia + Créer et éditer des images Scalable Vector Graphics + Cree e edite imaxes Scalable Vector Graphics + יצירה ועריכה של תמונות בגרפיקת וקטורים נמתחת + Stvaranje i uređivanje vektorskih crteža + Scalable Vector Graphics (méretezhető vektorgrafika, SVG)-képek létrehozása és szerkesztése + Membuat dan mengedit gambar Scalable Vector Graphics + Crea e modifica immagini Scalable Vector Graphics + Scalable Vector Graphics (SVG) イメージの作成と編集を行います + បង្កើត និង​កែសម្រួល​​​រូបភាព​ក្រាហ្វិក​វ៉ិចទ័រ​ដែល​អាច​ធ្វើ​មាត្រដ្ឋាន​បាន​​ + SVG 이미지 생성 및 편집 + Kurti ir redaguoti vektorinius grafinius piešinius + Lag og rediger Skalerbar VektorGrafikk-bilder + स्केलेबुल भेक्टर ग्राफिक्स छविहरू सिर्जना गर्नुहोस् र सम्पादन गर्नुहोस् + SVG-tekeningen (Scalable Vector Graphics) maken en bewerken + Lag og rediger skalerbare vektorbilete (SVG) + ਸਕੇਲੇਬਲ ਵੈਕਟਰ ਗਰਾਫਿਕਸ ਚਿੱਤਰ ਬਣਾਓ ਅਤੇ ਸੋਧੋ + Tworzenie i edycja grafiki wektorowej SVG + Crie e edite imagens Gráficas Vectoriais Escalaveis + Crie e edite desenhos vetoriais escaláveis (SVG) + Creează și editează imagini în format Scalable Vector Graphics + Создание и редактирование масштабируемой векторной графики в формате SVG + Tvorba a úprava obrázkov Scalable Vector Graphics + Ustvarjajte in urejajte vektorske slike SVG + Прављење и уређивање SVG векторских слика + Pravljenje i uređivanje SVG vektorskih slika + Skapa och redigera SVG-bilder + సదిశ రేఖాచిత్రాలని సృష్టించండి మరియు దిద్దుబాటు చేయండి + สร้างและแก้ไขภาพ Scalable Vector Graphics + Ölçeklenebilir Vektör İmgeleri oluşturur ve düzenler + Створення та редагування зображень у форматі SVG + Tạo và sửa ảnh véc-tơ co giãn được + 创建并编辑可缩放矢量图形图像 + 建立和編輯可縮放向量繪圖圖形 + inkscape.png + inkscape.png + https://inkscape.org/ + https://inkscape.org/learn/faq/ + inkscape.desktop + + Graphics + VectorGraphics + + + application/illustrator + application/vnd.corel-draw + image/svg+xml + image/svg+xml-compressed + image/x-eps + + + ar + be + bg + br + ca + ca@valencia + cs + da + de + dz + en_GB + en_US@piglatin + eo + es + et + eu + fi + fr + gl + he + hr + hu + id + it + ja + km + ko + lt + nb + ne + nl + pl + pt + pt_BR + ro + ru + sk + sl + sr + sr@latin + sv + uk + vi + zh_CN + zh_TW + + + inkscape + + +
diff -Nru appstream-0.9.4/tests/samples/collection/xml/limba_6375db4bb7186c39a4860544884575f7.xml appstream-0.12.0/tests/samples/collection/xml/limba_6375db4bb7186c39a4860544884575f7.xml --- appstream-0.9.4/tests/samples/collection/xml/limba_6375db4bb7186c39a4860544884575f7.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/samples/collection/xml/limba_6375db4bb7186c39a4860544884575f7.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,33 @@ + + + + org.neverball.Neverball + Neverball + A 3D arcade game with a ball. + +

+ Tilt the floor to roll a ball through an obstacle course before time runs + out. + Neverball is part puzzle game, part action game, and entirely a test of + skill. +

+

+ The current version includes 141 Neverball levels and 134 Neverputt holes. +

+
+ + neverball.desktop + + http://neverball.org/ + neverball-1.6.0.png + neverball-1.6.0 + + + + 112358 + 42424242 + + + +
+
diff -Nru appstream-0.9.4/tests/samples/collection/xml/suggestions.xml appstream-0.12.0/tests/samples/collection/xml/suggestions.xml --- appstream-0.9.4/tests/samples/collection/xml/suggestions.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/samples/collection/xml/suggestions.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,21 @@ + + + + links2.desktop + + org.example.test1 + org.example.test2 + + + + kiki.desktop + Kiki (name changed by merge) + + + literki.desktop + + org.example.test3 + org.example.test4 + + + diff -Nru appstream-0.9.4/tests/samples/desktop-converted.xml appstream-0.12.0/tests/samples/desktop-converted.xml --- appstream-0.9.4/tests/samples/desktop-converted.xml 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/samples/desktop-converted.xml 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,911 @@ + + + + org.kde.ksysguard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + Wachtôrz Systemë KDE + KSysGuard + KSysGuard + KSysGuard + KSysGuard + حارس نظامك + KDE-Sistemobservilo + К‑систембран + KSysGuard + KSysGuard + KSysGuard + കെസിസ്ഗാര്‍ഡ് + KDE kerfisvörður + KSysGuard + KSysGuard + के सिसगार्ड + KSysGuard + KSysGuard + K‑sistembran + Системна защита + KDE 系统卫士 + KSysGuard + KSysGuard + KDE тизим назоратчиси + KSysGuard + KSysGuard + KSysGuard + KDE tizim nazoratchisi + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KGardianSistem + KSysGuard + KSysGuard + Системный монитор + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSisGåde + K‑sistembran + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + KSysGuard + К‑систембран + KSysGuard + KSysGuard + KDE:s systemövervakare + KSysGuard + केडीई तंत्र रक्षक + ਕੇਸਿਸ-ਗਾਰਡ + KSysGuard + KSysGuard + KSysGuard + Monitor systemu KDE + Ҳифзи системаи KDE + ป้องกันระบบ-K + KSysGuard + Övervaka processor som kör och systemprestanda + Laufende Prozess und Systemauslastung überwachen + Monitoruje uruchomione procesy i wydajność systemu + Monitora os processos em execução e o desempenho do sistema + Monitoruje spustené procesy a výkon systému + Nadzirajte tekoča opravila in zmogljivost sistema + 监视运行的进程和系统效率 + Tarkkaile käynnissä olevia prosesseja ja järjestelmän suorituskykyä + Monitor running processes and system performance + Επόπτης εκτελούμενων διεργασιών και απόδοσης συστήματος + מנטר תהליכים פיעילים וביצועי מערכת + Надгледајте процесе у раду и перформансе система + Vixiar os procesos en execución e o rendemento do sistema. + Vigiar os processos em execução e a performance do sistema + Controlador de processos en execució i rendiment del sistema + Monitor de procesos en ejecución y del rendimiento del sistema + Töötavate protsesside ja süsteemi jõudluse jälgimine + Nadgledajte procese u radu i performanse sistema + Наблюдение за процессами и производительностью системы + 監視執行中的行程與系統效能 + Monitor running processes and system performance + Надгледајте процесе у раду и перформансе система + Controlador de processos en execució i rendiment del sistema + Nadgledajte procese u radu i performanse sistema + Overvåg kørende processer og systemets ydelse + Actieve processen en systeemprestaties monitoren + Overvak køyrande prosessar og systemyting + Стеження за процесами та швидкодією системи + + System + + utilities-system-monitor + + application/x-ksysguard + + + + org.gnome.Nautilus + Datnes + Lêers + Ficheiros + Dosyalar + Ficheros + Fichers + Berkas + Arquivos + Αρχεία + Fitxers + الملفات + ফাইলসমূহ + Dosieroj + Archivos + Failid + Датотеки + Fitxategiak + ഫയലുകള്‍ + Skrár + File + ھۆججەتلەر + फाइल्स् + Fail-fail + Файли + Файлы + پرونده‌ها + Файлове + Datoteke + 文件 + ファイル + ফাইল + Tiedostot + Filer + Datoteke + फाइलहरू + Fichiers + Bestanden + File + Filer + Fitxers + Fișiere + Tập tin + Comhaid + Nautilus + Faidhlichean + 檔案 + ফাইল + Fichièrs + Soubory + Ficheiros + Файлдар + ಕಡತಗಳು + 파일 + ફાઇલો + Súbory + Datoteke + ଫାଇଲଗୁଡିକ + Filer + Файлдар + Files + Dateien + Датотеке + 檔案 + Filer + קבצים + Files + फ़ाइल + Dosyeler + ਫਾਇਲਾਂ + Files + கோப்புகள் + Ba Fisyé + దస్త్రాలు + Fájlok + Pliki + Файлҳо + แฟ้ม + Failai + Piekļūt un organizēt datnes + Aceder e organizar ficheiros + Dosyalara erişin ve düzenleyin + Acceder a los ficheros y organizalos + Accedir a os fichers y organizar-los + Mengakses dan mengelola berkas + Acesse e organize arquivos + Προσπελάστε και οργανώστε αρχεία + Organitzeu i accediu a fitxers + نظم الملفات وصِل إليها + অভিগম কৰক আৰু ফাইলসমূহ আয়োজিত কৰক + Atingi kaj organizi dosierojn + Acceder a los archivos y organizarlos + Ligipääs failidele ning failipuu korrastamine + Пристапувајте и организирајте датотеки + ഫയലുകള്‍ ലഭ്യമാക്കി ക്രമത്തിലാക്കുക + Aðgangur og skipulag skráa + Accede ai file e li organizza + ھۆججەتلەرنى تەشكىللەش ۋە زىيارەت + फाइल्स्ला प्रवेश द्वया व संघटित करा + Akses dan mengurus fail-fail + Доступ до файлів + Pristupite datotekama i organizujte ih + Доступ і кіраванне файламі + Достъп и управление на файлове + دسترسی و سازماندهی پرونده‌ها + 访问和组织文件 + ファイルの操作や整理をします + ফাইলে ব্যবাহর এবং সাজানো + Käsittele ja järjestä tiedostoja + Utforsk og organiser filer + Pristupite i organizujte datoteke + Accéder aux fichiers et les organiser + Bestanden gebruiken en organiseren + Dopre e organize file + Aksesser og organiser filer + Organitzeu i accediu a fitxers + Accesați și organizați fișiere + Truy cập và tổ chức tập tin + Déan rochtain ar chomhaid agus eagraigh iad + Управление файлами + Faigh cothrom air faidhlichean is rianaich iad + 存取與組織檔案 + ফাইলগুলি অ্যাক্সেস এবং সংগঠিত করুন + Accedir als fichièrs e los organizar + Přístup k souborům a jejich správa + Acceda e organice ficheiros + Файлдарға қатынау және оларды реттеу + ಕಡತಗಳನ್ನು ನಿಲುಕಿಸಿಕೊಳ್ಳಿ ಹಾಗು ವ್ಯವಸ್ಥಿತವಾಗಿ ಜೋಡಿಸಿ + 파일 조작 및 정리 + ફાઇલોને વાપરો અને સંચાલિત કરો + Prístupuje k súborom a organizuje ich + Dostop in razvrščanje datotek + ଫାଇଲମାନଙ୍କୁ ଅଭିଗମ କରନ୍ତୁ ଏବଂ ସଙ୍ଗଠନ କରନ୍ତୁ + Tilgå og organisér filer + Access and organize files + Приступите датотекама и организујте их + Auf Dateien zugreifen und diese organisieren + 存取與組織檔案 + Kom åt och organisera filer + גישה לקבצים וארגונם + Access and organize files + फ़ाइलों को व्यवस्थित और पहुँच प्राप्त करें + Dosyelerge iriş ve olarnı tertiple + ਫਾਇਲਾਂ ਦੀ ਵਰਤੋਂ ਤੇ ਪਰਬੰਧ + Access and organise files + கோப்புகளை அணுகு மற்றும் ஒழுங்கு படுத்து + Koyíngela mpe kobɔngisa ya kásá + దస్త్రాలను నిర్వహించండి మరియు ప్రాప్తించండి + Fájlok elérése és rendszerezése + Organizowanie plików + Кушодан ва мураттабсозии файлҳо + เข้าถึงและจัดระเบียบแฟ้ม + Atverti ir tvarkyti failus + + Utility + Core + FileManager + + + mape + pārvaldnieks + pārlūkot + disks + datņu sistēma + datne + + + folder + manager + explore + disk + filesystem + gids + bestuurder + ontdek + skyf + lêerstelsel + leer + + + pasta + gestor + explorar + disco + sistema + ficheiros + + + katalog + folder + menedżer + menadżer + manadżer + manedżer + manager + eksploruj + eksplorator + dysk + system plików + + + klasör + yönetici + gezgin + keşfet + gözat + disk + dosya sistemi + + + carpeta + chestor + explorar + disco + sistema de fichers + + + folder + manager + explore + disk + filesystem + pengelola + peramban + sistem + berkas + + + pasta + gerenciador + explorar + disco + sistema de arquivos + + + φάκελος + διαχειριστής + εξερεύνηση + δίσκος + σύστημα αρχείων + folder + manager + explore + disk + filesystem + + + carpeta + gestor + explora + disc + sistema de fitxers + + + مجلد + مدير + ملفات + قرص + تصفح + + + ফোল্ডাৰ + ব্যৱস্থাপক + অন্বেষণ + ডিস্ক + ফাইলচিস্টেম + + + dosierujo + administrilo + foliumi + esplori + disko + dosiersistemo + + + carpeta + gestor + explorar + disco + sistema de archivos + + + kaust + kataloog + haldur + haldus + sirvija + sirvimine + ketas + kõvaketas + failisüsteem + + + folder + manager + explore + disk + filesystem + + + mappa + stjórnun + skoða + diskur + skráakerfi + + + cartella + gestore + esplora + disco + file + file system + + + folder + manager + explore + disk + filesystem + قىسقۇچ + باشقۇرغۇ + دىسكا + ھۆججەت سىستېمىسى + + + फोल्डर + मॅनेजर + एक्सप्लोर + डिस्क + फाइलसिस्टम + + + тека + менеджер + папка + диск + файл + + + fascikla + folder + upravnik + menadžer + istraži + disk + sistem datoteka + fajlsistem + фасцикла + фолдер + управник + менаџер + истражи + диск + систем датотека + фајлсистем + folder + manager + explore + disk + filesystem + + + папка + кіраўнік + прагляд + дыск + файлавая сістэма + + + папка + файл + навигация + директория + система + диск + устройство + управление + мениджър + folder + manager + explore + disk + filesystem + directory + file + + + پوشه + مدیر + پویش + دیسک + سیستم‌پرونده + folder + manager + explore + disk + filesystem + + + folder + manager + explore + disk + filesystem + 目录 + 文件夹 + 管理 + 浏览 + 磁盘 + 硬盘 + 文件系统 + + + folder + manager + explore + disk + filesystem + フォルダー + マネージャー + エクスプローラー + ディスク + ファイルシステム + + + folder + manager + explore + disk + filesystem + kansio + tiedostoselain + levy + tiedostojärjestelmä + + + mappe + håndterer + utforsk + disk + filsystem + + + direktorij + menadžer + istraživanje + disk + datotečni sistem + + + dossier + gestionnaire + explorer + disque + système de fichiers + + + folder + manager + explore + disk + filesystem + map + beheer + verkenner + schijf + bestandssysteem + + + cartele + gjestôr + esplore + disc + file + filesystem + + + carpeta + gestor + explora + disc + sistema de fitxers + + + folder + manager + explore + disk + filesystem + administrator + dosar + disc + sistem + + + folder + thư + mục + thu + muc + manager + quản + + quan + ly + explore + khám + phá + kham + pha + disk + đĩa + dia + filesystem + hệ + thống + tập + tin + he + thong + tap + + + папка + менеджер + обзор + диск + файловая система + + + pasgan + manaidsear + rannsaich + diosg + siostam-faidhle + + + folder + manager + explore + disk + filesystem + 資料夾 + 管理程式 + 磁碟 + 檔案系統 + + + ফোল্ডার + ম্যানেজার + এক্সপ্লোর + ডিস্ক + ফাইলসিস্টেম + + + dorsièr + gestionari + explorar + disc + sistèma de fichièrs + + + složka + správce + správa + prohlížení + procházení + disk + souborový systém + systém souborů + + + cartafol + xestor + explorar + disco + sistema de ficheiros + + + бума + басқарушы + шолу + диск + файлдық жүйе + + + ಕಡತಕೋಶ + ವ್ಯವಸ್ಥಾಪಕ + ಹುಡುಕು + ಡಿಸ್ಕ್‍ + ಕಡತವ್ಯವಸ್ಥೆ + + + folder + 폴더 + manager + 관리 + explore + 찾아보기 + disk + 디스크 + filesystem + 파일 + 시스템 + + + ફોલ્ડર + સંચાલક + સંશોધન + ડિસ્ક + ફાઇલસિસ્ટમ + + + priečinok + správca + prehliadať + disk + systém súborov + + + mapa + upravljalnik + datoteke + raziskovalec + datotečni sistem + disk + + + ଫୋଲଡର + ପରିଚାଳକ + ଅନ୍ୱେଷଣ + ଡିସ୍କ + ଫାଇଲତନ୍ତ୍ର + + + mappe + håndtering + udforsk + gennemse + disk + filsystem + + + folder + manager + explore + disk + filesystem + + + фасцикла + фолдер + управник + менаџер + истражи + диск + систем датотека + фајлсистем + fascikla + folder + upravnik + menadžer + menadzer + istraži + istrazi + sistem datoteka + fajlsistem + folder + manager + explore + disk + filesystem + + + Ordner + Verwaltung + Laufwerk + Festplatte + Dateisystem + Dateien + + + folder + manager + explore + disk + filesystem + 資料夾 + 管理員 + 磁碟 + 檔案系統 + + + mapp + hanterare + utforskare + disk + filsystem + + + תיקייה + מנהל + עיון + סיור + כונן + מערכת קבצים + + + folder + manager + explore + disk + filesystem + + + cilbent + idareci + araştır + disk + dosyesistemi + + + ਫੋਲਡਰ + ਮੈਨੇਜਰ + explore + ਡਿਸਕ + ਫਾਇਲ-ਸਿਸਟਮ + + + folder + manager + explore + disk + filesystem + + + அடைவு + மேலாளர் + ஆராய்வு + வட்டு + கோப்புமுறைமை + + + dosíye + moyángeli + motálitali + disiki + fisyé ya sistɛ́mɛ + + + సంచయం + నిర్వాహకం + అన్వేషించండి + డిస్కు + దస్త్రవ్యవస్థ + + + mappa + könyvtár + kezelés + kezelő + intéző + lemez + fájlrendszer + commander + + + ҷузвдон + мудир + тамошо + диск + системаи файлӣ + + + โฟลเดอร์ + เครื่องมือจัดการ + สำรวจ + ดิสก์ + ระบบแฟ้ม + + + aplankas + tvarkytuvė + naršyti + diskas + failų sistema + + org.gnome.Nautilus + + inode/directory + application/x-gnome-saved-search + + + diff -Nru appstream-0.9.4/tests/samples/distro/xmls/foobar-1.xml appstream-0.12.0/tests/samples/distro/xmls/foobar-1.xml --- appstream-0.9.4/tests/samples/distro/xmls/foobar-1.xml 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tests/samples/distro/xmls/foobar-1.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,474 +0,0 @@ - - - - 0ad.desktop - 0ad - 0 A.D. - A real-time strategy game of ancient warfare - Videogioco strategico in tempo reale di guerre antiche - 0ad.png - - Game - StrategyGame - - - - 0install.desktop - 0install-core - 0install - Run or manage Zero Install programs - Actualiza o quita programas de tu menú Aplicaciones - Uppdatera eller ta bort Zero Install-program i menyn Program -

Zero Install is a decentralised cross-distribution software installation system.

Features include full support for shared libraries (with a SAT solver for dependency resolution), sharing between users, and integration with native platform package managers.

It supports both binary and source packages, and works on Linux, OS X, Unix and Windows systems. It is fully Open Source.

- 0install.png - - PackageManager - Settings - System - Utility - - http://0install.net - - - http://people.freedesktop.org/~mak/appstream/debian/screenshots/source/0install-22aeb5e8b09a96f2df0d3a8f79567aeb.png - http://people.freedesktop.org/~mak/appstream/debian/screenshots/624x351/0install-22aeb5e8b09a96f2df0d3a8f79567aeb.png - http://people.freedesktop.org/~mak/appstream/debian/screenshots/112x63/0install-22aeb5e8b09a96f2df0d3a8f79567aeb.png - http://people.freedesktop.org/~mak/appstream/debian/screenshots/752x423/0install-22aeb5e8b09a96f2df0d3a8f79567aeb.png - - - - de - es - sv - -
- - 3dchess.desktop - 3dchess - 3D Chess - 3D chess for X11 - 3D-Schach für X11 - 3dchess.png - - BoardGame - Game - - - 3D - X11 - board - chess - - - - 4digits.desktop - 4digits - 4digits - 猜数字 - 猜數字 - 猜數字 - A guess-the-number game, aka Bulls and Cows - 猜数字游戏 - 猜數字游戲 - 猜數字游戲 - 4digits.png - - Game - LogicGame - - - cs - de - en_GB - es - fr - hu - it - pl - pt_BR - ru - si - tr - zh - zh_CN - zh_TW - - - - kig.desktop - kig - Kig - কিগ - केआईजी - केआईजी - കിഗ് - किग - किग - ਕਿਗ - கிக் - 數學_Kig - Explore Geometric Constructions - Esplorar construcciones xeométriques - Вывучэнне геаметрычных фігур - Геометрични конструкции - জ্যামিতি ছবি আঁকা চর্চা করুন - Istražite geometrijske konstrukcije - Explora construccions geomètriques - Explora construccions geomètriques - Objevujte geometrické konstrukce - Zabôwa geòmetricznëma kònstrukcjama - Udforsk geometriske konstruktioner - Geometrische Konstruktionen untersuchen - Εξερεύνηση γεωμετρικών κατασκευών - Esploru la geometriajn konstruaĵojn - Exploración de construcciones geométricas - Geomeetriliste kujundite tundmaõppimine - Arakatu geometria egiturak - کاوش ساختارهای هندسی - Tutki geometrisia piirroksia - Explorer les constructions géométriques - Taiscéal Tógálacha Céimseatúla - Explora as figuras xeométricas - ભૂમિતિ આકારોને ઓળખો - חקור מבנים גאומטריים - ज्यामितीय कंस्ट्रक्शन एक्सप्लोर करें - ज्यामितीय कंस्ट्रक्सन एक्सप्लोर करव - Istražite geometrijske konstrukcije - Geometriai oktatóprogram - Skoða rúmfræðilega byggingu - Esplora le costruzioni geometriche - 幾何学との対話 - გეომეტრიულ ფიგურათა შესწავლა - Геометриямен айналысу - រុករក​សំណង់​ធរណីមាត្រ - 기하학 탐구하기 - Geometrinių konstrukcijų tyrinėjimas - Iepazīstiet ģeometriskās figūras - ജ്യാമിതീയ നിര്‍മ്മിതികള്‍ കണ്ടുപഠിക്കുക - भूमितीय कंस्ट्रक्शन एक्सप्लोर करा - Utforsk geometriske konstruksjoner - Geometersch Konstrukschonen bekieken - ज्यामिति बनावट अन्वेषण गर्नुहोस् - Meetkundige constructies verkennen - Utforsk geometriske konstruksjonar - ਜੁਮੈਟਰੀ ਸੰਰਚਨਾ ਕਰੋ - Zabawa konstrukcjami geometrycznymi - Explorar Construções Geométricas - Explorar construções geométricas - Explorează construcții geometrice - Работа с геометрическими построениями - Prieskum geometrických konštrukcií - Raziskovanje geometrijskih konstrukcij - Utforska geometriska konstruktioner - Geometrik Yapıları Keşfet - گېئومېتىرىيىلىك قۇرۇلمىلارنى ئانالىز قىلىش - Дослідження геометричних конструкцій - Khám phá các phép Dụng Hình học - 探索几何构造 - 作出幾何圖形 - kig.png - - Education - Math - - - application/x-kgeo - application/x-kig - - - - kiki.desktop - kiki - Kiki - Regular expression testing - kiki.png - - Development - - - - links2.desktop - links2 - Links 2 - Web browser running in both graphics and text mode - Navegador web que funciona tanto no modo texto como no modo gráfico - links2.png - - Network - WebBrowser - - - - linpsk.desktop - linpsk - Linpsk - Amateur Radio Sound Card Communications - linpsk.png - - HamRadio - Network - - - - linuxdcpp.desktop - linuxdcpp - LinuxDC++ - A file-sharing client for the Direct Connect network - linuxdcpp.png - - FileTransfer - Network - P2P - - - cs - et - lt - pl - pt - ro - ru - sv - - - - liquidwar.desktop - liquidwar - Liquid War - A unique multiplayer wargame - liquidwar.png - - ArcadeGame - Game - - - - literki.desktop - literki - Literki - Hacker's keyboard - literki.png - - Application - Utility - - - text/x-vcard - - - - logisim.desktop - logisim - Logisim - Graphical tool for designing and simulating logic circuits - logisim.png - - ComputerScience - Education - Java - Science - - - - maitreya7.desktop - maitreya - Maitreya7 - Astrology Software - maitreya7.png - - Astronomy - Education - Science - - - Astrology - Vedic Astrology - Western Astrology - - - de - es - fr - hu - it - pl - ro - ru - ta - te - - - - massxpert.desktop - massxpert - massXpert - Bio-polymer mass spectrometry software - massxpert.png - - Biology - Chemistry - Education - Science - - - Modelling - Polymer chemistry - Biochemistry - - - - qsapecng.desktop - qsapecng - QSapecNG - Symbolic analyzer of linear analog circuits - Analizzatore simbolico di circuiti analogici lineari - qsapecng.png - - Development - Electronics - - - - xye.desktop - xye - Xye - Solve puzzles and action challenges in order to get all the gems in the room. - xye.png - - Application - Game - - - game - gems - logic - puzzle - - - application/xye-xml - - - - inkscape.desktop - inkscape - Inkscape - אינקסקייפ - ఇంక్‌స్కేప్ - Create and edit Scalable Vector Graphics images - إنشاء و تحرير الرسومات الشعاعية - Стварэньне й зьмяненьне відарысаў вэктарнай ґрафікі (SVG) - Създаване и редакция на изображения Scalable Vector Graphics - স্কেলেবল ভেক্টর গ্রাফিক্স ছবি তৈরী ও সম্পাদনা করুন - Krouiñ hag embann skeudennoù mod SVG (Scalable Vector Graphics) - Creeu i editeu imatges de gràfics de vectors escalables - Creeu i editeu imatges de gràfics de vectors escalables - Vytvářejte a upravujte vektorovou grafiku (SVG) - Opret og redigér SVG-billeder - Skalierbare Vektorgrafiken (SVG) erzeugen und bearbeiten - ཆ་ཚད་འཇལ་བཏུབ་པའི་མཉམ་ཐིག་ཚད་རིས་ཀྱི་གཟུགས་བརྙན་ཚུ་གསར་བསྐྲུན་དང་ཞུན་དག་འབད། - Δημιουργήστε και τροποποιήστε διανυσματικές εικόνες τύπου Scalable Vector Graphics - Eatecray andway editway Alablescay Ectorvay Aphicsgray imagesway - Kreu kaj redaktu bildoj en formato SVG (Scalable Vector Graphics) - Cree y edite Gráficos Vectoriales Escalables (SVG) - SVG-vektorgraafikas piltide joonistamine ja muutmine - Sortu eta editatu Grafiko Bektorial Eskalakor (SVG) irudiak - Luo ja muokkaa Scalable Vector Graphics -piirroksia - Créer et éditer des images Scalable Vector Graphics - Cree e edite imaxes Scalable Vector Graphics - יצירה ועריכה של תמונות בגרפיקת וקטורים נמתחת - Stvaranje i uređivanje vektorskih crteža - Scalable Vector Graphics (méretezhető vektorgrafika, SVG)-képek létrehozása és szerkesztése - Membuat dan mengedit gambar Scalable Vector Graphics - Crea e modifica immagini Scalable Vector Graphics - Scalable Vector Graphics (SVG) イメージの作成と編集を行います - បង្កើត និង​កែសម្រួល​​​រូបភាព​ក្រាហ្វិក​វ៉ិចទ័រ​ដែល​អាច​ធ្វើ​មាត្រដ្ឋាន​បាន​​ - SVG 이미지 생성 및 편집 - Kurti ir redaguoti vektorinius grafinius piešinius - Lag og rediger Skalerbar VektorGrafikk-bilder - स्केलेबुल भेक्टर ग्राफिक्स छविहरू सिर्जना गर्नुहोस् र सम्पादन गर्नुहोस् - SVG-tekeningen (Scalable Vector Graphics) maken en bewerken - Lag og rediger skalerbare vektorbilete (SVG) - ਸਕੇਲੇਬਲ ਵੈਕਟਰ ਗਰਾਫਿਕਸ ਚਿੱਤਰ ਬਣਾਓ ਅਤੇ ਸੋਧੋ - Tworzenie i edycja grafiki wektorowej SVG - Crie e edite imagens Gráficas Vectoriais Escalaveis - Crie e edite desenhos vetoriais escaláveis (SVG) - Creează și editează imagini în format Scalable Vector Graphics - Создание и редактирование масштабируемой векторной графики в формате SVG - Tvorba a úprava obrázkov Scalable Vector Graphics - Ustvarjajte in urejajte vektorske slike SVG - Прављење и уређивање SVG векторских слика - Pravljenje i uređivanje SVG vektorskih slika - Skapa och redigera SVG-bilder - సదిశ రేఖాచిత్రాలని సృష్టించండి మరియు దిద్దుబాటు చేయండి - สร้างและแก้ไขภาพ Scalable Vector Graphics - Ölçeklenebilir Vektör İmgeleri oluşturur ve düzenler - Створення та редагування зображень у форматі SVG - Tạo và sửa ảnh véc-tơ co giãn được - 创建并编辑可缩放矢量图形图像 - 建立和編輯可縮放向量繪圖圖形 - inkscape.png - https://inkscape.org/ - https://inkscape.org/learn/faq/ - - Graphics - VectorGraphics - - - application/illustrator - application/vnd.corel-draw - image/svg+xml - image/svg+xml-compressed - image/x-eps - - - ar - be - bg - br - ca - ca@valencia - cs - da - de - dz - en_GB - en_US@piglatin - eo - es - et - eu - fi - fr - gl - he - hr - hu - id - it - ja - km - ko - lt - nb - ne - nl - pl - pt - pt_BR - ro - ru - sk - sl - sr - sr@latin - sv - uk - vi - zh_CN - zh_TW - - - inkscape - - -
diff -Nru appstream-0.9.4/tests/samples/distro/xmls/limba_6375db4bb7186c39a4860544884575f7.xml appstream-0.12.0/tests/samples/distro/xmls/limba_6375db4bb7186c39a4860544884575f7.xml --- appstream-0.9.4/tests/samples/distro/xmls/limba_6375db4bb7186c39a4860544884575f7.xml 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tests/samples/distro/xmls/limba_6375db4bb7186c39a4860544884575f7.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - neverball.desktop - Neverball - A 3D arcade game with a ball. - -

- Tilt the floor to roll a ball through an obstacle course before time runs - out. - Neverball is part puzzle game, part action game, and entirely a test of - skill. -

-

- The current version includes 141 Neverball levels and 134 Neverputt holes. -

-
- http://neverball.org/ - neverball-1.6.0.png - neverball-1.6.0 - - - 112358 - 42424242 - - - -
-
diff -Nru appstream-0.9.4/tests/samples/org.gnome.Nautilus.desktop appstream-0.12.0/tests/samples/org.gnome.Nautilus.desktop --- appstream-0.9.4/tests/samples/org.gnome.Nautilus.desktop 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/samples/org.gnome.Nautilus.desktop 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,316 @@ +[Desktop Entry] +Name[af]=Lêers +Name[an]=Fichers +Name[ar]=الملفات +Name[as]=ফাইলসমূহ +Name[ast]=Ficheros +Name[be]=Файлы +Name[bg]=Файлове +Name[bn]=ফাইল +Name[bn_IN]=ফাইল +Name[bs]=Datoteke +Name[ca]=Fitxers +Name[ca@valencia]=Fitxers +Name[crh]=Dosyeler +Name[cs]=Soubory +Name[da]=Filer +Name[de]=Dateien +Name[el]=Αρχεία +Name[en_CA]=Files +Name[en_GB]=Files +Name[eo]=Dosieroj +Name[es]=Archivos +Name[et]=Failid +Name[eu]=Fitxategiak +Name[fa]=پرونده‌ها +Name[fi]=Tiedostot +Name[fr]=Fichiers +Name[fur]=File +Name[ga]=Comhaid +Name[gd]=Faidhlichean +Name[gl]=Ficheiros +Name[gu]=ફાઇલો +Name[he]=קבצים +Name[hi]=फ़ाइल +Name[hu]=Fájlok +Name[id]=Berkas +Name[is]=Skrár +Name[it]=File +Name[ja]=ファイル +Name[kk]=Файлдар +Name[kn]=ಕಡತಗಳು +Name[ko]=파일 +Name[ky]=Файлдар +Name[ln]=Ba Fisyé +Name[lt]=Failai +Name[lv]=Datnes +Name[mk]=Датотеки +Name[ml]=ഫയലുകള്‍ +Name[mr]=फाइल्स् +Name[ms]=Fail-fail +Name[nb]=Filer +Name[ne]=फाइलहरू +Name[nl]=Bestanden +Name[nn]=Filer +Name[oc]=Fichièrs +Name[or]=ଫାଇଲଗୁଡିକ +Name[pa]=ਫਾਇਲਾਂ +Name[pl]=Pliki +Name[pt]=Ficheiros +Name[pt_BR]=Arquivos +Name[ro]=Fișiere +Name[ru]=Nautilus +Name[sk]=Súbory +Name[sl]=Datoteke +Name[sr]=Датотеке +Name[sr@latin]=Datoteke +Name[sv]=Filer +Name[ta]=கோப்புகள் +Name[te]=దస్త్రాలు +Name[tg]=Файлҳо +Name[th]=แฟ้ม +Name[tr]=Dosyalar +Name[ug]=ھۆججەتلەر +Name[uk]=Файли +Name[vi]=Tập tin +Name[zh_CN]=文件 +Name[zh_HK]=檔案 +Name[zh_TW]=檔案 +Name=Files +Comment[an]=Accedir a os fichers y organizar-los +Comment[ar]=نظم الملفات وصِل إليها +Comment[as]=অভিগম কৰক আৰু ফাইলসমূহ আয়োজিত কৰক +Comment[ast]=Acceder a los ficheros y organizalos +Comment[be]=Доступ і кіраванне файламі +Comment[bg]=Достъп и управление на файлове +Comment[bn]=ফাইলে ব্যবাহর এবং সাজানো +Comment[bn_IN]=ফাইলগুলি অ্যাক্সেস এবং সংগঠিত করুন +Comment[bs]=Pristupite i organizujte datoteke +Comment[ca]=Organitzeu i accediu a fitxers +Comment[ca@valencia]=Organitzeu i accediu a fitxers +Comment[crh]=Dosyelerge iriş ve olarnı tertiple +Comment[cs]=Přístup k souborům a jejich správa +Comment[da]=Tilgå og organisér filer +Comment[de]=Auf Dateien zugreifen und diese organisieren +Comment[el]=Προσπελάστε και οργανώστε αρχεία +Comment[en_CA]=Access and organize files +Comment[en_GB]=Access and organise files +Comment[eo]=Atingi kaj organizi dosierojn +Comment[es]=Acceder a los archivos y organizarlos +Comment[et]=Ligipääs failidele ning failipuu korrastamine +Comment[fa]=دسترسی و سازماندهی پرونده‌ها +Comment[fi]=Käsittele ja järjestä tiedostoja +Comment[fr]=Accéder aux fichiers et les organiser +Comment[fur]=Dopre e organize file +Comment[ga]=Déan rochtain ar chomhaid agus eagraigh iad +Comment[gd]=Faigh cothrom air faidhlichean is rianaich iad +Comment[gl]=Acceda e organice ficheiros +Comment[gu]=ફાઇલોને વાપરો અને સંચાલિત કરો +Comment[he]=גישה לקבצים וארגונם +Comment[hi]=फ़ाइलों को व्यवस्थित और पहुँच प्राप्त करें +Comment[hu]=Fájlok elérése és rendszerezése +Comment[id]=Mengakses dan mengelola berkas +Comment[is]=Aðgangur og skipulag skráa +Comment[it]=Accede ai file e li organizza +Comment[ja]=ファイルの操作や整理をします +Comment[kk]=Файлдарға қатынау және оларды реттеу +Comment[kn]=ಕಡತಗಳನ್ನು ನಿಲುಕಿಸಿಕೊಳ್ಳಿ ಹಾಗು ವ್ಯವಸ್ಥಿತವಾಗಿ ಜೋಡಿಸಿ +Comment[ko]=파일 조작 및 정리 +Comment[ln]=Koyíngela mpe kobɔngisa ya kásá +Comment[lt]=Atverti ir tvarkyti failus +Comment[lv]=Piekļūt un organizēt datnes +Comment[mk]=Пристапувајте и организирајте датотеки +Comment[ml]=ഫയലുകള്‍ ലഭ്യമാക്കി ക്രമത്തിലാക്കുക +Comment[mr]=फाइल्स्ला प्रवेश द्वया व संघटित करा +Comment[ms]=Akses dan mengurus fail-fail +Comment[nb]=Utforsk og organiser filer +Comment[nl]=Bestanden gebruiken en organiseren +Comment[nn]=Aksesser og organiser filer +Comment[oc]=Accedir als fichièrs e los organizar +Comment[or]=ଫାଇଲମାନଙ୍କୁ ଅଭିଗମ କରନ୍ତୁ ଏବଂ ସଙ୍ଗଠନ କରନ୍ତୁ +Comment[pa]=ਫਾਇਲਾਂ ਦੀ ਵਰਤੋਂ ਤੇ ਪਰਬੰਧ +Comment[pl]=Organizowanie plików +Comment[pt]=Aceder e organizar ficheiros +Comment[pt_BR]=Acesse e organize arquivos +Comment[ro]=Accesați și organizați fișiere +Comment[ru]=Управление файлами +Comment[sk]=Prístupuje k súborom a organizuje ich +Comment[sl]=Dostop in razvrščanje datotek +Comment[sr]=Приступите датотекама и организујте их +Comment[sr@latin]=Pristupite datotekama i organizujte ih +Comment[sv]=Kom åt och organisera filer +Comment[ta]=கோப்புகளை அணுகு மற்றும் ஒழுங்கு படுத்து +Comment[te]=దస్త్రాలను నిర్వహించండి మరియు ప్రాప్తించండి +Comment[tg]=Кушодан ва мураттабсозии файлҳо +Comment[th]=เข้าถึงและจัดระเบียบแฟ้ม +Comment[tr]=Dosyalara erişin ve düzenleyin +Comment[ug]=ھۆججەتلەرنى تەشكىللەش ۋە زىيارەت +Comment[uk]=Доступ до файлів +Comment[vi]=Truy cập và tổ chức tập tin +Comment[zh_CN]=访问和组织文件 +Comment[zh_HK]=存取與組織檔案 +Comment[zh_TW]=存取與組織檔案 +Comment=Access and organize files +# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! +Keywords[af]=folder;manager;explore;disk;filesystem;gids;bestuurder;ontdek;skyf;lêerstelsel;leer; +Keywords[an]=carpeta;chestor;explorar;disco;sistema de fichers; +Keywords[ar]=مجلد;مدير;ملفات;قرص;تصفح; +Keywords[as]=ফোল্ডাৰ;ব্যৱস্থাপক;অন্বেষণ;ডিস্ক;ফাইলচিস্টেম; +Keywords[be]=папка;кіраўнік;прагляд;дыск;файлавая сістэма; +Keywords[bg]=папка;файл;навигация;директория;система;диск;устройство;управление;мениджър;folder;manager;explore;disk;filesystem;directory;file; +Keywords[bn_IN]=ফোল্ডার;ম্যানেজার;এক্সপ্লোর;ডিস্ক;ফাইলসিস্টেম; +Keywords[bs]=direktorij;menadžer;istraživanje;disk;datotečni sistem; +Keywords[ca]=carpeta;gestor;explora;disc;sistema de fitxers; +Keywords[ca@valencia]=carpeta;gestor;explora;disc;sistema de fitxers; +Keywords[crh]=cilbent;idareci;araştır;disk;dosyesistemi; +Keywords[cs]=složka;správce;správa;prohlížení;procházení;disk;souborový systém;systém souborů; +Keywords[da]=mappe;håndtering;udforsk;gennemse;disk;filsystem; +Keywords[de]=Ordner;Verwaltung;Laufwerk;Festplatte;Dateisystem;Dateien; +Keywords[el]=φάκελος;διαχειριστής;εξερεύνηση;δίσκος;σύστημα αρχείων;folder;manager;explore;disk;filesystem; +Keywords[en_GB]=folder;manager;explore;disk;filesystem; +Keywords[eo]=dosierujo;administrilo;foliumi;esplori;disko;dosiersistemo; +Keywords[es]=carpeta;gestor;explorar;disco;sistema de archivos; +Keywords[et]=kaust;kataloog;haldur;haldus;sirvija;sirvimine;ketas;kõvaketas;failisüsteem; +Keywords[fa]=پوشه;مدیر;پویش;دیسک;سیستم‌پرونده;folder;manager;explore;disk;filesystem; +Keywords[fi]=folder;manager;explore;disk;filesystem;kansio;tiedostoselain;levy;tiedostojärjestelmä; +Keywords[fr]=dossier;gestionnaire;explorer;disque;système de fichiers; +Keywords[fur]=cartele;gjestôr;esplore;disc;file;filesystem; +Keywords[gd]=pasgan;manaidsear;rannsaich;diosg;siostam-faidhle; +Keywords[gl]=cartafol;xestor;explorar;disco;sistema de ficheiros; +Keywords[gu]=ફોલ્ડર;સંચાલક;સંશોધન;ડિસ્ક;ફાઇલસિસ્ટમ; +Keywords[he]=תיקייה;מנהל;עיון;סיור;כונן;מערכת קבצים; +Keywords[hi]=folder;manager;explore;disk;filesystem; +Keywords[hu]=mappa;könyvtár;kezelés;kezelő;intéző;lemez;fájlrendszer;commander; +Keywords[id]=folder;manager;explore;disk;filesystem;pengelola;peramban;sistem;berkas; +Keywords[is]=mappa;stjórnun;skoða;diskur;skráakerfi; +Keywords[it]=cartella;gestore;esplora;disco;file;file system; +Keywords[ja]=folder;manager;explore;disk;filesystem;フォルダー;マネージャー;エクスプローラー;ディスク;ファイルシステム; +Keywords[kk]=бума;басқарушы;шолу;диск;файлдық жүйе; +Keywords[kn]=ಕಡತಕೋಶ;ವ್ಯವಸ್ಥಾಪಕ;ಹುಡುಕು;ಡಿಸ್ಕ್‍;ಕಡತವ್ಯವಸ್ಥೆ; +Keywords[ko]=folder;폴더;manager;관리;explore;찾아보기;disk;디스크;filesystem;파일;시스템; +Keywords[ln]=dosíye;moyángeli;motálitali;disiki;fisyé ya sistɛ́mɛ; +Keywords[lt]=aplankas;tvarkytuvė;naršyti;diskas;failų sistema; +Keywords[lv]=mape;pārvaldnieks;pārlūkot;disks;datņu sistēma;datne; +Keywords[ml]=folder;manager;explore;disk;filesystem; +Keywords[mr]=फोल्डर;मॅनेजर;एक्सप्लोर;डिस्क;फाइलसिस्टम; +Keywords[nb]=mappe;håndterer;utforsk;disk;filsystem; +Keywords[nl]=folder;manager;explore;disk;filesystem;map;beheer;verkenner;schijf;bestandssysteem; +Keywords[oc]=dorsièr;gestionari;explorar;disc;sistèma de fichièrs; +Keywords[or]=ଫୋଲଡର;ପରିଚାଳକ;ଅନ୍ୱେଷଣ;ଡିସ୍କ;ଫାଇଲତନ୍ତ୍ର; +Keywords[pa]=ਫੋਲਡਰ;ਮੈਨੇਜਰ;explore;ਡਿਸਕ;ਫਾਇਲ-ਸਿਸਟਮ; +Keywords[pl]=katalog;folder;menedżer;menadżer;manadżer;manedżer;manager;eksploruj;eksplorator;dysk;system plików; +Keywords[pt]=pasta;gestor;explorar;disco;sistema;ficheiros; +Keywords[pt_BR]=pasta;gerenciador;explorar;disco;sistema de arquivos; +Keywords[ro]=folder;manager;explore;disk;filesystem;administrator;dosar;disc;sistem; +Keywords[ru]=папка;менеджер;обзор;диск;файловая система; +Keywords[sk]=priečinok;správca;prehliadať;disk;systém súborov; +Keywords[sl]=mapa;upravljalnik;datoteke;raziskovalec;datotečni sistem;disk; +Keywords[sr]=фасцикла;фолдер;управник;менаџер;истражи;диск;систем датотека;фајлсистем;fascikla;folder;upravnik;menadžer;menadzer;istraži;istrazi;sistem datoteka;fajlsistem;folder;manager;explore;disk;filesystem; +Keywords[sr@latin]=fascikla;folder;upravnik;menadžer;istraži;disk;sistem datoteka;fajlsistem;фасцикла;фолдер;управник;менаџер;истражи;диск;систем датотека;фајлсистем;folder;manager;explore;disk;filesystem; +Keywords[sv]=mapp;hanterare;utforskare;disk;filsystem; +Keywords[ta]=அடைவு;மேலாளர்;ஆராய்வு;வட்டு;கோப்புமுறைமை; +Keywords[te]=సంచయం;నిర్వాహకం;అన్వేషించండి;డిస్కు;దస్త్రవ్యవస్థ; +Keywords[tg]=ҷузвдон;мудир;тамошо;диск;системаи файлӣ; +Keywords[th]=โฟลเดอร์;เครื่องมือจัดการ;สำรวจ;ดิสก์;ระบบแฟ้ม; +Keywords[tr]=klasör;yönetici;gezgin;keşfet;gözat;disk;dosya sistemi; +Keywords[ug]=folder;manager;explore;disk;filesystem;قىسقۇچ;باشقۇرغۇ;دىسكا;ھۆججەت سىستېمىسى; +Keywords[uk]=тека;менеджер;папка;диск;файл; +Keywords[vi]=folder;thư;mục;thu;muc;manager;quản;lý;quan;ly;explore;khám;phá;kham;pha;disk;đĩa;dia;filesystem;hệ;thống;tập;tin;he;thong;tap; +Keywords[zh_CN]=folder;manager;explore;disk;filesystem;目录;文件夹;管理;浏览;磁盘;硬盘;文件系统; +Keywords[zh_HK]=folder;manager;explore;disk;filesystem;資料夾;管理程式;磁碟;檔案系統; +Keywords[zh_TW]=folder;manager;explore;disk;filesystem;資料夾;管理員;磁碟;檔案系統; +Keywords=folder;manager;explore;disk;filesystem; +Exec=nautilus --new-window %U +# Translators: Do NOT translate or transliterate this text (this is an icon file name)! +Icon[ca]=org.gnome.Nautilus +Icon[cs]=org.gnome.Nautilus +Icon[da]=org.gnome.Nautilus +Icon[de]=org.gnome.Nautilus +Icon[en_GB]=org.gnome.Nautilus +Icon[es]=org.gnome.Nautilus +Icon[fa]=org.gnome.Nautilus +Icon[fi]=org.gnome.Nautilus +Icon[fr]=org.gnome.Nautilus +Icon[fur]=org.gnome.Nautilus +Icon[gd]=org.gnome.Nautilus +Icon[gl]=org.gnome.Nautilus +Icon[he]=org.gnome.Nautilus +Icon[hu]=org.gnome.Nautilus +Icon[id]=org.gnome.Nautilus +Icon[kk]=org.gnome.Nautilus +Icon[ko]=org.gnome.Nautilus +Icon[lt]=org.gnome.Nautilus +Icon[lv]=org.gnome.Nautilus +Icon[nl]=org.gnome.Nautilus +Icon[pa]=org.gnome.Nautilus +Icon[pl]=org.gnome.Nautilus +Icon[pt_BR]=org.gnome.Nautilus +Icon[ru]=org.gnome.Nautilus +Icon[sk]=org.gnome.Nautilus +Icon[sr]=org.gnome.Nautilus +Icon[sr@latin]=org.gnome.Nautilus +Icon[sv]=org.gnome.Nautilus +Icon[th]=org.gnome.Nautilus +Icon[uk]=org.gnome.Nautilus +Icon[vi]=org.gnome.Nautilus +Icon=org.gnome.Nautilus +Terminal=false +Type=Application +DBusActivatable=true +StartupNotify=true +Categories=GNOME;GTK;Utility;Core;FileManager; +MimeType=inode/directory;application/x-gnome-saved-search; +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=nautilus +X-GNOME-Bugzilla-Component=general +X-GNOME-Bugzilla-Version=@VERSION@ +X-GNOME-UsesNotifications=true +Actions=new-window; + +[Desktop Action new-window] +Name[bg]=Нов прозорец +Name[ca]=Finestra nova +Name[cs]=Nové okno +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[el]=Νέο παράθυρο +Name[en_GB]=New Window +Name[es]=Ventana nueva +Name[fa]=پنجره نو +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[fur]=Gnûf barcon +Name[gd]=Uinneag ùr +Name[gl]=Nova xanela +Name[he]=חלון חדש +Name[hu]=Új ablak +Name[id]=Jendela Baru +Name[is]=Nýr gluggi +Name[it]=Nuova finestra +Name[ja]=新しいウィンドウ +Name[kk]=Жаңа терезе +Name[ko]=새 창 +Name[ln]=Lininísa ya sika +Name[lt]=Naujas langas +Name[lv]=Jauns logs +Name[nb]=Nytt vindu +Name[nl]=Nieuw venster +Name[oc]=Fenèstra novèla +Name[pa]=ਨਵੀਂ ਵਿੰਡੋ +Name[pl]=Nowe okno +Name[pt]=Nova janela +Name[pt_BR]=Nova janela +Name[ru]=Создать окно +Name[sk]=Nové okno +Name[sl]=Novo okno +Name[sr]=Нови прозор +Name[sr@latin]=Novi prozor +Name[sv]=Nytt fönster +Name[th]=หน้าต่างใหม่ +Name[tr]=Yeni Pencere +Name[uk]=Нове вікно +Name[vi]=Cửa sổ mới +Name[zh_CN]=新建窗口 +Name[zh_TW]=新增視窗 +Name=New Window +Exec=nautilus --new-window diff -Nru appstream-0.9.4/tests/samples/org.kde.ksysguard.desktop appstream-0.12.0/tests/samples/org.kde.ksysguard.desktop --- appstream-0.9.4/tests/samples/org.kde.ksysguard.desktop 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/samples/org.kde.ksysguard.desktop 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,208 @@ +[Desktop Entry] +Name=KSysGuard +Name[ar]=حارس نظامك +Name[ast]=KSysGuard +Name[bg]=Системна защита +Name[br]=KSysGuard +Name[bs]=KSysGuard +Name[ca]=KSysGuard +Name[ca@valencia]=KSysGuard +Name[cs]=KSysGuard +Name[csb]=Wachtôrz Systemë KDE +Name[cy]=KSysGuard +Name[da]=KSysGuard +Name[de]=KSysGuard +Name[el]=KSysGuard +Name[en_GB]=KSysGuard +Name[eo]=KDE-Sistemobservilo +Name[es]=KSysGuard +Name[et]=KSysGuard +Name[eu]=KSysGuard +Name[fi]=KSysGuard +Name[fr]=KSysGuard +Name[fy]=KSysGuard +Name[ga]=KSysGuard +Name[gl]=KSysGuard +Name[gu]=KSysGuard +Name[he]=KSysGuard +Name[hi]=केडीई तंत्र रक्षक +Name[hr]=KSysGuard +Name[hu]=KSysGuard +Name[ia]=KSysGuard +Name[id]=KSysGuard +Name[is]=KDE kerfisvörður +Name[it]=KSysGuard +Name[ja]=KSysGuard +Name[ka]=KSysGuard +Name[kk]=KSysGuard +Name[km]=KSysGuard +Name[kn]=KSysGuard +Name[ko]=KSysGuard +Name[lt]=KSysGuard +Name[lv]=KSysGuard +Name[mk]=KSysGuard +Name[ml]=കെസിസ്ഗാര്‍ഡ് +Name[mr]=के सिसगार्ड +Name[nb]=KSysGuard +Name[nds]=KSysGuard +Name[nl]=KSysGuard +Name[nn]=KSysGuard +Name[pa]=ਕੇਸਿਸ-ਗਾਰਡ +Name[pl]=Monitor systemu KDE +Name[pt]=KSysGuard +Name[pt_BR]=KSysGuard +Name[ro]=KGardianSistem +Name[ru]=Системный монитор +Name[si]=KSysGuard +Name[sk]=KSysGuard +Name[sl]=KSysGuard +Name[sr]=К‑систембран +Name[sr@ijekavian]=К‑систембран +Name[sr@ijekavianlatin]=K‑sistembran +Name[sr@latin]=K‑sistembran +Name[sv]=KDE:s systemövervakare +Name[tg]=Ҳифзи системаи KDE +Name[th]=ป้องกันระบบ-K +Name[tr]=KSysGuard +Name[ug]=KSysGuard +Name[uk]=KSysGuard +Name[uz]=KDE tizim nazoratchisi +Name[uz@cyrillic]=KDE тизим назоратчиси +Name[vi]=KSysGuard +Name[wa]=KSisGåde +Name[xh]=KSysGuard +Name[x-test]=xxKSysGuardxx +Name[zh_CN]=KDE 系统卫士 +Name[zh_TW]=KSysGuard +GenericName=System Monitor +GenericName[af]=Stelsel Monitor +GenericName[ar]=مراقب النّظام +GenericName[as]=ব্যৱস্থাপ্ৰণালীৰ নিৰীক্ষণ ব্যৱস্থা +GenericName[ast]=Monitor del sistema +GenericName[be]=Сістэма +GenericName[be@latin]=Systemny nazirańnik +GenericName[bg]=Наблюдение на системата +GenericName[bn]=সিস্টেম মনিটর +GenericName[bn_IN]=সিস্টেম নিরীক্ষণ ব্যবস্থা +GenericName[br]=Diskwel saviad ar reizhiad +GenericName[bs]=Nadzornik sistema +GenericName[ca]=Monitor del sistema +GenericName[ca@valencia]=Monitor del sistema +GenericName[cs]=Monitor systému +GenericName[csb]=Mònitor systemë +GenericName[cy]=Monitr Cysawd +GenericName[da]=Systemovervågning +GenericName[de]=Systemmonitor +GenericName[el]=Επόπτης συστήματος +GenericName[en_GB]=System Monitor +GenericName[eo]=Sistemstato-programo +GenericName[es]=Monitor del sistema +GenericName[et]=Süsteemi jälgija +GenericName[eu]=Sistema-monitorea +GenericName[fa]=نمایشگر سیستم +GenericName[fi]=Järjestelmänvalvontaohjelma +GenericName[fr]=Surveillance du système +GenericName[fy]=Systeemmonitor +GenericName[ga]=Monatóir Córais +GenericName[gl]=Vixilante do sistema +GenericName[gu]=સિસ્ટમ દેખરેખ +GenericName[he]=מוניטור המערכת +GenericName[hi]=तंत्र मॉनीटर +GenericName[hne]=तंत्र देखइया +GenericName[hr]=Nadzor sustava +GenericName[hsb]=Systemowy monitor +GenericName[hu]=Rendszermonitor +GenericName[ia]=Monitor de systema +GenericName[id]=Monitor Sistem +GenericName[is]=Kerfiseftirlit +GenericName[it]=Monitor di sistema +GenericName[ja]=システムモニタ +GenericName[ka]=სისტემის მონიტორი +GenericName[kk]=Жүйе мониторы +GenericName[km]=កម្មវិធី​ត្រួត​ពិនិត្យ​ប្រព័ន្ធ +GenericName[kn]=ವ್ಯವಸ್ಥೆಯ ಪ್ರದರ್ಶಕ +GenericName[ko]=시스템 모니터 +GenericName[ku]=Temaşekarê Pergalê +GenericName[lt]=Sistemos stebėtojas +GenericName[lv]=Sistēmas monitors +GenericName[mai]=सिस्टम मानीटर +GenericName[mk]=Системски монитор +GenericName[ml]=വ്യൂഹനിരീക്ഷണി +GenericName[mr]=प्रणाली मॉनिटर +GenericName[ms]=Monitor Sistem +GenericName[nb]=Systemovervåker +GenericName[nds]=Systeemkieker +GenericName[ne]=प्रणाली मनिटर +GenericName[nl]=Systeemmonitor +GenericName[nn]=Systemovervakar +GenericName[oc]=Monitor sistèma +GenericName[or]=ତନ୍ତ୍ର ପ୍ରଦର୍ଶିକା +GenericName[pa]=ਸਿਸਟਮ ਨਿਗਰਾਨ +GenericName[pl]=Monitor systemu +GenericName[pt]=Monitor do Sistema +GenericName[pt_BR]=Monitor do sistema +GenericName[ro]=Monitor de sistem +GenericName[ru]=Системный монитор +GenericName[se]=Vuogádatgoziheaddji +GenericName[si]=පද්ධති නිරීක්‍ෂකය +GenericName[sk]=Monitor systému +GenericName[sl]=Sistemski nadzornik +GenericName[sr]=Надзорник система +GenericName[sr@ijekavian]=Надзорник система +GenericName[sr@ijekavianlatin]=Nadzornik sistema +GenericName[sr@latin]=Nadzornik sistema +GenericName[sv]=Systemövervakare +GenericName[ta]=அமைப்பு கண்காணிப்பு +GenericName[te]=సిస్టమ్ మానిటర్ +GenericName[tg]=Намоишгари система +GenericName[th]=สอดส่องการทำงานของระบบ +GenericName[tr]=Sistem İzleyici +GenericName[ug]=سىستېما كۆزەتكۈچ +GenericName[uk]=Монітор системи +GenericName[uz]=Tizimni nazorat qilish +GenericName[uz@cyrillic]=Тизимни назорат қилиш +GenericName[vi]=Trình theo dõi hệ thống +GenericName[wa]=Corwaitoe do sistinme +GenericName[xh]=Indlela yokusebenza Yophatho +GenericName[x-test]=xxSystem Monitorxx +GenericName[zh_CN]=系统监视器 +GenericName[zh_TW]=系統監視器 +Comment=Monitor running processes and system performance +Comment[ca]=Controlador de processos en execució i rendiment del sistema +Comment[ca@valencia]=Controlador de processos en execució i rendiment del sistema +Comment[da]=Overvåg kørende processer og systemets ydelse +Comment[de]=Laufende Prozess und Systemauslastung überwachen +Comment[el]=Επόπτης εκτελούμενων διεργασιών και απόδοσης συστήματος +Comment[en_GB]=Monitor running processes and system performance +Comment[es]=Monitor de procesos en ejecución y del rendimiento del sistema +Comment[et]=Töötavate protsesside ja süsteemi jõudluse jälgimine +Comment[fi]=Tarkkaile käynnissä olevia prosesseja ja järjestelmän suorituskykyä +Comment[gl]=Vixiar os procesos en execución e o rendemento do sistema. +Comment[he]=מנטר תהליכים פיעילים וביצועי מערכת +Comment[nl]=Actieve processen en systeemprestaties monitoren +Comment[nn]=Overvak køyrande prosessar og systemyting +Comment[pl]=Monitoruje uruchomione procesy i wydajność systemu +Comment[pt]=Vigiar os processos em execução e a performance do sistema +Comment[pt_BR]=Monitora os processos em execução e o desempenho do sistema +Comment[ru]=Наблюдение за процессами и производительностью системы +Comment[sk]=Monitoruje spustené procesy a výkon systému +Comment[sl]=Nadzirajte tekoča opravila in zmogljivost sistema +Comment[sr]=Надгледајте процесе у раду и перформансе система +Comment[sr@ijekavian]=Надгледајте процесе у раду и перформансе система +Comment[sr@ijekavianlatin]=Nadgledajte procese u radu i performanse sistema +Comment[sr@latin]=Nadgledajte procese u radu i performanse sistema +Comment[sv]=Övervaka processor som kör och systemprestanda +Comment[uk]=Стеження за процесами та швидкодією системи +Comment[x-test]=xxMonitor running processes and system performancexx +Comment[zh_CN]=监视运行的进程和系统效率 +Comment[zh_TW]=監視執行中的行程與系統效能 +Exec=ksysguard %U +Icon=utilities-system-monitor +Type=Application +MimeType=application/x-ksysguard; +X-DocPath=ksysguard/index.html +Terminal=false +StartupNotify=true +X-DBUS-StartupType=Multi +Categories=Qt;KDE;System; +X-DBUS-ServiceName=org.kde.ksysguard diff -Nru appstream-0.9.4/tests/test-basics.c appstream-0.12.0/tests/test-basics.c --- appstream-0.9.4/tests/test-basics.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tests/test-basics.c 2018-04-04 15:53:56.000000000 +0000 @@ -20,38 +20,47 @@ #include #include "appstream.h" +#include "as-component-private.h" + +#include "as-test-utils.h" static gchar *datadir = NULL; -void -test_menuparser () +/** + * test_categories: + * + * Test #AsCategory properties. + */ +static void +test_categories () { - AsMenuParser *parser; - GList *menu_dirs; - gchar *path; - - path = g_build_filename (datadir, "categories.xml", NULL); - parser = as_menu_parser_new_from_file (path); - g_free (path); + g_autoptr(GPtrArray) default_cats; - menu_dirs = as_menu_parser_parse (parser); - g_assert (g_list_length (menu_dirs) > 4); - - g_object_unref (parser); - g_list_free (menu_dirs); + default_cats = as_get_default_categories (TRUE); + g_assert_cmpint (default_cats->len, ==, 10); } -void +/** + * test_simplemarkup: + * + * Test as_description_markup_convert_simple() + */ +static void test_simplemarkup () { - gchar *str; - str = as_description_markup_convert_simple ("

Test!

Blah.

  • A
  • B

End.

"); - g_debug ("%s", str); + g_autofree gchar *str = NULL; + GError *error = NULL; + + str = as_markup_convert_simple ("

Test!

Blah.

  • A
  • B

End.

", &error); + g_assert_no_error (error); + g_assert (g_strcmp0 (str, "Test!\n\nBlah.\n • A\n • B\n\nEnd.") == 0); - g_free (str); } -gchar** +/** + * _get_dummy_strv: + */ +static gchar** _get_dummy_strv (const gchar *value) { gchar **strv; @@ -63,7 +72,12 @@ return strv; } -void +/** + * test_component: + * + * Test basic properties of an #AsComponent. + */ +static void test_component () { AsComponent *cpt; @@ -85,21 +99,21 @@ metad = as_metadata_new (); as_metadata_add_component (metad, cpt); - str = as_metadata_component_to_upstream_xml (metad); - str2 = as_metadata_components_to_distro_xml (metad); + str = as_metadata_component_to_metainfo (metad, AS_FORMAT_KIND_XML, NULL); + str2 = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_XML, NULL); g_object_unref (metad); g_debug ("%s", str2); g_assert_cmpstr (str, ==, "\n" - "\n" + "\n" " org.example.test.desktop\n" " Test\n" " It does things\n" " fedex\n" "\n"); g_assert_cmpstr (str2, ==, "\n" - "\n" - " \n" + "\n" + " \n" " org.example.test.desktop\n" " Test\n" " It does things\n" @@ -111,6 +125,260 @@ g_free (str2); } +/** + * test_translation_fallback: + * + * Test that the AS_VALUE_FLAGS_NO_TRANSLATION_FALLBACK flag works. + */ +static void +test_translation_fallback (void) +{ + g_autoptr(AsComponent) cpt = NULL; + AsValueFlags flags; + + cpt = as_component_new (); + as_component_set_kind (cpt, AS_COMPONENT_KIND_DESKTOP_APP); + as_component_set_id (cpt, "org.example.ATargetComponent"); + as_component_set_description (cpt, "

It's broken!

", "C"); + flags = as_component_get_value_flags (cpt); + + /* there is no de translation */ + as_component_set_active_locale (cpt, "de"); + g_assert_nonnull (as_component_get_description (cpt)); + + /* if the flag is set, we don't fall back to C */ + as_flags_add (flags, AS_VALUE_FLAG_NO_TRANSLATION_FALLBACK); + as_component_set_value_flags (cpt, flags); + g_assert_null (as_component_get_description (cpt)); + + /* ...but after removing it, again we do */ + as_flags_remove (flags, AS_VALUE_FLAG_NO_TRANSLATION_FALLBACK); + as_component_set_value_flags (cpt, flags); + g_assert_nonnull (as_component_get_description (cpt)); +} + +/** + * test_spdx: + * + * Test SPDX license description parsing. + */ +static void +test_spdx (void) +{ + gchar **tok; + gchar *tmp; + + /* simple */ + tok = as_spdx_license_tokenize ("LGPL-2.0+"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "@LGPL-2.0+"); + g_strfreev (tok); + g_free (tmp); + + /* empty */ + tok = as_spdx_license_tokenize (""); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, ""); + g_strfreev (tok); + g_free (tmp); + + /* invalid */ + tok = as_spdx_license_tokenize (NULL); + g_assert (tok == NULL); + + /* random */ + tok = as_spdx_license_tokenize ("Public Domain"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "Public Domain"); + g_strfreev (tok); + g_free (tmp); + + /* multiple licences */ + tok = as_spdx_license_tokenize ("LGPL-2.0+ AND GPL-2.0 AND LGPL-3.0"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "@LGPL-2.0+ & @GPL-2.0 & @LGPL-3.0"); + g_strfreev (tok); + g_free (tmp); + + /* multiple licences, using the new style */ + tok = as_spdx_license_tokenize ("LGPL-2.0-or-later AND GPL-2.0-only"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "@LGPL-2.0+ & @GPL-2.0"); + g_strfreev (tok); + g_free (tmp); + + /* multiple licences, deprectated 'and' & 'or' */ + tok = as_spdx_license_tokenize ("LGPL-2.0+ and GPL-2.0 or LGPL-3.0"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "@LGPL-2.0+ & @GPL-2.0 | @LGPL-3.0"); + g_strfreev (tok); + g_free (tmp); + + /* brackets */ + tok = as_spdx_license_tokenize ("LGPL-2.0+ and (GPL-2.0 or GPL-2.0+) and MIT"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "@LGPL-2.0+ & ( @GPL-2.0 | @GPL-2.0+ ) & @MIT"); + g_strfreev (tok); + g_free (tmp); + + /* detokenisation */ + tok = as_spdx_license_tokenize ("LGPLv2+ and (QPL or GPLv2) and MIT"); + tmp = as_spdx_license_detokenize (tok); + g_assert_cmpstr (tmp, ==, "LGPLv2+ AND (QPL OR GPLv2) AND MIT"); + g_strfreev (tok); + g_free (tmp); + + /* "+" operator */ + tok = as_spdx_license_tokenize ("CC-BY-SA-3.0+ AND Zlib"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "@CC-BY-SA-3.0 + & @Zlib"); + g_free (tmp); + tmp = as_spdx_license_detokenize (tok); + g_assert_cmpstr (tmp, ==, "CC-BY-SA-3.0+ AND Zlib"); + g_strfreev (tok); + g_free (tmp); + + /* detokenisation literals */ + tok = as_spdx_license_tokenize ("Public Domain"); + tmp = as_spdx_license_detokenize (tok); + g_assert_cmpstr (tmp, ==, "Public Domain"); + g_strfreev (tok); + g_free (tmp); + + /* invalid tokens */ + tmp = as_spdx_license_detokenize (NULL); + g_assert (tmp == NULL); + + /* leading brackets */ + tok = as_spdx_license_tokenize ("(MPLv1.1 or LGPLv3+) and LGPLv3"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "( MPLv1.1 | LGPLv3+ ) & LGPLv3"); + g_strfreev (tok); + g_free (tmp); + + /* trailing brackets */ + tok = as_spdx_license_tokenize ("MPLv1.1 and (LGPLv3 or GPLv3)"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "MPLv1.1 & ( LGPLv3 | GPLv3 )"); + g_strfreev (tok); + g_free (tmp); + + /* deprecated names */ + tok = as_spdx_license_tokenize ("CC0 and (CC0 or CC0)"); + tmp = g_strjoinv (" ", tok); + g_assert_cmpstr (tmp, ==, "@CC0-1.0 & ( @CC0-1.0 | @CC0-1.0 )"); + g_strfreev (tok); + g_free (tmp); + + /* SPDX strings */ + g_assert (as_is_spdx_license_expression ("CC0-1.0")); + g_assert (as_is_spdx_license_expression ("CC0")); + g_assert (as_is_spdx_license_expression ("LicenseRef-proprietary")); + g_assert (as_is_spdx_license_expression ("CC0-1.0 and GFDL-1.3")); + g_assert (as_is_spdx_license_expression ("CC0-1.0 AND GFDL-1.3")); + g_assert (as_is_spdx_license_expression ("CC-BY-SA-3.0+")); + g_assert (as_is_spdx_license_expression ("CC-BY-SA-3.0+ AND Zlib")); + g_assert (as_is_spdx_license_expression ("NOASSERTION")); + g_assert (!as_is_spdx_license_expression ("CC0 dave")); + g_assert (!as_is_spdx_license_expression ("")); + g_assert (!as_is_spdx_license_expression (NULL)); + + /* importing non-SPDX formats */ + tmp = as_license_to_spdx_id ("CC0 and (Public Domain and GPLv3+ with exceptions)"); + g_assert_cmpstr (tmp, ==, "CC0-1.0 AND (LicenseRef-public-domain AND GPL-3.0+)"); + g_free (tmp); + + /* licenses suitable for metadata licensing */ + g_assert (as_license_is_metadata_license ("CC0")); + g_assert (as_license_is_metadata_license ("CC0-1.0")); + g_assert (as_license_is_metadata_license ("0BSD")); + g_assert (as_license_is_metadata_license ("MIT AND FSFAP")); + g_assert (!as_license_is_metadata_license ("GPL-2.0 AND FSFAP")); +} + +/** + * test_desktop_entry: + * + * Test reading a desktop-entry. + */ +static void +test_desktop_entry () +{ + g_autoptr(AsMetadata) metad = NULL; + g_autofree gchar *nautilus_de_fname = NULL; + g_autofree gchar *ksysguard_de_fname = NULL; + g_autofree gchar *expected_xml = NULL; + g_autoptr(GFile) file = NULL; + g_autoptr(GError) error = NULL; + AsComponent *cpt; + GPtrArray *cpts; + guint i; + gchar *tmp; + + nautilus_de_fname = g_build_filename (datadir, "org.gnome.Nautilus.desktop", NULL); + ksysguard_de_fname = g_build_filename (datadir, "org.kde.ksysguard.desktop", NULL); + + /* Nautilus */ + file = g_file_new_for_path (nautilus_de_fname); + + metad = as_metadata_new (); + as_metadata_parse_file (metad, file, AS_FORMAT_KIND_UNKNOWN, &error); + g_assert_no_error (error); + cpt = as_metadata_get_component (metad); + + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.gnome.Nautilus"); + g_assert_cmpint (as_component_get_kind (cpt), ==, AS_COMPONENT_KIND_DESKTOP_APP); + + as_component_set_active_locale (cpt, "C"); + g_assert_cmpstr (as_component_get_name (cpt), ==, "Files"); + + as_component_set_active_locale (cpt, "lt"); + g_assert_cmpstr (as_component_get_name (cpt), ==, "Failai"); + + /* clear */ + g_object_unref (file); + file = NULL; + as_metadata_clear_components (metad); + + /* KSysGuard */ + file = g_file_new_for_path (ksysguard_de_fname); + as_metadata_parse_file (metad, file, AS_FORMAT_KIND_UNKNOWN, &error); + g_assert_no_error (error); + cpt = as_metadata_get_component (metad); + + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.kde.ksysguard"); + g_assert_cmpint (as_component_get_kind (cpt), ==, AS_COMPONENT_KIND_DESKTOP_APP); + + as_component_set_active_locale (cpt, "C"); + g_assert_cmpstr (as_component_get_name (cpt), ==, "KSysGuard"); + + /* validate everything */ + + /* add nautilus again */ + g_object_unref (file); + file = g_file_new_for_path (nautilus_de_fname); + as_metadata_parse_file (metad, file, AS_FORMAT_KIND_DESKTOP_ENTRY, &error); + g_assert_no_error (error); + + /* adjust the priority */ + cpts = as_metadata_get_components (metad); + for (i = 0; i < cpts->len; i++) { + cpt = AS_COMPONENT (g_ptr_array_index (cpts, i)); + as_component_set_priority (cpt, -1); + } + + /* get expected XML */ + tmp = g_build_filename (datadir, "desktop-converted.xml", NULL); + g_file_get_contents (tmp, &expected_xml, NULL, &error); + g_assert_no_error (error); + g_free (tmp); + + tmp = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_XML, &error); + g_assert_no_error (error); + g_assert (as_test_compare_lines (tmp, expected_xml)); + g_free (tmp); +} + int main (int argc, char **argv) { @@ -131,9 +399,12 @@ /* only critical and error are fatal */ g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); - g_test_add_func ("/AppStream/MenuParser", test_menuparser); + g_test_add_func ("/AppStream/Categories", test_categories); g_test_add_func ("/AppStream/SimpleMarkupConvert", test_simplemarkup); g_test_add_func ("/AppStream/Component", test_component); + g_test_add_func ("/AppStream/SPDX", test_spdx); + g_test_add_func ("/AppStream/TranslationFallback", test_translation_fallback); + g_test_add_func ("/AppStream/DesktopEntry", test_desktop_entry); ret = g_test_run (); g_free (datadir); diff -Nru appstream-0.9.4/tests/test-database.c appstream-0.12.0/tests/test-database.c --- appstream-0.9.4/tests/test-database.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tests/test-database.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Copyright (C) 2012-2014 Matthias Klumpp - * - * Licensed under the GNU Lesser General Public License Version 2.1 - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the license, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include -#include - -#include "appstream.h" -#include "../src/as-cache-builder.h" -#include "../src/as-utils-private.h" - -static gchar *datadir = NULL; - -void -msg (const gchar *s) -{ - g_printf ("%s\n", s); -} - -void -print_cptarray (GPtrArray *cpt_array) -{ - guint i; - - g_printf ("----\n"); - for (i = 0; i < cpt_array->len; i++) { - AsComponent *cpt; - cpt = (AsComponent*) g_ptr_array_index (cpt_array, i); - - g_printf (" - %s\n", - as_component_to_string (cpt)); - } - g_printf ("----\n"); -} - -gchar* -test_database_create () -{ - g_autoptr(AsCacheBuilder) builder = NULL; - GError *error = NULL; - gchar *db_path; - gchar **strv; - gboolean ret; - - g_mkdir_with_parents ("/var/tmp/appstream-tests/", 0755); - db_path = g_strdup ("/var/tmp/appstream-tests/libas-dbtest-XXXXXX"); - db_path = g_mkdtemp (db_path); - g_assert (db_path != NULL); - - /* we use some sample-data to simulate loading distro data */ - strv = g_new0 (gchar*, 2); - strv[0] = g_build_filename (datadir, "distro", NULL); - - builder = as_cache_builder_new (); - as_cache_builder_set_data_source_directories (builder, strv); - g_strfreev (strv); - - ret = as_cache_builder_setup (builder, db_path, &error); - g_assert_no_error (error); - g_assert (ret); - - /* build the cache for the first time (enforcing build) */ - ret = as_cache_builder_refresh (builder, TRUE, &error); - g_assert_no_error (error); - g_assert (ret); - - /* if we refresh the cache for the second time, we should receive FALSE, as we don't need to update it again */ - ret = as_cache_builder_refresh (builder, FALSE, &error); - g_assert_no_error (error); - g_assert (!ret); - - return db_path; -} - -void -test_database_read (const gchar *dbpath) -{ - AsDatabase *db; - GPtrArray *cpts = NULL; - GPtrArray *rels; - AsRelease *rel; - AsComponent *cpt; - g_autoptr(GError) error = NULL; - - db = as_database_new (); - as_database_set_location (db, dbpath); - as_database_open (db, &error); - g_assert_no_error (error); - - cpts = as_database_get_all_components (db, &error); - g_assert_no_error (error); - g_assert (cpts != NULL); - - print_cptarray (cpts); - - msg ("=============================="); - - cpts = as_database_find_components (db, "kig", NULL, &error); - g_assert_no_error (error); - print_cptarray (cpts); - g_assert (cpts->len == 1); - cpt = (AsComponent*) g_ptr_array_index (cpts, 0); - g_assert_cmpstr (as_component_get_pkgnames (cpt)[0], ==, "kig"); - g_ptr_array_unref (cpts); - - cpts = as_database_find_components (db, NULL, "science", &error); - g_assert_no_error (error); - print_cptarray (cpts); - g_assert (cpts->len == 3); - g_ptr_array_unref (cpts); - - cpts = as_database_find_components (db, "logic", "science", &error); - g_assert_no_error (error); - print_cptarray (cpts); - g_assert (cpts->len == 1); - g_ptr_array_unref (cpts); - - cpts = as_database_find_components (db, "logic", NULL, &error); - g_assert_no_error (error); - print_cptarray (cpts); - g_assert (cpts->len == 2); - g_ptr_array_unref (cpts); - - cpts = as_database_get_components_by_provided_item (db, AS_PROVIDED_KIND_BINARY, "inkscape", &error); - g_assert_no_error (error); - print_cptarray (cpts); - g_assert (cpts->len == 1); - cpt = (AsComponent*) g_ptr_array_index (cpts, 0); - - g_assert_cmpstr (as_component_get_name (cpt), ==, "Inkscape"); - g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_HOMEPAGE), ==, "https://inkscape.org/"); - g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_FAQ), ==, "https://inkscape.org/learn/faq/"); - - g_ptr_array_unref (cpts); - - /* test a component in a different file, with no package but a bundle instead */ - cpt = as_database_get_component_by_id (db, "neverball.desktop", &error); - g_assert_no_error (error); - g_assert_nonnull (cpt); - - g_assert_cmpstr (as_component_get_name (cpt), ==, "Neverball"); - g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_HOMEPAGE), ==, "http://neverball.org/"); - g_assert_cmpstr (as_component_get_bundle_id (cpt, AS_BUNDLE_KIND_LIMBA), ==, "neverball-1.6.0"); - - rels = as_component_get_releases (cpt); - g_assert_cmpint (rels->len, ==, 2); - - rel = AS_RELEASE (g_ptr_array_index (rels, 0)); - g_assert_cmpstr (as_release_get_version (rel), ==, "1.6.1"); - g_assert_cmpuint (as_release_get_timestamp (rel), ==, 123465888); - g_assert (as_release_get_urgency (rel) == AS_URGENCY_KIND_LOW); - g_assert_cmpuint (as_release_get_size (rel, AS_SIZE_KIND_DOWNLOAD), ==, 112358); - g_assert_cmpuint (as_release_get_size (rel, AS_SIZE_KIND_INSTALLED), ==, 42424242); - - rel = AS_RELEASE (g_ptr_array_index (rels, 1)); - g_assert_cmpstr (as_release_get_version (rel), ==, "1.6.0"); - g_assert_cmpuint (as_release_get_timestamp (rel), ==, 123456789); - g_assert_cmpuint (as_release_get_size (rel, AS_SIZE_KIND_DOWNLOAD), ==, 0); - - g_object_unref (cpt); - g_object_unref (db); -} - -void -test_database () -{ - gchar *path; - - path = test_database_create (); - test_database_read (path); - - g_free (path); -} - -int -main (int argc, char **argv) -{ - int ret; - - if (argc == 0) { - g_error ("No test directory specified!"); - return 1; - } - - datadir = argv[1]; - g_assert (datadir != NULL); - datadir = g_build_filename (datadir, "samples", NULL); - g_assert (g_file_test (datadir, G_FILE_TEST_EXISTS) != FALSE); - - g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); - g_test_init (&argc, &argv, NULL); - - /* only critical and error are fatal */ - g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); - - g_test_add_func ("/AppStream/Database", test_database); - - ret = g_test_run (); - g_free (datadir); - - return ret; -} diff -Nru appstream-0.9.4/tests/test-pool.c appstream-0.12.0/tests/test-pool.c --- appstream-0.9.4/tests/test-pool.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/test-pool.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,484 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2012-2016 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include +#include + +#include "appstream.h" +#include "as-pool-private.h" +#include "as-test-utils.h" +#include "../src/as-utils-private.h" +#include "../src/as-component-private.h" + + +static gchar *datadir = NULL; + +static void +print_cptarray (GPtrArray *cpt_array) +{ + guint i; + + g_printf ("----\n"); + for (i = 0; i < cpt_array->len; i++) { + AsComponent *cpt; + cpt = (AsComponent*) g_ptr_array_index (cpt_array, i); + + g_printf (" - %s\n", + as_component_to_string (cpt)); + } + g_printf ("----\n"); +} + +/** + * _as_get_single_component_by_cid: + * + * Internal helper to get a single #AsComponent by its + * component identifier. + */ +static AsComponent* +_as_get_single_component_by_cid (AsPool *pool, const gchar *cid) +{ + g_autoptr(GPtrArray) result = NULL; + + result = as_pool_get_components_by_id (pool, cid); + if (result->len == 0) + return NULL; + return g_object_ref (AS_COMPONENT (g_ptr_array_index (result, 0))); +} + +/** + * test_cache: + * + * Test reading data from cache files. + */ +static void +test_cache () +{ + g_autoptr(AsPool) dpool = NULL; + g_autoptr(AsComponent) cpt1 = NULL; + g_autoptr(AsComponent) cpt2 = NULL; + g_autoptr(GError) error = NULL; + + /* prepare our components */ + cpt1 = as_component_new (); + as_component_set_kind (cpt1, AS_COMPONENT_KIND_GENERIC); + as_component_set_id (cpt1, "org.example.FooBar1"); + as_component_set_name (cpt1, "FooBar App 1", NULL); + as_component_set_summary (cpt1, "A unit-test dummy entry", NULL); + + cpt2 = as_component_new (); + as_component_set_kind (cpt2, AS_COMPONENT_KIND_DESKTOP_APP); + as_component_set_id (cpt2, "org.example.NewFooBar"); + as_component_set_name (cpt2, "Second FooBar App", NULL); + as_component_set_summary (cpt2, "Another unit-test dummy entry", NULL); + as_component_insert_custom_value (cpt2, "mykey", "stuff"); + + /* add data to the pool */ + dpool = as_pool_new (); + as_pool_add_component (dpool, cpt1, &error); + g_assert_no_error (error); + + as_pool_add_component (dpool, cpt2, &error); + g_assert_no_error (error); + + /* export cache file and destroy old data pool */ + as_pool_save_cache_file (dpool, "/tmp/as-unittest-cache.gvz", &error); + g_assert_no_error (error); + g_object_unref (dpool); + g_object_unref (cpt1); + g_object_unref (cpt2); + + /* load cache file */ + dpool = as_pool_new (); + as_pool_load_cache_file (dpool, "/tmp/as-unittest-cache.gvz", &error); + g_assert_no_error (error); + + /* validate */ + cpt1 = _as_get_single_component_by_cid (dpool, "org.example.FooBar1"); + g_assert_nonnull (cpt1); + + cpt2 = _as_get_single_component_by_cid (dpool, "org.example.NewFooBar"); + g_assert_nonnull (cpt2); + + g_assert_cmpint (as_component_get_kind (cpt1), ==, AS_COMPONENT_KIND_GENERIC); + g_assert_cmpstr (as_component_get_name (cpt1), ==, "FooBar App 1"); + g_assert_cmpstr (as_component_get_summary (cpt1), ==, "A unit-test dummy entry"); + + g_assert_cmpint (as_component_get_kind (cpt2), ==, AS_COMPONENT_KIND_DESKTOP_APP); + g_assert_cmpstr (as_component_get_name (cpt2), ==, "Second FooBar App"); + g_assert_cmpstr (as_component_get_summary (cpt2), ==, "Another unit-test dummy entry"); + g_assert_cmpstr (as_component_get_custom_value (cpt2, "mykey"), ==, "stuff"); +} + +/** + * test_get_sampledata_pool: + * + * Internal helper to get a pool with the sample data locations set. + */ +static AsPool* +test_get_sampledata_pool (gboolean use_caches) +{ + AsPool *pool; + AsPoolFlags flags; + g_autofree gchar *mdata_dir = NULL; + + /* create AsPool and load sample metadata */ + mdata_dir = g_build_filename (datadir, "collection", NULL); + + pool = as_pool_new (); + as_pool_clear_metadata_locations (pool); + as_pool_add_metadata_location (pool, mdata_dir); + as_pool_set_locale (pool, "C"); + + flags = as_pool_get_flags (pool); + as_flags_remove (flags, AS_POOL_FLAG_READ_DESKTOP_FILES); + as_pool_set_flags (pool, flags); + + if (!use_caches) + as_pool_set_cache_flags (pool, AS_CACHE_FLAG_NONE); + + return pool; +} + +/** + * as_assert_component_lists_equal: + * + * Check if the components present in the two #GPtrArray are equal. + */ +static void +as_assert_component_lists_equal (GPtrArray *cpts_a, GPtrArray *cpts_b) +{ + guint i; + g_autofree gchar *cpts_a_xml = NULL; + g_autofree gchar *cpts_b_xml = NULL; + GError *error = NULL; + g_autoptr(AsMetadata) metad = as_metadata_new (); + + /* sort */ + as_sort_components (cpts_a); + as_sort_components (cpts_b); + + for (i = 0; i < cpts_a->len; i++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts_a, i)); + /* we ignore keywords for now */ + as_component_set_keywords (cpt, NULL, "C"); + /* FIXME: And languages, because their ordering on serialization is random. */ + g_hash_table_remove_all (as_component_get_languages_table (cpt)); + + as_metadata_add_component (metad, cpt); + } + + cpts_a_xml = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_XML, &error); + g_assert_no_error (error); + + as_metadata_clear_components (metad); + for (i = 0; i < cpts_b->len; i++) { + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (cpts_b, i)); + /* we ignore keywords for now */ + as_component_set_keywords (cpt, NULL, "C"); + /* FIXME: And languages, because their ordering on serialization is random. */ + g_hash_table_remove_all (as_component_get_languages_table (cpt)); + + as_metadata_add_component (metad, cpt); + } + + cpts_b_xml = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_XML, &error); + g_assert_no_error (error); + + g_assert (as_test_compare_lines (cpts_a_xml, cpts_b_xml)); +} + +/** + * test_cache_file: + * + * Test if cache file (de)serialization works. + */ +static void +test_cache_file () +{ + g_autoptr(AsPool) pool = NULL; + g_autoptr(GPtrArray) cpts_prev = NULL; + g_autoptr(GPtrArray) cpts = NULL; + GError *error = NULL; + + pool = test_get_sampledata_pool (FALSE); + as_pool_load (pool, NULL, &error); + g_assert_no_error (error); + + cpts_prev = as_pool_get_components (pool); + g_assert_cmpint (cpts_prev->len, ==, 18); + + as_cache_file_save ("/tmp/as-unittest-dummy.gvz", "C", cpts_prev, &error); + g_assert_no_error (error); + + cpts = as_cache_file_read ("/tmp/as-unittest-dummy.gvz", &error); + g_assert_no_error (error); + g_assert_cmpint (cpts->len, ==, 18); + + as_assert_component_lists_equal (cpts, cpts_prev); +} + +/** + * test_pool_read: + * + * Test reading information from the metadata pool. + */ +static void +test_pool_read () +{ + g_autoptr(AsPool) dpool = NULL; + g_autoptr(GPtrArray) all_cpts = NULL; + g_autoptr(GPtrArray) result = NULL; + g_autoptr(GPtrArray) categories = NULL; + gchar **strv; + GPtrArray *rels; + AsRelease *rel; + AsComponent *cpt; + AsBundle *bundle; + guint i; + g_autoptr(GError) error = NULL; + + /* load sample data */ + dpool = test_get_sampledata_pool (FALSE); + + as_pool_load (dpool, NULL, &error); + g_assert_no_error (error); + + all_cpts = as_pool_get_components (dpool); + g_assert_nonnull (all_cpts); + g_assert_cmpint (all_cpts->len, ==, 18); + + result = as_pool_search (dpool, "kig"); + print_cptarray (result); + g_assert_cmpint (result->len, ==, 1); + cpt = AS_COMPONENT (g_ptr_array_index (result, 0)); + g_assert_cmpstr (as_component_get_pkgnames (cpt)[0], ==, "kig"); + g_ptr_array_unref (result); + + result = as_pool_search (dpool, "web"); + print_cptarray (result); + g_assert_cmpint (result->len, ==, 1); + g_ptr_array_unref (result); + + result = as_pool_search (dpool, "logic"); + print_cptarray (result); + g_assert_cmpint (result->len, ==, 2); + g_ptr_array_unref (result); + + /* search for mixed-case strings */ + result = as_pool_search (dpool, "bIoChemistrY"); + print_cptarray (result); + g_assert_cmpint (result->len, ==, 1); + g_ptr_array_unref (result); + + /* test searching for multiple words */ + result = as_pool_search (dpool, "scalable graphics"); + print_cptarray (result); + g_assert_cmpint (result->len, ==, 1); + g_ptr_array_unref (result); + + /* we return all components if the search string is too short */ + result = as_pool_search (dpool, "sh"); + g_assert_cmpint (result->len, ==, 18); + g_ptr_array_unref (result); + + strv = g_strsplit ("Science", ";", 0); + result = as_pool_get_components_by_categories (dpool, strv); + g_strfreev (strv); + print_cptarray (result); + g_assert_cmpint (result->len, ==, 3); + g_ptr_array_unref (result); + + result = as_pool_get_components_by_provided_item (dpool, AS_PROVIDED_KIND_BINARY, "inkscape"); + print_cptarray (result); + g_assert_cmpint (result->len, ==, 1); + cpt = AS_COMPONENT (g_ptr_array_index (result, 0)); + + g_assert_cmpstr (as_component_get_name (cpt), ==, "Inkscape"); + g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_HOMEPAGE), ==, "https://inkscape.org/"); + g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_FAQ), ==, "https://inkscape.org/learn/faq/"); + + g_ptr_array_unref (result); + + /* test a component in a different file, with no package but a bundle instead */ + cpt = _as_get_single_component_by_cid (dpool, "org.neverball.Neverball"); + g_assert_nonnull (cpt); + + g_assert_cmpstr (as_component_get_name (cpt), ==, "Neverball"); + g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_HOMEPAGE), ==, "http://neverball.org/"); + bundle = as_component_get_bundle (cpt, AS_BUNDLE_KIND_LIMBA); + g_assert_nonnull (bundle); + g_assert_cmpstr (as_bundle_get_id (bundle), ==, "neverball-1.6.0"); + + rels = as_component_get_releases (cpt); + g_assert_cmpint (rels->len, ==, 2); + + rel = AS_RELEASE (g_ptr_array_index (rels, 0)); + g_assert_cmpstr (as_release_get_version (rel), ==, "1.6.1"); + g_assert_cmpuint (as_release_get_timestamp (rel), ==, 123465888); + g_assert (as_release_get_urgency (rel) == AS_URGENCY_KIND_LOW); + g_assert_cmpuint (as_release_get_size (rel, AS_SIZE_KIND_DOWNLOAD), ==, 112358); + g_assert_cmpuint (as_release_get_size (rel, AS_SIZE_KIND_INSTALLED), ==, 42424242); + + rel = AS_RELEASE (g_ptr_array_index (rels, 1)); + g_assert_cmpstr (as_release_get_version (rel), ==, "1.6.0"); + g_assert_cmpuint (as_release_get_timestamp (rel), ==, 123456789); + g_assert_cmpuint (as_release_get_size (rel, AS_SIZE_KIND_DOWNLOAD), ==, 0); + + /* check categorization */ + categories = as_get_default_categories (TRUE); + as_utils_sort_components_into_categories (all_cpts, categories, FALSE); + for (i = 0; i < categories->len; i++) { + const gchar *cat_id; + gint cpt_count; + AsCategory *cat = AS_CATEGORY (g_ptr_array_index (categories, i)); + + cat_id = as_category_get_id (cat); + cpt_count = as_category_get_components (cat)->len; + + if (g_strcmp0 (cat_id, "communication") == 0) + g_assert_cmpint (cpt_count, ==, 3); + else if (g_strcmp0 (cat_id, "utilities") == 0) + g_assert_cmpint (cpt_count, ==, 3); + else if (g_strcmp0 (cat_id, "audio-video") == 0) + g_assert_cmpint (cpt_count, ==, 0); + else if (g_strcmp0 (cat_id, "developer-tools") == 0) + g_assert_cmpint (cpt_count, ==, 2); + else if (g_strcmp0 (cat_id, "education") == 0) + g_assert_cmpint (cpt_count, ==, 4); + else if (g_strcmp0 (cat_id, "games") == 0) + g_assert_cmpint (cpt_count, ==, 4); + else if (g_strcmp0 (cat_id, "graphics") == 0) + g_assert_cmpint (cpt_count, ==, 1); + else if (g_strcmp0 (cat_id, "office") == 0) + g_assert_cmpint (cpt_count, ==, 0); + else if (g_strcmp0 (cat_id, "addons") == 0) + g_assert_cmpint (cpt_count, ==, 0); + else if (g_strcmp0 (cat_id, "science") == 0) + g_assert_cmpint (cpt_count, ==, 3); + else { + g_error ("Unhandled category: %s", cat_id); + g_assert_not_reached (); + } + + if (g_strcmp0 (cat_id, "graphics") == 0) { + cpt = g_ptr_array_index (as_category_get_components (cat), 0); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.inkscape.Inkscape"); + } + } + + /* test fetching components by launchable */ + result = as_pool_get_components_by_launchable (dpool, AS_LAUNCHABLE_KIND_DESKTOP_ID, "linuxdcpp.desktop"); + g_assert_cmpint (result->len, ==, 1); + g_ptr_array_unref (result); + + result = as_pool_get_components_by_launchable (dpool, AS_LAUNCHABLE_KIND_DESKTOP_ID, "inkscape.desktop"); + g_assert_cmpint (result->len, ==, 1); + cpt = AS_COMPONENT (g_ptr_array_index (result, 0)); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.inkscape.Inkscape"); + g_ptr_array_unref (result); +} + +/** + * test_merge_components: + * + * Test merging of component data via the "merge" pseudo-component. + */ +static void +test_merge_components () +{ + g_autoptr(AsPool) dpool = NULL; + AsComponent *cpt; + GPtrArray *suggestions; + AsSuggested *suggested; + GPtrArray *cpt_ids; + GError *error = NULL; + + /* load the data pool with sample data */ + dpool = test_get_sampledata_pool (FALSE); + as_pool_load (dpool, NULL, &error); + g_assert_no_error (error); + + /* test injection of suggests tags */ + cpt = _as_get_single_component_by_cid (dpool, "links2.desktop"); + g_assert_nonnull (cpt); + + suggestions = as_component_get_suggested (cpt); + suggested = AS_SUGGESTED (g_ptr_array_index (suggestions, 0)); + g_assert_cmpint (suggestions->len, ==, 1); + g_assert_cmpint (as_suggested_get_kind (suggested), ==, AS_SUGGESTED_KIND_HEURISTIC); + + cpt_ids = as_suggested_get_ids (suggested); + g_assert_cmpint (cpt_ids->len, ==, 2); + g_assert_cmpstr ((const gchar*) g_ptr_array_index (cpt_ids, 0), ==, "org.example.test1"); + g_assert_cmpstr ((const gchar*) g_ptr_array_index (cpt_ids, 1), ==, "org.example.test2"); + + cpt = _as_get_single_component_by_cid (dpool, "literki.desktop"); + g_assert_nonnull (cpt); + suggestions = as_component_get_suggested (cpt); + suggested = AS_SUGGESTED (g_ptr_array_index (suggestions, 0)); + g_assert_cmpint (suggestions->len, ==, 1); + g_assert_cmpint (as_suggested_get_kind (suggested), ==, AS_SUGGESTED_KIND_HEURISTIC); + + cpt_ids = as_suggested_get_ids (suggested); + g_assert_cmpint (cpt_ids->len, ==, 2); + g_assert_cmpstr ((const gchar*) g_ptr_array_index (cpt_ids, 0), ==, "org.example.test3"); + g_assert_cmpstr ((const gchar*) g_ptr_array_index (cpt_ids, 1), ==, "org.example.test4"); + + /* test if names get overridden */ + cpt = _as_get_single_component_by_cid (dpool, "kiki.desktop"); + g_assert_nonnull (cpt); + g_assert_cmpstr (as_component_get_name (cpt), ==, "Kiki (name changed by merge)"); +} + +/** + * main: + */ +int +main (int argc, char **argv) +{ + int ret; + + if (argc == 0) { + g_error ("No test directory specified!"); + return 1; + } + + datadir = argv[1]; + g_assert (datadir != NULL); + datadir = g_build_filename (datadir, "samples", NULL); + g_assert (g_file_test (datadir, G_FILE_TEST_EXISTS) != FALSE); + + g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); + g_test_init (&argc, &argv, NULL); + + /* only critical and error are fatal */ + g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); + + g_test_add_func ("/AppStream/PoolRead", test_pool_read); + g_test_add_func ("/AppStream/CacheFile", test_cache_file); + g_test_add_func ("/AppStream/Cache", test_cache); + g_test_add_func ("/AppStream/Merges", test_merge_components); + + ret = g_test_run (); + g_free (datadir); + + return ret; +} diff -Nru appstream-0.9.4/tests/test-validate.c appstream-0.12.0/tests/test-validate.c --- appstream-0.9.4/tests/test-validate.c 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tests/test-validate.c 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,52 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2014-2017 Matthias Klumpp + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the license, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include +#include "appstream.h" +#include "as-component-private.h" + +#include "as-test-utils.h" + +static gchar *datadir = NULL; + +int +main (int argc, char **argv) +{ + int ret; + + if (argc == 0) { + g_error ("No test directory specified!"); + return 1; + } + + g_assert (argv[1] != NULL); + datadir = g_build_filename (argv[1], "samples", NULL); + g_assert (g_file_test (datadir, G_FILE_TEST_EXISTS) != FALSE); + + g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); + g_test_init (&argc, &argv, NULL); + + /* only critical and error are fatal */ + g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); + + ret = g_test_run (); + g_free (datadir); + return ret; +} diff -Nru appstream-0.9.4/tests/test-xmldata.c appstream-0.12.0/tests/test-xmldata.c --- appstream-0.9.4/tests/test-xmldata.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tests/test-xmldata.c 2018-04-04 15:53:56.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2012-2015 Matthias Klumpp + * Copyright (C) 2012-2016 Matthias Klumpp * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -22,60 +22,18 @@ #include #include "appstream.h" -#include "as-xmldata.h" +#include "as-xml.h" #include "as-component-private.h" +#include "as-test-utils.h" static gchar *datadir = NULL; -void -msg (const gchar *s) -{ - g_printf ("%s\n", s); -} - -void -test_screenshot_handling () -{ - AsMetadata *metad; - GError *error = NULL; - AsComponent *cpt; - GFile *file; - gchar *path; - GPtrArray *screenshots; - guint i; - - metad = as_metadata_new (); - as_metadata_set_parser_mode (metad, AS_PARSER_MODE_DISTRO); - - path = g_build_filename (datadir, "appstream-dxml.xml", NULL); - file = g_file_new_for_path (path); - g_free (path); - - as_metadata_parse_file (metad, file, &error); - g_object_unref (file); - g_assert_no_error (error); - - cpt = as_metadata_get_component (metad); - g_assert (cpt != NULL); - - // dirty... - g_debug ("%s", as_component_to_string (cpt)); - screenshots = as_component_get_screenshots (cpt); - g_assert_cmpint (screenshots->len, >, 0); - - for (i = 0; i < screenshots->len; i++) { - GPtrArray *imgs; - AsScreenshot *sshot = (AsScreenshot*) g_ptr_array_index (screenshots, i); - - imgs = as_screenshot_get_images (sshot); - g_assert_cmpint (imgs->len, ==, 2); - g_debug ("%s", as_screenshot_get_caption (sshot)); - } - - g_object_unref (metad); -} - -void +/** + * test_appstream_parser_legacy: + * + * Test parsing legacy metainfo files. + */ +static void test_appstream_parser_legacy () { AsMetadata *metad; @@ -91,7 +49,7 @@ file = g_file_new_for_path (path); g_free (path); - as_metadata_parse_file (metad, file, &error); + as_metadata_parse_file (metad, file, AS_FORMAT_KIND_XML, &error); cpt = as_metadata_get_component (metad); g_object_unref (file); g_assert_no_error (error); @@ -106,7 +64,12 @@ g_object_unref (metad); } -void +/** + * test_appstream_parser_locale: + * + * Test reading localized tags. + */ +static void test_appstream_parser_locale () { g_autoptr(AsMetadata) metad = NULL; @@ -127,7 +90,7 @@ /* check german only locale */ as_metadata_set_locale (metad, "de_DE"); - as_metadata_parse_file (metad, file, &error); + as_metadata_parse_file (metad, file, AS_FORMAT_KIND_XML, &error); cpt = as_metadata_get_component (metad); g_assert_no_error (error); g_assert (cpt != NULL); @@ -143,7 +106,7 @@ /* check all locale */ as_metadata_clear_components (metad); as_metadata_set_locale (metad, "ALL"); - as_metadata_parse_file (metad, file, &error); + as_metadata_parse_file (metad, file, AS_FORMAT_KIND_XML, &error); cpt = as_metadata_get_component (metad); g_assert_no_error (error); @@ -165,7 +128,12 @@ g_assert_cmpint (as_component_get_icons (cpt)->len, ==, 2); } -void +/** + * test_appstream_write_locale: + * + * Test writing fully localized entries. + */ +static void test_appstream_write_locale () { AsMetadata *metad; @@ -174,6 +142,41 @@ AsComponent *cpt; GError *error = NULL; + const gchar *EXPECTED_XML = "\n" + "\n" + " firefox.desktop\n" + " Firefoux\n" + " Firefox\n" + " Feuerfuchs\n" + " Navigateur web\n" + " Web browser\n" + " firefox-bin\n" + " \n" + " network\n" + " web\n" + " \n" + " \n" + " internet\n" + " web\n" + " browser\n" + " navigateur\n" + " \n" + " http://www.mozilla.com\n" + " web-browser\n" + " firefox_web-browser.png\n" + " firefox\n" + " \n" + " application/vnd.mozilla.xul+xml\n" + " application/x-xpinstall\n" + " application/xhtml+xml\n" + " text/html\n" + " text/mml\n" + " text/xml\n" + " x-scheme-handler/http\n" + " x-scheme-handler/https\n" + " \n" + "\n"; + metad = as_metadata_new (); tmp = g_build_filename (datadir, "appdata.xml", NULL); @@ -181,20 +184,84 @@ g_free (tmp); as_metadata_set_locale (metad, "ALL"); - as_metadata_parse_file (metad, file, &error); + as_metadata_parse_file (metad, file, AS_FORMAT_KIND_XML, &error); cpt = as_metadata_get_component (metad); g_assert_no_error (error); g_assert (cpt != NULL); g_object_unref (file); - tmp = as_metadata_component_to_upstream_xml (metad); - //g_debug ("Generated XML: %s", as_metadata_component_to_upstream_xml (metad)); + as_component_sort_values (cpt); + + tmp = as_metadata_component_to_metainfo (metad, + AS_FORMAT_KIND_XML, + &error); + g_assert_no_error (error); + + g_assert (as_test_compare_lines (tmp, EXPECTED_XML)); g_free (tmp); g_object_unref (metad); } -void +/** + * as_xml_test_read_data: + * + * Helper function for other tests. + */ +static AsComponent* +as_xml_test_read_data (const gchar *data, AsFormatStyle mode) +{ + AsComponent *cpt = NULL; + GPtrArray *cpts; + g_autoptr(AsMetadata) metad = NULL; + g_autoptr(GError) error = NULL; + + metad = as_metadata_new (); + as_metadata_set_locale (metad, "ALL"); + as_metadata_parse (metad, data, AS_FORMAT_KIND_XML, &error); + g_assert_no_error (error); + + cpts = as_metadata_get_components (metad); + g_assert_cmpint (cpts->len, >, 0); + if (mode == AS_FORMAT_STYLE_METAINFO) + g_assert_cmpint (cpts->len, ==, 1); + cpt = AS_COMPONENT (g_ptr_array_index (cpts, 0)); + + return g_object_ref (cpt); +} + +/** + * as_xml_test_serialize: + * + * Helper function for other tests. + */ +static gchar* +as_xml_test_serialize (AsComponent *cpt, AsFormatStyle mode) +{ + gchar *data; + g_autoptr(AsMetadata) metad = NULL; + g_autoptr(GError) error = NULL; + + metad = as_metadata_new (); + as_metadata_add_component (metad, cpt); + + if (mode == AS_FORMAT_STYLE_METAINFO) { + data = as_metadata_component_to_metainfo (metad, AS_FORMAT_KIND_XML, &error); + g_assert_no_error (error); + } else { + data = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_XML, &error); + g_assert_no_error (error); + } + + return data; +} + +/** + * test_appstream_write_description: + * + * Test writing the description tag for catalog and metainfo XML. + */ +static void test_appstream_write_description () { guint i; @@ -226,7 +293,7 @@ " test_writetest.png\n" " xml-writetest\n" " \n" - " \n" + " \n" " \n" "
\n"; @@ -265,12 +332,12 @@ " test_writetest.png\n" " xml-writetest\n" " \n" - " \n" + " \n" " \n" "
\n"; const gchar *EXPECTED_XML_DISTRO = "\n" - "\n" + "\n" " \n" " org.example.Test\n" " Test\n" @@ -307,7 +374,7 @@ " test_writetest.png\n" " xml-writetest\n" " \n" - " \n" + " \n" " \n" " \n" "\n"; @@ -349,8 +416,8 @@ as_metadata_add_component (metad, cpt); - tmp = as_metadata_component_to_upstream_xml (metad); - g_assert_cmpstr (tmp, ==, EXPECTED_XML); + tmp = as_metadata_component_to_metainfo (metad, AS_FORMAT_KIND_XML, NULL); + g_assert (as_test_compare_lines (tmp, EXPECTED_XML)); g_free (tmp); /* add localization */ @@ -359,15 +426,875 @@ "

First paragraph

\n
  1. One
  2. Two
  3. Three
  • First
  • Second

Paragraph2

", "de"); - tmp = as_metadata_component_to_upstream_xml (metad); - g_assert_cmpstr (tmp, ==, EXPECTED_XML_LOCALIZED); + tmp = as_metadata_component_to_metainfo (metad, AS_FORMAT_KIND_XML, NULL); + g_assert (as_test_compare_lines (tmp, EXPECTED_XML_LOCALIZED)); g_free (tmp); - tmp = as_metadata_components_to_distro_xml (metad); - g_assert_cmpstr (tmp, ==, EXPECTED_XML_DISTRO); + tmp = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_XML, NULL); + g_assert (as_test_compare_lines (tmp, EXPECTED_XML_DISTRO)); g_free (tmp); } +/** + * test_appstream_read_description: + * + * Test reading the description tag. + */ +static void +test_appstream_read_description (void) +{ + g_autoptr(AsComponent) cpt = NULL; + const gchar *xmldata_desc_mi1 = "\n" + " org.example.DescTestMI-1\n" + " \n" + "

Agenda is a simple, slick, speedy and no-nonsense task manager. Use it to keep track of the tasks that matter most.

\n" + "
    \n" + "
  • Blazingly fast and light
  • \n" + "
  • Remembers your list until you clear completed tasks
  • \n" + "
  • ...
  • \n" + "
\n" + "

I dare you to find an easier, faster, more beautiful task manager for elementary OS.

\n" + "
\n" + "
\n"; + + const gchar *xmldata_desc_mi2 = "\n" + " org.example.DescTestMI-2\n" + " \n" + "
    \n" + "
  • I start with bullet points
  • \n" + "
  • Yes, this is allowed now
  • \n" + "
  • ...
  • \n" + "
\n" + "

Paragraph

\n" + "
\n" + "
\n"; + + cpt = as_xml_test_read_data (xmldata_desc_mi1, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.DescTestMI-1"); + + g_assert_cmpstr (as_component_get_description (cpt), ==, "

Agenda is a simple, slick, speedy and no-nonsense task manager. Use it to keep track of the tasks that matter most.

\n" + "
    \n" + "
  • Blazingly fast and light
  • \n" + "
  • Remembers your list until you clear completed tasks
  • \n" + "
  • ...
  • \n" + "
\n" + "

I dare you to find an easier, faster, more beautiful task manager for elementary OS.

\n"); + + g_object_unref (cpt); + cpt = as_xml_test_read_data (xmldata_desc_mi2, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.DescTestMI-2"); + + g_assert_cmpstr (as_component_get_description (cpt), ==, "
    \n" + "
  • I start with bullet points
  • \n" + "
  • Yes, this is allowed now
  • \n" + "
  • ...
  • \n" + "
\n" + "

Paragraph

\n"); +} + +/** + * test_xml_read_url: + * + * Test reading the url tag. + */ +static void +test_xml_read_url (void) +{ + g_autoptr(AsComponent) cpt = NULL; + const gchar *xmldata_languages = "\n" + " org.example.UrlTest\n" + " https://example.org\n" + " https://example.org/faq\n" + " https://example.org/donate\n" + "\n"; + + cpt = as_xml_test_read_data (xmldata_languages, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.UrlTest"); + + g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_HOMEPAGE), ==, "https://example.org"); + g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_FAQ), ==, "https://example.org/faq"); + g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_DONATION), ==, "https://example.org/donate"); +} + +/** + * test_xml_read_languages: + * + * Test reading the languages tag. + */ +static void +test_xml_read_languages (void) +{ + g_autoptr(AsComponent) cpt = NULL; + const gchar *xmldata_languages = "\n" + " org.example.LangTest\n" + " \n" + " de_DE\n" + " en_GB\n" + " \n" + "\n"; + + cpt = as_xml_test_read_data (xmldata_languages, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.LangTest"); + + g_assert_cmpint (as_component_get_language (cpt, "de_DE"), ==, 48); + g_assert_cmpint (as_component_get_language (cpt, "en_GB"), ==, 100); + g_assert_cmpint (as_component_get_language (cpt, "invalid_C"), ==, -1); +} + +/** + * test_xml_write_languages: + * + * Test writing the languages tag. + */ +static void +test_xml_write_languages (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autofree gchar *res = NULL; + const gchar *expected_lang_xml = "\n" + "\n" + " org.example.LangTest\n" + " \n" + " de_DE\n" + " en_GB\n" + " \n" + "\n"; + + cpt = as_component_new (); + as_component_set_id (cpt, "org.example.LangTest"); + as_component_add_language (cpt, "de_DE", 86); + as_component_add_language (cpt, "en_GB", 98); + + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_METAINFO); + g_assert (as_test_compare_lines (res, expected_lang_xml)); +} + +/** + * test_xml_write_releases: + * + * Test writing the releases tag. + */ +static void +test_xml_write_releases (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(AsRelease) rel = NULL; + g_autofree gchar *res = NULL; + const gchar *expected_rel_xml = "\n" + "\n" + " org.example.ReleaseTest\n" + " \n" + " \n" + " \n" + "

A release description.

\n" + "

Eine Beschreibung der Veröffentlichung.

\n" + "
\n" + "
\n" + "
\n" + "
\n"; + + cpt = as_component_new (); + as_component_set_id (cpt, "org.example.ReleaseTest"); + + rel = as_release_new (); + as_release_set_version (rel, "1.2"); + as_release_set_description (rel, "

A release description.

", "C"); + as_release_set_description (rel, "

Eine Beschreibung der Veröffentlichung.

", "de"); + + as_component_add_release (cpt, rel); + + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_METAINFO); + g_assert (as_test_compare_lines (res, expected_rel_xml)); +} + +/** + * test_xml_write_provides: + * + * Test writing the provides tag. + */ +static void +test_xml_write_provides (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(AsProvided) prov_mime = NULL; + g_autoptr(AsProvided) prov_bin = NULL; + g_autoptr(AsProvided) prov_dbus = NULL; + g_autofree gchar *res = NULL; + const gchar *expected_prov_xml = "\n" + "\n" + " org.example.ProvidesTest\n" + " \n" + " text/plain\n" + " application/xml\n" + " image/png\n" + " \n" + " \n" + " foobar\n" + " foobar-viewer\n" + " org.example.ProvidesTest.Modify\n" + " \n" + "\n"; + + cpt = as_component_new (); + as_component_set_id (cpt, "org.example.ProvidesTest"); + + prov_mime = as_provided_new (); + as_provided_set_kind (prov_mime, AS_PROVIDED_KIND_MIMETYPE); + as_provided_add_item (prov_mime, "text/plain"); + as_provided_add_item (prov_mime, "application/xml"); + as_provided_add_item (prov_mime, "image/png"); + as_component_add_provided (cpt, prov_mime); + + prov_bin = as_provided_new (); + as_provided_set_kind (prov_bin, AS_PROVIDED_KIND_BINARY); + as_provided_add_item (prov_bin, "foobar"); + as_provided_add_item (prov_bin, "foobar-viewer"); + as_component_add_provided (cpt, prov_bin); + + prov_dbus = as_provided_new (); + as_provided_set_kind (prov_dbus, AS_PROVIDED_KIND_DBUS_SYSTEM); + as_provided_add_item (prov_dbus, "org.example.ProvidesTest.Modify"); + as_component_add_provided (cpt, prov_dbus); + + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_METAINFO); + g_assert (as_test_compare_lines (res, expected_prov_xml)); +} + +/** + * test_xml_write_suggests: + * + * Test writing the suggests tag. + */ +static void +test_xml_write_suggests (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(AsSuggested) sug_us = NULL; + g_autoptr(AsSuggested) sug_hr = NULL; + g_autofree gchar *res = NULL; + const gchar *expected_sug_xml_mi = "\n" + "\n" + " org.example.SuggestsTest\n" + " \n" + " org.example.Awesome\n" + " \n" + "\n"; + const gchar *expected_sug_xml_coll = "\n" + "\n" + " \n" + " org.example.SuggestsTest\n" + " \n" + " org.example.Awesome\n" + " \n" + " \n" + " org.example.MachineLearning\n" + " org.example.Stuff\n" + " \n" + " \n" + "\n"; + + cpt = as_component_new (); + as_component_set_id (cpt, "org.example.SuggestsTest"); + + sug_us = as_suggested_new (); + as_suggested_set_kind (sug_us, AS_SUGGESTED_KIND_UPSTREAM); + as_suggested_add_id (sug_us, "org.example.Awesome"); + as_component_add_suggested (cpt, sug_us); + + sug_hr = as_suggested_new (); + as_suggested_set_kind (sug_hr, AS_SUGGESTED_KIND_HEURISTIC); + as_suggested_add_id (sug_hr, "org.example.MachineLearning"); + as_suggested_add_id (sug_hr, "org.example.Stuff"); + as_component_add_suggested (cpt, sug_hr); + + /* test metainfo serialization */ + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_METAINFO); + g_assert (as_test_compare_lines (res, expected_sug_xml_mi)); + + /* test collection serialization */ + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_COLLECTION); + g_assert (as_test_compare_lines (res, expected_sug_xml_coll)); +} + +static const gchar *xmldata_custom = "\n" + "\n" + " org.example.CustomTest\n" + " \n" + " myapp --go\n" + " bar\n" + " \n" + "\n"; +/** + * test_xml_read_custom: + * + * Test reading the custom tag. + */ +static void +test_xml_read_custom (void) +{ + g_autoptr(AsComponent) cpt = NULL; + + cpt = as_xml_test_read_data (xmldata_custom, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.CustomTest"); + + g_assert_cmpstr (as_component_get_custom_value (cpt, "command"), ==, "myapp --go"); + g_assert_cmpstr (as_component_get_custom_value (cpt, "foo"), ==, "bar"); + g_assert_null (as_component_get_custom_value (cpt, NULL)); +} + +/** + * test_xml_write_custom: + * + * Test writing the custom tag. + */ +static void +test_xml_write_custom (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autofree gchar *res = NULL; + + cpt = as_component_new (); + as_component_set_id (cpt, "org.example.CustomTest"); + as_component_insert_custom_value (cpt, "command", "myapp"); + as_component_insert_custom_value (cpt, "command", "myapp --go"); + as_component_insert_custom_value (cpt, "foo", "bar"); + as_component_insert_custom_value (cpt, NULL, "dummy"); + + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_METAINFO); + g_assert (as_test_compare_lines (res, xmldata_custom)); +} + +static const gchar *xmldata_content_rating = "\n" + "\n" + " org.example.ContentRatingTest\n" + " \n" + " moderate\n" + " mild\n" + " \n" + "\n"; +/** + * test_xml_read_content_rating: + * + * Test reading the content_rating tag. + */ +static void +test_xml_read_content_rating (void) +{ + g_autoptr(AsComponent) cpt = NULL; + AsContentRating *rating; + + cpt = as_xml_test_read_data (xmldata_content_rating, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.ContentRatingTest"); + + rating = as_component_get_content_rating (cpt, "oars-1.0"); + g_assert_nonnull (rating); + + g_assert_cmpint (as_content_rating_get_value (rating, "drugs-alcohol"), ==, AS_CONTENT_RATING_VALUE_MODERATE); + g_assert_cmpint (as_content_rating_get_value (rating, "language-humor"), ==, AS_CONTENT_RATING_VALUE_MILD); + g_assert_cmpint (as_content_rating_get_minimum_age (rating), ==, 13); +} + +/** + * test_xml_write_content_rating: + * + * Test writing the content_rating tag. + */ +static void +test_xml_write_content_rating (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(AsContentRating) rating = NULL; + g_autofree gchar *res = NULL; + + cpt = as_component_new (); + as_component_set_id (cpt, "org.example.ContentRatingTest"); + + rating = as_content_rating_new (); + as_content_rating_set_kind (rating, "oars-1.0"); + + as_content_rating_set_value (rating, "drugs-alcohol", AS_CONTENT_RATING_VALUE_MODERATE); + as_content_rating_set_value (rating, "language-humor", AS_CONTENT_RATING_VALUE_MILD); + + as_component_add_content_rating (cpt, rating); + + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_METAINFO); + g_assert (as_test_compare_lines (res, xmldata_content_rating)); +} + +static const gchar *xmldata_launchable = "\n" + "\n" + " org.example.LaunchTest\n" + " org.example.Test.desktop\n" + " kde4-kool.desktop\n" + "\n"; +/** + * test_xml_read_launchable: + * + * Test reading the "launchable" tag. + */ +static void +test_xml_read_launchable (void) +{ + g_autoptr(AsComponent) cpt = NULL; + AsLaunchable *launch; + + cpt = as_xml_test_read_data (xmldata_launchable, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.LaunchTest"); + + launch = as_component_get_launchable (cpt, AS_LAUNCHABLE_KIND_DESKTOP_ID); + g_assert_nonnull (launch); + + g_assert_cmpint (as_launchable_get_entries (launch)->len, ==, 2); + g_assert_cmpstr (g_ptr_array_index (as_launchable_get_entries (launch), 0), ==, "org.example.Test.desktop"); + g_assert_cmpstr (g_ptr_array_index (as_launchable_get_entries (launch), 1), ==, "kde4-kool.desktop"); +} + +/** + * test_xml_write_launchable: + * + * Test writing the "launchable" tag. + */ +static void +test_xml_write_launchable (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(AsLaunchable) launch = NULL; + g_autofree gchar *res = NULL; + + cpt = as_component_new (); + as_component_set_id (cpt, "org.example.LaunchTest"); + + launch = as_launchable_new (); + as_launchable_set_kind (launch, AS_LAUNCHABLE_KIND_DESKTOP_ID); + + as_launchable_add_entry (launch, "org.example.Test.desktop"); + as_launchable_add_entry (launch, "kde4-kool.desktop"); + + as_component_add_launchable (cpt, launch); + + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_METAINFO); + g_assert (as_test_compare_lines (res, xmldata_launchable)); +} + +/** + * test_appstream_write_metainfo_to_collection: + */ +static void +test_appstream_write_metainfo_to_collection (void) +{ + gchar *tmp; + g_autoptr(AsMetadata) metad = NULL; + g_autoptr(GError) error = NULL; + + const gchar *METAINFO_XML = "\n" + "\n" + " org.example.Test\n" + " Test\n" + " Testo\n" + " I am a cruft entry\n" + " Test\n" + " Just a unittest.\n" + " Nur ein Unittest.\n" + " \n" + "

First paragraph

\n" + "
    \n" + "
  1. One
  2. \n" + "
  3. Two
  4. \n" + "
  5. Three is > 2 & 1
  6. \n" + "
\n" + "

Paragraph2

\n" + "
    \n" + "
  • First
  • \n" + "
  • Second
  • \n" + "
\n" + "

Paragraph3 & the last one

\n" + "

Erster Absatz

\n" + "
    \n" + "
  1. One
  2. \n" + "
  3. Eins
  4. \n" + "
  5. Zwei
  6. \n" + "
  7. Drei
  8. \n" + "
\n" + "
    \n" + "
  • Erster
  • \n" + "
  • Zweiter
  • \n" + "
\n" + "

Absatz2

\n" + "
\n" + " test_writetest.png\n" + " test_writetest.png\n" + " xml-writetest\n" + " \n" + " \n" + " \n" + "
\n"; + + const gchar *EXPECTED_XML_COLL = "\n" + "\n" + " \n" + " org.example.Test\n" + " Test\n" + " Test\n" + " Testo\n" + " Just a unittest.\n" + " Nur ein Unittest.\n" + " \n" + "

First paragraph

\n" + "
    \n" + "
  1. One
  2. \n" + "
  3. Two
  4. \n" + "
  5. Three is > 2 & 1
  6. \n" + "
\n" + "

Paragraph2

\n" + "
    \n" + "
  • First
  • \n" + "
  • Second
  • \n" + "
\n" + "

Paragraph3 & the last one

\n" + "
    \n" + "
  1. One
  2. \n" + "
\n" + "
    \n" + " \n" + " \n" + "

    Erster Absatz

    \n" + "
      \n" + "
    1. Eins
    2. \n" + "
    3. Zwei
    4. \n" + "
    5. Drei
    6. \n" + "
    \n" + "
      \n" + "
    • Erster
    • \n" + "
    • Zweiter
    • \n" + "
    \n" + "

    Absatz2

    \n" + "
    \n" + " test_writetest.png\n" + " test_writetest.png\n" + " xml-writetest\n" + " \n" + " \n" + " \n" + " \n" + "\n"; + + metad = as_metadata_new (); + as_metadata_set_locale (metad, "ALL"); + + as_metadata_parse (metad, METAINFO_XML, AS_FORMAT_KIND_XML, &error); + g_assert_no_error (error); + + as_metadata_set_format_style (metad, AS_FORMAT_STYLE_COLLECTION); + + tmp = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_XML, NULL); + g_assert (as_test_compare_lines (tmp, EXPECTED_XML_COLL)); + g_free (tmp); +} + + +static const gchar *xmldata_screenshots = "\n" + "\n" + " org.example.ScreenshotTest\n" + " \n" + " \n" + " Das Hauptfenster, welches irgendwas zeigt\n" + " The main window displaying a thing\n" + " https://example.org/alpha.png\n" + " https://example.org/alpha_small.png\n" + " \n" + " \n" + " https://example.org/beta.png\n" + " https://example.org/beta_small.png\n" + " https://example.org/localized_de.png\n" + " \n" + " \n" + "\n"; + +/** + * test_xml_read_screenshots: + * + * Test reading the "screenshots" tag. + */ +static void +test_xml_read_screenshots (void) +{ + g_autoptr(AsComponent) cpt = NULL; + GPtrArray *screenshots; + AsScreenshot *scr1; + AsScreenshot *scr2; + GPtrArray *images; + AsImage *img; + + const gchar *xmldata_screenshot_legacy = "\n" + "\n" + " org.example.ScreenshotAncient\n" + " \n" + " https://example.org/alpha.png\n" + " \n" + "\n"; + + cpt = as_xml_test_read_data (xmldata_screenshots, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.ScreenshotTest"); + + screenshots = as_component_get_screenshots (cpt); + g_assert_cmpint (screenshots->len, ==, 2); + + scr1 = AS_SCREENSHOT (g_ptr_array_index (screenshots, 0)); + scr2 = AS_SCREENSHOT (g_ptr_array_index (screenshots, 1)); + + /* screenshot 1 */ + g_assert_cmpint (as_screenshot_get_kind (scr1), ==, AS_SCREENSHOT_KIND_DEFAULT); + as_screenshot_set_active_locale (scr1, "C"); + g_assert_cmpstr (as_screenshot_get_caption (scr1), ==, "The main window displaying a thing"); + as_screenshot_set_active_locale (scr1, "de_DE"); + g_assert_cmpstr (as_screenshot_get_caption (scr1), ==, "Das Hauptfenster, welches irgendwas zeigt"); + + images = as_screenshot_get_images_all (scr1); + g_assert_cmpint (images->len, ==, 2); + + img = AS_IMAGE (g_ptr_array_index (images, 0)); + g_assert_cmpint (as_image_get_kind (img), ==, AS_IMAGE_KIND_SOURCE); + g_assert_cmpstr (as_image_get_url (img), ==, "https://example.org/alpha.png"); + g_assert_cmpint (as_image_get_width (img), ==, 1916); + g_assert_cmpint (as_image_get_height (img), ==, 1056); + + img = AS_IMAGE (g_ptr_array_index (images, 1)); + g_assert_cmpint (as_image_get_kind (img), ==, AS_IMAGE_KIND_THUMBNAIL); + g_assert_cmpstr (as_image_get_url (img), ==, "https://example.org/alpha_small.png"); + g_assert_cmpint (as_image_get_width (img), ==, 800); + g_assert_cmpint (as_image_get_height (img), ==, 600); + + /* screenshot 2 */ + g_assert_cmpint (as_screenshot_get_kind (scr2), ==, AS_SCREENSHOT_KIND_EXTRA); + as_screenshot_set_active_locale (scr2, "C"); + images = as_screenshot_get_images (scr2); + g_assert_cmpint (images->len, ==, 2); + as_screenshot_set_active_locale (scr2, "de_DE"); + images = as_screenshot_get_images (scr2); + g_assert_cmpint (images->len, ==, 1); + img = AS_IMAGE (g_ptr_array_index (images, 0)); + g_assert_cmpstr (as_image_get_url (img), ==, "https://example.org/localized_de.png"); + + images = as_screenshot_get_images_all (scr2); + g_assert_cmpint (images->len, ==, 3); + + img = AS_IMAGE (g_ptr_array_index (images, 0)); + g_assert_cmpint (as_image_get_kind (img), ==, AS_IMAGE_KIND_SOURCE); + g_assert_cmpstr (as_image_get_url (img), ==, "https://example.org/beta.png"); + g_assert_cmpint (as_image_get_width (img), ==, 1916); + g_assert_cmpint (as_image_get_height (img), ==, 1056); + + img = AS_IMAGE (g_ptr_array_index (images, 1)); + g_assert_cmpint (as_image_get_kind (img), ==, AS_IMAGE_KIND_THUMBNAIL); + g_assert_cmpstr (as_image_get_url (img), ==, "https://example.org/beta_small.png"); + g_assert_cmpint (as_image_get_width (img), ==, 800); + g_assert_cmpint (as_image_get_height (img), ==, 600); + + /* test a legacy screenshot entry that we briefly supported in an older AppStream release */ + g_object_unref (cpt); + cpt = as_xml_test_read_data (xmldata_screenshot_legacy, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.ScreenshotAncient"); + + screenshots = as_component_get_screenshots (cpt); + g_assert_cmpint (screenshots->len, ==, 1); + + scr1 = AS_SCREENSHOT (g_ptr_array_index (screenshots, 0)); + g_assert_cmpint (as_screenshot_get_kind (scr1), ==, AS_SCREENSHOT_KIND_DEFAULT); + images = as_screenshot_get_images_all (scr1); + g_assert_cmpint (images->len, ==, 1); + + img = AS_IMAGE (g_ptr_array_index (images, 0)); + g_assert_cmpint (as_image_get_kind (img), ==, AS_IMAGE_KIND_SOURCE); + g_assert_cmpstr (as_image_get_url (img), ==, "https://example.org/alpha.png"); +} + +/** + * test_xml_write_screenshots: + * + * Test writing the "screenshots" tag. + */ +static void +test_xml_write_screenshots (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autofree gchar *res = NULL; + g_autoptr(AsScreenshot) scr1 = NULL; + g_autoptr(AsScreenshot) scr2 = NULL; + AsImage *img; + + cpt = as_component_new (); + as_component_set_id (cpt, "org.example.ScreenshotTest"); + + scr1 = as_screenshot_new (); + as_screenshot_set_kind (scr1, AS_SCREENSHOT_KIND_DEFAULT); + as_screenshot_set_caption (scr1, "The main window displaying a thing", "C"); + as_screenshot_set_caption (scr1, "Das Hauptfenster, welches irgendwas zeigt", "de_DE"); + img = as_image_new (); + as_image_set_kind (img, AS_IMAGE_KIND_SOURCE); + as_image_set_width (img, 1916); + as_image_set_height (img, 1056); + as_image_set_url (img, "https://example.org/alpha.png"); + as_screenshot_add_image (scr1, img); + g_object_unref (img); + + img = as_image_new (); + as_image_set_kind (img, AS_IMAGE_KIND_THUMBNAIL); + as_image_set_width (img, 800); + as_image_set_height (img, 600); + as_image_set_url (img, "https://example.org/alpha_small.png"); + as_screenshot_add_image (scr1, img); + g_object_unref (img); + + scr2 = as_screenshot_new (); + img = as_image_new (); + as_image_set_kind (img, AS_IMAGE_KIND_SOURCE); + as_image_set_width (img, 1916); + as_image_set_height (img, 1056); + as_image_set_url (img, "https://example.org/beta.png"); + as_screenshot_add_image (scr2, img); + g_object_unref (img); + + img = as_image_new (); + as_image_set_kind (img, AS_IMAGE_KIND_THUMBNAIL); + as_image_set_width (img, 800); + as_image_set_height (img, 600); + as_image_set_url (img, "https://example.org/beta_small.png"); + as_screenshot_add_image (scr2, img); + g_object_unref (img); + + img = as_image_new (); + as_image_set_kind (img, AS_IMAGE_KIND_SOURCE); + as_image_set_locale (img, "de_DE"); + as_image_set_url (img, "https://example.org/localized_de.png"); + as_screenshot_add_image (scr2, img); + g_object_unref (img); + + as_component_add_screenshot (cpt, scr1); + as_component_add_screenshot (cpt, scr2); + + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_METAINFO); + g_assert (as_test_compare_lines (res, xmldata_screenshots)); +} + + +static const gchar *xmldata_recommends_requires = "\n" + "\n" + " org.example.RelationsTest\n" + " \n" + " 2500\n" + " usb:v1130p0202d*\n" + " \n" + " \n" + " Linux\n" + " org.example.TestDependency\n" + " \n" + "\n"; +/** + * test_xml_read_recommends_requires: + * + * Test reading the recommends/requires tags. + */ +static void +test_xml_read_recommends_requires (void) +{ + g_autoptr(AsComponent) cpt = NULL; + GPtrArray *recommends; + GPtrArray *requires; + AsRelation *relation; + + cpt = as_xml_test_read_data (xmldata_recommends_requires, AS_FORMAT_STYLE_METAINFO); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.RelationsTest"); + + recommends = as_component_get_recommends (cpt); + requires = as_component_get_requires (cpt); + + g_assert_cmpint (recommends->len, ==, 2); + g_assert_cmpint (requires->len, ==, 2); + + /* memory relation */ + relation = AS_RELATION (g_ptr_array_index (recommends, 0)); + g_assert_cmpint (as_relation_get_kind (relation), ==, AS_RELATION_KIND_RECOMMENDS); + g_assert_cmpint (as_relation_get_item_kind (relation), ==, AS_RELATION_ITEM_KIND_MEMORY); + g_assert_cmpint (as_relation_get_value_int (relation), ==, 2500); + + /* modalias relation */ + relation = AS_RELATION (g_ptr_array_index (recommends, 1)); + g_assert_cmpint (as_relation_get_kind (relation), ==, AS_RELATION_KIND_RECOMMENDS); + g_assert_cmpint (as_relation_get_item_kind (relation), ==, AS_RELATION_ITEM_KIND_MODALIAS); + g_assert_cmpstr (as_relation_get_value (relation), ==, "usb:v1130p0202d*"); + + /* kernel relation */ + relation = AS_RELATION (g_ptr_array_index (requires, 0)); + g_assert_cmpint (as_relation_get_kind (relation), ==, AS_RELATION_KIND_REQUIRES); + g_assert_cmpint (as_relation_get_item_kind (relation), ==, AS_RELATION_ITEM_KIND_KERNEL); + g_assert_cmpstr (as_relation_get_value (relation), ==, "Linux"); + g_assert_cmpstr (as_relation_get_version (relation), ==, "4.15"); + g_assert_cmpint (as_relation_get_compare (relation), ==, AS_RELATION_COMPARE_GE); + + /* ID relation */ + relation = AS_RELATION (g_ptr_array_index (requires, 1)); + g_assert_cmpint (as_relation_get_kind (relation), ==, AS_RELATION_KIND_REQUIRES); + g_assert_cmpint (as_relation_get_item_kind (relation), ==, AS_RELATION_ITEM_KIND_ID); + g_assert_cmpstr (as_relation_get_value (relation), ==, "org.example.TestDependency"); + g_assert_cmpstr (as_relation_get_version (relation), ==, "1.2"); + g_assert_cmpint (as_relation_get_compare (relation), ==, AS_RELATION_COMPARE_EQ); +} + +/** + * test_xml_write_recommends_requires: + * + * Test writing the recommends/requires tags. + */ +static void +test_xml_write_recommends_requires (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autofree gchar *res = NULL; + g_autoptr(AsRelation) mem_relation = NULL; + g_autoptr(AsRelation) moda_relation = NULL; + g_autoptr(AsRelation) kernel_relation = NULL; + g_autoptr(AsRelation) id_relation = NULL; + + cpt = as_component_new (); + as_component_set_id (cpt, "org.example.RelationsTest"); + + mem_relation = as_relation_new (); + moda_relation = as_relation_new (); + kernel_relation = as_relation_new (); + id_relation = as_relation_new (); + + as_relation_set_kind (mem_relation, AS_RELATION_KIND_RECOMMENDS); + as_relation_set_kind (moda_relation, AS_RELATION_KIND_RECOMMENDS); + as_relation_set_kind (kernel_relation, AS_RELATION_KIND_REQUIRES); + as_relation_set_kind (id_relation, AS_RELATION_KIND_REQUIRES); + + as_relation_set_item_kind (mem_relation, AS_RELATION_ITEM_KIND_MEMORY); + as_relation_set_value (mem_relation, "2500"); + as_relation_set_item_kind (moda_relation, AS_RELATION_ITEM_KIND_MODALIAS); + as_relation_set_value (moda_relation, "usb:v1130p0202d*"); + + as_relation_set_item_kind (kernel_relation, AS_RELATION_ITEM_KIND_KERNEL); + as_relation_set_value (kernel_relation, "Linux"); + as_relation_set_version (kernel_relation, "4.15"); + as_relation_set_compare (kernel_relation, AS_RELATION_COMPARE_GE); + + as_relation_set_item_kind (id_relation, AS_RELATION_ITEM_KIND_ID); + as_relation_set_value (id_relation, "org.example.TestDependency"); + as_relation_set_version (id_relation, "1.2"); + as_relation_set_compare (id_relation, AS_RELATION_COMPARE_EQ); + + as_component_add_relation (cpt, mem_relation); + as_component_add_relation (cpt, moda_relation); + as_component_add_relation (cpt, kernel_relation); + as_component_add_relation (cpt, id_relation); + + res = as_xml_test_serialize (cpt, AS_FORMAT_STYLE_METAINFO); + g_assert (as_test_compare_lines (res, xmldata_recommends_requires)); +} + +/** + * main: + */ int main (int argc, char **argv) { @@ -389,11 +1316,38 @@ /* only critical and error are fatal */ g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); - g_test_add_func ("/AppStream/Screenshots{dbimexport}", test_screenshot_handling); - g_test_add_func ("/AppStream/LegacyData", test_appstream_parser_legacy); - g_test_add_func ("/AppStream/XMLParserLocale", test_appstream_parser_locale); - g_test_add_func ("/AppStream/XMLWriterLocale", test_appstream_write_locale); - g_test_add_func ("/AppStream/XMLWriterDescription", test_appstream_write_description); + g_test_add_func ("/XML/LegacyData", test_appstream_parser_legacy); + g_test_add_func ("/XML/Read/ParserLocale", test_appstream_parser_locale); + g_test_add_func ("/XML/Write/WriterLocale", test_appstream_write_locale); + + g_test_add_func ("/XML/Read/Description", test_appstream_read_description); + g_test_add_func ("/XML/Write/Description", test_appstream_write_description); + + g_test_add_func ("/XML/Read/Url", test_xml_read_url); + + g_test_add_func ("/XML/Write/Releases", test_xml_write_releases); + g_test_add_func ("/XML/Write/Provides", test_xml_write_provides); + g_test_add_func ("/XML/Write/Suggests", test_xml_write_suggests); + + g_test_add_func ("/XML/Read/Languages", test_xml_read_languages); + g_test_add_func ("/XML/Write/Languages", test_xml_write_languages); + + g_test_add_func ("/XML/Read/Custom", test_xml_read_custom); + g_test_add_func ("/XML/Write/Custom", test_xml_write_custom); + + g_test_add_func ("/XML/Read/ContentRating", test_xml_read_content_rating); + g_test_add_func ("/XML/Write/ContentRating", test_xml_write_content_rating); + + g_test_add_func ("/XML/Read/Launchable", test_xml_read_launchable); + g_test_add_func ("/XML/Write/Launchable", test_xml_write_launchable); + + g_test_add_func ("/XML/Read/Screenshots", test_xml_read_screenshots); + g_test_add_func ("/XML/Write/Screenshots", test_xml_write_screenshots); + + g_test_add_func ("/XML/Read/RecommendsRequires", test_xml_read_recommends_requires); + g_test_add_func ("/XML/Write/RecommendsRequires", test_xml_write_recommends_requires); + + g_test_add_func ("/XML/Write/MetainfoToCollection", test_appstream_write_metainfo_to_collection); ret = g_test_run (); g_free (datadir); diff -Nru appstream-0.9.4/tests/test-yamldata.c appstream-0.12.0/tests/test-yamldata.c --- appstream-0.9.4/tests/test-yamldata.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tests/test-yamldata.c 2018-04-04 15:53:56.000000000 +0000 @@ -22,17 +22,17 @@ #include #include "appstream.h" -#include "as-yamldata.h" +#include "as-metadata.h" +#include "as-test-utils.h" static gchar *datadir = NULL; -void -println (const gchar *s) -{ - g_printf ("%s\n", s); -} - -void +/** + * test_basic: + * + * Test basic functions related to YAML processing. + */ +static void test_basic (void) { g_autoptr(AsMetadata) mdata = NULL; @@ -40,18 +40,18 @@ GFile *file; GPtrArray *cpts; guint i; - AsComponent *cpt_tomatoes; + AsComponent *cpt_tomatoes = NULL; GError *error = NULL; mdata = as_metadata_new (); as_metadata_set_locale (mdata, "C"); - as_metadata_set_parser_mode (mdata, AS_PARSER_MODE_DISTRO); + as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION); path = g_build_filename (datadir, "dep11-0.8.yml", NULL); file = g_file_new_for_path (path); g_free (path); - as_metadata_parse_file (mdata, file, &error); + as_metadata_parse_file (mdata, file, AS_FORMAT_KIND_YAML, &error); g_object_unref (file); g_assert_no_error (error); @@ -67,7 +67,7 @@ } /* just check one of the components... */ - g_assert (cpt_tomatoes != NULL); + g_assert_nonnull (cpt_tomatoes); g_assert_cmpstr (as_component_get_summary (cpt_tomatoes), ==, "How many tomatoes can you smash in ten short minutes?"); g_assert_cmpstr (as_component_get_pkgnames (cpt_tomatoes)[0], ==, "tomatoes"); } @@ -109,22 +109,135 @@ return scr; } -void -test_yamlwrite (void) +/** + * as_yaml_test_serialize: + * + * Helper function for other tests. + */ +static gchar* +as_yaml_test_serialize (AsComponent *cpt) +{ + gchar *data; + g_autoptr(AsMetadata) metad = NULL; + GError *error = NULL; + + metad = as_metadata_new (); + as_metadata_add_component (metad, cpt); + as_metadata_set_write_header (metad, TRUE); + + data = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_YAML, &error); + g_assert_no_error (error); + + return data; +} + +/** + * test_yamlwrite: + * + * Test writing a YAML document. + */ +static void +test_yamlwrite_general (void) { guint i; - g_autoptr(AsYAMLData) ydata = NULL; - g_autoptr(GPtrArray) cpts = NULL; + g_autoptr(AsMetadata) metad = NULL; g_autoptr(AsScreenshot) scr = NULL; + g_autoptr(AsRelease) rel1 = NULL; + g_autoptr(AsRelease) rel2 = NULL; + g_autoptr(AsBundle) bdl = NULL; g_autofree gchar *resdata = NULL; AsComponent *cpt = NULL; GError *error = NULL; gchar *_PKGNAME1[2] = {"fwdummy", NULL}; gchar *_PKGNAME2[2] = {"foobar-pkg", NULL}; - ydata = as_yamldata_new (); - cpts = g_ptr_array_new_with_free_func (g_object_unref); + const gchar *expected_yaml = "---\n" + "File: DEP-11\n" + "Version: '0.12'\n" + "---\n" + "Type: firmware\n" + "ID: org.example.test.firmware\n" + "Package: fwdummy\n" + "Extends:\n" + "- org.example.alpha\n" + "- org.example.beta\n" + "Name:\n" + " de_DE: Ünittest Fürmwäre (dummy Eintrag)\n" + " C: Unittest Firmware\n" + "Summary:\n" + " C: Just part of an unittest.\n" + "Url:\n" + " homepage: https://example.com\n" + "---\n" + "Type: desktop-application\n" + "ID: org.freedesktop.foobar.desktop\n" + "Package: foobar-pkg\n" + "Name:\n" + " C: TEST!!\n" + "Summary:\n" + " C: Just part of an unittest.\n" + "Icon:\n" + " cached:\n" + " - name: test_writetest.png\n" + " width: 20\n" + " height: 20\n" + " - name: test_writetest.png\n" + " width: 40\n" + " height: 40\n" + " stock: yml-writetest\n" + "Bundles:\n" + "- type: flatpak\n" + " id: foobar\n" + "Screenshots:\n" + "- caption:\n" + " fr: Le FooBar mainwindow\n" + " C: The FooBar mainwindow\n" + " thumbnails:\n" + " - url: https://example.org/images/foobar-small.png\n" + " width: 400\n" + " height: 200\n" + " - url: https://example.org/images/foobar-smaller.png\n" + " width: 210\n" + " height: 120\n" + " source-image:\n" + " url: https://example.org/images/foobar-full.png\n" + " width: 840\n" + " height: 560\n" + "Languages:\n" + "- locale: de_DE\n" + " percentage: 84\n" + "- locale: en_GB\n" + " percentage: 100\n" + "Releases:\n" + "- version: '1.0'\n" + " type: development\n" + " unix-timestamp: 1460463132\n" + " description:\n" + " de_DE: >-\n" + "

    Großartige erste Veröffentlichung.

    \n" + "\n" + "

    Zweite zeile.

    \n" + " C: >-\n" + "

    Awesome initial release.

    \n" + "\n" + "

    Second paragraph.

    \n" + "- version: '1.2'\n" + " type: stable\n" + " unix-timestamp: 1462288512\n" + " urgency: medium\n" + " description:\n" + " C: >-\n" + "

    The CPU no longer overheats when you hold down spacebar.

    \n" + "---\n" + "Type: generic\n" + "ID: org.example.ATargetComponent\n" + "Merge: replace\n" + "Name:\n" + " C: ReplaceThis!\n"; + metad = as_metadata_new (); + + /* firmware component */ cpt = as_component_new (); as_component_set_kind (cpt, AS_COMPONENT_KIND_FIRMWARE); as_component_set_id (cpt, "org.example.test.firmware"); @@ -135,14 +248,18 @@ as_component_add_extends (cpt, "org.example.alpha"); as_component_add_extends (cpt, "org.example.beta"); as_component_add_url (cpt, AS_URL_KIND_HOMEPAGE, "https://example.com"); - g_ptr_array_add (cpts, cpt); + as_metadata_add_component (metad, cpt); + g_object_unref (cpt); + /* component with icons, screenshots and release descriptions */ cpt = as_component_new (); as_component_set_kind (cpt, AS_COMPONENT_KIND_DESKTOP_APP); as_component_set_id (cpt, "org.freedesktop.foobar.desktop"); as_component_set_pkgnames (cpt, _PKGNAME2); as_component_set_name (cpt, "TEST!!", "C"); as_component_set_summary (cpt, "Just part of an unittest.", "C"); + as_component_add_language (cpt, "en_GB", 100); + as_component_add_language (cpt, "de_DE", 84); scr = test_h_create_dummy_screenshot (); as_component_add_screenshot (cpt, scr); @@ -165,24 +282,93 @@ as_component_add_icon (cpt, icon); } - g_ptr_array_add (cpts, cpt); + rel1 = as_release_new (); + as_release_set_version (rel1, "1.0"); + as_release_set_kind (rel1, AS_RELEASE_KIND_DEVELOPMENT); + as_release_set_timestamp (rel1, 1460463132); + as_release_set_description (rel1, "

    Awesome initial release.

    \n

    Second paragraph.

    ", "C"); + as_release_set_description (rel1, "

    Großartige erste Veröffentlichung.

    \n

    Zweite zeile.

    ", "de_DE"); + as_component_add_release (cpt, rel1); + + rel2 = as_release_new (); + as_release_set_version (rel2, "1.2"); + as_release_set_timestamp (rel2, 1462288512); + as_release_set_description (rel2, "

    The CPU no longer overheats when you hold down spacebar.

    ", "C"); + as_release_set_urgency (rel2, AS_URGENCY_KIND_MEDIUM); + as_component_add_release (cpt, rel2); + + /* bundle */ + bdl = as_bundle_new (); + as_bundle_set_kind (bdl, AS_BUNDLE_KIND_FLATPAK); + as_bundle_set_id (bdl, "foobar"); + as_component_add_bundle (cpt, bdl); + + as_metadata_add_component (metad, cpt); + g_object_unref (cpt); - resdata = as_yamldata_serialize_to_distro (ydata, cpts, TRUE, FALSE, &error); + /* merge component */ + cpt = as_component_new (); + as_component_set_kind (cpt, AS_COMPONENT_KIND_GENERIC); + as_component_set_merge_kind (cpt, AS_MERGE_KIND_REPLACE); + as_component_set_id (cpt, "org.example.ATargetComponent"); + as_component_set_name (cpt, "ReplaceThis!", "C"); + as_metadata_add_component (metad, cpt); + g_object_unref (cpt); + + /* serialize and validate */ + resdata = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_YAML, &error); g_assert_no_error (error); - g_debug ("%s", resdata); - /* TODO: Actually test the resulting output */ + g_assert (as_test_compare_lines (resdata, expected_yaml)); } -void +/** + * as_yaml_test_read_data: + * + * Helper function to read a single component from YAML data. + */ +static AsComponent* +as_yaml_test_read_data (const gchar *data, GError **error) +{ + AsComponent *cpt; + g_autoptr(AsMetadata) metad = NULL; + + metad = as_metadata_new (); + as_metadata_set_format_style (metad, AS_FORMAT_STYLE_COLLECTION); + + if (error == NULL) { + g_autoptr(GError) local_error = NULL; + as_metadata_parse (metad, data, AS_FORMAT_KIND_YAML, &local_error); + g_assert_no_error (local_error); + + g_assert_cmpint (as_metadata_get_components (metad)->len, >, 0); + cpt = AS_COMPONENT (g_ptr_array_index (as_metadata_get_components (metad), 0)); + + return g_object_ref (cpt); + } else { + as_metadata_parse (metad, data, AS_FORMAT_KIND_YAML, error); + + if (as_metadata_get_components (metad)->len > 0) { + cpt = AS_COMPONENT (g_ptr_array_index (as_metadata_get_components (metad), 0)); + return g_object_ref (cpt); + } else { + return NULL; + } + } +} + +/** + * test_yaml_read_icons: + * + * Test reading the Icons field. + */ +static void test_yaml_read_icons (void) { guint i; - GError *error = NULL; - AsComponent *cpt; GPtrArray *icons; - g_autoptr(GPtrArray) cpts = NULL; - g_autoptr(AsYAMLData) ydt = NULL; + g_autoptr(AsComponent) cpt = NULL; + const gchar *yamldata_icons_legacy = "---\n" "ID: org.example.Test\n" "Icon:\n" @@ -195,18 +381,24 @@ " - width: 64\n" " height: 64\n" " name: test_test.png\n" + " - width: 64\n" + " height: 64\n" + " name: test_test.png\n" + " scale: 2\n" " - width: 128\n" " height: 128\n" " name: test_test.png\n" " stock: test\n"; - - ydt = as_yamldata_new (); + const gchar *yamldata_icons_single = "---\n" + "ID: org.example.Test\n" + "Icon:\n" + " cached:\n" + " - width: 64\n" + " height: 64\n" + " name: single_test.png\n"; /* check the legacy icons */ - cpts = as_yamldata_parse_distro_data (ydt, yamldata_icons_legacy, &error); - g_assert_no_error (error); - - cpt = AS_COMPONENT (g_ptr_array_index (cpts, 0)); + cpt = as_yaml_test_read_data (yamldata_icons_legacy, NULL); g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.Test"); icons = as_component_get_icons (cpt); @@ -221,15 +413,12 @@ } /* check the new style icons tag */ - g_ptr_array_unref (cpts); - cpts = as_yamldata_parse_distro_data (ydt, yamldata_icons_current, &error); - g_assert_no_error (error); - - cpt = AS_COMPONENT (g_ptr_array_index (cpts, 0)); + g_object_unref (cpt); + cpt = as_yaml_test_read_data (yamldata_icons_current, NULL); g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.Test"); icons = as_component_get_icons (cpt); - g_assert_cmpint (icons->len, ==, 3); + g_assert_cmpint (icons->len, ==, 4); for (i = 0; i < icons->len; i++) { AsIcon *icon = AS_ICON (g_ptr_array_index (icons, i)); @@ -241,8 +430,476 @@ g_assert_nonnull (as_component_get_icon_by_size (cpt, 64, 64)); g_assert_nonnull (as_component_get_icon_by_size (cpt, 128, 128)); + + /* check a component with just a single icon */ + g_object_unref (cpt); + cpt = as_yaml_test_read_data (yamldata_icons_single, NULL); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.Test"); + + icons = as_component_get_icons (cpt); + g_assert_cmpint (icons->len, ==, 1); + g_assert_cmpstr (as_icon_get_filename (AS_ICON (g_ptr_array_index (icons, 0))), ==, "single_test.png"); +} + +/** + * test_yaml_read_languages: + * + * Test if reading the Languages field works. + */ +static void +test_yaml_read_languages (void) +{ + g_autoptr(AsComponent) cpt = NULL; + const gchar *yamldata_languages = "---\n" + "ID: org.example.Test\n" + "Languages:\n" + " - locale: de_DE\n" + " percentage: 48\n" + " - locale: en_GB\n" + " percentage: 100\n"; + + cpt = as_yaml_test_read_data (yamldata_languages, NULL); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.Test"); + + g_assert_cmpint (as_component_get_language (cpt, "de_DE"), ==, 48); + g_assert_cmpint (as_component_get_language (cpt, "en_GB"), ==, 100); + g_assert_cmpint (as_component_get_language (cpt, "invalid_C"), ==, -1); } +/** + * test_yaml_read_url: + * + * Test if reading the Url field works. + */ +static void +test_yaml_read_url (void) +{ + g_autoptr(AsComponent) cpt = NULL; + const gchar *yamldata_urls = "---\n" + "ID: org.example.Test\n" + "Url:\n" + " homepage: https://example.org\n" + " faq: https://example.org/faq\n" + " donation: https://example.org/donate\n"; + + cpt = as_yaml_test_read_data (yamldata_urls, NULL); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.Test"); + + g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_HOMEPAGE), ==, "https://example.org"); + g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_FAQ), ==, "https://example.org/faq"); + g_assert_cmpstr (as_component_get_url (cpt, AS_URL_KIND_DONATION), ==, "https://example.org/donate"); +} + +/** + * test_yaml_corrupt_data: + * + * Test reading of a broken YAML document. + */ +static void +test_yaml_corrupt_data (void) +{ + g_autoptr(GError) error = NULL; + g_autoptr(AsComponent) cpt = NULL; + const gchar *yamldata_corrupt = "---\n" + "ID: org.example.Test\n" + "\007\n"; + + cpt = as_yaml_test_read_data (yamldata_corrupt, &error); + + g_assert_error (error, AS_METADATA_ERROR, AS_METADATA_ERROR_PARSE); + g_assert_null (cpt); +} + +/** + * test_yaml_write_suggests: + * + * Test writing the Suggests field. + */ +static void +test_yaml_write_suggests (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(AsSuggested) sug_us = NULL; + g_autoptr(AsSuggested) sug_hr = NULL; + g_autofree gchar *res = NULL; + const gchar *expected_sug_yaml = "---\n" + "File: DEP-11\n" + "Version: '0.12'\n" + "---\n" + "Type: generic\n" + "ID: org.example.SuggestsTest\n" + "Suggests:\n" + "- type: upstream\n" + " ids:\n" + " - org.example.Awesome\n" + "- type: heuristic\n" + " ids:\n" + " - org.example.MachineLearning\n" + " - org.example.Stuff\n"; + + cpt = as_component_new (); + as_component_set_kind (cpt, AS_COMPONENT_KIND_GENERIC); + as_component_set_id (cpt, "org.example.SuggestsTest"); + + sug_us = as_suggested_new (); + as_suggested_set_kind (sug_us, AS_SUGGESTED_KIND_UPSTREAM); + as_suggested_add_id (sug_us, "org.example.Awesome"); + as_component_add_suggested (cpt, sug_us); + + sug_hr = as_suggested_new (); + as_suggested_set_kind (sug_hr, AS_SUGGESTED_KIND_HEURISTIC); + as_suggested_add_id (sug_hr, "org.example.MachineLearning"); + as_suggested_add_id (sug_hr, "org.example.Stuff"); + as_component_add_suggested (cpt, sug_hr); + + /* test collection serialization */ + res = as_yaml_test_serialize (cpt); + g_assert (as_test_compare_lines (res, expected_sug_yaml)); +} + +/** + * test_yaml_read_suggests: + * + * Test if reading the Suggests field works. + */ +static void +test_yaml_read_suggests (void) +{ + g_autoptr(AsComponent) cpt = NULL; + GPtrArray *suggestions; + GPtrArray *cpt_ids; + AsSuggested *sug; + const gchar *yamldata_suggests = "---\n" + "ID: org.example.Test\n" + "Suggests:\n" + " - type: upstream\n" + " ids:\n" + " - org.example.Awesome\n" + " - org.example.test1\n" + " - org.example.test2\n" + " - type: heuristic\n" + " ids:\n" + " - org.example.test3\n"; + + cpt = as_yaml_test_read_data (yamldata_suggests, NULL); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.Test"); + + suggestions = as_component_get_suggested (cpt); + g_assert_cmpint (suggestions->len, ==, 2); + + sug = AS_SUGGESTED (g_ptr_array_index (suggestions, 0)); + g_assert (as_suggested_get_kind (sug) == AS_SUGGESTED_KIND_UPSTREAM); + cpt_ids = as_suggested_get_ids (sug); + g_assert_cmpint (cpt_ids->len, ==, 3); + + g_assert_cmpstr ((const gchar*) g_ptr_array_index (cpt_ids, 0), ==, "org.example.Awesome"); + g_assert_cmpstr ((const gchar*) g_ptr_array_index (cpt_ids, 1), ==, "org.example.test1"); + g_assert_cmpstr ((const gchar*) g_ptr_array_index (cpt_ids, 2), ==, "org.example.test2"); + + sug = AS_SUGGESTED (g_ptr_array_index (suggestions, 1)); + g_assert (as_suggested_get_kind (sug) == AS_SUGGESTED_KIND_HEURISTIC); + cpt_ids = as_suggested_get_ids (sug); + g_assert_cmpint (cpt_ids->len, ==, 1); + g_assert_cmpstr ((const gchar*) g_ptr_array_index (cpt_ids, 0), ==, "org.example.test3"); +} + +static const gchar *yamldata_custom_field = "---\n" + "File: DEP-11\n" + "Version: '0.12'\n" + "---\n" + "Type: generic\n" + "ID: org.example.CustomTest\n" + "Custom:\n" + " executable: myapp --test\n" + " foo bar: value-with space\n" + " Oh::Snap::Punctuation!: Awesome!\n"; +/** + * test_yaml_write_custom: + * + * Test writing the Custom fields. + */ +static void +test_yaml_write_custom (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autofree gchar *res = NULL; + + cpt = as_component_new (); + as_component_set_kind (cpt, AS_COMPONENT_KIND_GENERIC); + as_component_set_id (cpt, "org.example.CustomTest"); + + as_component_insert_custom_value (cpt, "executable", "myapp --test"); + as_component_insert_custom_value (cpt, "foo bar", "value-with space"); + as_component_insert_custom_value (cpt, "Oh::Snap::Punctuation!", "Awesome!"); + + /* test collection serialization */ + res = as_yaml_test_serialize (cpt); + g_assert (as_test_compare_lines (res, yamldata_custom_field)); +} + +/** + * test_yaml_read_custom: + * + * Test if reading the Custom field works. + */ +static void +test_yaml_read_custom (void) +{ + g_autoptr(AsComponent) cpt = NULL; + + cpt = as_yaml_test_read_data (yamldata_custom_field, NULL); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.CustomTest"); + + g_assert_cmpstr (as_component_get_custom_value (cpt, "executable"), ==, "myapp --test"); + g_assert_cmpstr (as_component_get_custom_value (cpt, "foo bar"), ==, "value-with space"); + g_assert_cmpstr (as_component_get_custom_value (cpt, "Oh::Snap::Punctuation!"), ==, "Awesome!"); +} + +static const gchar *yamldata_content_rating_field = "---\n" + "File: DEP-11\n" + "Version: '0.12'\n" + "---\n" + "Type: generic\n" + "ID: org.example.ContentRatingTest\n" + "ContentRating:\n" + " oars-1.0:\n" + " drugs-alcohol: moderate\n" + " language-humor: mild\n"; + +/** + * test_yaml_write_content_rating: + * + * Test writing the ContentRating field. + */ +static void +test_yaml_write_content_rating (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(AsContentRating) rating = NULL; + g_autofree gchar *res = NULL; + + cpt = as_component_new (); + as_component_set_kind (cpt, AS_COMPONENT_KIND_GENERIC); + as_component_set_id (cpt, "org.example.ContentRatingTest"); + + rating = as_content_rating_new (); + as_content_rating_set_kind (rating, "oars-1.0"); + + as_content_rating_set_value (rating, "drugs-alcohol", AS_CONTENT_RATING_VALUE_MODERATE); + as_content_rating_set_value (rating, "language-humor", AS_CONTENT_RATING_VALUE_MILD); + + as_component_add_content_rating (cpt, rating); + + /* test collection serialization */ + res = as_yaml_test_serialize (cpt); + g_assert (as_test_compare_lines (res, yamldata_content_rating_field)); +} + +/** + * test_yaml_read_content_rating: + * + * Test if reading the ContentRating field works. + */ +static void +test_yaml_read_content_rating (void) +{ + g_autoptr(AsComponent) cpt = NULL; + AsContentRating *rating; + + cpt = as_yaml_test_read_data (yamldata_content_rating_field, NULL); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.ContentRatingTest"); + + rating = as_component_get_content_rating (cpt, "oars-1.0"); + g_assert_nonnull (rating); + g_assert_cmpint (as_content_rating_get_value (rating, "drugs-alcohol"), ==, AS_CONTENT_RATING_VALUE_MODERATE); + g_assert_cmpint (as_content_rating_get_value (rating, "language-humor"), ==, AS_CONTENT_RATING_VALUE_MILD); +} + +static const gchar *yamldata_launchable_field = "---\n" + "File: DEP-11\n" + "Version: '0.12'\n" + "---\n" + "Type: generic\n" + "ID: org.example.LaunchTest\n" + "Launchable:\n" + " desktop-id:\n" + " - org.example.Test.desktop\n" + " - kde4-kool.desktop\n"; + +/** + * test_yaml_write_launchable: + * + * Test writing the Launch field. + */ +static void +test_yaml_write_launchable (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(AsLaunchable) launch = NULL; + g_autofree gchar *res = NULL; + + cpt = as_component_new (); + as_component_set_kind (cpt, AS_COMPONENT_KIND_GENERIC); + as_component_set_id (cpt, "org.example.LaunchTest"); + + launch = as_launchable_new (); + as_launchable_set_kind (launch, AS_LAUNCHABLE_KIND_DESKTOP_ID); + + as_launchable_add_entry (launch, "org.example.Test.desktop"); + as_launchable_add_entry (launch, "kde4-kool.desktop"); + + as_component_add_launchable (cpt, launch); + + /* test collection serialization */ + res = as_yaml_test_serialize (cpt); + g_assert (as_test_compare_lines (res, yamldata_launchable_field)); +} + +/** + * test_yaml_read_launchable: + * + * Test if reading the Launch field works. + */ +static void +test_yaml_read_launchable (void) +{ + g_autoptr(AsComponent) cpt = NULL; + AsLaunchable *launch; + + cpt = as_yaml_test_read_data (yamldata_launchable_field, NULL); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.LaunchTest"); + + launch = as_component_get_launchable (cpt, AS_LAUNCHABLE_KIND_DESKTOP_ID); + g_assert_nonnull (launch); + + g_assert_cmpint (as_launchable_get_entries (launch)->len, ==, 2); + g_assert_cmpstr (g_ptr_array_index (as_launchable_get_entries (launch), 0), ==, "org.example.Test.desktop"); + g_assert_cmpstr (g_ptr_array_index (as_launchable_get_entries (launch), 1), ==, "kde4-kool.desktop"); +} + +static const gchar *yamldata_requires_recommends_field = "---\n" + "File: DEP-11\n" + "Version: '0.12'\n" + "---\n" + "Type: generic\n" + "ID: org.example.RelationsTest\n" + "Recommends:\n" + "- memory: '2500'\n" + "- modalias: usb:v1130p0202d*\n" + "Requires:\n" + "- kernel: Linux\n" + " version: '>= 4.15'\n" + "- id: org.example.TestDependency\n" + " version: == 1.2\n"; + +/** + * test_yaml_write_requires_recommends: + * + * Test writing the Requires/Recommends fields. + */ +static void +test_yaml_write_requires_recommends (void) +{ + g_autoptr(AsComponent) cpt = NULL; + g_autofree gchar *res = NULL; + g_autoptr(AsRelation) mem_relation = NULL; + g_autoptr(AsRelation) moda_relation = NULL; + g_autoptr(AsRelation) kernel_relation = NULL; + g_autoptr(AsRelation) id_relation = NULL; + + cpt = as_component_new (); + as_component_set_kind (cpt, AS_COMPONENT_KIND_GENERIC); + as_component_set_id (cpt, "org.example.RelationsTest"); + + mem_relation = as_relation_new (); + moda_relation = as_relation_new (); + kernel_relation = as_relation_new (); + id_relation = as_relation_new (); + + as_relation_set_kind (mem_relation, AS_RELATION_KIND_RECOMMENDS); + as_relation_set_kind (moda_relation, AS_RELATION_KIND_RECOMMENDS); + as_relation_set_kind (kernel_relation, AS_RELATION_KIND_REQUIRES); + as_relation_set_kind (id_relation, AS_RELATION_KIND_REQUIRES); + + as_relation_set_item_kind (mem_relation, AS_RELATION_ITEM_KIND_MEMORY); + as_relation_set_value (mem_relation, "2500"); + as_relation_set_item_kind (moda_relation, AS_RELATION_ITEM_KIND_MODALIAS); + as_relation_set_value (moda_relation, "usb:v1130p0202d*"); + + as_relation_set_item_kind (kernel_relation, AS_RELATION_ITEM_KIND_KERNEL); + as_relation_set_value (kernel_relation, "Linux"); + as_relation_set_version (kernel_relation, "4.15"); + as_relation_set_compare (kernel_relation, AS_RELATION_COMPARE_GE); + + as_relation_set_item_kind (id_relation, AS_RELATION_ITEM_KIND_ID); + as_relation_set_value (id_relation, "org.example.TestDependency"); + as_relation_set_version (id_relation, "1.2"); + as_relation_set_compare (id_relation, AS_RELATION_COMPARE_EQ); + + as_component_add_relation (cpt, mem_relation); + as_component_add_relation (cpt, moda_relation); + as_component_add_relation (cpt, kernel_relation); + as_component_add_relation (cpt, id_relation); + + /* test collection serialization */ + res = as_yaml_test_serialize (cpt); + g_assert (as_test_compare_lines (res, yamldata_requires_recommends_field)); +} + +/** + * test_yaml_read_requires_recommends: + * + * Test if reading the Requires/Recommends fields works. + */ +static void +test_yaml_read_requires_recommends (void) +{ + g_autoptr(AsComponent) cpt = NULL; + GPtrArray *recommends; + GPtrArray *requires; + AsRelation *relation; + + cpt = as_yaml_test_read_data (yamldata_requires_recommends_field, NULL); + g_assert_cmpstr (as_component_get_id (cpt), ==, "org.example.RelationsTest"); + + recommends = as_component_get_recommends (cpt); + requires = as_component_get_requires (cpt); + + g_assert_cmpint (recommends->len, ==, 2); + g_assert_cmpint (requires->len, ==, 2); + + /* memory relation */ + relation = AS_RELATION (g_ptr_array_index (recommends, 0)); + g_assert_cmpint (as_relation_get_kind (relation), ==, AS_RELATION_KIND_RECOMMENDS); + g_assert_cmpint (as_relation_get_item_kind (relation), ==, AS_RELATION_ITEM_KIND_MEMORY); + g_assert_cmpint (as_relation_get_value_int (relation), ==, 2500); + + /* modalias relation */ + relation = AS_RELATION (g_ptr_array_index (recommends, 1)); + g_assert_cmpint (as_relation_get_kind (relation), ==, AS_RELATION_KIND_RECOMMENDS); + g_assert_cmpint (as_relation_get_item_kind (relation), ==, AS_RELATION_ITEM_KIND_MODALIAS); + g_assert_cmpstr (as_relation_get_value (relation), ==, "usb:v1130p0202d*"); + + /* kernel relation */ + relation = AS_RELATION (g_ptr_array_index (requires, 0)); + g_assert_cmpint (as_relation_get_kind (relation), ==, AS_RELATION_KIND_REQUIRES); + g_assert_cmpint (as_relation_get_item_kind (relation), ==, AS_RELATION_ITEM_KIND_KERNEL); + g_assert_cmpstr (as_relation_get_value (relation), ==, "Linux"); + g_assert_cmpstr (as_relation_get_version (relation), ==, "4.15"); + g_assert_cmpint (as_relation_get_compare (relation), ==, AS_RELATION_COMPARE_GE); + + /* ID relation */ + relation = AS_RELATION (g_ptr_array_index (requires, 1)); + g_assert_cmpint (as_relation_get_kind (relation), ==, AS_RELATION_KIND_REQUIRES); + g_assert_cmpint (as_relation_get_item_kind (relation), ==, AS_RELATION_ITEM_KIND_ID); + g_assert_cmpstr (as_relation_get_value (relation), ==, "org.example.TestDependency"); + g_assert_cmpstr (as_relation_get_version (relation), ==, "1.2"); + g_assert_cmpint (as_relation_get_compare (relation), ==, AS_RELATION_COMPARE_EQ); +} + +/** + * main: + */ int main (int argc, char **argv) { @@ -265,8 +922,27 @@ g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); g_test_add_func ("/YAML/Basic", test_basic); - g_test_add_func ("/YAML/Write", test_yamlwrite); + g_test_add_func ("/YAML/Write/General", test_yamlwrite_general); + + g_test_add_func ("/YAML/Read/CorruptData", test_yaml_corrupt_data); g_test_add_func ("/YAML/Read/Icons", test_yaml_read_icons); + g_test_add_func ("/YAML/Read/Url", test_yaml_read_url); + g_test_add_func ("/YAML/Read/Languages", test_yaml_read_languages); + + g_test_add_func ("/YAML/Read/Suggests", test_yaml_read_suggests); + g_test_add_func ("/YAML/Write/Suggests", test_yaml_write_suggests); + + g_test_add_func ("/YAML/Read/Custom", test_yaml_read_custom); + g_test_add_func ("/YAML/Write/Custom", test_yaml_write_custom); + + g_test_add_func ("/YAML/Read/ContentRating", test_yaml_read_content_rating); + g_test_add_func ("/YAML/Write/ContentRating", test_yaml_write_content_rating); + + g_test_add_func ("/YAML/Read/Launchable", test_yaml_read_launchable); + g_test_add_func ("/YAML/Write/Launchable", test_yaml_write_launchable); + + g_test_add_func ("/YAML/Read/RequiresRecommends", test_yaml_read_requires_recommends); + g_test_add_func ("/YAML/Write/RequiresRecommends", test_yaml_write_requires_recommends); ret = g_test_run (); g_free (datadir); diff -Nru appstream-0.9.4/tools/appstream-cli.c appstream-0.12.0/tools/appstream-cli.c --- appstream-0.9.4/tools/appstream-cli.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/appstream-cli.c 2018-04-04 15:53:56.000000000 +0000 @@ -23,6 +23,7 @@ #include #include #include +#include #include "ascli-utils.h" #include "ascli-actions-mdata.h" @@ -30,20 +31,563 @@ #include "ascli-actions-pkgmgr.h" #include "ascli-actions-misc.h" +#define ASCLI_BIN_NAME "appstreamcli" + +/* global options which affect all commands */ static gboolean optn_show_version = FALSE; static gboolean optn_verbose_mode = FALSE; static gboolean optn_no_color = FALSE; -static gboolean optn_force = FALSE; + +/*** COMMAND OPTIONS ***/ + +/* for data_collection_options */ +static gchar *optn_cachepath = NULL; +static gchar *optn_datapath = NULL; +static gboolean optn_no_cache = FALSE; + +/** + * General options used for any operations on + * metadata collections and the cache. + */ +const GOptionEntry data_collection_options[] = { + { "cachepath", 0, 0, + G_OPTION_ARG_STRING, + &optn_cachepath, + /* TRANSLATORS: ascli flag description for: --cachepath */ + N_("Manually selected location of AppStream cache."), NULL }, + { "datapath", 0, 0, + G_OPTION_ARG_STRING, + &optn_datapath, + /* TRANSLATORS: ascli flag description for: --datapath */ + N_("Manually selected location of AppStream metadata to scan."), NULL }, + { "no-cache", 0, 0, + G_OPTION_ARG_NONE, + &optn_no_cache, + /* TRANSLATORS: ascli flag description for: --no-cache */ + N_("Make request without any caching."), + NULL }, + { NULL } +}; + +/* used by format_options */ +static gchar *optn_format = NULL; + +/** + * The format option. + */ +const GOptionEntry format_options[] = { + { "format", 0, 0, + G_OPTION_ARG_STRING, + &optn_format, + /* TRANSLATORS: ascli flag description for: --format */ + N_("Default metadata format (valid values are 'xml' and 'yaml')."), NULL }, + { NULL } +}; + +/* used by find_options */ static gboolean optn_details = FALSE; + +/** + * General options for finding & displaying data. + */ +const GOptionEntry find_options[] = { + { "details", 0, 0, + G_OPTION_ARG_NONE, + &optn_details, + /* TRANSLATORS: ascli flag description for: --details */ + N_("Print detailed output about found components."), + NULL }, + { NULL } +}; + +/* used by validate_options */ static gboolean optn_pedantic = FALSE; -static gboolean optn_no_cache = FALSE; -static gchar *optn_dbpath = NULL; -static gchar *optn_datapath = NULL; +static gboolean optn_nonet = FALSE; + +/** + * General options for validation. + */ +const GOptionEntry validate_options[] = { + { "pedantic", (gchar) 0, 0, + G_OPTION_ARG_NONE, + &optn_pedantic, + /* TRANSLATORS: ascli flag description for: --pedantic (used by the "validate" command) */ + N_("Also show pedantic hints."), NULL }, + { "no-net", (gchar) 0, 0, + G_OPTION_ARG_NONE, + &optn_nonet, + /* TRANSLATORS: ascli flag description for: --no-net (used by the "validate" command) */ + N_("Do not use network access."), NULL }, + { "nonet", (gchar) 0, G_OPTION_FLAG_HIDDEN, + G_OPTION_ARG_NONE, + &optn_nonet, + NULL, NULL }, + { NULL } +}; + +/* only used by the "refresh --force" command */ +static gboolean optn_force = FALSE; + +/*** HELPER METHODS ***/ + +/** + * as_client_get_summary_for: + **/ +static gchar* +as_client_get_summary_for (const gchar *command) +{ + GString *string; + string = g_string_new (""); + + /* TRANSLATORS: This is the header to the --help menu for subcommands */ + g_string_append_printf (string, "%s\n", _("AppStream command-line interface")); + + g_string_append (string, " "); + g_string_append_printf (string, _("'%s' command"), command); + + return g_string_free (string, FALSE); +} + +/** + * as_client_new_subcommand_option_context: + * + * Create a new option context for an ascli subcommand. + */ +static GOptionContext* +as_client_new_subcommand_option_context (const gchar *command, const GOptionEntry *entries) +{ + GOptionContext *opt_context = NULL; + g_autofree gchar *summary = NULL; + + opt_context = g_option_context_new ("- AppStream CLI."); + g_option_context_set_help_enabled (opt_context, TRUE); + g_option_context_add_main_entries (opt_context, entries, NULL); + + /* set the summary text */ + summary = as_client_get_summary_for (command); + g_option_context_set_summary (opt_context, summary); + + return opt_context; +} + +/** + * as_client_print_help_hint: + */ +static void +as_client_print_help_hint (const gchar *subcommand, const gchar *unknown_option) +{ + if (unknown_option != NULL) { + /* TRANSLATORS: An unknown option was passed to appstreamcli. */ + ascli_print_stderr (_("Option '%s' is unknown."), unknown_option); + } + + if (subcommand == NULL) + ascli_print_stderr (_("Run '%s --help' to see a full list of available command line options."), ASCLI_BIN_NAME); + else + ascli_print_stderr (_("Run '%s --help' to see a list of available commands and options, and '%s %s --help' to see a list of options specific for this subcommand."), + ASCLI_BIN_NAME, ASCLI_BIN_NAME, subcommand); +} + +/** + * as_client_option_context_parse: + * + * Parse the options, print errors. + */ +static int +as_client_option_context_parse (GOptionContext *opt_context, const gchar *subcommand, int *argc, char ***argv) +{ + g_autoptr(GError) error = NULL; + + g_option_context_parse (opt_context, argc, argv, &error); + if (error != NULL) { + gchar *msg; + msg = g_strconcat (error->message, "\n", NULL); + g_print ("%s", msg); + g_free (msg); + + as_client_print_help_hint (subcommand, NULL); + return 1; + } + + return 0; +} + +/*** SUBCOMMANDS ***/ + +/** + * as_client_run_refresh_cache: + * + * Refresh the AppStream caches. + */ +static int +as_client_run_refresh_cache (char **argv, int argc) +{ + g_autoptr(GOptionContext) opt_context = NULL; + gint ret; + const gchar *command = "refresh"; + + const GOptionEntry refresh_options[] = { + { "force", (gchar) 0, 0, + G_OPTION_ARG_NONE, + &optn_force, + /* TRANSLATORS: ascli flag description for: --force */ + _("Enforce a cache refresh."), + NULL }, + { NULL } + }; + + opt_context = as_client_new_subcommand_option_context (command, refresh_options); + g_option_context_add_main_entries (opt_context, data_collection_options, NULL); + + ret = as_client_option_context_parse (opt_context, + command, &argc, &argv); + if (ret != 0) + return ret; + + return ascli_refresh_cache (optn_cachepath, + optn_datapath, + optn_force); +} + +/** + * as_client_run_search: + * + * Search for AppStream metadata. + */ +static int +as_client_run_search (char **argv, int argc) +{ + g_autoptr(GOptionContext) opt_context = NULL; + gint ret; + const gchar *value = NULL; + const gchar *command = "search"; + + opt_context = as_client_new_subcommand_option_context (command, find_options); + g_option_context_add_main_entries (opt_context, data_collection_options, NULL); + + ret = as_client_option_context_parse (opt_context, command, &argc, &argv); + if (ret != 0) + return ret; + + if (argc > 2) + value = argv[2]; + + return ascli_search_component (optn_cachepath, + value, + optn_details, + optn_no_cache); +} + +/** + * as_client_run_get: + * + * Get components by its ID. + */ +static int +as_client_run_get (char **argv, int argc) +{ + g_autoptr(GOptionContext) opt_context = NULL; + gint ret; + const gchar *value = NULL; + const gchar *command = "get"; + + opt_context = as_client_new_subcommand_option_context (command, find_options); + g_option_context_add_main_entries (opt_context, data_collection_options, NULL); + + ret = as_client_option_context_parse (opt_context, command, &argc, &argv); + if (ret != 0) + return ret; + + if (argc > 2) + value = argv[2]; + + return ascli_get_component (optn_cachepath, + value, + optn_details, + optn_no_cache); +} + +/** + * as_client_run_dump: + * + * Dump the raw component metadata to the console. + */ +static int +as_client_run_dump (char **argv, int argc) +{ + g_autoptr(GOptionContext) opt_context = NULL; + gint ret; + const gchar *value = NULL; + AsFormatKind mformat; + const gchar *command = "dump"; + + opt_context = as_client_new_subcommand_option_context (command, data_collection_options); + g_option_context_add_main_entries (opt_context, format_options, NULL); + + ret = as_client_option_context_parse (opt_context, command, &argc, &argv); + if (ret != 0) + return ret; + + if (argc > 2) + value = argv[2]; + + mformat = as_format_kind_from_string (optn_format); + return ascli_dump_component (optn_cachepath, + value, + mformat, + optn_no_cache); +} + +/** + * as_client_run_what_provides: + * + * Find components that provide a certain item. + */ +static int +as_client_run_what_provides (char **argv, int argc) +{ + g_autoptr(GOptionContext) opt_context = NULL; + gint ret; + const gchar *vtype = NULL; + const gchar *vvalue = NULL; + const gchar *command = "what-provides"; + + opt_context = as_client_new_subcommand_option_context (command, find_options); + g_option_context_add_main_entries (opt_context, data_collection_options, NULL); + + ret = as_client_option_context_parse (opt_context, command, &argc, &argv); + if (ret != 0) + return ret; + + if (argc > 2) + vtype = argv[2]; + if (argc > 3) + vvalue = argv[3]; + + return ascli_what_provides (optn_cachepath, + vtype, + vvalue, + optn_details); +} + +/** + * as_client_run_validate: + * + * Validate single metadata files. + */ +static int +as_client_run_validate (char **argv, int argc) +{ + g_autoptr(GOptionContext) opt_context = NULL; + gint ret; + const gchar *command = "validate"; + + opt_context = as_client_new_subcommand_option_context (command, validate_options); + ret = as_client_option_context_parse (opt_context, command, &argc, &argv); + if (ret != 0) + return ret; + + return ascli_validate_files (&argv[2], + argc-2, + optn_pedantic, + !optn_nonet); +} + +/** + * as_client_run_validate_tree: + * + * Validate an installed filesystem tree for correct AppStream metadata + * and .desktop files. + */ +static int +as_client_run_validate_tree (char **argv, int argc) +{ + g_autoptr(GOptionContext) opt_context = NULL; + gint ret; + const gchar *value = NULL; + const gchar *command = "validate-tree"; + + opt_context = as_client_new_subcommand_option_context (command, validate_options); + ret = as_client_option_context_parse (opt_context, command, &argc, &argv); + if (ret != 0) + return ret; + + if (argc > 2) + value = argv[2]; + + return ascli_validate_tree (value, + optn_pedantic, + !optn_nonet); +} + +/** + * as_client_run_put: + * + * Place a metadata file in the right directory. + */ +static int +as_client_run_put (char **argv, int argc) +{ + const gchar *value = NULL; + const gchar *command = "put"; + + if (argc > 2) + value = argv[2]; + if (argc > 3) { + as_client_print_help_hint (command, argv[3]); + return 1; + } + + return ascli_put_metainfo (value); +} + +/** + * as_client_run_install: + * + * Install a component by its ID. + */ +static int +as_client_run_install (char **argv, int argc) +{ + const gchar *value = NULL; + const gchar *command = "install"; + + if (argc > 2) + value = argv[2]; + if (argc > 3) { + as_client_print_help_hint (command, argv[3]); + return 1; + } + + return ascli_install_component (value); +} + +/** + * as_client_run_remove: + * + * Uninstall a component by its ID. + */ +static int +as_client_run_remove (char **argv, int argc) +{ + const gchar *value = NULL; + const gchar *command = "remove"; + + if (argc > 2) + value = argv[2]; + if (argc > 3) { + as_client_print_help_hint (command, argv[3]); + return 1; + } + + return ascli_remove_component (value); +} + +/** + * as_client_run_status: + * + * Show diagnostic information. + */ +static int +as_client_run_status (char **argv, int argc) +{ + const gchar *command = "status"; + + if (argc > 2) { + as_client_print_help_hint (command, argv[3]); + return 1; + } + + return ascli_show_status (); +} + +/** + * as_client_run_convert: + * + * Convert metadata. + */ +static int +as_client_run_convert (char **argv, int argc) +{ + g_autoptr(GOptionContext) opt_context = NULL; + gint ret; + const gchar *fname1 = NULL; + const gchar *fname2 = NULL; + AsFormatKind mformat; + const gchar *command = "convert"; + + opt_context = as_client_new_subcommand_option_context (command, format_options); + ret = as_client_option_context_parse (opt_context, command, &argc, &argv); + if (ret != 0) + return ret; + + if (argc > 2) + fname1 = argv[2]; + if (argc > 3) + fname2 = argv[3]; + + mformat = as_format_kind_from_string (optn_format); + return ascli_convert_data (fname1, + fname2, + mformat); +} + +/** + * as_client_run_new_template: + * + * Convert metadata. + */ +static int +as_client_run_new_template (char **argv, int argc) +{ + g_autoptr(GOptionContext) opt_context = NULL; + g_autoptr(GString) desc_str = NULL; + guint i; + gint ret; + const gchar *command = "new-template"; + const gchar *out_fname = NULL; + const gchar *cpt_kind_str = NULL; + const gchar *optn_desktop_file = NULL; + + const GOptionEntry newtemplate_options[] = { + { "from-desktop", 0, 0, + G_OPTION_ARG_STRING, + &optn_desktop_file, + /* TRANSLATORS: ascli flag description for: --from-desktop (part of the new-template subcommand) */ + N_("Use the given .desktop file to fill in the basic values of the metainfo file."), NULL }, + { NULL } + }; + + /* TRANSLATORS: Additional help text for the 'new-template' ascli subcommand */ + desc_str = g_string_new (_("This command takes optional TYPE and FILE positional arguments, FILE being a file to write to (or \"-\" for standard output).")); + g_string_append (desc_str, "\n"); + /* TRANSLATORS: Additional help text for the 'new-template' ascli subcommand, a bullet-pointed list of types follows */ + g_string_append_printf (desc_str, _("The TYPE must be a valid component-type, such as: %s"), "\n"); + for (i = 1; i < AS_COMPONENT_KIND_LAST; i++) + g_string_append_printf (desc_str, " • %s\n", as_component_kind_to_string (i)); + + opt_context = as_client_new_subcommand_option_context (command, newtemplate_options); + g_option_context_set_description (opt_context, desc_str->str); + + ret = as_client_option_context_parse (opt_context, + command, &argc, &argv); + if (ret != 0) + return ret; + + if (argc > 2) + cpt_kind_str = argv[2]; + if (argc > 3) + out_fname = argv[3]; + + return ascli_create_metainfo_template (out_fname, + cpt_kind_str, + optn_desktop_file); +} /** * as_client_get_summary: **/ -static gchar * +static gchar* as_client_get_summary () { GString *string; @@ -51,26 +595,32 @@ /* TRANSLATORS: This is the header to the --help menu */ g_string_append_printf (string, "%s\n\n%s\n", _("AppStream command-line interface"), - /* these are commands we can use with appstream-cli */ + /* these are commands we can use with appstreamcli */ _("Subcommands:")); - g_string_append_printf (string, " %s - %s\n", "search [TERM]", _("Search the component database.")); - g_string_append_printf (string, " %s - %s\n", "get [COMPONENT-ID]", _("Get information about a component by its ID.")); - g_string_append_printf (string, " %s - %s\n", "what-provides [TYPE] [VALUE]", _("Get components which provide the given item.")); - g_string_append_printf (string, " %s - %s\n", "[TYPE]", _("A provides-item type (e.g. lib, bin, python3, ...)")); - g_string_append_printf (string, " %s - %s\n", "[VALUE]", _("Select a value for the provides-item which needs to be found.")); + g_string_append_printf (string, " %s - %s\n", "search TERM ", _("Search the component database.")); + g_string_append_printf (string, " %s - %s\n", "get COMPONENT-ID", _("Get information about a component by its ID.")); + g_string_append_printf (string, " %s - %s\n", "what-provides TYPE VALUE", _("Get components which provide the given item.")); + g_string_append_printf (string, " %s - %s\n", "TYPE ", _("An item type (e.g. lib, bin, python3, …)")); + g_string_append_printf (string, " %s - %s\n", "VALUE", _("Value of the item that should be found.")); g_string_append (string, "\n"); - g_string_append_printf (string, " %s - %s\n", "dump [COMPONENT-ID]", _("Dump raw XML metadata for a component matching the ID.")); - g_string_append_printf (string, " %s - %s\n", "refresh-index", _("Rebuild the component information cache.")); + g_string_append_printf (string, " %s - %s\n", "dump COMPONENT-ID", _("Dump raw XML metadata for a component matching the ID.")); + g_string_append_printf (string, " %s - %s\n", "refresh-cache ", _("Rebuild the component metadata cache.")); g_string_append (string, "\n"); - g_string_append_printf (string, " %s - %s\n", "validate [FILE]", _("Validate AppStream XML files for issues.")); - g_string_append_printf (string, " %s - %s\n", "validate-tree [DIRECTORY]", _("Validate an installed file-tree of an application for valid metadata.")); + g_string_append_printf (string, " %s - %s\n", "validate FILE ", _("Validate AppStream XML files for issues.")); + g_string_append_printf (string, " %s - %s\n", "validate-tree DIRECTORY", _("Validate an installed file-tree of an application for valid metadata.")); g_string_append (string, "\n"); - g_string_append_printf (string, " %s - %s\n", "install [COMPONENT-ID]", _("Install software matching the component-id.")); - g_string_append_printf (string, " %s - %s\n", "remove [COMPONENT-ID]", _("Remove software matching the component-id.")); + g_string_append_printf (string, " %s - %s\n", "install COMPONENT-ID", _("Install software matching the component-ID.")); + g_string_append_printf (string, " %s - %s\n", "remove COMPONENT-ID", _("Remove software matching the component-ID.")); g_string_append (string, "\n"); - g_string_append_printf (string, " %s - %s\n", "put [FILE]", _("Install a metadata file into the right location.")); - g_string_append_printf (string, " %s - %s\n", "status", _("Display various information about installed AppStream metadata.")); + g_string_append_printf (string, " %s - %s\n", "status ", _("Display status information about available AppStream metadata.")); + g_string_append_printf (string, " %s - %s\n", "put FILE ", _("Install a metadata file into the right location.")); + /* TRANSLATORS: "convert" command in ascli. "Collection XML" is a term describing a specific type of AppStream XML data. */ + g_string_append_printf (string, " %s - %s\n", "convert FILE FILE", _("Convert collection XML to YAML or vice versa.")); + g_string_append_printf (string, " %s - %s\n", "new-template TYPE FILE", _("Create a template for a metainfo file (to be filled out by the upstream project).")); + + g_string_append (string, "\n"); + g_string_append (string, _("You can find information about subcommand-specific options by passing \"--help\" to the subcommand.")); return g_string_free (string, FALSE); } @@ -78,58 +628,74 @@ /** * as_client_run: */ -int +static int as_client_run (char **argv, int argc) { - GOptionContext *opt_context; - GError *error = NULL; - - gint exit_code = 0; - gchar *command = NULL; - gchar *value1 = NULL; - gchar *value2 = NULL; + g_autoptr(GOptionContext) opt_context = NULL; + gint ret; + const gchar *command = NULL; gchar *summary; - gchar *options_help = NULL; + g_autofree gchar *options_help = NULL; const GOptionEntry client_options[] = { - { "version", 0, 0, G_OPTION_ARG_NONE, &optn_show_version, _("Show the program version"), NULL }, - { "verbose", (gchar) 0, 0, G_OPTION_ARG_NONE, &optn_verbose_mode, _("Show extra debugging information"), NULL }, - { "no-color", (gchar) 0, 0, G_OPTION_ARG_NONE, &optn_no_color, _("Don't show colored output"), NULL }, - { "force", (gchar) 0, 0, G_OPTION_ARG_NONE, &optn_force, _("Enforce a cache refresh"), NULL }, - { "details", 0, 0, G_OPTION_ARG_NONE, &optn_details, _("Print detailed output about found components"), NULL }, - { "no-cache", 0, 0, G_OPTION_ARG_NONE, &optn_no_cache, _("Do not use the Xapian cache when performing the request"), NULL }, - { "dbpath", 0, 0, G_OPTION_ARG_STRING, &optn_dbpath, _("Manually set the location of the AppStream cache"), NULL }, - { "datapath", 0, 0, G_OPTION_ARG_STRING, &optn_datapath, _("Manually set the location of AppStream metadata for cache regeneration"), NULL }, - { "pedantic", (gchar) 0, 0, G_OPTION_ARG_NONE, &optn_pedantic, _("Print even pedantic hints when validating"), NULL }, + { "version", 0, 0, + G_OPTION_ARG_NONE, + &optn_show_version, + /* TRANSLATORS: ascli flag description for: --version */ + _("Show the program version."), + NULL }, + { "verbose", (gchar) 0, 0, + G_OPTION_ARG_NONE, + &optn_verbose_mode, + /* TRANSLATORS: ascli flag description for: --verbose */ + _("Show extra debugging information."), + NULL }, + { "no-color", (gchar) 0, 0, + G_OPTION_ARG_NONE, &optn_no_color, + /* TRANSLATORS: ascli flag description for: --no-color */ + _("Don\'t show colored output."), NULL }, { NULL } }; opt_context = g_option_context_new ("- AppStream CLI."); - g_option_context_set_help_enabled (opt_context, TRUE); g_option_context_add_main_entries (opt_context, client_options, NULL); /* set the summary text */ summary = as_client_get_summary (); g_option_context_set_summary (opt_context, summary) ; - options_help = g_option_context_get_help (opt_context, TRUE, NULL); g_free (summary); - g_option_context_parse (opt_context, &argc, &argv, &error); - if (error != NULL) { - gchar *msg; - msg = g_strconcat (error->message, "\n", NULL); - g_print ("%s", msg); - g_free (msg); + /* we handle the unknown options later in the individual subcommands */ + g_option_context_set_ignore_unknown_options (opt_context, TRUE); + + if (argc < 2) { + /* TRANSLATORS: ascli has been run without command. */ + g_printerr ("%s\n", _("You need to specify a command.")); ascli_print_stderr (_("Run '%s --help' to see a full list of available command line options."), argv[0]); - exit_code = 1; - g_error_free (error); - goto out; + return 1; } + command = argv[1]; + + /* only attempt to show global help if we don't have a subcommand as first parameter (subcommands are never prefixed with "-") */ + if (g_str_has_prefix (command, "-")) + g_option_context_set_help_enabled (opt_context, TRUE); + else + g_option_context_set_help_enabled (opt_context, FALSE); + + ret = as_client_option_context_parse (opt_context, NULL, &argc, &argv); + if (ret != 0) + return ret; if (optn_show_version) { - ascli_print_stdout (_("AppStream CLI tool version: %s"), VERSION); - goto out; + if (g_strcmp0 (as_get_appstream_version (), PACKAGE_VERSION) == 0) { + /* TRANSLATORS: Output if appstreamcli --version is executed. */ + ascli_print_stdout (_("AppStream version: %s"), PACKAGE_VERSION); + } else { + /* TRANSLATORS: Output if appstreamcli --version is run and the CLI and libappstream versions differ. */ + ascli_print_stdout (_("AppStream CLI tool version: %s\nAppStream library version: %s"), PACKAGE_VERSION, as_get_appstream_version ()); + } + return 0; } /* just a hack, we might need proper message handling later */ @@ -137,64 +703,53 @@ g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); } - if (argc < 2) { - g_printerr ("%s\n", _("You need to specify a command.")); - ascli_print_stderr (_("Run '%s --help' to see a full list of available command line options."), argv[0]); - exit_code = 1; - goto out; + /* allow disabling network access via an environment variable */ + if (g_getenv ("AS_VALIDATE_NONET") != NULL) { + g_debug ("Disabling network usage: Environment variable AS_VALIDATE_NONET is set."); + optn_nonet = TRUE; } - ascli_set_colored_output (!optn_no_color); + ascli_set_output_colored (!optn_no_color); - command = argv[1]; - if (argc > 2) - value1 = argv[2]; - if (argc > 3) - value2 = argv[3]; + /* if out terminal is no tty, disable colors automatically */ + if (!isatty (fileno (stdout))) + ascli_set_output_colored (FALSE); + + /* don't let gvfsd start it's own session bus: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852696 */ + g_setenv ("GIO_USE_VFS", "local", TRUE); + /* process subcommands */ if ((g_strcmp0 (command, "search") == 0) || (g_strcmp0 (command, "s") == 0)) { - exit_code = ascli_search_component (optn_dbpath, - value1, - optn_details); - } else if ((g_strcmp0 (command, "refresh-index") == 0) || (g_strcmp0 (command, "refresh") == 0)) { - exit_code = ascli_refresh_cache (optn_dbpath, - optn_datapath, - optn_force); + return as_client_run_search (argv, argc); + } else if ((g_strcmp0 (command, "refresh-cache") == 0) || (g_strcmp0 (command, "refresh") == 0)) { + return as_client_run_refresh_cache (argv, argc); } else if (g_strcmp0 (command, "get") == 0) { - exit_code = ascli_get_component (optn_dbpath, - value1, - optn_details, - optn_no_cache); + return as_client_run_get (argv, argc); } else if (g_strcmp0 (command, "dump") == 0) { - exit_code = ascli_dump_component (optn_dbpath, - value1, - optn_no_cache); + return as_client_run_dump (argv, argc); } else if (g_strcmp0 (command, "what-provides") == 0) { - exit_code = ascli_what_provides (optn_dbpath, value1, value2, optn_details); + return as_client_run_what_provides (argv, argc); } else if (g_strcmp0 (command, "validate") == 0) { - exit_code = ascli_validate_files (&argv[2], argc-2, optn_no_color, optn_pedantic); + return as_client_run_validate (argv, argc); } else if (g_strcmp0 (command, "validate-tree") == 0) { - exit_code = ascli_validate_tree (value1, optn_no_color, optn_pedantic); + return as_client_run_validate_tree (argv, argc); + } else if (g_strcmp0 (command, "put") == 0) { + return as_client_run_put (argv, argc); } else if (g_strcmp0 (command, "install") == 0) { - exit_code = ascli_install_component (value1); + return as_client_run_install (argv, argc); } else if (g_strcmp0 (command, "remove") == 0) { - exit_code = ascli_remove_component (value1); - } else if (g_strcmp0 (command, "put") == 0) { - exit_code = ascli_put_metainfo (value1); + return as_client_run_remove (argv, argc); } else if (g_strcmp0 (command, "status") == 0) { - exit_code = ascli_show_status (); + return as_client_run_status (argv, argc); + } else if (g_strcmp0 (command, "convert") == 0) { + return as_client_run_convert (argv, argc); + } else if (g_strcmp0 (command, "new-template") == 0) { + return as_client_run_new_template (argv, argc); } else { - ascli_print_stderr (_("Command '%s' is unknown."), command); - exit_code = 1; - goto out; + /* TRANSLATORS: ascli has been run with unknown command. */ + ascli_print_stderr (_("Unknown command '%s'."), command); + return 1; } - -out: - g_option_context_free (opt_context); - if (options_help != NULL) - g_free (options_help); - - return exit_code; } int diff -Nru appstream-0.9.4/tools/ascli-actions-mdata.c appstream-0.12.0/tools/ascli-actions-mdata.c --- appstream-0.9.4/tools/ascli-actions-mdata.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/ascli-actions-mdata.c 2018-04-04 15:53:56.000000000 +0000 @@ -26,72 +26,90 @@ #include #include "ascli-utils.h" -#include "as-cache-builder.h" #include "as-utils-private.h" /** * ascli_refresh_cache: */ int -ascli_refresh_cache (const gchar *dbpath, const gchar *datapath, gboolean forced) +ascli_refresh_cache (const gchar *cachepath, const gchar *datapath, gboolean forced) { - g_autoptr(AsCacheBuilder) cbuilder = NULL; + g_autoptr(AsPool) dpool = NULL; g_autoptr(GError) error = NULL; - gboolean ret; + gboolean ret = FALSE; - cbuilder = as_cache_builder_new (); + dpool = as_pool_new (); if (datapath != NULL) { - g_auto(GStrv) strv = NULL; + AsPoolFlags flags; + /* the user wants data from a different path to be used */ - strv = g_new0 (gchar*, 2); - strv[0] = g_strdup (datapath); - as_cache_builder_set_data_source_directories (cbuilder, strv); + as_pool_clear_metadata_locations (dpool); + as_pool_add_metadata_location (dpool, datapath); + + /* we auto-disable loading data from sources that are not in datapath for now */ + flags = as_pool_get_flags (dpool); + as_flags_remove (flags, AS_POOL_FLAG_READ_DESKTOP_FILES); + as_flags_remove (flags, AS_POOL_FLAG_READ_METAINFO); + as_pool_set_flags (dpool, flags); + + /* disable loading data from cache */ + as_pool_set_cache_flags (dpool, AS_CACHE_FLAG_NONE); + } + + if (cachepath == NULL) { + ret = as_pool_refresh_cache (dpool, forced, &error); + } else { + as_pool_load (dpool, NULL, &error); + if (error == NULL) + ret = as_pool_save_cache_file (dpool, cachepath, &error); } - as_cache_builder_setup (cbuilder, dbpath, &error); if (error != NULL) { - if (g_error_matches (error, AS_CACHE_BUILDER_ERROR, AS_CACHE_BUILDER_ERROR_TARGET_NOT_WRITABLE)) + if (g_error_matches (error, AS_POOL_ERROR, AS_POOL_ERROR_TARGET_NOT_WRITABLE)) + /* TRANSLATORS: In ascli: The requested action needs higher permissions. */ g_printerr ("%s\n%s\n", error->message, _("You might need superuser permissions to perform this action.")); else g_printerr ("%s\n", error->message); return 2; } - ret = as_cache_builder_refresh (cbuilder, forced, &error); - if (ret) { - /* we performed a cache refresh, check if we had errors */ - if (error == NULL) { - g_print ("%s\n", _("AppStream cache update completed successfully.")); - } else { - g_printerr ("%s\n", error->message); - } + /* we performed a cache refresh */ + + /* TRANSLATORS: Updating the metadata cache succeeded */ + g_print ("%s\n", _("AppStream cache update completed successfully.")); /* no > 0 error code, since we updated something */ return 0; } else { - /* cache wasn't updated, so the update wasn't necessary, or we have a fatal error */ - if (error == NULL) { - g_print ("%s\n", _("AppStream cache update is not necessary.")); - return 0; - } else { - g_printerr ("%s\n", error->message); - return 6; - } + /* cache wasn't updated, so the update wasn't necessary */ + g_print ("%s\n", _("AppStream cache update is not necessary.")); + return 0; } } /** - * ascli_database_new_path: + * ascli_data_pool_new_and_open: */ -static AsDatabase* -ascli_database_new_path (const gchar *dbpath) +static AsPool* +ascli_data_pool_new_and_open (const gchar *cachepath, gboolean no_cache, GError **error) { - AsDatabase *db; - db = as_database_new (); - if (dbpath != NULL) - as_database_set_location (db, dbpath); - return db; + AsPool *dpool; + + dpool = as_pool_new (); + if (cachepath == NULL) { + /* no cache object to load, we can use a normal pool - unless caching + * is generally disallowed. */ + if (no_cache) + as_pool_set_cache_flags (dpool, AS_CACHE_FLAG_NONE); + + as_pool_load (dpool, NULL, error); + } else { + /* use an exported cache object */ + as_pool_load_cache_file (dpool, cachepath, error); + } + + return dpool; } /** @@ -100,118 +118,72 @@ * Get component by id */ int -ascli_get_component (const gchar *dbpath, const gchar *identifier, gboolean detailed, gboolean no_cache) +ascli_get_component (const gchar *cachepath, const gchar *identifier, gboolean detailed, gboolean no_cache) { + g_autoptr(AsPool) dpool = NULL; g_autoptr(GError) error = NULL; - AsComponent *cpt = NULL; - gint exit_code = 0; + g_autoptr(GPtrArray) result = NULL; if (identifier == NULL) { - fprintf (stderr, "%s\n", _("You need to specify a component-id.")); + /* TRANSLATORS: An AppStream component-id is missing in the command-line arguments */ + fprintf (stderr, "%s\n", _("You need to specify a component-ID.")); return 2; } - if (no_cache) { - g_autoptr(AsDataPool) dpool = NULL; - - dpool = as_data_pool_new (); - as_data_pool_update (dpool, &error); - if (error != NULL) { - g_printerr ("%s\n", error->message); - exit_code = 1; - goto out; - } - cpt = as_data_pool_get_component_by_id (dpool, identifier); - } else { - g_autoptr(AsDatabase) db = NULL; - - db = ascli_database_new_path (dbpath); - - as_database_open (db, &error); - if (error != NULL) { - g_printerr ("%s\n", error->message); - exit_code = 1; - goto out; - } + dpool = ascli_data_pool_new_and_open (cachepath, no_cache, &error); + if (error != NULL) { + g_printerr ("%s\n", error->message); + return 1; + } - cpt = as_database_get_component_by_id (db, identifier, &error); - if (error != NULL) { - g_printerr ("%s\n", error->message); - exit_code = 1; - goto out; - } + result = as_pool_get_components_by_id (dpool, identifier); + if (result->len == 0) { + ascli_print_stderr (_("Unable to find component with ID '%s'!"), identifier); + return 4; } - if (cpt == NULL) { - ascli_print_stderr (_("Unable to find component with id '%s'!"), identifier); - exit_code = 4; - goto out; - } - ascli_print_component (cpt, detailed); - -out: - if (cpt != NULL) - g_object_unref (cpt); + ascli_print_components (result, detailed); - return exit_code; + return 0; } /** * ascli_search_component: */ int -ascli_search_component (const gchar *dbpath, const gchar *search_term, gboolean detailed) +ascli_search_component (const gchar *cachepath, const gchar *search_term, gboolean detailed, gboolean no_cache) { - g_autoptr(AsDatabase) db = NULL; - GPtrArray* cpt_list = NULL; - guint i; + g_autoptr(AsPool) dpool = NULL; + g_autoptr(GPtrArray) result = NULL; g_autoptr(GError) error = NULL; - gint exit_code = 0; - - db = ascli_database_new_path (dbpath); if (search_term == NULL) { fprintf (stderr, "%s\n", _("You need to specify a term to search for.")); - exit_code = 2; - goto out; + return 2; } - /* search for stuff */ - as_database_open (db, NULL); - cpt_list = as_database_find_components (db, search_term, NULL, &error); + dpool = ascli_data_pool_new_and_open (cachepath, no_cache, &error); if (error != NULL) { g_printerr ("%s\n", error->message); - exit_code = 1; - goto out; + return 1; } - if (cpt_list == NULL) { - /* TRANSLATORS: We failed to find any component in the database due to an error */ + result = as_pool_search (dpool, search_term); + if (result->len == 0) { + /* TRANSLATORS: We failed to find any component in the database, likely due to an error */ ascli_print_stderr (_("Unable to find component matching %s!"), search_term); - exit_code = 4; - goto out; + return 4; } - if (cpt_list->len == 0) { + if (result->len == 0) { ascli_print_stdout (_("No component matching '%s' found."), search_term); - g_ptr_array_unref (cpt_list); - goto out; - } - - for (i = 0; i < cpt_list->len; i++) { - AsComponent *cpt; - cpt = (AsComponent*) g_ptr_array_index (cpt_list, i); - - ascli_print_component (cpt, detailed); - - ascli_print_separator (); + return 0; } -out: - if (cpt_list != NULL) - g_ptr_array_unref (cpt_list); + /* show the result */ + ascli_print_components (result, detailed); - return exit_code; + return 0; } /** @@ -220,19 +192,16 @@ * Get component providing an item */ int -ascli_what_provides (const gchar *dbpath, const gchar *kind_str, const gchar *item, gboolean detailed) +ascli_what_provides (const gchar *cachepath, const gchar *kind_str, const gchar *item, gboolean detailed) { - g_autoptr(AsDatabase) db = NULL; - GPtrArray* cpt_list = NULL; + g_autoptr(AsPool) dpool = NULL; + g_autoptr(GPtrArray) result = NULL; AsProvidedKind kind; - guint i; g_autoptr(GError) error = NULL; - gint exit_code = 0; if (item == NULL) { - g_printerr ("%s\n", _("No value for the item to search for defined.")); - exit_code = 1; - goto out; + g_printerr ("%s\n", _("No value for the item to search for was defined.")); + return 1; } kind = as_provided_kind_from_string (kind_str); @@ -240,45 +209,27 @@ uint i; g_printerr ("%s\n", _("Invalid type for provided item selected. Valid values are:")); for (i = 1; i < AS_PROVIDED_KIND_LAST; i++) - fprintf (stdout, " * %s\n", as_provided_kind_to_string (i)); - exit_code = 5; - goto out; + g_printerr (" • %s\n", as_provided_kind_to_string (i)); + return 3; } - db = ascli_database_new_path (dbpath); - as_database_open (db, NULL); - - cpt_list = as_database_get_components_by_provided_item (db, kind, item, &error); + dpool = ascli_data_pool_new_and_open (cachepath, FALSE, &error); if (error != NULL) { g_printerr ("%s\n", error->message); - exit_code = 1; - goto out; - } - - if (cpt_list == NULL) { - ascli_print_stderr (_("Unable to find component providing '%s;%s'!"), kind_str, item); - exit_code = 4; - goto out; - } - - if (cpt_list->len == 0) { - ascli_print_stdout (_("No component providing '%s;%s' found."), kind_str, item); - goto out; + return 1; } - for (i = 0; i < cpt_list->len; i++) { - AsComponent *cpt; - cpt = (AsComponent*) g_ptr_array_index (cpt_list, i); - - ascli_print_component (cpt, detailed); - ascli_print_separator (); + result = as_pool_get_components_by_provided_item (dpool, kind, item); + if (result->len == 0) { + /* TRANSLATORS: Search for provided items (e.g. mimetypes, modaliases, ..) yielded no results */ + ascli_print_stdout (_("Could not find component providing '%s::%s'."), kind_str, item); + return 0; } -out: - if (cpt_list != NULL) - g_ptr_array_unref (cpt_list); + /* show results */ + ascli_print_components (result, detailed); - return exit_code; + return 0; } /** @@ -287,64 +238,54 @@ * Dump the raw upstream XML for a component. */ int -ascli_dump_component (const gchar *dbpath, const gchar *identifier, gboolean no_cache) +ascli_dump_component (const gchar *cachepath, const gchar *identifier, AsFormatKind mformat, gboolean no_cache) { - AsComponent *cpt = NULL; - AsMetadata *metad; - gchar *tmp; + g_autoptr(AsPool) dpool = NULL; + g_autoptr(GPtrArray) result = NULL; + g_autoptr(AsMetadata) metad = NULL; + guint i; g_autoptr(GError) error = NULL; - gint exit_code = 0; if (identifier == NULL) { - fprintf (stderr, "%s\n", _("You need to specify a component-id.")); + /* TRANSLATORS: ascli was told to find a software component by its ID, but no component-id was specified. */ + fprintf (stderr, "%s\n", _("You need to specify a component-ID.")); return 2; } - if (no_cache) { - g_autoptr(AsDataPool) dpool = NULL; - - dpool = as_data_pool_new (); - as_data_pool_update (dpool, &error); - if (error != NULL) { - g_printerr ("%s\n", error->message); - exit_code = 1; - goto out; - } - cpt = as_data_pool_get_component_by_id (dpool, identifier); - } else { - g_autoptr(AsDatabase) db = NULL; - - db = ascli_database_new_path (dbpath); - as_database_open (db, NULL); - - cpt = as_database_get_component_by_id (db, identifier, &error); - if (error != NULL) { - g_printerr ("%s\n", error->message); - exit_code = 1; - goto out; - } + dpool = ascli_data_pool_new_and_open (cachepath, no_cache, &error); + if (error != NULL) { + g_printerr ("%s\n", error->message); + return 1; } - if (cpt == NULL) { - ascli_print_stderr (_("Unable to find component with id '%s'!"), identifier); - exit_code = 4; - goto out; + result = as_pool_get_components_by_id (dpool, identifier); + if (result->len == 0) { + ascli_print_stderr (_("Unable to find component with ID '%s'!"), identifier); + return 4; } + /* default to XML if we don't know the format */ + if (mformat == AS_FORMAT_KIND_UNKNOWN) + mformat = AS_FORMAT_KIND_XML; + /* convert the obtained component to XML */ metad = as_metadata_new (); - as_metadata_add_component (metad, cpt); - tmp = as_metadata_component_to_upstream_xml (metad); - g_object_unref (metad); - - g_print ("%s\n", tmp); - g_free (tmp); - -out: - if (cpt != NULL) - g_object_unref (cpt); + for (i = 0; i < result->len; i++) { + g_autofree gchar *metadata = NULL; + AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (result, i)); + + as_metadata_clear_components (metad); + as_metadata_add_component (metad, cpt); + if (mformat == AS_FORMAT_KIND_YAML) { + /* we allow YAML serialization just this once */ + metadata = as_metadata_components_to_collection (metad, AS_FORMAT_KIND_YAML, NULL); + } else { + metadata = as_metadata_component_to_metainfo (metad, mformat, NULL); + } + g_print ("%s\n", metadata); + } - return exit_code; + return 0; } /** @@ -358,20 +299,29 @@ g_autofree gchar *tmp = NULL; g_autofree gchar *dest = NULL; g_autoptr(GError) error = NULL; - const gchar *metainfo_target = "/usr/share/metainfo"; + g_autofree gchar *metainfo_target = NULL; + const gchar *root_dir; if (fname == NULL) { ascli_print_stderr (_("You need to specify a metadata file.")); return 2; } + /* determine our root directory */ + root_dir = g_getenv ("DESTDIR"); + if (root_dir == NULL) + metainfo_target = g_strdup ("/usr/share/metainfo"); + else + metainfo_target = g_build_filename (root_dir, "share", "metainfo", NULL); + + g_mkdir_with_parents (metainfo_target, 0755); if (!as_utils_is_writable (metainfo_target)) { ascli_print_stderr (_("Unable to write to '%s', can not install metainfo file."), metainfo_target); return 1; } if ((!g_str_has_suffix (fname, ".metainfo.xml")) && (!g_str_has_suffix (fname, ".appdata.xml"))) { - ascli_print_stderr (_("Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' extension.")); + ascli_print_stderr (_("Can not copy '%s': File does not have a '.metainfo.xml' or '.appdata.xml' suffix.")); return 2; } @@ -387,3 +337,219 @@ return 0; } + +/** + * ascli_convert_data: + * + * Convert data from YAML to XML and vice versa. + */ +int +ascli_convert_data (const gchar *in_fname, const gchar *out_fname, AsFormatKind mformat) +{ + g_autoptr(AsMetadata) metad = NULL; + g_autoptr(GFile) infile = NULL; + GError *error = NULL; + + if (in_fname == NULL || out_fname == NULL) { + ascli_print_stderr (_("You need to specify an input and output file.")); + return 3; + } + + /* load input file */ + infile = g_file_new_for_path (in_fname); + if (!g_file_query_exists (infile, NULL)) { + ascli_print_stderr (_("Metadata file '%s' does not exist."), in_fname); + return 4; + } + + metad = as_metadata_new (); + as_metadata_set_locale (metad, "ALL"); + + if ((g_str_has_suffix (in_fname, ".yml.gz")) || + (g_str_has_suffix (in_fname, ".yaml.gz")) || + (g_str_has_suffix (in_fname, ".yml")) || + (g_str_has_suffix (in_fname, ".yaml"))) { + /* if we have YAML, we also automatically assume a collection style */ + as_metadata_set_format_style (metad, AS_FORMAT_STYLE_COLLECTION); + } + + as_metadata_parse_file (metad, + infile, + AS_FORMAT_KIND_UNKNOWN, + &error); + if (error != NULL) { + g_printerr ("%s\n", error->message); + return 1; + } + + /* since YAML files are always collection-YAMLs, we will always run in collection mode */ + as_metadata_set_format_style (metad, AS_FORMAT_STYLE_COLLECTION); + + if (mformat == AS_FORMAT_KIND_UNKNOWN) { + if (g_str_has_suffix (in_fname, ".xml") || g_str_has_suffix (in_fname, ".xml.gz")) + mformat = AS_FORMAT_KIND_YAML; + else if (g_str_has_suffix (in_fname, ".yml") || g_str_has_suffix (in_fname, ".yml.gz") || + g_str_has_suffix (in_fname, ".yaml") || g_str_has_suffix (in_fname, ".yaml.gz")) + mformat = AS_FORMAT_KIND_XML; + + if (mformat == AS_FORMAT_KIND_UNKNOWN) { + /* TRANSLATORS: User is trying to convert a file in ascli */ + ascli_print_stderr (_("Unable to convert file: Could not determine output format, please set it explicitly using '--format='.")); + return 3; + } + } + + if (g_strcmp0 (out_fname, "-") == 0) { + g_autofree gchar *data = NULL; + + /* print to stdout */ + data = as_metadata_components_to_collection (metad, mformat, &error); + if (error != NULL) { + g_printerr ("%s\n", error->message); + return 1; + } + g_print ("%s\n", data); + } else { + /* save to file */ + + as_metadata_save_collection (metad, out_fname, mformat, &error); + if (error != NULL) { + g_printerr ("%s\n", error->message); + return 1; + } + } + + return 0; +} + +/** + * ascli_create_metainfo_template: + * + * Create a metainfo file template to be filed out by the user. + */ +int +ascli_create_metainfo_template (const gchar *out_fname, const gchar *cpt_kind_str, const gchar *desktop_file) +{ + g_autoptr(AsMetadata) metad = NULL; + g_autoptr(AsComponent) cpt = NULL; + g_autoptr(GError) error = NULL; + AsComponentKind cpt_kind = AS_COMPONENT_KIND_UNKNOWN; + guint i; + + /* check if we have a component-kind set */ + cpt_kind = as_component_kind_from_string (cpt_kind_str); + if (cpt_kind == AS_COMPONENT_KIND_UNKNOWN) { + /* TRANSLATORS: The user tried to create a new template, but supplied a wrong component-type string */ + if (cpt_kind_str == NULL) + ascli_print_stderr (_("You need to give an AppStream software component type to generate a template. Possible values are:")); + else + ascli_print_stderr (_("The software component type '%s' is not valid in AppStream. Possible values are:"), cpt_kind_str); + for (i = 1; i < AS_COMPONENT_KIND_LAST; i++) + ascli_print_stderr (" • %s", as_component_kind_to_string (i)); + return 3; + } + + /* new metadata parser, limited to one locale */ + metad = as_metadata_new (); + as_metadata_set_locale (metad, "C"); + + if (desktop_file == NULL) { + cpt = as_component_new (); + as_metadata_add_component (metad, cpt); + } else { + g_autoptr(GFile) defile = NULL; + + defile = g_file_new_for_path (desktop_file); + if (!g_file_query_exists (defile, NULL)) { + ascli_print_stderr (_("The .desktop file '%s' does not exist."), desktop_file); + return 4; + } + + as_metadata_parse_file (metad, defile, AS_FORMAT_KIND_DESKTOP_ENTRY, &error); + if (error != NULL) { + ascli_print_stderr (_("Unable to read the .desktop file: %s"), error->message); + return 1; + } + + cpt = g_object_ref (as_metadata_get_component (metad)); + } + as_component_set_active_locale (cpt, "C"); + + as_component_set_kind (cpt, cpt_kind); + if (cpt_kind == AS_COMPONENT_KIND_FONT) { + as_component_set_id (cpt, "org.example.FontPackageName"); + } else if (cpt_kind == AS_COMPONENT_KIND_ADDON) { + as_component_set_id (cpt, "org.example.FooBar.my-addon"); + } else { + if (as_component_get_id (cpt) == NULL) + as_component_set_id (cpt, "org.example.SoftwareName"); + } + + if (as_component_get_name (cpt) == NULL) + as_component_set_name (cpt, "The human-readable name of this software", "C"); + + if (as_component_get_summary (cpt) == NULL) + as_component_set_summary (cpt, "A short summary describing what this software is about", "C"); + + if (as_component_get_description (cpt) == NULL) + as_component_set_description (cpt, "

    Multiple paragraphs of long description, describing this software component.

    " + "

    You can also use ordered and unordered lists:

    " + "
    • Feature 1
    • Feature 2
    " + "

    Keep in mind to XML-escape characters, and that this is not HTML markup.

    ", "C"); + + as_component_set_metadata_license (cpt, "A permissive license for this metadata, e.g. \"FSFAP\""); + as_component_set_project_license (cpt, "The license of this software as SPDX string, e.g. \"GPL-3+\""); + + as_component_set_developer_name (cpt, "The software vendor name, e.g. \"ACME Corporation\"", "C"); + + /* console-app specific */ + if (cpt_kind == AS_COMPONENT_KIND_CONSOLE_APP) { + g_autoptr(AsProvided) prov = as_provided_new (); + as_provided_set_kind (prov, AS_PROVIDED_KIND_BINARY); + as_provided_add_item (prov, "The binary name of this software in PATH"); + as_component_add_provided (cpt, prov); + } + + /* addon specific */ + if (cpt_kind == AS_COMPONENT_KIND_ADDON) + as_component_add_extends (cpt, "The component-id of the software that is extended by this addon, e.g. \"org.example.FooBar\""); + + /* font specific */ + if (cpt_kind == AS_COMPONENT_KIND_FONT) { + g_autoptr(AsProvided) prov = as_provided_new (); + + as_provided_set_kind (prov, AS_PROVIDED_KIND_FONT); + as_provided_add_item (prov, "A full font name, consisting of the fonts family and style, e.g. \"Lato Heavy Italic\""); + as_provided_add_item (prov, "Liberation Serif Bold Italic"); + as_component_add_provided (cpt, prov); + } + + /* driver specific */ + if (cpt_kind == AS_COMPONENT_KIND_DRIVER) { + g_autoptr(AsProvided) prov = as_provided_new (); + as_provided_set_kind (prov, AS_PROVIDED_KIND_MODALIAS); + as_provided_add_item (prov, "Modalias of the hardware this software handles"); + as_component_add_provided (cpt, prov); + } + + /* print to console or save to file */ + if ((out_fname == NULL) || (g_strcmp0 (out_fname, "-") == 0)) { + g_autofree gchar *metainfo_xml = NULL; + + metainfo_xml = as_metadata_component_to_metainfo (metad, AS_FORMAT_KIND_XML, &error); + if (error != NULL) { + ascli_print_stderr (_("Unable to build the template metainfo file: %s"), error->message); + return 1; + } + + g_print ("%s\n", metainfo_xml); + } else { + as_metadata_save_metainfo (metad, out_fname, AS_FORMAT_KIND_XML, &error); + if (error != NULL) { + ascli_print_stderr (_("Unable to save the template metainfo file: %s"), error->message); + return 1; + } + } + + return 0; +} diff -Nru appstream-0.9.4/tools/ascli-actions-mdata.h appstream-0.12.0/tools/ascli-actions-mdata.h --- appstream-0.9.4/tools/ascli-actions-mdata.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/ascli-actions-mdata.h 2018-04-04 15:53:56.000000000 +0000 @@ -22,33 +22,44 @@ #define __ASCLI_ACTIONS_MDATA_H #include +#include G_BEGIN_DECLS -int ascli_what_provides (const gchar *dbpath, +int ascli_what_provides (const gchar *cachepath, const gchar *kind_str, const gchar *item, gboolean detailed); -int ascli_search_component (const gchar *dbpath, +int ascli_search_component (const gchar *cachepath, const gchar *search_term, - gboolean detailed); + gboolean detailed, + gboolean no_cache); -int ascli_get_component (const gchar *dbpath, +int ascli_get_component (const gchar *cachepath, const gchar *identifier, gboolean detailed, gboolean no_cache); -int ascli_refresh_cache (const gchar *dbpath, +int ascli_refresh_cache (const gchar *cachepath, const gchar *datapath, gboolean forced); -int ascli_dump_component (const gchar *dbpath, +int ascli_dump_component (const gchar *cachepath, const gchar *identifier, + AsFormatKind mformat, gboolean no_cache); int ascli_put_metainfo (const gchar *fname); +int ascli_convert_data (const gchar *in_fname, + const gchar *out_fname, + AsFormatKind mformat); + +int ascli_create_metainfo_template (const gchar *out_fname, + const gchar *cpt_kind_str, + const gchar *desktop_file); + G_END_DECLS diff -Nru appstream-0.9.4/tools/ascli-actions-misc.c appstream-0.12.0/tools/ascli-actions-misc.c --- appstream-0.9.4/tools/ascli-actions-misc.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/ascli-actions-misc.c 2018-04-04 15:53:56.000000000 +0000 @@ -36,14 +36,17 @@ ascli_show_status (void) { guint i; - g_autoptr(AsDatabase) cache = NULL; + g_autoptr(AsPool) dpool = NULL; + g_autoptr(GError) error = NULL; const gchar *metainfo_path = "/usr/share/metainfo"; const gchar *appdata_path = "/usr/share/appdata"; + /* TRANSLATORS: In the status report of ascli: Header */ ascli_print_highlight (_("AppStream Status:")); - ascli_print_stdout ("Version: %s", VERSION); + ascli_print_stdout (_("Version: %s"), PACKAGE_VERSION); g_print ("\n"); + /* TRANSLATORS: In the status report of ascli: Refers to the metadata shipped by distributions */ ascli_print_highlight (_("Distribution metadata:")); for (i = 0; AS_APPSTREAM_METADATA_PATHS[i] != NULL; i++) { g_autofree gchar *xml_path = NULL; @@ -107,7 +110,8 @@ g_print ("\n"); } - ascli_print_highlight (_("Upstream metadata:")); + /* TRANSLATORS: Info about upstream metadata / metainfo files in the ascli status report */ + ascli_print_highlight (_("Metainfo files:")); if (g_file_test (metainfo_path, G_FILE_TEST_IS_DIR)) { g_autoptr(GPtrArray) xmls = NULL; g_autofree gchar *msg = NULL; @@ -119,6 +123,7 @@ } } else { if (!g_file_test (appdata_path, G_FILE_TEST_IS_DIR)) + /* TRANSLATORS: No metainfo files have been found */ ascli_print_stdout (" - %s", _("Empty.")); } if (g_file_test (appdata_path, G_FILE_TEST_IS_DIR)) { @@ -127,28 +132,29 @@ xmls = as_utils_find_files_matching (appdata_path, "*.xml", FALSE, NULL); if (xmls != NULL) { + /* TRANSLATORS: Found metainfo files in legacy directories */ msg = g_strdup_printf (_("Found %i components in legacy paths."), xmls->len); ascli_print_stdout (" - %s", msg); } } g_print ("\n"); + /* TRANSLATORS: Status summary in ascli */ ascli_print_highlight (_("Summary:")); - cache = as_database_new (); - if (g_file_test (as_database_get_location (cache), G_FILE_TEST_IS_DIR)) { + + dpool = as_pool_new (); + as_pool_load (dpool, NULL, &error); + if (error == NULL) { g_autoptr(GPtrArray) cpts = NULL; - g_autoptr(GError) error = NULL; + cpts = as_pool_get_components (dpool); - ascli_print_stdout (_("The system metadata cache exists.")); - as_database_open (cache, NULL); - cpts = as_database_get_all_components (cache, &error); - if (error != NULL) { - ascli_print_stdout (_("There was an error while trying to find additional information: %s"), error->message); - } else { - ascli_print_stdout (_("We have information on %i software components."), cpts->len); - } + ascli_print_stdout (_("We have information on %i software components."), cpts->len); + /* TODO: Request the on-disk cache status from #AsPool and display it here. + * ascli_print_stdout (_("The system metadata cache exists.")); + * ascli_print_stdout (_("The system metadata cache does not exist.")); + */ } else { - ascli_print_stdout (_("The system metadata cache does not exist.")); + ascli_print_stderr (_("Error while loading the metadata pool: %s"), error->message); } return 0; diff -Nru appstream-0.9.4/tools/ascli-actions-pkgmgr.c appstream-0.12.0/tools/ascli-actions-pkgmgr.c --- appstream-0.9.4/tools/ascli-actions-pkgmgr.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/ascli-actions-pkgmgr.c 2018-04-04 15:53:56.000000000 +0000 @@ -72,51 +72,42 @@ ascli_get_component_pkgnames (const gchar *identifier, gchar ***pkgnames) { g_autoptr(GError) error = NULL; - g_autoptr(AsDatabase) db = NULL; - AsComponent *cpt = NULL; - gint exit_code = 0; + g_autoptr(AsPool) dpool = NULL; + g_autoptr(GPtrArray) result = NULL; + AsComponent *cpt; if (identifier == NULL) { - ascli_print_stderr (_("You need to specify a component-id.")); + ascli_print_stderr (_("You need to specify a component-ID.")); return 2; } - db = as_database_new (); - - as_database_open (db, &error); + dpool = as_pool_new (); + as_pool_load (dpool, NULL, &error); if (error != NULL) { g_printerr ("%s\n", error->message); - exit_code = 1; - goto out; + return 1; } - cpt = as_database_get_component_by_id (db, identifier, &error); - if (error != NULL) { - g_printerr ("%s\n", error->message); - exit_code = 1; - goto out; + result = as_pool_get_components_by_id (dpool, identifier); + if (result->len == 0) { + ascli_print_stderr (_("Unable to find component with ID '%s'!"), identifier); + return 4; } - if (cpt == NULL) { - ascli_print_stderr (_("Unable to find component with id '%s'!"), identifier); - exit_code = 4; - goto out; - } + /* FIXME: Ask user which component they want to install? */ + cpt = AS_COMPONENT (g_ptr_array_index (result, 0)); /* we need a variable to take the pkgnames array */ g_assert (pkgnames != NULL); *pkgnames = g_strdupv (as_component_get_pkgnames (cpt)); if (*pkgnames == NULL) { + /* TRANSLATORS: We found no distribution package or bundle to install to make this software available */ ascli_print_stderr (_("Component '%s' has no installation candidate."), identifier); - exit_code = 1; - goto out; + return 1; } -out: - if (cpt != NULL) - g_object_unref (cpt); - return exit_code; + return 0; } /** diff -Nru appstream-0.9.4/tools/ascli-actions-validate.c appstream-0.12.0/tools/ascli-actions-validate.c --- appstream-0.9.4/tools/ascli-actions-validate.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/ascli-actions-validate.c 2018-04-04 15:53:56.000000000 +0000 @@ -25,11 +25,13 @@ #include #include +#include "ascli-utils.h" + /** * importance_to_print_string: **/ static gchar* -importance_location_to_print_string (AsIssueImportance importance, const gchar *location, gboolean pretty) +importance_location_to_print_string (AsIssueImportance importance, const gchar *location) { gchar *str; @@ -50,7 +52,7 @@ str = g_strdup_printf ("U - %s", location); } - if (pretty) { + if (ascli_get_output_colored ()) { switch (importance) { case AS_ISSUE_IMPORTANCE_ERROR: return g_strdup_printf ("%c[%d;1m%s%c[%dm", 0x1B, 31, str, 0x1B, 0); @@ -66,41 +68,57 @@ } else { return str; } - - g_free (str); } /** * print_report: **/ static gboolean -process_report (GList *issues, gboolean pretty, gboolean pedantic) +process_report (GList *issues, gboolean pedantic, gulong *error_count, gulong *warning_count, gulong *info_count, gulong *pedantic_count) { GList *l; AsValidatorIssue *issue; AsIssueImportance importance; gboolean no_errors = TRUE; - gchar *header; for (l = issues; l != NULL; l = l->next) { - issue = (AsValidatorIssue*) l->data; + g_autofree gchar *location = NULL; + g_autofree gchar *header = NULL; + g_autofree gchar *message = NULL; + + issue = AS_VALIDATOR_ISSUE (l->data); importance = as_validator_issue_get_importance (issue); /* if there are errors or warnings, we consider the validation to be failed */ - if ((importance == AS_ISSUE_IMPORTANCE_ERROR) || (importance == AS_ISSUE_IMPORTANCE_WARNING)) - no_errors = FALSE; + switch (importance) { + case AS_ISSUE_IMPORTANCE_ERROR: + (*error_count)++; + no_errors = FALSE; + break; + case AS_ISSUE_IMPORTANCE_WARNING: + (*warning_count)++; + no_errors = FALSE; + break; + case AS_ISSUE_IMPORTANCE_INFO: + (*info_count)++; + break; + case AS_ISSUE_IMPORTANCE_PEDANTIC: + (*pedantic_count)++; + break; + default: break; + } /* skip pedantic issues if we should not show them */ if ((!pedantic) && (importance == AS_ISSUE_IMPORTANCE_PEDANTIC)) continue; - header = importance_location_to_print_string (importance, - as_validator_issue_get_location (issue), - pretty); + location = as_validator_issue_get_location (issue); + header = importance_location_to_print_string (importance, location); + + message = ascli_format_long_output (as_validator_issue_get_message (issue), 4); g_print ("%s\n %s\n\n", header, - as_validator_issue_get_message (issue)); - g_free (header); + message); } return no_errors; @@ -109,8 +127,8 @@ /** * ascli_validate_file: **/ -gboolean -ascli_validate_file (gchar *fname, gboolean pretty, gboolean pedantic) +static gboolean +ascli_validate_file (gchar *fname, gboolean pedantic, gboolean use_net, gulong *error_count, gulong *warning_count, gulong *info_count, gulong *pedantic_count) { GFile *file; gboolean ret; @@ -127,12 +145,19 @@ } validator = as_validator_new (); + as_validator_set_check_urls (validator, use_net); + ret = as_validator_validate_file (validator, file); if (!ret) errors_found = TRUE; issues = as_validator_get_issues (validator); - ret = process_report (issues, pretty, pedantic); + ret = process_report (issues, + pedantic, + error_count, + warning_count, + info_count, + pedantic_count); if (!ret) errors_found = TRUE; @@ -144,13 +169,55 @@ } /** + * ascli_validate_print_stats: + * + * Print issue statistic to stdout. + */ +static void +ascli_validate_print_stats (gulong error_count, gulong warning_count, gulong info_count, gulong pedantic_count) +{ + gboolean add_spacer = FALSE; + + if (error_count > 0) { + /* TRANSLATORS: Used for small issue-statistics in appstreamcli-validate */ + g_print (_("errors: %lu"), error_count); + add_spacer = TRUE; + } + if (warning_count > 0) { + if (add_spacer) + g_print (", "); + /* TRANSLATORS: Used for small issue-statistics in appstreamcli-validate */ + g_print (_("warnings: %lu"), warning_count); + add_spacer = TRUE; + } + if (info_count > 0) { + if (add_spacer) + g_print (", "); + /* TRANSLATORS: Used for small issue-statistics in appstreamcli-validate */ + g_print (_("infos: %lu"), info_count); + add_spacer = TRUE; + } + if (pedantic_count > 0) { + if (add_spacer) + g_print (", "); + /* TRANSLATORS: Used for small issue-statistics in appstreamcli-validate */ + g_print (_("pedantic: %lu"), pedantic_count); + add_spacer = TRUE; + } +} + +/** * ascli_validate_files: */ gint -ascli_validate_files (gchar **argv, gint argc, gboolean no_color, gboolean pedantic) +ascli_validate_files (gchar **argv, gint argc, gboolean pedantic, gboolean use_net) { gint i; gboolean ret = TRUE; + gulong error_count = 0; + gulong warning_count = 0; + gulong info_count = 0; + gulong pedantic_count = 0; if (argc < 1) { g_print ("%s\n", _("You need to specify a file to validate!")); @@ -159,30 +226,56 @@ for (i = 0; i < argc; i++) { gboolean tmp_ret; - tmp_ret = ascli_validate_file (argv[i], !no_color, pedantic); + tmp_ret = ascli_validate_file (argv[i], + pedantic, + use_net, + &error_count, + &warning_count, + &info_count, + &pedantic_count); if (!tmp_ret) ret = FALSE; } if (ret) { - g_print ("%s\n", _("Validation was successful.")); + if ((error_count == 0) && (warning_count == 0) && + (info_count == 0) && (pedantic_count == 0)) { + g_print ("%s\n", _("Validation was successful.")); + } else { + g_print (_("Validation was successful: %s"), ""); + ascli_validate_print_stats (error_count, + warning_count, + info_count, + pedantic_count); + g_print ("\n"); + } + + return 0; } else { - g_print ("%s\n", _("Validation failed.")); + g_print (_("Validation failed: %s"), ""); + ascli_validate_print_stats (error_count, + warning_count, + info_count, + pedantic_count); + g_print ("\n"); + return 3; } - - return 0; } /** * ascli_validate_tree: */ gint -ascli_validate_tree (const gchar *root_dir, gboolean no_color, gboolean pedantic) +ascli_validate_tree (const gchar *root_dir, gboolean pedantic, gboolean use_net) { gboolean no_errors = TRUE; AsValidator *validator; GList *issues; + gulong error_count = 0; + gulong warning_count = 0; + gulong info_count = 0; + gulong pedantic_count = 0; if (root_dir == NULL) { g_print ("%s\n", _("You need to specify a root directory to start validation!")); @@ -190,18 +283,43 @@ } validator = as_validator_new (); + as_validator_set_check_urls (validator, use_net); + as_validator_validate_tree (validator, root_dir); issues = as_validator_get_issues (validator); - no_errors = process_report (issues, !no_color, pedantic); + no_errors = process_report (issues, + pedantic, + &error_count, + &warning_count, + &info_count, + &pedantic_count); g_list_free (issues); g_object_unref (validator); if (no_errors) { - g_print ("%s\n", _("Validation was successful.")); + if ((error_count == 0) && (warning_count == 0) && + (info_count == 0) && (pedantic_count == 0)) { + g_print ("%s\n", _("Validation was successful.")); + } else { + g_print (_("Validation was successful: %s"), ""); + ascli_validate_print_stats (error_count, + warning_count, + info_count, + pedantic_count); + g_print ("\n"); + } + + return 0; } else { - g_print ("%s\n", _("Validation failed.")); + g_print (_("Validation failed: %s"), ""); + ascli_validate_print_stats (error_count, + warning_count, + info_count, + pedantic_count); + g_print ("\n"); + return 3; } diff -Nru appstream-0.9.4/tools/ascli-actions-validate.h appstream-0.12.0/tools/ascli-actions-validate.h --- appstream-0.9.4/tools/ascli-actions-validate.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/ascli-actions-validate.h 2018-04-04 15:53:56.000000000 +0000 @@ -25,18 +25,14 @@ G_BEGIN_DECLS -gboolean ascli_validate_file (gchar *fname, - gboolean pretty, - gboolean pedantic); - gint ascli_validate_files (gchar **argv, gint argc, - gboolean no_color, - gboolean pedantic); + gboolean pedantic, + gboolean use_net); gint ascli_validate_tree (const gchar *root_dir, - gboolean no_color, - gboolean pedantic); + gboolean pedantic, + gboolean use_net); G_END_DECLS diff -Nru appstream-0.9.4/tools/ascli-utils.c appstream-0.12.0/tools/ascli-utils.c --- appstream-0.9.4/tools/ascli-utils.c 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/ascli-utils.c 2018-04-04 15:53:56.000000000 +0000 @@ -22,43 +22,64 @@ #include #include -#include "as-utils-private.h" /** * Set to true if we don't want colored output */ -gboolean _nocolor_output = FALSE; +static gboolean _colored_output = FALSE; /** * ascli_format_long_output: */ gchar* -ascli_format_long_output (const gchar *str) +ascli_format_long_output (const gchar *str, guint indent_level) { GString *res = NULL; - guint i, j; - gboolean do_linebreak = FALSE; + guint count = 0; + gssize last_space = 0; + const gchar *char_ptr = str; + + g_autofree gchar *spacing = NULL; + g_autofree gchar *break_indent = NULL; + + spacing = g_strnfill (indent_level, ' '); + break_indent = g_strdup_printf ("\n%s", spacing); + + res = g_string_sized_new (strlen (str)); + + while (*char_ptr != '\0') { + gunichar uchar = g_utf8_get_char_validated (char_ptr, -1); + + if (uchar == '\n') { + g_string_append (res, break_indent); + count = 0; + last_space = 0; + goto next; + } - res = g_string_new ("\n "); + g_string_append_unichar (res, uchar); + count++; - for (i = 0; str[i] != '\0'; ++i) { - if ((j != 0) && ((j % 80) == 0)) - do_linebreak = TRUE; - if (str[i] == '\n') { - do_linebreak = FALSE; - g_string_append (res, "\n "); - j = 0; - continue; - } - if ((do_linebreak) && (str[i] == ' ')) { - do_linebreak = FALSE; - g_string_append (res, "\n "); - j = 0; - continue; + if (g_unichar_isspace (uchar)) { + last_space = res->len; + if (count > 80) { + g_string_append (res, break_indent); + count = 0; + last_space = 0; + goto next; + } + } else if (count > 80) { + /* insert a linebreak at previous position */ + if (last_space > 0) { + g_string_erase (res, last_space, 0); + g_string_insert (res, last_space, break_indent); + count = 0; + last_space = 0; + } } - g_string_append_c (res, str[i]); - j++; + next: + char_ptr = g_utf8_next_char (char_ptr); } return g_string_free (res, FALSE); @@ -74,24 +95,24 @@ gchar *fmtval; g_return_if_fail (key != NULL); - if (as_str_empty (val)) + if ((val == NULL) || (g_strcmp0 (val, "") == 0)) return; if (strlen (val) > 120) { /* only produces slightly better output (indented). * we need word-wrapping in future */ - fmtval = ascli_format_long_output (val); + fmtval = ascli_format_long_output (val, 2); } else { fmtval = g_strdup (val); } str = g_strdup_printf ("%s: ", key); - if (_nocolor_output) { - g_print ("%s%s\n", str, fmtval); - } else { + if (_colored_output) { g_print ("%c[%dm%s%c[%dm%s\n", 0x1B, 1, str, 0x1B, 0, fmtval); + } else { + g_print ("%s%s\n", str, fmtval); } g_free (str); @@ -104,10 +125,10 @@ void ascli_print_highlight (const gchar* msg) { - if (_nocolor_output) { - g_print ("%s\n", msg); - } else { + if (_colored_output) { g_print ("%c[%dm%s%c[%dm\n", 0x1B, 1, msg, 0x1B, 0); + } else { + g_print ("%s\n", msg); } } @@ -117,10 +138,10 @@ void ascli_print_separator () { - if (_nocolor_output) { - g_print ("----\n"); + if (_colored_output) { + g_print ("%c[%dm%s\n%c[%dm", 0x1B, 36, "---", 0x1B, 0); } else { - g_print ("%c[%dm%s\n%c[%dm", 0x1B, 36, "----", 0x1B, 0); + g_print ("---\n"); } } @@ -161,12 +182,21 @@ } /** - * ascli_set_colored_output: + * ascli_set_output_colored: */ void -ascli_set_colored_output (gboolean colored) +ascli_set_output_colored (gboolean colored) +{ + _colored_output = colored; +} + +/** + * ascli_get_output_colored: + */ +gboolean +ascli_get_output_colored () { - _nocolor_output = !colored; + return _colored_output; } /** @@ -184,14 +214,14 @@ gstr = g_string_new (""); for (i = 0; i < AS_BUNDLE_KIND_LAST; i++) { AsBundleKind kind = (AsBundleKind) i; - const gchar *bundle_id; + AsBundle *bundle; - bundle_id = as_component_get_bundle_id (cpt, kind); - if (bundle_id == NULL) + bundle = as_component_get_bundle (cpt, kind); + if (bundle == NULL) continue; g_string_append_printf (gstr, "%s:%s, ", as_bundle_kind_to_string (kind), - bundle_id); + as_bundle_get_id (bundle)); } if (gstr->len > 0) @@ -215,11 +245,10 @@ return g_strdup (g_ptr_array_index (array, 0)); } - rstr = g_string_new (""); + rstr = g_string_new ("\n"); for (i = 0; i < array->len; i++) { const gchar *astr = (const gchar*) g_ptr_array_index (array, i); - - g_string_append_printf (rstr, "- %s\n", astr); + g_string_append_printf (rstr, " - %s\n", astr); } if (rstr->len > 0) g_string_truncate (rstr, rstr->len - 1); @@ -266,27 +295,28 @@ GPtrArray *sshot_array; GPtrArray *imgs = NULL; GPtrArray *extends; - GPtrArray *extensions; - GList *provided; - GList *l; + GPtrArray *addons; + GPtrArray *categories; + GPtrArray *compulsory_desktops; + GPtrArray *provided; + guint i; AsScreenshot *sshot; AsImage *img; gchar *str; - gchar **strv; /* developer name */ ascli_print_key_value (_("Developer"), as_component_get_developer_name (cpt), FALSE); /* extends data (e.g. for addons) */ extends = as_component_get_extends (cpt); - if (extends != NULL) { + if (extends->len > 0) { str = ascli_ptrarray_to_pretty (extends); ascli_print_key_value (_("Extends"), str, FALSE); g_free (str); } /* long description */ - str = as_description_markup_convert_simple (as_component_get_description (cpt)); + str = as_markup_convert_simple (as_component_get_description (cpt), NULL); ascli_print_key_value (_("Description"), str, FALSE); g_free (str); @@ -307,7 +337,7 @@ for (j = 0; j < imgs->len; j++) { img = (AsImage*) g_ptr_array_index (imgs, j); if (as_image_get_kind (img) == AS_IMAGE_KIND_SOURCE) { - ascli_print_key_value (_("Sample Screenshot URL"), as_image_get_url (img), FALSE); + ascli_print_key_value (_("Default Screenshot URL"), as_image_get_url (img), FALSE); break; } } @@ -320,48 +350,78 @@ ascli_print_key_value (_("License"), as_component_get_project_license (cpt), FALSE); /* Categories */ - strv = as_component_get_categories (cpt); - if (strv != NULL) { - str = g_strjoinv (", ", strv); + categories = as_component_get_categories (cpt); + if (categories->len > 0) { + str = ascli_ptrarray_to_pretty (categories); ascli_print_key_value (_("Categories"), str, FALSE); g_free (str); } - /* desktop-compulsority */ - strv = as_component_get_compulsory_for_desktops (cpt); - if (strv != NULL) { - str = g_strjoinv (", ", strv); + /* Desktop-compulsority */ + compulsory_desktops = as_component_get_compulsory_for_desktops (cpt); + if (compulsory_desktops->len > 0) { + str = ascli_ptrarray_to_pretty (compulsory_desktops); ascli_print_key_value (_("Compulsory for"), str, FALSE); g_free (str); } /* list of addons extending this component */ - extensions = as_component_get_extensions (cpt); - if (extensions != NULL) { - str = ascli_ptrarray_to_pretty (extensions); - ascli_print_key_value (_("Extensions"), str, FALSE); + addons = as_component_get_addons (cpt); + if (addons->len > 0) { + g_autoptr(GPtrArray) addons_str = g_ptr_array_new_with_free_func (g_free); + for (i = 0; i < addons->len; i++) { + AsComponent *addon = AS_COMPONENT (g_ptr_array_index (addons, i)); + if (as_component_get_kind (addon) == AS_COMPONENT_KIND_LOCALIZATION) { + g_ptr_array_add (addons_str, g_strdup_printf ("l10n: %s", + as_component_get_id (addon))); + } else { + g_ptr_array_add (addons_str, g_strdup_printf ("%s (%s)", + as_component_get_id (addon), + as_component_get_name (cpt))); + } + } + str = ascli_ptrarray_to_pretty (addons_str); + /* TRANSLATORS: Addons are extensions for existing software components, e.g. support for more visual effects for a video editor */ + ascli_print_key_value (_("Add-ons"), str, FALSE); g_free (str); } /* Provided Items */ provided = as_component_get_provided (cpt); - if (provided != NULL) + if (provided->len > 0) ascli_print_key_value (_("Provided Items"), "↓", FALSE); - for (l = provided; l != NULL; l = l->next) { - g_autofree gchar **items = NULL; - AsProvided *prov = AS_PROVIDED (l->data); + for (i = 0; i < provided->len; i++) { + GPtrArray *items = NULL; + AsProvided *prov = AS_PROVIDED (g_ptr_array_index (provided, i)); items = as_provided_get_items (prov); - if (items != NULL) { + if (items->len > 0) { g_autofree gchar *keyname = NULL; - str = g_strjoinv (" ", items); - keyname = g_strdup_printf (" %s", - as_provided_kind_to_l10n_string (as_provided_get_kind (prov))); - + str = ascli_ptrarray_to_pretty (items); + keyname = g_strdup_printf (" %s", as_provided_kind_to_l10n_string (as_provided_get_kind (prov))); ascli_print_key_value (keyname, str, FALSE); g_free (str); } } } } + +/** + * ascli_print_components: + * + * Print well-formatted details about multiple components to stdout. + */ +void +ascli_print_components (GPtrArray *cpts, gboolean show_detailed) +{ + guint i; + + for (i = 0; i < cpts->len; i++) { + AsComponent *cpt = AS_COMPONENT(g_ptr_array_index (cpts, i)); + ascli_print_component (cpt, show_detailed); + + if (i < cpts->len-1) + ascli_print_separator (); + } +} diff -Nru appstream-0.9.4/tools/ascli-utils.h appstream-0.12.0/tools/ascli-utils.h --- appstream-0.9.4/tools/ascli-utils.h 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/ascli-utils.h 2018-04-04 15:53:56.000000000 +0000 @@ -26,17 +26,24 @@ G_BEGIN_DECLS -gchar *ascli_format_long_output (const gchar *str); -void ascli_print_key_value (const gchar* key, const gchar* val, gboolean highlight); +gchar *ascli_format_long_output (const gchar *str, + guint indent_level); +void ascli_print_key_value (const gchar *key, + const gchar *val, + gboolean highlight); void ascli_print_separator (void); void ascli_print_stdout (const gchar *format, ...); void ascli_print_stderr (const gchar *format, ...); void ascli_print_highlight (const gchar* msg); -void ascli_print_component (AsComponent *cpt, gboolean show_detailed); +void ascli_print_component (AsComponent *cpt, + gboolean show_detailed); +void ascli_print_components (GPtrArray *cpts, + gboolean show_detailed); -void ascli_set_colored_output (gboolean colored); +void ascli_set_output_colored (gboolean colored); +gboolean ascli_get_output_colored (void); G_END_DECLS diff -Nru appstream-0.9.4/tools/CMakeLists.txt appstream-0.12.0/tools/CMakeLists.txt --- appstream-0.9.4/tools/CMakeLists.txt 2016-04-18 14:19:38.000000000 +0000 +++ appstream-0.12.0/tools/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -# CMakeLists for the AppStream CLI tool -project(appstream-cli) - -find_package(GLIB2 REQUIRED) -pkg_check_modules(GIO2 REQUIRED gio-2.0) -find_library(M_LIB m) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/src - ${GLIB2_INCLUDE_DIR} - ${GIO2_INCLUDE_DIR} -) - -set(ASCLI_SOURCES - appstream-cli.c - ascli-utils.h - ascli-utils.c - ascli-actions-mdata.h - ascli-actions-mdata.c - ascli-actions-validate.h - ascli-actions-validate.c - ascli-actions-pkgmgr.h - ascli-actions-pkgmgr.c - ascli-actions-misc.h - ascli-actions-misc.c -) - -# Add the appstream client tool -add_executable(appstreamcli ${ASCLI_SOURCES}) -add_dependencies(appstreamcli appstream) - -# the client tool uses API which is currently private... -# needs to be sorted out in future -add_definitions ("-DAS_COMPILATION") - -target_link_libraries(appstreamcli - ${M_LIB} - ${GLIB2_LIBRARIES} - ${GIO2_LIBRARIES} - appstream -) - -install(TARGETS appstreamcli DESTINATION ${CMAKE_INSTALL_BINDIR}) diff -Nru appstream-0.9.4/tools/meson.build appstream-0.12.0/tools/meson.build --- appstream-0.9.4/tools/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ appstream-0.12.0/tools/meson.build 2018-04-04 15:53:56.000000000 +0000 @@ -0,0 +1,21 @@ +# Meson definition for appstreamcli + +ascli_src = [ + 'appstream-cli.c', + 'ascli-utils.c', + 'ascli-actions-pkgmgr.c', + 'ascli-actions-validate.c', + 'ascli-actions-mdata.c', + 'ascli-actions-misc.c' +] + +ascli_exe = executable('appstreamcli', + [ascli_src], + dependencies: [glib_dep, + gobject_dep, + gio_dep], + link_with: [appstream_lib], + include_directories: [appstream_lib_inc, + include_directories ('..')], + install: true +)