Add translated freedesktop 'Desktop Entry' file
- Add po4a as build-dependency for travis (but it fallsback to english-only if not found) - Add (easy) french translationdev-ui
parent
c793d2d4c6
commit
a75f02089c
|
@ -5,4 +5,4 @@ script: cmake . -DCMAKE_VERBOSE_MAKEFILE=ON && make all doc test
|
|||
before_install:
|
||||
- git submodule update --init --recursive
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq --no-install-recommends libgl1-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libpng12-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev google-mock libgtest-dev doxygen graphviz
|
||||
- sudo apt-get install -qq --no-install-recommends libgl1-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libpng12-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev google-mock libgtest-dev doxygen graphviz po4a
|
||||
|
|
|
@ -6,6 +6,8 @@ add_subdirectory(tools)
|
|||
|
||||
add_subdirectory(po)
|
||||
|
||||
add_subdirectory(desktop)
|
||||
|
||||
# Tests
|
||||
if(${TESTS})
|
||||
add_subdirectory(common/test)
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
# Install Desktop Entry file
|
||||
set(COLOBOT_DESKTOP_FILE colobot.desktop)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${COLOBOT_DESKTOP_FILE}
|
||||
COMMAND ./create_desktop_file.sh > ${CMAKE_CURRENT_BINARY_DIR}/${COLOBOT_DESKTOP_FILE}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Build ${COLOBOT_DESKTOP_FILE}"
|
||||
)
|
||||
add_custom_target(desktopfile ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${COLOBOT_DESKTOP_FILE})
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/${COLOBOT_DESKTOP_FILE}
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/
|
||||
)
|
||||
|
||||
find_program(PO4A po4a)
|
||||
|
||||
if(PO4A)
|
||||
add_custom_target(desktop_po4a
|
||||
COMMAND ${PO4A} po4a.cfg
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_dependencies(desktopfile desktop_po4a)
|
||||
endif()
|
|
@ -0,0 +1,4 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Exec=colobot
|
|
@ -0,0 +1,3 @@
|
|||
Name="Colobot"
|
||||
GenericName="Game to learn programming"
|
||||
Comment="Colonize with bots"
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Create colobot.desktop from various colobot.ini's
|
||||
|
||||
fname=colobot.ini
|
||||
|
||||
cat colobot.desktop.in
|
||||
|
||||
linguas=$([ ! -d lang ] || ( cd lang ; ls));
|
||||
|
||||
for type in Name GenericName Comment; do
|
||||
egrep "^$type=" $fname | sed -e "s/^$type=\"\(.*\)\"$/$type=\1/g"
|
||||
for l in $linguas; do
|
||||
egrep "^$type=" lang/$l/$fname | sed -e "s/^$type=\"\(.*\)\"$/$type[$l]=\1/g"
|
||||
done
|
||||
done
|
|
@ -0,0 +1,32 @@
|
|||
# SOME DESCRIPTIVE TITLE
|
||||
# Copyright (C) YEAR Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2012-12-26 15:05+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: colobot.ini:1
|
||||
#, no-wrap
|
||||
msgid "Colobot"
|
||||
msgstr ""
|
||||
|
||||
#: colobot.ini:2
|
||||
#, no-wrap
|
||||
msgid "Game to learn programming"
|
||||
msgstr ""
|
||||
|
||||
#: colobot.ini:3
|
||||
#, no-wrap
|
||||
msgid "Colonize with bots"
|
||||
msgstr ""
|
|
@ -0,0 +1,32 @@
|
|||
# French translations for PACKAGE package
|
||||
# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Automatically generated, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2012-12-26 15:05+0100\n"
|
||||
"PO-Revision-Date: 2012-12-26 15:05+0100\n"
|
||||
"Last-Translator: Didier Raboud <odyx@debian.org>\n"
|
||||
"Language-Team: none\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"
|
||||
|
||||
#: colobot.ini:1
|
||||
#, no-wrap
|
||||
msgid "Colobot"
|
||||
msgstr "Colobot"
|
||||
|
||||
#: colobot.ini:2
|
||||
#, no-wrap
|
||||
msgid "Game to learn programming"
|
||||
msgstr "Apprentissage de la programmation par le jeu"
|
||||
|
||||
#: colobot.ini:3
|
||||
#, no-wrap
|
||||
msgid "Colonize with bots"
|
||||
msgstr "Colonise avec des roBots"
|
|
@ -0,0 +1,3 @@
|
|||
[po_directory] po/
|
||||
|
||||
[type:ini] colobot.ini $lang:lang/$lang/colobot.ini
|
Loading…
Reference in New Issue