Warning, /multimedia/kid3/translations/download-pos.cmake is written in an unsupported language. File is not indexed.

0001 # Download the translations directly from SVN.
0002 # Usage: cmake -P download-pos.cmake LANGUAGES
0003 # CMAKE_ARGV0, CMAKE_ARGV1, CMAKE_ARGV2 are
0004 # /path/to/cmake, -P, /path/to/download-pos.cmake
0005 set(_languages ${CMAKE_ARGV3})
0006 set(_urlprefix "https://websvn.kde.org/*checkout*/trunk/l10n-kf5")
0007 set(_podir "${CMAKE_CURRENT_LIST_DIR}/po")
0008 set(_hdr "User-Agent: Mozilla/5.0")
0009 set(_url "${_urlprefix}/templates/messages/kid3/kid3_qt.pot")
0010 message(STATUS "Downloading po")
0011 file(DOWNLOAD ${_url} "${_podir}/kid3_qt.pot"
0012   HTTPHEADER "${_hdr}"
0013   STATUS _status)
0014 if(NOT _status MATCHES "^0;")
0015   message(FATAL_ERROR "${_url}: ${_status}")
0016 endif()
0017 foreach(_lang ${_languages})
0018   set(_url "${_urlprefix}/${_lang}/messages/kid3/kid3_qt.po")
0019   file(DOWNLOAD ${_url} "${_podir}/${_lang}/kid3_qt.po"
0020     HTTPHEADER "${_hdr}"
0021     STATUS _status)
0022   if(NOT _status MATCHES "^0;")
0023     message(FATAL_ERROR "${_url}: ${_status}")
0024   endif()
0025 endforeach()